@pega/constellation-corejs 10.0.0-build.17.2 → 10.0.0-build.17.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/constellation-corejs.esm.js +1 -1
- package/dist/constellation-corejs.global.js +1 -1
- package/lib/feed/index.d.ts +12 -0
- package/lib/feed/index.d.ts.map +1 -1
- package/lib/feed/index.js +43 -28
- package/lib/feed/index.js.map +1 -1
- package/lib/feed/types.d.ts +23 -0
- package/lib/feed/types.d.ts.map +1 -0
- package/lib/feed/types.js +2 -0
- package/lib/feed/types.js.map +1 -0
- package/package.json +1 -1
- package/src/feed/index.ts +52 -50
- package/src/feed/types.ts +24 -0
|
@@ -99,7 +99,7 @@ Boolean requesting whether a visible border and background is provided by the ho
|
|
|
99
99
|
- omitted: host decides border`)}),rHe=b.object({method:b.literal("ui/request-display-mode"),params:b.object({mode:My.describe("The display mode being requested.")})}),Ode=b.object({mode:My.describe("The display mode that was actually set. May differ from requested if not supported.")}).passthrough(),xde=b.union([b.literal("model"),b.literal("app")]).describe("Tool visibility scope - who can access the tool."),oHe=b.object({resourceUri:b.string().optional(),visibility:b.array(xde).optional().describe(`Who can access this tool. Default: ["model", "app"]
|
|
100
100
|
- "model": Tool visible to and callable by the agent
|
|
101
101
|
- "app": Tool callable by the app from this server only`),csp:b.never().optional(),permissions:b.never().optional()}),iHe=b.object({mimeTypes:b.array(b.string()).optional().describe('Array of supported MIME types for UI resources.\nMust include `"text/html;profile=mcp-app"` for MCP Apps support.')}),sHe=b.object({method:b.literal("ui/download-file"),params:b.object({contents:b.array(b.union([kl,Ll])).describe("Resource contents to download — embedded (inline data) or linked (host fetches). Uses standard MCP resource types.")})}),aHe=b.object({method:b.literal("ui/message"),params:b.object({role:b.literal("user").describe('Message role, currently only "user" is supported.'),content:b.array(Mi).describe("Message content blocks (text, image, etc.).")})}),cHe=b.object({method:b.literal("ui/notifications/sandbox-resource-ready"),params:b.object({html:b.string().describe("HTML content to load into the inner iframe."),sandbox:b.string().optional().describe("Optional override for the inner iframe's sandbox attribute."),csp:K$.optional().describe("CSP configuration from resource metadata."),permissions:J$.optional().describe("Sandbox permissions from resource metadata.")})}),Dde=b.object({method:b.literal("ui/notifications/tool-result"),params:tc.describe("Standard MCP tool execution result.")}),M9=b.object({toolInfo:b.object({id:li.optional().describe("JSON-RPC id of the tools/call request."),tool:ec.describe("Tool definition including name, inputSchema, etc.")}).optional().describe("Metadata of the tool call that instantiated this App."),theme:gde.optional().describe("Current color theme preference."),styles:Tde.optional().describe("Style configuration for theming the app."),displayMode:My.optional().describe("How the UI is currently displayed."),availableDisplayModes:b.array(My).optional().describe("Display modes the host supports."),containerDimensions:b.union([b.object({height:b.number().describe("Fixed container height in pixels.")}),b.object({maxHeight:b.union([b.number(),b.undefined()]).optional().describe("Maximum container height in pixels.")})]).and(b.union([b.object({width:b.number().describe("Fixed container width in pixels.")}),b.object({maxWidth:b.union([b.number(),b.undefined()]).optional().describe("Maximum container width in pixels.")})])).optional().describe(`Container dimensions. Represents the dimensions of the iframe or other
|
|
102
|
-
container holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:b.string().optional().describe("User's language and region preference in BCP 47 format."),timeZone:b.string().optional().describe("User's timezone in IANA format."),userAgent:b.string().optional().describe("Host application identifier."),platform:b.union([b.literal("web"),b.literal("desktop"),b.literal("mobile")]).optional().describe("Platform type for responsive design decisions."),deviceCapabilities:b.object({touch:b.boolean().optional().describe("Whether the device supports touch input."),hover:b.boolean().optional().describe("Whether the device supports hover interactions.")}).optional().describe("Device input capabilities."),safeAreaInsets:b.object({top:b.number().describe("Top safe area inset in pixels."),right:b.number().describe("Right safe area inset in pixels."),bottom:b.number().describe("Bottom safe area inset in pixels."),left:b.number().describe("Left safe area inset in pixels.")}).optional().describe("Mobile safe area boundaries in pixels.")}).passthrough(),$de=b.object({method:b.literal("ui/notifications/host-context-changed"),params:M9.describe("Partial context update containing only changed fields.")}),lHe=b.object({method:b.literal("ui/update-model-context"),params:b.object({content:b.array(Mi).optional().describe("Context content blocks (text, image, etc.)."),structuredContent:b.record(b.string(),b.unknown().describe("Structured content for machine-readable context data.")).optional().describe("Structured content for machine-readable context data.")})}),uHe=b.object({method:b.literal("ui/initialize"),params:b.object({appInfo:$i.describe("App identification (name and version)."),appCapabilities:Nde.describe("Features and capabilities this app provides."),protocolVersion:b.string().describe("Protocol version this app supports.")})}),wde=b.object({protocolVersion:b.string().describe('Negotiated protocol version string (e.g., "2025-11-21").'),hostInfo:$i.describe("Host application identification and version."),hostCapabilities:Pde.describe("Features and capabilities provided by the host."),hostContext:M9.describe("Rich context about the host environment.")}).passthrough(),Mde={target:"draft-2020-12"};async function $9(t,e){let n=t["~standard"];if(n.jsonSchema)return n.jsonSchema[e](Mde);throw Error(`Schema (vendor: ${n.vendor}) does not implement Standard JSON Schema (~standard.jsonSchema). Use a library that does (zod v4, ArkType, Valibot) or wrap your schema accordingly.`)}async function w9(t,e,n=""){let o=await t["~standard"].validate(e);if(o.issues){let r=o.issues.map(i=>{let s=i.path?.map(a=>typeof a=="object"?a.key:a).join(".");return s?`${s}: ${i.message}`:i.message}).join("; ");throw Error(n+r)}return o.value}function kde(t,e){let n={...t,...e};return e.experimental!==void 0&&(n.experimental={...t.experimental,...e.experimental}),e.tools!==void 0&&(n.tools={...t.tools,...e.tools}),n}var $_=class t extends G${_appInfo;_appCapabilities;options;_hostCapabilities;_hostInfo;_hostContext;_registeredTools={};_initializedSent=!1;_registeredEvents=new Set;_events=new q$;_methods=new W$;setRequestHandler=(...e)=>{let[n,...o]=x9("request",e)??e;this._methods.claim(n,"setRequestHandler"),super.setRequestHandler.call(this,n,...o)};setNotificationHandler=(...e)=>{let[n,...o]=x9("notification",e)??e;this._methods.claim(n,"setNotificationHandler"),super.setNotificationHandler.call(this,n,...o)};removeRequestHandler=e=>{this._methods.release(e),super.removeRequestHandler(e)};removeNotificationHandler=e=>{this._methods.release(e),super.removeNotificationHandler(e)};replaceRequestHandler=(e,...n)=>{this._methods.replace(e),super.setRequestHandler.call(this,e,...n)};_assertInitialized(e){if(this._initializedSent)return;let n=`[ext-apps] App.${e}() called before connect() completed the ui/initialize handshake. Await app.connect() before calling this method, or move data loading to an ontoolresult handler.`;if(this.options?.strict)throw Error(n);console.warn(`${n}. This will throw in a future release.`)}eventSchemas={toolinput:Cde,toolinputpartial:Ide,toolresult:Dde,toolcancelled:_de,hostcontextchanged:$de};static ONE_SHOT_EVENTS=new Set(["toolinput","toolinputpartial","toolresult","toolcancelled"]);_everHadListener=new Set;_assertHandlerTiming(e){if(!t.ONE_SHOT_EVENTS.has(e)||this._everHadListener.has(e)||(this._everHadListener.add(e),!this._initializedSent))return;let n=`[ext-apps] "${String(e)}" handler registered after connect() completed the ui/initialize handshake. The host may have already sent this notification. Register handlers before calling app.connect().`;if(this.options?.strict)throw Error(n);console.warn(n)}setEventHandler(e,n){n&&this._assertHandlerTiming(e),this._ensureEventSlot(e),this._events.setHandler(e,n)}addEventListener(e,n){this._assertHandlerTiming(e),this._ensureEventSlot(e),this._events.addEventListener(e,n)}removeEventListener(e,n){this._events.removeEventListener(e,n)}_ensureEventSlot(e){if(this._registeredEvents.has(e))return;let n=this.eventSchemas[e];if(!n)throw Error(`Unknown event: ${String(e)}`);this.setNotificationHandler(n.shape.method.value,{params:n.shape.params},o=>{let r=o;e==="hostcontextchanged"&&(this._hostContext={...this._hostContext,...r}),this._events.dispatch(e,r)}),this._registeredEvents.add(e)}getEventHandler(e){return this._events.getHandler(e)}warnIfRequestHandlerReplaced(e,n,o){n&&o&&console.warn(`[MCP Apps] ${e} handler replaced. Previous handler will no longer be called.`)}constructor(e,n={},o={autoResize:!0}){super(o),this._appInfo=e,this._appCapabilities=n,this.options=o,this._methods.replace("notifications/cancelled"),this._methods.replace("notifications/progress"),!o.allowUnsafeEval&&b.config({jitless:!0}),this.replaceRequestHandler("ping",r=>(console.log("Received ping:",r.params),{})),this.setEventHandler("hostcontextchanged",void 0)}buildContext(e){return e}registerAppCapabilities(e){if(this.transport)throw Error("Cannot register capabilities after transport is established");this._appCapabilities=kde(this._appCapabilities,e)}registerTool(e,n,o){if(this._registeredTools[e])throw Error(`Tool ${e} is already registered`);let r=this,i=()=>{r._initializedSent&&r._appCapabilities.tools?.listChanged&&r.sendToolListChanged()},s=n.inputSchema!==void 0,a={title:n.title,description:n.description,inputSchema:n.inputSchema,outputSchema:n.outputSchema,annotations:n.annotations,_meta:n._meta,enabled:!0,enable(){this.enabled=!0,i()},disable(){this.enabled=!1,i()},update(c){Object.assign(this,c),i()},remove(){r._registeredTools[e]===a&&(delete r._registeredTools[e],i())},handler:async(c,l)=>{if(!a.enabled)throw Error(`Tool ${e} is disabled`);let u;if(s){let p=a.inputSchema,m=p?await w9(p,c??{},`Invalid input for tool ${e}: `):c??{};u=await o(m,l)}else u=await o(l);return a.outputSchema&&!u.isError&&(u.structuredContent=await w9(a.outputSchema,u.structuredContent,`Invalid output for tool ${e}: `)),u}};return this._registeredTools[e]=a,!this._appCapabilities.tools&&!this.transport&&this.registerAppCapabilities({tools:{listChanged:!0}}),this.ensureToolHandlersInitialized(),i(),a}_toolHandlersInitialized=!1;ensureToolHandlersInitialized(){this._toolHandlersInitialized||(this._toolHandlersInitialized=!0,this.oncalltool=async(e,n)=>{let o=this._registeredTools[e.name];if(!o)throw Error(`Tool ${e.name} not found`);return o.handler(e.arguments,n)},this.onlisttools=async(e,n)=>({tools:await Promise.all(Object.entries(this._registeredTools).filter(([o,r])=>r.enabled).map(async([o,r])=>{let i={name:o,title:r.title,description:r.description,inputSchema:r.inputSchema?await $9(r.inputSchema,"input"):{type:"object",properties:{}}};return r.outputSchema&&(i.outputSchema=await $9(r.outputSchema,"output")),r.annotations&&(i.annotations=r.annotations),r._meta&&(i._meta=r._meta),i}))}))}async sendToolListChanged(e={}){this._assertInitialized("sendToolListChanged"),await this.notification({method:"notifications/tools/list_changed",params:e})}getHostCapabilities(){return this._hostCapabilities}getHostVersion(){return this._hostInfo}getHostContext(){return this._hostContext}get ontoolinput(){return this.getEventHandler("toolinput")}set ontoolinput(e){this.setEventHandler("toolinput",e)}get ontoolinputpartial(){return this.getEventHandler("toolinputpartial")}set ontoolinputpartial(e){this.setEventHandler("toolinputpartial",e)}get ontoolresult(){return this.getEventHandler("toolresult")}set ontoolresult(e){this.setEventHandler("toolresult",e)}get ontoolcancelled(){return this.getEventHandler("toolcancelled")}set ontoolcancelled(e){this.setEventHandler("toolcancelled",e)}get onhostcontextchanged(){return this.getEventHandler("hostcontextchanged")}set onhostcontextchanged(e){this.setEventHandler("hostcontextchanged",e)}_onteardown;get onteardown(){return this._onteardown}set onteardown(e){this.warnIfRequestHandlerReplaced("onteardown",this._onteardown,e),this._onteardown=e,this.replaceRequestHandler("ui/resource-teardown",{params:vde.shape.params,result:Rde},(n,o)=>{if(!this._onteardown)throw Error("No onteardown handler set");return this._onteardown(n,o)})}_oncalltool;get oncalltool(){return this._oncalltool}set oncalltool(e){this.warnIfRequestHandlerReplaced("oncalltool",this._oncalltool,e),this._oncalltool=e,this.replaceRequestHandler("tools/call",(n,o)=>{if(!this._oncalltool)throw Error("No oncalltool handler set");return this._oncalltool(n.params,o)})}_onlisttools;get onlisttools(){return this._onlisttools}set onlisttools(e){this.warnIfRequestHandlerReplaced("onlisttools",this._onlisttools,e),this._onlisttools=e,this.replaceRequestHandler("tools/list",(n,o)=>{if(!this._onlisttools)throw Error("No onlisttools handler set");return this._onlisttools(n.params,o)})}assertCapabilityForMethod(e){switch(e){case"sampling/createMessage":if(!this._hostCapabilities?.sampling)throw Error(`Host does not support sampling (required for ${e})`);break}}assertRequestHandlerCapability(e){switch(e){case"tools/call":case"tools/list":if(!this._appCapabilities.tools)throw Error(`Client does not support tool capability (required for ${e})`);return;default:return}}assertNotificationCapability(e){}async callServerTool(e,n){if(this._assertInitialized("callServerTool"),typeof e=="string")throw Error(`callServerTool() expects an object as its first argument, but received a string ("${e}"). Did you mean: callServerTool({ name: "${e}", arguments: { ... } })?`);return await this.request({method:"tools/call",params:e},{onprogress:()=>{},resetTimeoutOnProgress:!0,...n})}async readServerResource(e,n){return this._assertInitialized("readServerResource"),await this.request({method:"resources/read",params:e},n)}async listServerResources(e,n){return this._assertInitialized("listServerResources"),await this.request({method:"resources/list",params:e},n)}async createSamplingMessage(e,n){return this._assertInitialized("createSamplingMessage"),await this.request({method:"sampling/createMessage",params:e},n)}sendMessage(e,n){return this._assertInitialized("sendMessage"),this.request({method:"ui/message",params:e},Ade,n)}sendLog(e){return this.notification({method:"notifications/message",params:e})}updateModelContext(e,n){return this._assertInitialized("updateModelContext"),this.request({method:"ui/update-model-context",params:e},Xa,n)}openLink(e,n){return this._assertInitialized("openLink"),this.request({method:"ui/open-link",params:e},Sde,n)}sendOpenLink=this.openLink;downloadFile(e,n){return this._assertInitialized("downloadFile"),this.request({method:"ui/download-file",params:e},Ede,n)}requestTeardown(e={}){return this.notification({method:"ui/notifications/request-teardown",params:e})}requestDisplayMode(e,n){return this._assertInitialized("requestDisplayMode"),this.request({method:"ui/request-display-mode",params:e},Ode,n)}sendSizeChanged(e){return this.notification({method:"ui/notifications/size-changed",params:e})}setupSizeChangedNotifications(){let e=!1,n=0,o=0,r=()=>{e||(e=!0,requestAnimationFrame(()=>{e=!1;let s=document.documentElement,a=s.style.height;s.style.height="max-content";let c=Math.ceil(s.getBoundingClientRect().height);s.style.height=a;let l=Math.ceil(window.innerWidth);(l!==n||c!==o)&&(n=l,o=c,this.sendSizeChanged({width:l,height:c}))}))};r();let i=new ResizeObserver(r);return i.observe(document.documentElement),i.observe(document.body),()=>i.disconnect()}async connect(e=new wy(window.parent,window.parent),n){if(this.transport)throw Error("App is already connected. Call close() before connecting again.");this._initializedSent=!1;try{await super.connect(e);let o=await this.request({method:"ui/initialize",params:{appCapabilities:this._appCapabilities,appInfo:this._appInfo,protocolVersion:mde}},wde,n);if(o===void 0)throw Error(`Server sent invalid initialize result: ${o}`);this._hostCapabilities=o.hostCapabilities,this._hostInfo=o.hostInfo,this._hostContext=o.hostContext,await this.notification({method:"ui/notifications/initialized"}),this._initializedSent=!0,this.options?.autoResize&&this.setupSizeChangedNotifications()}catch(o){throw this.close(),o}}};var Y$=["inline","fullscreen"],F9="pxC11nAction",Zn,M_,k_=new WeakMap,nw=new WeakMap,Z$=new Set,Q$=new WeakMap,Bl,w_=Promise.resolve(),xp=0,V9,X$=!1,ew,B9=!1,Ls=(...t)=>{B9&&console.log("[MCP]",...t)},Dp=()=>{Z$.forEach(t=>{try{t()}catch(e){console.error("MCP display mode listener failed",e)}})},H9=t=>{V9=t},G9=F9,q9=()=>G9,k9=()=>new DOMException("MCP initialization was superseded by a newer initialize or disconnect call","AbortError"),tw=class extends wy{initializeRequestSent;resolveInitializeRequestSent=()=>{};constructor(...e){super(...e),this.initializeRequestSent=new Promise(n=>{this.resolveInitializeRequestSent=n})}async send(...e){await super.send(...e);let[n]=e;"method"in n&&n.method==="ui/initialize"&&this.resolveInitializeRequestSent()}},Lde=(t,e,n,o)=>{let r=new tw(e,n),i=t.connect(r);return k_.set(t,i),o?i:(i.catch(s=>{Zn===t&&(Zn=void 0,M_=void 0,console.error("MCP host did not complete the initialize handshake",s),Dp())}),Promise.race([r.initializeRequestSent,i]))},W9=t=>{Q$.get(t)?.(),Q$.delete(t)},L9=t=>(W9(t),t.close()),Ude=t=>{k_.get(t)?.then(()=>{Zn===t&&Q$.set(t,t.setupSizeChangedNotifications())}).catch(()=>{})},U9=t=>nw.get(t)??t.getHostContext()?.displayMode,z9=t=>{let e=t.getHostContext()?.availableDisplayModes;return e?Y$.filter(n=>e.includes(n)):Y$},zde=(t,e)=>{Ls("host context changed",e),e.displayMode&&nw.delete(t),Zn===t&&Dp()},jde=t=>{k_.get(t)?.then(()=>{Ls("host context",t.getHostContext()),Zn===t&&Dp()}).catch(()=>{})},j9=()=>{let t=new Set([Zn,Bl].filter(n=>n!==void 0)),e=Zn!==void 0;return Zn=void 0,M_=void 0,Bl=void 0,e&&Dp(),t},nc=()=>{if(!Zn)throw new Error("MCP client is not initialized");return Zn},Fde=(t,e)=>{Zn!==t&&Bl!==t||(X$=!0,ew=e,Ls("host tool result",e),V9?.(e))},Vde={async initialize(t){xp+=1;let e=xp;X$=!1,ew=void 0,G9=t.c11nToolName||F9;let n=Promise.all(Array.from(j9(),L9)),o=w_.catch(()=>{}).then(async()=>{if(await n,e!==xp)throw k9();let r=t.eventTarget;if(!r)try{r=window.parent}catch(c){throw new Error("MCP client cannot access window.parent",{cause:c})}let i=t.eventSource??r,s=t.waitForHandshake??!0,a=new $_({name:t.name,version:t.version},{availableDisplayModes:Y$},{autoResize:!1,strict:t.strict??s});Bl=a,a.ontoolresult=c=>Fde(a,c),a.addEventListener("hostcontextchanged",c=>zde(a,c));try{await Lde(a,r,i,s)}catch(c){throw Bl===a&&(Bl=void 0),e===xp&&await a.close(),c}if(e!==xp)throw k9();Bl=void 0,Zn=a,M_={name:t.name,version:t.version},t.autoResize&&Ude(a),Dp(),jde(a)});w_=o.catch(()=>{}),await o},callTool(t,e){return Ls("tool call",t.name,t.arguments),nc().callServerTool(t,e).then(n=>(Ls("tool result",t.name,n),n),n=>{throw Ls("tool call failed",t.name,n),n})},listResources(t,e){return nc().listServerResources(t,e)},readResource(t,e){return nc().readServerResource(t,e)},listPrompts(t,e){return nc().request({method:"prompts/list",params:t},e)},getPrompt(t,e){return nc().request({method:"prompts/get",params:t},e)},async disconnect(){xp+=1;let t=Promise.all(Array.from(j9(),L9));w_=w_.catch(()=>{}).then(()=>t).then(()=>{}),await t},isConnected(){return Zn!==void 0},hasReceivedToolResult(){return X$},getToolResult(){return ew},setDebug(t){B9=t},async requestDisplayMode(t){let e=nc();await k_.get(e);let n=U9(e);if(n===t||!z9(e).includes(t))return n;let o=await e.requestDisplayMode({mode:t});return Ls("display mode",o.mode),nw.set(e,o.mode),Zn===e&&Dp(),o.mode},getAppInfo(){return M_},getDisplayMode(){return Zn?U9(Zn):void 0},getAvailableDisplayModes(){return Zn?z9(Zn):[]},onDisplayModeChange(t){return Z$.add(t),()=>{Z$.delete(t)}},requestTeardown(){return Ls("teardown requested"),nc().requestTeardown()},collapse(){let t=nc();return W9(t),Ls("collapse requested"),t.sendSizeChanged({height:0})}},ky=Vde;var Bde=(t,e)=>e[A.TRACE_ID]?{type:"error",message:t.localizedValue||t.message,correlationID:e[A.TRACE_ID]}:{type:"error",message:t.localizedValue||t.message},Hde=new Set(["resource is stale","resource is locked","resource in the wrong state","resource not found"]),Gde=t=>t?Hde.has(t.toLowerCase()):!1,qde=(t,e)=>{if(!Gde(e))return t;if(t&&t.includes("/workarea")&&!t.includes("/modal")){let n=t.lastIndexOf("/workarea");if(n!==-1)return t.slice(0,n)}return t},K9=t=>typeof t=="object"&&t!==null,Wde=t=>{if(t instanceof ArrayBuffer)try{let n=new TextDecoder().decode(t),o=JSON.parse(n);return K9(o)?o:{}}catch{return{}}return K9(t)?t:{}},Kde=(t,e,n,o)=>{if(t.config&&Ta(t.config.url,n))return Promise.reject(t);if(t.response&&t.response.status&&t.response.status===401&&!t.config.isExternalUrl&&!e.getUpdateSessionStatus()&&t.config.fetchTimeStamp>e.latestUpdateSessionTimeStamp){if(w.unsubscribeAllWithEventType($p),e.setUpdateSessionStatus(!0),n?.authType==="custom"){w.publish(A.PUB_SUB_EVENTS.EVENT_CUSTOM_REAUTH);let{url:i,config:s,context:a}=Kv(t);return Tf(i,s,a,e)}return uj(t,e,n)}if(t.response&&t.response.status&&t.response.status===401&&!t.config.isExternalUrl&&e.getUpdateSessionStatus()&&!lA(t.config.url)){let{url:i,config:s,context:a}=Kv(t);return k(i,s,a)}let r=Wde(t.response?.data);if(t.response&&t.response.status&&t.response.status!==422&&t.response.status!==424&&!(t.response.status===400&&r.errorClassification===A.INVALID_INPUTS)&&t.config.headers.context&&t.response.data&&!o){let i=r.errorDetails&&r.errorDetails.map(a=>Bde(a,t.response.headers)),s=qde(t.config.headers.context,r.errorClassification);return Hr({messages:i,category:"HTTP",context:s}),Promise.reject(t)}return Promise.reject(t)},J9=Kde;var rw=class{languagePacks;constructor(){this.languagePacks=[]}getLocalizationBundles(e=T.getLocale()){return(this.languagePacks.find(o=>o.pyLangCode===e)?.pyBundles??this.languagePacks.find(o=>o.pyLangCode===d.DEFAULT.toUpperCase())?.pyBundles??[]).sort((o,r)=>o.pyOrder-r.pyOrder)}hasLocalizationBundles(e=T.getLocale()){let n=this.languagePacks.find(o=>o.pyLangCode===e)?.pyBundles;return!!n&&n.length>0}async loadLocaleBundle(e){let n=e.map(i=>sn.getPageDataAsync("D_pzBundlesForLocalization","",{locale:i,onlyApp:"false"},{invalidateCache:!0})),r=(await Promise.allSettled(n)).filter(i=>i.status==="fulfilled").flatMap(i=>i.value.pyLanguagePacks);this.setLanguagePack(r)}setLanguagePack(e){e.forEach(n=>{let o=this.languagePacks.findIndex(r=>r.pyLangCode===n.pyLangCode);o!==-1?this.languagePacks[o]=n:this.languagePacks.push(n)})}},Us=new rw;var ow="Accept-Language",Y9=(t,e)=>Object.keys(t).some(n=>n.toLowerCase()===e.toLowerCase()),iw=class{externalHeaders;defaultHeaders;SPECIAL_CHARS;constructor(){this.externalHeaders={},this.defaultHeaders={},this.SPECIAL_CHARS={SLASH:"/"}}registerHeader(e,n){return this.defaultHeaders[e]?!1:(this.externalHeaders[e]=n,!0)}unRegisterHeader(e){this.externalHeaders[e]&&delete this.externalHeaders[e]}getRegisteredHeaders(){return{...this.getLocaleHeaders(),...this.externalHeaders}}getLocaleHeaders(){let e=T.getLocale()??T.getUseLocale();return!e||!Us.hasLocalizationBundles(e)||Y9(this.defaultHeaders,ow)||Y9(this.externalHeaders,ow)?{}:{[ow]:e.replaceAll("_","-")}}setDefaultHeaders(e){e?.Prefer&&this.defaultHeaders.Prefer&&(e.Prefer=`${this.defaultHeaders.Prefer},${e.Prefer}`),this.defaultHeaders={...this.defaultHeaders,...e}}setRequestContext(e){if(!e||e.length===0)return;let n=new URLSearchParams(globalThis.location?.search??""),o=this.buildHeaderMapFromRequestContext(e,n);this.registerHeadersFromMap(o)}buildHeaderMapFromRequestContext(e,n){let o={};return e?.forEach(r=>{Array.isArray(r.IncludeInHeaders)&&r.IncludeInHeaders.forEach(i=>{let s=i.Value,a=n.get(r.Key)??i.defaultValue;a&&(o[s]||(o[s]=[]),o[s].push(`${r.Key}=${a}`))})}),o}registerHeadersFromMap(e){Object.entries(e).forEach(([n,o])=>{o.length>0&&this.registerHeader(n,o.join("; "))})}getDefaultHeaders(){return this.defaultHeaders}addDebugHeaders(e={}){return{[d.COREHEADER_APP_DEBUG_ID]:e.debugId,[d.COREHEADER_APP_DEBUG_LEVELS]:en.getDebugLevels()}}getCoreHeadersFromContext(e){if(["root","app"].includes(e)||!e)return;let n=Q.getProperty(d.COREHEADERS,"",e);return n?{...n,debugInfo:en.getPreviewMode()&&{...n.debugInfo,[d.COREHEADER_APP_DEBUG_LEVELS]:en.getDebugLevels()}}:(e=e.substr(0,e.lastIndexOf(this.SPECIAL_CHARS.SLASH)),this.getCoreHeadersFromContext(e))}processCoreHeaders(e,n,o){let r=this.getCoreHeadersFromContext(o);if(r){let i=Object.keys(e);if(i.includes(d.SKIPCOREHEADERS)){delete e[d.SKIPCOREHEADERS];return}let s=Object.assign({},...Object.values(r));Object.keys({...s}).forEach(a=>{i.includes(a)||(e[a]=s[a])})}}injectCoreAdditionalHeaders(e,n,o,r){if(r?.includeRemoteSystemIdIfPresent){let i=n?.caseTypeID?{caseTypeID:n.caseTypeID}:void 0;ce.injectRemoteCaseHeader(e,i,o)}this.processCoreHeaders(e,n,o)}},Jde=new iw,Ge=Jde;var Ly=class{timerID;expiryBuffer;timeoutWarned;onWarnedReset;constructor(e){this.timerID=void 0,this.expiryBuffer=45,this.timeoutWarned=!1,this.onWarnedReset=e}setTimerID=e=>{this.timerID=e};getTimerID=()=>this.timerID;resetInactiveTimeout=e=>{let n=globalThis.PCore?.getEnvironmentInfo().getInactivityTimeout();if(this.timeoutWarned&&(w.unsubscribeAllWithEventType(A.PUB_SUB_EVENTS.RESET_TIMER),this.timeoutWarned=!1,this.onWarnedReset?.()),!!n)return e&&clearTimeout(e),this.startInactivityTimeout(n>60?n:60)};startInactivityTimeout=e=>{let n=setTimeout(()=>{w.publish(A.PUB_SUB_EVENTS.TIMEOUT_REMINDER,{timeRemaining:this.expiryBuffer}),clearTimeout(n),w.subscribe(A.PUB_SUB_EVENTS.RESET_TIMER,this.resetInactiveTimeout,"resetCallback"),this.timeoutWarned=!0},(e-this.expiryBuffer)*1e3);return this.setTimerID(n),n}};var sw=class{handlers=[];use(e,n){return this.handlers.push({fulfilled:e,rejected:n}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}forEach(e){for(let n of this.handlers)n!==null&&e(n)}get size(){return this.handlers.filter(e=>e!==null).length}},aw=sw;var Ao={ERR_NETWORK:"ERR_NETWORK",ECONNABORTED:"ECONNABORTED",ERR_CANCELED:"ERR_CANCELED",ERR_BAD_REQUEST:"ERR_BAD_REQUEST",ERR_BAD_RESPONSE:"ERR_BAD_RESPONSE"},L_="GET",U_="content-type",cw="accept";var Yde=async t=>{let e=await t.text();if(!e||e.trim().length===0)return e;try{return JSON.parse(e)}catch{return e}},Zde=async t=>{let e=await t.text();if(!e||e.trim().length===0)return e;try{return JSON.parse(e)}catch{return e}},Z9=async(t,e)=>{switch(e){case"json":return Yde(t);case"text":return t.text();case"arraybuffer":return t.arrayBuffer();case"blob":return t.blob();case"stream":return t.body;default:return Zde(t)}},Q9=t=>{let e={};return t.forEach((n,o)=>{e[o]=n}),e};var z_=()=>{let t=new AbortController;return{token:t.signal,cancel(e){t.abort(e)}}},j_=t=>t instanceof DOMException&&t.name==="AbortError"||t&&typeof t=="object"&&"name"in t&&t.name==="AbortError"?!0:!!(t&&typeof t=="object"&&"code"in t&&t.code===Ao.ERR_CANCELED),X9=(t,e)=>{let n=t!==void 0,o=e!==void 0&&e>0;if(!n&&!o)return;if(!o&&n)return t;let r=o?e:void 0;if(r===void 0)return t;let i=AbortSignal.timeout(r);if(!n)return i;if(typeof AbortSignal.any=="function")return AbortSignal.any([t,i]);let s=new AbortController,a=()=>{s.abort(t.reason??i.reason)};return t.aborted||i.aborted?(s.abort(t.aborted?t.reason:i.reason),s.signal):(t.addEventListener("abort",a,{once:!0}),i.addEventListener("abort",a,{once:!0}),s.signal)},e8=t=>t?.reason==="TimeoutError"||t?.reason instanceof DOMException&&t.reason.name==="TimeoutError"?Ao.ECONNABORTED:Ao.ERR_CANCELED;var rc=(t,e,n,o)=>{let r=new Error(t);return r.name="HttpError",r.config=e,r.code=n,r.response=o,r.isAxiosError=!0,r},lw=(t,e)=>typeof t=="object"&&t!==null&&"name"in t&&t.name===e,uw=t=>typeof t=="object"&&t!==null&&"message"in t&&typeof t.message=="string",t8=t=>t.timeout?`timeout of ${t.timeout}ms exceeded`:"timeout exceeded",Uy=(t={})=>{let e=rc("canceled",t,Ao.ERR_CANCELED);return e.name="AbortError",e},oc=(t,e)=>{if(e.signal?.aborted){let n=e8(e.signal),o=rc(n===Ao.ECONNABORTED?t8(e):"canceled",e,n);return o.name=n===Ao.ECONNABORTED?"TimeoutError":"AbortError",o}if(lw(t,"TimeoutError")){let n=rc(t8(e),e,Ao.ECONNABORTED);return n.name="TimeoutError",n}if(lw(t,"AbortError"))return Uy(e);if(lw(t,"TypeError")&&uw(t)){let n=rc(t.message||"Network Error",e,Ao.ERR_NETWORK);return n.isOffline=!navigator.onLine,n}if(uw(t)&&t.message==="Network Offline"){let n=rc("Network Offline",e,Ao.ERR_NETWORK);return n.isOffline=!0,n}if(uw(t)){let n=rc(t.message,e);return n.cause=t.cause,n}return rc(String(t),e)},n8=(t,e)=>{let n;t.status>=400&&t.status<500?n=Ao.ERR_BAD_REQUEST:t.status>=500&&t.status<600&&(n=Ao.ERR_BAD_RESPONSE);let o=rc(`Request failed with status code ${t.status}`,e,n,t);return o.status=t.status,o};var Qde="application/json, text/plain, */*",Xde="application/x-www-form-urlencoded",epe=["POST","PUT","PATCH"],tpe=/[^\t\x20-\x7e\x80-\xff]+/g,r8=t=>t===" "||t===" ",npe=t=>{let e=t.replace(tpe,""),n=0,o=e.length;for(;n<o&&r8(e[n]);)n+=1;for(;o>n&&r8(e[o-1]);)o-=1;return e.slice(n,o)},rpe=t=>{let e={};if(!t)return e;let n=new Map;for(let[o,r]of Object.entries(t))if(r!=null){let i=o.toLowerCase(),s=n.get(i)??o;n.set(i,s),e[s]=npe(String(r))}return e},i8=t=>(typeof t[Symbol.iterator]!="function"&&Object.defineProperty(t,Symbol.iterator,{value(){return Object.entries(this)[Symbol.iterator]()},enumerable:!1,configurable:!0}),t),s8=t=>t instanceof FormData||t instanceof Blob||t instanceof ArrayBuffer||ArrayBuffer.isView(t)||t instanceof URLSearchParams||typeof ReadableStream<"u"&&t instanceof ReadableStream,a8=t=>typeof t=="object"&&t!==null&&!s8(t),o8=(t,e)=>Object.keys(t).find(n=>n.toLowerCase()===e),dw=(t,e)=>{let n=rpe(t.headers),{body:o}=t;o8(n,cw)||(n[cw]=Qde);let r=o8(n,U_);return o===void 0||o instanceof FormData?r&&delete n[r]:!r&&!(o instanceof URLSearchParams)&&(a8(o)?n[U_]="application/json":epe.includes(e)&&(n[U_]=Xde)),n},c8=t=>s8(t)||typeof t=="string"?t:JSON.stringify(t),ope=t=>{let e=(t.method??L_).toUpperCase(),n={method:e,headers:dw(t,e),credentials:t.credentials};t.body!==void 0&&t.body!==null&&e!=="GET"&&e!=="HEAD"&&(n.body=c8(t.body));let o=X9(t.signal,t.timeout);return o&&(n.signal=o),n},l8=async t=>{let e=t.url??"",n=ope(t),o;try{o=await globalThis.fetch(e,n)}catch(s){throw oc(s,t)}let r=Q9(o.headers),i;try{i=await Z9(o,t.responseType)}catch(s){throw oc(s,t)}return t.headers&&i8(t.headers),{data:i,status:o.status,statusText:o.statusText,headers:r,config:t}},ipe=t=>{let e={};if(!t)return e;let n=t.trim().split(/[\r\n]+/);for(let o of n){let r=o.indexOf(":");if(r>0){let i=o.substring(0,r).trim().toLowerCase(),s=o.substring(r+1).trim();e[i]=s}}return e},u8=t=>new Promise((e,n)=>{let o=new XMLHttpRequest,r=t.url??"",i=(t.method??L_).toUpperCase();if(o.open(i,r,!0),Object.entries(dw(t,i)).forEach(([a,c])=>{o.setRequestHeader(a,c)}),t.credentials==="include"&&(o.withCredentials=!0),t.responseType==="arraybuffer"?o.responseType="arraybuffer":t.responseType==="blob"?o.responseType="blob":o.responseType="text",t.onUploadProgress&&o.upload&&o.upload.addEventListener("progress",t.onUploadProgress),t.onDownloadProgress&&o.addEventListener("progress",t.onDownloadProgress),t.signal){if(t.signal.aborted){o.abort(),n(oc(new DOMException("The operation was aborted.","AbortError"),t));return}t.signal.addEventListener("abort",()=>{o.abort(),n(oc(new DOMException("The operation was aborted.","AbortError"),t))},{once:!0})}t.timeout&&t.timeout>0&&(o.timeout=t.timeout),o.ontimeout=()=>{n(oc(new DOMException("The operation timed out.","TimeoutError"),t))},o.onload=()=>{t.headers&&i8(t.headers);let a=ipe(o.getAllResponseHeaders()),c;if(o.responseType==="arraybuffer"||o.responseType==="blob")c=o.response;else{let u=o.responseText;try{c=JSON.parse(u)}catch{c=u}}let l={data:c,status:o.status,statusText:o.statusText,headers:a,config:t};e(l)},o.onerror=()=>{n(oc(new TypeError("Network Error"),t))},o.onabort=()=>{n(oc(new DOMException("The operation was aborted.","AbortError"),t))};let s=t.body!==void 0&&t.body!==null?c8(t.body):null;o.send(s)}),d8=t=>{let e=(t.method??L_).toUpperCase(),n=dw(t,e),{body:o}=t,r=t.headers??{},i=Object.keys(r).map(s=>s.toLowerCase());Object.entries(n).forEach(([s,a])=>{i.includes(s.toLowerCase())||(r[s]=a)}),t.headers=r,a8(o)?t.data=JSON.stringify(o):o instanceof URLSearchParams&&(t.data=o.toString())};var pw=t=>(Object.defineProperty(t,"data",{get:()=>t.body,set:e=>{t.body=e},enumerable:!1,configurable:!0}),t),p8=t=>{let e=Object.getOwnPropertyDescriptor(t,"data");return e&&"value"in e&&e.value!==void 0&&e.value!==t.body&&(t.body=e.value),pw(t)};var spe=t=>{if(typeof t!="object"||t===null)return!1;let e=Object.getPrototypeOf(t);return e===null||Object.getPrototypeOf(e)===null},mw=t=>{if(Array.isArray(t))return t.map(mw);if(spe(t)){let e={};return Object.keys(t).forEach(n=>{e[n]=mw(t[n])}),e}return t},fw=class{interceptors;constructor(){this.interceptors={request:new aw,response:new aw}}async request(e){let n=pw({...e,...e.body!==void 0&&{body:mw(e.body)}}),o=[s=>this.dispatchRequest(s),void 0];this.interceptors.request.forEach(s=>{o=[s.fulfilled,s.rejected,...o]}),this.interceptors.response.forEach(s=>{o=[...o,s.fulfilled,s.rejected]});let r=Promise.resolve(n),i=0;for(;i<o.length;)r=r.then(o[i],o[i+1]),i+=2;return await r}async dispatchRequest(e){let n=p8(e);if(typeof n.adapter=="function")return d8(n),n.adapter(n);let o;if(n.onUploadProgress||n.onDownloadProgress?o=await u8(n):o=await l8(n),o.status>=200&&o.status<300)return o;throw n8(o,n)}get(e,n){return this.request({...n,url:e,method:"GET"})}post(e,n,o){return this.request({...o,url:e,method:"POST",body:n})}put(e,n,o){return this.request({...o,url:e,method:"PUT",body:n})}patch(e,n,o){return this.request({...o,url:e,method:"PATCH",body:n})}delete(e,n){return this.request({...n,url:e,method:"DELETE"})}static createCancelSource(){return z_()}static isCanceled(e){return j_(e)}},ape=new fw,F_=ape;var $p="updateSession",cpe=t=>typeof t!="object"||t===null||!("caseTypeID"in t)?!1:typeof t.caseTypeID=="string",zy=t=>typeof t=="object"&&t!==null,f8=t=>cpe(t)?{caseTypeID:t.caseTypeID}:void 0,lpe=t=>{if(!zy(t))return!1;let{caseInfo:e}=t;return zy(e)?"errorMessage"in e:!1},zs={},Mp=new rj,Hl={},Li={},hw={},yw="",gw=new Ly(()=>sj(Li,Mp)),g8=t=>{Hl=t},upe=t=>!t||typeof t!="object"?!1:"continueWithDefaultErrorHandler"in t||"error"in t,h8=t=>{let{context:e}=t??{};if(typeof e=="string")return e},dpe=t=>zy(t)&&"config"in t,ppe=t=>zy(t),mpe=t=>t.code==="ERR_NETWORK"||t.code==="ECONNABORTED"||t.message==="Network Offline"||t.isOffline===!0,fpe=t=>t.message!=="Network Offline"&&!!J(d.APP.APP)?.context_data?.isOffline,gpe=t=>!!(t.response&&t.response.status===401&&!t.config?.isExternalUrl&&(!t.config||!Ta(t.config.url,Li))),hpe=t=>t.response&&t.response.status&&t.response.status===Number(yw)?yw:null,V_=t=>{let e=h8(t.config?.headers);return mpe(t)?(J(e)?.isLoading&&v({type:Wo,payload:{context:e}}),Yz(),Promise.reject(new Error("Network Offline"))):(fpe(t)&&Zz(),!t.response&&t.cause?.response&&(t.response=t.cause.response),gpe(t)&&w.subscribe($p,n=>{Mp.setUpdateSessionStatus(!n.updateStatus)},$p),J9(t,Mp,Li,hpe(t)))},ype=(t,e)=>{if(typeof e=="boolean")return e?V_(t):Promise.reject(t);if(upe(e)){let n=e.error??t;return e.continueWithDefaultErrorHandler??!0?V_(dpe(n)?n:t):Promise.reject(n)}return V_(t)},Spe=t=>typeof t=="function",Epe=t=>typeof t=="function",Ape=t=>{w.publish(d.PUB_SUB_EVENTS.FETCH_SUCCESS,t)},Cpe=t=>{w.publish(d.PUB_SUB_EVENTS.FETCH_FAILURE,t)},Ipe=t=>{if(t?.authType==="OAuth2.0"&&t.secureCookie||t.customCookies)return!0},it=()=>T.environmentInfoObject?.["protocol-jsonrpc"]===!0,wp=t=>typeof t=="object"&&t!==null,_pe=t=>wp(t)?Object.entries(t).filter(e=>e[0].toLowerCase()==="etag"&&typeof e[1]=="string").map(([,e])=>e)[0]:void 0,Sw=t=>{let e=t.content?.find(c=>c.type==="text")?.text;if(t.isError)throw new Error(e||"MCP tool call failed");let n;if(e)try{n=JSON.parse(e)}catch(c){if(!(c instanceof SyntaxError))throw c;n=e}let o=wp(n)&&"Response"in n?n.Response:n,r=wp(o)&&wp(o.outputs)?o.outputs:void 0,i=[r,o].map(_pe).find(c=>c!==void 0),s=wp(o)?o.ViewResponse:void 0;return{data:[r?.ViewResponse,r?.ShowPageResponse,r?.PageResponse,r?.Component,r?.responseData,s].find(c=>wp(c)||typeof c=="string")??o,etag:i}},bpe=(t,e)=>{let n=()=>e.abort();return t.aborted?(n(),()=>{}):(t.addEventListener("abort",n),()=>t.removeEventListener("abort",n))},Tpe=new Set(["openAssignment","createWork","openWorkByHandle","caseWideActions","getNextWork","finishAssignment","save","navigateToStep","refreshAssignmentData","recalculateAssignmentData","openStage","executeCaseWideActions","refreshCaseData","recalculateCaseData"]),vpe=new Set(["context","authorization","pzctkn"]),Rpe=(t,{headers:e,...n})=>{if(!Tpe.has(t)||typeof e!="object"||e===null)return n;let o=Object.fromEntries(Object.entries(e).filter(([r,i])=>!vpe.has(r.toLowerCase())&&typeof i=="string"&&i!==""));return Object.keys(o).length>0?{...n,headers:o}:n},Ot=async(t,e,n,o)=>{let r=new AbortController,i=n?bpe(n,r):void 0;try{if(r.signal.aborted)throw Uy();let s={name:q9(),arguments:{ActionName:t,Payload:JSON.stringify(Rpe(t,e))}},a={...n&&{signal:r.signal},...o!==void 0&&{timeout:o}},c=await(Object.keys(a).length>0?ky.callTool(s,a):ky.callTool(s)),{data:l,etag:u}=Sw(c);return{data:l,status:200,statusText:"OK",headers:u?{etag:u}:{},config:{url:t}}}catch(s){throw r.signal.aborted?Uy():s}finally{i?.()}},Ppe=t=>{if(typeof t!="object"||t===null||Array.isArray(t))return!1;let e=Object.getPrototypeOf(t);return e!==Object.prototype&&e!==null},B_=({body:t,responseType:e,adapter:n})=>(e===void 0||e==="json")&&n===void 0&&!Ppe(t),H_=t=>{if(typeof t!="string")return t;try{return JSON.parse(t)}catch{return t}},Ti=(t,e="root",n={})=>{let{Authorization:o,pzCTkn:r,...i}=t.headers||{};if(t.withoutDefaultHeaders)return i;Ge.injectCoreAdditionalHeaders(i,f8(t.body),e,{includeRemoteSystemIdIfPresent:n.includeRemoteSystemIdIfPresent??!0});let s={...Ge.getDefaultHeaders(),...Ge.getRegisteredHeaders(),...i,context:e};return delete s.Authorization,delete s.pzCTkn,s},k=(t,e,n="root",o={})=>{let{doNotMergeHttpMessagesForStatusCode:r=null,cancelContext:i=n,includeRemoteSystemIdIfPresent:s=!0}=o;yw=r,t===null&&console.error("Error: url passed to Service Broker fetch is null (or) undefined");let{body:a,signal:c,responseType:l,adapter:u,withoutDefaultHeaders:p=!1,withCredentials:m,...f}=e,{Authorization:g,pzCTkn:h,...E}=e.headers||{};if(!p){let P=f8(e.body);Ge.injectCoreAdditionalHeaders(E,P,n,{includeRemoteSystemIdIfPresent:s})}i&&zs[i]>=0?zs[i]+=1:i&&zs[i]===void 0&&(zs[i]=1);let C=p?{...E}:{...Ge.getDefaultHeaders(),...Ge.getRegisteredHeaders(),...E,context:n};f.isExternalUrl=tj(t||""),f.fetchTimeStamp=Date.now();let I=Se.doesRestApiExist("Logout")?Se.getRestEndPoint("Logout")?.restApi:void 0,_=lA(t,I);return t&&Ta(t,Li)&&Mp.getUpdateSessionStatus()||!Mp.getUpdateSessionStatus()||f.isExternalUrl||_?(Ta(t,Li)&&Li?.authType==="OAuth2.0"&&(C={...E}),(!I||t&&!_)&&gw.setTimerID(gw.resetInactiveTimeout(gw.getTimerID())),Av(Y(F_.request({context:n,...f,url:t??void 0,body:a,...c&&{signal:c},responseType:l,adapter:u,headers:C,credentials:m||Ipe(Li)?"include":void 0})).pipe(_v(()=>{let P=Ge.getCoreHeadersFromContext(C.context);P&&Ape({...P})}),ds(P=>{let N=C,H=!!N?.[d.COREHEADER_APP_DEBUG_ID]?{debugInfo:{[d.COREHEADER_APP_DEBUG_ID]:N?.[d.COREHEADER_APP_DEBUG_ID],[d.COREHEADER_APP_DEBUG_LEVELS]:en.getDebugLevels()}}:Ge.getCoreHeadersFromContext(C.context);throw H&&Cpe({...H,error:P}),P})))):Tf(t,e,n,Mp)},Tf=(t,e,n,o)=>new Promise((r,i)=>{w.subscribe($p,s=>{if(o.setUpdateSessionStatus(!s.updateStatus),s.updateStatus==="success")k(t,e,n).then(r).catch(i);else{let{updateStatus:a}=s;i(zy(a)?a.error:void 0)}},$p)}),m8=t=>{zs[t]>0&&(zs[t]-=1,zs[t]===0&&delete zs[t])};F_.interceptors.request.use(t=>{if(!ei.isOnline())return J(t.context)?.isLoading&&v({type:Wo,payload:{context:t.context}}),v({type:la,payload:{context:"app"}}),Promise.reject(new Error("Network Offline"));if(Hl?.request){let e=Hl.request;Spe(e)&&(t=e(t))}return t},t=>Promise.reject(t));F_.interceptors.response.use(t=>{if(t.status===202&&t.config.headers?.context&&lpe(t.data)){let e=[{type:"error",message:String(t.data.caseInfo.errorMessage)}],n=t.config.headers.context;return n&&n.includes("/workarea")&&(n=n.substring(0,n.lastIndexOf("/workarea"))),Hr({messages:e,category:"HTTP",context:n}),Promise.reject(t)}if(t.config.headers&&t.config.headers.context){let e=t.config.headers.context;t.config.skipClearErrorMessages||(Xt({type:"error",category:"HTTP",context:e}).length>0&&ht({type:"error",category:"HTTP",context:e}),Xt({type:"error",category:e===d.APP.APP?"PAGE":"",context:e}).length>0&&ht({type:"error",category:"PAGE",context:e}),e.slice(e.lastIndexOf("/")+1).startsWith("primary")&&(Xt({type:"error",category:"HTTP",context:d.APP.APP}).length>0&&ht({type:"error",category:"HTTP",context:d.APP.APP}),Xt({type:"error",category:"PAGE",context:d.APP.APP}).length>0&&ht({type:"error",category:"PAGE",context:d.APP.APP}))),m8(e)}if(Hl?.response){let e=Hl.response;Epe(e)&&(t=e(t))}return t},t=>{if(!ppe(t))return Promise.reject(t);let e=h8(t.config?.headers);return e&&m8(e),Hl?.error?Promise.resolve(Hl.error(t)).then(n=>ype(t,n)):V_(t)});var y8=t=>zs[t],Qu=()=>z_(),uA=t=>j_(t),mo=t=>{Ge.setDefaultHeaders(t)},gs=t=>{Li={...Li,...t}},Qz=t=>{hw={...hw,...t}},Xz=()=>({...hw}),bf=()=>({...Li});var Ew=class t{static createCase(e,n){let{caseInfo:o,startingFields:r,flowType:i,viewType:s=mt.PAGE,pageName:a,context:c=d.APP.APP,debugInfo:l,headers:u,theType:p,retrieveActionViewForNewObject:m=!1,scope:f}=n,g={};o&&o.content&&(g=o.content);let{content:h={},pageInstructions:E}=t.getExternalCaseOrObjectContent(e,m,c),C={[t.getKeyBasedOnWorkType(e)]:e,content:{...g,...r,...h}};if(C={...C,...E&&{pageInstructions:E},...!G.isObjectCaseType(e)&&{processID:i}},p==="CREATE_EXTERNAL_CASE"){let _=J(c)?.caseInfo?.content;if(_&&Object.keys(_).length>0){let P=f?.Namespace&&f?.RuleResolutionID?{..._,[d.getDefaultQualifiedName("Scope")]:{[d.getDefaultQualifiedName("Namespace")]:f.Namespace,[d.getDefaultQualifiedName("RuleResolutionID")]:f.RuleResolutionID}}:_,N=y.pruneKeys(P,new Set(["pxObjClass",O.getDefaultQualifiedName("pxObjClass"),"EmbedListUUID__",O.getDefaultQualifiedName("EmbedListUUID__")]),!1);C.content[d.getDefaultQualifiedName("pyAddCaseContextPage")]=N}}let I=t.getObjectTypeViewPayload(m,e);return Re(G.getRouteKeyForCreateWork(e,m),{body:C,queryPayload:{...I,...G.isExternalCaseType(e)?{casetypeID:e}:{caseClassName:e},viewType:s,params:{pageName:a}},headers:{...u,...l&&{...Ge.addDebugHeaders(l)}}},c).then(_=>({response:_.data,requestPayload:C,headers:ke(_.headers,e,u)}))}static getObjectTypeViewPayload=(e,n)=>e?G.shouldUseUnifiedHandling()?{casetypeID:n,actionID:d.getDefaultQualifiedName(d.VIEW_NAMES.OBJECT_CREATE_VIEW)}:{objectTypeID:n,actionID:d.getDefaultQualifiedName(d.VIEW_NAMES.OBJECT_CREATE_VIEW)}:{};static getExternalCaseOrObjectContent=(e,n,o)=>{let r=G.isExternalObject(e),i=G.isExternalCaseType(e);if((i||r)&&!n){let s=Mt(o,{isExternalObject:!!(!i&&r)}),{content:a,pageInstructions:c}=s.content;return{content:a,pageInstructions:c}}return{}};static getKeyBasedOnWorkType=e=>G.shouldUseUnifiedHandling()?"caseTypeID":G.isObjectCaseType(e)?"objectTypeID":"caseTypeID"},Ui=Ew;var Npe=()=>({registerHeader:(...t)=>Ge.registerHeader(...t),unRegisterHeader:(...t)=>Ge.unRegisterHeader(...t),getRegisteredHeaders:()=>Ge.getRegisteredHeaders()}),Re=(t,{body:e={},queryPayload:n={},cancelTokenSource:o,headers:r={},responseType:i,withCredentials:s},a,c)=>{if(it()&&B_({body:e,responseType:i}))return Ot(t,{queryPayload:n,body:H_(e),headers:r},o?.token);let{restApi:l,reqType:u}=F(t,n),p={method:u,headers:r,body:e,...i&&{responseType:i},...s&&{withCredentials:s}};o&&(p.signal=o.token);let m=t==="createWork"?G.appendExcludeQueryParamToUrl(l):l;return k(m,p,a,c??{})},PR=(t,{method:e="GET",body:n={},headers:o={},withoutDefaultHeaders:r=!1,responseType:i,adapter:s,signal:a},c)=>{t.startsWith("http:")||t.startsWith("https:")||(t=At.getServerURL()+t);let l={method:e,headers:o,body:n,withoutDefaultHeaders:r,...i&&{responseType:i},...s&&{adapter:s},...a&&{signal:a}};return k(t,l,c)},va=t=>Se.doesRestApiExist(t),zi=()=>Qu(),jy=t=>uA(t),Ope=t=>{g8(t)},xpe=()=>Ui;var Aw=new Set;function S8(){Aw.clear()}function Fy(t){try{let e=new URL(t);(e.protocol==="https:"||e.protocol==="http:")&&Aw.add(e.origin)}catch{}}function E8(t){let e;try{let o=globalThis.location;e=o?new URL(t,o.href).origin:new URL(t).origin}catch{throw new Error("Blocked: malformed URL")}let n;try{let o=globalThis.location;n=o?.origin??(o?new URL(o.href).origin:"")}catch{n=""}if(e!==n&&!Aw.has(e))throw new Error(`Blocked: untrusted script origin "${e}"`)}var A8="getCustomComponent",Dpe="getBinaryFile",$pe="getOperatorImage",q_="text/javascript",wpe=100,C8=3e4,I8=t=>{let e=document.createElement("script");e.type=q_,e.textContent=t,document.head.appendChild(e)},R8=t=>{let e=atob(t),n=new Uint8Array(e.length);for(let o=0;o<e.length;o+=1)n[o]=e.charCodeAt(o);return n},Mpe=t=>{if(typeof t!="string")throw new TypeError(`Custom component response must be a string, received: ${JSON.stringify(t)?.slice(0,300)}`);return new TextDecoder().decode(R8(t))},kpe=12e4,_8=Promise.resolve(),Lpe=t=>{let e=_8.then(t);return _8=e.catch(()=>{}),e},b8=async(t,e)=>{let n=Object.entries(e).filter(([,i])=>i);if(it()){let i=await Lpe(()=>Ot(A8,{queryPayload:{componentName:t,...Object.fromEntries(n)},body:{},headers:{}},void 0,kpe));return Mpe(i.data)}let o=n.map(([i,s])=>`${i}=${s}`).join("&");return(await Re(A8,{queryPayload:{componentName:o?`${t}?${o}`:t}})).data},P8=new Set(["jpg","jpeg","png","gif","webp","bmp","tif","tiff","svg","ico","heic","heif","avif"]),Upe=/^DATA-CONTENT-IMAGE\s+[^!]+!([^!]+)!\/OPERATORIMAGES\/$/i,T8=/url\(\s*(?:(['"])([^'"\r\n]+)\1|([^'"\s)][^'"\r\n]*?))\s*\)/gi;function N8(t){return t.toLowerCase().split("!").pop()||""}function Cw(t){return t.includes("?")||t.includes("#")?!1:P8.has(N8(t))}function zpe(t){let e=t.match(Upe);return e?P8.has(e[1].toLowerCase()):Cw(t)}function v8(t){let e;try{e=new URL(t).protocol}catch{throw new Error("Component fetch blocked: malformed dev server URL")}if(e!=="http:"&&e!=="https:")throw new Error(`Component fetch blocked: unsupported dev server URL scheme "${e}"`)}var Iw=class{loaderObj;staticServerURL;appStaticUrl;pegaOnlyUrl;loadedAssets;componentsConfig;appAlias;b2sJWT;ccV2LibId;isolationID;imageBlobUrlCache;isolationAssetBlobCache;getTypes={SCRIPT:"script",STYLE:"link"};constructor(){this.loaderObj={},this.staticServerURL="",this.appStaticUrl=null,this.pegaOnlyUrl=!1,this.loadedAssets={},this.componentsConfig=null,this.appAlias="",this.b2sJWT=null,this.ccV2LibId="",this.isolationID=null,this.imageBlobUrlCache={},this.isolationAssetBlobCache=new Map}getStaticServerUrl(){return this.staticServerURL}setCCV2LibId(e){this.ccV2LibId=e}getCCV2LibId(){return this.ccV2LibId}async getThemeSchemaJSON(){let e=`${this.staticServerURL}themeOverrides.schema.json`;return fetch(e).then(n=>n.json())}getConstellationServiceUrl(){return this.staticServerURL?.endsWith("/")?this.staticServerURL.substring(0,this.staticServerURL.length-1):this.staticServerURL}setAppAlias(e){this.appAlias=e}getAppAlias(){return this.appAlias}async getSvcComponentsConfig(e,n={}){let o="",r=0;return e.forEach(i=>{o+=`${r===0?"?":"&"}field${r}=${i.field}&value${r}=${i.value}`,r+=1}),this.pegaOnlyUrl?this.getSvcComponentsConfigSeparatedUrls(e,o,n):this.getSvcComponentsConfigCombinedUrl(e,o,n)}async getSvcComponentsConfigSeparatedUrls(e,n,o){let r=T.getBuiltOnAppNames(),i=this.loadAndFilterPegaComponentsConfig(e,r),s=Promise.resolve([]);o.skipLoadCustomerComponents!==!0&&(s=this.loadAndCustomerComponentsConfig(n,e));let a=[];if(T.environmentInfoObject?.pyInfinityStaticService){let l=[],u=await Promise.all([i,s]),[p,m]=u,f=[];for(let h of m)h.isSdkOverridden===!0?l.push(h.componentDefinition):f.push(h.componentDefinition);let g=this.mergeComponentList([p,f,l]);a.push(...g)}else{let l=this.fetchSDKComponent(n);await Promise.all([i,s,l]).then(u=>{let p=this.mergeComponentList(u);a.push(...p)})}if(o.alternateDesignSystemURL&&a.length===1){let l=await this.getSvcComponentsConfigADS(e,n,o);a[0].alternateDesignSystemConfig=l}return{data:{components:a}}}mergeComponentList=e=>{let[n=[],o=[],r=[]]=e,i="alternateDesignSystemConfig",s=[...n,...o];return this.appStaticUrl?s.map(a=>{let{name:c,type:l,subtype:u}=a,p=r.reduce((m,f)=>(c===f.name&&l===f.type&&u===f.subtype&&(m=f),m),{});return Object.keys(p).length>0?{...a,[i]:{...p}}:a}):s};async fetchSDKComponent(e){if(this.appStaticUrl&&this.appStaticUrl.length>8&&this.appStaticUrl!==this.staticServerURL){let n=`${this.appStaticUrl}v102/${this.appAlias}/componentslist-ext${e}`;return fetch(n,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then(o=>o.json()).then(o=>o.components).catch(()=>[])}return Promise.resolve([])}async loadAndFilterPegaComponentsConfig(e,n){return this.loadPegaComponentsConfig().then(()=>{let o=[];return this.componentsConfig&&this.componentsConfig.forEach(r=>{let i=!0;e.forEach(s=>{Array.isArray(r[s.field])?r[s.field].includes(s.value)||(i=!1):r[s.field]!==s.value&&(i=!1)}),i&&this.checkForBuiltOnSupport(n,r.allowedApplications)&&o.push(r)}),o})}async loadPegaComponentsConfig(){let e=null;if(this.componentsConfig===null){let n=`${this.staticServerURL}components/componentsconfig.json?v=${new Date().getTime()}`;e=fetch(n,{method:"GET"}).then(o=>o.json()).then(async o=>{this.componentsConfig=o,this.ccV2LibId&&await this.loadLibraryComponentsConfig(this.ccV2LibId).then(r=>{r&&r.length>0&&(this.componentsConfig=(this.componentsConfig||[]).concat(r))}).catch(r=>{console.error(`Exception while appending custom component config from library ${this.ccV2LibId} : ${r}`)})}).catch()}else e=Promise.resolve();return e}async loadLibraryComponentsConfig(e){let n=null;return n=fetch(`${this.appStaticUrl}v100/componentlib/componentsconfig/${e}?v=${Date.now()}`,{headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then(o=>{if(!o.ok)throw console.error("Error while fetching custom component config/library component config"),new Error(o.statusText);return o}).then(o=>o.json()).then(o=>Promise.resolve(o)).catch(o=>(console.error(`Exception while fetching custom component config from library ${e} : ${o}`),{error:o.message})),n}async loadAndCustomerComponentsConfig(e,n){let o=null;if(T.environmentInfoObject?.pyInfinityStaticService){let i={};n.forEach((s,a)=>{i[`field${a}`]=s.field,i[`value${a}`]=s.value}),o=PCore.getDataPageUtils().getDataAsync(O.getDefaultQualifiedName("D_pzGetComponentsConfig"),"",i).then(s=>s.data.map(a=>{let c=JSON.parse(a.pxComponentDefinition),l=a.pyIsSDKOverridden!==void 0?a.pyIsSDKOverridden:!1;return{componentDefinition:c,isSdkOverridden:l}}))}else if(this.appStaticUrl&&this.appStaticUrl.length>8&&this.appStaticUrl!==this.staticServerURL){let i=`${this.appStaticUrl}v103/${this.appAlias}/componentslist${e}`;o=fetch(i,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then(s=>s.json()).then(s=>s.components).catch(()=>[])}else o=Promise.resolve([]);return o}checkForBuiltOnSupport(e,n){if(!e||!n||e.length===0||n.length===0)return!0;let o=e.split(",");return o.length===0?!0:o.some(r=>n.includes(r))}async getSvcComponentsConfigCombinedUrl(e,n,o){let r=`${this.staticServerURL}v102/${this.appAlias}/componentslist${n}`,i=await fetch(r,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then(s=>s.json()).then(s=>({data:s}));if(o.skipLoadCustomerComponents===!0&&i?.data?.components?.length>0&&(i.data.components=i.data.components.filter(s=>s.componentKey===void 0)),o.alternateDesignSystemURL&&i?.data?.components?.length===1){let s=await this.getSvcComponentsConfigADS(e,n,o);i.data.components[0].alternateDesignSystemConfig=s}return i}getSvcComponentsConfigADS(e,n,o){let r=`${o.alternateDesignSystemURL}${o.alternateDesignSystemURL?.endsWith("/")?"":"/"}components/${e[0].value}/config-ext.json`;return fetch(r,{method:"GET"}).then(i=>{if(i.ok)return i.json();throw new Error(i.statusText)}).catch(i=>({error:i.message}))}getSvcImage(e){let n=`${this.appStaticUrl}v102/${this.appAlias}/image/${e}`;return fetch(n,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then(o=>o.blob()).catch()}getSvcImageUrl(e){try{let n=T.environmentInfoObject?.pyInfinityStaticService,{callUrlKey:o,queryPayload:r,callUrl:i}=this.buildImageRequest(e,n);return zpe(e)?(this.imageBlobUrlCache[i]||(this.imageBlobUrlCache[i]=this.fetchImage(o,r,i,n)),this.imageBlobUrlCache[i]):Promise.resolve("")}catch{return Promise.resolve(null)}}buildImageRequest(e,n){let o=Dpe,r,i=`${this.appStaticUrl}v102/${this.appAlias}/image/${e}`;if(n){let s=/DATA-CONTENT-IMAGE\s([^!]*)!.*\/OPERATORIMAGES\//i,a=e.match(s);if(a){let c=a[1]?.trim();if(c)o=$pe,r={user_ID:c.toLowerCase()};else throw console.warn("AssetLoader.buildImageRequest: operator image key is missing user id"),new Error("AssetLoader.buildImageRequest: operator image key is missing user id")}else r={fileID:e};i=F(o,r)?.restApi||i}return{callUrlKey:o,queryPayload:r,callUrl:i}}fetchImage(e,n,o,r){return r?Re(e,{queryPayload:n}).then(i=>{let s=this.decodeBase64ToByteArray(i.data),a=this.getMimeTypeFromKey(n?.fileID||n?.user_ID||""),c=new Blob([s],{type:a});return window.URL.createObjectURL(c)}).catch(i=>{throw console.error("Error fetching image:",i),i}):fetch(o,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then(i=>i.blob()).then(i=>window.URL.createObjectURL(i)).catch()}decodeBase64ToByteArray(e){return R8(e)}getMimeTypeFromKey(e){let n={svg:"image/svg+xml",png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",webp:"image/webp",bmp:"image/bmp",tif:"image/tiff",tiff:"image/tiff",ico:"image/vnd.microsoft.icon",heic:"image/heic",heif:"image/heif",avif:"image/avif"},o=N8(e);return n[o]?n[o]:"application/octet-stream"}isStaticContentReference(e){let n=e.trim();return!n||/^[a-z][a-z\d+.-]*:/i.test(n)||n.startsWith("//")?!1:y.isWebFilePath(n)}async resolveImageSource(e){if(!this.isStaticContentReference(e))return typeof e=="string"?e:"";let n=y.normalizeStaticContentKey(e);if(!Cw(n))return"";let o=await this.getSvcImageUrl(n);return typeof o=="string"&&o?o:""}async resolveBackgroundImage(e){let n=await Promise.all([...e.matchAll(T8)].map(async([o,,r,i])=>{let s=r??i;if(!s||!this.isStaticContentReference(s))return o;if(!Cw(y.normalizeStaticContentKey(s)))return"none";let a=await this.resolveImageSource(s);return a?o.replace(s,a):"none"}));return e.replace(T8,o=>n.shift()??o)}async resolveThemeBackgroundImages(e){if(!this.themeHasBackgroundImage(e))return e;if(Array.isArray(e))return Promise.all(e.map(n=>this.resolveThemeBackgroundImages(n)));if(e&&typeof e=="object"){let n=await Promise.all(Object.entries(e).map(async([o,r])=>[o,await this.resolveThemeBackgroundImages(r)]));return Object.fromEntries(n)}return typeof e=="string"&&e.includes("url(")?this.resolveBackgroundImage(e):e}themeHasBackgroundImage(e){return Array.isArray(e)?e.some(n=>this.themeHasBackgroundImage(n)):e&&typeof e=="object"?Object.values(e).some(n=>this.themeHasBackgroundImage(n)):typeof e=="string"&&e.includes("url(")}getSvcLocale(e,n){let o=`${this.appStaticUrl}v102/${this.appAlias}/locales/${e}/${n}`;return fetch(o,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}})}getSvcAvailableLocales(){let e=`${this.appStaticUrl}v102/app/${this.appAlias}/locales/getLocaleCodes`;return fetch(e,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then(n=>n.json()).catch(()=>[])}async getSvcComponent(e){try{let n=T.environmentInfoObject?.pyC11nDXCBDevURL;if(n){let i=n.replace(/\/+$/,"");v8(i);let s=await fetch(`${i}/index.js`);if(!s.ok)throw new Error(s.statusText);return await s.text()}if(T.environmentInfoObject?.pyInfinityStaticService||it()){let i=T.environmentInfoObject?.pxApplication?.pxUpdateDateTime,s=i?y.parsePegaDateTimeToTimestamp(i):null;return await b8(e,{v:s})}let r=await fetch(`${this.appStaticUrl}v102/${this.appAlias}/component/${e}`,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}});if(!r.ok)throw new Error(r.statusText);return await r.text()}catch(n){throw console.error("Error fetching service component:",n),n}}async importCustomComponentMap(e,n){try{let o=T.environmentInfoObject?.pyInfinityStaticService||it(),r=T.environmentInfoObject?.pyC11nDXCBDevURL,i=`${this.appStaticUrl}v100/componentlib/componentsmap/${e}`;if(r&&(v8(r),i=`${r.replace(/\/+$/,"")}/index.js`),o&&!r){let c=T.environmentInfoObject?.pxApplication?.pxUpdateDateTime,l=await b8(e,{v:y.parsePegaDateTimeToTimestamp(c),libV:y.parsePegaDateTimeToTimestamp(n)});await this.appendCustomScriptToHead(l);return}if(o||r){if(typeof document>"u")return;await new Promise((c,l)=>{let u=document.createElement("script");u.src=i,u.type="text/javascript";let p=setTimeout(()=>{l(new Error(`Timed out waiting for custom component script to load: ${i}`))},C8);u.onload=()=>{clearTimeout(p),c()},u.onerror=()=>{clearTimeout(p),l(new Error("Error while appending custom component map"))},document.head.appendChild(u)});return}let s=await fetch(i,{headers:{Authorization:`Bearer ${this.b2sJWT}`}});s.ok||console.error("Error while fetching custom component map");let a=await s.text();this.setCCV2LibId(e),await this.appendCustomScriptToHead(a)}catch(o){console.error("Exception while appending custom component map (or load blocked):",o)}}async appendCustomScriptToHead(e){if(!(typeof document>"u"))try{if(it()){I8(e);return}await new Promise((n,o)=>{let r=document.createElement("script");r.src=window.URL.createObjectURL(new Blob([e],{type:q_}));let i=setTimeout(()=>{o(new Error("Timed out waiting for custom component script to load"))},C8);r.onload=()=>{clearTimeout(i),n()},r.onerror=()=>{clearTimeout(i),o(new Error("Error while appending custom component map"))},document.head.appendChild(r)})}catch(n){console.error("Exception appendCustomScriptToHead:",n)}}loadSvcComponent(e){return new Promise((n,o)=>{this.getSvcComponent(e).then(r=>{if(typeof document>"u"){o(e);return}if(it()){I8(r),n(e);return}let i=document.createElement("script");i.src=window.URL.createObjectURL(new Blob([r],{type:q_})),i.onload=()=>n(e),i.onerror=()=>o(e),document.head.appendChild(i)}).catch(r=>{console.error(`Failed to load service component ${e}:`,r),o(e)})})}initServer(e,n,o){console.log(`asset-loader.initServer(${e}, ${n})`),this.appStaticUrl=null,this.staticServerURL=null,this.pegaOnlyUrl=!1,this.componentsConfig=null,this.isolationID=null,this.isolationAssetBlobCache=new Map,S8(),e&&n&&n!=="no-appstatic"&&n!=="no-cdn"?(this.appStaticUrl=n.endsWith("/")?n:`${n}/`,this.staticServerURL=e.endsWith("/")?e:`${e}/`,this.pegaOnlyUrl=!0,Fy(this.staticServerURL),Fy(this.appStaticUrl)):e&&n&&n==="no-appstatic"?(this.staticServerURL=e.endsWith("/")?e:`${e}/`,this.appStaticUrl=this.staticServerURL,this.pegaOnlyUrl=!0,Fy(this.staticServerURL)):e&&n&&n==="no-cdn"&&(this.staticServerURL=e.endsWith("/")?e:`${e}/`,this.appStaticUrl=this.staticServerURL,Fy(this.staticServerURL)),console.log(`asset-loader.initServer() staticServerURL=${this.staticServerURL}, appStaticUrl=${this.appStaticUrl}, pegaOnlyUrl=${this.pegaOnlyUrl})`),this.b2sJWT=o}register(e,n){this.loaderObj[e]=n}getLoader(e){let n;return e?n=this.loaderObj[e]:n=(r,i)=>new Promise((s,a)=>{if(typeof document>"u"){a(r);return}let c=document.createElement(i);if(i==="script"){let l=c;l.onload=()=>{s(r)},l.onerror=()=>{a(r)},l.type=q_,l.charset="UTF-8",l.async=!1,l.src=r}else{let l=c;l.type="text/css",l.rel="stylesheet",l.href=r}document.head.appendChild(c)}).catch(s=>{console.log(s)}),n}loadAssets(e,n){let{isDevServerMode:o}=n;if(!e)return Promise.resolve();let r=[];return e.forEach(i=>{let s=Object.keys(i)[0],a=o?Object.values(i)[0]:this.getStaticServerUrl();a=a.endsWith("/")?a:`${a}/`,!this.loadedAssets[s]&&(s.includes(".js")?r.push(this.getLoader()(a+s,this.getTypes.SCRIPT)):s.includes(".css")&&this.getLoader()(a+s,this.getTypes.STYLE),this.loadedAssets[s]=!0)}),Promise.all(r)}getAssetsFromIsolations(e){let n=this.getIsolationID(),{restApi:o,reqType:r}=el("getAssetsFromIsolations",{isolationID:n,assetPath:e})||{},i=`${this.appStaticUrl}${o}`,s=this.isolationAssetBlobCache.get(i);if(s)return this.isolationAssetBlobCache.delete(i),this.isolationAssetBlobCache.set(i,s),s;let a=fetch(i,{method:r,credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then(c=>{if(!c.ok)throw new Error(`Failed to fetch isolation asset: ${c.status} ${c.statusText}`.trim());return c.blob()}).catch(c=>{throw this.isolationAssetBlobCache.delete(i),c});return this.isolationAssetBlobCache.set(i,a),this.evictIsolationAssetBlobCacheOverflow(),a}evictIsolationAssetBlobCacheOverflow(){for(;this.isolationAssetBlobCache.size>wpe;){let e=this.isolationAssetBlobCache.keys().next().value;if(!e)return;this.isolationAssetBlobCache.delete(e)}}getIsolationID(){if(this.isolationID===null){let e=this.b2sJWT?.split(".")[1].replace(/-/g,"+").replace(/_/g,"/")||"",n=decodeURIComponent(globalThis.atob(e).split("").map(r=>`%${`00${r.charCodeAt(0).toString(16)}`.slice(-2)}`).join("")),o=JSON.parse(n);this.isolationID=o?.tenant_id}return this.isolationID}},We=new Iw;var _w=class{c11nEnv;constructor(e){this.c11nEnv=e}validate(e,n){let{value:o}=this.c11nEnv.getStateProps();if(!n&&(n=o,!n)){let s=this.c11nEnv.getComponentConfig(),a=this.c11nEnv.getStateProps();s.selectionMode==="multi"?n=a.selectionList:s.renderMode==="Editable"?n=a.referenceList:s.selectionMode==="single"?n=a.selectionKey:n=a.value}let r=DV(this.c11nEnv.getContextName(),this.c11nEnv.getPageReference(),n),{message:i}=Ft.validate(this.c11nEnv.getComponentName()?.toLowerCase(),n,e,r);return i?{status:!1,message:i}:{status:!0}}validateEmail(e,n={}){let o=Ft.getValidator("email");if(!o)return{status:"success"};let r=o(e,n);return r?{status:"failure",message:r}:{status:"success"}}},O8=_w;var x8=(t,e,n,o,r)=>{if(r!==d.RESOURCE_STATUS.CREATE)return;Ue.isStateMachineExist(t,e,n)||Ue.setStateMachine(t,n,e,new qc(n,e,t)),Ue.getStateMachine(t,e,n).insert({},typeof o=="string"?o:o+1,!0,{isDefault:!0})},D8=(t,e,n,o,r)=>{typeof e=="string"&&t.data?.caseInfo?.content&&n&&(o==="CREATE"||o==="UPDATE")&&(t.data.caseInfo.content[r][e][n]=e)},$8=t=>{let e=!t.isLocalAction&&t.editType===d.ACTION;return{...e?{}:{activeActionID:t.actionID},assignments:[{ID:t.assignmentID,...e?{actions:[{ID:t.actionID}]}:{}}]}},w8=t=>{let{CASE_INFO:e}=A,n=(r,i)=>Q.getPropertyValue(r,"",i),o=n(d.CONTEXT_DATA_MODAL_VIEW.PARENT_CONTEXT,t);for(;o;){let r=n(e.ASSIGNMENT_ID,o),i=n(e.ACTIVE_ACTION_ID,o),s=n(e.ASSIGNMENTACTION_ID,o);if(r||i||s)return{assignmentID:r,activeActionID:i,assignmentActionID:s,isLocalAction:n(e.IS_LOCAL_ACTION,o)};o=n(d.CONTEXT_DATA_MODAL_VIEW.PARENT_CONTEXT,o)}};var W_="OPEN_PROCESS_ACTION";var ic="OPEN_ASSIGNMENT";var Vy="DELETE_CASE_IN_CREATE_STAGE",M8=t=>({type:Vy,payload:t});var ji="SAVE_AND_CLOSE",Gl=t=>({type:ji,payload:t});var jpe="DELETE_DATA_OBJECT",k8=t=>({type:jpe,payload:t});var bw="DELETE_WORK",Tw=t=>({type:bw,payload:t});var vw=class{static getSavableDataPage(e){return Rw(e)}static getLookUpDataPage(e){return Nw(e)}static getLookUpDataPageInfo(e){return Ow(e)}static getDataPageKeys(e){return Pw(e)}},Fi=vw;var xw=class{static getPropertyName(e){return ge.getPropertyName(e)}static isProperty(e){return ge.isProperty(e)}static getLeafPropertyName(e){return ge.getLeafPropertyName(e)}static isPropertyInternal(e){return e.startsWith("px")||e.startsWith("pz")}},On=xw;var Dw=class t{static createContainerPConnect(e,n,o,r=!1){let{accessedOrder:i,items:s}=e;if(i&&s){let a=i[i.length-1];if(s[a]?.view&&Object.keys(s[a].view).length>0){let c=s[a],l=a.substring(0,a.lastIndexOf("_")),{view:u,context:p}=c,{viewName:m,viewContext:f}=this.processRootViewDetails(u,c,n);if(!m)return null;let g={meta:u,options:{context:p,pageReference:f||n,containerName:o,containerItemID:a,parentPageReference:n,hasForm:r||o===Ee.WORKAREA||o===Ee.MODAL||m===d.CREATE_DETAILS_VIEW_NAME,target:l}};return ct(g).getPConnect}}return null}static processRootViewDetails(e,n,o){let{config:{context:r,name:i}={}}=e,{context:s}=n,a=i,c=r,l=On.isProperty(i),u=On.isProperty(r);if(u){let p=On.getPropertyName(r);c=ie(`.${p}`,p.startsWith(".")?o:"",s)}if(c||(c=o),l){let p=On.getPropertyName(i);a=ie(`.${p}`,c,s)}return l&&u&&a!==""&&(a=i,c=r),{viewName:a,viewContext:c}}static addFlowContainerItem(e){let n=e.getContainerManager(),o=e.getContextName(),r=e.getValue("context_data.caseViewMode"),i,s;if(r!=="review"){let a=o.substring(0,o.lastIndexOf("_")),c=se(a),l=Ze(a,c);l&&({key:i,flowName:s}=l)}n.addContainerItem({semanticURL:"",key:i,flowName:s,caseViewMode:"perform",resourceType:"ASSIGNMENT",data:e.getDataObject(o)})}static hasContainerItems=e=>{let n=e.getContextName(),o=e.getContainerName();return PCore.getContainerUtils().hasContainerItems(`${n}/${o}`)};static hasGetNextWorkLinks=e=>e.getValue(d.CASE_INFO.GETNEXTWORK);static getActiveCaseActionName=e=>{let n=e.getValue(d.CASE_INFO.CASE_INFO_ACTIONS),o=e.getValue(d.CASE_INFO.ACTIVE_ACTION_ID);return n.find(i=>i.ID===o)?.name||""};static getFirstCaseActionName=e=>e.getValue(d.CASE_INFO.CASE_INFO_ACTIONS)[0]?.name||"";static hasNotificationMessages=e=>!!e.getValue("caseMessages");static isCaseWideLocalAction=e=>{let n=e.getValue(d.CASE_INFO.ACTIVE_ACTION_ID),o=e.getValue(d.CASE_INFO.CASE_INFO_ACTIONS);return o&&n?o.find(i=>i.ID===n)?.type==="Case":!1};static getChildCaseAssignments=e=>{let n=e.getValue(d.CASE_INFO.CHILD_ASSIGNMENTS),o=[];return n&&n.length>0&&n.forEach(({assignments:r=[],Name:i,caseTypeID:s})=>{let a=r.map(c=>({...c,caseName:i,caseTypeID:s}));o=o.concat(a)}),o};static hasAssignments=e=>{let n=e.getValue(d.CASE_INFO.D_CASE_ASSIGNMENTS_RESULTS),o=t.getChildCaseAssignments(e);return!!(Array.isArray(o)&&o.length>0||Array.isArray(n)&&n.length>0||t.isCaseWideLocalAction(e))};static showBanner=e=>{let n=e();return t.hasNotificationMessages(n)||!t.hasAssignments(n)};static showTodo=e=>e.getValue("context_data.caseViewMode")!=="perform";static isRenderWithToDoWrapper=(e,n)=>{let o=e(),{showWithToDo:r}=n;return r&&(!t.isCaseWideLocalAction(o)||t.showTodo(o))};static getToDoAssignments=e=>{let n=e.getValue(d.CASE_INFO.CASE_INFO_ACTIONS),o=e.getValue(d.CASE_INFO.ASSIGNMENT_LABEL),r=e.getValue(d.CASE_INFO.D_CASE_ASSIGNMENTS_RESULTS)||[],i=t.getChildCaseAssignments(e)||[],s=JSON.parse(JSON.stringify(i));s=s.map(l=>(l.isChild=!0,l));let a=[...r,...s],c=JSON.parse(JSON.stringify(a));return n&&!t.showTodo(e)&&(c=c.map(l=>(l.name=t.getActiveCaseActionName(e)||l?.name||o,l))),c}},K_=Dw;var $w=class{c11nEnv;constructor(e){this.c11nEnv=e}containerManagerPromise=e=>{let n=M.getNextActionMgrId(),o,r,i=new Promise((s,a)=>{o=s,r=a});if(o&&r)M.register(n,i,o,r,e);else throw new Error("resolveFn or rejectFn is not defined.");return{actionMgrID:n,promise:i}};initializeContainers(e){let n=wu,o=this.c11nEnv,r=o.getContextName(),i=o.getContainerName(),s={context:r,name:i,type:d.CONTAINER_TYPE.SINGLE},{actionMgrID:a,promise:c}=this.containerManagerPromise(n),l={...s,...e,actionMgrID:a};return l.type||(l.type=s.type),v(ww(l)),c}addContainerItem(e){let n=bt,o=this.c11nEnv,r=o.getMetadata(),{children:i}=r||{},s;Array.isArray(i)&&i.length>0&&([s]=i);let a=o.getContextName(),c=o.getContainerName(),l=En(c,a,e?.containerType===d.CONTAINER_TYPE.SINGLE),u=X(c,a),p={root:{...s,config:{...s?.config,context:s?.config?.context||o.getPageReference?.()}},containerItemID:l,context:l,target:u,containerName:c};e=JSON.parse(JSON.stringify(e)),[d.WORKAREA].includes(c)&&delete e.data?.coreHeaders;let{actionMgrID:m,promise:f}=this.containerManagerPromise(n),g={...p,...e,actionMgrID:m};return v(kt(g)),f}updateContainerItem(e){if(!e?.containerItemID)return Promise.reject(new Error("updateContainerItem : containerItemID is required in containerInfo object"));let n=Ht,o=de(e.containerItemID),r=re(e.containerItemID),i={context:o,target:r},{actionMgrID:s,promise:a}=this.containerManagerPromise(n),c={...i,...e,actionMgrID:s};return v(dn(c)),a}activateContainerItem(e){if(!e?.containerItemID)return Promise.reject(new Error("activateContainerItem : containerItemID is required in containerInfo object"));let n=mn,r={target:re(e.containerItemID)},{actionMgrID:i,promise:s}=this.containerManagerPromise(n),a={...r,...e,actionMgrID:i};return v(pn(a)),s}removeContainerItem(e){if(!e?.containerItemID)return Promise.reject(new Error("removeContainerItem : containerItemID is required in containerInfo object"));let n=tt,o=de(e.containerItemID),r=re(e.containerItemID),i={context:o,target:r},{actionMgrID:s,promise:a}=this.containerManagerPromise(n),c={...i,...e,actionMgrID:s};return v(nt(c)),a}resetContainers(e){if(!e?.context||!e?.name)return Promise.reject(new Error("resetContainers : context and name are required in containerInfo object"));let n=fi,o=al(e),{actionMgrID:r,promise:i}=this.containerManagerPromise(n),s={...o,...e,actionMgrID:r};return v(cl(s)),i}addTransientItem(e){let{id:n,data:o,sourceContainerItemId:r}=e,i=this.c11nEnv.getContextName(),s=av(n,i),a=Vi(i);if(s&&a.includes(s))return s;let c=o;if(r){let l=J(r);if(!l)throw new Error(`addTransientItem: source container item "${r}" not found in store`);c=y.deepClone(l)}return v(Mw({transientItemID:s,contextName:i,target:re(i),data:c})),s}updateTransientData(e){let{transientItemID:n,data:o}=e,r=this.c11nEnv.getContextName();if(n){if(!Vi(r).includes(n))return}else return;v(Hy({transientItemID:n,data:o}))}removeTransientItem(e){let n=this.c11nEnv.getContextName(),{target:o=this.c11nEnv.getTarget(),containerItemID:r,transientItemID:i}=e;if(i&&r){if(!Vi(n).includes(i))return}else return;v(Gy({target:o,containerItemID:r,transientItemID:i}))}createContainerPConnect(e,n,o,r=!1){K_.createContainerPConnect(e,n,o,r)}hasContainerItems(){let e=this.c11nEnv.getContextName(),n=this.c11nEnv.getContainerName();return Xn(`${e}/${n}`)}isContainerInitialized(){let e=this.c11nEnv.getContextName(),n=this.c11nEnv.getContainerName();return By(e,n)}},kp=$w;var kw=class extends yv{constructor(e,n){super(n)}},te=(...t)=>Ai(e=>t.includes(e.type)),L8=(...t)=>(e,n)=>new zt(o=>{let r=t.map(i=>i(e,n).subscribe(o));return()=>{r.forEach(i=>i.unsubscribe())}}),Fpe=t=>typeof t!="object"||t===null||!("type"in t)?!1:typeof t.type=="string",U8=()=>{let t=new _a,e=null,n=null,o=r=>(n=r,e=new kw(t.asObservable(),r.getState()),i=>s=>{let a=i(s);return e?.next(r.getState()),Fpe(s)&&t.next(s),a});return o.run=r=>{if(!e||!n)throw new Error("Epic middleware must be added to the store before calling run().");return r(t.asObservable(),e).subscribe(i=>{n?.dispatch(i)})},o};var fe=(t,e,n)=>ds(o=>(o?.code!=="ERR_CANCELED"&&console.error(t,o),ye(bs(t,o,e,null,n))));var bn=(t,e)=>n=>new zt(o=>{let r={},i=0;return n.pipe(V(s=>{let a=Date.now(),c;return e?c=e:c=Ro,c&&c(s,r)&&a-i<t?Hc():(r=s,i=a,ye(s))})).subscribe(o)});var Vpe="Error occurred during ajax call at createDataObject Epic",Bpe=t=>{let{dataPageID:e,context:n,headers:o,containerItemID:r}=t,i={data_view_ID:e},{restApi:s,reqType:a}=F(L2,i),{content:c}=Mt(r);return Y(k(s,{method:a,headers:o,body:{data:c.content,pageInstructions:c?.pageInstructions}},r)).pipe(x(l=>({response:l.data,actionInPayload:t})),fe(Vpe,n))},z8=Bpe;var Hpe="CREATE_DATA_OBJECT",J_=t=>({type:Hpe,payload:t});var Lw=t=>{let e=0,n=[];return t.pipe(te(ju),bn(100),Yt(o=>{let{isFormValid:r}=o.payload;if({actionMgrID:e}=o.payload,!r){let i={type:A.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return M.rejectActionByID(e,!0,i),ye([])}return ye(o.payload).pipe(V(i=>z8(i)),V(async i=>{if(i&&i.type===ve){let{payload:m}=i,f=pe({...i,...m,actionMgrID:e});return n.push(f),{actionsOut:n,data:void 0}}let{actionInPayload:s}=i,{containerItemID:a,isModalAction:c}=s,l=c?Ee.MODAL:Ee.PRIMARY,p={target:X(l,a),containerItemID:a,context:a};return n.push(B(nt,p)),{actionsOut:n,data:i?.response}}),x(({data:i})=>(n.length===1&&Qe(n[0].type)?M.rejectActionByID(e):M.resolveActionByID(e,i),v(n),n=[],n)))}))};var Gpe="Error occurred during ajax call at getDataObjectView Epic",qpe=t=>{let{dataLookUp:e,context:n,headers:o,viewName:r,requestPayload:i}=t,s={data_view_ID:e,view_ID:r},{restApi:a,reqType:c}=F(j2,s);return Y(k(a,{method:c,headers:o,body:{dataViewParameters:i}},n)).pipe(x(l=>({response:l.data,headers:ke(l.headers),actionInPayload:t})),fe(Gpe,n))},j8=qpe;var Wpe="VIEW_DATA_OBJECT",Y_=t=>({type:Wpe,payload:t});var Uw=t=>{let e=0,n=[];return t.pipe(te(NE),bn(100),x(o=>({actionMgrID:e}=o.payload,o.payload)),V(o=>j8(o)),V(async o=>{if(o&&o.type===ve){let{payload:h}=o,E=pe({...o,...h,actionMgrID:e});return n.push(E),n}let{actionInPayload:r,response:i,headers:s={}}=o,{containerName:a,readOnly:c,actionName:l}=r,u=X(a,r.context),p=rt(u,a,r.context),m={acName:u,context:p};if(i?.data?.dataInfo){let{dataInfo:h}=i.data;h.dataContext||=r.dataLookUp,h.dataContextParameters||=r.requestPayload}await Pe(i,r,m);let g=Me(i,{target:u,context:p,containerItemID:p,headers:s});return g.resourceType=A.RESOURCE_TYPES.DATA,g.resourceStatus=A.RESOURCE_STATUS.UPDATE,g.readOnly=c,g.actionName=l,g.key=JSON.stringify(r.requestPayload),n.push(B(kt,g)),n}),x(()=>(n.length===1&&Qe(n[0].type)?M.rejectActionByID(e):M.resolveActionByID(e),v(n),n=[],n)))};var Kpe="Error occurred during ajax call at updateDataObject Epic",Jpe=t=>{let{dataPageID:e,context:n,headers:o,containerItemID:r,key:i}=t,s={data_view_ID:e},{restApi:a,reqType:c}=F(vE,s),{content:l}=Mt(r);return Y(k(a,{method:c,headers:{...o,"if-match":t?.etag},body:{data:{...l.content,...i},pageInstructions:l.pageInstructions||[]}},r)).pipe(x(u=>({response:u.data,actionInPayload:t})),fe(Kpe,n))},F8=Jpe;var Ype="UPDATE_DATA_OBJECT",Z_=t=>({type:Ype,payload:t});var zw=t=>{let e=0,n=[];return t.pipe(te(Fu),bn(100),Yt(o=>{let{isFormValid:r}=o.payload;if({actionMgrID:e}=o.payload,!r){let i={type:A.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return M.rejectActionByID(e,!0,i),ye([])}return ye(o.payload).pipe(V(i=>F8(i)),V(async i=>{if(i&&i.type===ve){let{payload:m}=i,f=pe({...i,...m,actionMgrID:e});return n.push(f),n}let{actionInPayload:s}=i,{containerItemID:a,isModalAction:c}=s,l=c?Ee.MODAL:Ee.PRIMARY,p={target:X(l,a),containerItemID:a,context:a};return n.push(B(nt,p)),n}),x(()=>(n.length===1&&Qe(n[0].type)?M.rejectActionByID(e):M.resolveActionByID(e),v(n),n=[],n)))}))};var Zpe="Error occurred during ajax call at getDataObjectView Epic",Qpe=t=>{let{lookupDatapage:e,context:n,headers:o,actionID:r,dataViewParameters:i}=t,s={data_view_ID:e,action_ID:r},{restApi:a,reqType:c}=F("openDataObjectAction",s);return Y(k(a,{method:c,headers:o,body:{dataViewParameters:i}},n)).pipe(x(l=>({response:l.data,headers:ke(l.headers),actionInPayload:t})),fe(Zpe,n))},V8=Qpe;var jw=t=>{let e=0,n=[];return t.pipe(te(OE),bn(100),x(r=>({actionMgrID:e}=r.payload,r.payload)),V(r=>V8(r)),V(async r=>{if(r&&r.type===ve){let{payload:C}=r,I=pe({...r,...C,actionMgrID:e});return n.push(I),n}let{actionInPayload:i,response:s,headers:a={}}=r,{containerName:c,actionID:l,context:u,actionName:p}=i,m=X(c,i.context),f=En(c,u);c===d.MODAL&&(f=pr(u,f));let g={target:m,context:f,containerItemID:f,headers:a,resourceType:A.RESOURCE_TYPES.DATA,resourceStatus:A.RESOURCE_STATUS.OPEN_FLOW_ACTION,key:JSON.stringify(i.dataViewParameters),actionID:l,actionName:p,hideDefaultActionButtons:s?.uiResources?.hideDefaultActionButtons===!0};if(s?.data?.dataInfo){let{dataInfo:C}=s.data;C.dataContext||=i.lookupDatapage,C.dataContextParameters||=i.dataViewParameters}await Pe(s,i,{acName:m,context:u});let E=Me(s,g);return n.push(B(kt,E)),n}),x(()=>(n.length===1&&Qe(n[0].type)?M.rejectActionByID(e):M.resolveActionByID(e),v(n),n=[],n)))};var Xpe="Error occurred during ajax call at getDataObjectView Epic",eme=t=>{let{savableDatapage:e,context:n,headers:o,actionID:r,keys:i,containerItemID:s,jsActionQueryParams:a}=t,c={data_view_ID:e,action_ID:r},{restApi:l}=F("submitDataObjectAction",c),{reqType:u}=F("submitDataObjectAction",c),{content:p}=Mt(s);return l=ed(a,l),Y(k(l,{method:u,headers:{...o,"if-match":t?.etag},body:{data:{...p?.content,...i},pageInstructions:p?.pageInstructions||[]}},n)).pipe(x(m=>({response:m.data,actionInPayload:t})),fe(Xpe,n))},B8=eme;var tme=(t,e,n,o)=>{let{resourceType:r,key:i,containerItemID:s}=o,a=Me(n,e);a.resourceType=r||A.RESOURCE_TYPES.DATA;let c=Yo(s);t.push(B(nt,a));let l=ie(".dataContext","dataInfo",c),u=ie(".dataContextParameters","dataInfo",c),p={context:c,skipSemanticUrl:!0,resourceType:r,parentAction:cs,dataContext:l,dataContextParameters:u},m=l&&u&&Nt(dr,{pageName:d.PY_DETAILS,dataViewName:l},u)||"";if(s?.includes(d.PREVIEW)){let f={type:aa,payload:{pageName:d.VIEW_NAMES.PY_DATA_PREVIEW,container:d.PREVIEW,containerName:d.PREVIEW,...p}};t.push(f)}else if(r!==d.PAGE&&i===m&&s?.includes(d.PRIMARY)){let f={type:aa,payload:{pageName:d.VIEW_NAMES.PY_DETAILS,containerName:"",...p}};t.push(f)}return t},Fw=t=>{let e=0,n=[];return t.pipe(te(cs),bn(100),Yt(r=>{let{isFormValid:i}=r.payload;({actionMgrID:e}=r.payload);let s=r.payload.context;if(!i){let a={type:A.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return M.rejectActionByID(e,!0,a),ye([])}return ht({context:s,stateObj:J(s),clearContextMessages:!0}),ye(r.payload).pipe(V(a=>B8(a)),V(async a=>{if(a&&a.type===ve){yA(a,"dataObject");let{payload:I}=a,_=pe({...a,...I,actionMgrID:e});return n.push(_),n}let{actionInPayload:c,response:l,headers:u={}}=a,{containerName:p,containerItemID:m,resourceType:f,key:g}=c,h=X(p,c.context),E={acName:h,context:c.context};await Pe(l,c,E);let C={key:g,target:h,resourceType:f,containerItemID:m,headers:u,context:c.context};return n=tme(n,C,l,{key:g,resourceType:f,containerItemID:m}),n}),x(()=>(n.length===1&&Qe(n[0].type)?M.rejectActionByID(e):M.resolveActionByID(e),v(n),n=[],n)))}))};var Vw=class{components;constructor(){this.components={}}_checkComponent(e,n){return!!this.components[n]?.[e]}start(e,n,o,r,i){let s={viewName:e,pageReference:o,contextName:r,isInProgress:!0,active:!0,caseKey:n};this.components[r]=this.components[r]||{},this.components[r][i]=s}stop(e,n){this._checkComponent(e,n)&&(this.components[n][e].isInProgress=!1)}remove(e,n){this._checkComponent(e,n)&&delete this.components[n][e]}removeContext(e){delete this.components[e]}enableCascade(e){this.components[e]&&Object.values(this.components[e]).forEach(n=>{n.isInProgress&&(n.cascade=!0)})}activate(e,n){this._checkComponent(e,n)&&(this.components[n][e].active=!0)}deactivate(e,n){this._checkComponent(e,n)&&(this.components[n][e].active=!1)}refreshActiveComponents(e){e&&this.components[e]&&Object.keys(this.components[e]).forEach(n=>{this.refreshComponent(n,e)})}refreshComponent(e,n){if(!this._checkComponent(e,n))return;let o=this.components[n][e];if(o.active&&o.cascade){let{caseKey:r,viewName:i,pageReference:s}=o;rl(r,i,n,s,{})}}},Lp=new Vw;var Bw=class{constructor(e,n,o,r,i=100,s=500){this.finalDataViewCall=e;this.combiner=n;this.comparator=o;this.separator=r;this.maxtime=i;this.maxsize=s;this.groupedDataViewArray=[]}finalDataViewCall;combiner;comparator;separator;maxtime;maxsize;groupedDataViewArray;timeoutId;findCombinableDataViewCall(e){return this.groupedDataViewArray.find(n=>this.comparator(n,e))}dequeueAllDataViewCalls(){for(this.groupedDataViewArray.reverse();this.groupedDataViewArray.length>0;){let e=this.groupedDataViewArray.pop();this.finalDataViewCall(e).then(n=>{this.separator(e,n)})}clearTimeout(this.timeoutId)}dequeueDataViewCallOnSizeExceed(e){let n=this.groupedDataViewArray.findIndex(o=>this.comparator(o,e));this.groupedDataViewArray[n]&&(this.groupedDataViewArray.splice(n,1),this.finalDataViewCall(e).then(o=>{this.separator(e,o)}))}queueDataViewCall(e,n){let o=this.findCombinableDataViewCall(e),r,i;return r=new Promise(s=>{i=s}),o&&!o.dataViewCallMap[n]?(this.combiner(o,e),o.dataViewCallMap[n]={promise:r,resolve:i}):o?r=o.dataViewCallMap[n].promise:(o={...e,dataViewCallMap:{[n]:{promise:r,resolve:i}}},this.groupedDataViewArray.push({...e,dataViewCallMap:{[n]:{promise:r,resolve:i}}})),Object.keys(o.dataViewCallMap).length===this.maxsize?this.dequeueDataViewCallOnSizeExceed(o):(clearTimeout(this.timeoutId),this.timeoutId=setTimeout(()=>this.dequeueAllDataViewCalls(),this.maxtime)),r}},H8=Bw;var Hw=class{bufferedDataQueues;constructor(){this.bufferedDataQueues={}}getBufferedDataQueueForDataPage(e){return this.bufferedDataQueues[e]}addBufferedDataQueueForDataPage(e,n,o,r,i,s,a){return this.getBufferedDataQueueForDataPage(e)||(this.bufferedDataQueues[e]=new H8(n,o,i,r,s,a)),this.bufferedDataQueues[e]}},G8=Hw;var nme=t=>{let e=t?.F0.rhs?.value;t.F0.rhs={values:[e]},t.F0.comparator="IN"},rme=(t,e)=>Object.keys(t).length===1&&Object.keys(t).length===Object.keys(e).length,ome=(t,e)=>e.F0.comparator==="EQ"&&(t.F0.comparator===e.F0.comparator||t.F0.comparator==="IN"),ime=(t,e)=>rme(t,e)&&ome(t,e)&&t.F0.ignoreCase===e.F0.ignoreCase,q8=t=>t.map(e=>e.field),sme=(t,e)=>{let n=(t.query?.filter).filterConditions,o=(e.query?.filter).filterConditions,r=(e.query?.filter).logic,i=Object.keys(n).length;ime(n,o)?(n.F0.comparator==="EQ"&&nme(n),(n.F0.rhs?.values).push(o.F0.rhs?.value)):(Object.keys(o).forEach((c,l)=>{let u=`F${i+l}`;n[u]=o[c],r=r.replace(c,u)}),(t.query?.filter).logic+=` OR ${r}`);let s=q8(t.query?.select);q8(e.query?.select).forEach(c=>{s.includes(c)||(t.query?.select).push({field:c})})},ame=(t,e)=>t.dataViewParameters&&e.dataViewParameters&&Object.keys(e.dataViewParameters).length===Object.keys(t.dataViewParameters).length&&!Object.keys(t.dataViewParameters).some(n=>typeof e.dataViewParameters?.[n]=="string"?t.dataViewParameters?.[n]!==e.dataViewParameters?.[n]:!y.isEqual(t.dataViewParameters?.[n],e.dataViewParameters?.[n])),cme=(t,e)=>!t.dataViewParameters&&!e.dataViewParameters,lme=(t,e)=>Object.keys(t.filterConditions).length%Object.keys(e.filterConditions).length===0?!Object.keys(e.filterConditions).some(n=>t.filterConditions[n].lhs.field!==e.filterConditions[n]?.lhs.field):!1,ume=(t,e)=>lme(t.query?.filter,e.query?.filter)&&(ame(t,e)||cme(t,e)),dme=(t,e)=>{let{data:n}=e,{dataViewCallMap:o,filterDataOnClient:r}=t;Object.keys(o).forEach(i=>{o[i].resolve({data:r(i,n)})})},pme=t=>({combiner:sme,comparator:ume,separator:dme,...t}),W8=pme;var Gw=(t,e)=>{if(!(typeof window>"u"))try{window.sessionStorage.setItem(t,e)}catch{}},K8=(t,e="",n="IS_NULL")=>({comparator:n,lhs:{field:t},...e&&{rhs:{value:e}}}),qy=t=>t!=null&&typeof t=="object"&&!("then"in t),mme=(t=[],e={},n="")=>{if(!(t.length&&Object.keys(e)))return;let o={};return t.forEach((i,s)=>{let a=e[i],c;a?c=K8(i,a,"EQ"):c=K8(i);let l=`T${s+1}`;o[l]=c}),{logic:Object.keys(o).join(` ${n} `),filterConditions:o}},qw=class t{isInitialised;isQueryable;nonQueryableData;fetchedNQData;previousSearchText;totalRecordCount;fetchedRecordCount;pageNumber;parameters;enablePagination;columns;pageSize;maxResultsDisplay;matchPosition;ignoreCase;cache;keyCache;dataSourceMetaData;isNQDataFetchInProgress;fetchNQDataPromise;dataSource;context;associationFilter;propertyFilter;listType;bufferInitialized;constructor(e,n){this.isInitialised=!1,this.isQueryable=!0,this.dataSourceMetaData={},this.nonQueryableData=[],this.fetchedNQData=!1,this.previousSearchText=null,this.totalRecordCount=0,this.fetchedRecordCount=0,this.cache=new Map,this.keyCache=new Map,this.pageNumber=0,this.isNQDataFetchInProgress=!1,this.fetchNQDataPromise=null,this.dataSource="",this.bufferInitialized=!1,e&&(this.listType=e.listType,this.dataSource=e.dataSource,e.enablePagination?(this.enablePagination=e.enablePagination,this.pageSize=e.pageSize):this.maxResultsDisplay=e.maxResultsDisplay,this.parameters=e.parameters,this.columns=e.columns,this.matchPosition=e.matchPosition,this.ignoreCase=e.ignoreCase!==!1,this.dataSourceMetaData=e.dataSourceMetaData,this.context=n)}static searchResultsCache={};static init(e,n){return new Promise((o,r)=>{let i=e.columns.map(m=>m.value),s=Object.entries(e.parameters).map(([m,f])=>`${m}+${f}`),a=[...i,...s,e.matchPosition,e.maxResultsDisplay].join(d.HASH_DELIMITER),c=y.getHashedString(a),l=`${e.dataSource}_${c}`,u=`__dataviewmetadata__${e.dataSource}`,p=fn.getAppCacheKey(u);if(typeof window<"u"&&window.sessionStorage.getItem(p)){let m=JSON.parse(`${window.sessionStorage.getItem(p)}`);if(n&&t.searchResultsCache?.[n]?.[l])o(t.searchResultsCache[n][l]);else if(e.cacheLifeSpan!=="form"&&t.searchResultsCache?.persisted?.[l])o(t.searchResultsCache.persisted[l]);else{let f=new t(e,n);JSON.stringify(m.associationFilter)===JSON.stringify(e.associationFilter)?(f.dataSourceMetaData=m.dataSourceMetaData,f.isQueryable=m.isQueryable,f.isInitialised=m.isInitialised,f.associationFilter=m.associationFilter,t.initializeCache(n,e,l,f),o(f)):(f.associationFilter=e.associationFilter,f.propertyFilter=e.propertyFilter,f.fetchMetaData(n).then(g=>{Gw(p,JSON.stringify({isQueryable:g.data.isQueryable,dataSourceMetaData:g.data,isInitialised:!0,associationFilter:e.associationFilter})),f.isQueryable=g.data.isQueryable,f.dataSourceMetaData=g.data,f.isInitialised=!0,t.initializeCache(n,e,l,f),o(f)}).catch(g=>{f.isInitialised=!1,r(g)}))}}else if(e.deferDatasource&&$n(e.dataSource)){let m=new t(e,n),f=$n(e.dataSource);m.isQueryable=!!f?.isQueryable,m.isInitialised=!0,m.dataSourceMetaData=f,Gw(p,JSON.stringify({isQueryable:f?.isQueryable,dataSourceMetaData:f,isInitialised:!0})),m.context=n,t.initializeCache(n,e,l,m),o(m)}else{let m=new t(e,n);m.associationFilter=e.associationFilter,m.propertyFilter=e.propertyFilter,m.fetchMetaData(n).then(f=>{Gw(p,JSON.stringify({isQueryable:f.data.isQueryable,dataSourceMetaData:f.data,isInitialised:!0,associationFilter:e.associationFilter})),m.isQueryable=f.data.isQueryable,m.dataSourceMetaData=f.data,m.isInitialised=!0,t.initializeCache(n,e,l,m),o(m)}).catch(f=>{m.isInitialised=!1,r(f)})}})}static bufferedDataView=new G8;registerForBufferedCall(e){return this.isQueryable&&(this.initializeBufferCallsForDataPage(W8(e)),this.bufferInitialized=!0),this}static clearContextedCache(e){delete t.searchResultsCache[e]}static initializeCache(e,n,o,r){e&&n.cacheLifeSpan?.toLowerCase()==="form"?(t.searchResultsCache[e]===void 0&&(t.searchResultsCache[e]={}),t.searchResultsCache[e][o]=r):(t.searchResultsCache.persisted===void 0&&(t.searchResultsCache.persisted={}),t.searchResultsCache.persisted[o]=r)}fetchMetaData(e){return fn.getDataViewMetadata(this.dataSource,e,this.associationFilter,this.propertyFilter)}initializeBufferCallsForDataPage(e){let n=o=>sn.getDataAsync(this.dataSource,this.context,o.dataViewParameters,o.paging,o.query);t.bufferedDataView.addBufferedDataQueueForDataPage(this.dataSource,n,e.combiner,e.separator,e.comparator,e.waitTime,e.maxSize)}buildSchemaForQueryableBufferDP(e){return{...this.buildSchemaForQueryableDP(e),paging:void 0,filterDataOnClient:this.filterDataOnClient.bind(this)}}buildQueryWithKeys=(e,n,o)=>{let r=this.buildSelect(o),i=mme(e,n,"AND");return{select:r,...i&&{filter:i},...fn.isDistinctResultsOnly(r)&&{distinctResultsOnly:"true"}}};buildSchemaForQueryableDPWithKeys=(e,n,o)=>({dataViewParameters:this.parameters,query:this.buildQueryWithKeys(e,n,o),paging:this.buildPageOptions()});getRowDataByKeys=async(e,n,o)=>this.memoizedGetRowDataByKeys(e,n,o);buildKeyCacheKey(e,n,o){let r=e.map(s=>[s,n[s]??""]),i=o?.columns?.map(s=>s.value);return JSON.stringify({filterEntries:r,columns:i,pageNumber:this.pageNumber})}memoizedGetRowDataByKeys(e,n,o){let r=this.buildKeyCacheKey(e,n,o);(o?.invalidateCache||o?.purgeDataPageCache)&&this.keyCache.delete(r);let i=this.keyCache.get(r);if(i)return i;let s=this.isQueryable?this.buildSchemaForQueryableDPWithKeys(e,n,o):this.buildSchemaForNonQueryableDP(),c=sn.getDataAsync(this.dataSource,this.context,s.dataViewParameters,this.isQueryable?s.paging:void 0,this.isQueryable?s.query:void 0,{...o}).catch(l=>(this.keyCache.delete(r),Promise.reject(l)));return this.keyCache.set(r,c),c}getData(e,n){if(this.isQueryable){if(this.bufferInitialized)try{let r=this.buildSchemaForQueryableBufferDP(e);return t.bufferedDataView.getBufferedDataQueueForDataPage(this.dataSource).queueDataViewCall(r,e)}catch{let r=this.buildSchemaForQueryableDP(e,n);return sn.getDataAsync(this.dataSource,this.context,r.dataViewParameters,r.paging,r.query)}let o=this.buildSchemaForQueryableDP(e,n);return sn.getDataAsync(this.dataSource,this.context,o.dataViewParameters,o.paging,o.query,{...n})}return this.fetchNonQueryableResults(e,n)}getCachedResult(e,n){if(this.enablePagination&&qy(n)&&n.has(this.pageNumber))return n.get(this.pageNumber);let o=this.cache.get(e);if(!this.enablePagination&&o&&!qy(o))return o}handleCacheError(e,n){if(this.enablePagination){let o=this.cache.get(e);o&&qy(o)&&o.delete(this.pageNumber)}else this.cache.delete(e);return Promise.reject(n)}storeCacheResult(e,n){if(this.enablePagination){let o=this.cache.get(e);(!o||!qy(o))&&(o=new Map,this.cache.set(e,o)),o.set(this.pageNumber,n)}else this.cache.set(e,n)}isResultCached(e){if(!this.isInitialised||!this.isValidDatasource()||this.context&&!Up(this.context))return!1;let n=e.toLowerCase(),o=this.cache.get(n);return o?this.enablePagination?qy(o)&&o.has(this.pageNumber):!0:!1}memoizedGetData(e,n){let o=e?.toLowerCase(),r=this.cache.get(o);if(this.isResultCached(e)&&r){let c=this.getCachedResult(o,r);if(c)return c}let a=this.getData(e,n).catch(c=>this.handleCacheError(o,c));return this.storeCacheResult(o,a),a}fetchData(e,n=!1,o){return this.isValidDatasource()?this.context&&!Up(this.context)?Promise.resolve({data:[]}):this.isInitialised?(this.pageNumber=n?this.pageNumber:1,this.memoizedGetData(e??"",o)):Promise.reject(new Error):Promise.reject(new Error)}fetchPaginatedData(e){return this.pageNumber+=1,this.fetchData(e,!0)}fetchNonQueryableResults(e,n){if(e===void 0)return Promise.resolve({data:[]});if(this.fetchedNQData)return Promise.resolve({data:this.filterDataOnClient(e,this.nonQueryableData,n)});if(this.isNQDataFetchInProgress&&this.fetchNQDataPromise)return this.fetchNQDataPromise.then(()=>({data:this.filterDataOnClient(e,this.nonQueryableData,n)})).catch(o=>Promise.reject(o));if(this.dataSourceMetaData&&"structure"in this.dataSourceMetaData&&this.dataSourceMetaData.structure?.toLowerCase()==="list"){let o=this.buildSchemaForNonQueryableDP();return this.fetchNQDataPromise=sn.getDataAsync(this.dataSource,this.context,o.dataViewParameters,void 0,void 0,n),this.isNQDataFetchInProgress=!0,new Promise((r,i)=>{this.fetchNQDataPromise?.then(s=>(this.nonQueryableData=[...s.data],this.fetchedNQData=!0,r({data:this.filterDataOnClient(e,this.nonQueryableData,n)}))).catch(s=>i(s)).finally(()=>{this.isNQDataFetchInProgress=!1,this.fetchNQDataPromise=null})})}return Promise.resolve(null)}filterDataOnClient(e,n,o){let r=(o?.columns??this.columns)?.filter(i=>i.useForSearch).map(i=>i.value);return n.reduce((i,s)=>(r?.some(c=>{let l=t.resolveEmbeddedPath(c),u=y.getIn(s,l);return u!=null&&this.positionMatches(`${u}`,e,o)})&&i.push({...s}),i),[])}static resolveEmbeddedPath(e){return e.startsWith("!P!")||e.startsWith("!PL!")?e.substring(e.lastIndexOf("!")+1).replace(/:/g,"."):e}positionMatches(e,n,o){let r=o?.ignoreCase??this.ignoreCase,i=r?e.toLowerCase():e,s=r?n.toLowerCase():n;switch(o?.matchPosition??this.matchPosition){case"start":return i.startsWith(s);case"contains":return i.includes(s);case"equals":return i===s;default:return!1}}buildSelect(e){let n=[],o=[];return(e?.columns??this.columns)?.forEach(r=>{if(!o.includes(r.value)){o.push(r.value);let i={field:r.value};n.push(i)}}),n}buildFilters(e,n){let o=n?.matchPosition??this.matchPosition,r=n?.ignoreCase??this.ignoreCase,i={},s=0;(n?.columns??this.columns)?.forEach(c=>{if(c.useForSearch){let l=`F${s}`;s+=1;let u={field:c.value},p={value:e},m="CONTAINS";o==="start"?m="STARTS_WITH":o==="equals"&&(m="EQ");let f={...`${parseFloat(e)}`!==e&&{ignoreCase:r?"true":"false"},lhs:u,rhs:p,comparator:m};i[l]=f}});let a=Object.keys(i).join(" OR ");return{filterConditions:i,logic:a}}buildQuery(e,n){let o=this.buildSelect(n);return e?{select:o,filter:this.buildFilters(e,n),...fn.isDistinctResultsOnly(o)&&{distinctResultsOnly:"true"}}:{select:o,...fn.isDistinctResultsOnly(o)&&{distinctResultsOnly:"true"}}}buildPageOptions(){return this.enablePagination?{pageNumber:this.pageNumber,pageSize:this.pageSize}:{maxResultsToFetch:this.maxResultsDisplay}}buildSchemaForQueryableDP(e,n){return{dataViewParameters:this.parameters,query:this.buildQuery(e,n),paging:this.buildPageOptions()}}buildSchemaForNonQueryableDP(){return{dataViewParameters:this.parameters}}isValidDatasource(){return!!this.dataSource}},Vo=qw;var Ww=class t{refreshMap;propChangeRefreshMap;constructor(){this.refreshMap={},this.propChangeRefreshMap={}}static initializeRefreshCache(e,n,o,r,i){typeof e[n]>"u"&&(e[n]={}),e[n][o]=[{uniqueHash:r,callback:i}]}registerForRefresh(e,n,o,r,i){o=y.convertClipboardPageToPageRefNotation(o);let s=r.split("/").join(d.HASH_DELIMITER),a=y.getHashedString(s);e==="PROP_CHANGE"?this.propChangeRefreshMap?.[i]?.[o]?this.propChangeRefreshMap[i][o].some(l=>l.uniqueHash===a)||this.propChangeRefreshMap[i][o].push({uniqueHash:a,callback:n}):t.initializeRefreshCache(this.propChangeRefreshMap,i,o,a,n):this.refreshMap?.[i]?.[`${e}-${o}`]?this.refreshMap[i][`${e}-${o}`].some(l=>l.uniqueHash===a)||this.refreshMap[i][`${e}-${o}`].push({uniqueHash:a,callback:n}):t.initializeRefreshCache(this.refreshMap,i,`${e}-${o}`,a,n)}triggerPropChangeRefresh(e,n){let o=this.propChangeRefreshMap?.[n];if(!o)return!1;let r=Q.getPropertyValue(d.CONTEXT_DATA_MODAL_VIEW.CONTEXT_DATA_MODAL_VIEW,e,n),{interestPage:i=""}=r||{},s=u=>y.convertPageRefToClipboardPageNotation(u).replace(`${d.CASE_INFO?.CASE_INFO_CONTENT}${i}`,"");if(o[e]){let u=s(e);return o[e].forEach(p=>p.callback(u)),!0}let a=be.getContextReferences(n)?.get(e),c=a&&Q.resolveContextTreeNodeProps(a.props)||{},{contextPageRef:l}=c;if(l&&o[l]){let u=s(l);return o[l].forEach(p=>p.callback(u)),!0}for(let u of Object.keys(o)){let p;if(y.segmentsMatch(u,e)?p=e:l&&y.segmentsMatch(u,l)&&(p=l),p){let m=s(p);return o[u].forEach(f=>f.callback(m)),!0}}return!1}triggerRefreshForType(e,n,o){return e==="PROP_CHANGE"?this.triggerPropChangeRefresh(n,o):this.refreshMap?.[o]?.[`${e}-${n}`]?(this.refreshMap[o][`${e}-${n}`].forEach(r=>r.callback()),!0):!1}deRegisterForRefresh(e){delete this.propChangeRefreshMap[e],delete this.refreshMap[e]}},Bi=new Ww;var Kw=class{static cleanCaches(e){Nn.purgeCascadeFields(e),Lp.removeContext(e),Vo.clearContextedCache(e),w.cleanContextSubscribers(e),FA(e),be.removeContextTreeNode(e),It.clearContext(e),Bi.deRegisterForRefresh(e)}},Wy=Kw;var Jw="GET_DESCENDANTS",J8=t=>({type:Jw,payload:t});var Yw=class{runtimeParams;runtimeParamsMap;constructor(){this.runtimeParams={},this.runtimeParamsMap={}}setRuntimeParams(e){this.runtimeParams=e}getRuntimeParams(){return this.runtimeParams}setRuntimeParam(e,n){this.runtimeParamsMap[e]=n}getRuntimeParam(e){return this.runtimeParamsMap[e]}},sc=new Yw;var Zw=class{MISSING_CONTEXT_PARAM="context is required parameter";INVALID_CONTEXT_DETAILS="Invalid Context";INVALID_CONTEXT_OPERATION="Invalid Operation on Given Context";schedulePendingActionOnCompletion(e,n){let o=[],r=n.context_data?.blocking_action_counter??0,i=n.context_data?.deferred_action_queue?[...n.context_data.deferred_action_queue]:[],s=n.context_data?.is_deferred_action_in_progress??!1;if(r<=0){if(s)o.push({type:Pn,payload:{context:e,data:{context_data:{is_deferred_action_in_progress:!1}}}});else if(i.length>0){let a=i.shift();s=!s,o.push({type:Pn,payload:{context:e,data:{context_data:{deferred_action_queue:i,blocking_action_counter:r,is_deferred_action_in_progress:s}}}}),a&&o.push(a)}else return;v(o)}}executeOrQueueDeferredAction(e){if(!e?.payload?.context)return Promise.reject(new Error("Action Context is Mandatory Field."));let n=J(e?.payload?.context);if(n){let o=[],r=n.context_data?.blocking_action_counter??0,i=n.context_data?.deferred_action_queue?[...n.context_data.deferred_action_queue]:[],s=n.context_data?.is_deferred_action_in_progress??!1;return i.length<=0&&!s&&(r<=0?(o.push(e),s=!s):i.push(e),o.unshift({type:Pn,payload:{context:e.payload.context,data:{context_data:{deferred_action_queue:i,blocking_action_counter:r,is_deferred_action_in_progress:s}}}}),v(o)),Promise.resolve()}return Promise.reject(new Error(this.INVALID_CONTEXT_DETAILS))}handleDeferredActionCompletion(e){if(!e)return Promise.reject(new Error(this.MISSING_CONTEXT_PARAM));let n=J(e);return n&&n.context_data?.is_deferred_action_in_progress===!0?(v({type:Pn,payload:{context:e,data:{context_data:{is_deferred_action_in_progress:!1}}}}),this.schedulePendingActionOnCompletion(e,n),Promise.resolve()):Promise.reject(new Error(this.INVALID_CONTEXT_DETAILS))}registerBlockingAction(e){return e?J(e)?(v({type:Uc,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));let n={...J(e)};return n.context_data={...n.context_data},n&&n.context_data?.blocking_action_counter>0?(v({type:Uc,payload:{context:e,isInitiateBlockingAction:!1}}),n.context_data.blocking_action_counter-=1,this.schedulePendingActionOnCompletion(e,n),Promise.resolve()):Promise.reject(new Error(this.INVALID_CONTEXT_OPERATION))}cancelDeferredActionsOnError(e){if(!e)return;let n=J(e);if(n){let o={...n};o.context_data={...o.context_data},o.context_data?.deferred_action_queue&&y.rejectPendingActions(o.context_data.deferred_action_queue)&&(o.context_data.deferred_action_queue=[]),o.context_data?.blocking_action_counter&&(o.context_data.blocking_action_counter=0),o.context_data?.is_deferred_action_in_progress&&(o.context_data.is_deferred_action_in_progress=!1),v({type:Pn,payload:{context:e,data:{...o}}}),Gr.disableLoadingIndicator({context:e})}}isDeferredActionInProgress(e){if(!e)return Promise.reject(new Error(this.MISSING_CONTEXT_PARAM));let n=J(e);return!!(n&&n.context_data?.is_deferred_action_in_progress===!0)}},fme=new Zw,vt=fme;var Y8=(t,e)=>{let n={},o=Fi.getLookUpDataPage(t),r=Fi.getDataPageKeys(o);if(r)for(let i of r)n[i.keyName]=i.isAlternateKeyStorage?e[i.linkedField]:e[i.keyName];return{dataViewParameters:n,dataPageID:o,dataPageKeys:r}},Z8=(t,e)=>{let n=Fi.getSavableDataPage(t),o=Fi.getDataPageKeys(n);return o?.forEach(r=>{r.isAlternateKeyStorage&&(r.keyName===r.linkedField||Object.keys(e).includes(r.linkedField))?r.keyName=e[r.linkedField]:r.isAlternateKeyStorage&&Object.keys(e).includes(r.keyName)&&r.keyName!==r.linkedField?(e[r.linkedField]=e[r.keyName],delete e[r.keyName]):r.keyName=e[r.keyName]}),{keys:e,dataPageID:n,dataPageKeys:o}},Q_=t=>{w.publish(A.PUB_SUB_EVENTS.EVENT_CANCEL,t)},gme=t=>{if(t.includes(d.ACTIONAREA))return!0;let e=cc(t);return!!se(`${e}/${d.ACTIONAREA}`)?.includes(d.ACTIONAREA)},hme=(t,e,n)=>G.shouldUseUnifiedHandling()||gme(t)?Ko:Nj(e,n??!1),Q8=(t,e,n)=>{let{callbacks:o}=n;return n.callbacks=null,t(e,n).then(r=>{r==="cancel"?o?.cancel?.():o?.submit?.()})},yme=t=>{let e=G.shouldUseUnifiedHandling();return G.isExternalCaseType(t)?nv:G.isExternalObject(t)?e?nv:G2:e?ua:G.isObjectCaseType(t)?V2:ua},Sme=t=>!G.shouldUseUnifiedHandling()&&(t.type==="Object"||G.isObjectCaseType(t?.caseClassName||"")||globalThis.location?.href?.includes("/objects/"))?H2:is,X8=(t,e,n)=>!n&&e===d.ACTION?t.getValue(A.CASE_INFO.ASSIGNMENTACTION_ID):t.getValue(A.CASE_INFO.ACTIVE_ACTION_ID),Eme=(t,e)=>{let n=t.getValue(A.CASE_INFO.IS_LOCAL_ACTION),o=t.getValue(A.CASE_INFO.ASSIGNMENT_ID),r=X8(t,e,n);if(e===d.ACTION&&(!r||!n&&!o)){let i=w8(t.getContextName());i&&(!o&&!r&&(n=i.isLocalAction),o=o||i.assignmentID,r=r||(n?i.activeActionID:i.assignmentActionID))}return{localAction:n,assignmentID:o,actionID:r}},Qw=class{MSG_CLASSNAME_REQUIRED="className is required parameter";MSG_CLASSNAME_STRING="className must be a string";MSG_ACTION_ID_REQUIRED="actionID is required parameter";MSG_ACTION_ID_STRING="actionID must be a string";MSG_ACTION_NAME_REQUIRED="actionName is required parameter";MSG_ACTION_NAME_STRING="actionName must be a string";MSG_KEY_PROPERTIES_REQUIRED="keyProperties is required parameter";MSG_DATAVIEWID_REQUIRED="dataViewID is required parameter";MSG_DATAVIEWID_STRING="dataViewID must be a string";MSG_CONTAINERITEMID_REQUIRED="containerItemID is required parameter";MSG_CONTAINERITEMID_STRING="containerItemID must be a string";MSG_PAGENAME_REQUIRED="pageName is required parameter";MSG_PAGENAME_STRING="pageName must be string";MSG_INSIGHTID_REQUIRED="insightID is required parameter";MSG_DASHBOARDID_REQUIRED="DashboardID is required parameter";MSG_ACTIVE_SUGGESTION_UNATTENDED="You must accept or decline autofilled fields.";MSG_CASE_ID_REQUIRED="caseID is required parameter";MSG_CONTEXT_STRING="context must be string";MSG_SUBSCRIPT_VIEW_REQUIRED="subscriptView is required";c11nEnv;constructor(e){this.c11nEnv=e}shouldDeleteCaseInCreateStage=(e,n,o)=>!e&&n||o;getCaseID=e=>e.caseID||this.c11nEnv.getValue(d.getProperty(A.CASE_INFO.CASE_INFO_ID))||e?.links?.open?.href?.split("/")?.[2];getSaveActionPayload=(e,n=!1,o=!1)=>{let r=e,i=r&&r.includes(d.MODAL),s=this.c11nEnv.getValue(A.CASE_INFO.CASE_INFO_ID),a=this.c11nEnv.getValue(A.CASE_INFO.ASSIGNMENT_ID),c=this.c11nEnv.getValue(A.CASE_INFO.ACTIVE_ACTION_ID)?this.c11nEnv.getValue(A.CASE_INFO.ACTIVE_ACTION_ID):this.c11nEnv.getValue(A.CASE_INFO.ASSIGNMENTACTION_ID),l=this.c11nEnv.getContainerName(),u=this.c11nEnv.getValue(A.CASE_INFO.CASE_TYPE_ID),p=n?void 0:Fn(this.c11nEnv.getContextName()),m=this.c11nEnv.getValue("isProcessAction","isProcessAction");return Ve.buildActionObject({context:r,containerItemID:e,assignmentID:a,actionID:c,caseID:s,containerName:l,caseType:u,isModalAction:i,isFormValid:p,isProcessAction:m,saveOnly:n,autosave:o},this.c11nEnv)};actionsApiPromise=(e,n,o=!0)=>{let r="";n&&n.actionMgrID!==null?r=n.actionMgrID||"":r=M.getNextActionMgrId();let i,s,a=new Promise((c,l)=>{i=c,s=l});if(i&&s)M.register(r,a,i,s,e,n,o);else throw new Error("resolveFn or rejectFn is not defined.");return{actionMgrID:r,promise:a}};showDataObjectCreateView(e,n=A.VIEW_NAMES.DATA_OBJECT_CREATE_VIEW){let o=Ve.buildActionObject({viewName:n,className:e},this.c11nEnv),r=Un,{promise:i}=this.actionsApiPromise(r,o);return v({type:r,payload:{...o,containerName:A.MODAL,skipSemanticUrl:!0,isCreateDataObject:!0}}),i}cancelDataObject(e){if(!e)return Promise.reject(new Error("containerItemId is required parameter"));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));let n=e,o=jn(n),r=ie(d.CASE_INFO.CASE_INFO_ID,"",n),i=ie(d.CASE_INFO.ASSIGNMENT_ID,"",n);if(!o)return new kp(this.c11nEnv).removeContainerItem({containerItemID:e,skipReleaseLockRequest:!0});let s=ku,a=Ve.buildActionObject({containerItemID:e,context:n},this.c11nEnv),c=n&&n.includes(d.MODAL);v({type:s,payload:{...a,isModalAction:c,isDataObject:!0,skipReleaseLockRequest:!0}});let{promise:l}=this.actionsApiPromise(s,a);return l.then(()=>{Q_({caseID:r,assignmentID:i,context:n})})}createDataObject(e){if(!e)return Promise.reject(new Error("containerItemID is required parameter"));let{data:n}=we()?.getState()||{},o=n[e]?.dataInfo?.content?.classID;if(!o)return Promise.reject(new Error(d.DATA_CLASS_NOT_FOUND));if(ac(A.VIEW_NAMES.SUBSCRIPT_CREATE_VIEW)){let u=this.handleSubscript.call(this,e,this.c11nEnv);if(u)return u}let i=Fi.getSavableDataPage(o),s=ju,a=!!e&&e.includes(d.MODAL),c=Ve.buildActionObject({containerItemID:e,dataPageID:i},this.c11nEnv),{promise:l}=this.actionsApiPromise(s,c);return v(J_({...c,isModalAction:a,isFormValid:Fn(e)})),l}deleteDataObject(e,n){if(!e)return Promise.reject(new Error("className is required parameter"));if(!n)return Promise.reject(new Error("keys is required parameter"));let o=PE,r=Fi.getSavableDataPage(e),i=Fi.getDataPageKeys(r),s={};if(i)for(let l of i)s[l.keyName]=l.isAlternateKeyStorage?n[l.linkedField]:n[l.keyName];let a=Ve.buildActionObject({dataViewName:r,dataViewParameters:s},this.c11nEnv),{promise:c}=this.actionsApiPromise(o,a);return v(k8({...a})),c}getDataObjectView(e,n,o={viewName:"",readOnly:!1,actionName:""}){if(!e)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(!n)return Promise.reject(new TypeError(this.MSG_KEY_PROPERTIES_REQUIRED));if(typeof n!="object")return Promise.reject(new TypeError("keyProperties must be a object"));let r=NE,{dataPageID:i,dataViewParameters:s}=Y8(e,n),a=Ve.buildActionObject({dataLookUp:i,keyProperties:n,requestPayload:s,viewName:o.viewName||A.VIEW_NAMES.DATA_OBJECT_EDIT_VIEW,containerName:d.MODAL,readOnly:o.readOnly,actionName:o.actionName},this.c11nEnv),{promise:c}=this.actionsApiPromise(r,a);return v(Y_({...a})),c}updateDataObject(e,n){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if(!n)return Promise.reject(new Error("keys is required parameter"));let{data:o}=we()?.getState()||{},r=o[e]?.dataInfo?.content?.classID;if(!r)return Promise.reject(new Error(d.DATA_CLASS_NOT_FOUND));let{dataPageID:i,keys:s}=Z8(r,n),a=Fu,c=e&&e.includes(d.MODAL),l=Ve.buildActionObject({containerItemID:e,dataPageID:i,key:s},this.c11nEnv),u=o[e]?.caseInfo?.headers?.etag,{promise:p}=this.actionsApiPromise(a,l);return v(Z_({...l,isModalAction:c,isFormValid:Fn(e),etag:u})),p}updateDataObjectFields(e,n,o,r={}){if(!e)return Promise.reject(new Error(this.MSG_DATAVIEWID_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_DATAVIEWID_STRING));if(!n||Object.keys(n).length===0)return Promise.reject(new Error(this.MSG_KEY_PROPERTIES_REQUIRED));let{etag:i,context:s=this.c11nEnv.getContextName()}=r,{restApi:a,reqType:c}=F(vE,{data_view_ID:e});return k(a,{method:c,headers:i?{"if-match":i}:{},body:{data:{...o,...n},pageInstructions:[]}},s)}openDataObjectAction(e,n,o,r,i){if(!e)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(!n)return Promise.reject(new TypeError(this.MSG_KEY_PROPERTIES_REQUIRED));if(typeof n!="object")return Promise.reject(new TypeError("keyProperties must be a object"));if(!o)return Promise.reject(new Error(this.MSG_ACTION_ID_REQUIRED));if(!r)return Promise.reject(new Error(this.MSG_ACTION_NAME_REQUIRED));let s=OE,{dataViewParameters:a,dataPageID:c,dataPageKeys:l}=Y8(e,n),u=Ve.buildActionObject({actionID:o,actionName:r,dataViewParameters:a,lookupDatapage:c,containerName:i?.containerName||d.MODAL,dataViewPayload:l,context:this.c11nEnv.getContextName()},this.c11nEnv),{promise:p}=this.actionsApiPromise(s,u);return v({type:s,payload:{...u}}),p}submitDataObjectAction(e,n,o,r){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));if(!n)return Promise.reject(new Error(this.MSG_KEY_PROPERTIES_REQUIRED));if(!o)return Promise.reject(new Error(this.MSG_ACTION_ID_REQUIRED));let{data:i}=we()?.getState()||{},s=i[e]?.dataInfo?.content?.classID;if(!s)return Promise.reject(new Error(d.DATA_CLASS_NOT_FOUND));let a=r?.jsActionQueryParams,c=cc(e),l=re(c),u=Ze(l,c)||{},{resourceType:p="",key:m=""}=u,f=cs,{dataPageID:g,keys:h}=Z8(s,n),E=Ve.buildActionObject({containerItemID:e,actionID:o,resourceType:p,key:m,keys:h,savableDatapage:g,containerName:d.MODAL,context:e,jsActionQueryParams:a},this.c11nEnv);E.context=e;let C=i[e]?.caseInfo?.headers?.etag,{promise:I}=this.actionsApiPromise(f,E);return v({type:f,payload:{...E,isFormValid:Fn(e),etag:C}}),I}createWork(e,n={flowType:"",containerName:"",openCaseViewAfterCreate:!1,modalOptions:{dockable:!1},startingFields:Object,remoteCaseMeta:{},channelName:""}){if(!e)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(e=ce.getRemoteCaseClassBySourceClass(e)??e,window.pms?.plugins?.c11n?.createWork)return window.pms.plugins.c11n.createWork(e,O.getDefaultQualifiedName("pyStartCase"),n);let{dockable:o=!1}=n?.modalOptions||{},r=n.theType?n.theType:yme(e),i=Ve.buildActionObject({class:e,flowType:O.getDefaultQualifiedName("pyStartCase"),containerName:d.PRIMARY,openCaseViewAfterCreate:!0,...n,theType:r,modalOptions:{isDockable:o}},this.c11nEnv),{promise:s}=this.actionsApiPromise(r,i);if(i.headers={...i.headers},n.channelName?i.headers[d.X_ORIGIN_CHANNEL]=n.channelName:T.isWSSPortal()&&(i.headers[d.X_ORIGIN_CHANNEL]="WSS"),r=this.handleRemoteCaseForCreateWork(e,i,r),en.getPreviewMode()){i.debugInfo={debugId:y.generateUniqueID()};let a=Ge.getCoreHeadersFromContext(i?.context||""),c=String(a?.debugInfo?.[d.COREHEADER_APP_DEBUG_ID]||"");c&&r!==ua&&(i.debugInfo={debugId:c})}return v({type:r,payload:{...i}}),s}handleRemoteCaseForCreateWork(e,n,o){if(ce.isRemoteCase(e)){let{RemoteClassName:r,RemoteSystemID:i,name:s}=ce.getRemoteCase(e);if(n.className=e,n.class=r,M.setRemoteCaseHeaderByContext(n,i),ce.isTraditionalRemoteCase(e)||ce.isRemoteCaseVersionDifferent(e)){let a={className:e,name:s,action:pf,remoteClassName:r};return M.setTraditionalRemoteCaseParams(n,a)}}return o}createCase(e,n={}){return this.createWork(e,{...n,theType:"CREATE_WORK"})}getDataObjectActions(e,n){if(!e)return Promise.reject(new Error(this.MSG_DATAVIEWID_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_DATAVIEWID_STRING));let o=EE,r=Ve.buildActionObject({dataViewID:e,dataViewParameters:n},this.c11nEnv),{promise:i}=this.actionsApiPromise(o,r);return v({type:o,payload:{...r}}),i}getDescendants(e,n){if(!e)return Promise.reject(new Error(this.MSG_CASE_ID_REQUIRED));if(typeof n!="string")return Promise.reject(new TypeError(this.MSG_CONTEXT_STRING));let o=n||this.c11nEnv.getContextName(),r=_2,i=Ve.buildActionObject({caseID:e,currentContext:o},this.c11nEnv),{promise:s}=this.actionsApiPromise(r,i),a=J8({...i,context:o});return v(a),s}openWorkByHandle(e,n,o={}){if(!e)return Promise.reject(new Error("workID is required parameter"));if(typeof e!="string")return Promise.reject(new TypeError("workID must be a string"));if(!n)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if(typeof n!="string")return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(n=ce.getRemoteCaseClassBySourceClass(n)??n,window.pms?.plugins?.c11n?.openWorkByHandle)return window.pms.plugins.c11n.openWorkByHandle(e,n);let r={insKey:e,acTargetName:o.targetContainer||d.PRIMARY,containerName:o.targetContainer||d.PRIMARY},i=G.shouldUseUnifiedHandling()||!G.isObjectCaseType(n)?Po:B2,s=Ve.buildActionObject(r,this.c11nEnv),{promise:a}=this.actionsApiPromise(i,s);return s.headers={...s.headers},o.channelName?s.headers[d.X_ORIGIN_CHANNEL]=o.channelName:T.isWSSPortal()&&(s.headers[d.X_ORIGIN_CHANNEL]="WSS"),s.className=n,ce.isRemoteCase(n)&&(i=this.setRemoteCaseParamsForOpenCase(s,n,i,o.remoteCaseMeta)),en.getPreviewMode()&&o.targetContainer!==d.WORKAREA&&(s.debugInfo={debugId:y.generateUniqueID()}),v({type:i,payload:{...o,...s}}),a}setRemoteCaseParamsForOpenCase(e,n,o,r={}){let{RemoteSystemID:i,RemoteClassName:s,name:a}=ce.getRemoteCase(n);if(M.setRemoteCaseHeaderByContext(e,i),e.isRemoteCase=!0,e.remoteCaseClass=n,e.remoteCaseMeta=r,ce.isTraditionalRemoteCase(n)||ce.getRemoteAppPlatformVersion(i??"")){let c={className:n,name:a,action:ME,remoteClassName:s};return M.setTraditionalRemoteCaseParams(e,c)}return o}openAssignment(e,n,o={isActionFromToDoList:!1,isChild:!1,context:"",viewType:"",skipBrowserSemanticUrlUpdate:!1,containerName:"",channelName:"",remoteCaseMeta:{}}){if(!e)return Promise.reject(new Error("assignmentID is required parameter"));if(typeof e!="string")return Promise.reject(new TypeError("assignmentID must be a string"));if(!n)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if(typeof n!="string")return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(n=ce.getRemoteCaseClassBySourceClass(n)??n,window.pms?.plugins?.c11n?.openAssignment)return window.pms.plugins.c11n.openAssignment(e,n);let r={assignmentID:e,doDeleteCaseSummary:!0,containerName:o.containerName,isActionFromToDoList:o.isActionFromToDoList,isChild:!1,...o.renderInline!==void 0&&{renderInline:o.renderInline},...o.pageName!==void 0&&{pageName:o.pageName}};o.isChild&&(r.containerName=d.PRIMARY,r.isChild=o.isChild);let i=ic,s=Ve.buildActionObject(r,this.c11nEnv),{promise:a}=this.actionsApiPromise(i,s);if(s.headers=s.headers||{},o.channelName?s.headers[d.X_ORIGIN_CHANNEL]=o.channelName:T.isWSSPortal()&&(s.headers[d.X_ORIGIN_CHANNEL]="WSS"),ce.isRemoteCase(n)){let{RemoteClassName:l,RemoteSystemID:u,name:p}=ce.getRemoteCase(n);if(M.setRemoteCaseHeaderByContext(s,u),s.remoteCaseMeta=o.remoteCaseMeta,ce.isTraditionalRemoteCase(n)||ce.getRemoteAppPlatformVersion(u??"")){let m={className:n,name:p,action:wE,remoteClassName:l};i=M.setTraditionalRemoteCaseParams(s,m)}}s.className=n,s.activeItemCaseViewMode=this.c11nEnv.getValue("context_data.caseViewMode"),en.getPreviewMode()&&![d.WORKAREA].includes(o.containerName)&&(s.debugInfo={debugId:y.generateUniqueID()});let c={context:s.context||o.context,containerName:s.containerName||o.containerName,targetContainerName:s.containerName||o.containerName,viewType:s.viewType||o.viewType,skipBrowserSemanticUrlUpdate:o.skipBrowserSemanticUrlUpdate};return v({type:i,payload:{...s,...c}}),a}finishAssignment(e,n={outcomeID:"",jsActionQueryParams:{}}){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));e.endsWith(d.ACTIONAREA)&&(e=se(e)||e);let o=de(e),r=o;if(o?.includes(`/${d.WORKAREA}`)&&(r=o.substring(0,r?.lastIndexOf(`/${d.WORKAREA}`))),$V(o)){let oe=[{type:"error",message:this.c11nEnv.getLocalizationService().getLocalizedMessage(this.MSG_ACTIVE_SUGGESTION_UNATTENDED)}];return Hr({messages:oe,context:r,category:A.PAGE}),Promise.reject({type:A.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR})}let i=n?.isTriggeredFromDifferentContext,{caseID:s,assignments:a,localActionID:c,caseActions:l,caseInfo:u,businessID:p,caseTypeID:m,caseTypeName:f}=lR(e,this.c11nEnv,{isTriggeredFromDifferentContext:i}),g=on(u),h=!1,E,C=l?.find(oe=>oe.ID===c);C?h=C?.type==="Case":E=J(o);let{assignmentID:I}=lR(e,this.c11nEnv,{isTriggeredFromDifferentContext:i});E?.context_data?.actionType&&(h=E.context_data.actionType===d.CASE,I=I||E.context_data.assignmentID);let _=Pj(a,I,c,u?.activeActionID),[P,N]=s.split(" "),z={class:P,actionID:_,assignmentID:I,caseID:s,workID:N,containerName:this.c11nEnv.getContainerName(),containerItemID:e,isCaseWideAction:h,doDeleteCaseSummary:!0,isInCreateStage:g,businessID:p,caseTypeID:m,caseTypeName:f};e?.includes(d.MODAL)&&(z.containerName=d.MODAL,z.isModalAction=!0),z.outcome=n.outcomeID,z.jsActionQueryParams=n.jsActionQueryParams,u?.isLocalAction&&(z.viewType=mt.FORM);let H=hme(e,m,u?.isObjectWideAction),ne=Ve.buildActionObject(z,this.c11nEnv);ne.context=o;let{promise:j}=this.actionsApiPromise(H,ne);return ne.isProcessAction=this.c11nEnv.getValue("isProcessAction","isProcessAction")||J(o).context_data.isProcessAction,ne.headers??={},T.isWSSPortal()&&(ne.headers[d.X_ORIGIN_CHANNEL]="WSS"),vt.executeOrQueueDeferredAction({type:H,payload:{...ne,context:o}}),j}getNextWork(e={}){if(T.getRenderingMode()==="HYBRID")return w.publish(A.PUB_SUB_EVENTS.CASE_EVENTS.GET_NEXT_WORK,{userIdentifier:T.getOperatorIdentifier()}),Promise.resolve();let n=ic,o=Ve.buildActionObject({...e,containerName:d.PRIMARY,isGetNextWork:!0},this.c11nEnv),{promise:r}=this.actionsApiPromise(n,o);return v({type:n,payload:{...o}}),r}openStage(e){if(!e)return Promise.reject(new Error("stageID is required parameter for openStage"));let n=ic,o=this.c11nEnv.getValue(A.CASE_INFO.CASE_INFO_ID),r=this.c11nEnv.getCaseSummary().headers,i=Ve.buildActionObject({containerName:this.c11nEnv.getContainerName(),isOpenStage:!0,stageID:e},this.c11nEnv),{promise:s}=this.actionsApiPromise(n,i),a={type:n,payload:{...i,caseID:o,headers:r}};return v(a),s}submitBulkAction(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));let n=yE,o=this.c11nEnv.getValue(A.CASE_INFO.CASES),r=this.c11nEnv.getValue(A.CASE_INFO.ACTIVE_ACTION_ID),i=this.c11nEnv.getValue(A.CASE_INFO.IS_ASSIGNMENT),s={containerName:this.c11nEnv.getContainerName(),containerItemID:e,isCaseWideAction:!0,doDeleteCaseSummary:!0,isInCreateStage:!1};e&&e.includes(d.MODAL)&&(s.containerName=d.MODAL,s.isModalAction=!0);let a=Ve.buildActionObject(s,this.c11nEnv),c=de(e);a.context=c;let{promise:l}=this.actionsApiPromise(n,a);return v({type:n,payload:{...a,context:c,cases:o,actionID:r,isAssignment:i,isFormValid:Fn(c),classID:this.c11nEnv.getCurrentClassID()}}),l}submitBulkActionAsync(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));let n=SE,o=this.c11nEnv.getValue(A.CASE_INFO.CASES),r=this.c11nEnv.getValue(A.CASE_INFO.ACTIVE_ACTION_ID),s={containerName:e.includes(d.MODAL)?d.MODAL:this.c11nEnv.getContainerName(),containerItemID:e,isCaseWideAction:!0,doDeleteCaseSummary:!0,isInCreateStage:!1,isModalAction:e.includes(d.MODAL)},a=Ve.buildActionObject(s,this.c11nEnv),c=de(e);a.context=c;let{promise:l}=this.actionsApiPromise(n,a);return v({type:n,payload:{...a,context:c,cases:o,actionID:r,isFormValid:Fn(c),classID:this.c11nEnv.getCurrentClassID()}}),l}openBulkAction(e,n){if(!e)return Promise.reject(new Error("actionID is required parameter for openBulkAction"));if(typeof e!="string")return Promise.reject(new TypeError("actionID must be a string openBulkAction"));if(window.pms?.plugins?.c11n?.openBulkAction){let{callbacks:u}=n;return n.callbacks=null,window.pms.plugins.c11n.openBulkAction(e,n).then(p=>{p==="cancel"?u?.cancel?.():u?.submit?.()})}let{selectedList:o,runningMode:r}=n,i=n.type,s={selectedList:o,vcName:n.target,actionName:n?.name,actionID:e,doDeleteCaseSummary:!0,localActionType:i,runningMode:r,...n},a=b2,c=Ve.buildActionObject(s,this.c11nEnv),{promise:l}=this.actionsApiPromise(a,c);return v({type:a,payload:{...c}}),l}cancelBulkAction(e){return e?typeof e!="string"?Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING)):new kp(this.c11nEnv).removeContainerItem({containerItemID:e,skipReleaseLockRequest:!0}):Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED))}approveCase(e){return e?typeof e!="string"?Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING)):(v({type:Pt,payload:{reference:A.CASE_INFO.APPROVALFLAG,value:d.APPROVED,context:e}}),this.finishAssignment(e)):Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED))}rejectCase(e){return e?typeof e!="string"?Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING)):(v({type:Pt,payload:{reference:A.CASE_INFO.APPROVALFLAG,value:d.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(typeof e!="string")return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));let[,n]=this.c11nEnv.getValue(A.CASE_INFO.DUPLICATECASEINSKEY).split(" "),o={type:Pt,payload:{reference:A.CASE_INFO.DUPLICATECASEFLAG,value:d.DUPLICATE,context:e}},r={type:Pt,payload:{reference:A.CASE_INFO.DUPLICATECASEID,value:n,context:e}};return v([o,r]),this.finishAssignment(e)}ignoreDuplicateCase(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));let n={type:Pt,payload:{reference:A.CASE_INFO.DUPLICATECASEFLAG,value:d.IGNORE,context:e}},o={type:Pt,payload:{reference:A.CASE_INFO.DUPLICATECASEID,value:"",context:e}},r={type:Pt,payload:{reference:A.CASE_INFO.DUPLICATECASEINSKEY,value:"",context:e}};return v([n,o,r]),this.finishAssignment(e)}openLocalAction(e,n){if(!e)return Promise.reject(new Error(this.MSG_ACTION_ID_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_ACTION_ID_STRING));let o=this.getCaseID(n);if(window.pms?.plugins?.c11n?.openLocalAction)return n.caseID=o,Q8(window.pms.plugins.c11n.openLocalAction,e,n);let r=n.assignKey||this.c11nEnv.getValue(A.CASE_INFO.ASSIGNMENT_ID),i=n.type,s={caseID:o,assignmentID:r,vcName:n.target,actionName:n?.name,assignKey:r,actionID:e,doDeleteCaseSummary:!0,localActionType:i,...n},a=n.containerName===d.ACTIONAREA?is:Sme(n),c=Ve.buildActionObject(s,this.c11nEnv);(n.containerName===d.ACTIONAREA||n.containerName===d.WORKAREA)&&(c.skipMergeAssignmentsAndActions=!1);let{promise:l}=this.actionsApiPromise(a,c),u=this.c11nEnv.getContextName(),p=Ke(u)[0],m;if(m=se(p),m?.includes("actionarea")&&a===is)return v({type:a,payload:{...c}}),l;if(n.type==="Object")return v({type:a,payload:{...c}}),l;let f=se(p),g=this.c11nEnv.getValue(d.getProperty(A.CASE_INFO.CASE_INFO_ID)),E=o!==g&&f?ce.getRemoteHeaderByContext(f)||ce.getRemoteHeaderByContext(u):ce.getRemoteHeaderByContext(u);if(M.setRemoteCaseHeaderByContext(c,E),!p)return m=u,v({type:a,payload:{...c,contextName:u,continueExecution:!1}}),l;let{continueExecution:C,containerItemID:I}=zp(u,o,p);if(m=I,!C||m&&we()?.getState()?.data[m]?.context_data?.caseViewMode==="review")return v({type:a,payload:{...c,contextName:u,continueExecution:C}}),l;let _=m,P=_&&_.includes(d.MODAL),N=n.assignKey||this.c11nEnv.getValue(A.CASE_INFO.ASSIGNMENT_ID),z=J(m),H=z?.caseInfo?.assignments?z.caseInfo.assignments[0]?.actions[0]?.ID:void 0,ne=o,j=se(p),oe=In(re(j)),Ae=J(j),he=oe&&Ae;he&&(ne=Ae?.caseInfo?.ID,N=Ae?.caseInfo?.assignments[0]?.ID,H=Ae?.caseInfo?.assignments[0]?.actions[0]?.ID);let Oe=this.c11nEnv.getContainerName(),He=this.c11nEnv.getValue(A.CASE_INFO.CASE_TYPE_ID),_e=!0,Xe=this.c11nEnv.getValue("isProcessAction","isProcessAction"),De=Ve.buildActionObject({context:_,containerItemID:he?j:m,assignmentID:N,actionID:H,caseID:he?ne:o,containerName:Oe,caseType:He,isModalAction:P,isFormValid:_e,isProcessAction:Xe},this.c11nEnv);De.context=he?j:m;let Et=de(m),an=this.c11nEnv.getCaseSummary(),vn=on(an),cn=Ve.buildActionObject({caseID:o,containerItemID:m,cancelContext:Et},this.c11nEnv),br={};return P?(cn.acTargetName=d.MODAL,cn.isInCreateStage=vn,cn.isModalAction=P,br={...cn}):br={...cn,acName:X(this.c11nEnv.getContainerName(),cn.context)},v({type:a,payload:{...c,contextName:u,saveActionPayload:De,cancelActionPayload:br,continueExecution:C}}),l}openProcessAction(e,n){if(!e)return Promise.reject(new Error(this.MSG_ACTION_ID_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_ACTION_ID_STRING));let o=this.c11nEnv.getValue(A.CASE_INFO.CASE_INFO_ID)||n.caseID;if(window.pms?.plugins?.c11n?.openProcessAction)return n.caseID=o,Q8(window.pms.plugins.c11n.openProcessAction,e,n);let r=this.c11nEnv.getValue(A.CASE_INFO.ASSIGNMENT_ID)||n.assignKey,i=n.type,s={caseID:o,assignmentID:r,vcName:n.target,actionName:n?.name,assignKey:r,actionID:e,doDeleteCaseSummary:!0,processActionType:i,isProcessAction:!0,...n},a=W_,c=Ve.buildActionObject(s,this.c11nEnv),l=this.c11nEnv.getContextName(),u=Ke(l)[0],p=ce.getRemoteHeaderByContext(l);if(!p&&u){let g=gt(u);g?.accessedOrder.forEach(h=>{(n.caseID||o)===g.items[h].key&&(p=ce.getRemoteHeaderByContext(g.items[h].context))})}M.setRemoteCaseHeaderByContext(c,p);let{promise:m}=this.actionsApiPromise(a,c),{containerItemID:f}=zp(l,o,u);return v({type:a,payload:{...c,saveContainerItemID:f}}),m}navigateToStep(e,n){if(!e)return Promise.reject(new Error("stepID is required parameter"));if(typeof e!="string")return Promise.reject(new TypeError("stepID must be a string"));if(!n)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if(typeof n!="string")return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));let o=hE,r=this.c11nEnv.getValue(A.NEXT_ASSIGNMENT_INFO_ID)?this.c11nEnv.getValue(A.NEXT_ASSIGNMENT_INFO_ID):this.c11nEnv.getValue(A.CASE_INFO.ASSIGNMENT_ID),i=on(this.c11nEnv.getCaseSummary()),s=this.c11nEnv.getValue(A.CASE_INFO.CASE_INFO_ID),a={ID:r,stepID:e,acTargetName:this.c11nEnv.getContainerName(),targetContainerName:this.c11nEnv.getContainerName(),containerItemID:n,doDeleteCaseSummary:!0,isInCreateStage:i,caseID:s};n&&n.includes(d.MODAL)&&(a.acTargetName=d.MODAL);let c=Ve.buildActionObject(a,this.c11nEnv),{promise:l}=this.actionsApiPromise(o,c),u=de(n);return v({type:o,payload:{...c,containerItemID:n,context:u}}),l}cancelAssignment(e,n){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));let{CASE_INFO:o}=A,r=os,i=de(e),s=e&&e.includes(d.MODAL),a=this.c11nEnv.getCaseSummary(),c=on(a),l=this.c11nEnv.getValue(d.getProperty(o.CASE_INFO_ID)),u=this.c11nEnv.getValue(o.ASSIGNMENT_ID),p=Ve.buildActionObject({caseID:l,containerItemID:e,context:i},this.c11nEnv),m={};s?(p.acTargetName=d.MODAL,p.isInCreateStage=c,p.isModalAction=s,m={...p}):m={...p,acName:X(this.c11nEnv.getContainerName(),p.context)};let{promise:f}=this.actionsApiPromise(r,p);return v({type:r,payload:m}),f.then(()=>{n||Q_({caseID:l,assignmentID:u,context:i||e})})}cancelLocalAction(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));let{CASE_INFO:n}=A,o=e,r=ku,i=e&&e.includes(d.MODAL),s=this.c11nEnv.getValue(n.CASE_INFO_ID),a=Ve.buildActionObject({caseID:s,containerItemID:e,context:o},this.c11nEnv);if(!jn(o))return new kp(this.c11nEnv).removeContainerItem({containerItemID:e}).then(()=>{od(s),Q_({caseID:s,context:this.c11nEnv.getContextName()})});v({type:r,payload:{...a,isModalAction:i}});let{promise:l}=this.actionsApiPromise(r,a);return l}cancelCreateStageAssignment(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));let{CASE_INFO:n}=A,o=ku,r=e,i=r&&r.includes(d.MODAL),s=this.c11nEnv.getCaseSummary(),a=this.c11nEnv.getValue(d.getProperty(d.CASE_INFO.CASE_TYPE_ID)),c=on(s),l=this.c11nEnv.getValue(d.getProperty(n.CASE_INFO_ID)),u=Ve.buildActionObject({caseID:l,containerItemID:e,context:r},this.c11nEnv),p=this.c11nEnv.getValue("isProcessAction","isProcessAction"),m=T.isCoexistenceAppOfType(d.APP_TYPE.UIKIT);u.isProcessAction=p;let f=T.getRenderingMode();if(c&&(i||m||f==="EMBED")&&!Kc(s)){let h=this.c11nEnv.getValue(d.getProperty(d.CASE_INFO.IS_FIRST_ASSIGNMENT)),E=jn(r);if(this.shouldDeleteCaseInCreateStage(E,h,m)){let C=!!G.isExternalObject(a);return this.deleteCaseInCreateStage(e,C)}v({type:o,payload:{...u,isModalAction:i,isChildCase:Rj(s),isInCreateStage:c}})}let{promise:g}=this.actionsApiPromise(o,u);return g.then(()=>{})}saveAssignment(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));let n=ji,o=this.getSaveActionPayload(e,!0),{promise:r}=this.actionsApiPromise(n,o);return vt.executeOrQueueDeferredAction(Gl(o)),r}saveAndClose(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));let n=ji,o=this.getSaveActionPayload(e),{promise:r}=this.actionsApiPromise(n,o);return v(Gl(o)),r}deleteCaseInCreateStage(e,n=!1){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));let o=Vy,r=e,i=r&&r.includes(d.MODAL),s=this.c11nEnv.getValue(d.getProperty(A.CASE_INFO.CASE_INFO_ID)),a=this.c11nEnv.getValue(d.getProperty(A.CASE_INFO.CASE_TYPE_ID)),c=Ve.buildActionObject({caseID:s,caseType:a,containerItemID:e,context:r,ignoreCaseDeletion:n},this.c11nEnv),l=this.c11nEnv.getValue("isProcessAction","isProcessAction"),u=this.c11nEnv.getValue(d.getProperty(A.CASE_INFO.PARENTCASEINFO));c.isProcessAction=l,c.parentCaseInfo=u,c.parentCases=this.c11nEnv.getValue(d.getProperty(A.CASE_INFO.PARENTCASES));let p=`${d.APP.APP}/${Ee.PRIMARY}`,m=rt(p,Ee.PRIMARY);c.parentContext=m,i&&(c.targetName=d.MODAL,c.containerName=Ee.MODAL,c.isModalAction=i),v(M8(c));let{promise:f}=this.actionsApiPromise(o,c);return f.then(()=>{Q_({caseID:s,context:this.c11nEnv.getContextName()})})}getRecents(e){if(!e)return Promise.reject(new Error("maxResultsToFetch is required parameter"));if(typeof e!="number")return Promise.reject(new TypeError("maxResultsToFetch must be number"));let{restApi:n}=Se.getRestEndPoint("getRecents")||{};n=`${n}?maxResultsToFetch=${e}`;let o=At.getServerURL()+n;return k(o,{method:"GET",headers:{}})}updateRecents(e,n,o,r){let{restApi:i}=Se.getRestEndPoint("updateRecents")||{},s=`${At.getServerURL()}${i}`;return k(s,{method:"PATCH",headers:{"Content-Type":"application/json"},body:{pyLabel:o,pyID:n,classID:e,ID:r}})}logout(){let{restApi:e}=Se.getRestEndPoint("Logout")||{},n=`${At.getServerURL()}${e}`;return k(n,{method:"GET",headers:{}}).then(o=>(Object.keys(be.rootNodes).forEach(r=>{Wy.cleanCaches(r)}),be.rootNodes={},sessionStorage.clear(),js(),Promise.resolve(o)))}invoke(e,n={}){let o={method:n.method||"GET",body:n.body};return k(e,o,this.c11nEnv.getContextName())}showCasePreview(e,n={}){this.loadView(e,O.getDefaultQualifiedName("pyCasePreview"),{container:Ee.PREVIEW,containerName:Ee.PREVIEW,context:A.APP.APP,...n})}showDataPreview(e,n,o){return e?typeof e!="string"?Promise.reject(new TypeError("dataContext must be string")):n?typeof n!="object"?Promise.reject(new TypeError("dataContextParameters must be an object")):this.showData(O.getDefaultQualifiedName("pyDataPreview"),e,n,{container:Ee.PREVIEW,containerName:Ee.PREVIEW,context:A.APP.APP,...o||{},skipSemanticUrl:!0}):Promise.reject(new Error("dataContextParameters is required parameter")):Promise.reject(new Error("dataContext is required parameter"))}loadView(e,n,o){let r=Ve.buildActionObject({caseId:e,viewName:n,caseClassName:this.c11nEnv.getValue(d.getProperty(A.CASE_INFO.CASE_TYPE_ID)),RemoteSystemID:ce.getRemoteHeaderByContext(this.c11nEnv.getContextName())},this.c11nEnv);o||(o={containerName:this.c11nEnv.getContainerName(),updateData:!1}),o&&typeof o=="object"?(Object.hasOwn(o,"container")&&!Object.hasOwn(o,"containerName")&&(o.containerName=o.container),r={...r,...o}):r={...r,containerName:this.c11nEnv.getContainerName()};let i=Ou,{promise:s}=this.actionsApiPromise(i,r,!1);return v({type:i,payload:{...r}}),s}showPage(e,n,o={containerName:"",skipSemanticUrl:""}){if(!e)return Promise.reject(new Error(this.MSG_PAGENAME_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_PAGENAME_STRING));if(!n)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if(typeof n!="string")return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(window.pms?.plugins?.c11n?.showPage)return window.pms.plugins.c11n.showPage(e,n,o);let r=Ve.buildActionObject({viewName:e,className:n},this.c11nEnv),i=Un,{promise:s}=this.actionsApiPromise(i,r);return en.getPreviewMode()&&(r.debugInfo={debugId:y.generateUniqueID()}),v({type:i,payload:{...r,...o,containerName:o.containerName||this.c11nEnv.getContainerName(),skipSemanticUrl:o.skipSemanticUrl}}),s}showInsight(e,n={}){if(!e)return Promise.reject(new Error(this.MSG_INSIGHTID_REQUIRED));let o=Ve.buildActionObject({},this.c11nEnv),r=fE,{promise:i}=this.actionsApiPromise(r,o);return v({type:r,payload:{...o,containerName:this.c11nEnv.getContainerName(),skipSemanticUrl:n.skipSemanticUrl||!1,insightID:e}}),i}showDashboard(e,n={}){if(!e)return Promise.reject(new Error(this.MSG_DASHBOARDID_REQUIRED));let o=Ve.buildActionObject({},this.c11nEnv),r=gE,{promise:i}=this.actionsApiPromise(r,o);return v({type:r,payload:{...o,containerName:this.c11nEnv.getContainerName(),skipSemanticUrl:n.skipSemanticUrl||!1,dashboardID:e}}),i}showData(e,n,o,r={containerName:"",skipSemanticUrl:!1}){if(!e)return Promise.reject(new Error(this.MSG_PAGENAME_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_PAGENAME_STRING));if(!n)return Promise.reject(new Error("dataContext is required parameter"));if(typeof n!="string")return Promise.reject(new TypeError("dataContext must be string"));let i=Ve.buildActionObject({pageName:e,dataContext:n,dataContextParameters:o,RemoteSystemID:ce.getRemoteHeaderByContext(this.c11nEnv.getContextName())},this.c11nEnv),s=aa;r?.containerName||(r.containerName=T.getRenderingMode()==="HYBRID"?sc.getRuntimeParam(d.HYRBID_ROOT_CONTAINERNAME):qt.getTargetViewContainerName(s));let{promise:a}=this.actionsApiPromise(s,i);return v({type:s,payload:{...i,...r,skipSemanticUrl:!!r.skipSemanticUrl}}),a}validateCoexistenceHarnessConfig(e){let{className:n,harnessName:o}=e??{};return n?typeof n!="string"?Promise.reject(new TypeError("className must be string")):o?typeof o!="string"?Promise.reject(new TypeError("harnessName must be string")):null:Promise.reject(new Error("harnessName is required parameter")):Promise.reject(new Error("className is required parameter"))}dispatchCoexistenceShowData(e,n,o){let r=Ve.buildActionObject({dataContext:e,...n},this.c11nEnv),i=aa;o?.containerName||(o.containerName=T.getRenderingMode()==="HYBRID"?sc.getRuntimeParam(d.HYRBID_ROOT_CONTAINERNAME):qt.getTargetViewContainerName(i));let{promise:s}=this.actionsApiPromise(i,r);return v({type:i,payload:{...r,...o,...n,skipSemanticUrl:!0}}),s}showCoexistenceCreateObject(e,n={}){return e?typeof e!="string"?Promise.reject(new TypeError("createClassName must be string")):this.dispatchCoexistenceShowData(e,{createClassName:e,isCoexistenceCreate:!0},n):Promise.reject(new Error("createClassName is required parameter"))}showCoexistenceLandingPage(e,n={}){let o=this.validateCoexistenceHarnessConfig(e);return o||this.dispatchCoexistenceShowData(e.className,{...e,isCoexistenceLanding:!0},n)}showCoexistenceHarness(e,n={}){let o=this.validateCoexistenceHarnessConfig(e);return o||this.dispatchCoexistenceShowData(e.className,{...e,isCoexistenceHarness:!0},n)}changeHandler(e,n){Ve.changeHandler(e,n)}eventHandler(e,n){Ve.eventHandler(e,n)}triggerFieldChange(e,n,o=!1,r={skipDirtyValidation:!1,skipPageInstructionGeneration:!1}){let i=this.c11nEnv.getContextName(),s=this.c11nEnv.getPageReference(),a=Q.getContextPath(s,e);o||this.c11nEnv.getValidationApi().validate(n),this.c11nEnv.isInsideList()&&!r.skipPageInstructionGeneration&&this.c11nEnv.getListActions().updateProperty(e,n,r);let c=this.c11nEnv.getValue(d.CLASS_ID),l=e?e.split(".").filter(u=>!!u):[];l.length>1&&(l.pop(),c=ie(`.${l.join(".")}.classID`,s,i)),e=y.trimDotForProperty(e),v({type:Fr,payload:{reference:a,value:n,context:i,pageReference:this.c11nEnv.getPageReference(),propertyName:e||this.c11nEnv.getComponentConfig().value,classID:c}})}updateFieldValue(e,n,o={}){let{removePropertyFromChangedList:r=!1,isArrayDeepMerge:i=!0,contextPageReference:s="",isListEntry:a=!1,skipDirtyValidation:c=!1,associatedProperty:l,skipPageInstructionGeneration:u=!1}=o,p=this.c11nEnv.getContextName(),m=this.c11nEnv.getPageReference(),f=s?.startsWith(m)?s.replace(m,""):s;m=s||m;let g=Q.getContextPath(m,e),h=!1;this.c11nEnv.isInsideList()&&!u&&this.c11nEnv.getListActions().updateProperty(f?`${f}${e}`:e,n,{isArrayDeepMerge:i,skipDirtyValidation:c}),this.c11nEnv.isBulkAction()&&(h=!0),e||(e=this.c11nEnv.getStateProps().value),ht({type:A.MESSAGES.MESSAGES_TYPE_ERROR,property:e,pageReference:m,context:p,isListEntry:a}),v({type:Pt,payload:{reference:g,value:n,context:p,isArrayDeepMerge:i,skipDirtyValidation:c,...h&&{isStrictTracking:h},...r&&{removePropertyFromChangedList:r},...l&&{associatedProperty:`${m}${l}`}}})}activateModalContainerItem(e){let n=CE,{context:o}=e,r=o&&o.includes(d.MODAL),i=Ve.buildActionObject({...e,containerName:this.c11nEnv.getContainerName(),containerItemID:o},this.c11nEnv);r&&(i.containerName=d.MODAL,i.isModalAction=r),v({type:n,payload:i});let{promise:s}=this.actionsApiPromise(n,i);return s}refreshCaseView(e,n,o,r={}){let{promise:i,actionMgrID:s}=this.actionsApiPromise("REFRESH_DATA"),{autoDetectRefresh:a,propertyName:c,preserveClientChanges:l,classID:u,context:p,optionalPayload:m,isArrayDeepMerge:f}=r,g={actionMgrID:s,caseViewAction:!0,preserveClientChanges:l,propertyName:c,classID:u,isArrayDeepMerge:f,optionalPayload:m};r.refreshFor&&(g.refreshFor=r?.refreshFor),r.resetForm&&(g.resetForm=r?.resetForm),r.skipPayloadGeneration&&(g.skipPayloadGeneration=r?.skipPayloadGeneration);let h=p||this.c11nEnv.getContextName(),E=this.c11nEnv.getPageReference(),C=this.c11nEnv.getValue(d.CONTEXT_DATA_MODAL_VIEW.CONTEXT_DATA_MODAL_VIEW),{isMultiRecordData:I,editType:_}=C||{};if(a&&I&&_===d.ACTION){let P=this.c11nEnv.getValue(A.CASE_INFO.ASSIGNMENT_ID),{actionID:N,interestPage:z,interestPageActionID:H,isLocalAction:ne}=C;cd(e,P,N,h,z,H,ne,I,_,g)}else!I&&a&&(vj(h,E)||Jc(h,E))?ld(h,o,g):rl(e,n,h,o,g);return i}refreshEmbeddedDataWithAction(e,n,o,r,i,s,a,c,l={}){let{promise:u}=this.actionsApiPromise(Kt.REFRESH_DATA),p=this.c11nEnv.getContextName();return cd(e,n,o,p,r||this.c11nEnv.getPageReference(),i,s,a,c,l),u}openEmbeddedDataModal(e,n,o,r,i,s,a,c,l=!1,u=A.MODAL){let p=ls,m=n.getCaseInfo().getKey(),{localAction:f,assignmentID:g,actionID:h}=Eme(n,a),E=n.getPageReference(),C=typeof r=="string"?`${n.getPageReference().replace(d.getProperty(A.CASE_INFO.CASE_INFO_CONTENT),"")}${o}.${r}`:`${n.getPageReference().replace(d.getProperty(A.CASE_INFO.CASE_INFO_CONTENT),"")}${o}[${r}]`;E.startsWith(A.OBJECT_INFO.OBJECT_INFO)&&!m&&(m=n.getCaseInfo().getObjectKey(),C=`${n.getPageReference().replace(A.OBJECT_INFO.OBJECT_INFO_CONTENT,"")}${o}[${r}]`);let I=n.getMetadata(),_=Array.isArray(I?.config?.children)?I.config.children[0]?.children||[]:[],P={readOnly:l,targetProperty:o,index:r,viewID:e,ID:m,actionType:i,interestPage:y.convertPageRefToClipboardPageNotation(C),heading:s,editType:a,interestPageActionID:a===d.ACTION?c:void 0,actionID:h,isLocalAction:f,operationFlag:d.EMBEDDED_DATA_MODAL.SHOW_ROW,isPageGroup:typeof r=="string",assignmentID:!f&&a===d.ACTION?g:void 0,columns:_},N=Ve.buildActionObject(P,this.c11nEnv);if(a===d.ACTION){let ne=y.getETag(N.context);N.headers={"If-Match":ne}}let{promise:z}=this.actionsApiPromise(p,N);return T.getFeatureMap().granularUIRefresh&&_.forEach(ne=>{let j=ge.trimAnnotation(ne.config.value),oe=ft(j.startsWith(".")?j.replace(".",""):j,ne.config.classID);oe&&!Array.isArray(oe)&&oe.isDeclarativeTarget&&be.addFieldNode(n.getContextName(),E+C,n.viewName??"",j,"",{isDeclarativeTarget:!0,propertyName:j,pageReference:E+C})}),v({type:p,payload:{...N,containerName:u,skipSemanticUrl:!0}}),z}getEmbeddedDataView(e,n,o,r,i,s="",a="",c=!1,l=""){let u=xE,p=n.getCaseInfo().getKey(),m=n.getValue(A.CASE_INFO.IS_LOCAL_ACTION),f=n.getValue(A.CASE_INFO.ASSIGNMENT_ID),g=X8(n,s,m),h=n.getPageReference(),E=typeof r=="string"?`${n.getPageReference().replace(d.getProperty(A.CASE_INFO.CASE_INFO_CONTENT),"")}${o}.${r}`:`${n.getPageReference().replace(d.getProperty(A.CASE_INFO.CASE_INFO_CONTENT),"")}${o}[${r}]`;h.startsWith(A.OBJECT_INFO.OBJECT_INFO)&&!p&&(p=n.getCaseInfo().getObjectKey(),E=`${n.getPageReference().replace(A.OBJECT_INFO.OBJECT_INFO_CONTENT,"")}${o}[${r}]`);let C={readOnly:c,targetProperty:o,index:r,viewID:e,ID:p,actionType:i,interestPage:y.convertPageRefToClipboardPageNotation(E),editType:s,interestPageActionID:s===d.ACTION?a:void 0,actionID:g,isLocalAction:m,operationFlag:d.EMBEDDED_DATA_MODAL.SHOW_ROW,isPageGroup:typeof r=="string",assignmentID:!m&&s===d.ACTION?f:void 0,containerName:l},I=Ve.buildActionObject(C,this.c11nEnv);if(s===d.ACTION){let P=y.getETag(I.context);I.headers={"If-Match":P}}let{promise:_}=this.actionsApiPromise(u,I);return v({type:u,payload:{...I,skipSemanticUrl:!0}}),_}submitEmbeddedDataModal(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));let n=DE,o=this.c11nEnv.getValue(d.getProperty(A.CASE_INFO.CASE_INFO_ID)),r=this.c11nEnv.getValue(d.getProperty(A.CASE_INFO.ASSIGNMENT_ID)),i=this.c11nEnv.getPageReference().replace(d.getProperty(A.CASE_INFO.CASE_INFO_CONTENT),""),s=de(e),a=this.c11nEnv.getValue(d.getProperty(d.CONTEXT_DATA_MODAL_VIEW.CONTEXT_DATA_MODAL_VIEW)),{interestPageActionID:c,editType:l,isLocalAction:u,actionID:p,viewName:m,parentContext:f}=a;i.startsWith(A.OBJECT_INFO.OBJECT_INFO)&&!o&&(o=this.c11nEnv.getValue(A.OBJECT_INFO.OBJECT_INFO_ID),i=this.c11nEnv.getPageReference().replace(A.OBJECT_INFO.OBJECT_INFO_CONTENT,"")),ht({context:s,stateObj:J(s),clearContextMessages:!0});let g={containerItemID:e,containerName:this.c11nEnv.getContainerName(),doDeleteCaseSummary:!0,isInCreateStage:!1,ID:o,viewID:m,isFormValid:Fn(s),interestPage:y.convertPageRefToClipboardPageNotation(i),parentContext:f,isModalAction:!1,target:this.c11nEnv.getTarget(),editType:l,actionID:p,operationFlag:d.EMBEDDED_DATA_MODAL.SUBMIT_ROW,interestPageActionID:c,isLocalAction:u,assignmentID:r};e&&e.includes(d.MODAL)&&(g.containerName=d.MODAL,g.isModalAction=!0);let h=Ve.buildActionObject(g,this.c11nEnv);if(l===d.ACTION){let C=y.getETag(h.context);h.headers={"If-Match":C}}let{promise:E}=this.actionsApiPromise(n,h);if(jn(s)){let[C,I,_]=ms.getPageListNameAndIndexFromPageName(this.c11nEnv.getPageReference());be.mutatePageList(f,C,I,{type:lo,rowIndex:_}),v({type:lo,payload:{pageReference:this.c11nEnv.getPageReference(),context:f,isListEntry:!0}})}return vt.executeOrQueueDeferredAction({type:n,payload:{...h,context:s}}),E}fillFormWithAI(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));let n=de(e),o=this.c11nEnv.getPageReference(),{promise:r,actionMgrID:i}=this.actionsApiPromise(zc);return ld(n,o,{actionMgrID:i,isFillFormWithAI:!0,preserveClientChanges:!1}),r}handleSubscript(e,n){if(!ac(A.VIEW_NAMES.SUBSCRIPT_CREATE_VIEW))return Promise.reject(new Error(this.MSG_SUBSCRIPT_VIEW_REQUIRED));let r=$E,i=Ve.buildActionObject({containerItemID:e},n);v({type:r,payload:{...i,isDataObject:!0,skipReleaseLockRequest:!0,isFormValid:Fn(e),context:e}});let{promise:s}=this.actionsApiPromise(r,i);return s}showSubscriptCreateView(e,n,o,r=A.VIEW_NAMES.SUBSCRIPT_CREATE_VIEW){let i=Ve.buildActionObject({viewName:r,className:e,referenceListStr:n,subscriptName:o},this.c11nEnv),s=Un,{promise:a}=this.actionsApiPromise(s,i);return v({type:s,payload:{...i,containerName:A.MODAL,skipSemanticUrl:!0,isCreateDataObject:!0}}),a}deleteWork(e,n,o){if(!e)return Promise.reject(new Error("workId is required parameter"));let r=rv,i=G.isExternalCaseType(n),s=Ve.buildActionObject({workId:e,caseTypeID:n,isExternalCase:i,...o?.skipDeleteConfirmation&&{skipDeleteConfirmation:!0},...o?.enableBackNavigation&&{enableBackNavigation:!0}},this.c11nEnv),{promise:a}=this.actionsApiPromise(r,s);return v(Tw({...s})),a}deleteDataRecord(e,n){if(!e)return Promise.reject(new Error("className is required parameter"));if(!n)return Promise.reject(new Error("keys is required parameter"));let o=rv,r=Ve.buildActionObject({className:e,keys:n},this.c11nEnv),{promise:i}=this.actionsApiPromise(o,r);return v(Tw({...r})),i}},eH=Qw;var Xw=class{c11nEnv;constructor(e){this.c11nEnv=e}getContextKey(){return this.c11nEnv.getValue(d.getProperty(d.DATA_INFO.DATA_INFO_CONTEXT_KEY))}},tH=Xw;var X_=class{fieldType;constructor(e){this.fieldType=e}applyFallback(e){let n=gr.getDefaultsforType(this.fieldType);e.currencyISOCode=e.currencyISOCode||n?.currencyISOCode||"USD"}};var eb=class{static getStrategy(e){switch(e){case"Currency":case"Decimal":case"Integer":case"Percentage":return new X_(e);default:return}}};var kr={DATAPAGE:"DATAPAGE",VIEW:"VIEW",FIELD:"FIELD",CASE:"CASE",PARAGRAPH:"PARAGRAPH",PORTAL:"PORTAL"};var nH=/[\\^$.*+?()[\]{}|]/g,Ame=RegExp(nH.source);function Cme(t){return t=aE(t),t&&Ame.test(t)?t.replace(nH,"\\$&"):t}var rH=Cme;var Ime=/\{(\d+)\}/,_me=t=>{let e=t.split(Ime),n=[],o=new Map,r="",i=0;return e.forEach((s,a)=>{if(a%2===0){r+=rH(s),i+=s.length;return}let c=Number(s),l=o.get(c);if(l!==void 0){r+=`\\${l}`;return}n.push(c),o.set(c,n.length),r+="(.+?)"}),{key:t,pattern:new RegExp(`^${r}$`),groupToPlaceholder:n,literalLength:i}},oH=(t,e)=>{if(!t)return;let n;for(let s of Object.keys(e)){let a=_me(s),c=a.pattern.exec(t);c&&(!n||a.literalLength>n.template.literalLength)&&(n={template:a,captures:c.slice(1)})}if(!n)return;let{template:o,captures:r}=n,i=[];return o.groupToPlaceholder.forEach((s,a)=>{i[s]=r[a]}),{message:e[o.key],args:i}};var Gi=(t,e,n,o)=>{let r=[kr.VIEW,kr.FIELD,kr.PARAGRAPH],s=[kr.DATAPAGE,kr.PARAGRAPH].includes(t)&&o?`#${o}`:"",a=t===kr.DATAPAGE?"@BASECLASS":n;return t===kr.DATAPAGE||r.includes(t)?`${a}!${t}!${e}${s}`.toUpperCase():`${t}!${e}${s}`.toUpperCase()},jp=class t{locale;localeReference;static COMMON_LABELS="COMMONLABELS";static MESSAGES="MESSAGES";static COMPONENT_FIELDS="COMPONENTFIELDS";static CASE_HISTORY="CASEHISTORY";lookupList=[];constructor(e,n){this.localeReference=n,this.locale=e}getLocalizedText(e,n){let o=[...this.localeReference?[this.localeReference.toUpperCase()]:[],...this.lookupList,t.COMPONENT_FIELDS,t.COMMON_LABELS],r=this.#t(e,o)||e;return(n?this.#e(r,n):r)||e}getLocalizedMessage(e,n){let o=this.#t(e,[t.MESSAGES,t.COMMON_LABELS])??e;return(n?this.#e(o,n):o)||e}getLocalizedDataPage(e,n,o,r){if(!n||!o||!e)return e;let s=[Gi(kr.DATAPAGE,n,void 0,o),t.COMMON_LABELS,...this.lookupList],a=this.#t(e,s)??e;return(r?this.#e(a,r):a)||e}getLocalizedCaseHistory(e){if(!e)return e;let n=Hi(this.locale).localeStore[t.CASE_HISTORY];if(!n||Object.keys(n).length===0)return e;let o=oH(e,n);if(!o?.message)return e;let r=o.args.map(i=>this.getLocalizedText(i));return this.#e(o.message,r,!0)}#e(e,n,o=!1){if(n.length===0)return e;let r=o?0:1;return e.replace(/\{(\d+)\}/g,(i,s)=>n[`${Number(s)-r}`]??i)}#t(e,n=this.lookupList){if(n.length===0)return;let o=Hi(this.locale);for(let r of n){let i=this.#n(e,o.localeStore[r]);if(i)return i}}#n(e,n={}){let o=n[e];if(typeof o=="string")return o}setLookupList(e){Array.isArray(e)&&(this.lookupList=e)}};var e0=class{_dataSourceMap;constructor(){this._dataSourceMap={}}hasContextName(e){return e in this._dataSourceMap}addContextName(e,n){n&&Object.keys(n).length>0?this._dataSourceMap[e]=n: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,n,o){if(this.hasContextName(e)){let r=this.getContextObjectByName(e);if(r)if(Array.isArray(o))r[n]=o;else{let i=r[n];r[n]=[...new Set([...i,o])]}}else{let r={};Array.isArray(o)?r[n]=o:r[n]=[o],this.addContextName(e,r)}}deletePropertyInContext(e,n){if(this.hasContextName(e)){let o=this.getContextObjectByName(e);o&&n in o&&delete o[n]}}getPropertyFromContext(e,n){if(this.hasContextName(e)){let o=this.getContextObjectByName(e);if(o&&n in o)return o[n]}return[]}getDependencies(e,n){let o=this.getPropertyFromContext(e,n),r=new Set(o);return o.forEach(i=>{r.add(i)}),[...r]}},lc=new e0;var n0={};tn(n0,{fetchViewResources:()=>Ky,refreshViewByName:()=>t0,updateViewResources:()=>tb});var tb=async t=>{let e=ze(t),n=y.getIn(e,d.COMPONENTS);hs(e,{},!0),await Do(n)},Ky=(t,e,n)=>Q.resolveView(t,e,n),iH=(t,e,n,o)=>{let r=t[e];if(!r)return!1;let i=y.getIn(r,A.CASE_INFO.CASE_INFO_CLASSID);return y.getIn(r,d.CASE_INFO.VIEW_NAME)===n&&(!o||i===o)},sH=t=>{let{accessedOrder:e,items:n}=t;if(!e||!n)return null;let o=e[e.length-1];return o?n[o]?.context??null:null},bme=(t,e)=>{let n=we();if(!n)return null;let o=n.getState(),{data:r,containers:i}=o;if(!i||!r)return null;let s=`${A.APP.APP}/primary`;if(i[s]){let a=sH(i[s]);if(a&&iH(r,a,t,e))return a}for(let a of Object.keys(i)){if(a===s)continue;let c=sH(i[a]);if(c&&iH(r,c,t,e))return c}return null},t0=(t,e="",n="")=>{let o=n||null;if(!o){let a=`${A.APP.APP}/primary`;o=bme(t,e),o||(o=Qt(a))}if(!o)return Promise.reject(new Error(`Unable to find an active context for view "${t}".`));let r=J(o);if(!r)return Promise.reject(new Error(`No data found for context "${o}".`));let i=y.getIn(r,A.CASE_INFO.CASE_INFO_ID)||"",s=ct({options:{context:o,pageReference:A.CASE_INFO.CASE_INFO_CONTENT}});return r0(),s.getPConnect().getActionsApi().refreshCaseView(i,t,"",{autoDetectRefresh:!0,preserveClientChanges:!1}).finally(()=>{o0()})};var i0=class{meta;datasource;options;index;datasourceObj;constructor(e,n,o){this.meta=e,this.datasource=n,this.index=0,this.options=o,this.datasourceObj=Q.getPropertyValue(n,o.pageReference,o.context)}hasNext(){return this.index<this.datasourceObj.length}next(){if(!this.hasNext())throw new Error("No Children");let e=Q.getContextPath(this.datasource,this.index);return this.index+=1,ct({meta:this.meta,options:{...this.options,pageReference:e}})}resetIndex(){this.index=0}},s0=i0;var a0=class{children;options;index;constructor(e,n){this.children=e,this.index=0,this.options=n}hasNext(){return this.index<this.children.length}next(){if(!this.hasNext())throw new Error("No Children");let e=this.index,n=this.children[e];this.index+=1;let o=n?._relativePath??`${this.options?.relativePath??""}.children[${e}]`;return ct({meta:n,index:this.index,options:{...this.options,relativePath:o}})}resetIndex(){this.index=0}},Tme=(t,e)=>{let n=!!t?.repeat;if(!!t?.["repeat-self"])return new s0(t,t.context||"",e);if(n){let r=uc(`${e.context}.${d.SUMMARY_OF_LISTS}`,t.pageReference,e.context);return new s0(t.children[0],r||t.context,e)}if(t?.children)return new a0(t.children,e)},aH=Tme;var ql=class{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,n){let o=[];if(e&&["portal","view"].includes(n)){let{accessedOrder:r,items:i}=e;if(r&&i){let s=r[r.length-1];i[s]&&i[s].view&&Object.keys(i[s].view).length>0&&o.push(i[s])}}return o}static getDependentProperties=e=>{let n=[];return e._rawConfig?.config?.parameters?n=Object.values(e._rawConfig?.config?.parameters||{}):e.getFieldMetadata(e.getStateProps()?.value)?.datasource?.parameters&&(n=(e.getFieldMetadata(e.getStateProps()?.value)?.datasource?.parameters||[]).map(o=>o?.value)),n.filter(o=>On.isProperty(o)).map(o=>On.getPropertyName(o))}},vme=new ql;Object.freeze(vme);var c0,nb=(t,e,n)=>{t&&(Object.keys(t).forEach(o=>{if(o!=="children"){let r=t[o],i=ge.trimAnnotation(r);if((typeof i=="string"||typeof r=="string")&&(y.isValidAnnotation(r)&&y.isPropertyRef(i)||r.startsWith("@W ")||r.startsWith("@DW ")||r.startsWith("@E ")||r.startsWith("@PARAGRAPH ")||r.startsWith("@ATTACHMENT ")))n&&n.parentKey&&(n.isObjHasValue=!0),r.startsWith("@PARAGRAPH ")?e[o]=r:e[o]=i;else if(Array.isArray(i))i.forEach((s,a)=>{let c={parentStateObj:e,parentKey:o,isObjHasValue:!!e[o]};e[o]=e[o]||[],e[o][a]=Object.create({}),nb(s,e[o][a],c)});else if(i&&typeof i=="object"&&i.type!=="exp"){let s={parentStateObj:e,parentKey:o,isObjHasValue:!!e[o]};e[o]=e[o]||{},nb(i,e[o],s)}}}),n&&!n.isObjHasValue&&delete n.parentStateObj[n.parentKey])},cH=(t,e)=>{t._inheritedProps=t._inheritedProps||[],t.inheritedProps=[...t._inheritedProps,...y.deepClone(e.inheritedProps)]},Na=class{useCustomContext;_rawConfig;_classID;index;_ruleClass;viewName;meta;_isRoot;options;_isExpressionExist;_isWhenExist;_isValidatorExist;_pageReference;_referenceContext;_contextName;_stateProps;_actions;_children;_additionalRegisteredProps;_caseInfo;_dataInfo;parentViewName;_referenceList;_isInsideList;_inheritedConfig;_localeRuleName;_containerTarget;_readOnly;_hasSuggestions;_isState;_type;_actionsApi;categoryName;_relativePath;_dpResolver;constructor(e){let{meta:n,isRoot:o,options:r={},useCustomContext:i}=e;this.meta=n,this._isRoot=o,this.options=r,this.useCustomContext=i,this._rawConfig=n?.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._dataInfo=null,this.viewName=r.viewName,this.parentViewName=r.viewName??"",this._referenceList=r.referenceList||"",this._isInsideList=r.isInsideList||!1,this._inheritedConfig={},this._localeRuleName=r.localeReference,this._containerTarget=r.target,this._readOnly=n?.config?.readOnly||r.readOnly,this._hasSuggestions=!1,this._actionsApi=null,this._classID=null,this.index=e.index,this.categoryName=r.categoryName||"",this._relativePath=r.relativePath??"",r.inheritedConfig&&Object.keys(r.inheritedConfig).length>0&&(this._inheritedConfig=y.deepClone(r.inheritedConfig)),n?.config?.inheritedProps&&cH(this._inheritedConfig,n?.config),this.meta?.config?.value&&typeof this.meta?.config?.value=="string"&&this.meta?.config?.value?.startsWith("@P ")&&this.meta?.config?.value?.includes("(")&&(this.meta.config.value=Ii.formatePageReferenceToArrayIndex(this.meta.config.value)),nb(this._rawConfig,this._stateProps),this._isState=!y.isObjectEmpty(this._stateProps),this._rawConfig&&this._rawConfig.config&&(this._isExpressionExist=y.isExpressionExist(this._rawConfig.config),this._isWhenExist=y.isWhenExist(this._rawConfig.config),this._isValidatorExist=Ft.isValidatorExist(this._rawConfig.config)),this._isRoot?this._contextName=A.APP.APP:this._contextName=this.meta?.config?.contextName||this.options.context||"",this._type=this.meta?.type;let s=this.options.pageReference;this.options.pageReference&&(s=ge.handleAnnotation(this.options.pageReference,this)),this._pageReference=Q.getContextPath(s||this.options.parentPageReference,this._pageReference),this._pageReference||(this._pageReference=""),this._type==="reference"&&(this._rawConfig=n);let a=this._type==="reference"&&y.isWhenExist({visibility:this.meta?.config?.visibility}),c=this._checkAndSetDecisionParagraph("instructions",this._rawConfig?.instructions),l=!1;if(this._type!=="reference"&&n&&(this._rawConfig=Q.resolveReference(n,this)),this._rawConfig){let u=this.getRawConfigProps();u&&(this._localeRuleName=ge.trimAnnotation(u.localeReference)||r.localeReference,this._isExpressionExist=y.isExpressionExist(u),this._isWhenExist=y.isWhenExist(u),this._isValidatorExist=Ft.isValidatorExist(u),l=this._checkAndSetDecisionParagraph("label",u?.label)),this._children=this._rawConfig.children,this._rawConfig?.type?.toLowerCase()===d.VIEW&&this._rawConfig.name&&(this.viewName=ge.handleAnnotation(this._rawConfig.name,this)),this.options.hasForm&&YF(this)}(a||c||l)&&$A(this.viewName,this._contextName,this._pageReference)}_checkAndSetDecisionParagraph(e,n,o){let r=!1;if(n&&n.startsWith(d.PARAGRAPH_ANNOTATION)){let i=ge.trimAnnotation(n);r=ko.isDecisionParagraph(i,o??this.getCurrentClassID()),r&&this.setStateProps({[e]:n})}return r}isDeclarativeTarget(){let e=!1;if(this.getValue(this._pageReference)||this._pageReference===""){let n=ge.trimAnnotation(this.getPropertyName());e=this.getFieldMetadata(n)?.isDeclarativeTarget||!1}return e}_getPropertyName(){let e=ge.trimAnnotation(this.getPropertyName());return this._pageReference===""&&e.startsWith(".")?e.substring(1,e.length):e}addFieldNode(){let e=this._getPropertyName(),{value:n,contextPage:o,label:r,required:i,readOnly:s,disabled:a,visibility:c,validationType:l,caption:u,allowMultiple:p,useRFC822Validation:m,displayAs:f}=this.getRawConfigProps();if(this.getValue(this._pageReference)||this._pageReference===""){let g=this._type==="Address"&&this._rawConfig?.config?.associatedView?ge.trimAnnotation(this._rawConfig.config.associatedView):"",h=r||u,E=this._rawConfig?.type,C={target:this._containerTarget,context:this._contextName,pageReference:this._pageReference,propertyName:ge.trimAnnotation(n),label:h?.startsWith("@")?ge.handleAnnotation(h,this,void 0):h,required:i,readOnly:s,disabled:a,visibility:c||this.options?.visibility,skipRequiredValidation:this.options?.isBulkAction,inheritedProps:this.getInheritedProps(),useCustomContext:this.useCustomContext,value:n,validationType:l,...o&&{contextPageRef:`${this._pageReference}${ge.trimAnnotation(o)}`},componentName:E,hasSuggestions:this._hasSuggestions,isInsideList:this.isInsideList(),index:this.index,allowMultiple:p,isDeclarativeTarget:this.isDeclarativeTarget(),...f&&{displayAs:f},...this._type==="Email"&&{useRFC822Validation:m}};be.addFieldNode(this._contextName,this._pageReference,(g||this.categoryName||this.viewName)??"",e,this.getValue(e),C)}}removeNode(){if(Object.hasOwn(this._rawConfig?.config??{},"value")&&this._type!=="Address")be.removeFieldNode(this._contextName,this._pageReference,this.viewName||"",ge.trimAnnotation(this.getPropertyName()),this.index);else if(this._type==="Address"&&this._rawConfig?.config?.associatedView)be.removeViewNode(this._contextName,this._pageReference,ge.trimAnnotation(this._rawConfig.config.associatedView),this.index);else{let e=this._rawConfig?.config?.context?`${this._pageReference}${this._rawConfig?.config.context}`:this._pageReference,o={visibility:this.options?.visibility??this._rawConfig?.config?.visibility??this._rawConfig?.config?.referenceVisibility};be.removeViewNode(this._contextName,e,this._rawConfig?.config?.name||this._rawConfig?.config?.id||"",this.index,o)}}addViewNode(){if(!this.isReadOnly()){if(this._rawConfig?.type?.toLowerCase()===d.VIEW&&this._rawConfig.name&&this.viewName){let n={visibility:this.options?.visibility??this._rawConfig.config?.visibility??this._rawConfig.config?.referenceVisibility};be.addViewNode(this._contextName,this._pageReference,this.viewName,this.parentViewName,n)}this._rawConfig?.type==="Group"&&this._rawConfig?.config?.id&&be.addViewNode(this._contextName,this._pageReference,this._rawConfig.config.id,this.parentViewName),this._rawConfig?.type==="Address"&&this._rawConfig?.config?.associatedView&&be.addViewNode(this._contextName,this._pageReference,ge.trimAnnotation(this._rawConfig.config.associatedView),this.parentViewName),this._rawConfig?.type?.toLowerCase()==="deferload"&&this._rawConfig.config?.name&&be.addViewNode(this._contextName,this._pageReference,this._rawConfig.config.name,this.parentViewName)}}addWhenNode(){let e="",n="",o=y.getWhenNames(this._rawConfig?.config),r=this.getRawConfigProps();if(r?.type&&r?.type?.toLowerCase()===d.VIEW)n=d.CONTEXT_TREE_NODE_TYPES.VIEW,e=this.getCurrentView();else{n=d.CONTEXT_TREE_NODE_TYPES.FIELD;let i=this.getPropertyName();e=ge.isProperty(i)?ge.trimAnnotation(i):""}e&&o.forEach(i=>{be.addWhenNode(this.getContextName(),this.getPageReference(),n,e,i,{pageReference:this.getPageReference(),context:this.getContextName()})})}updateContextTree(){if(this.isVisible()&&(this.addViewNode(),this._rawConfig?.config&&Object.hasOwn(this._rawConfig.config,"value")&&this._inheritedConfig.displayMode!=="DISPLAY_ONLY"&&this._rawConfig.config?.displayMode!=="DISPLAY_ONLY"&&this.addFieldNode(),(this._rawConfig?.type?.toLowerCase()!==d.VIEW||this._rawConfig.config?.renderMode==="Editable")&&this._rawConfig?.config?.referenceList&&this._rawConfig.config?.displayMode!=="DISPLAY_ONLY")){let{value:e,label:n,required:o,contextPage:r,readOnly:i,disabled:s,visibility:a,validationType:c,selectionMode:l,selectionList:u,selectionKey:p,referenceList:m,renderMode:f,caption:g,uniqueField:h}=this.getRawConfigProps(),E=n||g,C=[];["Multiselect","Checkbox"].includes(this._rawConfig.type)&&(C=this.getSelfReferencingDatapageKeys()),be.addPageListNode(this._contextName,this._pageReference,this.viewName??"",ge.trimAnnotation(this.getPropertyName()),{target:this._containerTarget,context:this._contextName,pageReference:this._pageReference,propertyName:ge.trimAnnotation(this.getPropertyName()),label:E?.startsWith("@")?ge.handleAnnotation(E,this,void 0):E,required:o,readOnly:i,disabled:s,...r&&{contextPageRef:`${this._pageReference}${ge.trimAnnotation(r)}`},visibility:a||this.options.visibility,skipRequiredValidation:this.options.isBulkAction,inheritedProps:this.getInheritedProps(),useCustomContext:this.useCustomContext,value:e,validationType:c,componentName:this._rawConfig.type,type:this._rawConfig.config?.type,hasSuggestions:this._hasSuggestions,isInsideList:this.isInsideList(),selectionMode:l,selectionList:u,renderMode:f,referenceList:m,selectionKey:p,index:this.index,uniqueField:h,selfReferencingDatapageKeys:["Multiselect","Checkbox"].includes(this._rawConfig.type)?C:void 0});let I=this.getValue(ge.trimAnnotation(this.getPropertyName()),this._pageReference)||[];be.updatePageListNode(this._contextName,this._pageReference,ge.trimAnnotation(this.getPropertyName()),I.length)}this.isWhenExist()&&this.addWhenNode(),this.isVisible()||this.removeNode()}getStateProps(){return this._stateProps}setStateProps(e){y.mergeDeep(e,this._stateProps)}getMetadata(){return this._rawConfig}getSharedDataPageForReferenceList(){let e=this.getCaseInfo().getClassName(),n=this.getCurrentView();if(!n||!e)return;let o=Ky(n,this,e);if(!o)return;let r=this.getRawMetadata()?.config?.referenceList;if(!r)return;let i={};typeof o.config?.parameters=="object"&&o.config.parameters!==null&&(i=o.config.parameters);let s=y.generateDataPageHashWithParameters(i,r,this),a=oi(),c=a?a[r]?.[s]:{};return Array.isArray(c?.[O.getDefaultQualifiedName("pxResults")])?c[O.getDefaultQualifiedName("pxResults")]:void 0}getParameterizedDataPageFieldValue(e,n){return this._dpResolver??=new DA(this),this._dpResolver.resolve(e,n)}getCaseInfo(){return this._caseInfo||(this._caseInfo=new AA(this)),this._caseInfo}getDataInfo(){return this._dataInfo||(this._dataInfo=new tH(this)),this._dataInfo}getCaseLocaleReference(e){let n=this.getRawConfigProps(),o=e||this.getValue(d.getProperty(d.CASE_INFO.CASE_TYPE_ID))||this.getValue(d.CLASS_ID,d.getProperty(d.DATA_INFO.DATA_INFO_CONTENT))||n?.referenceClass||n?.className;return o?Gi(kr.CASE,o):null}getListActions(){return Kz(this)}getReferenceList(){return this._referenceList}isInsideList(){return this._isInsideList||/\[\d+\]/g.test(this.getPageReference())||/\[\d+\]/g.test(this.getPropertyName())}getRawMetadata(){return this.getMetadata()}setReferenceList(e){this._referenceList=e}getComponentConfig(){return this.getMetadata()?.config||{}}isExpressionExist(){return this._isExpressionExist}isWhenExist(){return this._isWhenExist}isConditionExist(){return this.isExpressionExist()||this.isWhenExist()}isBoundToState(){return this._isState}getPageReference(){return this._pageReference}getPropertyName(){let e=this.getComponentConfig(),n;return e.selectionMode==="multi"?n="selectionList":e.selectionMode==="single"&&e.selectionKey?n="selectionKey":e.renderMode==="Editable"?n="referenceList":this._type==="Address"?n="addressProp":n="value",this.getComponentConfig()[n]}getFullReference(){let e=this.getPageReference(),n=this.getPropertyName();return Q.getContextPath(e,n)}getContextName(){return this._contextName}getContainerName(){let{type:e}=this.getMetadata()||{},n=[d.CONTAINERS.ROOT_CONTAINER,d.CONTAINERS.VIEW_CONTAINER,d.CONTAINERS.FLOW_CONTAINER,d.CONTAINERS.MODAL_VIEW_CONTAINER,d.CONTAINERS.PREVIEW_VIEW_CONTAINER,d.CONTAINERS.HYBRID_VIEW_CONTAINER],{acTargetName:o=Ee.PRIMARY,name:r,routingInfo:i}=this.getComponentConfig();return(e&&n.includes(e)||i==="@ROUTING_INFO")&&r?r:this.options.containerName||o}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){let n=Ie?.getStore()?.getState()?.data[`${this.getContextName()}/${d.SUGGESTION}`],o=this.getStateProps()?.value,r=Q.getContextPath(this.getPageReference(),o),i=n?wn.getSuggestionsContext(this.getContextName()).getField(r):void 0;this._hasSuggestions=!!i,e.hasSuggestions=this._hasSuggestions,this._stateProps.hasSuggestions=this._hasSuggestions}}getConfigProps(e={}){let n={...gr.getDefaultsforType(this._type),readOnly:this._readOnly,...this._rawConfig?.config,...this._additionalRegisteredProps,...this._inheritedConfig};return eb.getStrategy(this._type)?.applyFallback(n),this.populateSuggestionProps(n),this.resolveConfigProps(n,e),y.resolveStringBooleans(e)}getLocalizationService(e){let n=this.getComponentName(),o=e||(n==="View"?this._rawConfig?.config?.template:n),r=T.getLocale()??"en-US",i=new jp(r,o),s=this.getCaseLocaleReference();return i.setLookupList(["APP!APPLICATION"]),s&&i.setLookupList([s]),i}getRawConfigProps(){let{_deepProps:e,...n}={...gr.getDefaultsforType(this._type),...this._rawConfig?.config,...this._additionalRegisteredProps,...this._inheritedConfig};return this.populateSuggestionProps(n),n}resolveConfigProps(e,n={}){return e&&(Q.resolveProps(e,n,this),ge.handleComponentMapping(n,{type:this.getComponentName()||"",config:e},this)),n}registerAdditionalProps(e={}){return Object.assign(this._additionalRegisteredProps,e),nb(e,this._stateProps),this.resolveConfigProps(this._additionalRegisteredProps)}deRegisterAdditionalProps(e=[]){return e.forEach(n=>{delete this._additionalRegisteredProps[n]}),!0}populateAdditionalProps(e){let n=a=>a?.map(c=>({...c,message:this.getLocalizationService()?.getLocalizedMessage(c.message)??c.message})),o=this.getComponentName(),r=this.getComponentConfig(),i=o===d.ROOT_CONTAINER&&e.renderingMode!=="portal";if(o===d.MODAL_VIEW_CONTAINER||o===d.CASE_CREATE_STAGE||o===d.OBJECTACTIONCONTAINER){let a=se(`${d.APP.APP}/${this.getContainerName()}`),c=Xt({context:a,category:A.PAGE});e.pageMessages=n(c),this._stateProps.pageMessages=e.pageMessages}if(this.isEditable()){let{value:a}=this.getStateProps();a===void 0&&this.getComponentConfig()?.selectionMode==="multi"?a=this.getStateProps().selectionList||ge.trimAnnotation(this.getRawConfigProps().selectionList):!a&&this.getComponentConfig()?.renderMode==="Editable"&&this.getStateProps().referenceList&&(a=this.getStateProps().referenceList);let c=Xt({property:a,pageReference:this.getPageReference(),context:this.getContextName(),type:A.MESSAGES.MESSAGES_TYPE_ERROR}),l=Xt({property:a,pageReference:this.getPageReference(),context:this.getContextName(),type:A.MESSAGES.MESSAGES_TYPE_INFO});c&&c[0]&&(e.validatemessage=c.map(p=>this.getLocalizationService().getLocalizedMessage(p.message).replace(/\.$/,"")).join(". ")+(c[c.length-1].message.endsWith(".")?".":""),e.status=d.FIELD_LEVEL_ERROR,this._stateProps.validatemessage=e.validatemessage,this._stateProps.status=e.status,c?.find(p=>p.type==="error"&&p.subType==="required")&&!e.required&&this.isVisible()&&this.clearErrorMessages({property:a,subType:"required"})),l&&l[0]&&(e.infoMessage=l[0].message,e.status=d.FIELD_LEVEL_WARNING,this._stateProps.infoMessage=e.infoMessage,this._stateProps.status=e.status)}if(o===d.ROOT_CONTAINER){let a=rP(i,se(`${d.APP.APP}/${this.getContainerName()}`));e.httpMessages=Array.isArray(a)?n(a):a,this._stateProps.httpMessages=e.httpMessages;let c=wn.getSharedState("isLoggedOut");e.isLoggedOut=c,this._stateProps.isLoggedOut=c;let l=Xt({context:d.APP.ROOT,category:"PAGE"});e.pageMessages=n(l),this._stateProps.pageMessages=e.pageMessages}if(o===d.HYBRID_VIEW_CONTAINER){let a=Xt({context:d.APP.APP,category:d.HTTP});e.httpMessages=n(a),this._stateProps.httpMessages=a}if(o===d.APP_SHELL&&e.portalDocMode===d.CONTAINER_TYPE.MULTIPLE&&(e.activeCases=Nr.getOpenedCaseItems(`${A.APP.APP}/${d.PRIMARY}`),this._stateProps.activeCases=e.activeCases),o===d.APP_SHELL){let a=d.APP.APP,c=se(`${a}/${this.getContainerName()}`),l=[...Xt({context:a,category:"PAGE"})||[],...Xt({context:c,category:"PAGE"})||[]],u=l.length>0?l:void 0;e.pageMessages=u&&n(u),this._stateProps.pageMessages=e.pageMessages}if(e.value&&o===d.SCALARLIST&&(this._stateProps.value=e.value),o===d.APP_SHELL||o===d.MODAL_VIEW_CONTAINER||o===d.CASE_CREATE_STAGE||r.template===d.CASE_PREVIEW||r.template===d.RULE_PREVIEW){let a=Xt({context:d.APP.APP,category:"HTTP"}),c=T.getRenderingMode()==="HYBRID"?`${this.getContextName()}/${this.getContainerName()}`:`${d.APP.APP}/${this.getContainerName()}`,l=Xt({context:se(c),category:"HTTP"});a?l&&(a=a.concat(Xt({context:se(c),category:"HTTP"}))):a=Xt({context:se(c),category:"HTTP"}),e.httpMessages=a&&a.map(u=>this.getLocalizationService().getLocalizedMessage(u.message)),this._stateProps.httpMessages=e.httpMessages,a?.forEach(u=>{u.errorDetails&&(e.errorDetails=e.errorDetails?e.errorDetails.push(...u.errorDetails):u.errorDetails,this._stateProps.errorDetails=e.errorDetails),u.correlationID&&(e.correlationID=u.correlationID)})}if(o===d.VIEW_CONTAINER||o===d.FLOW_CONTAINER||o===d.MODAL_VIEW_CONTAINER||o===d.PREVIEW_VIEW_CONTAINER||o===d.ROOT_CONTAINER||o===d.OBJECTACTIONCONTAINER){if(e.routingInfo=mf(this.getContainerName(),this._contextName),o===d.ROOT_CONTAINER&&(e.rootConfig=ql.getItemView(e.routingInfo,e.renderingMode),this._stateProps.rootConfig=e.rootConfig),this._stateProps.routingInfo=e.routingInfo,o===d.FLOW_CONTAINER||o===d.OBJECTACTIONCONTAINER){let a=Xt({context:this.getContextName(),category:d.CASEMESSAGES}),c=this.getContextName();e.caseMessages=a,this._stateProps.caseMessages=e.caseMessages,e.caseViewMode=this.getValue("context_data.caseViewMode"),this._stateProps.caseViewMode=e.caseViewMode;let l=Ke(c)[0];if(l){let u=se(l),p=Ie?.getStore()?.getState()?.data;p&&u&&(e.lastUpdateTime=p[u]?.caseInfo?.lastUpdateTime,this._stateProps.lastUpdateTime=p[u]?.caseInfo?.lastUpdateTime);let m=Xt({context:u,category:A.PAGE}),f=Xt({context:u,category:"HTTP"});e.httpMessages=n(f),e.pageMessages=n(m),this._stateProps.pageMessages=e.pageMessages,this._stateProps.httpMessages=e.httpMessages,f?.forEach(g=>{g.errorDetails&&(e.errorDetails=e.errorDetails?e.errorDetails.push(...g.errorDetails):g.errorDetails,this._stateProps.errorDetails=e.errorDetails),g.correlationID&&(e.correlationID=g.correlationID)})}}if(e.loadingInfo=this.getLoadingStatus(this.getContextName()),e.isAppOffline=J(d.APP.APP).context_data?.isOffline,e.assignmentNames=this.getCaseInfo().getAssignments()?.map(a=>a.name),e.childAssignmentNames=this.getCaseInfo().getChildAssignments()?.map(a=>a.name),o===d.MODAL_VIEW_CONTAINER){let a=e.routingInfo?.accessedOrder||[],c=a[a.length-1];c&&(e.loadingInfo=this.getLoadingStatus(c))}this._stateProps.loadingInfo=e.loadingInfo,this._stateProps.isAppOffline=e.isAppOffline,this._stateProps.assignmentNames=e.assignmentNames,this._stateProps.childAssignmentNames=e.childAssignmentNames}else r.template===d.CASE_VIEW||r.template===d.RULE_VIEW||r.template===d.SELF_SERVICE_CASE_VIEW||r.template===d.CASE_PREVIEW||r.template===d.RULE_PREVIEW||r.template===d.OBJECT_PAGE?(e.caseInfo=this.getCaseSummary(),this._stateProps.caseInfo=e.caseInfo):o===d.CASE_STAGES&&(e.stages=this.getCaseStages(),e.stageID=this.getStageID(),this._stateProps.stages=e.stages,this._stateProps.stageID=e.stageID);this.getInheritedProps()?.shouldAutoRefresh&&this.meta?.config?.value?.includes("@P")&&this.meta.config._autoRefresh_===void 0&&(this.meta.config._autoRefresh_=`@REFRESH ${this.meta.config?.value.split("@P ")[1]}`),this.populateFieldMetadata(e),this.doesContextExist()&&this.updateContextTree()}populateFieldMetadata(e){let{value:n,datasource:o,listType:r}=this.getComponentConfig(),{propertyValue:i,propertyAnnotation:s}=this.getPropertyDetails(r,o,n);if(i&&typeof i=="string"&&(i.includes(s)||i.includes(d.ATTACHMENT_ANNOTATION))){let a=ge.getPropertyName(i),c=this.getFieldMetadata(a);c&&this.updateConfigData(e,c,a)}}resolvePropertyMetadata(e,n){if(!e)return e;let o=l0(`${this._pageReference}.${n}`,this._contextName);if(!Array.isArray(e)){let{additionalInformation:r,classID:i}=e;this._checkAndSetDecisionParagraph("additionalInformation",r??void 0,i)?this._additionalRegisteredProps.additionalInformation=r:r&&this.setStateProps({additionalInformation:o}),e.additionalInformation=o;let{inputFormat:a}=e;if(typeof a=="string"&&a.startsWith("@")){let c=ge.handleAnnotation(a,this);typeof c=="object"&&c!==null&&"pattern"in c&&typeof c.pattern=="string"?e.inputFormat={pattern:c.pattern}:e.inputFormat=null}}return e}getFieldMetadata(e){if(!e)return null;let n=e.split(".");if(n.length<2){let s=this.getValue(d.CLASS_ID);return!s&&this._rawConfig&&this._rawConfig.config&&this._rawConfig.config.ruleClass&&(s=this._rawConfig.config.ruleClass),this.resolvePropertyMetadata(ft(e,s),e)}let o=n.pop(),r=n.join(".")?".":"",i=this.getValue(`${r}${n.join(".")}${d.CLASS_ID}`);return i||(i=y.resolvePageClass(e,this.getCurrentClassID())),this.resolvePropertyMetadata(ft(o,i),e)}getCurrentPageFieldMetadata(e=null){let n=this.getPageReference().split(".");e!==null&&(n=e.split("."));let o=n.pop();return this.resolvePropertyMetadata(ft(o,this.getValue(`${n.join(".")}${d.CLASS_ID}`)))}getCurrentClassID(){return this._classID??this.getValue(d.CLASS_ID)}getCaseSummary(){let e={...this.getDataObject()[d.getProperty(A.CASE_INFO.CASE_INFO)]};return e.CaseID=e.CaseID||this.getValue(d.getProperty(A.CASE_INFO.CASE_INFO_PZINSKEY)),{...e,isCaseWideAction:()=>Jc(this.getContextName(),this.getPageReference())}}getReferencedUser(e){let n=this.getValue("referencedUsers");if(Array.isArray(n)){let o=n.find(r=>r.UserID===e);if(o)return{userId:o.UserID,UserName:o.UserName}}return n&&n[e]?n[e]:null}getCaseStages(){return this.getDataObject()[A.CASE_INFO.CASE_INFO].stages}getStageID(){return this.getDataObject()[A.CASE_INFO.CASE_INFO].stageID}getActions(){return this._actions}isRoot(){return this._isRoot}getRelativePath(){return this._relativePath}resolveContextProps(e){let{value:n}=this.getStateProps();n&&(e.error=this.getContextDataValue(`${this.getPageReference()+n}.error`),e.validatemessage=this.getContextDataValue(`${this.getPageReference()+n}.validatemessage`))}isValidatorExist(){return!!this._isValidatorExist}getValidationApi(){return new O8(this)}isEditable(){return!!(this._rawConfig&&this._rawConfig.config&&!(this._inheritedConfig&&this._inheritedConfig.readOnly)&&(Object.hasOwn(this._rawConfig.config,"value")||this._rawConfig.config.selectionList||this._rawConfig.config.renderMode==="Editable"&&this._rawConfig.config.referenceList)&&!(typeof this._rawConfig.config?.value=="string"&&this._rawConfig.config.value.includes("@FILTERED_LIST"))&&!(Object.hasOwn(this._rawConfig.config,"readOnly")&&(this._rawConfig.config.readOnly==="true"||this._rawConfig.config.readOnly===!0))&&!(Object.hasOwn(this._rawConfig.config,"disabled")&&this._rawConfig.config.disabled===!0))}isVisible(){return this._rawConfig?.config&&Object.hasOwn(this._rawConfig?.config,"visibility")&&typeof this._rawConfig?.config?.visibility=="string"?ge.handleAnnotation(this._rawConfig?.config?.visibility,this):typeof this.options?.visibility=="string"?ge.handleAnnotation(this.options?.visibility,this):!0}isReadOnly(){return this._readOnly===void 0?!1:this._readOnly==="true"||this._readOnly===!0?!0:typeof this._readOnly=="string"?ge.handleAnnotation(this._readOnly,this)===!0:!1}hasChildren(){return!!this._children}getComputedVisibility(e=[]){let n=this._type==="reference"&&!!this.getReferencedView(),o=n?this.getReferencedViewPConnect().getPConnect():this,r=e;if(n){let u=`${this.getRawMetadata()?.config?.name}!${this._ruleClass}`;if(e.includes(u))return!1;r=[...e,u]}if(this.getConfigProps().visibility===!1)return!1;if(o.getConfigProps().requiresVisibleChildren===!1||this.getConfigProps().requiresVisibleChildren===!1)return!0;let i=o.getConfigProps(),s={includeTypes:["Group","Region","View"],excludeTemplates:["ListView","SimpleTable","StudioTable"]},a=o._type&&s.includeTypes.includes(o._type)&&!s.excludeTemplates.includes(i.template);if(i.highlightedData&&i.highlightedData.length&&i.showHighlightedData&&(a=!1),!a)return!0;let l=o.getChildren();return l?l.some(u=>u.getPConnect().getComputedVisibility(r)):!1}getChildrenIterator(){return this._children.setContext(this.getPageReference()),this._children}setAction(e,n){this._actions[e]=n}getComponentName(){return this._rawConfig&&this._rawConfig.type}isComponentRefreshable(){return!!(this._rawConfig&&this._rawConfig.isRefreshable)}getDataObject(e){return J(e||this.getContextName())}getImagePath(e){return`${We.getConstellationServiceUrl()}/v860/${We.getAppAlias()}/image/${e}?org=${Se.getOrganizationName()}`}skipRequiredValidation(){return this.options.isBulkAction}isBulkAction(){return this.options.isBulkAction}getChildren(){if(this._children&&this._children.length){let e=this.options?.inheritedProps?.find(r=>r?.prop==="shouldAutoRefresh");e&&(this._inheritedConfig._inheritedProps=[...this._inheritedConfig._inheritedProps||[],e]);let n=aH(this._rawConfig,{pageReference:this._pageReference,context:this._contextName,localeReference:this._localeRuleName,hasForm:this.options.hasForm,isBulkAction:this.options.isBulkAction,containerName:this.getContainerName(),containerItemName:this.options.containerItemName,viewName:this.viewName,inheritedConfig:this._inheritedConfig,target:this._containerTarget,readOnly:this._readOnly,categoryName:this._type==="Group"?this._rawConfig?.config?.id:null,relativePath:this._relativePath}),o=[];for(;n?.hasNext();){let r=n.next();(!this.isBulkAction()||!this.#n(r))&&o.push(r)}return n?.resetIndex(),o}return[]}setInheritedProp(e,n,o=!1){this._inheritedConfig[e]=n;let r=Object.hasOwn(this._inheritedConfig._deepProps??{},e);(o||r)&&(this._inheritedConfig._deepProps={...this._inheritedConfig._deepProps,[e]:n})}getDeepInheritedProps(){return{...this._inheritedConfig?._deepProps}}getDeepInheritedConfig(){let e=this.getDeepInheritedProps();return Object.keys(e).length>0?{...e,_deepProps:e}:void 0}#e(e){let n=this.getDeepInheritedConfig();return n?{...e,inheritedConfig:{...e.inheritedConfig,...n}}:e}getLocaleRuleName(){return this._localeRuleName}getLocalizedValue(e,n,o){let r=o||this.getLocaleRuleName(),i=r&&n?`${r}#${n}`:r,s=this.getLocalizationService(i).getLocalizedText(e);return s===e?this.getLocalizationService().getLocalizedText(e):s}getLocaleRuleNameFromKeys(e,n,o){return`${e}!${n}!${o}`}getValue(e,n){if(e=e?.replace(/\((\d+)\)/g,(i,s)=>`[${parseInt(s,10)-1}]`),this.useCustomContext)return e=e.startsWith?.(".")?e.substring(1):e,e.split?.(".").reduce((i,s)=>i?.[s]??void 0,this.useCustomContext);let o=n||this.getPageReference(),r=e?.match(/^(Parent(?:\.Parent)*)(?:\.(.*))?$/);if(r){let i=r[1].split(".").length,s=r[2]||"",a=o?.split(".")||[];o=a.slice(0,Math.max(a.length-i,0)).join("."),s?e=`.${s}`:(e=o,o="")}return this._hasSuggestions&&this.getStateProps()?.value===e?Q.getPropertyValue(e,o,`${this._contextName}/${d.SUGGESTION}`):Q.getPropertyValue(e,o,this._contextName)}setInheritedConfig(e){if(!e)return;let{readOnly:n,displayMode:o,referenceType:r,hideLabel:i}=e;i&&(this._inheritedConfig.hideLabel=i),r&&(this._inheritedConfig.referenceType=r),o&&(this._inheritedConfig.displayMode=o),(this._inheritedConfig.readOnly||n)&&(this._inheritedConfig.readOnly=n),e.inheritedProps&&(e.inheritedProps?.forEach(s=>{s.prop==="required"&&(this._inheritedConfig[s.prop]=s.value)}),cH(this._inheritedConfig,e))}getInheritedProps(){let e={},n={};return this._inheritedConfig.inheritedProps?.forEach(o=>{n[o.prop]=o.value}),Q.resolveProps(n,e,this),e}setValue(e,n,o,r=!1,i={}){if(!y.isValidPropertyReference(e))return;let s,a,{isArrayDeepMerge:c}=i;this.isInsideList()&&this.getListActions().updateProperty(e,n),this.isBulkAction()&&(s=!0,n||(a=!0)),v({type:"SET_PROPERTY",payload:{reference:Q.getContextPath(this.getPageReference(),e),value:n,initialValue:o,isImplicit:r,context:this.getContextName(),...c!==void 0&&{isArrayDeepMerge:c},...s&&{isStrictTracking:s},...a&&{removePropertyFromChangedList:a}}})}updateDirtyCheckChangeList(e,n){let o={reference:`${this.getPageReference()}${e}`,value:n,context:this.getContextName()};uH(o)}getContextDataValue(e,n){return Ss(n||this.getPageReference(),e,this._contextName)}updateState(e){let n=this._pageReference.indexOf(d.CASE_INFO.CASE_INFO_CONTENT),o=this._pageReference.indexOf("."),r=d.CASE_INFO.CASE_INFO_CONTENT;n!==0&&(r=o>0?this._pageReference.substring(o):this._pageReference),v(Ne({context:this._contextName,data:e,rootPageReference:r}))}replaceState(e,n,o={}){if(!y.isValidPropertyReference(e))return;let{skipDirtyValidation:r=!1}=o;v({type:"REPLACE_PROPERTY",payload:{reference:Q.getContextPath(this.getPageReference(),e),value:n,context:this.getContextName(),skipDirtyValidation:r}})}reportError(e,n,o){v(bs(e,n||{},o,n?.formFields))}getComponent(){return c0({getPConnect:()=>this})}createComponent(e,n,o,r){let i=this._pageReference;if(n){let s=uc(`${this.getPageReference()}.${d.SUMMARY_OF_LISTS}`,n,this._contextName);i=Q.getContextPath(s||n,o)||n}else if(r&&r.pageReference){let s=r.pageReference;s=ge.handleAnnotation(s,this),i=Q.getContextPath(this._pageReference,s)||""}return c0(ct({meta:e,index:this.index,options:this.#e({containerName:this.getContainerName(),hasForm:this.options.hasForm,...e.options,pageReference:i,context:this._contextName,target:this._containerTarget,readOnly:this._readOnly||this._inheritedConfig?.readOnly,viewName:this.viewName}),useCustomContext:this.useCustomContext}),r)}getReferencedView(){if(this.meta)return Q.resolveReference(this.resolveConfigProps(this.meta),this)}_resolvePageRef(e){return this.getPageReference().includes(e)||e.startsWith(d.CLASS_ANNOTATION)?this.getPageReference():`${this.getPageReference()}${e}`}getReferencedViewPConnect(e=!1){let n={...this.getComponentConfig()},o=this.options?.inheritedConfig?._inheritedProps?.find(r=>r.prop==="shouldAutoRefresh");return o&&!n?.inheritedProps?.some(r=>r.prop==="shouldAutoRefresh")&&n?.inheritedProps?.push(o),delete n?.name,delete n?.type,ct({meta:this.getReferencedView(),options:this.#e({...e?this.options:void 0,...n,context:this.getContextName(),pageReference:n.context?this._resolvePageRef(n.context):this.getPageReference(),viewName:this.viewName})})}getContainerManager(){return new kp(this)}getActionsApi(){return this._actionsApi||(this._actionsApi=new eH(this)),this._actionsApi}getActionManager(){return M}doesContextExist(e){return Up(e??this.getContextName())}getGoogleMapsAPIKey(){return At.getGoogleMapsAPIKey()}getServerURL(){return At.getServerURL()}getLoadingStatus(e){let n=null;return e?(n=J(e),n=n?n.context_data:null):n=this.getDataObject().context_data,n&&n.isLoading?n.isLoading:!1}clearErrorMessages(e){e?.property?ht({type:"error",property:e.property,pageReference:this.getPageReference(),context:this.getContextName(),...e.subType&&{subType:e.subType}}):e?.context?ht({type:"error",...e}):(ht({type:"error",...e,context:d.APP.APP}),ht({type:"error",...e,context:se(`${d.APP.APP}/${this.getContainerName()}`)}))}resolveDatasourceReference(e){return uc(`${this.getPageReference()}.${d.SUMMARY_OF_LISTS}`,e,this.getContextName())||e}removeFormField(){}addFormField(){}setPageValue(e,n,o){delete e?.classID,this.replaceState(n,e),o?qz(e,n,this):NV(this.getContextName(),`${this.getPageReference()}${n}`,this.getStateProps()?.value??"")}acceptSuggestion(e){if(this.getStateProps()?.value&&this.options.hasForm&&this._hasSuggestions){let n=wn.getSuggestionsContext(this.getContextName()),o=this.getStateProps()?.value||e,r=Q.getContextPath(this.getPageReference(),o),i=n.getField(r);this._hasSuggestions=!1,this.getActionsApi().updateFieldValue(o,i),this.getActionsApi().triggerFieldChange(o,i),n.removeField(r,{actionPerformed:"accepted"})}}ignoreSuggestion(e){if(this.getStateProps()?.value&&this.options.hasForm&&this._hasSuggestions){let n=this.getStateProps()?.value||e,o=Q.getContextPath(this.getPageReference(),n);this._hasSuggestions=!1,wn.getSuggestionsContext(this.getContextName()).removeField(o,{actionPerformed:"ignored"}),lc.getDependencies(this._contextName,o)?.forEach(i=>{wn.getSuggestionsContext(this.getContextName()).removeField(i,{actionPerformed:"ignored"})})}}getSelfReferencingDatapageKeys(){let e=[],n=this.getPropertyName(),o=this.getFieldMetadata(n),{datasource:{parameters:r={}}={}}=o||{};return Object.values(r).forEach(i=>{let[,s]=i.split("."),a=n?.split(".").pop();s===a&&e.push(i.substring(i.lastIndexOf(".")+1))}),e}isReadOnlyField(){let{value:e,datasource:n,listType:o}=this.getComponentConfig(),{propertyValue:r,propertyAnnotation:i}=this.getPropertyDetails(o,n,e);if(!r||typeof r!="string"||!(r.includes(i)||r.includes(d.ATTACHMENT_ANNOTATION)))return!1;let s=ge.getPropertyName(r),a=this.getFieldMetadata(s);if(!a)return!1;let c={...this.getComponentConfig(),fieldMetadata:a,template:this._rawConfig?.config?.template};return this.#t(c,s)}#t(e,n){let o=On.isPropertyInternal(n),r=e.datasource,i=this.getComponentConfig().isSearchField,{isClassKey:s,isSpecial:a,isDeclarativeTarget:c}=e.fieldMetadata??{},l=e.template==="DataReference"||this.meta?.type==="ObjectReference",u=e.listType!==d.ASSOCIATED;return i?!1:!!(c||o||!r&&(s&&!l||a)&&u)}getPropertyDetails(e,n,o){return e===d.ASSOCIATED?{propertyValue:n,propertyAnnotation:d.ASSOCIATED_PROPERTY_ANNOTATION}:{propertyValue:o,propertyAnnotation:d.PROPERTY_ANNOTATION}}updateConfigData(e,n,o){e.fieldMetadata=n,n.additionalInformation&&(e.additionalInformation=n?.additionalInformation),n.inputFormat&&typeof n.inputFormat!="string"&&(e.inputFormat=n.inputFormat),this.#t(e,o)&&(e.readOnly=!0,this._stateProps.readOnly=e.readOnly,e.fieldMetadata.isDeclarativeTarget&&this.registerAdditionalProps({readOnly:!0})),e.fieldMetadata?.isReadOnly&&(e.readOnly=!0,this.registerAdditionalProps({readOnly:!0}))}#n(e){let n=e.getPConnect().getComponentName(),o=e.getPConnect().getConfigProps().template;return!(ql.allowedComponetsForBulkProcessing[n]===!0||ql.allowedComponetsForBulkProcessing[n]?.[o]===!0)}};function ct(t){let e=new Na(t);return{getPConnect:()=>e}}function lH(t){c0=t}var u0=class t{_grammar;_state;_tree;_exprStr;_endState;_subParser;_position;constructor(e,n,o){this._grammar=e,this._state="expectOperand",this._exprStr=n||"",this._endState=o||{},this._subParser=null}static _setParent(e,n){Object.defineProperty(e,"_parent",{value:n,writable:!0})}_addToken(e){let n=rb[this._state],o=this._exprStr;if(this._exprStr+=e.element,n.subHandler){this._subParser||this._startSubExpression(o);let r=this._subParser?._addToken(e);r&&(this._endSubExpression(),this._state=r)}else if(n.operatorTypes?.[e.tokenType]){let r=n.operatorTypes[e.tokenType],i=d0[e.tokenType];i&&i.call(this,e),r.toState&&(this._state=r.toState)}else{if(this._endState[e.tokenType])return this._endState[e.tokenType];throw new Error(`Token ${e.element} (${e.tokenType}) unexpected in expression: ${this._exprStr}`)}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){let{endStates:n}=rb[this._state];this._subParser=new t(this._grammar,e,n)}_endSubExpression(){rb[this._state].subHandler.call(this,this._subParser.buildAst()),this._subParser=null}setPositionInAST(e){this._position?(this._position.right=e,t._setParent(e,this._position)):this._tree=e,this._position=e}},ob=u0;var Rme="literal",f0="identifier",Pme=t=>typeof t=="object"&&t!==null&&"operationType"in t,p0={operatorType:"binaryOperator",precedence:1,evaluate:(t,e)=>typeof t=="object"||typeof e=="object"?!1:t&&e},m0={operatorType:"binaryOperator",precedence:1,evaluate:(t,e)=>typeof t=="object"||typeof e=="object"?!1:t||e},dH=(t,e,n)=>{let o=t==="",r=e===""||e===null||e===void 0;if(o&&r)return n;if(typeof e=="boolean"){let s=!o&&t!=="false"&&t!=="0"?!!t:!1;return n?s===e:s!==e}return o!==r?!n:n?t===e:t!==e},pH={">":{operatorType:"binaryOperator",precedence:2,evaluate:(t,e)=>t>e},">=":{operatorType:"binaryOperator",precedence:2,evaluate:(t,e)=>t>=e},"<":{operatorType:"binaryOperator",precedence:2,evaluate:(t,e)=>t<e},"<=":{operatorType:"binaryOperator",precedence:2,evaluate:(t,e)=>t<=e},"==":{operatorType:"binaryOperator",precedence:2,evaluate:(t,e)=>typeof t=="object"||typeof e=="object"?!1:dH(t,e,!0)},"!=":{operatorType:"binaryOperator",precedence:2,evaluate:(t,e)=>typeof t=="object"||typeof e=="object"?!0:dH(t,e,!1)},"!":{operatorType:"unaryOperator",precedence:999,evaluate:t=>{let e=typeof t=="object"?t.value:t;return e==="true"||e==="false"?e!=="true":!e}},"(":{operatorType:"openParenthesis"},")":{operatorType:"closeParenthesis"},"&&":p0,AND:p0,and:p0,"||":m0,OR:m0,or:m0,CONTAINS:{operatorType:"binaryOperator",precedence:2,evaluate:(t,e)=>String(t).includes(String(e))},NOT_CONTAINS:{operatorType:"binaryOperator",precedence:2,evaluate:(t,e)=>!String(t).includes(String(e))},STARTS_WITH:{operatorType:"binaryOperator",precedence:2,evaluate:(t,e)=>String(t).startsWith(String(e))},NOT_STARTS_WITH:{operatorType:"binaryOperator",precedence:2,evaluate:(t,e)=>!String(t).startsWith(String(e))},ENDS_WITH:{operatorType:"binaryOperator",precedence:2,evaluate:(t,e)=>String(t).endsWith(String(e))},NOT_ENDS_WITH:{operatorType:"binaryOperator",precedence:2,evaluate:(t,e)=>!String(t).endsWith(String(e))},IS_NULL:{operatorType:"binaryOperator",precedence:2,evaluate:t=>!t},IS_NOT_NULL:{operatorType:"binaryOperator",precedence:2,evaluate:t=>!!t},IS_IN_LIST:{operatorType:"binaryOperator",precedence:2,evaluate:(t,e)=>String(e).split(",").includes(String(t))},IS_NOT_IN_LIST:{operatorType:"binaryOperator",precedence:2,evaluate:(t,e)=>!String(e).split(",").includes(String(t))}},Nme=(t,e,n)=>{if(typeof t.value!="string")return"";let o=t.value.substring(1),r=e?.getFieldMetadata(o)?.type??"";if(r)return r;let{pageReference:i,context:s}=n??{};if(!i||!s)return"";let a=Q.resolveClassID(t.value,i,s),c=ft(o,a);return c&&!Array.isArray(c)?c.type??"":""},g0={BinaryExpression:function(e){let n=[],o=e.right,r=e.operator??"",i=e.left;if(!i)return!1;let s=typeof i.value=="boolean"?"True-False":"";n[0]=this.evaluateAST(i),!s&&i.operationType===f0&&(s=Nme(i,this._context,this._contextTreeNodeContext)),n[1]=o?this.evaluateAST(o,s):"";let a=this._grammar[r];return a?.evaluate?a.evaluate(n[0],n[1]):!1},identifier:function(e){let n=typeof e.value=="string"?e.value:"";if(this._localDataObject)return y.getIn(this._localDataObject,n?n.substring(1).split("."):[])??"";if(this._contextTreeNodeContext)return Q.getLitePropertyValue(this._contextTreeNodeContext,n)??"";if(!this._context)return"";let o=this._context.getFieldMetadata(n)?.type??"",r=this._context.getValue(n)??"";if(o==="Decimal"&&typeof r=="string"){let i=parseFloat(r);return Number.isNaN(i)?"":i}return r},literal:function(e,n){return(n===void 0||n===""||n==="True-False")&&(e.value==="true"||e.value==="false")?e.value==="true":e.value??""},UnaryExpression:function(e){let n=e.operator,o=e.right;if(!n||!o)return!1;let r=this._grammar[n];return r?.evaluate?r.evaluate(o):!1}},d0={unaryOperator:function(e){this.setPositionInAST({operationType:"UnaryExpression",operator:String(e.value)})},binaryOperator:function(e){let n=String(e.value),{precedence:o}=this._grammar[n],r=this._position._parent,i=r?r.operator:null,s=i?this._grammar[i]:null,a=s?s.precedence:null;if(a&&o)for(;r?.operator&&a>=o;)this._position=r,r=r._parent;let c={operationType:"BinaryExpression",operator:n,left:this._position};ob._setParent(this._position,c),r?(this._position=r,this.setPositionInAST(c)):(this._tree=c,this._position=c)},identifier:function(e){let n={operationType:f0,value:e.value};this.setPositionInAST(n)},literal:function(e){this.setPositionInAST({operationType:Rme,value:e.value})},subExpression:function(e){Pme(e)&&this.setPositionInAST(e)}},rb={expectOperand:{operatorTypes:{literal:{toState:"expectBinOp"},identifier:{toState:f0},unaryOperator:{},openParenthesis:{toState:"subExpression"}}},expectBinOp:{operatorTypes:{binaryOperator:{toState:"expectOperand"}}},identifier:{operatorTypes:{binaryOperator:{toState:"expectOperand"}}},subExpression:{subHandler:d0.subExpression,endStates:{closeParenthesis:"expectBinOp"}}};var Ome=["binaryOperator","unaryOperator","openParenthesis"],xme=/^\s*$/,mH=/^[a-zA-Z_.$][(0-9)a-zA-Z0-9_.$]*$/,Dme="literal",$me="identifier",wme=/\\\\/,Mme=["'(?:(?:\\\\')|[^'])*'",'"(?:(?:\\\\")|[^"])*"',"\\s+","\\btrue\\b","\\bfalse\\b"],kme=["[a-zA-Z_.$][a-zA-Z0-9_.$]*(?:\\(\\d+\\))?(?:\\.[a-zA-Z0-9_.$]+)*","[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}|[0-9]{4}-[0-9]{2}-[0-9]{2}","(?:(?:[0-9]*\\.[0-9]+)|[0-9]+)"],Lme=/^-?(?:(?:[0-9]*\.[0-9]+)|[0-9]+)$/,h0=class t{_grammar;_splitRegex;constructor(e){this._grammar=e}static _isNegative(e){return Ome.some(n=>n===e[e.length-1].tokenType)}static _isWhitespace(e){return!!e.match(xme)}static _createWordboundary(e){return e=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),e.match(mH)&&(e=`\\b${e}\\b`),e}static _unquote(e){let[n]=e,o=new RegExp(`\\\\${n}`,"g");return e.substr(1,e.length-2).replace(o,n).replace(wme,"\\")}_getSplitRegex(){if(!this._splitRegex){let e=Object.keys(this._grammar).sort((n,o)=>o.length-n.length).map(n=>t._createWordboundary(n),this);this._splitRegex=new RegExp(`(${[Mme.join("|"),e.join("|"),kme.join("|")].join("|")})`)}return this._splitRegex}_splitExpression(e){let n=this._getSplitRegex();return e.split(n).filter(o=>o.trim())}_createToken(e){let n={tokenType:Dme,value:e,element:e};return e.startsWith('"')||e.startsWith("'")?n.value=t._unquote(e):e.match(Lme)?n.value=parseFloat(e):e==="true"||e==="false"?n.value=e==="true":this._grammar[e]?n.tokenType=this._grammar[e].operatorType:e.match(mH)&&(n.tokenType=$me),n}_getTokens(e){let n=[],o=!1;for(let r=0;r<e.length;r+=1)t._isWhitespace(e[r])?n.length&&(n[n.length-1].element+=e[r]):e[r]==="-"&&t._isNegative(n)?o=!0:(o&&(e[r]=`-${e[r]}`,o=!1),n.push(this._createToken(e[r])));return n}tokenize(e){let n=this._splitExpression(e);return this._getTokens(n)}},fH=h0;var y0=class{_grammar;_expression;_ast;_context;_contextTreeNodeContext;_localDataObject;constructor(e,n){this._grammar={...pH},this._expression=e,this._ast=null,this._contextTreeNodeContext=null,this._localDataObject=n}buildAST(){let n=new fH(this._grammar).tokenize(this._expression),o=new ob(this._grammar);return o.addTokens(n),this._ast=o.buildAst(),this}evaluate(e,n){return this._context=e,this._contextTreeNodeContext=n,this.evaluateAST(this._ast)}evaluateAST(e,n){return hH(e.operationType,g0)&&g0[e.operationType].call(this,e,n)}},gH=y0;var S0=(t,e)=>{let n=/[a-zA-Z0-9_)"'\s]=[a-zA-Z0-9_("'\s]/,o=t.replace(n,r=>r.replace("=","=="));return new gH(o,e)},E0=t=>t?t.buildAST():!0,A0=(t,e,n)=>t?t.evaluate(e,n):!0,ib=(t,e,n)=>{let o=S0(t,e),r=E0(o);return A0(r,n)},hH=(t,e)=>t in e;var C0=class{static handleExpression(e,n,o,r){let i=this.getContext(e,r),a={actionObject:{action:"decexp",params:{source:e,value:n,targets:o},context:i}};At.fetchData(a).then(c=>c.json()).then(c=>{this.updateState(c,r)}).catch(c=>console.log(c))}static getContext(e,n){let o=e.substring(0,e.indexOf(".")),r=Q.getPropertyValue(`${o}.${O.getDefaultQualifiedName("pxObjClass")}`,null,n)||Q.getPropertyValue(`${o}.${O.getDefaultQualifiedName("pyClassName")}`,null,n);return{name:o,class:r}}static updateState(e,n){Object.keys(e).forEach(o=>v({type:Pt,payload:{context:n,reference:o,value:e[o]}}))}},yH=C0;var sb={},SH=(t,e)=>sb[e]&&Object.hasOwn(sb[e],t),I0=t=>{let{context:e}=t;SH(t.reference,e)&&yH.handleExpression(t.reference,t.value,sb[e][t.reference],e)},nR=(t={})=>{y.copy(t,sb)},Ume=(t,e,n)=>ib(t,e,n?.pConnect.getPConnect());var b0=class{static isPageInstruction(e){return e&&e.includes("[")&&e.includes("]")}},ab=b0;var Fp={IDLE:"idle",SAVING:"saving",SKIPPED:"skipped",ERROR:"error"},zme=5e3,jme=()=>{let t=Number(T.getFeatureMap()?.pyAutoSaveDurationInMS);return t>0?t:zme},T0='input[type="text"], input[type="email"], input[type="number"], input[type="search"], input[type="tel"], input[type="url"], input[type="password"], input[type="date"], input[type="time"], input[type="month"], input[type="week"], input[type="datetime-local"], input:not([type])',Fme=`${T0}, textarea, [contenteditable="true"]`,qi=new Map,Fs=new Map,lb=new Set,Jy=new Map,Yy=new Map,Vp=new Set,cb=(t,e)=>{Jy.get(t)?.forEach(n=>n(e))},Vme=t=>{let e=Yy.get(t);if(!(!e||e.size===0)){for(let[n,o]of e)Ue.executeStateMachine(t,n,o,!0,{skipStateUpdate:!1,skipDirtyValidation:!1})||v(wa({reference:n,value:o,context:t,isImplicit:!1,skipDirtyValidation:!1}));Yy.delete(t)}},Bme=(t,e)=>{let n=t,o=n.includes(d.MODAL),r=ie(A.CASE_INFO.CASE_INFO_ID,null,n),i=ie(A.CASE_INFO.ASSIGNMENT_ID,null,n),a=ie(A.CASE_INFO.ACTIVE_ACTION_ID,null,n)||ie(A.CASE_INFO.ASSIGNMENTACTION_ID,null,n),c=ie(A.CASE_INFO.CASE_TYPE_ID,null,n),l=ie("isProcessAction","isProcessAction",n),u=M.getNextActionMgrId(),p={context:n,containerItemID:t,assignmentID:i,actionID:a,caseID:r,containerName:e,caseType:c,isModalAction:o,isFormValid:void 0,isProcessAction:l,saveOnly:!0,autosave:!0,actionMgrID:u},m,f,g=new Promise((h,E)=>{m=h,f=E});if(m&&f)M.register(u,g,m,f,ji,p,!0);else throw new Error("Promise executor did not synchronously assign resolveFn/rejectFn.");return vt.executeOrQueueDeferredAction(Gl(p)),g},ub=(t,e)=>{let n=Fs.get(t);n!==void 0&&clearTimeout(n),Fs.set(t,setTimeout(()=>{Fs.delete(t),e()},jme()))},v0=t=>{let e=Ye(t),n=re(e);return!n||!In(n)?!0:se(n)===e},db=async t=>{if(lb.has(t)||Vp.has(t))return;let e=qi.get(t);if(!e||!v0(t))return;let n=typeof document<"u"?document.activeElement:null;if(n&&n===hj(t)&&n.matches(T0)){ub(t,()=>db(t).catch(()=>{}));return}Vme(t);let o=!1;Xv(!0);try{if(!Sr.hasUnsavedChanges(t))return;o=Sr.isFormValid(t)}finally{Xv(!1)}if(!o){cb(t,Fp.SKIPPED);return}lb.add(t),cb(t,Fp.SAVING);try{await Bme(t,e.containerName),Sr.clearChangedProperties(t),cb(t,Fp.IDLE)}catch{cb(t,Fp.ERROR)}finally{lb.delete(t)}},EH=()=>{if(!(typeof document>"u"||!document.activeElement?.matches(Fme)))for(let e of qi.keys())Fs.has(e)&&v0(e)&&ub(e,()=>db(e).catch(()=>{}))},AH=EH,CH=t=>{t.key==="Tab"&&EH()},IH=t=>{let{target:e}=t;if(!(typeof Element>"u"||!(e instanceof Element)||!e.matches(T0)))for(let n of qi.keys())Fs.has(n)&&v0(n)&&(dA(n,e),ub(n,()=>db(n).catch(()=>{})))},_H=t=>{let e=t?.data?.caseInfo?.settings?.autoSave;if(e!=null)return!!e;let n=t?.containerItemID??t?.context;if(n){let o=ie("caseInfo.settings.autoSave",null,n);if(o!=null)return!!o}return!1},Vs=t=>qi.has(t),bH=(t,e,n)=>{let o=Yy.get(t);o||(o=new Map,Yy.set(t,o)),o.set(e,n)},TH=(t,e)=>{qi.size===0&&typeof document<"u"&&(document.addEventListener("pointerdown",AH,{passive:!0}),document.addEventListener("keydown",CH,{passive:!0}),document.addEventListener("input",IH,{capture:!0,passive:!0})),qi.set(t,e)},pb=t=>{let e=Fs.get(t);e!==void 0&&clearTimeout(e),Fs.delete(t),lb.delete(t),qi.delete(t),Vp.delete(t),Yy.delete(t),pA(t),qi.size===0&&typeof document<"u"&&(document.removeEventListener("pointerdown",AH),document.removeEventListener("keydown",CH),document.removeEventListener("input",IH,{capture:!0}))},R0=t=>{let e=`${t}/`;for(let n of[...qi.keys()])n.startsWith(e)&&pb(n)},vH=(t,e)=>{let n=Jy.get(t);return n||(n=new Set,Jy.set(t,n)),n.add(e),()=>{let o=Jy.get(t);o&&(o.delete(e),o.size===0&&Jy.delete(t))}},mb=t=>{let e=Fs.get(t);e!==void 0&&(clearTimeout(e),Fs.delete(t))},Bp=t=>{qi.has(t)&&(Vp.has(t)||ub(t,()=>db(t).catch(()=>{})))},RH=()=>Vp,PH=t=>{mb(t),Vp.add(t)},NH=t=>{Vp.delete(t),Sr.hasUnsavedChanges(t)&&Bp(t)};var{APP:Hme}=d,Tn={},dc={},pc={},xH=new Set([Ht,tt,st,hi]),Gme=new Set([Fr,Oo,Pt,Mc,No,ss,...xH]),md="You will lose unsaved changes. Do you want to continue?",vV="You have reached maximum limit of pending changes. Please commit/cancel one or more changes to continue.",qme=(t,e,n)=>{let o=dc[e]||{};return Object.keys(o).forEach(r=>{let i=o[r].associatedProperty;Object.hasOwn(o,r)&&(i===void 0||n.has(i))&&y.buildObject(r,t,o[r].value)}),t},sl=(t=Hme.APP,e,n)=>{let o=Tn[t]||{},r=dc[t]||{};if(Object.keys(o).length===0&&Object.keys(r).length===0)return{};let i=[],s=null;e||(i=il(t,!0)),n||(s=new Set(wV(t)));let a=new Set(i),c={};return qme(c,t,a),Object.keys(o).forEach(l=>{let u=!e&&a.has(l)||e;Object.hasOwn(o,l)&&u&&!s?.has(l)&&y.buildObject(l,c,o[l].value)}),c};var Zy=t=>{let{context:e}=t,n=t.reference.startsWith(".")?t.reference.substr(1):t.reference;delete Tn[e]?.[n],delete dc[e]?.[n]};Oz((t,e)=>{Zy({context:t,reference:e});let n=e.lastIndexOf(".");n<1||n===e.length-1||ht({type:d.MESSAGES.MESSAGES_TYPE_ERROR,context:t,pageReference:e.slice(0,n),property:e.slice(n)})});var DH=t=>t&&pc[t],ZR=t=>{t&&pc[t]&&(pc[t]=!1)},OH=(t,e)=>{let{context:n,initialValue:o="",isStrictTracking:r,associatedProperty:i}=e,s=e.reference.startsWith(".")?e.reference.substr(1):e.reference;t[s]?t[s].previousValue=ie(e.reference,null,n):(t[s]={initialValue:o||ie(e.reference,null,n)},t[s].previousValue=t[s].initialValue),t[s].value=e.value,i&&(t[s].associatedProperty=i),r&&t[s].value===t[s].initialValue&&Zy(e)},$H=t=>{let{payload:e}=t,{context:n}=e,o=e.reference.startsWith(".")?e.reference.substr(1):e.reference;be.isFieldExists(n,o)||(dc[n]=dc[n]||{},OH(dc[n],e)),Tn[n]=Tn[n]||{},OH(Tn[n],e)},wH=(t,e,n)=>{let o=Tn[t]||{},r;n instanceof Set?r=n:n&&n.length>0&&(r=new Set(n)),Object.keys(o).forEach(i=>{r?.has(i)||y.hasIn(e,i)&&(o[i].value=y.getIn(e,i))})},Qy=t=>{let e=Tn[t];if(!e)return{};let n={};return Object.keys(e).forEach(o=>{n[o]=e[o].value}),n},uH=({value:t,context:e,reference:n})=>{let o=re(e),r=Ze(o,e)||{};if(ab.isPageInstruction(n)||r?.subscriptFieldName)return;let i=n?.startsWith(".")?n?.substr(1):n;Tn[e]=Tn[e]||{},Tn[e][i]||(Tn[e][i]={initialValue:ie(i,null,e)}),Tn[e][i].value=t},jn=t=>t&&Tn[t]&&Object.keys(Tn[t]).some(e=>Tn[t][e].initialValue!==Tn[t][e].value)||!!DH(t),P0=(t,e)=>{if(!(t&&e))return!1;let n=Tn[t]&&Tn[t][e];return n?n.previousValue!==n.value:!1},Wme=()=>Object.keys(Tn).some(t=>jn(t)),fd=t=>{t&&Tn[t]?(Tn[t]={},dc[t]={}):t==="all"&&(Tn={},dc={},pc={}),pc[t]&&(pc[t]=!1),pA(t)},MH=(t,e,n=new Set)=>{if(n.has(e))return;n.add(e);let o=lc.getDependencies(t,e),r=Nn.getResetDependencies(t,e);[...o,...r].forEach(i=>{let s=y.getPropertyNameFromDependency(i);if(typeof i=="object"&&i.mode==="multiRecord"){let a=s.split("."),c=`.${a.pop()}`,l=a.join(".");Ue.isStateMachineExist(t,l,c)?Ue.getStateMachine(t,l,c).deleteAll():Vs(t)&&(Ue.setStateMachine(t,c,l,new qc(c,l,t)),Ue.getStateMachine(t,l,c)?.deleteAll(!1))}else ab.isPageInstruction(s)&&Ue.executeStateMachine(t,s,""),v({type:Pt,payload:{reference:s,value:"",context:t,isArrayDeepMerge:!0,isImplicit:!0}});MH(t,s,n)})},Kme=t=>{let{context:e,pageReference:n,value:o,reference:r}=t;Nn.triggerCascade(e,r,o);let i=lc.getDependencies(e,r),s={context:e,datapages:{}};MH(e,r),i.forEach(a=>{let c=n;a.startsWith(n)||(c="");let l=a.replace(`${c}`,"").split(".").filter(_=>!!_);l.pop();let u=l.join("."),p=ie(`.${u}`,c,e)?.classID||t.classID,m=ft(a.split(".").pop(),p),{datasource:f}=m,g={},h=[];f.parameters.forEach(_=>{_?.value?(g[_.name]=On.isProperty(_.value)?ie(`.${y.getFullPropertyReference([u,y.getPropertyName(_.value)])}`,c,e):_.value,g[_.name]===void 0||g[_.name]===null||g[_.name]===""?(g[_.name]="",h.push(d.NULL_STRING)):h.push(g[_.name])):(g[_.name]="",h.push(d.NULL_STRING))});let E=f.name.concat(d.UNDERSCORE_STRING,y.getHashedString(h.join(d.HASH_DELIMITER))),{name:C}=f,I=$n(C);s.datapages[E]={mode:f.mode,propertyName:a,name:f.name,dataViewParameters:g,refreshStrategy:I?.refreshStrategy}}),i.length&&v({type:RE,payload:s})},Jme=()=>t=>e=>{let{type:n,payload:o={}}=e||{};if(!n||!Gme.has(n)){t(e);return}if(n===Fr&&(I0(o),Kme(o),vt.registerBlockingAction(o.context).catch(()=>{}),setTimeout(()=>{kf()?!Bi.triggerRefreshForType("PROP_CHANGE",o.reference,o.context)&&(P0(o.context,o.reference)||_f(o.context))&&ud(o):((P0(o.context,o.reference)||_f(o.context))&&ud(o),Bi.triggerRefreshForType("PROP_CHANGE",o.reference,o.context)),vt.deRegisterBlockingAction(o.context).catch(()=>{})},0)),n===Oo&&!o?.isDefault){let{context:r,referenceList:i,c11nEnv:s,listIndex:a,instruction:c,skipDirtyValidation:l=!1,skipRefresh:u=!1}=o;a===0&&c==="INSERT"&&s&&ZF(s),u||setTimeout(()=>{Bi.triggerRefreshForType("PROP_CHANGE",i,r)||ud({context:r,pageReference:i})},0),l||(pc[`${r}`]=!0)}if(n===Pt||n===Mc){let{reference:r,isImplicit:i,context:s,skipDirtyValidation:a=!1}=o;be.updateFieldNodeValue(s,r,o.value),!ab.isPageInstruction(r)&&!a?$H(e):a||(pc[`${s}`]=!0),(o.removePropertyFromChangedList||i)&&Zy(o)}if(n===No||n===ss){let{transientItemID:r,data:i}=o;y.iterateLeafNodes(i,s=>{Zy({context:r,reference:s.join(".")})})}n&&xH.has(n)&&(fd(o.context),Nn.purgeResetDependencies(o.context),KF(o.context),(o.childContainersContexts||[]).forEach(s=>{fd(s)}),(o.transientItems||[]).forEach(s=>{fd(s)})),t(e)},kH={propertyChangeMiddleware:Jme,getChanges:sl,recordChange:$H,isDirty:Wme,isPropertyDirty:P0,isContextDirty:jn,resetChangedProperties:fd,deleteRecordedChange:Zy,isComplexObjectMerged:DH,resetComplexObjectDirtyStatus:ZR};var N0=class{getCoreheaders(e){let n=`${A.APP.APP}${d.FORWARD_SLASH_STRING}${d.PRIMARY}`,o=se(n),r=de(o),i=Q.getProperty(d.COREHEADERS,"",r);if(i&&e in i)return i[e]}},LH=new N0;var Xy={defaultLimit:16},x0={SINGLE:"single",MULTIPLE:"multiple"},Ee={PRIMARY:"primary",WORKAREA:"workarea",MODAL:"modal",PREVIEW:"preview"},no=()=>we()?.getState()?.containers;function dt(t){return typeof t=="string"&&t.trim()!==""}var gt=t=>dt(t)?we()?.getState().containers[t]:null,zp=(t,e,n)=>{if(!n)return{continueExecution:!1,containerItemID:t};let o=gt(n),r=!1,i=t;return o?.accessedOrder.forEach(s=>{e===o.items[s].key&&(r=!0,i=o.items[s].context)}),{continueExecution:r,containerItemID:i}},Ze=(t,e)=>{if(!dt(t)||!dt(e))return null;let o=no()?.[t];return o&&o.items&&o.items[e]||null},WR=t=>dt(t)?we()?.getState().containers[t]?.items:null,Hp=t=>dt(t)?we()?.getState().containers[t]?.accessedOrder||[]:[],Yme=t=>dt(t)&&Hp(t)?.length>0||!1,Wl=(t,e,n)=>{if(!dt(t)||!dt(e))return!1;let r=no()?.[t],i=r&&r.items||null,s=n||((a,c)=>a===c);if(e&&i){for(let a of Object.keys(i))if(s(e,i[a].key))return!0}return!1},D0=t=>{let{containers:e}=we()?.getState()||{};return!e||!dt(t)?!1:Object.keys(e).some(n=>e[n]?.accessedOrder?.includes(t))},Vt=(t,e,n)=>{if(!dt(t)||!dt(e))return null;let r=no()?.[t],i=r&&r.items||null,s=n||((a,c)=>a?.toLowerCase()===c?.toLowerCase());if(e&&i){for(let a of Object.keys(i))if(s(e,i[a].key))return a}return null},Zme=(t,e)=>{let n=(o,r)=>o?.toLowerCase()===r?.toLowerCase();if(t&&e){for(let o of Object.keys(e))if(n(t,e[o].key))return e[o]}return null},Qme=t=>{if(!dt(t))return null;let e=no()??{};for(let n of Object.keys(e))if(e[n]){let r=e[n].items??null,i=Zme(t,r);if(i)return i}return null},By=(t,e)=>{if(!dt(t)||!dt(e))return!1;let n=no();return n&&Object.hasOwn(n,`${t}/${e}`)},Xme=(t,e)=>{if(!dt(t)||!dt(e))return null;let o=no()?.[`${t}/${e}`];return o&&o.type},se=t=>{if(!dt(t))return null;let e=null,n=no();if(n&&n[t]){let o=n[t],{accessedOrder:r}=o;e=r&&r.length>0?r[r.length-1]:null}return e},efe=(t,e,n)=>{if(!dt(t)||!dt(e))return!1;let o=Vt(t,e,n);return o?o===se(t):!1},UH=(t,e)=>{let n=null,o=no();if(!o)return null;for(let r of Object.keys(o))if(o[r].items){let i=o[r].items[t];if(i?n=i[e]:n=null,n)break}return n},de=t=>dt(t)?UH(t,"context"):null,Qt=t=>{if(!dt(t))return null;let e=null,n=no();if(n&&n[t]){let o=n[t],{accessedOrder:r}=o,i=r&&r.length>0?r[r.length-1]:null;e=de(i)}return e},ad=t=>{if(!dt(t))return[];let e=t.endsWith("/")?t:`${t}/`,n=[],o=!1,r=no();if(!r)return[];let i=s=>{let a=[];return Object.keys(s).forEach(l=>{l.startsWith(e)&&l!==e&&a.push(l),l===t&&(o=!0)}),a};for(let s of Object.keys(r))if(r[s].items){let a=i(r[s].items);a&&a.length>0&&(n=n.concat(a)),n=n.sort()}return o?n:[]},Ke=t=>{if(!dt(t))return[];let e=[],n=no();if(!n)return[];let o=`${t}${d.FORWARD_SLASH_STRING}`;for(let r of Object.keys(n))r.startsWith(o)&&e.push(r);return e},ti=t=>{if(!dt(t))return[];let e=[],n=no();if(!n)return[];let o=`${t}${d.FORWARD_SLASH_STRING}`;for(let r of Object.keys(n))r.startsWith(o)&&(Hp(r)||[]).forEach(s=>{de(s)!==t&&e.push(de(s))});return e},eS=t=>{let e=[...ti(t),t],n=[],o=we()?.getState().data||{};return e.forEach(r=>{Object.hasOwn(o,`${r}/${d.SUGGESTION}`)&&n.push(`${r}/${d.SUGGESTION}`)}),n},Rt=t=>dt(t)?t&>(t)&>(t).type===x0.SINGLE:null,In=t=>dt(t)?t&>(t)&>(t).type===x0.MULTIPLE:null,Xn=t=>dt(t)&>(t)&>(t).items&&Object.keys(gt(t)?.items).length>0||!1,zH=t=>t&&Xy[t]?Xy[t]:Xy.defaultLimit,tfe=(t,e=Xy.defaultLimit)=>{dt(t)&&(Xy[t]=e)},KR=t=>{if(!dt(t))return!1;let e=!1,n=gt(t),{items:o={}}=n,r=Object.keys(o),i=zH(t);return r&&r.length>0&&r.length>=i&&(e=!0),e},al=t=>{if(!t||!dt(t.name)||!dt(t.context))return null;let e=t?.name,n=`${t?.context}/${e}`,o=gt(n),r=Array.isArray(o?.accessedOrder)&&o?.accessedOrder.map(a=>o?.items[`${a}`]?.context)||[],i=Ke(`${d.APP.APP}/${d.PREVIEW}`),s=ti(`${d.APP.APP}/${d.PREVIEW}`);return{context:t?.context,name:e,containerItems:[...r,...s],childContainers:i}},tS=t=>{if(!dt(t))return!1;let e=de(t);return jn(e)||GR(t)},JR=t=>{if(!dt(t))return null;let e,n=gt(t),{accessedOrder:o=[]}=n;for(let r=0;r<o.length;r+=1){let i=o[r];if(!tS(i)){e=i;break}}return e},re=t=>{if(!dt(t))return null;let{containers:e}=we()?.getState()||{};if(e){for(let o of Object.keys(e))if(e[o]?.accessedOrder?.includes(t))return o}let n=t.lastIndexOf(d.UNDERSCORE_STRING);return t.slice(0,n)},Oa=async(t,e={})=>{if(!dt(t))return Promise.reject(new Error("closeContainerItem: containerItemID is the required parameter"));let n=re(t),o=de(t),{skipDirtyCheck:r}=e,i=!0,s=[];if(tS(t)&&!r&&(Gr.disableLoadingIndicator({context:o}),i=await vi.confirm(zn().getLocaleValue(md,"Messages")),Gr.enableLoadingIndicator({context:o})),i){let{accessedOrder:a=[],items:c={},type:l}=gt(n);s=a.filter(h=>h!==t);let u=s[s.length-1],p=c[u]||{},{semanticURL:m=d.FORWARD_SLASH_STRING,context:f}=p;n?.includes(Ee.MODAL)||(s.length>0&&m&&m!==d.FORWARD_SLASH_STRING?ys({directUrlUpdation:!0,semanticURL:m,options:{containerItemID:u,context:f}}):ys({directUrlUpdation:!0,semanticURL:d.FORWARD_SLASH_STRING,options:{}})),v(nt({containerItemID:t,context:o,target:n,containerInfo:{newAccessedOrder:s,containerType:l},...e.eventName!==void 0?{eventName:e.eventName}:{}}))}return{newAccessedOrder:s,removeItem:i}},$0=(t,e,n,o)=>{let r="root",i=En(e,r,!0),s=X(e,r),a={root:t,containerItemID:i,context:o?"app":i,target:s,containerName:e},c={data:n,context:o?"app":i},l=[kt(a)];l.push(Ne(c)),v(l)},nfe=(t,e,n)=>{let o=Hp(t);o=o.filter(i=>i!==e);let r=!1;for(let i=0;i<o.length;i+=1)if(de(o[i])===n){r=!0;break}return r},w0=t=>{if(!dt(t))return!1;let e=no(),n=de(t),o=e?Object.keys(e):[],r=!1;for(let i=0;i<o.length&&(r=nfe(o[i],t,n),!r);i+=1);return r},Vi=t=>{Array.isArray(t)||(t=[t]);let e=no()||{};return t.map(n=>{let o=re(n);return y.getIn(e,[o,"items",n,"transientItems"])||[]}).flat()},rfe=t=>{let{transientItemID:e,data:n,options:o}=t,r=y.deepClone(we()?.getState().data[e]);o?.reset&&y.iterateLeafNodes(r,i=>{i[i.length-1]!=="classID"&&y.setIn(r,i,"")}),v(Hy({transientItemID:e,data:y.mergeDeep(n,r)}))},ofe=t=>{let{transientItemID:e,data:n}=t;v(F0({transientItemID:e,data:n}))},ife=t=>{let e=y.deepClone(we()?.getState().data[t]);y.iterateLeafNodes(e,n=>{n[n.length-1]!=="classID"&&y.setIn(e,n,"")}),v(j0({transientItemID:t,data:e}))},jH=t=>{let e=y.deepClone(we()?.getState().data[t]);y.iterateLeafNodes(e,n=>y.setIn(e,n,"")),v(V0({transientItemID:t,data:e}))},sfe=t=>{we()?.getState().data[t]&&jH(t);let e=t.lastIndexOf("/"),n=e>0?t.substring(0,e):t,o=re(n);v(Gy({transientItemID:t,containerItemID:n,target:o}))},O0=class{static items;static addContainerItems(e){this.items=e}static getContainerItems(){return this.items}static deleteContainerItem(e){let n=this?.items?.indexOf(e);n!==void 0&&n!==-1&&this.items.splice(n,1)}},afe=(t,e={})=>{if(!dt(t))return;let n=gt(t),o=Array.isArray(n?.accessedOrder)?n.accessedOrder:[];if(o.length===0)return;let{remove:r,keep:i}=e,s;if(i!==void 0){let a=new Set(i);s=o.filter(c=>!a.has(c))}else if(r!==void 0){let a=new Set(r);s=o.filter(c=>a.has(c))}else s=[...o];for(let a of s){let c=de(a),l=Vi(a);v(nt({containerItemID:a,context:c,target:t,...l.length>0&&{transientItems:l}}))}},fb=()=>O0,M0=t=>{let e={containerName:t};e.childContainers=Ke(t),v({type:IE,payload:e})},k0=(t,e)=>{let n=ad(t),{key:o}=Ze(re(t),t),r=[];n.forEach(i=>{let{key:s}=Ze(re(i),i);if(s===o){let a={data:{caseInfo:{headers:{etag:e}}},target:re(i),context:i};r.push({type:Pn,payload:a})}}),r.length&&v(r)},L0=(t,e)=>{let n=[],o={data:{caseInfo:{headers:{etag:e}}},target:re(t),context:t};n.push({type:Pn,payload:o}),n.length&&v(n)},Co=()=>T.isPortalLoaded?"app":"root",cfe=()=>LH,U0=(t,e)=>{let n={data:{caseInfo:{lastUpdateTime:e}},target:re(t),context:t};v({type:Pn,payload:n})},z0=(t,e)=>{let n=Vt(t,e),o=Vt(`${n}/workarea`,e);return de(o)},UA=t=>dt(t)?UH(t,"parentContext"):null,lfe=t=>{let{accessedOrder:e}=t;return e&&e.length>0?e[e.length-1]:""},cc=t=>{if(t&&typeof t=="string"){let e=t.split("/");return e.pop(),e.join("/")}return null},ufe=()=>K_;var FH=t=>{typeof window>"u"||(window.document.title=t)},VH=(t,e)=>(t!==void 0&&(t.options=e),{stateObj:t}),BH=(t,e,n)=>{if(!(typeof window>"u"))try{window.history.pushState(t,e,n),window.scrollTo(0,0)}catch{throw new Error("Error- Unable to Add to Browser History")}},HH=(t,e,n)=>{if(!(typeof window>"u"))try{window.history.replaceState(t,e,n)}catch{throw new Error("Error- Unable to Replace Browser History")}},GH=t=>t.state?.type==="ui-navigation"?(w.publish(A.PUB_SUB_EVENTS.URL_NAVIGATION,t.state),null):t.state?t.state.stateObj:null,qH=t=>{typeof window>"u"||window.addEventListener("popstate",e=>t(e))},WH=()=>{typeof window>"u"||(window.onbeforeunload=()=>null)},Gp=()=>typeof window>"u"?"":Mo(window.location.pathname),gb=()=>typeof window>"u"?"":Mo(window.location.pathname+window.location.search);var KH=()=>typeof window>"u"?"":window.location.search,nS=(t,e,n)=>{switch(n){case"warning":e?console.warn(t,e):console.warn(t);break;case"error":e?console.error(t,e):console.error(t);break;default:e?console.log(t,e):console.error(t)}};var dfe=/^(?!\.+$)[\w.~-]+$/,pfe=/^[^/?#{}]+\/\{businessID\}$/,mfe=/^[A-Za-z0-9]+__/,ffe={reqType:"GET",endPoint:"/api/application/v2/cases/[{caseTypeID}][businessID={businessID}]?viewType={viewType}",body:{},urlPattern:"cases/[{caseTypeID}][businessID={businessID}]",params:{caseTypeID:"",businessID:"",viewType:"page"}},B0=class{routingInfo;appRoutes;appRoutesMeta;appName;appAlias;orgName;reqContextName;reqServletPath;defaultViewUrlPath;staticRoutePage;defaultClassName;staticRoutesList=[];dynamicRoutesList;appDelimeter;reqServletNameReal;bDefaultPortal;portalName;ignoreFromEndPoint;constructor(){this.staticRoutesList=[],this.dynamicRoutesList=[],this.reqContextName="",this.defaultViewUrlPath="",this.staticRoutePage="",this.defaultClassName="",this.portalName=""}init=(e,n)=>{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=n,this.defaultClassName="",this._createStaticDynamicRoutesList(this.appRoutes),this.appDelimeter=e.appDelimeter,this.reqServletNameReal=e.pxReqServletNameReal,this.bDefaultPortal=e.isDefaultPortal,this.portalName=e.portalName,this.ignoreFromEndPoint=["reactMode=dev","reactMode=prod"]):console.error("Routing info is not appropriate. Missing routes and routesMeta objects in routingInfo",JSON.stringify(e))};addRoutes=e=>{e?.routes&&e.routesMeta&&(this.appRoutes={...this.appRoutes,...e.routes},this.appRoutesMeta={...this.appRoutesMeta,...e.routesMeta},this.routingInfo&&(this.routingInfo.routes={...this.routingInfo.routes,...e.routes},this.routingInfo.routesMeta={...this.routingInfo.routesMeta,...e.routesMeta}),this._createStaticDynamicRoutesList(e.routes))};setDefaultRoute=e=>{this.defaultViewUrlPath=e};setStaticRoutePage=e=>{this.staticRoutePage=e};getStaticRoutePage=()=>this.staticRoutePage||"";setDefaultClassName=e=>{this.defaultClassName=e};_createStaticDynamicRoutesList=e=>{Object.keys(e).forEach(o=>{ri(o)?this.dynamicRoutesList?.push(o):this.staticRoutesList?.push({[o]:e[o]})})};_getDynamicKeyName=e=>{let n=e.indexOf("{")+1,o=e.lastIndexOf("}");return e.slice(n,o)};isDefaultPortal=()=>`${this.bDefaultPortal}`!="false";getPortalName=()=>this.portalName;getApplicationPath=()=>Mo(`${this.getReqContextName()}/${this.getReqServletNameReal()}`);getReqServletNameReal=()=>`${this.reqServletNameReal}`;getAppDelimeter=()=>`${this.appDelimeter}`;getApplicationName=()=>`${this.appName}`;getApplicationAlias=()=>`${this.appAlias}`;getServletPath=()=>`${this.reqServletPath}`;getOrganizationName=()=>`${this.orgName}`;getReqContextName=()=>Mo(this.reqContextName);getRoutingInfo=()=>this.routingInfo;processUrl=(e,n)=>{n&&(e=e.toLowerCase()),e&&(e=decodeURIComponent(e));let o=new RegExp(this.getApplicationPath(),"i");return e=e.replace(o,""),e.startsWith("/")&&Is()&&T.getRenderingMode()!=="PREVIEW"&&this.setDefaultClassName(""),Mo(e)};stripIgnoredParams(e){return this.ignoreFromEndPoint?.forEach(n=>{e.includes(n)&&(e=e.substring(0,e.indexOf(n)))}),e}getRouteDetails=(e,n)=>{if(!n)return this.appRoutes[e];let o="",r={caseClassName:"",caseID:"",RemoteSystemID:void 0,page:""};return Object.keys(this.appRoutes||{}).forEach(i=>{let s=this.appRoutes[i];s&&s.payload&&s.payload.page===e&&(o=s.routeKey,r={...s.payload})}),!o&&this.appRoutes&&this.appRoutes[e]&&(o=this.appRoutes[e].routeKey,r={...this.appRoutes[e].payload}),{routeKey:o,payload:r}};transformRemoteCasePayload(e){let{caseClassName:n,caseID:o}=e;if(!ce.isRemoteCase(n))return e;let{RemoteClassGroup:r,RemoteSystemID:i}=ce.getRemoteCase(n??"");return{...e,caseID:o?.replace(n??"",r?.toUpperCase()),RemoteSystemID:i}}getEndPointInfo=e=>{e=this.stripIgnoredParams(e);let n=Is(),o=this.processUrl(e,!0),r=this._getMatchedRouteInRoutingTable(o,n?this.defaultClassName:void 0);r||(o=this.processUrl(this.defaultViewUrlPath,!n),r=this._getMatchedRouteInRoutingTable(o,n?this.defaultClassName:void 0)||"");let{routeKey:i,payload:s}=this.getRouteDetails(r,n),a=this.appRoutesMeta?.[i]?.restApi??(i===as?ffe:void 0);if(!a)return null;let{reqType:c,endPoint:l,params:u}=a,p=this.transformRemoteCasePayload(s),m={routeKey:i,requestType:c,routeEndpoint:l,payload:{...u,...p}};return this._resolveRoute(m,this.processUrl(e,!1),r)};getSemanticURL(e,n,o){return this.buildSemanticURL(e,n,o)}findBusinessIDRoute(e){let n=[];Object.entries(this.appRoutes??{}).forEach(([s,a])=>{let c=a?.payload?.caseTypeID;a?.routeKey===as&&typeof c=="string"&&c&&pfe.test(s)&&n.push({pattern:s,typeID:c})});let o=n.find(({typeID:s})=>s===e);if(o)return o.pattern;let r=s=>s.replace(mfe,""),i=n.filter(({typeID:s})=>r(s)===r(e));return i.length===1?i[0].pattern:void 0}getBusinessIDURLPath(e,n){return!this.appRoutesMeta||!(as in this.appRoutesMeta)||n?.endsWith("-")?"":this.getBusinessIDRoutePath(e,n)}getBusinessIDRoutePath(e,n){return!e||!n||!dfe.test(n)||ce.isRemoteCase(e)?"":this.findBusinessIDRoute(e)?.replace("{businessID}",n)??""}getResolvedSemanticURL(e,n,o={},r){let i=e===Gt||e===Gn,s=o?.businessID,a=i&&typeof s=="string"?this.getBusinessIDURLPath(n?.caseClassName,s):"";if(!a){let p=this.getSemanticURL(e,n,o);a=p,ri(p)&&p.match(Qc)?.forEach(f=>{let g=this._getDynamicKeyName(f);o[g]&&(a=a.replace(f,String(o[g])))})}let c=YH(a,r),l=new URL(c),u=this.getPortalName();return this.isDefaultPortal()?l.searchParams.delete("portal"):u&&!tF(l.searchParams)&&l.searchParams.append("portal",u),r&&!l.searchParams.has("lang")&&l.searchParams.append("lang",r),Xc(l.toString())}buildDocumentTitle(e,n,o){let r=o??"";return T.getCaseLabelFirstInTitle()?e&&n?`${e} (${n}) - ${r}`:r:e&&n?`${n}: ${e} - ${r}`:r}updateSemanticURLAndDocumentTitle(e,n){let o=/{.+?}/,{key:r,actionName:i,caseClassName:s,isRemoteCase:a,name:c}=e;if(a&&!s)return;let l=this.getSemanticURL(i,{caseClassName:s}).replace(o,String(ln(r))),u=`${A.APP.APP}${d.FORWARD_SLASH_STRING}${A.PRIMARY}`,p={semanticURL:l,directUrlUpdation:!0,options:{acName:u,context:Qt(u)}},m=Gp();l&&!m.includes(l)&&H0(p,n);let f=r.substring(r.lastIndexOf(" ")+1),g=T.environmentInfoObject?.pxApplication?.pyLabel,h=this.buildDocumentTitle(c,f,g);G0(h)}updateDataObjectSemanticURLAndDocumentTitle(e,n){let{dataViewName:o,dataContextParameters:r={},name:i}=e,s=d.DATA_OBJECT_SEMANTIC_PAGE_NAMES.find(c=>this.getSemanticURL(dr,{pageName:c,dataViewName:o},r));if(s){let c={pageName:s,dataViewName:o},l=this.getSemanticURL(dr,c,r),u=this.getResolvedSemanticURL(dr,c,r,n);if(!eF(u)){let p=`${A.APP.APP}${d.FORWARD_SLASH_STRING}${A.PRIMARY}`;H0({semanticURL:l,directUrlUpdation:!0,options:{acName:p,context:Qt(p)}},n)}}let a=T.environmentInfoObject?.pxApplication?.pyLabel??"";G0(i?`${i} - ${a}`:a)}buildSemanticURL(e,n,o){let{urlPattern:r}=this.appRoutesMeta?.[e]||{},i=r?.split("/").length,s=r?.split("/");this.setDefaultClassName(n?.pageClass||this.defaultClassName);let a=Object.keys(this.appRoutes).filter(l=>i===l.split("/").length).filter(l=>{let u=l.split("?")[0].split("/");return s?.every((p,m)=>p.startsWith("{")||p===u[m])});if(a.length===1)return this._getQueryParamsResolvedURL(a[0],o);if(Object.keys(n).length===0)return"";let c=a.find(l=>{let u=this.appRoutes[l].payload,p={...o};delete p.dataViewName,delete p.dataContext;let m=u.dataViewKeys||u.dataContextParameters||{},f=Object.keys(n).every(g=>n[g]===u[g]);return f?!y.isEmpty(m)&&!y.isEmpty(p)?Object.keys(p).every(g=>Object.hasOwn(m,g)):f:!1});return c?this._getQueryParamsResolvedURL(c,o):a.includes("cases/{id}")&&o?.id?"cases/{id}":""}_getQueryParamsResolvedURL(e,n,o=!1){let[r,i]=e.includes("?")?e.split("?"):[e];if(i&&n&&Object.keys(n).length>0){let s={};for(let[u,p]of Object.entries(n))s[u.toLowerCase()]=p;let a=new URLSearchParams(i),c={};for(let[u,p]of a.entries())if(typeof p=="string"&&ri(p)){let m=this._getDynamicKeyName(p),f=m.toLowerCase(),g=o?s:n,h=o?n[m]??g[f]:g[m];h!=null&&(c[u]=h)}else typeof p=="string"&&(c[u]=p);let l=new URLSearchParams(Object.entries(c).map(([u,p])=>[u,String(p??"")]));return`${r}?${Xc(l.toString())}`}return r}_getQueryParamsObject(e){let n={};if(!e)return n;for(let o of e.split("&")){let r=o.indexOf("=");if(r!==-1){let i=o.slice(0,r),s=o.slice(r+1);try{n[decodeURIComponent(i)]=decodeURIComponent(s)}catch{n[i]=s}}}return n}getRestEndPoint(e,n){try{return this._buildRestApi(e,n)}catch(o){return console.error(o),null}}_buildRestApi(e,n){if(e&&this.appRoutesMeta?.[e]){let{reqType:o,body:r,params:i}=this.appRoutesMeta[e].restApi,{endPoint:s}=this.appRoutesMeta[e].restApi;n?.params&&n.params.pageName&&(s=`${s}&pageName=${n.params.pageName}`);let a=s.match(Qc);if(a)for(let c=0;c<a.length;c+=1){let l=a[c].replace("{","").replace("}",""),u=new RegExp(a[c],"g");s=s.replace(u,()=>n?.[l]??i?.[l])}if(r){let c={};return Object.keys(r).forEach(u=>{if(n&&this._isSpecialInstruction(u)){let p=r[u];Array.isArray(p)&&p.every(m=>typeof m=="string")&&(c={...c,...this._processInstruction(u,p,n)})}}),{restApi:s,reqType:o,body:c}}return{restApi:s,reqType:o}}throw new Error(`Cannot find route metadata for the routeKey: ${e}.`)}_isSpecialInstruction(e){return e&&e.startsWith("@")}_processInstruction(e,n,o){let r={};return e==="@COPY"&&n.forEach(i=>{r[i]=o?.[i]}),r}doesRestApiExist(e){return!!(this.appRoutesMeta&&this.appRoutesMeta[e])}_resolveMatchedRouteQueryParams=(e,n,o,r)=>{if(!e)return;let i=n.indexOf("?"),s=i!==-1?n.substring(i+1):void 0;if(s){let a=`${o.join("/")}?${s}`;return this._getQueryParamsResolvedURL(a,r,!0)}};_resolveRoute=(e,n,o)=>{let r=[],[i,s]=n.includes("?")?n.split("?"):[n],[a,c]=o.includes("?")?o.split("?"):[o],l=i.split("/"),u=a.split("/"),p={};for(let C=0;C<u.length;C+=1)if(r[C]=u[C],ri(u[C])){let I=this._getDynamicKeyName(u[C]);p[I]=l[C],r[C]=l[C]}let m=this._getQueryParamsObject(c),f=this._getQueryParamsObject(s),g={};for(let[C,I]of Object.entries(f))g[C.toLowerCase()]=I;for(let C of Object.keys(m))ri(m[C])?p[C]=f[C]||g[C.toLowerCase()]:p[C]=m[C];let h=this._resolveMatchedRouteQueryParams(s,o,r,f),E=this._resolvePayload(e,p,o);return{...this._resolveRouteEndPoint(E,o),urlPath:h||r.join("/")}};_resolveRouteEndPoint=(e,n)=>{let{routeEndpoint:o}=e;if(!ri(o))return e;let r={};if(r[n]=e,e.payload!==void 0){let i=o.match(Qc);for(let s=0;s<i.length;s+=1){let a=i[s],c=this._getDynamicKeyName(a);if(e.payload[c]!==void 0){let u=e.routeKey===as&&c==="businessID"?encodeURIComponent(e.payload[c]):e.payload[c];o=o.replace(a,u)}else this._sendWarningAndErrorMessages(`Unable to resolve dynamic token {${c}} in routeEndpoint- ${c} 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:o}};_resolvePayload=(e,n,o)=>{if(typeof e.payload>"u")return e;let r={};r[o]=e;let i={...e.payload,...this._resolvePayloadRecursive(e.payload,n)};return{...e,payload:i}};_resolvePayloadRecursive(e,n){if(Array.isArray(e))return e.map(r=>this._resolvePayloadRecursive(r,n)).flat();let o={};for(let r of Object.keys(e)){let i=e[r];if(typeof i=="string"&&ri(i)){let s=i.match(Qc)??[];for(let a of s){let c=this._getDynamicKeyName(a);n[c]!==void 0?i=i.replace(a,n[c]):this._sendWarningAndErrorMessages(`Unable to resolve dynamic token {${c}} in payload - {${c}} is missing in semantic url construct`)}o[r]=i}else i&&typeof i=="object"?o[r]=this._resolvePayloadRecursive(i,n):o[r]=i}return o}_getMatchedRouteInRoutingTable=(e,n)=>{let[o]=e.includes("?")?e.split("?"):[e],r=this._findMatchedRouteInStaticList(o,n);if(r!==void 0||(r=this._findMatchedRouteInDynamicList(e),r!==void 0))return r};_findMatchedRouteInStaticList=(e,n)=>{if(!this.staticRoutesList||!e)return;let o=e.toLowerCase(),r=n?.toLowerCase();if(Is()){let i=this._findMatchingRouteByClass(o,r);if(!i)return;let a=Object.values(i)[0]?.payload?.page||"";return this.setStaticRoutePage(a),Object.keys(i)[0]}return this._findInStaticList(o)};_findMatchingRouteByClass=(e,n)=>{if(this.staticRoutesList)return this.staticRoutesList.find(o=>Object.entries(o).some(([r,i])=>{if(!i)return!1;let s=i.payload?.page?.toLowerCase(),a=i.payload?.pageClass?.toLowerCase(),c=s===e||r.toLowerCase()===e;return n?c&&a===n:c}))};_findInStaticList=e=>{if(!this.staticRoutesList)return;let n=this.staticRoutesList.find(o=>Object.keys(o)[0].toLowerCase()===e);return n?Object.keys(n)[0]:void 0};_findMatchedRouteInDynamicList=e=>{let[n,o]=e.includes("?")?e.split("?"):[e],r=n.split("/");return this.dynamicRoutesList?.find(i=>{let[s,a]=i.includes("?")?i.split("?"):[i],c=s.split("/");if(c.length!==r.length)return!1;let l=0;for(l=0;l<c.length;l+=1){let u=c[l].toLowerCase();if(!ri(u)&&u!==r[l]&&Zj(u)!==r[l])return!1}if(a){let u=new URLSearchParams(o.toLowerCase()),p=new URLSearchParams(a.toLowerCase()),m=new Set,f=new Set,g=/\{[a-zA-Z]+\}/;for(let h of u.keys())m.add(h);for(let h of p.keys())f.add(h);if(f.size!==m.size)return!1;for(let h of m){if(!f.has(h))return!1;let E=p.get(h);if(u.get(h)!==E&&!g.test(E??""))return!1}}return!0})};_sendWarningAndErrorMessages=(e,n)=>{nS(e,n,"warning"),nS("Error in Generated Routing Table",null,"error"),nS("Back | Forward for this page may NOT work as intended",null,"warning"),nS("Bookmark | Refresh for this page may NOT work as intended",null,"warning")}},gfe=new B0,Se=gfe;var q0=class{environmentInfoObject;isPortalLoaded;pageName;KeyMapping;isAssignmentHeaderHidden;coexistenceMeta;brandingInfo;brandingInfoDark;themeOverrides;darkThemeOverrides;locale;cookieComplianceMethod;isExtraCallRequiredForDefaultHome;enablePriorityAndUrgencyImprovements;isWebEmbed;caseLabelFirstInTitle;nav;constructor(){this.environmentInfoObject=null,this.isPortalLoaded=!1,this.pageName=null,this.KeyMapping={},this.isAssignmentHeaderHidden=!1,this.coexistenceMeta={appType:"",isCoexistence:!1},this.brandingInfo=null,this.cookieComplianceMethod="none",this.isExtraCallRequiredForDefaultHome="false",this.enablePriorityAndUrgencyImprovements=!1}setEnvironmentInfo(e){let n=e?.pxOperator?.pyUserName,o=n?y.decodeHtmlEntities(n):void 0,r={...e,pxOperator:e.pxOperator?{...e.pxOperator,...o?{pyUserName:o}:{}}:e.pxOperator};this.environmentInfoObject=r;let i=this.environmentInfoObject?.features||y.convertObjectWithStringToBoolean(this.environmentInfoObject?.pyFeatures)||{granularUIRefresh:!1};this.environmentInfoObject.features={...i,granularUIRefresh:i.granularUIRefresh||i.pyEnableGranularUIRefresh||!1},this.environmentInfoObject.pyGenAIEnabled=!!this.environmentInfoObject.pyGenAIEnabled,O.setNamespaceSupport(this.getFeatureMap()?.isNamespaceEnabled);let s=e.requestContext;if(Array.isArray(s)&&s.length>0){let a=s.filter(c=>c.IncludeInURL).map(c=>c.Key);a.length>0&&hb(a)}Us.setLanguagePack(this.environmentInfoObject.pyLanguagePacks||[])}isAnonymousUser(){return this.environmentInfoObject?.isAnonymousUser===!0}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 Se.getPortalName()}getStudioPath(){return Se.getRoutingInfo()?.studioPath}setCaseLabelFirstInTitle(e=!0){this.caseLabelFirstInTitle=e}getCaseLabelFirstInTitle(){return this.caseLabelFirstInTitle}getApplicationName(){return this.environmentInfoObject?.pxApplication?.pyRuleName}getUseLocale(){return this.environmentInfoObject?.pxLocale?.pyUseLocale}getAccessGroup(){return this.environmentInfoObject?.pxOperator?.pyAccessGroup}getApplicationID(){return this.environmentInfoObject?.pxApplication?.pyRuleId}getTimeZone(){return this.environmentInfoObject?.pxLocale?.pyTimeZone?.trim()||void 0}getTheme(e){return e?.type==="dark"?this.darkThemeOverrides:this.themeOverrides}setTheme(e,n){return n?.type==="dark"?this.darkThemeOverrides=e:this.themeOverrides=e,w.publish(d.PUB_SUB_EVENTS.UI_EVENTS.THEME_CHANGE,e),n?.type==="dark"?this.darkThemeOverrides:this.themeOverrides}getNavOrientation(){return this.nav?.orientation??this.environmentInfoObject?.pyNavOrientation}setNavOrientation(e){return this.nav={...this.nav,orientation:e},w.publish(d.PUB_SUB_EVENTS.UI_EVENTS.NAV_ORIENTATION_CHANGE,e),this.nav.orientation}setIsWebEmbed(e){return this.isWebEmbed=e,this.isWebEmbed}isWSSPortal(){return this.environmentInfoObject?.pyPortalTemplate===d.PORTAL_TYPE.WSS}isDefaultWSSPortal(){return this.isWSSPortal()&&!this.environmentInfoObject?.pyFullObjectDisplayTemplate}isInfinityRuntime(){return this.environmentInfoObject?.pyExecutionRuntimeName==="Infinity"}isSdkRuntime(){return this.environmentInfoObject?.pyExecutionRuntimeName==="SDK"}isGenAIEnabled(){return!!this.environmentInfoObject?.pyGenAIEnabled}getRewriteGenAIDP(){return this.environmentInfoObject?.pyRewriteGenAIDP}isBlueprintExperience(){return!!this.environmentInfoObject?.features?.fromBlueprintExperience}getBrandingInfo(e){return e?.type==="dark"?this.brandingInfoDark:this.brandingInfo}setBrandingInfo(e,n){return n?.type==="dark"?this.brandingInfoDark=e:this.brandingInfo=e,this.brandingInfo}getCookieComplianceMethod(){return this.cookieComplianceMethod}setCookieComplianceMethod(e){this.cookieComplianceMethod=e}setLocale(e){let o=e.replaceAll("-","_").split("_").slice(0,2);this.locale=o.join("-"),this.environmentInfoObject?.pxLocale&&(this.environmentInfoObject.pxLocale.pyUseLocale=this.locale)}getLocale=()=>this.locale;getEnvironmentKeys(){return Object.keys(d.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}isPegaMobile(){let e=Reflect.get(globalThis,"pms");if(typeof e!="object"||e===null)return!1;let n=Reflect.get(e,"plugins");return typeof n=="object"&&n!==null&&(!!Reflect.get(n,"c11n_spa")||!!Reflect.get(n,"c11n"))}isOfflineEnabled(){return typeof navigator<"u"&&(navigator.userAgent||"").includes("pxUsesOffline")}shouldUseURLParams(){return this.environmentInfoObject?.renderingMode==="FULL_PORTAL"&&this.getFeatureMap()?.pyUseURLParams}getBuiltOnAppNames(){return this.environmentInfoObject?.pxApplication?.pyBuiltOnApplications}setPreviewMode(){en.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){let n=this.environmentInfoObject?.features;return this.environmentInfoObject&&e&&(this.environmentInfoObject?.features?this.environmentInfoObject.features={...n,...e}:this.environmentInfoObject.features={...e}),this.getFeatureMap()}getFeatureMap(){return this.environmentInfoObject?.features||{}}getFeature(...e){if(e.length!==0)return y.getIn(this.getFeatureMap(),e)}setKeyMapping(e){return this.KeyMapping=e,this.KeyMapping}getKeyMapping(e){let n=this.KeyMapping[e];return n!==void 0?n:null}setCoexistenceMeta(e){return e&&(this.coexistenceMeta=e),this.getCoexistenceMeta()}getCoexistenceMeta(){return this.coexistenceMeta}isCoexistenceAppOfType(e){return!!(this.coexistenceMeta.isCoexistence&&this.coexistenceMeta.appType===e)}getGatewayType(){return this.environmentInfoObject?.gatewayType??""}isOptimizedCaseLoadingEnabled(){return this.getFeatureMap().pyEnableOptimizedCaseLoading||this.getFeatureMap().optimizedCaseLoading||!1}isOpenCasePageAfterCreateInMultiDocEnabled(){return this.getFeatureMap().pyOpenCasePageAfterCreateInMultiDoc||!1}getCaseTypeList(){return this.environmentInfoObject?this.environmentInfoObject?.pyCaseTypeList||[]:[]}getBlendedDataTypeList(){return this.environmentInfoObject?this.environmentInfoObject?.pyBlendedDataTypeList||[]:[]}isRuleBlendedModeEnabled(){return this.getPortalName()===d.RULE_BLENDED_MODE_PORTAL_NAME}supportsBlendedMode(e){return!this.isRuleBlendedModeEnabled()||!e||!(/^Rule-/i.test(e)||/^Data-Rule-AppMetadata/i.test(e))?!1:!this.getBlendedDataTypeList().some(n=>n.pyClassName===e)}getClassesAccessList(){return this.environmentInfoObject?.pyClassesAccessList?.pxResults??[]}getUserSettings(){return this.environmentInfoObject?.pyUserSettings||null}getLocalizationVersion(){let e=this.getFeatureMap().pyLocalizationVersion,n=this.getFeatureMap().localizationVersion;return n!==void 0?n:e!==void 0?parseInt(e,10):1}getLocalizationBundles(e=this.locale){return Us.getLocalizationBundles(e)}getAvailableLocalePacks(){return this.getFeatureMap()?.availableLanguagePacks||void 0}getIsExtraCallRequiredForDefaultHome(){return this.isExtraCallRequiredForDefaultHome}setIsExtraCallRequiredForDefaultHome(e){this.isExtraCallRequiredForDefaultHome=e}getEnablePriorityAndUrgencyImprovements(){return this.enablePriorityAndUrgencyImprovements}setEnablePriorityAndUrgencyImprovements(e){this.enablePriorityAndUrgencyImprovements=e}getInactivityTimeout(){let e=this.environmentInfoObject?.pxOperator?.pyAuthenticationTimeout;return e&&Number(e)}isUnifiedObject(){return this.environmentInfoObject?.features?.isUnifiedObject||!1}getRuntime(){return typeof window<"u"&&window.document?"Browser":"Native"}getInlineEditActions(e){return this.environmentInfoObject?.pyInlineEditActions?.filter(n=>n.pyClassName===e).map(n=>n.pyActionName)??[]}getInlineEditActionViews(e){return this.environmentInfoObject?.pyInlineEditActions?.filter(n=>n.pyClassName===e).map(n=>n.pyViewName)??[]}getFullObjectDisplayTemplate(){return this.environmentInfoObject?.pyFullObjectDisplayTemplate??void 0}setFullObjectDisplayTemplate(e){this.environmentInfoObject&&(this.environmentInfoObject.pyFullObjectDisplayTemplate=e),w.publish(d.PUB_SUB_EVENTS.UI_EVENTS.CASE_VIEW_TEMPLATE_CHANGE,e)}setNavAlignment(e){return this.nav?.alignment===e||(this.nav={...this.nav,alignment:e},this.environmentInfoObject&&(this.environmentInfoObject.pyNavAlignment=e),w.publish(d.PUB_SUB_EVENTS.UI_EVENTS.NAV_ALIGNMENT_CHANGE,e)),e}getNavAlignment(){return this.nav?.alignment??this.environmentInfoObject?.pyNavAlignment}setNavPosition(e){return this.nav?.position===e||(this.nav={...this.nav,position:e},this.environmentInfoObject&&(this.environmentInfoObject.pyNavPosition=e),w.publish(d.PUB_SUB_EVENTS.UI_EVENTS.NAV_POSITION_CHANGE,e)),e}getNavPosition(){return this.nav?.position??this.environmentInfoObject?.pyNavPosition}getMultiStepNavDisplay(){return this.environmentInfoObject?.pyMultiStepNavDisplay??void 0}setMultiStepNavDisplay(e){this.environmentInfoObject&&(this.environmentInfoObject.pyMultiStepNavDisplay=e),w.publish(d.PUB_SUB_EVENTS.UI_EVENTS.MULTI_STEP_NAV_DISPLAY_CHANGE,e)}getCaseStageDisplay(){return this.environmentInfoObject?.pyCaseStageDisplay??void 0}setCaseStageDisplay(e){this.environmentInfoObject&&(this.environmentInfoObject.pyCaseStageDisplay=e),w.publish(d.PUB_SUB_EVENTS.UI_EVENTS.CASE_STAGE_DISPLAY_CHANGE,e)}getPortalContentWidth(){return this.environmentInfoObject?.pyPortalContentWidth??void 0}setPortalContentWidth(e){this.environmentInfoObject&&(this.environmentInfoObject.pyPortalContentWidth=e),w.publish(d.PUB_SUB_EVENTS.UI_EVENTS.PORTAL_CONTENT_WIDTH_CHANGE,e)}},T=new q0;var hfe=t=>t.status==="fulfilled",yfe=async(t,e)=>{let n=T.getAvailableLocalePacks(),o=T.getLocalizationBundles(t),r;if(t&&n&&n.includes(t)?r=[Re("getLocalizationPack",{queryPayload:{locale:t},withCredentials:e})]:o.length>0&&(r=o.map(l=>Re("getLocalizationPack",{queryPayload:{version:l.pyBundleVersion,bundle:l.pyBundleName},withCredentials:e}))),!r||r.length===0)return;let i=200,s=201,a=await Promise.allSettled(r),c=Hi(t??"en-US");a.filter(hfe).forEach(({value:l})=>{if([i,s].includes(l.status)&&l.data){let u=l.data;Object.keys(u).forEach(p=>{c.setLocaleForRule(u[p],p)})}})},Sfe=async(t=T.getLocale(),{withCredentials:e=!1}={})=>{try{await yfe(t,e)}catch(n){console.warn(n)}},qp=Sfe;var W0=class{static regex=/\{@P[^}]*\s*:\s*[^}]*\}/g;static subRegex=/:'[a-zA-Z0-9!@#$&()\\-`.+,/\s"]*'/;static keyMap={};static formatLocaleKey(e){let n=0,o="";for(;n<=e.length;){let r=e.indexOf("{@P ",n);if(r===-1){o+=e.substring(n,e.length);break}o+=e.substring(n,r);let i=e.indexOf("}",n),s=e.substring(r,i+1),[a,c]=this.getKeyAndValue(s);this.addKeyToMap(a,c),o+=`${s.split(":")[0]}}`,n=i+1}return o}static getKeyAndValue(e){let n=e.indexOf(":"),o=e.indexOf("}");return[`${e.substring(0,n)}}`,e.substring(n+1,o)]}static addKeyToMap(e,n){this.keyMap[e]=n}static replaceWithValue(e){let n=0,o="";for(;n<=e.length;){let r=e.indexOf("{@P ",n);if(r===-1){o+=e.substring(n,e.length);break}o+=e.substring(n,r);let i=e.indexOf("}",n),s=e.substring(r,i+1);o+=this.keyMap[s],n=i+1}return o}},K0=W0;var yb=class{GENERIC_BUNDLE_KEY="@BASECLASS!GENERIC!PYGENERICFIELDS";FIELD_LABELS_BUNDLE_KEY="@BASECLASS!LABEL!PYFIELDLABELS";GENERIC_BUNDLE_KEY_LP="GENERIC!GENERICFIELDS";MESSAGE_BUNDLE_KEY="@BASECLASS!MESSAGE!PYMESSAGES";BASE_CLASS="@BASECLASS";DATA_PAGE_LOCALECONTEXT="datapage";localeStore;timezone;availableLangPacks;constructor(){this.localeStore={},this.getLocaleValue=this.getLocaleValue.bind(this)}setLocaleForRule=(e,n)=>{let o=e.LocaleContent,r=n.toUpperCase();r.startsWith("@BASECLASS!DATAPAGE!")&&r.split(/[!#]/).length<4?Object.entries(o).forEach(([i,s])=>{s!==null&&typeof s=="object"&&"fields"in s&&this.updateLocaleStore(s,`${r}#${i}`.toUpperCase())}):r==="GENERIC!GENERICFIELDS"?Object.entries(o).forEach(([i,s])=>{s!==null&&typeof s=="object"&&this.sanitizeLocaleField(s,i.toUpperCase())}):this.sanitizeLocaleField(o,r)};updateLocaleStore=(e,n)=>{let o=e.fields||e,r=this.localeStore[n];r?y.mergeDeep(o,r):o&&typeof o=="object"&&(this.localeStore[n]=o)};sanitizeLocaleField=(e,n)=>{["DASHBOARDSMANAGER","DATAEXPLORER","INSIGHT"].includes(n.toUpperCase())&&Object.entries(e).forEach(([,r])=>{r!==null&&typeof r=="object"&&"fields"in r&&this.updateLocaleStore(r,n)}),this.updateLocaleStore(e,n)};getLocaleForRule(e){return this.localeStore[e]}resetLocaleStore=()=>{this.localeStore={}};getLocaleValue(e,n,o,r){let i=this.#e(o,n),s=this.#t(e);s&&(e=K0.formatLocaleKey(e));let a=i?this.localeStore[i.toUpperCase()]??{}:{},c=r?this.localeStore[r.toUpperCase()]??{}:{};return o?.toUpperCase()==="MESSAGES"&&typeof e=="string"?this.getLocalizedErrorMessage(a,e)||e:s?K0.replaceWithValue(a[e]||c[e]||e):a[e]||c[e]||e}#e(e,n){return e?.toUpperCase().startsWith("@BASECLASS!DATAPAGE!")?n?`${e}#${n}`:e:e||n}getParagraphLocaleValue(e,n){let o=`${e}!${d.PARAGRAPH}!${n}`,r=this.localeStore[o.toUpperCase()];if(r){let i=typeof globalThis.atob=="function"?decodeURIComponent(globalThis.atob(r.content).split("").map(s=>`%${`00${s.charCodeAt(0).toString(16)}`.slice(-2)}`).join("")):r.content;return{category:r.category,content:i}}return null}getPortalLocaleReference(e){return T.getLocalizationVersion()!==2?"":e?`PORTAL!${e}`.toUpperCase():`PORTAL!${T.getPortalName()}`.toUpperCase()}getCaseLocaleReference(e){return e?`CASE!${e}`.toUpperCase():null}getLocalizationVersion(){return 2}async getLocaleJsons(e){if(!await this.isCurrentLocalePackAvailable())return[];let n=T.getUseLocale(),o=[],r=PCore.getLocaleUtils().localeStore;if(e=e.filter(i=>!r[i]),e=e.map(i=>i.toUpperCase()),e.length>0){let i=e.map(a=>({localeRuleKey:a,promise:We.getSvcLocale(n,`${a}.json`)})),s=await Promise.allSettled(i.map(a=>a.promise));await Promise.all(s.map(async(a,c)=>{if(a.status==="fulfilled"){let l=i[c],u;try{u=await a.value.json()}catch{u=null}u&&o.push({localeRuleKey:l.localeRuleKey,jsonData:u})}}))}return o}async loadLocaleResources(e){await Us.loadLocaleBundle(e),await Promise.all(e.map(n=>qp(n)))}setTimezone(e){this.timezone=e}getTimeZoneInUse(){let e=Intl.DateTimeFormat().resolvedOptions().timeZone;return this.timezone||e}matchPatternWithText(e,n){let o=n,r=[];for(let i=0;i<e.length;){let s=e[i];if(s.length!==0){let a=o.indexOf(s);if(a===-1)return null;if(i>0){let c=o.slice(0,a);r.push(c)}o=o.slice(a+s.length)}i+=1}return o&&r.push(o),r}getLocalizedErrorMessage(e,n){let o="";if(e[n])return e[n];for(let r of Object.keys(e)){let i=r.split(/\{\d+\}/),s=this.matchPatternWithText(i,n);if(s){let a=e[r];if(o=this.replacePlaceHolders(s,a),o)return o}}return o}replacePlaceHolders(e,n){for(let o=0;o<e.length;){if(!n.includes(`{${o+1}}`))return"";n=n.replace(`{${o+1}}`,e[o]),o+=1}return n}async isCurrentLocalePackAvailable(){let e=T.getLocale();return this.availableLangPacks||(this.availableLangPacks=await We.getSvcAvailableLocales()),e&&this.availableLangPacks.includes(e)}getBaseComponentLabels=()=>this.getLocaleForRule("COSMOSFIELDS");#t(e){let n=!1;return e&&typeof e=="string"&&(n=e.includes("@P ")),n}},zn=t=>{let e=t??T.getLocale()??"en-US";return Hi(e)};$e.registerHandler("@L",(t,e)=>e?e.getLocalizationService(e.getLocaleRuleName()).getLocalizedText(t):t);$e.registerHandler("@P",(t,e,n)=>n?Q.getLitePropertyValue(n):e.getValue(t));$e.registerHandler("@E",(t,e,n)=>{try{let o=S0(t),r=E0(o);return A0(r,e,n)}catch{}return!0});$e.registerHandler("@W",(t,e,n)=>{let o;if(n){let{pageReference:r,context:i}=n;o=Ss(r,`.${d.SUMMARY_OF_WHEN_CONDITIONS}.${t}`,i)}else o=e.getContextDataValue(`.${d.SUMMARY_OF_WHEN_CONDITIONS}.${t}`);return o===!0||o==="true"});function Efe(t,e,n,o){let r="",i=n;if(e.join(d.HASH_DELIMITER)&&(r=y.getHashedString(e.join(d.HASH_DELIMITER)),i=n+d.UNDERSCORE_STRING+r),o){let l=oi(),u=l?l[n]?.[i]:{};return Array.isArray(u?.[O.getDefaultQualifiedName("pxResults")])?u[O.getDefaultQualifiedName("pxResults")]:[]}let c=(t.getDataObject()?.[n]||{})?.[i]||{};return Array.isArray(c?.[O.getDefaultQualifiedName("pxResults")])?c[O.getDefaultQualifiedName("pxResults")]:[]}function Afe(t,e,n){let o=ge.getPropertyName(t?.propertyForDisplayText??""),r=ge.getPropertyName(t?.propertyForValue??""),i=n?.lastIndexOf(".")??-1,s=i>0?n?.substring(0,i):"",a=n?.substring(i+1),c=s?`${e.getPageReference()}.${s}`:void 0,l=`.${d.SUMMARY_OF_EXPRESSIONS}.${t?.name}`,u=e.getContextDataValue(l,c)??e.getContextDataValue(l)??[];if(Array.isArray(u)&&u.some(p=>Object.hasOwn(p,"field"))){let p=u.find(m=>m.field===a);u=Array.isArray(p?.results)?p.results:[]}return u.map(p=>({key:p[r]||p[`.${r}`],value:p[o]||p[`.${o}`]}))}$e.registerHandler("@ASSOCIATED",(t,e)=>{let n={},o=[],r="",i="",s=e.getPageReference();if(t.startsWith(".")){r=`${s}.${t.substring(1)}`;let _=t.split(".").filter(P=>!!P);_.length>1&&(_.pop(),i=_.join(".")),n=e.getFieldMetadata(t.substring(1))}else n=e.getFieldMetadata(t),r=t;let a=n?.datasource?.tableType,c=n?.datasource?.mode===d.READONLY,l=n?.datasource?.name||"",u=e.getComponentConfig();if(u&&u.deferDatasource&&((typeof u.datasourceMetadata!="object"||u.datasourceMetadata===null)&&(u.datasourceMetadata=`@FIELD_META ${t}`,e.setStateProps({datasourceMetadata:u.datasourceMetadata})),a===d.DATA_PAGE))return null;if(a===d.DECISION||a===d.RULE_REFERENCE)return Afe(n?.datasource,e,t.substring(1));if(a!==d.DATA_PAGE){let _=e.getLocalizationService(n?.localeReference);return n?.datasource?.records?.map(P=>({key:P.key,value:_.getLocalizedText(P.value)}))}let p=ge.getPropertyName(n?.datasource?.propertyForDisplayText),m=ge.getPropertyName(n?.datasource?.propertyForValue),f=Array.isArray(n?.datasource?.parameters)?n?.datasource?.parameters:[],g=e.getContextName(),h=[];if(f.forEach(_=>{if(ge.isProperty(_?.value)){let P=ie(`.${y.getFullPropertyReference([i,ge.getPropertyName(_.value)])}`,s,g);h.push(y.getFullPropertyReference([s,i,ge.getPropertyName(_?.value)])),(P==null||P==="")&&(P=d.NULL_STRING),o.push(P)}else o.push(_?.value||d.NULL_STRING)}),g){let _=lc.getContextObjectByName(g)||{};h.forEach(P=>{if(P in _){let N=_[P];_[P]=[...new Set([...N,r])]}else _[P]=[r]}),lc.addContextName(g,_)}let E=Efe(e,o,l,c),C=e.getLocalizationService(),I=_=>C.getLocalizedDataPage(_,l,p);return E.map(_=>{let P=_[p]||_[`.${p}`];return typeof P=="string"&&(P=I(P)),{key:_[m]||_[`.${m}`],value:P}})});$e.registerHandler("@ROUTING_INFO",(t,e)=>mf(e.getContainerName(),e.getContextName()));$e.registerHandler("@ENV",(t,e)=>{let n=xA(t);return n?n(e):t});$e.registerHandler("@DATASOURCE",(t,e)=>{let n=e.getSharedDataPageForReferenceList()||e.getValue(t)||[],o=e.getComponentConfig(),r=Object.keys(o).find(i=>o[i]?.source?.includes(t));if(r){let{fields:i,copyAll:s,filterDownloadedFields:a}=o[r],c=[];return n.forEach(l=>{let u={};s||a?Object.keys(l).forEach(p=>{let m=ge.getPropertyName(p);u[m]=l[m]}):Object.keys(i).forEach(p=>{let m=ge.getPropertyName(i[p]);u[p]=l[m]}),c.push(u)}),c}return[]});$e.registerHandler("@FIELD_META",(t,e)=>{let n={};t.startsWith(".")?n=e.getFieldMetadata(t.substring(1)):n=e.getFieldMetadata(t);let o;if(n&&n.datasource&&n.datasource.parameters){let r="",i=t.split(".").filter(s=>!!s);if(i.length>1&&(i.pop(),r=`.${i.join(".")}`),Array.isArray(n.datasource.parameters)){let s=[];n.datasource.parameters.forEach(a=>{let c={},{name:l,value:u}=a;c.name=l,typeof u=="string"&&u.startsWith("@P")?c.value=`@P ${r}${u.substring(3)}`:c.value=u,s.push(e.resolveConfigProps(c))}),o=s}else o=e.resolveConfigProps(n.datasource.parameters);n={...n,datasource:{...n.datasource,parameters:o}}}return n});$e.registerHandler("@USER",(t,e,n)=>{let o=n?Q.getLitePropertyValue(n,t):e.getValue(t),r=n?Q.getReferencedUser(o,n):e.getReferencedUser(o);return{userId:o,userName:r?r.UserName:null}});$e.registerHandler("@ACTIVE_CASES",(t,e)=>Nr.getOpenedCaseItems(`${e.getContextName()}/${e.getContainerName()}`));$e.registerHandler("@LR",t=>t);$e.registerHandler("@CASE",(t,e)=>t===d.ID?e.getCaseInfo().getKey():t);$e.registerHandler("@SHARED",t=>wn.getSharedState(t));$e.registerHandler("@PARAGRAPH",(t,e)=>{let{useDecision:n,isBanner:o,messageType:r,dismissBanner:i}=ko.getParagraphProperties(t,e),s=ko.hasDecisionBannerContent(t,e);return n&&s?ko.processBannerDecisionParagraph(t,e):o?{htmlContent:ko.processParagraph(t,e),messageType:r,dismissBanner:i}:ko.processParagraph(t,e)});$e.registerHandler("@FORMAT",(t,e)=>{let n=e.getCurrentClassID(),o=J0(t,n);if(!o?.dynamicContents?.length)return null;let{dynamicContents:r}=o;for(let i=0;i<r.length-1;i+=1)if(Q.resolveWhen(r[i].when,e))return{pattern:r[i].content};return{pattern:r[r.length-1].content}});$e.registerHandler("@FILTERED_LIST",(t,e)=>{let n=t.substring(1,t.indexOf("[")),o=t.substring(t.indexOf("]")+2),r=t.substring(t.indexOf("[")+1,t.indexOf("]"));if(!e)return null;let{useCustomContext:i}=e,s;return y.isEmpty(i)?s=e.getValue(`.${n}`):(s=i,s=y.getIn(s,n)),s&&o.length>0?(r&&(s=s.filter(a=>ib(r,a))),s.map(a=>y.getIn(a,o))):null});$e.registerHandler("@ADDRESS",(t,e)=>{let n=e.getValue(t)?.[O.getDefaultQualifiedName("pyCountry")];return n?`${PCore.getDefaultQualifiedName("pyAddressForm")}_${n}`:PCore.getDefaultQualifiedName("pyAddressForm")});$e.registerHandler("@DATATYPE",(t,e)=>e.getValue(t));$e.registerHandler("@ATTACHMENT",(t,e,n)=>{let o;return n?o=Q.getLitePropertyValue(n):o=e.getValue(t),Zu.prepareAttachmentData(o)});var Cfe=t=>t.startsWith(".")?t.slice(1):t,ZH=t=>{let e=t.lastIndexOf(".");return e<0?t:t.slice(e+1)};$e.registerHandler("@FL",(t,e)=>{let n=Cfe(t),o=e.getFieldMetadata(n);return!o||!o.label?ZH(n):e.getLocalizationService(o.localeReference).getLocalizedText(o.label)});$e.registerHandler("@DEFERRED",(t,e)=>e.getFieldMetadata(t)?.isDeclarativeTarget?{isDeferred:!0,propertyName:t}:e.getValue(t));$e.registerHandler("@GENAICOACH",(t,e)=>Y0(t,e.getCurrentClassID()));$e.registerHandler("@AIAGENT",(t,e)=>{let n=Z0(t,e.getCurrentClassID());if(n)return n;let o=e.getComponentConfig();if(o){let r=o?.coaches?.find(i=>i?.config?.coach?.substring(9)===t&&i?.config?.ruleNamespace)?.config;if(r?.label){let i={label:r.label};e.resolveConfigProps({label:r.label},i);let s=i.label;return{insName:T.getFeatureMap()?.isNamespaceEnabled&&t.includes(d.DOUBLE_UNDERSCORE_STRING)?t:`${r.ruleNamespace}${d.DOUBLE_UNDERSCORE_STRING}${t}`,label:e.getLocalizedValue(s),type:"agent"}}}return null});$e.registerHandler("@REFRESH",(t,e)=>{let n=e.getCaseInfo().getKey(),o=e.getContextName(),r=e.getPageReference(),i={autoDetectRefresh:!0,preserveClientChanges:!1};Bi.registerForRefresh("PROP_CHANGE",e.getActionsApi().refreshCaseView.bind(e.getActionsApi(),n,"",r,{...i,refreshFor:`${r.replace("caseInfo.content","")}${t}`,resetForm:!0}),`${r}${t}`,`${o}/${r}`,o)});$e.registerHandler("@DW",(t,e,n)=>{let o,r=`${d.CONTEXT_DATA}.${d.SUMMARY_OF_DYNAMIC_WHENS}.${t}`;if(n){let{context:i}=n??{};o=ie(r,null,i)}else o=e.getValue(r);return o===!0||o==="true"});$e.registerHandler("@CA",(t,e,n)=>n?Q.getLitePropertyValue(n):e.getValue(t));function Sb(t){return t&&t.startsWith("@")?t.replace(/^@\w+\s+\./,""):t}function Ife(t,e){let n=t.value&&typeof t.value=="string"&&Sb(t.value);return n?n===e:!1}function QH(t,e){let n=t.authorContext;return typeof n!="string"||!n?!1:(n.startsWith(".")?n.substring(1):n)===e}function X0(t,e,n){let o=t.config;if(!o?.name||typeof o.name!="string")return null;let r=e(o.name);return r?Array.isArray(r)?r.length===1?r[0]:r.find(i=>i.classID===o.ruleClass)??r.find(i=>i.classID===n)??null:r:null}function e5(t,e,n,o,r=[]){if(t.config&&Ife(t.config,e)&&r.push({type:t?.type,config:t.config}),!t.children)return r;for(let i=0;i<t.children.length;i+=1){let s=t.children[i],a=s.type==="reference"?X0(s,n,o):s;a&&e5(a,e,n,o,r)}return r}var _fe=new Set(["autocomplete","dropdown","combobox"]);function t5(t){let e=t.config;return e?e.template==="DataReference"&&typeof e.displayAs=="string"&&_fe.has(e.displayAs.toLowerCase())&&e.selectionMode!=="multi":!1}function bfe(t){let e=t?.children;return Array.isArray(e)&&e.length>0?e[0]:null}function Tfe(t){let e=t.config??{},n={};return(e.contextClass!==void 0||e.targetObjectClass!==void 0)&&(n.contextClass=e.contextClass??e.targetObjectClass),e.referenceList!==void 0&&(n.referenceList=e.referenceList),n.parameters=e.parameters,n.name=e.name,n}function vfe(t){let n=(Array.isArray(t?.inheritedProps)?t.inheritedProps:[]).reduce((r,i)=>(typeof i!="object"||i===null||Array.isArray(i)||"prop"in i&&typeof i.prop=="string"&&"value"in i&&(r[i.prop]=i.value),r),{}),o={};return o.referenceType=t.referenceType,o.ruleClass=t.ruleClass,o.authorContext=t.authorContext,t.visibility!==void 0&&(o.visibility=t.visibility),t.readOnly!==void 0&&(o.readOnly=t.readOnly),t.disabled!==void 0&&(o.disabled=t.disabled),t.required!==void 0&&(o.required=t.required),t.isManyToMany!==void 0&&(o.isManyToMany=t.isManyToMany),{...o,...n}}function n5(t,e,n){let o=Tfe(t),r=bfe(t),i=vfe(e),s={...r?.config,...o,...i};return Array.isArray(n)&&n.length>0&&(s.descriptors=n),s.dataRelationshipContext=s.contextClass&&s.name?s.name:null,{type:r?.type,config:s}}function Rfe(t,e,n,o,r){try{if(!t.name||typeof t.name!="string")return null;let i=e(t.name),s;if(Array.isArray(i))s=i;else if(i)s=[i];else return null;let a=s.find(l=>l.classID===t.ruleClass);if(!a||!t5(a))return null;let c=[];if(r){let l=typeof t.ruleClass=="string"&&t.ruleClass?t.ruleClass:o,u=r(n,l);u&&typeof u=="object"&&"descriptors"in u&&u.descriptors&&Array.isArray(u.descriptors)&&u.descriptors.length>0&&(c=u.descriptors)}return n5(a,t,c)}catch{return null}}function r5(t,e,n,o=[],r="",i){if(t.config&&QH(t.config,e)){let s=Rfe(t.config,n,e,r,i);s&&o.push(s)}if(!t.children)return o;for(let s=0;s<t.children.length;s+=1){let a=t.children[s],c=a.type==="reference"&&!(a.config&&QH(a.config,e))?X0(a,n,r):a;c&&r5(c,e,n,o,r,i)}return o}function Pfe(t,e){return!t||typeof t!="object"?null:Array.isArray(t)?t.find(o=>o.classID===e)??null:t}function Nfe(t){let e=T.getInlineEditActionViews(t);return e&&e.length>0?e[0]:O.getDefaultQualifiedName("pyEdit")}function o5(t,e){let n=Nfe(t),o=e(n);return Pfe(o,t)}function eM(t,e,n,o){let r=o5(e,n);if(!r)return[];let i=e5(r,t,n,e);return i.length>0?i:r5(r,t,n,[],e,o)}function XH(t,e){let n=t.parameters;return!n||typeof n!="object"||Array.isArray(n)?!1:Object.values(n).some(o=>{let r=Sb(o);return e.some(i=>r===i||r.startsWith(`${i}.`))})}function Q0(t,e,n,o,r=[]){if(t.config&&XH(t.config,e)&&t.type!=="View"&&r.push({type:t.type,config:t.config,children:t.children}),!t.children)return r;for(let i=0;i<t.children.length;i+=1){let s=t.children[i];if(s&&s.type==="reference"&&s.config){let a=X0(s,n,o);a&&a.config&&(t5(a)&&XH(a.config,e)?r.push(n5(a,s.config)):Q0(a,e,n,o,r))}else Q0(s,e,n,o,r)}return r}function i5(t,e,n,o){let r=o5(e,n);if(!r)return[];let i=eM(t,e,n);if(!i||i.length===0)return[];let s=[],a=Sb(i[0].config.value);if(a&&s.push(a),o){let c=o(t,e);c&&!Array.isArray(c)&&(c?.descriptors||[]).forEach(u=>{let p=Sb(u);p&&!s.includes(p)&&s.push(p)})}return Q0(r,s,n,e)}var tM="D_pzRuleLookup",Eb="pzInsKey",Ab=t=>t.startsWith("Rule-"),Ofe="Data-Rule-AppMetadata",nM=t=>typeof t=="string"&&(Ab(t)||t.startsWith(Ofe))&&T.isRuleBlendedModeEnabled(),s5=()=>({isAlternateKeyStorage:!1,parameters:{[Eb]:"@P .pzInsKey"}});var c5={},l5={},Ib={},aM=0,_b=!1,cM={},Cb={},rS={},iM={},sM={},Wi={},bb={},u5={},d5={},rM={},oM={},xfe=(t,e,n,o)=>{let r=Array.isArray(n)?n:[n];(Array.isArray(o)?o:[o]).forEach(s=>{let a=r.findIndex(c=>c.classID===s.classID);if(a===-1)r.push(s);else{let c={isDeclarativeTarget:!1},l={...r[a],...c,...s};r[a]=l}}),e[t]=r.length===1?r[0]:r},ro=(t={},e={})=>{if(Object.keys(e).length===0){y.copy(t,e);return}Object.keys(t).forEach(n=>{let o=t[n],r=e[n];r?xfe(n,e,r,o):e[n]=o})},ft=(t,e="")=>{if(!t)return null;let n=Cb[t];if(!n)return null;if(!e)return y.deepClone(n);let o;return Array.isArray(n)?o=n.find(r=>r.classID.toLowerCase()===e.toLowerCase()||r.associationClassID?.toLowerCase()===e.toLowerCase())||null:o=n.classID.toLowerCase()===e.toLowerCase()||n.associationClassID?.toLowerCase()===e.toLowerCase()||(n.type==="Page"||n.type==="Page List")&&n?.pageClass?.toLowerCase()===e.toLowerCase()?n:null,o?y.deepClone(o):null},Hi=t=>(rM[t]||(rM[t]=new yb),rM[t]),Dfe=(t,e)=>(oM[t]||(oM[t]=e()),oM[t]),Tb=(t,e,n,o=[])=>{if(!e||!t)return null;if(!t.includes(".")){let a,c=ft(t,e);return o.length&&(a=o.join(".")),{...c,embeddedType:n,category:a}}let[r,...i]=t.split("."),s=ft(r,e);return s&&o.push(s.label),Tb(i.join("."),s?.pageClass,s?.type,o)},Uf=t=>{Object.keys(t).length!==0&&(ro(t,Ib),_b&&(aM+=1))},$fe=()=>aM,r0=()=>{_b=!0},o0=()=>{_b=!1},lM=t=>{ro(t,cM)},wfe=t=>{t.views&&Object.keys(t.views).length>0&&(ro(t.views,Ib),_b&&(aM+=1)),t.navigations&&ro(t.navigations,cM),t.personalizations&&ro(t.personalizations,iM),t.insights&&ro(t.insights,sM),t.paragraphs&&ro(t.paragraphs,c5),t.formats&&ro(t.formats,l5),t.dataTypes&&ro(t.dataTypes,Wi),t.datapages&&ro(t.datapages,bb),t.genAICoaches&&ro(t.genAICoaches,u5),t.AIAgents&&ro(t.AIAgents,d5)},Mfe=t=>{let e=t.fields||{};Object.keys(e).forEach(n=>{let o=e[n];if(Array.isArray(o)){if(o.forEach(r=>{t.datapages&&r.datasource&&r.datasource.tableType==="DataPage"&&(r.datasource.mode=t.datapages?.[r.datasource.name].mode);let i=Gi(kr.FIELD,n,r.definedOnClassID??r.classID);r.localeReference=i}),o.length===1){let[r]=o;e[n]=r}}else t.datapages&&o?.datasource&&o.datasource.tableType==="DataPage"&&(o.datasource.mode=t.datapages[o.datasource.name].mode)})},Rf=t=>{wfe(t),Mfe(t);let{datapages:e={}}=t;Object.keys(e).forEach(n=>{rS[n]=e[n]}),ro(t.fields,Cb)},ac=t=>Ib[t],dR=(t,e)=>{let n=Ib[t];return Array.isArray(n)?n.some(o=>o.classID===e):n?.classID===e},uM=t=>cM[t],$n=t=>t in rS?rS[t]:null,vb=t=>t in iM?iM[t]:null,dM=t=>t in sM?sM[t]:null,pM=t=>{let e={};return Object.keys(Cb).forEach(n=>{let o=Cb[n],r;Array.isArray(o)?r=o.find(i=>t===i.classID):t===o.classID&&(r=o),r&&(e[n]=y.deepClone(r))}),e},kfe=(t,e)=>{let o=ft(t,e)?.datasource?.parameters;return o?y.deepClone(o):null},nl=(t,e)=>{let n=null,o=c5[t];return o&&(Array.isArray(o)?n=o.find(r=>r.classID===e):o.classID===e&&(n=o)),n?y.deepClone(n):null},J0=(t,e)=>{let n=null,o=l5[t];return o&&(Array.isArray(o)?n=o.find(r=>r.classID===e):o.classID===e&&(n=o)),n?y.deepClone(n):null},Y0=(t,e)=>{let n=null,o=u5[t];return o&&(Array.isArray(o)?n=o.find(r=>r.classID===e):o.classID===e&&(n=o)),n?y.deepClone(n):null},Z0=(t,e)=>{let n=null,o=d5[t];return o&&(Array.isArray(o)?n=o.find(r=>r.classID===e):o.classID===e&&(n=o)),n?y.deepClone(n):null},Rw=t=>{if(t in Wi){let{savableDataPage:e}=Wi[t];return e}return null},a5=(t,e)=>({isAlternateKeyStorage:e,parameters:t.reduce((n,o)=>(n[o.name]=o.linkedField?`@P .${o.linkedField}`:`@P .${o.name}`,n),{})}),Lfe=t=>{let e=Object.entries(bb).find(([,o])=>o.classID===t&&o.structure==="page");if(e)return e[0];let n=Object.entries(rS).find(([,o])=>o.classID===t&&o.structure==="page");return n?n[0]:null},Ufe=t=>{let e=bb[t];if(e?.parameters?.length)return a5(e.parameters,!!e.isAlternateKeyStorage);let o=rS[t]?.parameters;if(o){let r=Array.isArray(o)?o:[o];if(r.length>0)return a5(r.map(i=>({name:i.name,linkedField:i.linkedField})),!1)}return null},p5=t=>{if(Object.hasOwn(Wi,t)){let{lookupDataPage:n,lookupDataPageInfo:o}=Wi[t];if(n||!Ab(t))return{dataPageName:n,info:o}}let e=Lfe(t);return e?{dataPageName:e,info:Ufe(e)}:Ab(t)?{dataPageName:tM,info:s5()}:{dataPageName:null,info:null}},Pw=t=>{if(t===tM)return[{keyName:Eb,isAlternateKeyStorage:!0,linkedField:Eb}];let e=bb[t];if(!e)return null;let{classID:n,isAlternateKeyStorage:o,parameters:r}=e;if(o)return r.map(s=>({keyName:s.name,isAlternateKeyStorage:o,linkedField:s.linkedField}));let i=Wi[n];return i?i.classKeys.map(s=>({keyName:s,isAlternateKeyStorage:o})):[]},Nw=t=>{if(nM(t))return p5(t).dataPageName;if(t in Wi){let{lookupDataPage:e}=Wi[t];return e}return null},Ow=t=>{if(nM(t))return p5(t).info;if(Object.hasOwn(Wi,t)){let{lookupDataPageInfo:e}=Wi[t];return e}return null},l0=(t,e)=>{let n=t.split("."),o=n.pop(),r=new Na({options:{pageReference:`${n.join(".")}`,context:e}}),i=ft(o,r.getCurrentClassID())?.additionalInformation;if(!i?.includes("@PARAGRAPH"))return i;let s=ge.trimAnnotation(i);return ko.processParagraph(s,r)},zfe=(t,e)=>{let n=t.split("."),o=n.pop(),r=new Na({options:{pageReference:`${n.join(".")}`,context:e}}),i=ft(o,r.getCurrentClassID()),s={};return r._classID=r.getCurrentClassID(),r.resolveConfigProps(i,s),s},jfe=(t,e)=>eM(t,e,ac,ft),Ffe=(t,e)=>i5(t,e,ac,ft);var mM=class t{name;cascadeSubscribers;cascadeResetSubscribers;listChangeSubscribers;constructor(){this.name="CascadeManager",this.cascadeSubscribers={},this.cascadeResetSubscribers={},this.listChangeSubscribers=[]}registerResetDependencies(e,n,o,r,i,s="singleRecord"){if(!e||!o||!r?.length)return;let a=o.startsWith(".")?`${n}.${o.substring(1)}`:o,c=this.cascadeResetSubscribers[e]||{},l=this._handlePageReference(n,o,i);r.forEach(u=>{if(!u)return;let p=u.startsWith(".")?u.substring(1):u;if(p=this._resolveDependentPropertyReference(l,p),p in c){let m=c[p];m.find(g=>g.propertyName===a)||m.push({propertyName:a,mode:s})}else c[p]=[{propertyName:a,mode:s}]}),Object.keys(c).length>0&&(this.cascadeResetSubscribers[e]=c)}deregisterResetDependencies(e,n,o,r,i){if(!e||!o||!r?.length)return;let s=o.startsWith(".")?`${n}.${o.substring(1)}`:o,a=this.cascadeResetSubscribers[e]||{},c=this._handlePageReference(n,o,i);r.forEach(l=>{if(l){let u=l.startsWith(".")?l.substring(1):l;if(u=this._resolveDependentPropertyReference(c,u),u in a){let p=a[u];y.removeExistingDependentProperty(p,s)}}}),Object.keys(a).length>0&&(this.cascadeResetSubscribers[e]=a)}getResetDependencies(e,n){return this.cascadeResetSubscribers[e]?.[n]||[]}purgeResetDependencies(e){e&&this.cascadeResetSubscribers[e]&&delete this.cascadeResetSubscribers[e]}registerFields(e,n,o,r,i){this.cascadeSubscribers[e]=this.cascadeSubscribers[e]||{},o?.forEach(s=>{this.cascadeSubscribers[e][`${n}${s}`]=this.cascadeSubscribers[e][`${n}${s}`]||{};let a=this.cascadeSubscribers[e][`${n}${s}`];if(!a[i]){a[i]=r;let c=ie(s,n,e);a.previousValue=typeof c=="object"?null:c}})}registerListField(e,n,o,r,i){let s=t._getFieldsForList(e,n,o);s.length>0&&(this.registerFields(e,n,s,r,i),Lp.enableCascade(e))}unRegisterListField(e,n,o,r){let i=t._getFieldsForList(e,n,o);i.length>0&&this.unRegisterFields(e,n,i,r)}static _getFieldsForList(e,n,o){let r=[],i=ft(o,ie("classID",n,e));return i&&!Array.isArray(i)&&i.datasource&&i.datasource.parameters&&Object.values(i.datasource.parameters).forEach(s=>{if(ge.isProperty(s)){let a=ge.trimAnnotation(s);r.push(a)}}),r}unRegisterFields(e,n,o,r){this.cascadeSubscribers[e]&&o?.forEach(i=>{if(!this.cascadeSubscribers[e][`${n}${i}`])return;let s=this.cascadeSubscribers[e][`${n}${i}`];s[r]&&delete s[r]})}triggerCascade(e,n,o,r){let i=!1;this.cascadeSubscribers[e]&&this.cascadeSubscribers[e][n]&&(Object.keys(this.cascadeSubscribers[e][n]).forEach(s=>{let a=this.cascadeSubscribers[e][n];s!=="previousValue"&&a.previousValue!==o&&(i=!0,r?r.add(a[s]):a[s](n,o))}),i&&(this.cascadeSubscribers[e][n].previousValue=o))}purgeCascadeFields(e){delete this.cascadeSubscribers[e]}handleServerChanges(e,n=[],o=[]){if(!e)return;let r=new Set;o.forEach(i=>{let s=ie(i,"",e);this.triggerCascade(e,i,s,r)}),r.forEach(i=>{i()}),!(this.listChangeSubscribers.length===0||n.length===0)&&n.forEach(i=>{this.listChangeSubscribers.forEach(s=>{let a=ie(i,"",e);s(e,i,a)})})}_updateChangedProperties(e,n,o,r,i,s,a,c){let l=o&&c.some(u=>r.startsWith(u));if(e!==n||l){let u=r.lastIndexOf("."),p=r.substring(0,u),m=r.substring(u);if(yd.getMessages({type:"error",property:m,context:i,pageReference:p})?.length>0&&a.push(r),!o)return;s.push(r)}}isChangedListPropertyExist(e){let n=!0;return(this.listChangeSubscribers.length===0||!y.isValidPageListProperty(e))&&(n=!1),n}_getServerProperties(e,n,o,r,i,s,a){if(typeof e!="object"){i.push(o.replace(/\.(\d+)/g,"[$1]"));let l=this.isChangedListPropertyExist(o);o=o.replace(/\.(\d+)/g,"[$1]");let u=ie(o,"",n);if(u===void 0&&!e&&e!==0)return;this._updateChangedProperties(u,e,l,o,n,r,s,a);return}let c=Object.keys(e??{});for(let l=0,u=c.length;l<u;l+=1){let p=c[l],m=`${o}.${p}`;if(Array.isArray(e[p])){let f=ie(m,"",n);(!f||f?.length!==e[p].length)&&a.push(m.replace(/\.(\d+)/g,"[$1]"))}this._getServerProperties(e[p],n,m,r,i,s,a)}}getServerProperties(e,n,o=d.CASE_INFO.CASE_INFO_CONTENT){let r=[],i=[],s=[],a=[],c=y.getIn(e,o);return!c||!n?{changedListProperty:r,leafProperty:s,changedPropertyWithError:i}:(this._getServerProperties(c,n,o,r,s,i,a),{changedListProperty:r,leafProperty:s,changedPropertyWithError:i})}_handlePageReference(e,n,o){let r=e;if(o==="Page"&&n.startsWith(".")&&n.slice(1).includes(".")){let i=n.substring(0,n.lastIndexOf("."));r=`${e}${i}`}return r}_resolveDependentPropertyReference(e,n){let o=n.match(/^(Parent(?:\.Parent)*)(?:\.(.*))?$/);if(!o)return y.getFullPropertyReference([e,n]);let r=o[1].split(".").length,i=o[2]||"",s=e.split("."),a=s.slice(0,Math.max(s.length-r,0)).join(".");return i?a?`${a}.${i}`:i:a}registerForListChanges(e=()=>{}){this.listChangeSubscribers.push(e)}unRegisterForListChanges(){this.listChangeSubscribers=[]}},Nn=new mM;var Vfe=/\.(?![^[]+\])|\[|\]/g,Bfe=new Set(["createWork","showHarness","openAssignment","openWorkByHandle","initRouting"]),gM=null,Io=t=>t?.split(Vfe).filter(Boolean),hM=t=>{gM=t},we=()=>gM,v=t=>{if(!t)return;let e=[],n=[],o=[];!Array.isArray(t)&&t.type==="MERGE_DATA"&&({changedListProperty:e,leafProperty:n,changedPropertyWithError:o}=Nn.getServerProperties(t.payload.data,t.payload.context,t.payload.rootPageReference)),gM?.dispatch(t),!Array.isArray(t)&&t.type==="MERGE_DATA"&&(o.length&&!t.payload.skipValidation&&o.map(i=>{let s=i.lastIndexOf(".");return{property:i.substring(s),pageReference:i.substring(0,s)}}).forEach(({property:i,pageReference:s})=>{yd.clearMessages({type:"error",property:i,pageReference:s,context:t.payload.context});let a=be.getFieldReferenceForProperty(t.payload.context,`${s}${i}`);if(a){let c=Q.resolveContextTreeNodeProps(a.props);Ft.validate(c.componentName?.toLowerCase(),c.propertyName,Q.getLitePropertyValue(c,c.propertyName),c)}}),Nn.handleServerChanges(t.payload.context,e,n))},J=t=>we()?.getState().data?.[t],oi=()=>we()?.getState().data[d.SHARED],Hfe=t=>!!(t&&!t.startsWith('"')&&!t.startsWith("'")),Gfe=t=>t&&t.trim().substring(1,t.length-1),fM=(t,e,n)=>{if(!Hfe(t))return Gfe(t);let o=t?.startsWith(".")?e+t:t,r=Io(o);return y.getIn(n,r)},ie=(t,e,n)=>fM(t,e,J(n)),Ss=(t,e,n)=>t?fM(e,`${d.CONTEXT_DATA}.${t}`,J(n)):fM(e,`${d.CONTEXT_DATA}`,J(n)),qfe=(t,e,n)=>{let o=Io(`${e}.${n}`);return y.getIn(t,o)},uc=(t,e,n)=>qfe(J(n),`${d.CONTEXT_DATA}.${t}`,e),Wfe=t=>{let{context:e}=t;if(we()?.getState().data[e])return JT;let{action:o}=t;return Bfe.has(o)?bt:JT},yM=(t,e)=>{let n=Io(e);return y.deleteIn(t,n)},m5=t=>!Array.isArray(t)&&typeof t=="object",Rb=(t,e=[],n=[])=>{let o=new Set(n);Array.isArray(e)&&e.length>0&&e.forEach(r=>{r.allowMultiple?r.allowMultiple&&!o.has(r.path)&&y.setIn(t,r.path,[]):y.setIn(t,r.path,{})}),n.length>0&&y.rearrangeProperties(n,t)},jt=(t,e,n={})=>{let{isArrayDeepMerge:o,propertiesToReplace:r=[],propertiesToReArrange:i=[]}=n;Array.isArray(t)&&!e&&(e=[]),(r.length>0||i.length>0)&&Rb(t,r,i);let s=(a,c)=>{if(m5(a)&&c!==null&&typeof c!="string"&&typeof c!="number"&&typeof c!="boolean")return Array.isArray(c)?c:rs(a,c,s);if(Array.isArray(a)&&c!==null&&Array.isArray(c)){if(o)return rs(a,c,s);{let l=c.length;if(typeof o>"u"&&l===a.length)return rs(a,c,s)}}return c===""&&a&&typeof a=="object"?a:c};return s(t,e)},SM=(t,e,n,o={isArrayDeepMerge:!0})=>{let{isArrayDeepMerge:r}=o,i=Io(e),s=y.getIn(t,i);if(typeof n=="object"&&n!==null){if(s===n)return t;let a=jt(s,n,{isArrayDeepMerge:r});return y.setIn(t,i,a)}return y.setIn(t,i,n)},EM=(t,e,n)=>{let o=Io(e);return y.setIn(t,o,n)},js=()=>{let t=Sa,{promise:e,actionMgrID:n}=M.actionManagerPromise(t);return v({type:t,payload:{actionMgrID:n}}),e},Up=t=>!!we()?.getState()?.data?.[t];var Kfe=" @#$%=!<>/\\",Jfe=/^[^/]+\/[^/]+\.[^/.]+$/,Yfe=typeof structuredClone=="function",AM=class t{static mergeDeep(e,n){return rs(n,e)}static hasIn(e,n){return FU(e,n)}static getIn(e,n,o){return sf(e,n,o)}static setIn(e,n,o){return BU(e,n,o)}static deleteIn(e,n){return UU(e,n)}static isObjectEmpty(e){return!e||Object.entries(e).length===0}static isEmpty(e){return A2(e)}static deepClone(e={}){if(e===null||typeof e!="object")return e;if(Yfe)try{return structuredClone(e)}catch{}return JSON.parse(JSON.stringify(e))}static copy(e,n){Object.keys(e).forEach(o=>{n[o]=e[o]})}static isPropertyRef(e){if(!e||!e.includes("."))return!1;for(let n=0;n<e.length;n+=1)if(Kfe.includes(e[n]))return!1;return!0}static isValidPropertyReference(e){return typeof e!="string"?!1:e===""||e.trim()!==""}static isWhenExist(e){let n=["visibility","disabled","readOnly","required"],o=!1;for(let r of Object.keys(e)){let i=e[r];i&&typeof i=="object"&&!Array.isArray(i)?o=o||t.isWhenExist(i):n.includes(r)&&typeof i=="string"&&i?.startsWith("@W ")&&(o=!0)}return!o&&e?.type==="multirecordlist"&&e?.renderMode==="Editable"&&(o=Object.keys(e?.allowActions??{}).some(r=>typeof e?.allowActions?.[r]=="string"&&e.allowActions[r]?.startsWith("@W "))),o}static getWhenNames(e){let n=["visibility","disabled","readOnly","required"],o="",r=new Set;if(e&&Object.keys(e).forEach(i=>{let s=e[i];n.includes(i)&&typeof s=="string"&&s.startsWith("@W ")&&(o=ge.trimAnnotation(s),r.add(o))}),e?.type==="multirecordlist"&&e?.renderMode==="Editable"){let i=e?.allowActions??{};Object.keys(i).forEach(s=>{typeof i[s]=="string"&&i[s]?.startsWith("@W ")&&(o=ge.trimAnnotation(i[s]),r.add(o))})}return[...r]}static isExpressionExist(e){let n=["disabled","visibility","readOnly","required"],o=!1;for(let r of Object.keys(e))n.includes(r)&&typeof e[r]=="string"&&e[r]?.startsWith("@E ")&&(o=!0);return o}static buildDataObject(e,n){let o={},r=o;return n.indexOf(".")>0?n.split(".").forEach(s=>{if(s.includes("[")){let[a]=s.split("[");o[a]=[],o=o[a],s=s.substring(s.indexOf("[")+1,s.lastIndexOf("]"))}o[s]={},o=o[s]}):(o[n]={},o=o[n]),Object.keys(e).forEach(i=>{let s=i;i.startsWith(".")&&(s=i.substring(1)),o[s]=e[i]}),r}static buildObject=(e,n,o)=>{if(o===void 0)return;let r=e.split("."),i=0;for(;i<r.length-1;i+=1){let s=r[i];s?.toString().length&&!n[s]&&(n[s]={}),n[s]&&(n=n[s])}typeof o=="object"?(n[r[i]]||(n[r[i]]=Array.isArray(o)?[]:{}),jt(n[r[i]],o,{isArrayDeepMerge:!0})):n[r[i]]=o};static crc32(e){let n=-1,o=t.getUtf8Bytes(e);for(let r of o)n=n>>>8^t.CRC32_TABLE[(n^r)&255];return(n^-1)>>>0}static getUtf8Bytes(e){if(t.utf8Encoder===null&&typeof globalThis.TextEncoder=="function"&&(t.utf8Encoder=new globalThis.TextEncoder),t.utf8Encoder)return Array.from(t.utf8Encoder.encode(e));let n=[];for(let o=0;o<e.length;o+=1){let r=t.getCodePoint(e,o);n.push(...t.encodeCodePoint(r.value)),o=r.nextIndex}return n}static getCodePoint(e,n){let o=e.charCodeAt(n),r=e.charCodeAt(n+1);return o>=55296&&o<=56319&&r>=56320&&r<=57343?{value:65536+(o-55296<<10)+(r-56320),nextIndex:n+1}:o>=55296&&o<=57343?{value:65533,nextIndex:n}:{value:o,nextIndex:n}}static encodeCodePoint(e){return e<=127?[e]:e<=2047?[192|e>>>6,128|e&63]:e<=65535?[224|e>>>12,128|e>>>6&63,128|e&63]:[240|e>>>18,128|e>>>12&63,128|e>>>6&63,128|e&63]}static CRC32_TABLE=(()=>{let e=[];for(let n=0;n<256;n+=1){let o=n;for(let r=0;r<8;r+=1)o=o&1?3988292384^o>>>1:o>>>1;e[n]=o>>>0}return e})();static utf8Encoder=null;static getHashedString(e){return t.crc32(e).toString(16)}static getPropertyName(e){if(e){let n=e.startsWith("@P"),o=n?e.indexOf(" "):-1;return n?e.substring(o+2):e}return e}static getPropertyNameFromDependency(e){return typeof e=="string"?e:e.propertyName}static isValidJson(e){try{return JSON.parse(e)}catch(n){return console.error("not a Valid JSON",n),!1}}static isEqual(e,n){return Ro(e,n)}static isContains(e,n){let o=Object.keys(e);for(let r=0;r<o.length;r+=1)if(e[o[r]]&&t.isEqual(e[o[r]],n))return!0;return!1}static removeExistingDependentProperty(e,n){let o=e.findIndex(r=>r.propertyName===n);o>=0&&e.splice(o,1)}static getFullPropertyReference(e){return Array.isArray(e)?e.filter(n=>!!n).join("."):""}static iterateLeafNodes(e,n){let o=(r,i=[])=>{Object.entries(r).forEach(([s,a])=>{i.push(Array.isArray(r)?Number(s):s),Array.isArray(a)?a.forEach((c,l)=>{i.push(l),o(c,i),i.pop()}):a!==null&&typeof a=="object"?o(a,i):n(i.slice(),a),i.pop()})};o(e)}static resolveStringBooleans(e){let n=["required","readOnly","visibility"],o=r=>r==="true";return Object.keys(e).forEach(r=>{n.includes(r)&&typeof e[r]=="string"&&(e[r]=o(e[r]))}),e}static generateUniqueID(){if(typeof crypto<"u"&&typeof crypto.randomUUID=="function")return crypto.randomUUID();let e=typeof performance<"u"&&typeof performance.now=="function"?performance.now().toString(36).replace(".",""):Math.random().toString(36).slice(2);return`${Date.now().toString(36)}${e}`}static unflatten(e){let n={};return Object.entries(e).forEach(([o,r])=>{let i=o.split("."),s;i.reduce((a,c,l)=>(a[c]?s=a[c]:Number.isNaN(Number(i[l+1]))?i.length-1===l?s=r:s={}:s=[],a[c]=s,a[c]),n)}),n}static flatten(e,n,o){n||(n=""),Array.isArray(e)?e.forEach((r,i)=>{t.flatten(r,`${n}[${i}]`,o)}):typeof e=="object"&&e!==null?Object.keys(e).forEach(r=>{let i=n?`${n}.${r}`:r;t.flatten(e[r],i,o)}):o[n]=e}static buildInstructionPageReference(e,n){let r=e.startsWith(d.OBJECT_INFO.OBJECT_INFO)?`${e}${n}`.replace(d.OBJECT_INFO.OBJECT_INFO_CONTENT,""):`${e}${n}`.replace(d.CASE_INFO.CASE_INFO_CONTENT,"").replace(d.DATA_INFO.DATA_INFO_CONTENT,"");return Ii.formatPageReference(r)}static convertPageRefToClipboardPageNotation(e){let n=/\[\d+\]/g;return e.replace(n,o=>o.replace(/\d+/g,r=>`${parseInt(r,10)+1}`).replace("[","(").replace("]",")"))}static convertClipboardPageToPageRefNotation(e){let n=/\(\d+\)/g;return e.replace(n,o=>o.replace(/\d+/g,r=>`${parseInt(r,10)-1}`).replace("(","[").replace(")","]"))}static segmentsMatch=(e,n)=>{let o=e.split("."),r=n.split(".");return o.length!==r.length?!1:o.every((i,s)=>{if(i===r[s])return!0;if(i.endsWith("()")){let a=i.slice(0,-2),c=r[s];return c.startsWith(a)&&/^\[\d+\]$/.test(c.slice(a.length))}return!1})};static isString(e){return typeof e=="string"}static rejectPendingActions(e){return e.forEach(n=>n.payload.actionMgrID&&M.rejectActionByID(n.payload.actionMgrID)),!0}static isValidAnnotation(e){let n=new Set(["@DATASOURCE","@ACTIVE_CASES","@ADDRESS","@ASSOCIATED","@ATTACHMENT","@CASE","@FILTERED_LIST","@PARAGRAPH","@P","@ROUTING_INFO","@USER","@W","@E","@SHARED","@CA"]),o=e.indexOf(" "),r=e.substring(0,o);return n.has(r)}static trimDotForProperty(e){return typeof e=="string"&&e.startsWith(".")?e.substring(1):e}static decodeHtmlEntities(e){if(typeof document<"u"){let r=document.createElement("textarea");return r.innerHTML=e,r.value}let n={"&":"&","<":"<",">":">",""":'"',"'":"'","'":"'","/":"/","/":"/"},o=e;return Object.entries(n).forEach(([r,i])=>{o=o.split(r).join(i)}),o=o.replace(/&#(\d+);/g,(r,i)=>String.fromCharCode(parseInt(i,10))),o=o.replace(/&#x([a-f\d]+);/gi,(r,i)=>String.fromCharCode(parseInt(i,16))),o}static convertObjectWithStringToBoolean(e){if(e&&!(Array.isArray(e)||typeof e!="object"))return Object.keys(e).forEach(n=>{let o,r=e[n];typeof r=="string"?r==="true"?o=!0:r==="false"?o=!1:o=r:typeof r=="object"?(o=r,t.convertObjectWithStringToBoolean(r)):o=r,e[n]=o}),e}static rearrangeProperties(e,n){e.forEach(o=>{let r=t.getIn(n,o);if(!r)return;let i=Object.hasOwn(r,O.getDefaultQualifiedName("pyCount"));if(i&&(r=r.pxResults),!r)return;let s=r.filter(c=>!c.error),a=r.filter(c=>c.error);t.setIn(n,i?`${o}.pxResults`:o,[...s,...a])})}static getETag(e){if(!e)return;let n=e,o=n?.split("/")||[],r=["workarea","modal","actionarea"],i=o.findIndex(s=>r.some(a=>s.startsWith(a)));return i!==-1&&(n=o.slice(0,i+1).join("/")),we()?.getState()?.data[n]?.caseInfo?.headers?.etag}static PAGELIST_PATH_REGEX=/^(?!.*\.\.)(?!\d)\w+(\.\w+)*\.\d+(\.\w+)+$/;static isValidPageListProperty(e){return t.PAGELIST_PATH_REGEX.test(e)}static generateDataPageHashWithParameters(e,n,o){let r=[],i="",s=o.getPageReference(),a=o.getContextName();Object.keys(e).forEach(u=>{let p=e[u],m=ge.isProperty(p)?ie(`.${ge.getPropertyName(p)}`,s,a):p;(m==null||m==="")&&(m=d.NULL_STRING),r.push(m)});let c=n,l=r.join(d.HASH_DELIMITER);return l&&(i=t.getHashedString(l),c=n+d.UNDERSCORE_STRING+i),c}static parsePegaDateTimeToTimestamp(e){if(!e)return null;let n=e.replace(" GMT","").match(/^(\d{4})(\d{2})(\d{2})T(\d{2})(\d{2})(\d{2})\.(\d{3})$/);if(!n){let p=new Date(e).getTime();return Number.isNaN(p)?null:p}let[,o,r,i,s,a,c,l]=n.map(Number);return new Date(o,r-1,i,s,a,c,l).getTime()}static formatToUTCDate(e,n){if(!e)return e;let o=new Date(e);if(Number.isNaN(o.getTime()))return e;let r=(m,f=2)=>String(m).padStart(f,"0"),i=o.getUTCFullYear(),s=r(o.getUTCMonth()+1),a=r(o.getUTCDate());if(n==="Date")return`${i}${s}${a}`;let c=r(o.getUTCHours()),l=r(o.getUTCMinutes()),u=r(o.getUTCSeconds()),p=r(o.getUTCMilliseconds(),3);return`${i}${s}${a}T${c}${l}${u}.${p} GMT`}static isLeafProperty(e){return!!e&&!e.includes(".")}static getMetadataType(e,n,o){let r=t.isLeafProperty(e)?ft(e,n):o.getFieldMetadata(e);return Array.isArray(r)?r[0]?.type:r?.type}static toStringParameterValue(e){return typeof e=="string"?e:e instanceof Date?e.toISOString():null}static resolveParameterValue(e,n,o,r,i){if(o&&Object.hasOwn(o,e))return o[e];if(!On.isProperty(n))return n;let a=i!==null?On.getPropertyName(n):On.getLeafPropertyName(n);return r.getValue(`.${a}`)}static formatParameterValue(e,n,o,r,i){if(!On.isProperty(n))return e;let a=r!==null?On.getPropertyName(n):On.getLeafPropertyName(n);if(!a)return e;let c=t.getMetadataType(a,i,o);if(!c)return e;let l=t.toStringParameterValue(e);return c==="Date"?l?l.includes("T")?t.formatToUTCDate(l,"Date"):t.formatToUTCDate(`${l}T00:00:00Z`,"Date"):e:c==="DateTime"&&l?t.formatToUTCDate(l,"DateTime"):e}static resolveAndFormatParameters(e,n,o,r,i){let s={};for(let a of Object.keys(e)){let c=e[a];if(typeof c!="string")s[a]=c;else{let l=t.resolveParameterValue(a,c,i,n,o);s[a]=t.formatParameterValue(l,c,n,o,r)}}return s}static normalizePropertyRef(e){let n=e.replace(/\[\d+\]/g,"");return n.startsWith(".")?n.substring(1):n}static resolvePageClass(e,n){if(!n)return;e=this.normalizePropertyRef(e);let o=e.split("."),r;o.length>1?r=o.slice(0,-1):r=o;let i=n;for(let s of r){let a=ft(s,i);if(!a||(Array.isArray(a)&&a[0]?.pageClass?i=a[0].pageClass:!Array.isArray(a)&&a.pageClass&&(i=a.pageClass),!i))return}return i}static isNestedObject(e){return sa(e)&&!Array.isArray(e)}static pruneKeys=(e,n,o=!1)=>{if(!Ln(e))return e;let r=n instanceof Set?n:new Set(n);return o?(t.isNestedObject(e)?Object.keys(e).forEach(i=>{let s=e[i];if(r.has(i)){let a=Object.getOwnPropertyDescriptor(e,i);a&&a.configurable?delete e[i]:Reflect.set(e,i,void 0)}else s&&(sa(s)||Array.isArray(s))&&t.pruneKeys(s,r,!0)}):Array.isArray(e)&&e.forEach(i=>{(sa(i)||Array.isArray(i))&&t.pruneKeys(i,r,!0)}),e):Array.isArray(e)?e.map(i=>sa(i)||Array.isArray(i)?t.pruneKeys(i,r,!1):i):t.isNestedObject(e)?Object.keys(e).reduce((i,s)=>{if(!r.has(s)){let a=e[s];i[s]=sa(a)||Array.isArray(a)?t.pruneKeys(a,r,!1):a}return i},{}):e};static normalizeStaticContentKey(e){let n=this.getWebFilePath(e);if(!n)return e.trim();let o=n.decodedFileName.lastIndexOf(".");if(o<1||o===n.decodedFileName.length-1)return e.trim();let r=n.decodedFileName.slice(0,o),i=n.decodedFileName.slice(o+1);return`${n.marker.toUpperCase()}!${r.toUpperCase()}!${i.toUpperCase()}`}static isWebFilePath(e){return this.getWebFilePath(e)!==void 0}static getWebFilePath(e){let n=e.trim();if(!Jfe.test(n))return;let o=n.indexOf("/"),r=n.slice(0,o),s=n.slice(o+1).split(/[?#]/)[0];try{let a=decodeURIComponent(s);return a.includes("/")||a.includes("\\")?void 0:{marker:r,decodedFileName:a}}catch{return}}},y=AM;var Zfe=d.SUMMARY_OF_LISTS,Qfe=d.SUMMARY_OF_WHEN_CONDITIONS,CM=class t{static updateData(e){Object.keys(e).forEach(n=>{v(Ne({context:n,data:e[n]}))})}static updateContextData(e){Object.keys(e).forEach(n=>{v(Ne({context:n,data:e[n]}))})}static resolveWhen(e,n){return!!n.getContextDataValue(`.${Qfe}.${e}`)}static resolveFieldValue(e,n){return n.getLocalizedValue(e)}static resolveNavigation(e,n){let o=this.resolveName(e,n);return uM(typeof o=="string"?o:"")}static resolveView(e,n,o=""){let r=ac(this.resolveName(e,n)),i=[];if(Array.isArray(r)&&r.length>0){if(n&&r.length>1){if(o||(o=n.getValue(d.CLASS_ID)||""),!o)return;i=r.filter(s=>s[d.CLASSID]===o)}return i.length===0?r[0]:i[0]}return r}static resolveName(e,n){return e&&typeof e=="string"&&e.startsWith("param.")?(e=e.substring(6),n.getContextDataValue(`.$parameters.${e}`)):(e&&typeof e=="string"&&e.startsWith("@")&&(e=ge.handleAnnotation(e,n)),e)}static getContextPath(e,n){return typeof n!="number"&&!n?e:(n=ge.trimAnnotation(n),typeof n=="number"||typeof n=="string"?typeof n=="number"&&Number.isInteger(n)?`${e}[${n}]`:typeof n=="string"&&n.startsWith(".")?e+n:n:e)}static getRuleClass(e,n,o){let r;if(n)r=n.startsWith(d.CLASS_ANNOTATION)?n.split(d.CLASS_ANNOTATION)[1].trim():this.resolveClassID(n,e.getPageReference(),e.getContextName(),e.getValue(d.CASE_INFO.CASE_INFO_CLASSID));else if(o?.authorContext){let i=e.getFieldMetadata(o.authorContext);if(i){let s=["refer","copy"].includes(i.dataRetrievalType),a=i.type==="Page List";r=s&&a?i.pageClass:i.classID}r||(r=o.ruleClass)}return r}static resolveReference(e,n){let{type:o}=e,r;if(o==="reference"){let{config:i}=e,s=i?.type,{ref:a,name:c,context:l}=i||{},u=this.getRuleClass(n,l,i);return n&&(n._ruleClass=u),s==="navigation"?r=this.resolveNavigation(a||c,n):s==="view"?r=this.resolveView(a||c,n,u||""):s==="widget"&&(r={type:"Widget",config:{name:c,ruleClass:u}}),r}return e}static resolvePropertyReference(e,n,o){return ie(n,e,o)}static getProperty(e,n,o){let r=this.resolvePropertyReference(n,e,o);if(r==null||r.length===0){let i=uc(`${n}.${Zfe}`,e,o);i&&(r=this.resolvePropertyReference(n,i,o))}return r}static getPropertyValue(e,n,o){return e=ge.trimAnnotation(e),this.getProperty(e,n,o)}static getReferencedUser(e,n){let o=t.getLitePropertyValue(n,"referencedUsers");if(Array.isArray(o)){let r=o.find(i=>i.UserID===e);if(r)return{userId:r.UserID,UserName:r.UserName}}return o?.[e]}static getLitePropertyValue(e,n){if(!e)return;let{useCustomContext:o,propertyName:r,hasSuggestions:i,pageReference:s,context:a}=e,c=n||r||"";return o?(c=c.startsWith(".")?c.substring(1):c,c.split(".").reduce((l,u)=>l?.[u]??void 0,o)):i&&c===r?t.getPropertyValue(c,s,a?`${a}/${d.SUGGESTION}`:void 0):t.getPropertyValue(c,s,a||void 0)}static _handlePropString(e,n,o,r,i){o.startsWith("@")?e[n]=ge.handleAnnotation(o,r,i):e[n]=o}static _resolveProps(e,n,o){e&&Object.keys(e).forEach(r=>{let i=e[r];typeof i=="string"?this._handlePropString(e,r,i,n,o):Array.isArray(i)?i.forEach(s=>{this._resolveProps(typeof s=="object"?s:e[s],n,o)}):typeof i=="object"&&this._resolveProps(e[r],n,o)})}static resolveProps(e,n,o){return!e||!n||(y.mergeDeep(e,n),this._resolveProps(n,o,void 0)),n}static resolveContextTreeNodeProps(e){let n={};return e?(y.mergeDeep(e,n),this._resolveProps(n,void 0,e),y.resolveStringBooleans(n)):n}static resolvePropertyPageClass(e,n){let o=y.resolvePageClass(e,n),r=e.substring(e.lastIndexOf(".")+1),i=ft(r,o),s;if(i)return Array.isArray(i)?s=i[0]?.pageClass:s=i.pageClass,s}static resolveClassID(e,n,o,r){let i=ge.trimAnnotation(e),s=i.startsWith(".")?`${n}${i}`:i;for(;s;){let a=ie(d.CLASS_ID,s,o);if(a)return a;if(r){let l=this.resolvePropertyPageClass(i,r);if(l)return l}let c=s.lastIndexOf(".");if(c===-1)break;s=s.substring(0,c)}return null}},Q=CM;var IM=class{actionHandlers;constructor(){this.actionHandlers={}}getHandler(e){return this.actionHandlers[e]}registerHandler(e,n){this.actionHandlers[e]=n}},Xfe=new IM,Pb=Xfe;function ege(t){return typeof t=="object"&&t!==null}var _M=class{static#e=[];static#t=!1;static getActionHandlers=(e,n,o)=>{let r=[];return{mouseenter:"hover",change:"onChange",blur:"onBlur"}[o]!==n||e.forEach(s=>{let a=Pb.getHandler(s.action),{config:c}=s;r.push({handler:a,config:c})}),r};static isEditable=e=>{let{tagName:n}=e;return n==="INPUT"||n==="TEXTAREA"||n==="SELECT"||n==="DATETIME"};static isNonKeyInput=e=>{let{tagName:n,type:o}=e;return n==="SELECT"||o==="checkbox"||o==="radio"};static#n=(e,n,o)=>{for(let r=0;r<e.length;r+=1){let i=e[r],s={actionHandler:i.handler,component:n,eventType:o,config:i.config};this.#e.push(s)}};static buildActionObject=(e,n)=>{let o={...e};return o.context=T.getRuntime()==="Browser"?n.getContextName():o.context,o.pageReference=n.getPageReference(),o.actionMgrID=M.getNextActionMgrId(),o};static#r=e=>{let n=e.actionHandler,o=e.component,{config:r}=e,i={};Q.resolveProps(r,i,o),n&&(n(e.eventType,i,o),this.#o())};static#o=()=>{if(!this.#t){if(this.#e.length===0)return;let e=this.#e.shift();if(!e)return;this.#r(e),e.config&&e.config.parallel==="true"&&this.#e.length>0&&this.#o()}};static#s=()=>{this.#o()};static#i=(e,n,o)=>{this.#n(e,n,o),this.#s()};static getFullRef=e=>{let n=e.getPageReference(),o=e.getComponentConfig().value;return Q.getContextPath(n,o)};static#a(e,n){let r=e.getComponentConfig().behaviours||[];for(let i=0;i<r.length;i+=1){let{behaviour:s,actions:a}=r[i];if(a){let c=this.getActionHandlers(a,s,n);c&&c.length>0&&this.#i(c,e,n)}}}static changeHandler=(e,n)=>{let o=e.getStateProps().value,r=e.getContextName();if(ht({type:A.MESSAGES.MESSAGES_TYPE_ERROR,property:o,pageReference:e.getPageReference(),context:r}),(T.getRuntime()==="Browser"?"nativeEvent"in n&&n.nativeEvent instanceof Event||n instanceof Event:"nativeEvent"in n&&!!n.nativeEvent||n instanceof Event)||!("value"in n)||n.value!==null&&(!("prop"in n)||n.prop===void 0)){let{target:s}=n;s===null&&n&&"auxiliaryTarget"in n&&n.auxiliaryTarget&&(s=n.auxiliaryTarget);let a;s===void 0?a="value"in n?n.value:void 0:"value"in s?a=s.value:a=s.innerText;let c=this.getFullRef(e);v({type:Pt,payload:{reference:c,value:a,context:r}}),(s===void 0||!this.isEditable(s)||this.isNonKeyInput(s))&&v({type:Fr,payload:{reference:c,pageReference:e.getPageReference(),value:a,context:r,propertyName:e.getComponentConfig().value,classID:e.getValue(d.CLASS_ID)}})}else if(ege(n)){let s=e.getPageReference(),a=e.getStateProps();for(let c of Object.keys(n)){let l=a[c],u=n[c];v({type:Pt,payload:{reference:Q.getContextPath(s,l),value:u,context:r}}),v({type:Fr,payload:{reference:Q.getContextPath(s,l),value:u,context:r}})}}};static blurHandler=(e,n)=>{let{target:o}=n;o===null&&n&&"auxiliaryTarget"in n&&(o=n.auxiliaryTarget);let{value:r,validationValue:i}=o,s=this.getFullRef(e),a=e.getContextName();o.clearMessages&&ht({type:A.MESSAGES.MESSAGES_TYPE_ERROR,property:e.getStateProps().value,pageReference:e.getPageReference(),context:a}),this.isEditable(o)&&(e.getValidationApi().validate("validationValue"in o?i:r),e.isInsideList()&&e.getListActions().updateProperty(e.getStateProps().value,r),this.isNonKeyInput(o)||v({type:Fr,payload:{reference:s,pageReference:e.getPageReference(),value:r,context:a,propertyName:e.getComponentConfig().value,classID:e.getValue(d.CLASS_ID)}}))};static eventHandler=(e,n)=>{let{type:o}=n;switch(o){case"change":this.changeHandler(e,n);break;case"blur":this.blurHandler(e,n);break;default:break}o&&this.#a(e,o)};static pause=()=>{this.#t=!0};static resume=()=>{this.#t=!1,this.#o()};static isQueueEmpty=()=>this.#e.length===0;static clearQueue=()=>{this.#e=[]};static getActionsQueue=()=>this.#e;static EVENTS_MAP={click:"onClick",change:"onChange",hover:"onMouseEnter",blur:"onBlur"}},Ve=_M;var bM="CREATE_WORK",f5=t=>({type:bM,payload:t});var TM=(t,e)=>{let n=e.UserID;if(n==null)return;let o=String(n);if(t.has(o)){let r=t.get(o);t.set(o,{...r,...e})}else t.set(o,e)},tge=t=>{if(t.length<2)return;let e=new Map;for(let n of t)TM(e,n);t.length=0;for(let n of e.values())t.push(n)};function nge(t,e,n){let o;if(!Array.isArray(t)&&typeof t=="object"){o=y.getIn(n,d.REFERENCED_USERS,{}),y.setIn(e,d.REFERENCED_USERS,{...o,...t});return}if(o=y.getIn(n,d.REFERENCED_USERS,[]),o.length===0){tge(t);return}let r=new Map;for(let i of o)TM(r,i);for(let i of t)TM(r,i);t.length=0;for(let i of r.values())t.push(i)}function rge(t,e,n,o,r,i,s){let a=o.substring(0,o.indexOf("[")),c=o.substring(o.indexOf("[")+1,o.indexOf("]")),l=e[a],u=`${y.trimDotForProperty(r)}.${a}`;s.includes(u)&&Object.hasOwn(l,O.getDefaultQualifiedName("pyCount"))&&(l=l.pxResults),Array.isArray(l)&&(l?.splice(+c,1,t[o]),i.push(a),n.add(`${r}.${o}`))}function oge(t,e,n){let o=new Set(n);Object.keys(t).forEach(r=>{(Array.isArray(t[r])&&!o.has(r)||!Array.isArray(t[r])&&!Object.hasOwn(e,r))&&delete t[r]})}var g5=(t,e,n,o,r="")=>{let i=[];Object.keys(t).forEach(s=>{typeof t[s]=="object"&&s.includes("[")?rge(t,e,n,s,r,i,o):t[s]&&typeof t[s]=="object"?(e[s]||(e[s]=Array.isArray(t[s])?[]:{}),g5(t[s],e[s],n,o,`${r}.${s}`)):e[s]=t[s]}),oge(e,t,i)},ige=(t,e,n)=>{let o=new Set;t.forEach(r=>{r=y.trimDotForProperty(r);let[i,s,a]=ms.getPageListNameAndIndexFromPageName(r);if(i&&s&&a&&!o.has(`${i}.${s}`)){let c=y.getIn(n,`${i}.${s}`)||[];Array.isArray(c)&&c.forEach((l,u)=>{u!==+a&&y.setIn(e,`${i}.${s}[${u}]`,l)}),o.add(`${i}.${s}`)}})},sge=(t,e,n)=>{if(!n||n.length===0)return e;let o=Qy(t),r={},i=!1;return n.forEach(s=>{Object.hasOwn(o,s)&&y.hasIn(e,Io(s).slice(0,-1))&&(y.setIn(r,s,o[s]),i=!0)}),i?jt(e,r,{isArrayDeepMerge:!0}):e},Ne=(t,e={})=>{let{serverPrecedenceFields:n=[],propertiesToReplace:o=[],propertiesToReArrange:r=[],preserveFields:i}=e,{context:s,data:a,isArrayDeepMerge:c,preserveClientChanges:l=!1}=t,u=sl(s,!0),p=J(s),m={};if(l&&p&&a){m=y.deepClone(p);let h=y.deepClone(a);r.length>0&&y.rearrangeProperties(r,m);let E=new Set;g5(u,m,E,r),ige(E,m,h)}let f=a?y.getIn(a,d.REFERENCED_USERS):void 0;f!==void 0&&nge(f,a,p);let g=a;if(l){let h=y.getIn(t?.data,d.OBJECT_INFO.OBJECT_INFO_CONTENT_CLASS_ID),E=G.isExternalObject(h),C=E?{[d.OBJECT_INFO.OBJECT_INFO]:{[d.CONTENT]:{...m[d.OBJECT_INFO.OBJECT_INFO]?.[d.CONTENT]}}}:{[d.CASE_INFO.CASE_INFO]:{[d.CONTENT]:{...m[d.CASE_INFO.CASE_INFO]?.[d.CONTENT]}}},I=E?d.OBJECT_INFO.OBJECT_INFO_CONTENT:d.CASE_INFO.CASE_INFO_CONTENT;n.forEach(_=>{let P=`${I}.${_}`;y.deleteIn(C,P)}),g=jt(a,C,{isArrayDeepMerge:c??!0})}else wH(s,a,i),g=sge(s,a,i);return{type:Pn,payload:{...t,data:g,...o.length>0?{propertiesToReplace:o}:null,...r.length>0?{propertiesToReArrange:r}:null}}},age=t=>({type:C2,payload:t}),Df=t=>({type:Ou,payload:t}),cge=t=>({type:Un,payload:t}),lge=t=>({type:I2,payload:t}),uge=t=>({type:Po,payload:t}),ww=t=>({type:wu,payload:t}),cl=t=>({type:fi,payload:t}),kt=t=>({type:bt,payload:t}),Mw=t=>({type:da,payload:t}),Hy=t=>({type:pa,payload:t}),j0=t=>({type:No,payload:t}),F0=t=>({type:ma,payload:t}),V0=t=>({type:ss,payload:t}),dn=t=>{let{containerItemID:e}=t;t.suggestionContexts=eS(e);let n=t?.data?.caseInfo?.content,o=Object.keys(n||{}).length>0;return t.propertiesToReplace||(t.propertiesToReplace=o?G.getPropertiesToReplace(e):[]),{type:Ht,payload:t}},oS=t=>{let{context:e}=t;return{type:ca,payload:{context:e}}},Bs=t=>{let{context:e}=t;return{type:Wo,payload:{context:e}}},dge=t=>({type:fa,payload:t}),pn=t=>({type:mn,payload:t}),zf=t=>({type:ya,payload:t}),nt=t=>{let{context:e,containerItemID:n}=t,o=e;return o||(o=de(n)),t.context=o,t.deleteContext=!w0(n),t.childContainers=Ke(n),t.childContainersContexts=ti(n),t.transientItems=Vi([...t.childContainersContexts,n]),t.suggestionContexts=eS(n),n===e&&(t.caseID=ie(d.CASE_INFO.CASE_INFO_ID,"",e)||ie(d.OBJECT_INFO.OBJECT_INFO_ID,"",e),t.RemoteSystemID=ie(d.CASE_INFO.REMOTESYSTEMID,"",e)),{type:tt,payload:t}},vM=t=>{let{containerItemID:e}=t;return t.transientItems=Vi([...ti(e),e]),{type:hi,payload:t}},Gy=t=>{let{transientItemID:e}=t;return t.transientItems=[e],{type:gi,payload:t}},Yr=t=>{let{context:e,containerItemID:n}=t,o=e;if(o||(o=de(n)),t.context=o,t.childContainers=Ke(n),t.childContainersContexts=ti(n),t.transientItems=Vi([...t.childContainersContexts,n]),t.suggestionContexts=eS(n),n===e){t.caseID=ie(d.CASE_INFO.CASE_INFO_ID,"",e),t.RemoteSystemID=ie(d.CASE_INFO.REMOTESYSTEMID,"",e);let r=ie(d.CASE_INFO.CASE_INFO_CLASSNAME,"",e);ce.isTraditionalRemoteCase(r)&&(t.skipReleaseLockRequest=!0)}return{type:st,payload:t}},pge=t=>({type:Ko,payload:t}),mge=t=>({type:Jo,payload:t}),RM=t=>({type:AE,payload:t}),B=(t,...e)=>(Ve.resume(),t(...e)),bs=(t,e,n,o,r)=>({type:ve,payload:{msg:t,err:e,context:n,formFields:o,actionMgrID:r}}),PM=t=>({type:yi,payload:t}),NM=t=>({type:Uu,payload:t}),po=t=>({type:Oo,payload:t}),fge=t=>({type:F2,payload:t}),jR=t=>({type:Du,payload:t}),wa=t=>({type:Pt,payload:t});var gge="VIEW",hge="PAGE",wM="add",y5="replace",xM=["portal","noPortal","preview","debug","devtool","activeTab","contextParam","lang"],Nb="",Wp="Home",S5="",DM=!0,Ob=t=>(DM=t,DM),E5=()=>DM,Nt=(t,e,n)=>Se.getSemanticURL(t,e,n),Dn=(t,e)=>Se.getBusinessIDURLPath(t,e),A5=(t,e)=>Se.getBusinessIDRoutePath(t,e),el=(t,e)=>Se.getRestEndPoint(t,e),F=(t,e)=>{let n=At.getServerURL(),o=el(t,e);return o?(o.restApi?.startsWith("/")||(o.restApi=`/${o.restApi}`),n?.endsWith("/")&&(n=n.substring(0,n.length-1)),o.restApi=n+o.restApi,o):{}},yge=t=>{if(t&&t.root){let{root:e}=t,{resources:n}=t,{views:o}=n,i=e.config,s=i.type,a=i.name;if(s.toUpperCase()===gge){let c=o[a],l=c;Array.isArray(c)&&c.length>0&&([l]=c);let u=l.config;if(u.type){let p=u.type;return!!(u.urlPath&&p.toUpperCase()===hge)}}return!1}return!1},h5=(t,e,n)=>{let{root:o,resources:r}=t,{views:i}=r,{config:s}=o,a=wM,c="";if(n)c=n;else{let u=i[s.name],p=u;Array.isArray(u)&&u.length>0&&([p]=u),c=p.config.urlPath}let l=c.match(Qc);if(l){let u=y.getIn(e,s.context);c=c.replace(l[0],u.pyID)}return c.startsWith("/")&&(c=c.substring(1,c.length)),{pxURLPath:c,historyAction:a}},Sge=(t,e,n)=>{for(let[r,i]of e.entries())!t.has(r)&&xM.includes(r)&&t.append(r,i);n&&!t.has("lang")&&t.append("lang",n);let o=Se.getRoutingInfo()?.embedQueryParams;if(o)for(let[r,i]of Object.entries(o))t.has(r)||t.append(r,String(i));return Se.isDefaultPortal()&&t.delete("portal"),t},$M=(t,e)=>{let n=`${t}/${e}`;if(!(T.getRenderingMode()==="EMBED"))return n;let r=Se.getRoutingInfo()?.authServiceAlias;if(!r)return n;let i=encodeURIComponent(r),s;try{s=new URL(n)}catch{return n}let a=s.pathname.split("/").filter(Boolean),c=a.findIndex(p=>p.toLowerCase()==="app");if(c<0)return n;a[c-1]?.toLowerCase()!=="prauth"&&a.splice(c,0,"PRAuth");let u=a.findIndex(p=>p.toLowerCase()==="app")+2;return(u===a.length||a[u]!==i)&&a.splice(u,0,i),s.pathname=`/${a.join("/")}`,s.toString().replace(/\/$/,"")},Ege=(t,e,n,o,r)=>{let i=Se.getStaticRoutePage(),s=Wp?.toLowerCase();return(i?.toLowerCase()===s||o.toLowerCase()===s)&&!r.has("noPortal")?$M(e,n):t},C5=(t,e,n,o)=>{let r,i;Mo(e)?r=$M(t,e):r=t;let s=Mo(n?.pxURLPath||"");s&&(r=`${r}/${s}`);try{i=new URL(r).searchParams,r=r.includes("?")?r.split("?")[0]:r}catch(l){return console.log("Invalid url",l),""}let a=new URLSearchParams(KH());if(Is()?(r=Ege(r,t,e,s,a),Se.setStaticRoutePage("")):s.toLowerCase()===Wp.toLowerCase()&&!a.has("noPortal")&&(r=$M(t,e)),!Se.isDefaultPortal()){let l=Se.getPortalName();a.has("portal")?a.set("portal",l):a.append("portal",l)}i=Sge(i,a,o);let c=Xc(i.toString());return c&&(r+=`?${c}`),r},Age=(t,e,n)=>{if(t=t&&t!==""?t:Se.getApplicationName(),t=Xj(t),n===`${Nb}/${e}/`)return{title:t};let r=new URL(n).pathname.replace(`${e}/`,""),i=r.split("/");return Qj(r)?{title:`${t} - ${i[i.length-1]}`}:{title:`${t} - ${i[0]}`}},I5=(t,{urlPathObjParam:e,infoParam:n,optionsParam:o,queryParam:r},i=!1,s)=>{let a,c,l;if(window.PCore.getBehaviorOverride("dynamicSemanticUrl")===!1)return;if(i)a=e,c=n,l=o;else{let{uiResources:f,data:g}=t;({options:l}=t),e&&e.pxURLPath&&ri(e.pxURLPath)?a=h5(f,g,e.pxURLPath):a=e||h5(f,g),c=Se.getEndPointInfo(a.pxURLPath),a.pxURLPath=c.urlPath}let u=C5(Nb,Se.getApplicationPath(),a,s),{title:p}=Age(S5,Se.getApplicationPath(),u),m=VH(c,{...l,title:p});a?.historyAction===wM?BH(m,p,u):a?.historyAction===y5&&(r&&(u+=`?${r}`),HH(m,p,u))},_5=(t,e)=>{let n=null;t.directUrlUpdation&&(n={historyAction:wM,pxURLPath:""},n.pxURLPath=t.semanticURL),I5(t,{urlPathObjParam:n,infoParam:null,optionsParam:null},!1,e)},H0=(t,e)=>{_5(t,e)},YH=(t,e)=>{let n={pxURLPath:t};return C5(Nb,Se.getApplicationPath(),n,e)},ys=t=>{let{uiResources:e}=t;E5()&&(t.directUrlUpdation||yge(e))&&_5(t)},b5=t=>{let e={routeEndpoint:t.routeEndpoint,requestType:t.requestType,payload:t.payload,routeKey:t.routeKey,options:null};return t.options&&(e.options=t.options),e},Cge=t=>t?ce.isRemoteCase(t)&&(ce.isTraditionalRemoteCase(t)||ce.isRemoteCaseVersionDifferent(t)):!1,T5=(t,e,n)=>{let{caseClassName:o,workID:r}=t.payload,{containerName:i,context:s}=e,{RemoteClassGroup:a,RemoteSystemID:c,name:l}=ce.getRemoteCase(o),u={...t,headers:{RemoteSystemID:c},className:o,isTraditionalRemoteCase:ce.isTraditionalRemoteCase(o),isRemoteCase:ce.isRemoteCase(o),action:ME,viewName:LE,gadgetId:G.getUniqueGadgetId(),context:n??s,skipSemanticUrl:!0,insKey:`${a?.toUpperCase()} ${r}`,containerName:i,name:l};v(pt["showPage"](u))},OM=!1,Ige=async t=>{if(OM){OM=!1;return}let e="showHistory",n=GH(t);if(n){let o=Co(),r=se(`${o}/primary`);if(r&&tS(r)){let i=zn().getLocaleValue(md,"Messages");if(!await vi.confirm(i)){OM=!0,window.history.go(1);return}}ce.isRemoteCase(n.payload?.caseClassName)?T5({...n},n.options):v(pt[e](b5(n)))}},iS=()=>{let t=Se.getApplicationPath(),e=Gp();return t!==e},v5=(t,e)=>{let n={restApi:""};try{if(iS()&&!e){let o=Gp(),r=Se.processUrl(o,!0),i=Se._getMatchedRouteInRoutingTable(r)||"",s=Se.getRoutingInfo(),a=Se.processUrl(o,!1).split("/"),c=a[a.length-1],l=s?.routes?.[i]?.payload?.caseID?.replace("{workID}",c).replace("{id}",c);n=Se.getRestEndPoint("loadView",{caseID:l,viewID:t})||{}}else n=Se.getRestEndPoint("showView",{page:t,pageClass:e})||{}}catch{}return n},R5=()=>{if(iS()){let t=Se.processUrl(Gp(),!0);return!!Se._getMatchedRouteInRoutingTable(t)}return!1},_ge=(t,e)=>{let n=Se.getRoutingInfo();if(Is()&&Object.values(n?.routes??{}).find(c=>c?.payload?.pageClass===e&&c?.payload?.page===t))return t;let o=t.split(" ").join(""),r=t.split(" ").join("-").toLowerCase(),i=nF(t);return n?.routes?.[o]?o:n?.routes?.[r]?r:n?.routes?.[i]?i:t},bge=t=>{Wp=t};var Tge=()=>{let t=T.getIsExtraCallRequiredForDefaultHome();return t===!0||t==="true"},vge=(t,e,n)=>{let o={routeEndpoint:t.routeEndpoint,requestType:t.requestType,payload:t.payload,options:e,routeKey:t.routeKey};Cge(t.payload?.caseClassName)?T5(o,n,e.context):v(RM(b5(o)))},P5=t=>{let{acName:e,context:n,defaultViewLabel:o,ruleName:r,className:i,skipUrlRestore:s}=t,a=_ge(r||o,i);bge(a),Se.setDefaultRoute(a),Se.setDefaultClassName(i);let c=En(e,n),l=X(e,n),u=Tge(),p={historyAction:y5,pxURLPath:""},m,f=null,g={acName:l,context:c,actionConfig:{context:c}},h=s;if(h||u||iS()){let E=h?Wp:RA(gb());T.shouldUseURLParams()&&(f=E.includes("?")?E.split("?")[1]:null),m=rF(E,g),p.pxURLPath=m.urlPath,typeof m.payload?.pageClass<"u"&&(m.payload.pageClass=we()?.getState()?.data?.app?.pyPortal?.classID),vge(m,g,t)}else m=Se.getEndPointInfo(Wp),p.pxURLPath="";I5(null,{urlPathObjParam:p,infoParam:m,optionsParam:g,queryParam:f},!0)},sS=(t,e=!1)=>{Nb=t.domain,e===!1&&E5()&&(qH(Ige),WH()),Se.init(t,Wp)},N5=t=>{Se.addRoutes(t)},O5=t=>{t&&(S5=t.pyLabel)},G0=t=>{FH(t)},hb=t=>{for(let e of t)xM.includes(e)||xM.push(e)};function sr(t){return`Minified Redux error #${t}; visit https://redux.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var Pge=typeof Symbol=="function"&&Symbol.observable||"@@observable",x5=Pge,MM=()=>Math.random().toString(36).substring(7).split("").join("."),Nge={INIT:`@@redux/INIT${MM()}`,REPLACE:`@@redux/REPLACE${MM()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${MM()}`},xb=Nge;function Db(t){if(typeof t!="object"||t===null)return!1;let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e||Object.getPrototypeOf(t)===null}function kM(t,e,n){if(typeof t!="function")throw new Error(sr(2));if(typeof e=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(sr(0));if(typeof e=="function"&&typeof n>"u"&&(n=e,e=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(sr(1));return n(kM)(t,e)}let o=t,r=e,i=new Map,s=i,a=0,c=!1;function l(){s===i&&(s=new Map,i.forEach((E,C)=>{s.set(C,E)}))}function u(){if(c)throw new Error(sr(3));return r}function p(E){if(typeof E!="function")throw new Error(sr(4));if(c)throw new Error(sr(5));let C=!0;l();let I=a++;return s.set(I,E),function(){if(C){if(c)throw new Error(sr(6));C=!1,l(),s.delete(I),i=null}}}function m(E){if(!Db(E))throw new Error(sr(7));if(typeof E.type>"u")throw new Error(sr(8));if(typeof E.type!="string")throw new Error(sr(17));if(c)throw new Error(sr(9));try{c=!0,r=o(r,E)}finally{c=!1}return(i=s).forEach(I=>{I()}),E}function f(E){if(typeof E!="function")throw new Error(sr(10));o=E,m({type:xb.REPLACE})}function g(){let E=p;return{subscribe(C){if(typeof C!="object"||C===null)throw new Error(sr(11));function I(){let P=C;P.next&&P.next(u())}return I(),{unsubscribe:E(I)}},[x5](){return this}}}return m({type:xb.INIT}),{dispatch:m,subscribe:p,getState:u,replaceReducer:f,[x5]:g}}function Oge(t){Object.keys(t).forEach(e=>{let n=t[e];if(typeof n(void 0,{type:xb.INIT})>"u")throw new Error(sr(12));if(typeof n(void 0,{type:xb.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(sr(13))})}function D5(t){let e=Object.keys(t),n={};for(let s=0;s<e.length;s++){let a=e[s];typeof t[a]=="function"&&(n[a]=t[a])}let o=Object.keys(n),r,i;try{Oge(n)}catch(s){i=s}return function(a={},c){if(i)throw i;let l=!1,u={};for(let p=0;p<o.length;p++){let m=o[p],f=n[m],g=a[m],h=f(g,c);if(typeof h>"u"){let E=c&&c.type;throw new Error(sr(14))}u[m]=h,l=l||h!==g}return l=l||o.length!==Object.keys(a).length,l?u:a}}function aS(...t){return t.length===0?e=>e:t.length===1?t[0]:t.reduce((e,n)=>(...o)=>e(n(...o)))}function $5(...t){return e=>(n,o)=>{let r=e(n,o),i=()=>{throw new Error(sr(15))},s={getState:r.getState,dispatch:(c,...l)=>i(c,...l)},a=t.map(c=>c(s));return i=aS(...a)(r.dispatch),{...r,dispatch:i}}}function w5(t){return Db(t)&&"type"in t&&typeof t.type=="string"}var B5=Symbol.for("immer-nothing"),M5=Symbol.for("immer-draftable"),Cr=Symbol.for("immer-state");function ui(t,...e){throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var _o=Object,Jp=_o.getPrototypeOf,kb="constructor",Vb="prototype",jM="configurable",Lb="enumerable",wb="writable",cS="value",Ki=t=>!!t&&!!t[Cr];function bo(t){return t?H5(t)||Hb(t)||!!t[M5]||!!t[kb]?.[M5]||Gb(t)||qb(t):!1}var xge=_o[Vb][kb].toString(),k5=new WeakMap;function H5(t){if(!t||!KM(t))return!1;let e=Jp(t);if(e===null||e===_o[Vb])return!0;let n=_o.hasOwnProperty.call(e,kb)&&e[kb];if(n===Object)return!0;if(!Kp(n))return!1;let o=k5.get(n);return o===void 0&&(o=Function.toString.call(n),k5.set(n,o)),o===xge}function Bb(t,e,n=!0){dS(t)===0?(n?Reflect.ownKeys(t):_o.keys(t)).forEach(r=>{e(r,t[r],t)}):t.forEach((o,r)=>e(r,o,t))}function dS(t){let e=t[Cr];return e?e.type_:Hb(t)?1:Gb(t)?2:qb(t)?3:0}var LM=(t,e,n=dS(t))=>n===2?t.has(e):_o[Vb].hasOwnProperty.call(t,e),FM=(t,e,n=dS(t))=>n===2?t.get(e):t[e],Ub=(t,e,n,o=dS(t))=>{o===2?t.set(e,n):o===3?t.add(n):t[e]=n};function Dge(t,e){return t===e?t!==0||1/t===1/e:t!==t&&e!==e}var Hb=Array.isArray,Gb=t=>t instanceof Map,qb=t=>t instanceof Set,KM=t=>typeof t=="object",Kp=t=>typeof t=="function",UM=t=>typeof t=="boolean";function $ge(t){let e=+t;return Number.isInteger(e)&&String(e)===t}var Hs=t=>t.copy_||t.base_;var JM=t=>t.modified_?t.copy_:t.base_;function VM(t,e){if(Gb(t))return new Map(t);if(qb(t))return new Set(t);if(Hb(t))return Array[Vb].slice.call(t);let n=H5(t);if(e===!0||e==="class_only"&&!n){let o=_o.getOwnPropertyDescriptors(t);delete o[Cr];let r=Reflect.ownKeys(o);for(let i=0;i<r.length;i++){let s=r[i],a=o[s];a[wb]===!1&&(a[wb]=!0,a[jM]=!0),(a.get||a.set)&&(o[s]={[jM]:!0,[wb]:!0,[Lb]:a[Lb],[cS]:t[s]})}return _o.create(Jp(t),o)}else{let o=Jp(t);if(o!==null&&n)return{...t};let r=_o.create(o);return _o.assign(r,t)}}function YM(t,e=!1){return Wb(t)||Ki(t)||!bo(t)||(dS(t)>1&&_o.defineProperties(t,{set:$b,add:$b,clear:$b,delete:$b}),_o.freeze(t),e&&Bb(t,(n,o)=>{YM(o,!0)},!1)),t}function wge(){ui(2)}var $b={[cS]:wge};function Wb(t){return t===null||!KM(t)?!0:_o.isFrozen(t)}var zb="MapSet",BM="Patches",L5="ArrayMethods",G5={};function Kl(t){let e=G5[t];return e||ui(0,t),e}var U5=t=>!!G5[t];var lS,q5=()=>lS,Mge=(t,e)=>({drafts_:[],parent_:t,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:U5(zb)?Kl(zb):void 0,arrayMethodsPlugin_:U5(L5)?Kl(L5):void 0});function z5(t,e){e&&(t.patchPlugin_=Kl(BM),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function HM(t){GM(t),t.drafts_.forEach(kge),t.drafts_=null}function GM(t){t===lS&&(lS=t.parent_)}var j5=t=>lS=Mge(lS,t);function kge(t){let e=t[Cr];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function F5(t,e){e.unfinalizedDrafts_=e.drafts_.length;let n=e.drafts_[0];if(t!==void 0&&t!==n){n[Cr].modified_&&(HM(e),ui(4)),bo(t)&&(t=V5(e,t));let{patchPlugin_:r}=e;r&&r.generateReplacementPatches_(n[Cr].base_,t,e)}else t=V5(e,n);return Lge(e,t,!0),HM(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==B5?t:void 0}function V5(t,e){if(Wb(e))return e;let n=e[Cr];if(!n)return jb(e,t.handledSet_,t);if(!Kb(n,t))return e;if(!n.modified_)return n.base_;if(!n.finalized_){let{callbacks_:o}=n;if(o)for(;o.length>0;)o.pop()(t);J5(n,t)}return n.copy_}function Lge(t,e,n=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&YM(e,n)}function W5(t){t.finalized_=!0,t.scope_.unfinalizedDrafts_--}var Kb=(t,e)=>t.scope_===e,Uge=[];function K5(t,e,n,o){let r=Hs(t),i=t.type_;if(o!==void 0&&FM(r,o,i)===e){Ub(r,o,n,i);return}if(!t.draftLocations_){let a=t.draftLocations_=new Map;Bb(r,(c,l)=>{if(Ki(l)){let u=a.get(l)||[];u.push(c),a.set(l,u)}})}let s=t.draftLocations_.get(e)??Uge;for(let a of s)Ub(r,a,n,i)}function zge(t,e,n){t.callbacks_.push(function(r){let i=e;if(!i||!Kb(i,r))return;r.mapSetPlugin_?.fixSetContents(i);let s=JM(i);K5(t,i.draft_??i,s,n),J5(i,r)})}function J5(t,e){if(t.modified_&&!t.finalized_&&(t.type_===3||t.type_===1&&t.allIndicesReassigned_||(t.assigned_?.size??0)>0)){let{patchPlugin_:o}=e;if(o){let r=o.getPath(t);r&&o.generatePatches_(t,r,e)}W5(t)}}function jge(t,e,n){let{scope_:o}=t;if(Ki(n)){let r=n[Cr];Kb(r,o)&&r.callbacks_.push(function(){Mb(t);let s=JM(r);K5(t,n,s,e)})}else bo(n)&&t.callbacks_.push(function(){let i=Hs(t);t.type_===3?i.has(n)&&jb(n,o.handledSet_,o):FM(i,e,t.type_)===n&&o.drafts_.length>1&&(t.assigned_.get(e)??!1)===!0&&t.copy_&&jb(FM(t.copy_,e,t.type_),o.handledSet_,o)})}function jb(t,e,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||Ki(t)||e.has(t)||!bo(t)||Wb(t)||(e.add(t),Bb(t,(o,r)=>{if(Ki(r)){let i=r[Cr];if(Kb(i,n)){let s=JM(i);Ub(t,o,s,t.type_),W5(i)}}else bo(r)&&jb(r,e,n)})),t}function Fge(t,e){let n=Hb(t),o={type_:n?1:0,scope_:e?e.scope_:q5(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:e,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},r=o,i=Fb;n&&(r=[o],i=uS);let{revoke:s,proxy:a}=Proxy.revocable(r,i);return o.draft_=a,o.revoke_=s,[a,o]}var Fb={get(t,e){if(e===Cr)return t;let n=t.scope_.arrayMethodsPlugin_,o=t.type_===1&&typeof e=="string";if(o&&n?.isArrayOperationMethod(e))return n.createMethodInterceptor(t,e);let r=Hs(t);if(!LM(r,e,t.type_))return Bge(t,r,e);let i=r[e];if(t.finalized_||!bo(i)||o&&t.operationMethod&&n?.isMutatingArrayMethod(t.operationMethod)&&$ge(e))return i;if(i===zM(t.base_,e)||Vge(t,e,i)){Mb(t);let s=t.type_===1?+e:e,a=WM(t.scope_,i,t,s);return t.copy_[s]=a}return i},has(t,e){return e in Hs(t)},ownKeys(t){return Reflect.ownKeys(Hs(t))},set(t,e,n){let o=Y5(Hs(t),e);if(o?.set)return o.set.call(t.draft_,n),!0;if(!t.modified_){let r=zM(Hs(t),e),i=r?.[Cr];if(i&&i.base_===n)return t.copy_[e]=n,t.assigned_.set(e,!1),!0;if(Dge(n,r)&&(n!==void 0||LM(t.base_,e,t.type_)))return!0;Mb(t),qM(t)}return t.copy_[e]===n&&(n!==void 0||LM(t.copy_,e,t.type_))||Number.isNaN(n)&&Number.isNaN(t.copy_[e])||(t.copy_[e]=n,t.assigned_.set(e,!0),jge(t,e,n)),!0},deleteProperty(t,e){return Mb(t),zM(t.base_,e)!==void 0||e in t.base_?(t.assigned_.set(e,!1),qM(t)):t.assigned_.delete(e),t.copy_&&delete t.copy_[e],!0},getOwnPropertyDescriptor(t,e){let n=Hs(t),o=Reflect.getOwnPropertyDescriptor(n,e);return o&&{[wb]:!0,[jM]:t.type_!==1||e!=="length",[Lb]:o[Lb],[cS]:n[e]}},defineProperty(){ui(11)},getPrototypeOf(t){return Jp(t.base_)},setPrototypeOf(){ui(12)}},uS={};for(let t in Fb){let e=Fb[t];uS[t]=function(){let n=arguments;return n[0]=n[0][0],e.apply(this,n)}}uS.deleteProperty=function(t,e){return uS.set.call(this,t,e,void 0)};uS.set=function(t,e,n){return Fb.set.call(this,t[0],e,n,t[0])};function zM(t,e){let n=t[Cr];return(n?Hs(n):t)[e]}function Vge(t,e,n){return t.type_!==1||!t.allIndicesReassigned_||t.assigned_?.get(e)||!bo(n)||n[Cr]?!1:t.baseRefs_.has(n)}function Bge(t,e,n){let o=Y5(e,n);return o?cS in o?o[cS]:o.get?.call(t.draft_):void 0}function Y5(t,e){if(!(e in t))return;let n=Jp(t);for(;n;){let o=Object.getOwnPropertyDescriptor(n,e);if(o)return o;n=Jp(n)}}function qM(t){t.modified_||(t.modified_=!0,t.parent_&&qM(t.parent_))}function Mb(t){t.copy_||(t.assigned_=new Map,t.copy_=VM(t.base_,t.scope_.immer_.useStrictShallowCopy_))}var Hge=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,n,o)=>{if(Kp(e)&&!Kp(n)){let i=n;n=e;let s=this;return function(c=i,...l){return s.produce(c,u=>n.call(this,u,...l))}}Kp(n)||ui(6),o!==void 0&&!Kp(o)&&ui(7);let r;if(bo(e)){let i=j5(this),s=WM(i,e,void 0),a=!0;try{r=n(s),a=!1}finally{a?HM(i):GM(i)}return z5(i,o),F5(r,i)}else if(!e||!KM(e)){if(r=n(e),r===void 0&&(r=e),r===B5&&(r=void 0),this.autoFreeze_&&YM(r,!0),o){let i=[],s=[];Kl(BM).generateReplacementPatches_(e,r,{patches_:i,inversePatches_:s}),o(i,s)}return r}else ui(1,e)},this.produceWithPatches=(e,n)=>{if(Kp(e))return(s,...a)=>this.produceWithPatches(s,c=>e(c,...a));let o,r;return[this.produce(e,n,(s,a)=>{o=s,r=a}),o,r]},UM(t?.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),UM(t?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),UM(t?.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){bo(t)||ui(8),Ki(t)&&(t=Z5(t));let e=j5(this),n=WM(e,t,void 0);return n[Cr].isManual_=!0,GM(e),n}finishDraft(t,e){let n=t&&t[Cr];(!n||!n.isManual_)&&ui(9);let{scope_:o}=n;return z5(o,e),F5(void 0,o)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,e){let n;for(n=e.length-1;n>=0;n--){let r=e[n];if(r.path.length===0&&r.op==="replace"){t=r.value;break}}n>-1&&(e=e.slice(n+1));let o=Kl(BM).applyPatches_;return Ki(t)?o(t,e):this.produce(t,r=>o(r,e))}};function WM(t,e,n,o){let[r,i]=Gb(e)?Kl(zb).proxyMap_(e,n):qb(e)?Kl(zb).proxySet_(e,n):Fge(e,n);return(n?.scope_??q5()).drafts_.push(r),i.callbacks_=n?.callbacks_??[],i.key_=o,n&&o!==void 0?zge(n,i,o):i.callbacks_.push(function(c){c.mapSetPlugin_?.fixSetContents(i);let{patchPlugin_:l}=c;i.modified_&&l&&l.generatePatches_(i,[],c)}),r}function Z5(t){return Ki(t)||ui(10,t),Q5(t)}function Q5(t){if(!bo(t)||Wb(t))return t;let e=t[Cr],n,o=!0;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,n=VM(t,e.scope_.immer_.useStrictShallowCopy_),o=e.scope_.immer_.shouldUseStrictIteration()}else n=VM(t,!0);return Bb(n,(r,i)=>{Ub(n,r,Q5(i))},o),e&&(e.finalized_=!1),n}var Gge=new Hge,ZM=Gge.produce;function X5(t){return({dispatch:n,getState:o})=>r=>i=>typeof i=="function"?i(n,o,t):r(i)}var eG=X5(),tG=X5;var qge=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?aS:aS.apply(null,arguments)},Snt=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}},Wge=t=>t&&typeof t.match=="function";function mc(t,e){function n(...o){if(e){let r=e(...o);if(!r)throw new Error(Jb(0));return{type:t,payload:r.payload,..."meta"in r&&{meta:r.meta},..."error"in r&&{error:r.error}}}return{type:t,payload:o[0]}}return n.toString=()=>`${t}`,n.type=t,n.match=o=>w5(o)&&o.type===t,n}var sG=class pS extends Array{constructor(...e){super(...e),Object.setPrototypeOf(this,pS.prototype)}static get[Symbol.species](){return pS}concat(...e){return super.concat.apply(this,e)}prepend(...e){return e.length===1&&Array.isArray(e[0])?new pS(...e[0].concat(this)):new pS(...e.concat(this))}};function nG(t){return bo(t)?ZM(t,()=>{}):t}function Kge(t){return typeof t=="boolean"}var Jge=()=>function(e){let{thunk:n=!0,immutableCheck:o=!0,serializableCheck:r=!0,actionCreatorCheck:i=!0}=e??{},s=new sG;return n&&(Kge(n)?s.push(eG):s.push(tG(n.extraArgument))),s},Yge="RTK_autoBatch";var rG=t=>e=>{setTimeout(e,t)},Zge=(t,e)=>n=>{let o=!1,r=()=>{o||(o=!0,cancelAnimationFrame(i),clearTimeout(s),n())},i=t(r),s=setTimeout(r,e)},Qge=(t={type:"raf"})=>e=>(...n)=>{let o=e(...n),r=!0,i=!1,s=!1,a=new Set,c=t.type==="tick"?queueMicrotask:t.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?Zge(window.requestAnimationFrame,100):rG(10):t.type==="callback"?t.queueNotification:rG(t.timeout),l=()=>{s=!1,i&&(i=!1,a.forEach(u=>u()))};return Object.assign({},o,{subscribe(u){let p=()=>r&&u(),m=o.subscribe(p);return a.add(u),()=>{m(),a.delete(u)}},dispatch(u){try{return r=!u?.meta?.[Yge],i=!r,i&&(s||(s=!0,c(l))),o.dispatch(u)}finally{r=!0}}})},Xge=t=>function(n){let{autoBatch:o=!0}=n??{},r=new sG(t);return o&&r.push(Qge(typeof o=="object"?o:void 0)),r};function aG(t){let e=Jge(),{reducer:n=void 0,middleware:o,devTools:r=!0,duplicateMiddlewareCheck:i=!0,preloadedState:s=void 0,enhancers:a=void 0}=t||{},c;if(typeof n=="function")c=n;else if(Db(n))c=D5(n);else throw new Error(Jb(1));let l;typeof o=="function"?l=o(e):l=e();let u=aS;r&&(u=qge({trace:!1,...typeof r=="object"&&r}));let p=$5(...l),m=Xge(p),f=typeof a=="function"?a(m):m(),g=u(...f);return kM(c,s,g)}function ehe(t){let e={},n=[],o,r={addCase(i,s){let a=typeof i=="string"?i:i.type;if(!a)throw new Error(Jb(28));if(a in e)throw new Error(Jb(29));return e[a]=s,r},addAsyncThunk(i,s){return s.pending&&(e[i.pending.type]=s.pending),s.rejected&&(e[i.rejected.type]=s.rejected),s.fulfilled&&(e[i.fulfilled.type]=s.fulfilled),s.settled&&n.push({matcher:i.settled,reducer:s.settled}),r},addMatcher(i,s){return n.push({matcher:i,reducer:s}),r},addDefaultCase(i){return o=i,r}};return t(r),[e,n,o]}function the(t){return typeof t=="function"}function Ji(t,e){let[n,o,r]=ehe(e),i;if(the(t))i=()=>nG(t());else{let a=nG(t);i=()=>a}function s(a=i(),c){let l=[n[c.type],...o.filter(({matcher:u})=>u(c)).map(({reducer:u})=>u)];return l.filter(u=>!!u).length===0&&(l=[r]),l.reduce((u,p)=>{if(p)if(Ki(u)){let f=p(u,c);return f===void 0?u:f}else{if(bo(u))return ZM(u,m=>p(m,c));{let m=p(u,c);if(m===void 0){if(u===null)return u;throw Error("A case reducer on a non-draftable value must not return undefined")}return m}}return u},a)}return s.getInitialState=i,s}var nhe=(t,e)=>Wge(t)?t.match(e):t(e);function rhe(...t){return e=>t.some(n=>nhe(n,e))}var ohe="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",ihe=(t=21)=>{let e="",n=t;for(;n--;)e+=ohe[Math.random()*64|0];return e},she=["name","message","stack","code"],QM=class{constructor(t,e){this.payload=t,this.meta=e}payload;meta;_type},oG=class{constructor(t,e){this.payload=t,this.meta=e}payload;meta;_type},ahe=t=>{if(typeof t=="object"&&t!==null){let e={};for(let n of she)typeof t[n]=="string"&&(e[n]=t[n]);return e}return{message:String(t)}},iG="External signal was aborted",che=(()=>{function t(e,n,o){let r=mc(e+"/fulfilled",(c,l,u,p)=>({payload:c,meta:{...p||{},arg:u,requestId:l,requestStatus:"fulfilled"}})),i=mc(e+"/pending",(c,l,u)=>({payload:void 0,meta:{...u||{},arg:l,requestId:c,requestStatus:"pending"}})),s=mc(e+"/rejected",(c,l,u,p,m)=>({payload:p,error:(o&&o.serializeError||ahe)(c||"Rejected"),meta:{...m||{},arg:u,requestId:l,rejectedWithValue:!!p,requestStatus:"rejected",aborted:c?.name==="AbortError",condition:c?.name==="ConditionError"}}));function a(c,{signal:l}={}){return(u,p,m)=>{let f=o?.idGenerator?o.idGenerator(c):ihe(),g=new AbortController,h,E;function C(_){E=_,g.abort()}l&&(l.aborted?C(iG):l.addEventListener("abort",()=>C(iG),{once:!0}));let I=(async function(){let _;try{let N=o?.condition?.(c,{getState:p,extra:m});if(uhe(N)&&(N=await N),N===!1||g.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let z=new Promise((H,ne)=>{h=()=>{ne({name:"AbortError",message:E||"Aborted"})},g.signal.addEventListener("abort",h,{once:!0})});u(i(f,c,o?.getPendingMeta?.({requestId:f,arg:c},{getState:p,extra:m}))),_=await Promise.race([z,Promise.resolve(n(c,{dispatch:u,getState:p,extra:m,requestId:f,signal:g.signal,abort:C,rejectWithValue:((H,ne)=>new QM(H,ne)),fulfillWithValue:((H,ne)=>new oG(H,ne))})).then(H=>{if(H instanceof QM)throw H;return H instanceof oG?r(H.payload,f,c,H.meta):r(H,f,c)})])}catch(N){_=N instanceof QM?s(null,f,c,N.payload,N.meta):s(N,f,c)}finally{h&&g.signal.removeEventListener("abort",h)}return o&&!o.dispatchConditionRejection&&s.match(_)&&_.meta.condition||u(_),_})();return Object.assign(I,{abort:C,requestId:f,arg:c,unwrap(){return I.then(lhe)}})}}return Object.assign(a,{pending:i,rejected:s,fulfilled:r,settled:rhe(s,r),typePrefix:e})}return t.withTypes=()=>t,t})();function lhe(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function uhe(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var dhe=Symbol.for("rtk-slice-createasyncthunk"),Ant={[dhe]:che};var cG="listener",lG="completed",uG="cancelled",Cnt=`task-${uG}`,Int=`task-${lG}`,_nt=`${cG}-${uG}`,bnt=`${cG}-${lG}`;var{assign:dG}=Object;var XM="listenerMiddleware";var phe=dG(mc(`${XM}/add`),{withTypes:()=>phe}),Tnt=mc(`${XM}/removeAll`),mhe=dG(mc(`${XM}/remove`),{withTypes:()=>mhe});function Jb(t){return`Minified Redux Toolkit error #${t}; visit https://redux-toolkit.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var e1=(t=>{let e=new Set,n=e,o=()=>{e===n&&(e=new Set(e))},r=s=>{let a=!0;return o(),e.add(s),()=>{a&&(o(),e.delete(s),a=!1)}},i=()=>{let s=Array.from(e);n=e,s.forEach(a=>a())};return(...s)=>{let a=t(...s),c=!1,l=!1,u=m=>Array.isArray(m)?m.map(u):a.dispatch(m),p=m=>{let f=l;f||(c=!1,l=!0);let g=u(m),h=c&&!f;return f||(c=!1,l=!1),h&&i(),g};return a.subscribe(()=>{l?c=!0:i()}),{...a,dispatch:p,subscribe:r}}});var pG=t=>!!t&&typeof t=="object"&&!Array.isArray(t),fhe=(t,e)=>{if(Object.keys(e).length===0)return;sn.updateDataPageStore(e),t[d.SHARED]||(t[d.SHARED]={});let n=t[d.SHARED];Object.entries(e).forEach(([o,r])=>{let i=n[o];pG(i)&&pG(r)?n[o]={...i,...r}:n[o]=r})},fc=(t,e)=>{let{data:{shared:n={}}={},context:o}=e;if(Object.keys(n).length===0){o&&y.deleteIn(t,[o,"shared"]);return}fhe(t,n),o&&y.deleteIn(t,[o,"shared"])},Jl=(t,e,n=!1)=>{let{context:o,caseViewMode:r=n?void 0:d.PERFORM_MODE,containerName:i}=e;i!==Ee.WORKAREA&&r&&y.setIn(t,[o,"context_data","caseViewMode"],r)},t1=(t,e)=>{let{context:n}=e;y.setIn(t,[n,"context_data","actionType"],e.actionType),y.setIn(t,[n,"context_data","assignmentID"],e.assignmentID)},mG=(t,e)=>{let{context:n}=e;y.deleteIn(t,[n,"context_data","blocking_action_counter"]),y.deleteIn(t,[n,"context_data","deferred_action_queue"])};var mS=t=>t!==null&&typeof t=="object",fG=(t,e=[])=>{e.forEach(n=>y.deleteIn(t,n))},n1=(t,e=[])=>{e.forEach(n=>y.deleteIn(t,n))},r1=(t,e=[])=>{e.forEach(n=>{y.deleteIn(t,n)})},Yb=(t,e,n={})=>{let{deleteAssignmentSpecificResources:o=!0,doDeleteConfirmationDetails:r=!0,skipMergeAssignmentsAndActions:i=!0}=n;y.deleteIn(t,[e,"nextAssignmentInfo"]),i&&(y.deleteIn(t,[e,d.CASE_INFO.CASE_INFO,"availableActions"]),y.deleteIn(t,[e,d.CASE_INFO.CASE_INFO,"availableProcesses"]),y.deleteIn(t,[e,d.CASE_INFO.CASE_INFO,"assignments"])),y.deleteIn(t,[e,d.CASE_INFO.CASE_INFO,"activeActionID"]),y.deleteIn(t,[e,d.CASE_INFO.CASE_INFO,"childCases"]),r&&(y.deleteIn(t,[e,d.CASE_INFO.CASE_INFO,"confirmationLinks"]),y.deleteIn(t,[e,"caseMessages"])),o&&(y.deleteIn(t,[e,d.CASE_INFO.CASE_INFO,"actionButtons"]),y.deleteIn(t,[e,d.CASE_INFO.CASE_INFO,"navigation"]))},ghe=(t,e)=>{let{containerItemID:n,context:o,deleteContext:r}=e;r&&y.deleteIn(t,[o]),y.deleteIn(t,[n])},hhe={},yhe=Ji(hhe,t=>{t.addCase(bt,(e,n)=>{if(!n.payload.data||e[n.payload.context])return;n.payload.doDeleteCaseSummary&&Yb(e,n.payload.context);let{target:o}=n.payload;o&&(o.includes(d.WORKAREA)||o.includes(d.MODAL))?e[n.payload.context]=n.payload.data:e[n.payload.containerItemID]=n.payload.data,Jl(e,n.payload),t1(e,n.payload),fc(e,n.payload),mG(e,n.payload)}).addCase(Ht,(e,n)=>{n.payload.doDeleteCaseSummary&&Yb(e,n.payload.context,{deleteAssignmentSpecificResources:n.payload.deleteAssignmentSpecificResources});let{target:o,propertiesToReplace:r=[]}=n.payload;if(o&&(o.includes(d.WORKAREA)||o.includes(d.MODAL))){let i=e[n.payload.context];mS(i)&&(e[n.payload.context]=jt(i,n.payload.data,{propertiesToReplace:[...r]}))}else{let i=e[n.payload.containerItemID];mS(i)&&(e[n.payload.containerItemID]=jt(i,n.payload.data,{propertiesToReplace:[...r]}))}(n.payload.actionType||n.payload.assignmentID)&&t1(e,n.payload),Jl(e,n.payload),fc(e,n.payload),n1(e,n.payload.suggestionContexts)}).addCase(tt,(e,n)=>{let{childContainersContexts:o=[]}=n.payload;ghe(e,n.payload),r1(e,o),fG(e,n.payload.transientItems),n1(e,n.payload.suggestionContexts)}).addCase(fi,(e,n)=>{let{containerItems:o}=n.payload;Array.isArray(o)?o.forEach(r=>{y.deleteIn(e,[r])}):y.deleteIn(e,[o])}).addCase(fa,(e,n)=>{let{context:o,contextToBeRemoved:r,data:i,childContainersContextsToBeRemoved:s}=n.payload;Yb(e,n.payload.context),Jl(e,n.payload);let a=e[o],c=e[r];if(!mS(a)||!mS(c))return;let l=jt(a,c);mS(l)&&(e[o]=jt(l,i),y.deleteIn(e,[r]),r1(e,s),fc(e,n.payload))}).addCase(st,(e,n)=>{let{context:o,pulseReplace:r=!0,childContainersContexts:i=[]}=n.payload,{data:s}=n.payload,a=y.getIn(e[o],"pulse"),c=y.getIn(e[o],"OperatorID"),l=y.getIn(e[o],"pxRequestor");y.setIn(e,o,s),l&&y.setIn(e,[o,"pxRequestor"],s.pxRequestor?y.mergeDeep(l,s.pxRequestor):l),c&&y.setIn(e,[o,"OperatorID"],s.OperatorID?y.mergeDeep(c,s.OperatorID):c),!r&&a&&y.setIn(e,[o,"pulse"],a),Jl(e,n.payload),fc(e,n.payload),r1(e,i),fG(e,n.payload.transientItems),n1(e,n.payload.suggestionContexts)}).addCase(Rr,(e,n)=>{let{context:o,doDeleteConfirmationDetails:r=!0,skipMergeAssignmentsAndActions:i=!0}=n.payload;Yb(e,o,{doDeleteConfirmationDetails:r,skipMergeAssignmentsAndActions:i})}).addCase(da,(e,n)=>{let{transientItemID:o,data:r}=n.payload;y.setIn(e,o,r)}).addCase(gi,(e,n)=>{let{transientItems:o}=n.payload;o.forEach(r=>y.deleteIn(e,r))}).addCase(hi,(e,n)=>{let{transientItems:o}=n.payload;o.forEach(r=>y.deleteIn(e,r))}).addCase(pa,(e,n)=>{let{transientItemID:o,data:r}=n.payload;jt(y.getIn(e,o),r)}).addCase(No,(e,n)=>{let{transientItemID:o,data:r}=n.payload;jt(y.getIn(e,o),r)}).addCase(ss,(e,n)=>{let{transientItemID:o,data:r}=n.payload;Object.keys(r??{}).forEach(i=>{y.deleteIn(e,[o,i])})}).addCase(ma,(e,n)=>{let{transientItemID:o,data:r}=n.payload;y.deleteIn(e,o),y.setIn(e,o,r)}).addCase(Du,(e,n)=>{let{key:o,value:r}=n.payload;y.setIn(e,`${d.SHARED}.${o}`,r)}).addCase(Mu,(e,n)=>{let{context:o,data:r}=n.payload;return y.setIn(e,o,r)})}),o1=yhe;function gG(t){if(typeof t=="object"&&t!==null&&"payload"in t&&typeof t.payload=="object"&&t.payload!==null){let e=t.payload.context;return typeof e=="string"?e:void 0}}var She=mc(zu),Ehe=Ji({},t=>{t.addCase(Pn,(e,n)=>{let{propertiesToReplace:o=[],propertiesToReArrange:r=[],uiRootReference:i="",interestPath:s}=n.payload,a=i&&typeof n.payload.context=="string"?`${n.payload.context}.${i}`:n.payload.context,c=typeof a=="string"?Io(a):[],l={isArrayDeepMerge:n.payload.isArrayDeepMerge,propertiesToReplace:[...o],propertiesToReArrange:[...r]};if(i&&c.length)y.setIn(e,c,jt(y.getIn(e,c),y.getIn(n.payload.data,Io(i)),l));else if(s){let u=y.getIn(e[n.payload.context],s),p=y.getIn(n.payload.data,s),m=jt(u,p,{isArrayDeepMerge:!0}),f=y.getIn(n.payload.data.context_data,s);Rb(e[n.payload.context],[...o],[...r]),y.setIn(e[n.payload.context],s,m),e[n.payload.context]&&f&&y.setIn(e[n.payload.context].context_data,s,jt(y.getIn(e[n.payload.context].context_data,s),f,{isArrayDeepMerge:!0}))}else e[n.payload.context]=jt(e[n.payload.context],n.payload.data,l);Jl(e,n.payload,!0),fc(e,n.payload)}).addCase(Pt,(e,n)=>{let{context:o,reference:r,value:i,isArrayDeepMerge:s}=n.payload;SM(e[o],r,i,{isArrayDeepMerge:s})}).addCase(Mc,(e,n)=>{let{context:o,reference:r,value:i}=n.payload;EM(e[o],r,i)}).addCase($u,(e,n)=>{yM(e[n.payload.context],n.payload.reference)}).addCase(ca,(e,n)=>{y.setIn(e[n.payload.context],"context_data.isLoading",!0)}).addCase(Wo,(e,n)=>{y.setIn(e[n.payload.context],"context_data.isLoading",!1)}).addCase(la,(e,n)=>{let o=gG(n);o&&(e[o]||(e[o]={}),y.setIn(e[o],"context_data.isOffline",!0))}).addCase(xu,(e,n)=>{let o=gG(n);o&&(e[o]||(e[o]={}),y.setIn(e[o],"context_data.isOffline",!1))}).addCase(yi,(e,n)=>{let{data:o}=n.payload;fc(e,{data:{shared:o}})}).addCase(Uu,(e,n)=>{let{dataPagesToBeRemoved:o=[]}=n.payload;if(!e.shared||o.length===0)return;let r=new Map;o.forEach(i=>{let{dataPageName:s,dataPageNameWithHash:a}=i,c=r.get(s);c?c.push(a):r.set(s,[a])}),r.forEach((i,s)=>{i.forEach(c=>{y.deleteIn(e.shared,[s,c])});let a=y.getIn(e.shared,[s]);a&&Object.keys(a).length===0&&y.deleteIn(e.shared,[s])})}).addCase(Uc,(e,n)=>{let o=y.getIn(e[n.payload.context].context_data,"blocking_action_counter",0);n.payload.isInitiateBlockingAction?y.setIn(e[n.payload.context].context_data,"blocking_action_counter",o+1):y.setIn(e[n.payload.context].context_data,"blocking_action_counter",o-1)}).addCase(She,(e,n)=>{e.locale=y.getIn(n.payload,"locale","")})}),hG=Ehe;var SG=/\[(\d+)\]$/gi,EG=/(\d+)/gi,Ahe=/\[\d+\]$/,AG=(t,e,n,o=[d.CONTEXT_DATA,d.CASE_INFO.CASE_INFO,d.CONTENT])=>{let r=y.getIn(e,o);if(r){let s=WA(r,[],[]);for(let a of s)y.setIn(t[n],[...o,...a],{})}},yG=(t,e,n,o)=>{let{property:r,pageReference:i,category:s,type:a,subType:c}=o.payload,l=y.getIn(t[e],n);if(l&&s===d.CASEMESSAGES)y.setIn(t[e],ho(r,i,s),"");else if(l&&l.length>0&&Array.isArray(l)){let u;c?u=l.filter(p=>!(p.type===a&&p.subType===c)):u=l.filter(p=>p.type!==a),n&&n.length>0&&y.setIn(t[e],ho(r,i,s),u)}},Che=(t,e)=>{let{property:n,pageReference:o,category:r,isListEntry:i,stateObj:s}=e.payload,{context:a}=e.payload,c=a;if(s)return AG(t,s,a),t;let l=ho(n,o,r,i);return r===d.PAGE&&a?.includes(Ee.WORKAREA)&&(c=Ye(a)),yG(t,c,l,e),yG(t,a,l,e),t},Ihe=t=>{let e=t.map(n=>{let o=n.match(SG),r=null;if(o?.length){let i=o[0].match(EG);i?.length&&(r=parseInt(i[0],10))}return{key:n,hasIndex:!!o,numericIndex:r}});return e.sort((n,o)=>!n.hasIndex&&!o.hasIndex?n.key.localeCompare(o.key):!n.hasIndex&&o.hasIndex?-1:n.numericIndex!==null&&o.numericIndex!==null?n.numericIndex-o.numericIndex:1),e.map(n=>n.key)},_he=(t,e)=>{let{property:n,pageReference:o,category:r,isListEntry:i,deletingIndex:s,stateObj:a}=e.payload,{context:c}=e.payload;if(a)return AG(t,a,c),t;let l=ho(n,o,r,i);if(Number.isInteger(s)){y.deleteIn(t[c],l);let u=l.slice(0,l.length-1),p=y.getIn(t[c],u)||{},m=Ihe(Object.keys(p));p=m.map(f=>p[f]),p.forEach((f,g)=>{let h=m[g].match(SG);if(h?.length){let E=parseInt(h[0].match(EG)[0],10);E>s&&(y.deleteIn(t[c],u.concat(m[g])),y.setIn(t[c],u.concat(m[g].replace(Ahe,`[${E-1}]`)),f))}})}else y.setIn(t[c],l,{});return t};function bhe(t){let e=null,n=t.lastIndexOf(".");return n<0?null:(e=t.substring(0,n),e&&`caseInfo.content.${e}`.replace(/\(/g,"[").replace(/\)/g,"]"))}function CG(t,e){return y.getIn(t,e)?.dataInfo?.content!==void 0}var IG=(t,e)=>{let n=y.getIn(t,e);return G.isObjectCaseType(n?.objectInfo?.objectTypeID)===!0};function _G(t,e){let n=er.FIELD_MESSAGES_PATH;return CG(t,e)?n=er.DATA_OBJECT_FIELD_MESSAGES_PATH:IG(t,e)&&(n=er.OBJECT_FIELD_MESSAGES_PATH),n}var The=(t,e,n)=>{let o=y.getIn(n,d.ERROR_FIELD_IN_PAGE).slice(1),r=y.getIn(n,d.ERROR_IN_PAGE_IDENTIFIER).slice(1);if(r){let i="caseInfo.content";CG(t,e)?i="dataInfo.content":IG(t,e)&&(i="objectInfo.content");let s=o?`${i}.${o}`:i;s=s.replace(/\(/g,"[").replace(/\)/g,"]");let a=ho(r,s,d.PROPERTY),c=y.getIn(t[e],`${s}.classID`),l=ft(r,c),u=T.getLocale()??"en-US",p=new jp(u,l?.localeReference),m={type:A.MESSAGES.MESSAGES_TYPE_ERROR,message:n.localizedValue,...l?.label&&{fieldLabel:p.getLocalizedText(l.label)}},f=y.getIn(t[e],a,[]);if(y.isContains(f,m))return;y.setIn(t[e],a,[...f,m])}},vhe=(t,e,n)=>{n.forEach(o=>{The(t,e,o)})},Rhe=t=>{let e=[];return t.forEach(n=>{let o=n.erroneousInputOutputFieldInPage?.replace(/^\./,"");e.push({type:A.MESSAGES.MESSAGES_TYPE_ERROR,message:n.localizedValue,...o&&{fieldInPage:o}})}),e};function Phe(t,e){let{err:n,formFields:o}=e.payload,{context:r}=e.payload,{fieldErrors:i,pageErrors:s}=hV(n.errorDetails,o),a=_G(t,r);if(y.setIn(t,[r,...a],{}),y.setIn(t,[r,...er.PAGE_MESSAGES_PATH],[]),i.forEach(c=>{let l=y.getIn(c,d.ERROR_FIELD_IN_PAGE);if(l){let u=l.slice(1);if(u){let p=bhe(u);if(!p)return!1;let m=u.substring(u.lastIndexOf(".")+1),f=ho(m,p,d.PROPERTY);y.setIn(t,[r,...f],[])}}}),i.length>0&&vhe(t,r,i),s.length>0){let c=Rhe(s);t[r]||(r=d.APP.APP),y.setIn(t,[r,...er.PAGE_MESSAGES_PATH],c)}else r.includes&&r.includes(Ee.WORKAREA)&&(r=Ye(r)),y.deleteIn(t,[r,...er.PAGE_MESSAGES_PATH]);return t}var Nhe=Ji({},t=>{t.addCase(ve,(e,n)=>n.payload.err.errorDetails&&(n.payload.err.errorClassification===A.VALIDATION_FAIL||n.payload.err.errorClassification===A.INVALID_INPUTS||(n.payload.err?.displayButtonsOnErrors?.length??0)>0)?Phe(e,n):e).addCase(Ht,(e,n)=>{let{context:o}=n.payload,r=[o,..._G(e,o)],i=[o,...er.PAGE_MESSAGES_PATH];if(y.setIn(e,r,{}),y.setIn(e,i,[]),o&&o.includes(Ee.WORKAREA)){let a=[Yo(o),...er.PAGE_MESSAGES_PATH];y.setIn(e,a,[])}}).addCase(lo,(e,n)=>{let{isListEntry:o,clearAll:r,context:i}=n.payload;return r?(y.deleteIn(e,[i,d.CONTEXT_DATA]),e):o?_he(e,n):Che(e,n)}).addCase(ya,(e,n)=>{let{messages:o,property:r,pageReference:i,context:s,category:a}=n.payload,c=ho(r,i,a);o&&o.length>0&&Array.isArray(o)&&c&&c.length>0&&y.setIn(e[s],ho(r,i,a),o)})}),i1=Nhe;var bG=(t,e,n,o,r)=>{y.setIn(t[e],[...n,o],r)},Ohe=(t,e,n,o,r)=>{let i=jt(y.getIn(t[e],[...n,o],{}),r);y.setIn(t[e],[...n,o],i)},xhe=(t,e,n,o,r)=>{let i=y.getIn(t[e],n,[]);typeof o=="string"?delete i[o]:i.splice(o,1),y.setIn(t[e],n,i),be.deleteListNode(e,[r],i.length)},Dhe=(t,e,n,o,r)=>{if(o===r)return;let i=y.getIn(t[e],[...n,o],{}),s=y.getIn(t[e],n,[]);s.splice(o,1),s.splice(r,0,i),y.setIn(t[e],n,s),LV(t,e,n?.join("."),o,r)},$he=(t,e,n,o)=>{let r=y.getIn(t[e],n)||[],i=!1;o.forEach(s=>{let{instruction:a,content:c,listIndex:l}=s;a===d.LIST_ACTIONS.SELECT?(r[l]=c,i=!0):delete r[l]}),i&&ba(e,n?.join(".")),y.setIn(t[e],n,r.filter(Boolean))},whe=(t,e,n)=>{y.setIn(t[e],n,[])},Mhe=(t,e,n,o)=>{y.setIn(t[e],n,o)},khe=(t,e,n)=>{y.setIn(t[e],n,{})},Lhe=Ji({},t=>{t.addCase(Oo,(e,n)=>{let{instruction:o,actions:r,context:i,referenceList:s,listIndex:a,groupIndex:c,listMoveToIndex:l,content:u={}}=n.payload,p=Io(s);switch(o){case d.LIST_ACTIONS.ADD:bG(e,i,p,c,u);break;case d.LIST_ACTIONS.INSERT:bG(e,i,p,a,u);break;case d.LIST_ACTIONS.UPDATE:Ohe(e,i,p,a??c,u);break;case d.LIST_ACTIONS.DELETE:xhe(e,i,p,a??c,s);break;case d.LIST_ACTIONS.MOVE:Dhe(e,i,p,a,l);break;case d.LIST_ACTIONS_TYPE.SELECT_DESELECT:$he(e,i,p,r);break;case d.LIST_ACTIONS_TYPE.DESELECT_ALL:whe(e,i,p);break;case d.LIST_ACTIONS.REPLACE:Mhe(e,i,p,u);break;case d.LIST_ACTIONS.DELETEPAGE:khe(e,i,p);break;default:break}})}),TG=Lhe;var vG=(t,e)=>{if(t||(t=fS().data),e.type===Sa)return fS().data;switch(e.type){case Pn:case Pt:case Mc:case $u:case ca:case Wo:case la:case xu:case yi:case Uu:case Uc:case zu:return hG(t,e);case ve:case lo:case ya:return i1(t,e);case Ht:return i1(o1(t,e),e);case bt:case tt:case fi:case fa:case st:case Rr:case da:case gi:case hi:case pa:case No:case ss:case ma:case Du:case Mu:return o1(t,e);case Oo:return TG(t,e);default:return t}};var RG={},s1=(t,e=[])=>{e.forEach(n=>{y.deleteIn(t,[n])})},Uhe=(t,e,n,o)=>{t===""&&y.deleteIn(e,[n,"items",o,"key"])},zhe=(t,e,n,o,r)=>{o||(r?y.setIn(t,[e,"items",n,"pageName"],r):y.deleteIn(t,[e,"items",n,"pageName"]))},a1=(t,e)=>{let{type:n,payload:o}=e,r=n===Ht,{target:i,context:s,semanticURL:a="",root:c,containerItemID:l,childContainers:u,flowName:p,resourceType:m="",key:f="",clearView:g=!1,pageName:h}=o;return c?y.setIn(t,[i,"items",l,"view"],c):g&&y.deleteIn(t,[i,"items",l,"view"]),s&&y.setIn(t,[i,"items",l,"context"],s),p&&y.setIn(t,[i,"items",l,"flowName"],p),(!r||r&&f)&&y.setIn(t,[i,"items",l,"key"],f.trim()),Uhe(f,t,i,l),(!r||r&&a)&&y.setIn(t,[i,"items",l,"semanticURL"],a),(!r||r&&m)&&y.setIn(t,[i,"items",l,"resourceType"],m),zhe(t,i,l,r,h),s1(t,u),t},jhe=({prevItems:t,prevAccessedOrder:e,containerItemID:n,root:o,semanticURL:r,key:i,flowName:s,readOnly:a,context:c,isInCreateStage:l,resourceType:u,actionName:p,isMinimizable:m,isBulkAction:f,showProgress:g,progressMessage:h,modalOptions:E,isTraditionalRemoteCase:C,resourceStatus:I,hideDefaultActionButtons:_,referenceList:P,subscriptName:N,subscriptFieldName:z,pageGroupName:H,isPageGroup:ne,index:j,actionID:oe,acTertiary:Ae,isMultiRecordData:he,parentContext:Oe,isDeleteConfirmation:He,workId:_e,caseTypeID:Xe,className:De,keys:Et,enableBackNavigation:an,heading:vn,pageName:cn})=>({accessedOrder:[...e,n],items:{...t,[n]:{view:o,semanticURL:r,key:i,flowName:s,readOnly:a,context:c,isInCreateStage:l,resourceType:u,actionName:p,isMinimizable:m,...f&&{isBulkAction:f},showProgress:g,progressMessage:h,modalOptions:E,isTraditionalRemoteCase:C,resourceStatus:I,..._&&{hideDefaultActionButtons:_},referenceList:P,subscriptName:N,subscriptFieldName:z,pageGroupName:H,isPageGroup:ne,index:j,...oe&&{actionID:oe},...Ae&&{acTertiary:Ae},...he&&{isMultiRecordData:he},...Oe&&{parentContext:Oe},...cn&&{pageName:cn},...He&&{isDeleteConfirmation:He,workId:_e,caseTypeID:Xe,className:De,keys:Et,enableBackNavigation:an},heading:vn}}}),Fhe=(t,e)=>{let{target:n,context:o,isInCreateStage:r,isBulkAction:i,semanticURL:s,root:a,containerItemID:c,actionMgrID:l,key:u,flowName:p,resourceType:m,actionName:f,isMinimizable:g,showProgress:h,progressMessage:E,modalOptions:C,resourceStatus:I,hideDefaultActionButtons:_,actionID:P,isMultiRecordData:N,acTertiary:z,parentContext:H,heading:ne,isTraditionalRemoteCase:j,readOnly:oe,referenceList:Ae,subscriptName:he,subscriptFieldName:Oe,pageGroupName:He,isPageGroup:_e,index:Xe,isDeleteConfirmation:De,workId:Et,caseTypeID:an,className:vn,keys:cn,enableBackNavigation:br,pageName:Ho}=e.payload,kn=t[n],oo=kn&&kn.type,cr=kn&&kn.accessedOrder||[],Ut=kn&&kn.items||{};if(t[n]&&oo==="single"&&cr.length>0){a1(t,e);return}let To=jhe({prevItems:Ut,prevAccessedOrder:cr,containerItemID:c,root:a,semanticURL:s,key:u,flowName:p,readOnly:oe,context:o,isInCreateStage:r,resourceType:m,actionName:f,isMinimizable:g,isBulkAction:i,showProgress:h,progressMessage:E,modalOptions:C,isTraditionalRemoteCase:j,resourceStatus:I,hideDefaultActionButtons:_,referenceList:Ae,subscriptName:he,subscriptFieldName:Oe,pageGroupName:He,isPageGroup:_e,index:Xe,actionID:P,acTertiary:z,isMultiRecordData:N,parentContext:H,isDeleteConfirmation:De,workId:Et,caseTypeID:an,className:vn,keys:cn,enableBackNavigation:br,heading:ne,pageName:Ho});M.resolveActionByID(l,null,!1),t[n]||(t[n]={accessedOrder:[],items:{}},oo!==void 0&&(t[n].type=oo)),y.setIn(t,[n,"accessedOrder"],To.accessedOrder),y.setIn(t,[n,"items",c],To.items[c])},Vhe=(t,e,n)=>{let o=t&&t[e]?.type,r=t&&t[e]?.accessedOrder||[];return o==="single"?r.length>0?r:[...r,n]:r.includes(n)?r:[...r,n]},Bhe=(t,e)=>{let{actionMgrID:n,data:o,target:r,containerItemID:i}=e.payload,s=t;try{let a=Vhe(t,r,i);y.setIn(t,[r,"items",i,"transientItems"],[]),y.setIn(t,[r,"accessedOrder"],a),s=a1(t,e),M.resolveActionByID(n,o,!1)}catch{M.rejectActionByID(n,!1)}return s},Hhe=Ji(RG,t=>{t.addCase(Sa,()=>RG).addCase(wu,(e,n)=>{let{context:o,name:r,type:i,actionMgrID:s}=n.payload,a=`${o}/${r}`;if(M.resolveActionByID(s,null,!1),e[a])return e;y.setIn(e,[a],{type:i,accessedOrder:[],items:{}})}).addCase(IE,(e,n)=>{let{containerName:o,childContainers:r=[]}=n.payload;y.deleteIn(e,[o]),r.forEach(i=>{y.deleteIn(e,[i])})}).addCase(fi,(e,n)=>{let{context:o,name:r,actionMgrID:i,childContainers:s}=n.payload,a=`${o}/${r}`;M.resolveActionByID(i,null,!1),y.setIn(e,[a,"accessedOrder"],[]),y.setIn(e,[a,"items"],{}),Array.isArray(s)&&s.forEach(c=>{y.deleteIn(e,[c])})}).addCase(bt,(e,n)=>{Fhe(e,n)}).addCase(Ht,(e,n)=>{let{actionMgrID:o,data:r}=n.payload;try{a1(e,n),M.resolveActionByID(o,r,!1)}catch{M.rejectActionByID(o,!1)}}).addCase(st,(e,n)=>Bhe(e,n)).addCase(mn,(e,n)=>{let{target:o,containerItemID:r,actionMgrID:i}=n.payload;try{let s=y.getIn(e,[o,"accessedOrder"]).filter(a=>a!==r);s.push(r),y.setIn(e,[o,"accessedOrder"],s),M.resolveActionByID(i,null,!1)}catch{M.rejectActionByID(i,!1)}}).addCase(fa,(e,n)=>{let{target:o,containerItemID:r,actionMgrID:i,childContainers:s}=n.payload;try{let a=y.getIn(e,[o,"accessedOrder"]).filter(c=>c!==r);y.setIn(e,[o,"accessedOrder"],a),y.deleteIn(e,[o,"items",r]),s1(e,s),M.resolveActionByID(i,null,!1)}catch{M.rejectActionByID(i,!1)}}).addCase(tt,(e,n)=>{let{target:o,containerItemID:r,actionMgrID:i,childContainers:s}=n.payload;try{let a=y.getIn(e,[o,"accessedOrder"]).filter(c=>c!==r);y.setIn(e,[o,"accessedOrder"],a),y.deleteIn(e,[o,"items",r]),s1(e,s),M.resolveActionByID(i,null,!1)}catch{M.rejectActionByID(i,!1)}}).addCase(da,(e,n)=>{let{transientItemID:o,target:r,contextName:i}=n.payload,s=y.getIn(e,[r,"items",i,"transientItems"])??[];y.setIn(e,[r,"items",i,"transientItems"],[...s,o])}).addCase(hi,(e,n)=>{let{target:o,containerItemID:r}=n.payload;y.deleteIn(e,[o,"items",r,"transientItems"])}).addCase(gi,(e,n)=>{let{target:o,transientItemID:r,containerItemID:i}=n.payload,a=(y.getIn(e,[o,"items",i,"transientItems"])??[]).filter(c=>c!==r);y.setIn(e,[o,"items",i,"transientItems"],a)})}),PG=Hhe;var NG={},fS=()=>NG,Ghe=t=>{let e=t.Data||t.data,{uiResources:n={}}=t,o=n[d.CONTEXT_DATA]||t[d.CONTEXT_DATA];NG={data:{locale:T.getLocale(),[d.APP.APP]:{...e,[d.CONTEXT_DATA]:o}},containers:{}}},OG=t=>(Ghe(t),{data:vG,containers:PG});var c1=(t,e=!1)=>t===d.ACTION?e?Kt.REFRESH_CASE_DATA:Kt.REFRESH_ASSIGNMENT_DATA:Kt.REFRESH_CASE_VIEW,l1=(t,e,n)=>{let o=[];e&&n&&o.push({page:e,actionID:n});let r=t;for(;r;){let i=Q.getPropertyValue(d.CONTEXT_DATA_MODAL_VIEW.CONTEXT_DATA_MODAL_VIEW,"",r);if(!i?.isMultiRecordData||i.editType!==d.ACTION||!i.interestPage||!i.interestPageActionID)break;i.interestPage!==e&&o.unshift({page:i.interestPage,actionID:i.interestPageActionID}),r=i.parentContext}return o},Zb=t=>{let{context:e}=t,o={...Mt(e,{skipUUID:!1}).content,contextData:!1},r=dd(e);y.isEmpty(r)||(o=ol(r,o));let i=c1(t.editType,t.isLocalAction),{restApi:s,reqType:a}=F(i,{ID:!t.isLocalAction&&t.editType===d.ACTION?t.assignmentID:t.ID,actionID:t.actionID,viewID:t.viewID}),c=s;return t.editType===d.ACTION&&(c+=`?operation=${t.operationFlag}`,o.interestPageActionID=t.interestPageActionID,T.isInfinityRuntime()&&(o.actionIdArrayToBeProcessed=l1(e,t.interestPage,t.interestPageActionID))),o.interestPage=t.interestPage,Y(k(c,{method:a,body:o,headers:t.headers},e)).pipe(x(l=>({actionInPayload:t,response:l.data,headers:ke(l.headers)})),fe(": Error occurred during ajax call : ",e))};var Qb=[d.CASE_INFO.CASE_INFO_CONTENT,d.OBJECT_INFO.OBJECT_INFO_CONTENT],qhe=(t,e)=>`${Qb.find(o=>y.hasIn(t,o))??d.CASE_INFO.CASE_INFO_CONTENT}${y.convertClipboardPageToPageRefNotation(e)}`,u1=async(t,e)=>{let{context:n,serverPrecedenceFields:o,requestType:r}=e,i=qt.getTargetViewContainerName(Vr),s=X(i,n),a={acName:s,context:n},c=ze(t,{[A.STOPMERGEACTIONS]:!0,[A.ACTIONS.DELETEAVIALACTIONS]:!0});c.directUrlUpdation=!1,r===Kt.REFRESH&&await Pe(c,e,a);let u=Me(c,{target:s,context:n});e.interestPage&&(u.interestPath=qhe(u.data,e.interestPage)),u.isArrayDeepMerge=e.options?.isArrayDeepMerge,u.preserveClientChanges=e.options?.preserveClientChanges!==void 0?e.options.preserveClientChanges:!0;let p=G.getPropertiesToReArrange(n);return{payload:u,mergeOptions:{serverPrecedenceFields:o,propertiesToReArrange:p}}},xG=async(t,e)=>{let{context:n}=e,{payload:o,mergeOptions:r}=await u1(t,e),i=B(Ne,o,r),s=i.payload?.data?.pageInstructions;return s?.length>0&&(delete i.payload?.data?.pageInstructions,Ue.mergeServerPageInstructions(n,s)),v(i),o};var Whe=()=>{let t=`${d.APP.APP}/${d.PRIMARY}`,e=se(t);return(e?Qt(`${e}/${d.WORKAREA}`):null)??Qt(t)},DG=async t=>{let e=Whe();if(!e)return;let{data:n}=Sw(t);typeof n!="object"||n===null||await xG(n,{context:e,serverPrecedenceFields:[],requestType:Kt.REFRESH})};var p1=t=>typeof t=="object"&&t!==null&&!Array.isArray(t),$G=t=>p1(t)||t===void 0||t===null,wG=t=>p1(t)?t:void 0,d1=(t,e)=>t===e||t.startsWith(`${e}.`)||t.startsWith(`${e}[`),MG=(t,e,n,o,r=[])=>{let i={stalePaths:[],conflictPaths:[]},s=(c,l,u,p)=>{r.some(m=>d1(p,m)||d1(m,p))||Ro(u,l)||(Ro(c,l)?i.stalePaths.push(p):Ro(c,u)||i.conflictPaths.push(p))},a=(c,l,u,p)=>{if(!(l===u||r.some(m=>d1(p,m)))){if(p1(c)&&$G(l)&&$G(u)){Object.keys(c).forEach(m=>{a(c[m],wG(l)?.[m],wG(u)?.[m],`${p}.${m}`)});return}Array.isArray(c)||Array.isArray(l)||Array.isArray(u)||s(c,l,u,p)}};return a(t,e,n,o),i};var Gs={},{VIEW:Khe,FIELD:Jhe}=d.CONTEXT_TREE_NODE_TYPES,Yhe=["refreshFor","propertyName","optionalPayload","resetForm","skipPayloadGeneration","isFillFormWithAI"],eT={},tT={},nT={},f1={},rT={},oT={},g1=new Set,kG=0,Zhe=(t,e)=>{let n=[];return Object.keys(t).forEach(o=>{(!Object.hasOwn(e,o)||e[o]!==t[o])&&n.push(o)}),n},LG=t=>{let e=Qy(t.context);return{changedPropertyValues:e,preserveFields:t.preRequestSnapshot?Zhe(e,t.preRequestSnapshot):[]}},Qhe=t=>{if(!t)return;let e=rT[t];return delete rT[t],e},Xhe=t=>{if(!t)return;let e=oT[t];return delete oT[t],e},eye=(t,e)=>{let n=t.mergePayload?.preserveClientChanges===!1?e.preserveFields:Object.keys(e.changedPropertyValues),{serverPrecedenceFields:o}=t.mergeOptions,r=(o??[]).flatMap(i=>Qb.map(s=>`${s}.${i}`));return[...n,...r]},tye=t=>typeof t=="object"&&t!==null?JSON.parse(JSON.stringify(t)):t,nye=(t,e)=>{let n=t.mergePayload?.data;if(t.preRequestData===void 0||!n)return!1;let o=J(t.context),r=t.mergePayload.interestPath?[t.mergePayload.interestPath]:Qb,i=eye(t,e),s=!1;return r.forEach(a=>{let c=y.getIn(n,a);if(c===void 0)return;let{stalePaths:l,conflictPaths:u}=MG(c,y.getIn(t.preRequestData,a),y.getIn(o,a),a,i);l.forEach(p=>{let m=y.getIn(o,p);m===void 0?y.deleteIn(n,p):y.setIn(n,p,tye(m))}),(l.length>0||u.length>0)&&(s=!0)}),s},rye=t=>{let e=M.getNextActionMgrId(),n={...t.options,actionMgrID:e};Yhe.forEach(o=>{delete n[o]}),g1.add(e),v(Da({...t,options:n}))},oye=t=>t.some(n=>n.isReconciliation)?void 0:[...t].reverse().find(n=>{let o={...n.actionConfig?.options};return n.actionConfig&&!o.isFillFormWithAI})?.actionConfig,UG=t=>t.actionConfig?.actionType===zc,iye=t=>{let e=0,n=()=>{},o=new Promise(r=>{n=r});return w.publish(A.PUB_SUB_EVENTS.ON_FILL_FORM_WITH_AI_COMPLETE,{context:t,registerField:()=>{e+=1},deregisterField:()=>{e-=1,e===0&&n()}}),e===0&&n(),o},zG=async t=>{UG(t)&&(await iye(t.context),t.actionMgrID&&M.resolveActionByID(t.actionMgrID,t.mergePayload)),vt.deRegisterBlockingAction(t.context).catch(()=>{})},jG=(t,e,n)=>{let o=e&&nye(t,n),{preserveFields:r}=n,i=r.length>0?{...t.mergeOptions,preserveFields:r}:t.mergeOptions,s=B(Ne,t.mergePayload,i),a=y.getIn(s,"payload.data.pageInstructions");return a&&a.length>0&&(delete s.payload?.data?.pageInstructions,Ue.mergeServerPageInstructions(t.context,a)),v(s),t.actionMgrID&&!UG(t)&&M.resolveActionByID(t.actionMgrID,t.mergePayload),o},sye=t=>{delete tT[t];let e=eT[t];if(delete eT[t],!e||e.length===0)return;e.sort((a,c)=>a.seq-c.seq);let n=e.length>1,o=!1,r=new Set;e.map(a=>({item:a,changeState:LG(a)})).forEach(({item:a,changeState:c})=>{o=jG(a,n,c)||o,r.add(a.context)}),r.forEach(a=>{w.publish(A.PUB_SUB_EVENTS.ON_REFRESH_COMPLETE,{context:a})});let s=o?oye(e):void 0;s&&rye(s),e.forEach(zG)},aye=(t,e,n)=>{if(!t)return;nT[t]=e,kG+=1,f1[t]=kG,rT[t]=Qy(n),oT[t]=J(n),(tT[e]??(tT[e]=new Set)).add(t)},cye=t=>t?f1[t]??0:0,m1=t=>{if(!t)return;let e=nT[t];if(!e)return;delete nT[t],delete f1[t],delete rT[t],delete oT[t],g1.delete(t);let n=tT[e];n&&(n.delete(t),n.size===0&&sye(e))},lye=t=>(jG(t,!1,LG(t)),w.publish(A.PUB_SUB_EVENTS.ON_REFRESH_COMPLETE,{context:t.context}),zG(t)),uye=t=>{let{ID:e,actionID:n,context:o}=t;return`${e}.${o}.${n}`},dye=(t,e,n)=>{let o=e.value.data[n]?.objectInfo?.headers,r=e.value.data[n]?.caseInfo?.headers;return!G.shouldUseUnifiedHandling()&&t&&o?o:r},pye=t=>{let{reqHeaders:e}=t;e&&(t.headers=t.headers||{},e.etag&&(t.headers["if-match"]=e.etag))},mye=t=>(it()||y8(t)>0)&&Gs[t],fye=(t,e,n)=>{let{mcpAction:o,body:r}=t;return o&&it()&&B_({body:r,responseType:t.responseType})?Ot(o.actionName,{queryPayload:o.queryPayload,body:H_(r),headers:Ti({headers:t.headers,body:r},e)},t.cancelConfig?.token):k(t.url,t,e,{cancelContext:n})},gye=(t,e)=>{let n=[];for(let o=0;o<Gs[t].length;){let r=Gs[t][o],i=tV(r,e);if(i===UR)return!1;i===!0&&(n.push(o),r.cancelConfig?.cancel()),o+=1}for(let o=n.length-1;o>=0;o-=1)Gs[t].splice(n[o],1);return!0},hye=(t,e)=>{let{context:n}=t;pye(t);let o=uye(e);if(e.interestPage&&(t.interestPage=e.interestPage),mye(o)&&!gye(o,t)){let i=Object.assign(new Error,{code:"ERR_CANCELED"});return Promise.reject(i)}let r=Qu();return t.signal=r.token,t.cancelConfig=r,Gs[o]?Gs[o].push(t):Gs[o]=[t],w.publish(A.PUB_SUB_EVENTS.ON_REFRESH_START,{context:n}),kf()&&aye(e.options?.actionMgrID,o,n),fye(t,n,o).then(i=>(delete Gs[o],i)).catch(i=>{throw i&&i.code!=="ERR_CANCELED"&&delete Gs[o],i})},Xb=(t,e)=>({routeKey:t,restAPI:F(t,e)}),yye=(t,e)=>{let{isObjectType:n,isExternalObject:o,actionID:r,context:i,isExternalCase:s,casetypeID:a}=t,c=d.getDefaultQualifiedName(d.VIEW_NAMES.OBJECT_CREATE_VIEW);if(e||n&&LR(i)){let l=o&&r===c?Kt.REFRESH_EXTERNAL_OBJECT:Kt.REFRESH_CASE_DATA,u=G.shouldUseUnifiedHandling();return o&&r===c&&u&&(l=Kt.REFRESH_EXTERNAL_CASE_DATA),Xb(l,t)}return Xb(s&&a&&r===c?Kt.REFRESH_EXTERNAL_CASE_DATA:Kt.REFRESH_ASSIGNMENT_DATA,t)},Sye=(t,e,n,o,r)=>{r={...r,calculations:{fields:e,whens:n}};let{routeKey:i,restAPI:s}=Xb(o?Kt.RECALCULATE_CASE_DATA:Kt.RECALCULATE_ASSIGNMENT_DATA,t),a=Kt.RECALCULATE;return{routeKey:i,restAPI:s,requestBody:r,requestType:a}},Eye=(t,e)=>{let{caseWideAction:n,caseViewAction:o,fieldsWithDeclarativeTargets:r,fieldsWithWhen:i,isViewsWithWhen:s,interestPage:a,options:c,isMultiRecordData:l,editType:u,isLocalAction:p,interestPageActionID:m,context:f}=t,{optionalPayload:g}=c;g&&(e.content={...g});let h,E={},C={...e},I=Kt.REFRESH;return o||l&&u===d.ACTION?(h=c1(u,p),l&&u===d.ACTION&&(C.interestPageActionID=m,T.isInfinityRuntime()&&(C.actionIdArrayToBeProcessed=l1(f))),E=F(h,t),C={...C,interestPage:a}):s||c.refreshFor?{routeKey:h,restAPI:E}=yye(t,n):(r.length>0||i.length>0)&&({routeKey:h,restAPI:E,requestBody:C,requestType:I}=Sye(t,r,i,n,C)),{routeKey:h,restAPI:E,requestBody:C,requestType:I}},Aye=(t,e,n,o,r)=>{let i=ft(t,e);if(!i||i.dataRetrievalType!=="copy")return;let s=y.getIn(n,`content.content.${t}`);if(!s||typeof s!="object")return;(o?Object.keys(s).filter(c=>c!==o):Object.keys(s)).length>0&&r.push(t)},Cye=(t,e)=>t.pipe(te(Kt.REFRESH_DATA,zc),x(n=>{let o=n.payload;return o.actionType=n.type,o}),Ai(n=>!sd(n?.options?.actionMgrID)),V(n=>{let{context:o,contextData:r,options:i,isObjectType:s}=n,{propertyName:a="",classID:c="",isObjectWideAction:l,skipPayloadGeneration:u}=i,p=u?{content:{}}:Mt(o,{skipUUID:!1,isObjectWideAction:l}),m=[],f=[],g=!1;T.getFeatureMap().granularUIRefresh?({fieldsWithDeclarativeTargets:m=[],whens:f=[]}=rV(o),g=f.some(De=>De.type===Khe)):g=!0;let E=f.filter(De=>De.type===Jhe),C=y.getPropertyName(a),I=C?C.split("."):[],_=I.pop(),P=I.join("."),N=[];P&&Aye(P,c,p,_,N),n.serverPrecedenceFields=N;let z={...p.content,contextData:r},H=dd(o);y.isEmpty(H)||(z=ol(H,z));let ne=Eye({...n,fieldsWithDeclarativeTargets:m,fieldsWithWhen:E,isViewsWithWhen:g},z);vt.registerBlockingAction(o).catch(()=>{});let{routeKey:j,restAPI:oe,requestBody:Ae,requestType:he}=ne;n={...n,requestType:he},n.requestType=he;let{reqType:Oe,restApi:He}=oe,_e={...dye(s,e,o)};_e&&!_e.etag&&n.isMultiRecordData&&n.editType===d.ACTION&&(_e.etag=y.getETag(n.context));let Xe={reqHeaders:_e,context:o,method:Oe,body:Ae,url:XF(n,He),...j&&{mcpAction:{actionName:j,queryPayload:eV(n)}}};return Y(hye(Xe,n)).pipe(x(De=>{let Et=nV(De?.data,i?.classID,s);return i?.resetForm&&be.removeContextTreeNode(o),{response:{...Et},actionConfig:n,actionMgrID:n.options.actionMgrID,headers:ke(De.headers)}}),fe(": Error occurred during fetch call at refreshData Epic : ",n.context,n?.options?.actionMgrID))}),V(async n=>{if(n&&n.type===ve)return vt.deRegisterBlockingAction(n.payload?.context).catch(()=>{}),n.payload?.err?.code==="ERR_CANCELED"?(m1(n.payload?.actionMgrID),[]):(w.publish(d.ON_REFRESH_ERROR,{context:n.payload?.context}),m1(n.payload?.actionMgrID),pe(n));let{actionConfig:o,response:r,actionMgrID:i}=n,{context:s}=o,{payload:a,mergeOptions:c}=await u1(r,o),l=i?nT[i]:void 0,u={seq:cye(i),actionMgrID:i,context:s,mergePayload:a,mergeOptions:c,preRequestSnapshot:Qhe(i),preRequestData:Xhe(i),actionConfig:o,isReconciliation:g1.has(i)};return l?(eT[l]??(eT[l]=[])).push(u):await lye(u),m1(i),[]}));H9(t=>{DG(t).catch(e=>{console.error("Failed to merge MCP tool result into the store",e)})});var Iye=[Cye],FG=Iye;var _ye=t=>t.pipe(te(RE),V(async e=>{let{context:n}=e.payload,o={},r={},i=Object.keys(e.payload.datapages).map(a=>{let c=e.payload.datapages[a];if(c.mode===d.READONLY&&c?.refreshStrategy){let{timeoutSecs:l="",type:u=""}=c?.refreshStrategy||{},p=oi()[c.name];if(p&&a in p){let m=p[a],{loadTime:f}=m;if(!fn.isTimeElapsed(f,l,u))return}}return fn.getData(c.name,{dataViewParameters:c.dataViewParameters},n).then(l=>{let u=c.mode===d.READONLY?r:o,p=O.getDefaultQualifiedName("pxResults");u[c.name]?u[c.name][a]={[p]:l.data.data,parameters:c.dataViewParameters,loadTime:l.data?.fetchDateTime}:u[c.name]={[a]:{[p]:l.data.data,parameters:c.dataViewParameters,loadTime:l.data?.fetchDateTime}}}).catch(()=>{})});await Promise.allSettled(i);let s=[];return Object.keys(o).length&&s.push(Ne({context:n,data:o})),Object.keys(r).length&&s.push(PM({data:r,context:n})),v(s),[]})),bye=[_ye],VG=bye;var Tye=t=>typeof t=="object"&&t!==null&&"ID"in t&&typeof t.ID=="string"&&"state"in t&&typeof t.state=="string",h1=class t{static EDIT_OPEN="edit_open";static EDIT_SAVE="edit_save";static EDIT_SUBMIT="edit_submit";static EDIT_CANCEL="edit_cancel";static VIEW_OPEN="view_open";static VIEW_CLOSE="view_close";static caseCollabSubIds={};static openCaseViewByCaseId=new Set;static collabConfig;static EDITING_STATE="editing";static PAGE_CATEGORY=d.PAGE;static WARNING_TYPE="warning";static INFO_TYPE="info";static ERROR_TYPE="error";static LOCALE_CATEGORY="Messages";static STALE_DATA_TYPE="error";static STALE_ASSIGNMENT_TYPE="error";static EDIT_WARNING_MESSAGE="Changes may be lost: Others are editing – only the first save or submit is kept.";static STALE_DATA_MESSAGE="The case was updated by another user. Please refresh to view the latest information.";static STALE_ASSIGNMENT_MESSAGE="This assignment is no longer available because it was completed or updated by another user.";static NO_EDITORS_INFO_MESSAGE="Changes can now be saved: No more editors active.";static NO_EDITORS_INFO_SUBTYPE="collaboration-no-editors";static caseContextById={};static collaborationBannerByContext={};static assignmentIdByContext={};static DEPARTURE_STATES=new Set(["closed"]);static ACTION_STATE_MESSAGES={saved:"Changes may be lost: Other user has saved this assignment.",submitted:"Changes may be lost: Other user has submitted this assignment."};static ASSIGNMENT_AWARE_STATES=new Set(["saved","submitted","stage_changed"]);static INTERACTION_STATE_BY_EVENT={edit_open:"editing",edit_save:"saved",edit_submit:"submitted",edit_cancel:"viewing",view_open:"viewing",view_close:"closed"};static normalizeInteractionState(e){return this.INTERACTION_STATE_BY_EVENT[e]??e}static getLocalizedMessage(e){return zn().getLocaleValue(e,this.LOCALE_CATEGORY)}static assignmentContextsByCaseId={};static caseIdByAssignmentContext={};static editorStateByCaseId={};static localInteractionStateByCaseId={};static respondedToViewOpenByCaseId={};static pendingActionStateByCaseId={};static suppressEditingWarningOnNextAssignmentLoadByCaseId={};static pendingSaveCaseIds=new Set;static cancelTransitionCaseIds=new Set;static getCollaborationState(e){let n=Object.entries(e?.message??{})[0];if(!n)return null;let[o,r]=n;if(typeof r=="string")return{userID:o,state:this.normalizeInteractionState(r),eventType:r};if(typeof r!="object"||r===null||!("state"in r)||typeof r.state!="string")return null;let i=this.normalizeInteractionState(r.state),s="assignmentId"in r&&typeof r.assignmentId=="string"&&r.assignmentId||("assignmentID"in r&&typeof r.assignmentID=="string"?r.assignmentID:void 0);return{userID:o,state:i,eventType:r.state,assignmentId:s}}static init(e){e&&(this.collabConfig=e)}static isCollaborationEnabled(){return!!(t.collabConfig?.appEnabled&&t.collabConfig?.portalEnabled)}static isLaunchpadRuntime(){return!T.isInfinityRuntime()}static dispatchCollaboratorAction=(e,n,o,r,i)=>{v({type:"LIST_ACTION",payload:{instruction:e,context:n,referenceList:r,listIndex:o,content:i,skipDirtyValidation:!0,skipRefresh:!0}})};static handleCaseCollaboratorsUpdate(e,n,o){let r=this.getCollaborationState(o);if(!r)return;let{userID:i,state:s,eventType:a,assignmentId:c}=r;if(i===T.getOperatorIdentifier())return;this.respondToCollaboratorViewOpen(e,i,a,s);let l=this.DEPARTURE_STATES.has(s),u=this.editorStateByCaseId[e]??(this.editorStateByCaseId[e]={});l?delete u[i]:u[i]=s;let p={ID:i,state:s},m=[n,this.caseContextById[e],...this.getAssignmentContextsForCase(e)].filter(g=>!!g);new Set([...m,...m.map(g=>Ye(g))]).forEach(g=>{let h=ie(d.CASE_INFO.CASE_INFO_COLLABORATORS,"",g)||[],E=h.findIndex(C=>C.ID===i);E!==-1?l?this.dispatchCollaboratorAction("DELETE",g,E,d.CASE_INFO.CASE_INFO_COLLABORATORS,null):this.dispatchCollaboratorAction("REPLACE",g,null,`${d.CASE_INFO.CASE_INFO_COLLABORATORS}[${E}]`,p):l||this.dispatchCollaboratorAction("INSERT",g,h.length,d.CASE_INFO.CASE_INFO_COLLABORATORS,p)}),this.isLaunchpadRuntime()&&this.updateLaunchpadCollaborationState(e,s,c)}static updateLaunchpadCollaborationState(e,n,o){let r=this.getAssignmentContextsForCase(e);this.ASSIGNMENT_AWARE_STATES.has(n)&&((n==="saved"||n==="submitted")&&(this.pendingActionStateByCaseId[e]={state:n,assignmentId:o}),r.forEach(a=>this.updateStaleState(a,n,o)));let i=this.getRemoteEditorCount(e),s=this.pendingActionStateByCaseId[e];r.forEach(a=>{this.refreshCollaborationBanner(a,i,s)})}static getCaseIdFromContext(e){let n=ie(d.CASE_INFO.CASE_INFO_ID,"",e);return typeof n=="string"&&n?n:void 0}static resolveCaseIdForAssignmentContext(e,n){if(n){let o=this.getCaseIdFromContext(n);if(o)return o;let r=this.caseIdByAssignmentContext[n];if(r)return r}return e}static getAssignmentContextsForCase(e){let n=this.assignmentContextsByCaseId[e]??[];if(n.length>0)return n;let o=[];return Object.entries(this.caseIdByAssignmentContext).forEach(([r,i])=>{(i===e||this.getCaseIdFromContext(r)===e)&&o.push(r)}),o}static getMessageTypeForBanner(e){return e.endsWith("-error")||e==="stale-assignment"?this.ERROR_TYPE:e==="stale-data"?this.STALE_DATA_TYPE:e}static clearCurrentBanner(e,n){ht({category:this.PAGE_CATEGORY,context:e,type:this.getMessageTypeForBanner(n)})}static getStaleBannerDetails(e){return e?{bannerType:"stale-assignment",messageType:this.STALE_ASSIGNMENT_TYPE,message:this.getLocalizedMessage(this.STALE_ASSIGNMENT_MESSAGE)}:{bannerType:"stale-data",messageType:this.STALE_DATA_TYPE,message:this.getLocalizedMessage(this.STALE_DATA_MESSAGE)}}static isLocalActionContext(e){return e.includes(d.MODAL)||ie(d.CASE_INFO.IS_LOCAL_ACTION,"",e)===!0}static isAssignmentContext(e){return e.includes(d.WORKAREA)||e.includes(d.MODAL)}static restoreCollaboratorsFromContext(e,n){if(this.editorStateByCaseId[e])return;let o=[n,Ye(n)],r;for(let a of o)if(r=ie(d.CASE_INFO.CASE_INFO_COLLABORATORS,"",a),Array.isArray(r))break;if(!Array.isArray(r))return;let i=T.getOperatorIdentifier(),s={};r.forEach(a=>{if(!Tye(a)||a.ID===i)return;let c=this.normalizeInteractionState(a.state);this.DEPARTURE_STATES.has(c)?delete s[a.ID]:s[a.ID]=c}),this.editorStateByCaseId[e]=s}static respondToCollaboratorViewOpen(e,n,o,r){if(this.DEPARTURE_STATES.has(r)){this.respondedToViewOpenByCaseId[e]?.delete(n);return}if(o!==this.VIEW_OPEN&&r!=="viewing")return;let i=this.respondedToViewOpenByCaseId[e]??new Set;if(this.respondedToViewOpenByCaseId[e]=i,i.has(n))return;let s=this.localInteractionStateByCaseId[e];if(!s)return;i.add(n);let a=s===this.EDITING_STATE?this.EDIT_OPEN:this.VIEW_OPEN;this.publishCaseEvent(a,e)}static updateStaleState(e,n,o){if(!this.isLaunchpadRuntime())return;let r=o?this.assignmentIdByContext[e]===o:!1,i=!this.isLocalActionContext(e)&&r&&(n==="submitted"||n==="stage_changed");if(hd(e)&&!i)return;let{bannerType:s,messageType:a,message:c}=this.getStaleBannerDetails(i),l=this.collaborationBannerByContext[e];l!==s&&(l&&this.clearCurrentBanner(e,l),Hr({category:this.PAGE_CATEGORY,context:e,messages:[{type:a,message:c}]}),this.collaborationBannerByContext[e]=s,i?(eP(e,!0),this.hideAssignmentActions(e)):eP(e,!1))}static hideAssignmentActions(e){if(!this.isLaunchpadRuntime()||!J(e))return;let n=ie(d.CASE_INFO.ACTION_BUTTONS,"",e),o=Array.isArray(n?.main)?n.main:[],r=Array.isArray(n?.secondary)?n.secondary:[],i=s=>{if(!s)return!1;let a=typeof s.actionID=="string"?s.actionID.toLowerCase():"",c=typeof s.jsAction=="string"?s.jsAction.toLowerCase():"";return a==="cancel"||c==="cancelassignment"};v({type:Pt,payload:{context:e,reference:d.CASE_INFO.ACTION_BUTTONS,value:{main:o.filter(s=>i(s)),secondary:r.filter(s=>i(s))}}})}static isAssignmentStale(e){return hd(e)}static isContextStale(e){return GA(e)}static getMatchingPendingAction(e,n){let o=typeof n=="string"?{state:n}:n,r=this.assignmentIdByContext[e];if(o&&(!o.assignmentId||o.assignmentId===r))return o}static refreshCollaborationBanner(e,n,o){if(!this.isLaunchpadRuntime())return;let r=this.getMatchingPendingAction(e,o);if(r){let i=this.collaborationBannerByContext[e];if(i==="stale-data"||i==="stale-assignment")return;let s=r.state==="submitted"?"submitted-error":"saved-error";if(this.collaborationBannerByContext[e]!==s){let a=this.ACTION_STATE_MESSAGES[r.state];a&&this.showActionBanner(e,this.getLocalizedMessage(a),r.state)}return}this.updateCollaborationBanner(e,n)}static getRemoteEditorCount(e){let n=this.editorStateByCaseId[e]??{};return Object.values(n).filter(o=>o===this.EDITING_STATE).length}static clearPendingActionStates(e){delete this.pendingActionStateByCaseId[e]}static isCaseStillLoaded(e){let n=this.caseContextById[e];return n?ie(d.CASE_INFO.CASE_INFO_ID,"",n)===e:!1}static updateCollaborationBanner(e,n){let o=this.collaborationBannerByContext[e];this.isAssignmentStale(e)||o==="stale-data"||(n>0?((o==="saved-error"||o==="submitted-error")&&ht({category:this.PAGE_CATEGORY,context:e,type:this.ERROR_TYPE}),o===this.INFO_TYPE&&ht({category:this.PAGE_CATEGORY,context:e,type:this.INFO_TYPE}),Hr({category:this.PAGE_CATEGORY,context:e,messages:[{type:this.WARNING_TYPE,message:this.getLocalizedMessage(this.EDIT_WARNING_MESSAGE)}]}),this.collaborationBannerByContext[e]=this.WARNING_TYPE):(o===this.WARNING_TYPE||o==="saved-error"||o==="submitted-error")&&(ht({category:this.PAGE_CATEGORY,context:e,type:o===this.WARNING_TYPE?this.WARNING_TYPE:this.ERROR_TYPE}),Hr({category:this.PAGE_CATEGORY,context:e,messages:[{type:this.INFO_TYPE,message:this.getLocalizedMessage(this.NO_EDITORS_INFO_MESSAGE),subType:this.NO_EDITORS_INFO_SUBTYPE,dismissible:!0,context:e}]}),this.collaborationBannerByContext[e]=this.INFO_TYPE))}static clearCollaborationBanner(e){let n=this.collaborationBannerByContext[e];n&&(this.clearCurrentBanner(e,n),MV(e),delete this.collaborationBannerByContext[e])}static showActionBanner(e,n,o){let r=this.collaborationBannerByContext[e];r&&this.clearCurrentBanner(e,r),Hr({category:this.PAGE_CATEGORY,context:e,messages:[{type:this.ERROR_TYPE,message:n}]}),this.collaborationBannerByContext[e]=o==="submitted"?"submitted-error":"saved-error"}static handleLocalSubmit=e=>{let n=e?.caseID;if(!n)return;this.pendingSaveCaseIds.add(n);let o=e.assignmentId||(e.context?ie(d.CASE_INFO.ASSIGNMENT_ID,"",e.context):void 0),r=e.isModalAction===!0&&e.isModalLaunchedFromPrimaryValue===!0,i=e.isLocalAction===!0||r;i||(this.suppressEditingWarningOnNextAssignmentLoadByCaseId[n]=!0),this.publishCaseEvent(i?this.EDIT_SAVE:this.EDIT_SUBMIT,n,o)};static handleLocalSave=e=>{let n=e?.caseID||(e?.context?ie(d.CASE_INFO.CASE_INFO_ID,"",e.context):"");if(!n)return;this.pendingSaveCaseIds.add(n);let o=e.assignmentID;this.publishCaseEvent(this.EDIT_SAVE,n,o)};static handleLocalCancel=e=>{e?.caseID&&(this.localInteractionStateByCaseId[e.caseID]="viewing",this.pendingSaveCaseIds.add(e.caseID),this.clearPendingActionStates(e.caseID),this.publishCancelTransition(e.caseID))};static publishCancelTransition(e){if(this.cancelTransitionCaseIds.has(e)){this.cancelTransitionCaseIds.delete(e);return}this.cancelTransitionCaseIds.add(e),setTimeout(()=>this.cancelTransitionCaseIds.delete(e),0),this.publishCaseEvent(this.EDIT_CANCEL,e)}static handleCaseEditClose=e=>{e&&(this.localInteractionStateByCaseId[e]="viewing",this.pendingSaveCaseIds.add(e),this.publishCancelTransition(e))};static handleAssignmentLoad=e=>{let{caseKey:n,actionInContext:o}=e??{};if(!o||!this.isAssignmentContext(o))return;let r=this.resolveCaseIdForAssignmentContext(n,o);if(!r)return;this.caseCollabSubIds[r]||this.subscribeToCollaborators(r,o),this.pendingSaveCaseIds.delete(r),this.restoreCollaboratorsFromContext(r,o);let i=this.getRemoteEditorCount(r);this.suppressEditingWarningOnNextAssignmentLoadByCaseId[r]&&(delete this.suppressEditingWarningOnNextAssignmentLoadByCaseId[r],i=0);let s=this.assignmentContextsByCaseId[r]??(this.assignmentContextsByCaseId[r]=[]);s.includes(o)||s.push(o),this.caseIdByAssignmentContext[o]=r;let a=e.assignmentID;a&&(this.assignmentIdByContext[o]=a),this.clearCollaborationBanner(o),this.refreshCollaborationBanner(o,i,this.pendingActionStateByCaseId[r])};static closeAssignmentContext(e){this.clearCollaborationBanner(e);let n=this.caseIdByAssignmentContext[e];if(delete this.caseIdByAssignmentContext[e],delete this.assignmentIdByContext[e],!n)return;let o=this.assignmentContextsByCaseId[n];if(!o)return;let r=o.indexOf(e);r!==-1&&o.splice(r,1),o.length===0&&delete this.assignmentContextsByCaseId[n]}static handleAssignmentUnload=e=>{let n=e?.actionInContext;n&&this.closeAssignmentContext(n)};static subscribeToCollaborators(e,n){let o=It.subscribe({matcher:"CASE_COLLABORATOR",criteria:{caseId:e}},r=>this.handleCaseCollaboratorsUpdate(e,n,r));this.caseCollabSubIds[e]=o,this.caseContextById[e]=n}static unsubscribeToCollaborators(e){It.unsubscribe(this.caseCollabSubIds[e]),delete this.caseCollabSubIds[e];let n=this.caseContextById[e];n&&(this.clearCollaborationBanner(n),delete this.caseContextById[e]);let o=this.assignmentContextsByCaseId[e];o&&o.slice().forEach(r=>this.closeAssignmentContext(r)),delete this.editorStateByCaseId[e],delete this.localInteractionStateByCaseId[e],delete this.respondedToViewOpenByCaseId[e],delete this.pendingActionStateByCaseId[e],this.pendingSaveCaseIds.delete(e),this.cancelTransitionCaseIds.delete(e),delete this.suppressEditingWarningOnNextAssignmentLoadByCaseId[e]}static publishCaseEvent(e,n,o){It.publishMessage({filter:{matcher:"CASE_COLLABORATOR",criteria:{caseId:n}},message:o?{state:e,assignmentId:o}:e})}static handleCaseLoadEvent(e){let{caseId:n,context:o}=e,r=!this.openCaseViewByCaseId.has(n);this.openCaseViewByCaseId.add(n);let i=this.caseCollabSubIds[n];r&&i&&It.unsubscribe(i),(!i||r)&&this.subscribeToCollaborators(n,o),this.restoreCollaboratorsFromContext(n,o),this.localInteractionStateByCaseId[n]??="viewing",this.publishCaseEvent(this.VIEW_OPEN,n)}static shouldKeepCaseSubscriptionOnUnload(e){return this.pendingSaveCaseIds.has(e)||(this.assignmentContextsByCaseId[e]??[]).length>0||this.isCaseStillLoaded(e)}static handleCaseUnloadEvent(e){let{caseId:n}=e;this.openCaseViewByCaseId.delete(n),!this.shouldKeepCaseSubscriptionOnUnload(n)&&this.caseCollabSubIds[n]&&(this.publishCaseEvent(this.VIEW_CLOSE,n),delete this.localInteractionStateByCaseId[n],this.unsubscribeToCollaborators(n))}static handleCaseClosedEvent(e){let{caseId:n}=e;this.openCaseViewByCaseId.delete(n),n&&this.caseCollabSubIds[n]&&(this.publishCaseEvent(this.VIEW_CLOSE,n),delete this.localInteractionStateByCaseId[n],this.unsubscribeToCollaborators(n))}static getCaseEventCallback(e,n){switch(e){case d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_EDIT_OPEN:return o=>{this.cancelTransitionCaseIds.delete(o),this.localInteractionStateByCaseId[o]=this.EDITING_STATE,this.publishCaseEvent(n,o)};case d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_LOAD:return o=>this.handleCaseLoadEvent(o);case d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_UNLOAD:return o=>this.handleCaseUnloadEvent(o);case d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_CLOSED:return o=>this.handleCaseClosedEvent(o);case d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_EDIT_CLOSE:return o=>this.handleCaseEditClose(o);default:throw new Error(`Unhandled eventKey: ${e}`)}}static subscribeToEvent(e,n,o){let r=this.getCaseEventCallback(e,n);w.subscribe(e,r,o)}static unsubscribeFromEvent(e,n){w.unsubscribe(e,n)}static subscribeToCaseEvents(){(this.isCollaborationEnabled()||this.isLaunchpadRuntime())&&(this.subscribeToEvent(d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_LOAD,this.VIEW_OPEN,"case_view_open"),this.subscribeToEvent(d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_UNLOAD,this.VIEW_CLOSE,"case_view_close"),this.subscribeToEvent(d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_CLOSED,this.VIEW_CLOSE,"case_view_closed"),this.subscribeToEvent(d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_EDIT_OPEN,this.EDIT_OPEN,"case_edit_open"),this.subscribeToEvent(d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_EDIT_CLOSE,this.EDIT_CANCEL,"case_edit_close"),w.subscribe(d.PUB_SUB_EVENTS.CASE_EVENTS.ASSIGNMENT_SUBMISSION,this.handleLocalSubmit,"case_collab_submit"),w.subscribe(d.PUB_SUB_EVENTS.CASE_EVENTS.SAVE_ASSIGNMENT_COMPLETE,this.handleLocalSave,"case_collab_save"),w.subscribe(d.PUB_SUB_EVENTS.EVENT_CANCEL,this.handleLocalCancel,"case_collab_cancel"),w.subscribe(d.PUB_SUB_EVENTS.ASSIGNMENT_EVENTS.ASSIGNMENT_LOAD,this.handleAssignmentLoad,"case_collab_assignment_load"),w.subscribe(d.PUB_SUB_EVENTS.ASSIGNMENT_EVENTS.ASSIGNMENT_UNLOAD,this.handleAssignmentUnload,"case_collab_assignment_unload"))}static unsubscribeToCaseEvents(){(this.isCollaborationEnabled()||this.isLaunchpadRuntime())&&(this.unsubscribeFromEvent(d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_LOAD,"case_view_open"),this.unsubscribeFromEvent(d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_UNLOAD,"case_view_close"),this.unsubscribeFromEvent(d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_CLOSED,"case_view_closed"),this.unsubscribeFromEvent(d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_EDIT_OPEN,"case_edit_open"),this.unsubscribeFromEvent(d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_EDIT_CLOSE,"case_edit_close"),w.unsubscribe(d.PUB_SUB_EVENTS.CASE_EVENTS.ASSIGNMENT_SUBMISSION,"case_collab_submit"),w.unsubscribe(d.PUB_SUB_EVENTS.CASE_EVENTS.SAVE_ASSIGNMENT_COMPLETE,"case_collab_save"),w.unsubscribe(d.PUB_SUB_EVENTS.EVENT_CANCEL,"case_collab_cancel"),w.unsubscribe(d.PUB_SUB_EVENTS.ASSIGNMENT_EVENTS.ASSIGNMENT_LOAD,"case_collab_assignment_load"),w.unsubscribe(d.PUB_SUB_EVENTS.ASSIGNMENT_EVENTS.ASSIGNMENT_UNLOAD,"case_collab_assignment_unload"))}},qs=h1;var y1=class t{broadcastChannel;callback;isReverseCoexistenceCase;broadcastEventToIframe;isDirtyDialogActive;onCreateCallback;openAssignmentParams;static OPEN_ASSIGNMENT_ACTION="openAssignment";static DIRTY_POPUP_C11N="displayDirtyPopupFromConstellation";static HANDLE_INFINITY_DISCARD="handleDiscardInInfinity";static OPEN_ASSIGNMENT_MODAL="openAssignmentInModal";static DISPLAY_DIRTY_POPUP="displayDirtyPopup";static LOAD_PREVIEW="loadPreview";static UPDATE_COEXISTENCE_DRILLDOWN_CASE="updateCoexistenceDrilldownCase";static OPEN_WORK_ITEM="openWorkItem";static OPEN_WORK_BY_HANDLE="openWorkByHandle";static GET_NEXT_WORK_ACTION="getNextWork";static CLOSE_CONTAINER_ACTION="closeContainer";static CANCEL_CASE="cancelCase";static CREATE_WORK="createWork";static OPEN_RULE="openRule";static OPEN_RULE_BY_CLASS_AND_NAME="openRuleByClassAndName";static OPEN_LANDING_PAGE="openLandingPage";constructor(){this.broadcastChannel=null,this.callback=null,this.isReverseCoexistenceCase=!1,this.broadcastEventToIframe=!1,this.isDirtyDialogActive=!1,this.onCreateCallback=null,this.openAssignmentParams=null}getUniqueId=()=>{let e=Reflect.get(globalThis,"uniqueId");return typeof e=="number"?e:void 0};setUniqueId=()=>{Reflect.set(globalThis,"uniqueId",new Date().getTime())};initBroadcastChannel=()=>{typeof globalThis.BroadcastChannel=="function"&&(this.setUniqueId(),this.broadcastChannel=new BroadcastChannel("coexistence"),this.broadcastChannel.onmessage=e=>{let{uniqueId:n}=e.data;if(n===this.getUniqueId())switch(e.data.action){case t.DISPLAY_DIRTY_POPUP:this.displayDirtyPopup(e);break;case t.LOAD_PREVIEW:{this.loadPreview(e);break}case t.UPDATE_COEXISTENCE_DRILLDOWN_CASE:{this.updateCoexistenceDrilldownCase(e);break}case t.OPEN_ASSIGNMENT_ACTION:{this.openAssignment(e);break}case t.GET_NEXT_WORK_ACTION:{this.getNextWork(e);break}case t.OPEN_WORK_BY_HANDLE:{this.openWorkByHandle(e);break}case t.CLOSE_CONTAINER_ACTION:{this.closeContainer(e);break}case t.CANCEL_CASE:{this.handleCaseCancel();break}case t.CREATE_WORK:{this.createWork(e);break}case t.OPEN_RULE:{this.openRule(e);break}case t.OPEN_RULE_BY_CLASS_AND_NAME:{this.openRuleByClassAndName(e);break}case t.OPEN_LANDING_PAGE:{this.openLandingPage(e);break}default:break}})};displayDirtyPopup=e=>{if(this.broadcastEventToIframe=e.data.fromInfinity??!1,!this.isDirtyDialogActive)if(e.data.isFormDirty){if(this.shouldBypassDirtyPopupForStaleAssignment()){this.callback?.call(this);return}w.publish(d.PUB_SUB_EVENTS.EVENT_SHOW_CANCEL_ALERT,{isModalAction:!0,hideDelete:!0}),this.isDirtyDialogActive=!0}else this.callback?.call(this)};shouldBypassDirtyPopupForStaleAssignment=()=>{let e=`${A.APP.APP}${d.FORWARD_SLASH_STRING}${A.PRIMARY}`,n=Qt(e),o=n?se(n):"";if(!o)return!1;let r=de(o);return[o,r].filter(s=>typeof s=="string"&&s.length>0).some(s=>qs.isAssignmentStale(s))};handleCaseCancel=()=>{let e=Ke(A.APP.APP),n=e[e.length-1],o=se(n),r=J(o)?.caseInfo?.ID;if(r&&o&&ct({}).getPConnect().getActionsApi().getDescendants(r,o),Wn(o)){let i=cc(o);i&&ct({}).getPConnect().getActionsApi().getDescendants(r,i)}};loadPreview=e=>{let{pyID:n,caseClassName:o,uniqueId:r}=e.data;r===this.getUniqueId()&&ct({}).getPConnect().getActionsApi().showCasePreview(n,{caseClassName:o})};navigateToDefaultPage=()=>{let e=O.getDefaultQualifiedName("Data-Portal"),n=O.getDefaultQualifiedName("pyHome"),o=ct({isRoot:!0}),r=PCore.getStore()?.getState().data.app?.pyPortal?.pyPrimaryNavPages,i;Array.isArray(r)&&r[0]&&(i=r[0]);let s=i?.pyClassName||e,a=i?.pyRuleName||n;o.getPConnect().getActionsApi().showPage(a,s)};closeContainer=e=>{let{uniqueId:n}=e.data;n===this.getUniqueId()&&this.navigateToDefaultPage()};updateCoexistenceDrilldownCase=e=>{let{key:n,caseClassName:o,actionApi:r,caseLabel:i,uniqueId:s}=e.data;if(s!==this.getUniqueId())return;let a=r;r===t.OPEN_WORK_ITEM&&(a=t.OPEN_WORK_BY_HANDLE),Se.updateSemanticURLAndDocumentTitle({key:n,caseClassName:o,actionName:a,name:i}),ct({}).getPConnect().getActionsApi().updateRecents(o,n.substring(n.lastIndexOf(" ")+1),i,n)};openAssignment=e=>{let{pzInsKey:n,caseClassName:o,uniqueId:r}=e.data;r===this.getUniqueId()&&(this.onCreateCallback&&this.openAssignmentParams&&(n&&this.openAssignmentParams[0]&&this.openAssignmentParams[0].payload&&this.openAssignmentParams[0].payload.data?this.openAssignmentParams[0].payload.data.caseInfo.assignments[0].ID=n:this.openAssignmentParams[0]&&this.openAssignmentParams[0].payload&&this.openAssignmentParams[0].payload.data&&(this.openAssignmentParams[0].payload.data.caseInfo.content.coexistenceAction="openWorkByHandle"),n&&o&&ct({}).getPConnect().getActionsApi().openAssignment(n,o,{containerName:A.PRIMARY,context:A.APP.APP})),this.onCreateCallback=null,this.openAssignmentParams=null)};getNextWork=e=>{let{uniqueId:n}=e.data;if(n===this.getUniqueId()){let o=`${A.APP.APP}${d.FORWARD_SLASH_STRING}${A.PRIMARY}`;ct({meta:{},options:{context:Qt(o)}}).getPConnect().getActionsApi().getNextWork()}};openWorkByHandle=e=>{let{key:n,caseClassName:o,uniqueId:r}=e.data;if(r===this.getUniqueId()){let i=`${A.APP.APP}${d.FORWARD_SLASH_STRING}${A.PRIMARY}`;ct({meta:{},options:{context:Qt(i)}}).getPConnect().getActionsApi().openWorkByHandle(n,o)}};createWork=e=>{let{strClassName:n,uniqueId:o,strFlowParams:r,caseInitProperties:i}=e.data;if(o===this.getUniqueId()){let s=`${A.APP.APP}${d.FORWARD_SLASH_STRING}${A.PRIMARY}`,a=ct({meta:{},options:{context:Qt(s)}}),c=i+r,l=new URLSearchParams(c.slice(1)),u=this.setStartingFields(l);a.getPConnect().getActionsApi().createWork(n,{startingFields:u})}};buildRuleInsKey=(e,n)=>!e||!n?null:`${String(e).toUpperCase()} ${String(n).split("!").join(" ")}`;showRuleByInsKey=e=>{let n=`${A.APP.APP}${d.FORWARD_SLASH_STRING}${A.PRIMARY}`;ct({meta:{},options:{context:Qt(n)}}).getPConnect().getActionsApi().showData(O.getDefaultQualifiedName("pyDetails"),O.getDefaultQualifiedName("D_pzRuleLookup"),{pzInsKey:e})};openRule=e=>{let{key:n,uniqueId:o}=e.data;o===this.getUniqueId()&&n&&this.showRuleByInsKey(n)};openRuleByClassAndName=e=>{let{objClass:n,insName:o,uniqueId:r}=e.data;if(r!==this.getUniqueId())return;let i=this.buildRuleInsKey(n,o);i&&this.showRuleByInsKey(i)};openLandingPage=e=>{let{className:n,harnessName:o,label:r,levelC:i,readOnly:s,model:a,uniqueId:c}=e.data;if(c!==this.getUniqueId()||!n||!o)return;let l=`${A.APP.APP}${d.FORWARD_SLASH_STRING}${A.PRIMARY}`,p=ct({meta:{},options:{context:Qt(l)}}).getPConnect().getActionsApi();if(n!=="Data-Portal"){p.showCoexistenceLandingPage({className:n,harnessName:o,label:r,levelC:i,readOnly:s,model:a});return}p.showPage(o,n)};setStartingFields=e=>{let n={};return e.forEach((o,r)=>{r&&(n[r]=o)}),n};destroyBroadcastChannel=()=>{this.getBroadCastChannel()?.close(),this.broadcastChannel=null};subscribeEvents=()=>{this.setReverseCoexistenceCaseLoaded(!0),w.subscribe(A.PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.HANDLE_DISCARD,this.handleDiscard),w.subscribe(A.PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.CHECK_IS_FORM_DIRTY,this.postDirtyPopupMessage)};unsubscribeEvents=()=>{w.unsubscribeAllWithEventType(A.PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.CHECK_IS_FORM_DIRTY),w.unsubscribeAllWithEventType(A.PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.HANDLE_DISCARD),this.setReverseCoexistenceCaseLoaded(!1),this.isDirtyDialogActive=!1};init=(e=!0)=>{this.broadcastChannel===null&&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:t.DIRTY_POPUP_C11N,uniqueId:this.getUniqueId()}),this.setCallBackFunction(e)};handleDiscard=()=>{this.broadcastEventToIframe?(this.broadcastChannel?.postMessage({action:t.HANDLE_INFINITY_DISCARD,uniqueId:this.getUniqueId()}),this.broadcastEventToIframe=!1):(this.callback?.call(this),this.callback=null),this.isDirtyDialogActive=!1};postCreateCaseMessage=(e,n,o)=>{this.broadcastChannel===null&&this.init(!1),this.broadcastChannel?.postMessage({action:t.OPEN_ASSIGNMENT_MODAL,uniqueId:this.getUniqueId(),key:e}),this.broadcastEventToIframe=!1,this.onCreateCallback=n,this.openAssignmentParams=o}},Yp=new y1;var Bo={NEXT_ASSIGNMENT_ID:"data.nextAssignmentInfo.ID",FIRST_ASSIGNMENT_ID:"data.caseInfo.assignments.0.ID",NEXT_ASSIGNMENT_INFO:"nextAssignmentInfo",NEXT_ASSIGNMENT_INFO_CONTEXT:"nextAssignmentInfo.context"},S1=t=>{let{containerName:e,isInCreateStage:n}=t;return n?d.MODAL:e||qt.getTargetViewContainerName(_E)},iT=t=>{let e=wo(t);return Dn(e,Cs(t))||Nt("createWork",{caseClassName:e}).replace(/{.+?}/,String(ln(Zt(t))))},sT=t=>t.initiatingContext||t.context,gc=async(t,e)=>Rt(t)?{continueExecution:!0,removeActionPayload:{},dirtyCheckPerformed:!1}:{...await xt(t,e),dirtyCheckPerformed:!0},E1=t=>{if(G.shouldUseUnifiedHandling())return t?.uiResources?.root?.config?.name===O.getDefaultQualifiedName("pzCreateDetails")||!1;let e=y.getIn(t,[d.DATA,d.CASE_INFO.CASE_INFO]);return on(e)&&Xu(T.getOperatorIdentifier(),e)},BG=(t,e)=>{let n=E1(t),{skipBrowserSemanticUrlUpdate:o=!1,isTraditionalUICase:r}=e,i=r&&!Ra();y.setIn(t,["directUrlUpdation"],(!n||i)&&!o)},HG=t=>t.confirmationNote?d.REVIEW_MODE:d.PERFORM_MODE,GG=(t,e,n)=>!hr(t)&&Rt(e)&&(n??!0),qG=t=>In(t)&&T.isOpenCasePageAfterCreateInMultiDocEnabled();var vye="Error occurred during ajax call at createWork Epic : ",WG=(t,e)=>{let{class:n,context:o,viewType:r=mt.PAGE}=t,{removeActionPayload:i}=e,s=t?.pageName?t?.pageName:T.getDefaultCasePage();return(t.isTraditionalUICase||!s&&t.renderInline===!0&&r!==mt.FORM)&&(s=O.getDefaultQualifiedName("pyDetails")),Y(Ui.createCase(n,{...t,pageName:s,viewType:r,context:o})).pipe(x(({response:a,headers:c})=>(qe.analyseResponse(a),{response:a,actionInPayload:t,headers:c,removeActionPayload:i})),fe(vye,o))};var hc=t=>{w.publish(d.PUB_SUB_EVENTS.DISPLAY_CASE_CREATED_TOASTER,t)},Zp=t=>{w.publish(d.PUB_SUB_EVENTS.CASE_EVENTS.CREATE_STAGE_DONE,t)},KG=t=>{w.publish(d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_VIEW_OPENED_AFTER_CREATE,t)};var Rye=(t,e)=>G.isExternalCaseType(t)&&e?e:Co(),Pye=t=>{let e=0,n=[],o={},r,i=!1,s=!1,a="",c="";return t.pipe(te(bM),bn(100),x(l=>({actionMgrID:e}=l.payload,l.payload)),V(l=>{let{context:u}=l;if(r=l.class,s=!1,a="",c="",G.isExternalCaseType(r)&&(ht({context:u,stateObj:J(u),clearContextMessages:!0}),!Fn(u))){let f={type:A.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return M.rejectActionByID(e,!0,f),Hc()}let p=S1(l),m=X(p,u);return i=Wr(r),Y(gc(m,{loadingContext:u})).pipe(V(({continueExecution:f,removeActionPayload:g,dirtyCheckPerformed:h})=>f?(s=h,l.isTraditionalUICase=i,WG(l,{removeActionPayload:g})):(M.rejectActionByID(e),Tt)))}),V(async l=>{if(l?.type===ve)return l.payload.context=Rye(r,l.payload.context),n.push(pe(l)),n;let{actionInPayload:u,response:p,headers:m,removeActionPayload:f}=l,g=sT(u),h=G.isExternalCaseType(u.class),E=E1(p);(u.renderInline||T.getDefaultCasePage()||i)&&(E=!1),y.setIn(p.data,A.CASE_INFO.IS_FIRST_ASSIGNMENT,!0);let C=S1({...u,isInCreateStage:E}),I=X(C,u.context),_=rt(I,C,u.context),{openCaseViewAfterCreate:P}=u;if(!s&&GG(C,I,P)){let{continueExecution:_e}=await xt(I,{loadingContext:u.context});if(!_e)return M.rejectActionByID(e),n}let N=u?.openCaseViewAfterCreate??!0,z=ze(p);if(!N&&!E&&!qG(I)){let _e=fR(p),{businessID:Xe,caseType:De,resolvedURL:Et,caseTypeName:an}=EA(p);return o={caseId:Xe,label:an,href:Et,createdCaseContent:p?.data?.caseInfo?.content},hc(o),Zp({caseId:Xe,assignmentId:_e,caseType:De,ID:Zt(z),initiatingContext:g}),h&&gR(u),n}let H=String(ln(Zt(z))),ne=iT(z);z.semanticURL=ne,yt.setComponentCache(H,Ge.addDebugHeaders(u.debugInfo)),BG(z,u);let j={acName:I,context:_},oe=Kr(_);await Pe(z,u,j);let Ae=HG(z),he={target:I,context:_,initiatingContext:g,containerItemID:_,headers:m,semanticURL:ne,isInCreateStage:E,isMinimizable:E,caseViewMode:Ae,currentCaseViewMode:oe,assignmentContext:y.getIn(z,Bo.NEXT_ASSIGNMENT_INFO_CONTEXT),nextAssignmentInfo:y.getIn(z,Bo.NEXT_ASSIGNMENT_INFO),resourceType:A.CASE,openCaseViewAfterCreate:u.openCaseViewAfterCreate,modalOptions:u.modalOptions,debugInfo:u.debugInfo};qr(he,z);let Oe=Me(z,he);i&&(Oe.data.caseInfo.content.coexistenceAction="openAssignment"),G.setTraditionalGadgetId(Oe.data);let He=Jt(I,Oe);return yr(He)&&bi(n,{removeActionPayload:f,target:I}),h&&gR(u),n.push(He),Cn(z,he),KG({caseId:H}),a=Ae,c=Zt(z),n}),x(()=>{let l=Ra(),u=on(y.getIn(n[0]?.payload,"data.caseInfo"));return i&&l&&u?Yp.postCreateCaseMessage(n[0]?.payload?.nextAssignmentInfo?.ID,Or,n):Or(n),a===A.CASE_VIEW_MODE.PERFORM&&As(c),St(n,e),o={},n=[],a="",c="",n}))},JG=Pye;var{RESOURCE_TYPES:ZG}=A,QG=t=>{let{isModalAction:e,viewType:n,isInCreateStage:o,isCaseWideAction:r}=t;return e&&o&&!r?mt.PAGE:n||mt.FORM},XG=t=>{let{isCaseWideAction:e,caseTypeID:n}=t;return G.shouldUseUnifiedHandling()?e||G.isObjectCaseType(n)?ev:XT:e?ev:XT},cT=(t,e)=>{let{containerItemID:n,context:o,actionMgrID:r,isInCreateStage:i,isModalAction:s}=e;if(i&&s){let a=Qn(n),c=X(a,o);t.push(B(pn,{containerItemID:n,target:c,actionMgrID:r}))}},yc=(t,e)=>{let{containerItemID:n,skipReleaseLockRequest:o,isInCreateStage:r,isProcessAction:i}=e,s=de(n),a=`${s?.includes("root")?d.APP.ROOT:d.APP.APP}/${Ee.MODAL}`;t.push(B(nt,{containerItemID:n,context:s,target:a,skipReleaseLockRequest:o,isInCreateStage:r,isProcessAction:i}))},Nye=(t,e)=>{let n=t?.assignmentID,r=(e?.data?.caseInfo?.assignments??[])[0]?.ID;return n!==r},A1=t=>ie(".openCaseViewAfterCreate",d.CONTEXT_DATA,t)??!0,Oye=(t,e)=>In(t)&&(A1(e)||T.isOpenCasePageAfterCreateInMultiDocEnabled()),xye=t=>t.initiatingContext||ie(".initiatingContext",d.CONTEXT_DATA,t?.context),Dye=(t,e)=>{let{content:n}=e?nd(t):ni(t);return{...n&&{content:n}}},$ye=async(t,{translatedDXAPIResponse:e,actionInPayload:n},o,r,i)=>{let{caseID:s}=n,a=Bj(e),c=r?fo(e):wo(e),{caseViewMode:l,headers:u,semanticURL:p,actionMgrID:m,directUrlUpdation:f,key:g,flowName:h,resourceType:E}=o,C=re(n?.context),I=Ze(C,n?.context)?.acTertiary,_=xye(n);Object.assign(i,{caseId:s,assignmentId:a,caseType:c,isSubmitFromBlendedUI:I,..._&&{initiatingContext:_},...Dye(e,r)}),yc(t,{...n,skipReleaseLockRequest:!0});let P=`${n?.containerItemID.includes("root")?d.APP.ROOT:d.APP.APP}/${Ee.PRIMARY}`,N=rt(P,Ee.PRIMARY),z=Ge.getCoreHeadersFromContext(n.context)||!1,H=Me(e,{target:P,context:N,containerItemID:N,caseViewMode:l,headers:u,semanticURL:p,key:g,flowName:h,resourceType:E,directUrlUpdation:f,debugInfo:z&&z.debugInfo&&{debugId:z.debugInfo[d.COREHEADER_APP_DEBUG_ID]},shouldUpdateCaseActionsInParentContext:!0});if(Rt(P)){let ne=J(N),oe=`You will lose unsaved changes for ${Cs({data:ne})}. Do you want to continue?`;if(A1(n.context)){let{continueExecution:Ae}=await xt(P,{dirtyMessage:oe});if(!Ae)return o.directUrlUpdation=!1,M.rejectActionByID(m),Hc();H.currentCaseViewMode=Kr(H?.context),t.push(B(Yr,H)),n.__deferCaseActionsPayload=H}else return t}else if(Oye(P,n.context))t.push(B(kt,H));else return t;return e.directUrlUpdation=f,e.semanticURL=p,await Pe(e,{...H,acName:P},{acName:P,context:N}),t},wye=(t,e,n)=>{let o=/^app\/preview_[0-9]*/g,{containerItemID:r,caseID:i}=e;if(r&&o.test(r)&&Wn(r)){let{caseClassName:s}=n,a=Ye(r),c=de(a);t.push(B(Df,{containerItemID:a,context:c,container:Ee.PREVIEW,containerName:Ee.PREVIEW,caseId:i,viewName:A.PREVIEW_VIEW_NAME,caseClassName:s,updateData:!0}))}},Mye=(t,e,n)=>{let{containerItemID:o}=e,r=de(o),{data:i,caseViewMode:s}=n;if(r&&Wn(o)){let a=Yo(r),c={data:i,caseViewMode:s,context:a};y.setIn(c.data,["context_data","caseViewMode"],s),t.push({type:Rr,payload:{context:a}});let l=G.getPropertiesToReplace(o);t.push(B(Ne,c,{propertiesToReplace:l})),e.shouldUpdateCaseActionsInParentContext=!0,e.__deferCaseActionsPayload=e}},eq=(t,e)=>{let{isCaseWideAction:n,assignmentID:o,actionID:r}=e;return{isCaseWideAction:n,caseID:Zt(t),assignmentID:n?null:o,actionID:r||null}},lT=(t,{isModalAction:e,target:n,transientItemID:o})=>{if(e){let i=t.find(({type:s})=>s===st);i?.payload&&(n=i.payload.target,o=i.payload.containerItemID)}let r=vM({target:n,containerItemID:o});r.payload.transientItems.length&&t.push(r)},kye=(t,e,n)=>{if(e.isProcessAction&&(yc(n,{...e,skipReleaseLockRequest:!0}),t)){let o=`${e?.containerItemID.includes("root")?d.APP.ROOT:d.APP.APP}/${Ee.PRIMARY}`,r=rt(o,Ee.PRIMARY),i={insKey:t.ID,className:t.content.classID,context:r,acTargetName:d.PRIMARY,isChild:!0},s={type:Po,payload:{...i}};n.push(s)}},tq=t=>/^app\/preview_[0-9]*/g.test(t),Yl=(t,e)=>{let n=/^app\/primary_[0-9]*/g,o=Ye(t);return tq(t)?!1:o===e?!0:n.test(o)},uT=(t,{showWhenCaseViewOpens:e=!1}={})=>{if(e||!A1(t.context)){let n,o=t?.caseTypeID,r=t?.caseTypeName;return t.businessID?n=t.businessID:n=t.workID,{caseID:n,caseTypeID:o,caseTypeName:r}}return{}},Lye=(t,e)=>{let n=re(t);return Vt(n,e)},Uye=(t,e=!1,n=!1)=>{let r=M.getNextActionMgrId(),i=Q.getPropertyValue(A.CASE_INFO.ASSIGNMENT_ID,"",t),s=Q.getPropertyValue(A.CASE_INFO.ASSIGNMENTACTION_ID,"",t);return{ID:i,actionID:s,context:t,caseWideAction:e,contextData:n,options:{actionMgrID:r}}},YG=(t,e,n,o)=>{let{data:r,caseViewMode:i}=e,s={data:r,caseViewMode:i,context:n};if(y.setIn(s.data,["context_data","caseViewMode"],i),t.push({type:Rr,payload:{context:n}}),o){let c={data:qe.transformObjectToCase(r),caseViewMode:i,context:n};t.push(B(Ne,c))}t.push(B(Ne,s))},zye=t=>{if(!t?.isCaseWideAction)return!1;let e=t.context;return!!((e?Ye(e):void 0)?.includes(Ee.MODAL)&&e?.includes(Ee.MODAL))},jye=async(t,e,n,o,r,i,s,a,c,l)=>{let{headers:u}=c,p=l?d.OBJECT_INFO.OBJECT_INFO:d.CASE_INFO.CASE_INFO,m=zye(o);if(t)if(m){yc(r,{...o,skipReleaseLockRequest:!0}),e.doDeleteCaseSummary=o.doDeleteCaseSummary,e.deleteAssignmentSpecificResources=!1;let f=e?.data?.[p]?.content;(f===void 0||typeof f=="object"&&f!==null&&Object.keys(f).length===0)&&(e.root=void 0,delete e.data?.caseMessages);let{data:g,caseViewMode:h}=e,E={data:g,caseViewMode:h,context:n};E?.data&&y.setIn(E.data,["context_data","caseViewMode"],h),r.push(B(Ne,E))}else{if(typeof c?.response?.uiResources?.root!="object"){let oe=(De,Et)=>{let an=De.findIndex(vn=>vn.ID===Et);if(an!==-1){let[vn]=De.splice(an,1);De.unshift(vn)}return De},Ae=J(t),he=c?.response?.data?.caseInfo?.assignments??[],Oe=Ae?.caseInfo?.assignments??[],He=Kr(t)===d.PERFORM_MODE,_e=he[0]?.ID!==Oe[0]?.ID,Xe=he.length>0&&Oe.length>0;He&&_e&&Xe&&c?.response?.data?.caseInfo?.assignments&&(c.response.data.caseInfo.assignments=oe(he,Oe[0]?.ID))}let f=Rt(re(t)),g=!1,h=re(n),E=gt(h),C=se(h);C&&E?.items?.[C]?.key===c?.actionInPayload?.caseID&&(g=!0),yc(r,{...o,skipReleaseLockRequest:!0});let I=Qn(t),_={target:re(t),containerItemID:t,context:t,containerName:I};e.doDeleteCaseSummary=o.doDeleteCaseSummary;let P=Yo(n),N=J(P),z=J(o.context),H=N[p]?.ID,ne=z[p]?.ID,j=J(t)?.caseInfo?.ID;if(f&&H===ne||!f&&(s===""||_.containerItemID.includes(d.WORKAREA)&&e.caseViewMode===d.REVIEW_MODE&&j===e.data?.caseInfo?.ID||!i&&e.root&&Object.keys(e.root).length===0&&j===e.data?.caseInfo?.ID))(e?.data[p]?.content===void 0||e.data[p].content!==void 0&&typeof e.data[p].content=="object"&&Object.keys(e.data[p].content).length===0)&&(e.root=void 0,delete e.data?.caseMessages),t.includes(d.WORKAREA)&&e.caseViewMode===d.REVIEW_MODE&&Nye(o,a)&&(e.flowName=" ",e.clearView=!0,e.root?.config?.name!==d.PY_CONFIRM&&(e.root=void 0)),t.includes(d.ACTIONAREA)?r.push(B(Ne,{...e,key:s,resourceType:"",..._})):Ze(_.target,_.containerItemID)?.resourceType!==ZG.PAGE&&j===e.data?.caseInfo?.ID&&r.push(B(dn,{...e,key:s,resourceType:"",..._}));else if(i){let oe=re(t),Ae=Vt(oe,s);if(Ae)_.target=oe,_.context=Ae,_.containerItemID=Ae,r.push(B(dn,{...e,key:s,resourceType:"",..._}));else{let he=Ke(n)[0];if(o.target=he,o.context=rt(he,d.WORKAREA,n),o?.context){o.containerItemID=o.context,r.push(B(kt,{...o,...e}));let Oe=o.containerItemID;r.push(B(pn,{parentContainerTarget:he,containerItemID:Oe}))}}}if(o.target=re(t),o.containerName=Qn(t),o.context=t,o.containerItemID=t,o.shouldUpdateCaseActionsInParentContext=!0,y.setIn(e,"acName",_.target),await Pe(a,e),o.__deferCaseActionsPayload=o,g&&(n.includes(d.WORKAREA)&&Wn(n)&&(n=Yo(n)),YG(r,e,n,l)),!i&&e.caseViewMode===d.PERFORM_MODE){let oe=Lye(t,s),Ae={data:{[p]:{headers:u}},context:oe};r.push(B(Ne,Ae)),r.push(Da(Uye(oe)))}}else{yc(r,o);let f=!1,g=re(n),h=gt(g),E=se(g);if(E&&h?.items?.[E]?.key===c?.actionInPayload?.caseID&&(f=!0),i){let C=Ke(n)[0];o.target=C,o.context=rt(C,d.WORKAREA,n),o.containerItemID=o.context,r.push(B(kt,{...o,...e}));let I=o.containerItemID;r.push(B(pn,{parentContainerTarget:C,containerItemID:I}))}f&&YG(r,e,n,l)}},nq=(t,e,n,o,r)=>{let i,s=re(e);In(s)?i=Vt(s,n.data?.caseInfo?.ID):i=se(s);let a=!0;if(t&&i){let c=Q.getPropertyValue(A.CASE_INFO.ASSIGNMENTACTION_ID,"",i),l=Q.getPropertyValue(A.CASE_INFO.ASSIGNMENT_ID,"",i);if(c){let p=n?.data?.caseInfo?.assignments?.find(m=>m.ID===l)?.actions;p&&!p.some(m=>m?.ID===c)&&(a=!1)}}return o&&t&&a&&Ss(null,d.CASE_VIEW_MODE_PROP,i)===d.PERFORM_MODE&&r},Fye=async(t,e,n,o,r,i,s)=>{let a=i?"objectInfo":"caseInfo";kye(t.data[a].parentCaseInfo,e,r);let c=t?.data[a]?.parentCaseInfo?.ID;if(c){let l=re(e?.context),u=Ze(l,e?.context)?.parentContext,p=re(u);e?.isProcessAction&&Wl(p,c)&&U0(u,t?.data[a]?.lastUpdateTime)}n.resourceType=ZG.CASE,n.directUrlUpdation=!0,e.isProcessAction||await $ye(r,{translatedDXAPIResponse:o,actionInPayload:e},n,i,s)},rq=async(t,e,n)=>{let o={assignmentID:t?.data?.caseInfo?.assignments[0]?.ID,className:t?.data?.caseInfo?.content?.classID,containerName:Ee.PRIMARY,targetContainerName:Ee.PRIMARY,viewType:mt.PAGE,isLastStepInCreateStage:!0,context:n},r={type:Jo,payload:{...o}};e.push(r)},C1=async(t,e,n,o,r)=>{t.doDeleteCaseSummary=e.doDeleteCaseSummary,t.caseViewMode===d.REVIEW_MODE&&(t.flowName=" ",t.clearView=!0);let{containerItemID:i}=e;Rt(re(i))||y.setIn(t.data,["context_data","caseViewMode"],t.caseViewMode);let s=G.getPropertiesToReplace(i);r.push(B(dn,{...t,...o,propertiesToReplace:s})),y.setIn(t,"acName",o.target),await Pe(n,t),Mye(r,e,t)},dT=async(t,e,n,o,r,i,s,a,c,l={})=>{let{isCaseWideAction:u,isInCreateStage:p,containerItemID:m}=t,f=Ye(t.context),g=TA(r,c),h=c?fo(r):wo(r),E=p&&!g&&!u,C=Ke(f)[0],I=C?se(C):f,_=Qn(m),P=de(m),N=Object.freeze({target:t.target,containerItemID:m,context:P,containerName:_});E&&!tq(t.context)?await Fye(a,t,e,r,i,c,l):Yl(t.context,I)?await jye(I,e,f,t,i,n,o,r,s,c):(u||c)&&!Yl(t.context,I)?(yc(i,t),wye(i,t,{caseClassName:h})):await C1(e,t,r,N,i)},pT=(t,e,n)=>{let{isModalAction:o,isCaseWideAction:r,caseID:i,assignmentID:s,isLocalAction:a}=e,c=Yl(e.context,n),l=t?.data?.caseInfo?.stages,u=t?.data?.caseInfo?.stageID;CA({caseID:i,context:e.context,assignmentId:s,isLocalAction:!!a,isModalAction:o,isModalLaunchedFromPrimaryValue:c,isCaseWideAction:r,stages:l,stageID:u})},oq=(t,e)=>{let{assignmentID:n}=e;return t?.data?.caseInfo?.assignments?.some(o=>o.ID===n&&o?.canPerform==="true")},mT=t=>{let e=t?.payload?.err?.errorDetails,n=t?.payload?.context;e?.forEach(o=>{o[d.ERROR_FIELD_IN_PAGE]=o[d.ERROR_FIELD_IN_PAGE].replace(/(\(\d+\))/g,a=>`[${parseInt(a.substring(1,a.length-1),10)-1}]`);let r=o[d.ERROR_FIELD_IN_PAGE].slice(1),i=o[d.ERROR_IN_PAGE_IDENTIFIER],s=i.startsWith(".")?i.slice(1):i;if(s){let a=r?`caseInfo.content.${r}`:"caseInfo.content";a=d.getProperty(a.replace(/\(/g,"[").replace(/\)/g,"]"));let c=ho(s,a,d.PROPERTY),l={type:A.MESSAGES.MESSAGES_TYPE_ERROR,message:o.localizedValue};be.mutateField(n,a,c[c.length-1],{messages:[l],type:A.MESSAGES.MESSAGES_TYPE_ERROR,fieldName:i})}})},aT=t=>{let e=J("app")?.pyPortal?.pyPrimaryNavPages,n=Array.isArray(e)?e[0]:null;return n?(Sr.clearChangedProperties(t),[{type:Un,payload:{className:n.pyClassName,containerName:d.PRIMARY,context:d.APP.APP,pageReference:"pyPortal",viewName:n.pyRuleName,skipSemanticUrl:""}}]):[]},iq=async t=>{let{target:e,containerItemID:n,context:o}=t,r=Qt("app/primary"),i=Ze(e,n)?.parentContext,s=!!e&&In(e),a=In("app/primary");if(s&&i!==d.APP.APP){if(await Oa(n,{skipDirtyCheck:!0}),Hp(e).length===0)return aT(o)}else if(r&&a&&!i)await Oa(r,{skipDirtyCheck:!0,eventName:"Dismiss case"});else return aT(o);return[]};var I1=t=>{let{containerName:e,isInCreateStage:n}=t;return n?d.MODAL:e||qt.getTargetViewContainerName(Si)},sq=t=>t?.uiResources?.root?.config?.name===O.getDefaultQualifiedName("pzCreateDetails")||!1,Qp=(t,e)=>{let n=sq(t),{skipBrowserSemanticUrlUpdate:o=!1}=e;y.setIn(t,["directUrlUpdation"],!n&&!o)},Xp=t=>t.confirmationNote?d.REVIEW_MODE:d.PERFORM_MODE,em=(t,e)=>{let n;return t.renderInline||T.getDefaultCasePage()?n=!1:n=sq(e),n},aq=(t,e)=>{G.isExternalObject(t.class)&&(t.containerItemID=t.context,yc(e,t))},cq=(t,e)=>!t&&!e,lq=(t,e,n)=>!hr(t)&&Rt(e)&&!G.isExternalObject(n),uq=(t,e,n)=>{if(yr(t)){let{removeActionPayload:o,target:r}=e;bi(n,{removeActionPayload:o,target:r})}},dq=t=>{G.isExternalObject(t.class)&&hc({content:zn().getLocaleValue("Successfully submitted!","Assignment")})},pq=t=>{G.isExternalObject(t)&&qe.setNeedsMapping(!1)};var _1=t=>{let{containerName:e,isInCreateStage:n}=t;return n?d.MODAL:e||qt.getTargetViewContainerName(Ea)};var Vye="Error occurred during ajax call at createObject Epic : ",mq=(t,e)=>{let{class:n,context:o,viewType:r=mt.PAGE}=t,{removeActionPayload:i}=e,s=t?.pageName?t?.pageName:T.getDefaultCasePage();return Y(Ui.createCase(n,{...t,pageName:s,viewType:r,context:o,retrieveActionViewForNewObject:!0})).pipe(x(({response:a,headers:c})=>(qe.analyseResponse(a),{response:a,actionInPayload:t,headers:c,removeActionPayload:i})),fe(Vye,o))};var fq="CREATE_EXTERNAL_CASE";var Bye=t=>{let e=0,n=[],o=!1;return t.pipe(te(fq),bn(100),x(i=>({actionMgrID:e}=i.payload,i.payload)),V(i=>{let{context:s}=i,a=_1(i),c=X(a,s);return o=!1,Y(gc(c,{loadingContext:s})).pipe(V(({continueExecution:l,removeActionPayload:u,dirtyCheckPerformed:p})=>l?(o=p,mq(i,{removeActionPayload:u})):(M.rejectActionByID(e),Tt)))}),V(async i=>{if(i&&i.type===ve)return i.payload.context=Co(),n.push(pe(i)),n;let{actionInPayload:s,response:a,headers:c,removeActionPayload:l}=i,u=sT(s),p=em(s,a);y.setIn(a.data,d.getProperty(d.CASE_INFO.IS_FIRST_ASSIGNMENT),!0);let m=_1({...s,isInCreateStage:p}),f=X(m,s.context),g=rt(f,m,s.context);if(!o&&!hr(m)&&Rt(f)){let{continueExecution:z}=await xt(f,{loadingContext:s.context});if(!z)return M.rejectActionByID(e),n}let h=ze(a),E=iT(h);h.semanticURL=E,Qp(h,s),await Pe(h,s,{acName:f,context:g});let I=Xp(h),_={target:f,context:g,initiatingContext:u,headers:c,semanticURL:E,caseViewMode:I,containerItemID:g,isInCreateStage:p,isMinimizable:p,assignmentContext:y.getIn(h,Bo.NEXT_ASSIGNMENT_INFO_CONTEXT),nextAssignmentInfo:y.getIn(h,Bo.NEXT_ASSIGNMENT_INFO),resourceType:A.RESOURCE_TYPES.CASE,openCaseViewAfterCreate:s.openCaseViewAfterCreate,modalOptions:s.modalOptions,debugInfo:s.debugInfo,isExternalCaseCreationFlow:!0};qr(_,h);let P=Me(h,_),N=Jt(f,P);return yr(N)&&bi(n,{removeActionPayload:l,target:f}),n.push(N),jA(n),n}),x(()=>(Or(n),St(n,e),n=[],n)))},gq=Bye;var{RESOURCE_TYPES:Hye}=A,gS=(t,e={})=>{let{viewType:n,containerName:o,targetContainerName:r,isChild:i}=t,s=ni(e);return _j(s)&&t?.stageID===s.stageID?mt.PAGE:n||((mR(o)||mR(r))&&!i?mt.FORM:mt.PAGE)},hq=(t,e)=>{let n=ni(t),o;T.getDefaultCasePage()?o=!1:o=on(n);let{isChild:r,containerName:i,isTraditionalUICase:s}=e,a=r&&o,c=o&&!e.isActionFromToDoList;return(a||c)&&!s&&!e.renderInline?d.MODAL:i||Wt(co,e)},yq=async(t,e,n)=>{let{semanticURL:o,containerItemID:r,isParallelAssignment:i,insKey:s}=e,{target:a,actionInPayload:c}=n,{skipBrowserSemanticUrlUpdate:l=!1}=c,u=de(r);await Pe({directUrlUpdation:!l,semanticURL:o},c,{acName:a,target:a,context:u}),t.push(B(pn,{containerItemID:r,target:a,isParallelAssignment:i,insKey:s,resourceType:Hye.CASE,context:u,doDeleteCaseSummary:c.doDeleteCaseSummary}))},Sq=(t,e)=>{let n=ni(t),o=Zt(t),r=on(n),{skipBrowserSemanticUrlUpdate:i=!1,viewType:s,isTraditionalUICase:a}=e,c=a&&!Ra(),l=s===mt.PAGE&&(!r||c)&&!i,{caseTypeID:u,businessID:p}=n;if(l){let m=Dn(u,p)||Nt(Gt,{caseClassName:u}).replace(/{.+?}/,String(ln(o)));t.semanticURL=m,t.directUrlUpdation=!0}},Eq=t=>{let e=t?.headers??{};return t?.isRemote&&(e=ke(e,t.remoteClassName)),e},Gye=(t,e,n,o,r)=>{gS(t,e)===mt.FORM?(n.caseViewMode=o||d.PERFORM_MODE,r.push(B(dn,n))):r.push(B(Yr,n))},qye=(t,e,n,o,r)=>{if(bi(t,{removeActionPayload:e,target:n}),gV(o.key,n))o.context=Qt(n),o.containerItemID=o.context,t.push(B(Yr,o));else if((r?.isChild||r?.isRemote)&&r?.isMultiDoc){let i=re(r.context);o.target=i,o.context=r.context,o.containerItemID=r.context,t.push(B(Yr,o))}else{let i=re(o.context),s=Vt(i,o.key);s?(o.target=i,o.context=s,o.containerItemID=s,t.push(B(Yr,o))):t.push(B(kt,o))}},Aq=(t,e,n,o,r,i,s)=>{Rt(e)&&Xn(e)?Gye(o,r,t,i,n):qye(n,s,e,t,o)},Cq=(t,e)=>{t.acTertiary&&(e.data.caseInfo.isFirstAssignment=t.acTertiary)},Iq=(t,e)=>{if(t=ce.getRemoteCaseClassBySourceClass(t)??t,ce.isRemoteCase(t)){let{RemoteClassName:n,RemoteSystemID:o,name:r}=ce.getRemoteCase(t);if(e.headers?.RemoteSystemID||M.setRemoteCaseHeaderByContext(e,o),ce.isTraditionalRemoteCase(t)||ce.getRemoteAppPlatformVersion(o)){e.assignmentID=e.assignments?.[0]?.ID;let i={className:t,name:r,action:wE,remoteClassName:n};M.setTraditionalRemoteCaseParams(e,i)}}},Wye=t=>{let{inlineViewType:e,caseTypeID:n,RedirectURL:o}=t;if(e&&e.toLowerCase().includes("remote"))return!1;let r=ce.getRemoteCaseClassBySourceClass(n)??n;return!ce.isRemoteCase(r)&&!!o},_q=(t,e,n)=>{if(!t||!e||!Wye(e)||!e.RedirectURL)return!1;try{let o=new URL(e.RedirectURL);if(o.protocol==="https:")return globalThis.open(o.href,"_blank","noopener,noreferrer"),M.resolveActionByID(n),!0}catch{}return!1},bq=(t,e,n,o)=>{if(Rt(t)&&Wn(e)){let r=n?.data?.caseInfo?.assignments;if(Array.isArray(r)&&r.length>0){let i=Ye(e);o.push(B(Ne,{context:i,data:{caseInfo:{assignments:r}}},{propertiesToReplace:[{path:d.CASE_INFO.ASSIGNMENTS,allowMultiple:!0}]}))}}},Tq=(t,e)=>{t&&(e.data.caseInfo.content.coexistenceAction="openAssignment")};var Kye="Error occurred during ajax call at openAssignment Epic : ",vq=({restUrl:t,reqType:e,requestHeaders:n,debugInfo:o,context:r,isGetNextWork:i,doNotMergeMessagesForStatusCode:s,mcpAction:a})=>{if(it())return Ot(a.actionName,{...a.payload,headers:{"if-match":n&&n.etag,...n}});let c=G.appendExcludeQueryParamToUrl(t);return k(c,{method:e,headers:{"if-match":n&&n.etag,...n,...o&&{...Ge.addDebugHeaders(o)}}},r,{doNotMergeHttpMessagesForStatusCode:i?s:""})},Rq=(t,e)=>{let n=gS(t),{headers:o,context:r,assignmentID:i,isGetNextWork:s,debugInfo:a,isOpenStage:c,stageID:l,caseID:u,jsActionQueryParams:p,isLastStepInCreateStage:m}=t,f="404",g,h;s?{restApi:g,reqType:h}=F(tv,{viewType:n}):c?{restApi:g,reqType:h}=F(QT,{caseID:u,stageID:l}):{restApi:g,reqType:h}=F(co,{assignmentID:i,viewType:n});let{removeActionPayload:E}=e,C=T.getDefaultCasePage(),I="",_=t.pageName;t.isTraditionalUICase&&(_=O.getDefaultQualifiedName("pyDetails")),C?I=`${g}?viewType=${n}&pageName=${C}`:_?I=`${g}?viewType=${n}&pageName=${_}`:I=`${g}?viewType=${n}`,p&&Object.keys(p).forEach(H=>{I+=`&${H}=${p[H]}`});let P=Eq(t),N=co;s?N=tv:c&&(N=QT);let z=H=>({actionName:N,payload:{queryPayload:{...p,assignmentID:i,caseID:u,stageID:l,viewType:n,params:{pageName:H}}}});return Y(vq({restUrl:I,reqType:h,requestHeaders:P,debugInfo:a,context:r,isGetNextWork:s,doNotMergeMessagesForStatusCode:f,mcpAction:z(C||_)})).pipe(x(H=>T.isCoexistenceAppOfType(d.APP_TYPE.UIKIT)&&!m?on(H.data.data.caseInfo)?H:(I=_?I.replaceAll(_,O.getDefaultQualifiedName("pyDetails")):I,T.setDefaultCasePage(O.getDefaultQualifiedName("pyDetails")),{isReloadWithDifferentViewTypeRequired:!0,restUrl:I}):H),V(H=>H?.isReloadWithDifferentViewTypeRequired?vq({restUrl:I,reqType:h,requestHeaders:P,debugInfo:a,context:r,isGetNextWork:s,doNotMergeMessagesForStatusCode:f,mcpAction:z(O.getDefaultQualifiedName("pyDetails"))}):ye(H)),x(H=>{let{key:ne,flowName:j}=HR(i);return qe.analyseResponse(H),{response:{...H.data,key:ne,flowName:j},actionInPayload:t,viewType:n,removeActionPayload:E,headers:ke({...o,...H.headers})}}),fe(Kye,r))};var{RESOURCE_TYPES:Jye}=A,Yye=(t,e)=>{e!==void 0&&t.push({status:Number(e)})},Zye=(t,e)=>t&&String(t.canPerform)==="false"?d.REVIEW_MODE:e??d.PERFORM_MODE,Pq=t=>{let e=T.getRuntime()==="Browser",n=0,o=[],r=[],i=!1,s=!1;return t.pipe(te(ic),x(a=>({actionMgrID:n}=a.payload,{...a.payload,...e?{insKey:a.payload.assignmentID}:{assignmentID:a.payload.assignmentID}})),V(a=>{i=a.isGetNextWork;let{context:c}=a,l;(a?.isChild||a?.isRemote)&&a?.isMultiDoc?l=mt.FORM:l=gS(a),a.viewType=l;let u=Wt(co,a),p=X(u,c),{activate:m,activateContainerActionPayload:f}=_s(Jye.ASSIGNMENT,p,a);if(m&&!a.isParallelCall)return ye({type:mn,activateContainerActionPayload:f,actionInPayload:a});let g=se(p),h;return f?.isParallelAssignment?h=Promise.resolve({continueExecution:!0,removeActionPayload:{}}):g?h=xt(p,{loadingContext:c}):h=Promise.resolve({continueExecution:!0,removeActionPayload:{}}),Y(h).pipe(V(({continueExecution:E,removeActionPayload:C})=>E?(s=Wr(a.className),a.isTraditionalUICase=s,T.isWSSPortal()&&(a.headers={...a.headers,[d.X_ORIGIN_CHANNEL]:"WSS"}),Rq(a,{removeActionPayload:C})):(M.rejectActionByID(n),Tt)))}),V(async a=>{if(a?.type===ve){if(i){let{payload:Xe}=a,{err:De}=Xe;Yye(r,De?.response?.status)}return o.push(pe(a)),o}let{type:c,actionInPayload:l,response:u,viewType:p,headers:m,removeActionPayload:f,activateContainerActionPayload:g}=a;if(u?.redirectInfo?.jsAction==="openStage"){let Xe=u?.redirectInfo?.stageID,De=ic,Et=u?.data?.caseInfo?.ID;l.isOpenStage=!0,l.stageID=Xe,l.jsActionQueryParams=u?.redirectInfo?.jsActionQueryParams;let an={type:De,payload:{...l,caseID:Et,headers:m}};return o.push(an),o}if(_q(i,u?.data?.caseInfo,n))return o;let{context:h,caseViewMode:E,debugInfo:C}=l,I=u?.data?.caseInfo?.assignments?.find(Xe=>Xe.ID===l.assignmentID);l.caseViewMode=Zye(I,E);let _=u?.data?.caseInfo?.caseTypeID;s=Wr(_),l.isTraditionalUICase=s;let P=hq(u,l);s&&(P=l.containerName??P);let N=X(P,h);if(c===mn)return await yq(o,g,{actionInPayload:l,target:N}),o;let z=u?.data?.caseInfo?.content,H=u?.data?.caseInfo?.ID,ne=u?.uiResources?.root?.config?.name,j=u?.uiResources?.root?.config?.context;z&&!z[O.getDefaultQualifiedName("pyViewName")]&&ne&&l.viewType!=="page"&&(y.setIn(z,O.getDefaultQualifiedName("pyViewName"),ne),y.setIn(z,O.getDefaultQualifiedName("pyViewContext"),j));let oe=ze(u);Sq(oe,l);let Ae=rt(N,P,h),he={...l.debugInfo,debugId:l.debugInfo?.debugId??Ge.getCoreHeadersFromContext(h)?.debugInfo?.[d.COREHEADER_APP_DEBUG_ID]};he.debugId&&yt.setComponentCache(H,Ge.addDebugHeaders(he)),await Pe(oe,l,{acName:N,target:N,context:Ae});let He={target:N,context:Ae,containerItemID:Ae,headers:m,parentContext:Ye(l?.context),isMinimizable:on(y.getIn(oe,"data.caseInfo")),doDeleteCaseSummary:l.doDeleteCaseSummary,acTertiary:l.acTertiary,resourceType:A.ASSIGNMENT,debugInfo:C,shouldUpdateCaseActionsInParentContext:!0,caseID:H};qr(He,oe,{skipFlowNameUpdate:l?.caseViewMode===d.REVIEW_MODE});let _e=Me(oe,He);return _e.data.context_data.isChildCase=!!l.isChild,l.isProcessAction&&(_e.data.isProcessAction=l.isProcessAction),Tq(s,_e),G.setTraditionalGadgetId(_e.data),Cq(l,_e),_e.caseViewMode=l.caseViewMode,Aq(_e,N,o,l,u,E,f),Iq(_,_e.data.caseInfo),bq(N,_e.containerItemID,oe,o),p===mt.FORM&&Wn(_e.containerItemID)&&(_e.skipMergeAssignmentsAndActions=!1,Lo(_e,o,j)),Cn(oe,He),kj({actionInContext:h,assignmentID:l.assignmentID,caseKey:_e.key,target:N}),As(_e.key),o}),x(()=>{let a=n,c=Ra(),l=on(y.getIn(o[0]?.payload,"data.caseInfo"));return s&&c&&l?Yp.postCreateCaseMessage(o[0]?.payload?.data?.caseInfo?.assignments?.[0]?.ID,v,o):v(o),St(o,a,r),o[0]?.payload?.isParallelAssignment&&v({type:ic,payload:{...o[0].payload,isParallelCall:!0}}),o=[],o}))};var Qye="Error occurred during ajax call at openWorkByHandle Epic : ",b1=(t,e)=>{let{insKey:n,headers:o,context:r,debugInfo:i,viewType:s}=t,{removeActionPayload:a}=e,c=t?.pageName?t?.pageName:T.getDefaultCasePage(),l=F(Gt,{caseID:n,params:{pageName:c}}),{restApi:u}=l,{reqType:p}=l;return s==="none"&&(u=`${u?.split("viewType")[0]}viewType=none`),u=G.appendExcludeQueryParamToUrl(u),Y(it()?Ot(Gt,{queryPayload:{caseID:n,params:{viewType:s==="none"?"none":"page",pageName:c}}}):k(u,{method:p,headers:{...o,...i&&{...Ge.addDebugHeaders(i)}}},r)).pipe(x(m=>(qe.analyseResponse(m),{response:m.data,actionInPayload:t,headers:ke({...o,...m.headers}),removeActionPayload:a})),fe(Qye,r,t.actionMgrID))};var Nq=async(t,e)=>{let{activateContainerActionPayload:{semanticURL:n,containerItemID:o},actionInPayload:r,actionInPayload:{context:i,skipBrowserSemanticUrlUpdate:s,doDeleteCaseSummary:a}}=e,c=Wt(Gt,r),l=X(c,i),u=de(o);await Pe({directUrlUpdation:!s,semanticURL:n},r,{acName:l,containerName:c,target:l,context:u},!1,!!s),t.push(B(pn,{containerItemID:o,target:l,context:u,doDeleteCaseSummary:a}))},Oq=(t,e)=>{let{isRemoteCase:n,remoteCaseClass:o}=e,r=Zt(t),i=n?o:wo(t),s=n?"":Dn(i,Cs(t));if(s)return s;let a={id:e?.insKey},c=Nt(Gt,{caseClassName:i},a);return c=c?.replace("{workID}",String(ln(r)))?.replace("{id}",e?.insKey),c};var xq="OPEN_WORK_BY_HANDLE";var{RESOURCE_TYPES:T1}=A,Xye=(t,e)=>{let n=Vt(t,e);if(!n)return null;let o=Ze(t,n);if(!(o?.resourceType===T1.ASSIGNMENT&&typeof o?.context=="string"&&o.context!==""))return null;let i=typeof o.semanticURL=="string"?o.semanticURL.trim():"";return i?{target:t,containerItemID:n,semanticURL:i,insKey:e}:null},eSe=async(t,e,n)=>{let o=e?.containerItemID||null,r=o&&Ke(o)[0]?se(Ke(o)[0]):o,i=r||o,s=de(i)||i,a=re(s)||re(i),c=s?Kr(s):void 0,l=r?J(r)?.caseInfo?.ID:void 0,u=t?.insKey;if(!s||!i||c!==d.REVIEW_MODE||r===o||!l||!u||l!==u)return;let p;try{p=await Cv(b1({...t,context:s,viewType:"none"},{removeActionPayload:void 0}))}catch{return}if(!p||Qe(p.type))return;let m=ze(p.response),f=[{path:d.CASE_INFO.ASSIGNMENTS,allowMultiple:!0}],g={...m?.data,caseInfo:{...m?.data?.caseInfo??{},assignments:m?.data?.caseInfo?.assignments??[]}};n.push(B(Yr,{containerItemID:i,target:a,context:s,data:g,caseViewMode:d.REVIEW_MODE,isArrayDeepMerge:!0,propertiesToReplace:f}))},tSe=async(t,e,n)=>{let{actionInPayload:o,activateContainerActionPayload:r,type:i,response:s,removeActionPayload:a,headers:c}=t,{context:l,skipBrowserSemanticUrlUpdate:u,debugInfo:p}=o,m=Wt(Gt,o),f=X(m,l);if(bA(i))await Nq(e,{activateContainerActionPayload:r,actionInPayload:o}),await eSe(o,r,e);else{let E=rt(f,m,l,{buildNew:!0}),C=ze(s),I=Oq(C,o);C.semanticURL=I,C.directUrlUpdation=!u,await Pe(C,o,{acName:f,context:E},!1,!!u);let P=Me(C,{target:f,context:E,containerItemID:E,semanticURL:I,headers:c,debugInfo:p});P.caseViewMode=d.REVIEW_MODE,P.resourceType=T1.CASE,n&&(P.data.caseInfo.content.coexistenceAction="openWorkByHandle",P.data.caseID=P.data.caseInfo.ID),G.setTraditionalGadgetId(P.data),qr(P,C,{skipFlowNameUpdate:!0}),P.currentCaseViewMode=Kr(t?.actionInPayload?.context);let N=Jt(f,P);a.containerItemID&&yr(N)&&e.push(B(nt,{containerItemID:a.containerItemID,target:f})),e.push(N),Cn(C,P)}let g=o.insKey;_A({caseKey:g,actionInContext:l,target:f});let h=s?.data?.caseInfo?.assignments?.[0]?.ID;h&&g&&Of({actionInContext:l,assignmentID:h,caseKey:g})},Dq=t=>{let e=0,n=[],o=!1;return t.pipe(te(xq),x(r=>({actionMgrID:e,isAutoRedirection:o=!1}=r.payload,r.payload)),V(r=>{let{context:i,isChild:s,viewType:a}=r,c=Wt(Gt,r),l=X(c,i),{activate:u,activateContainerActionPayload:p}=_s(T1.CASE,l,r),m=Rt(l);if(!u&&!m&&r.insKey&&l){let h=Xye(l,r.insKey);h&&(u=!0,p=h)}let f=u&&!s&&a!=="none",g=a!=="none"&&!f?xt(l,{loadingContext:i}):Promise.resolve({continueExecution:!0,removeActionPayload:void 0});return o&&yt.setComponentCache("redirectionInProgress",!0),Y(g).pipe(V(({continueExecution:h,removeActionPayload:E})=>h?f?(pd(p),ye({type:mn,activateContainerActionPayload:p,actionInPayload:r})):b1(r,{removeActionPayload:E}):(o&&yt.setComponentCache("redirectionInProgress",!1),M.rejectActionByID(e),Tt)))}),V(async r=>{if(r&&Qe(r.type))return n.push(pe(r)),n;let i=J(r?.actionInPayload?.context),s=Wr(r?.actionInPayload.className);if(r?.actionInPayload?.viewType==="none"){if(i?.context_data?.caseViewMode!=="perform"){let a=ze(r?.response),c={data:{...a?.data},context:r?.actionInPayload?.context,isArrayDeepMerge:!0};n.push({type:Rr,payload:{context:c.context,doDeleteConfirmationDetails:!1}}),s&&c.data.caseInfo?.content&&(c.data.caseInfo.content.coexistenceAction="openWorkByHandle",c.data.caseID=c.data.caseInfo.ID),G.setTraditionalGadgetId(c.data),n.push(B(Ne,c));let l=re(r?.actionInPayload?.context),u=Qn(r?.actionInPayload?.context),p=Object.freeze({target:l,containerItemID:r?.actionInPayload?.context,context:r?.actionInPayload?.context,containerName:u});if(Wn(r?.actionInPayload?.context)){let m=Me(r?.response,{...p});Lo({...m,isArrayDeepMerge:!0},n)}r.actionInPayload.shouldUpdateCaseActionsInParentContext=!0,r.actionInPayload.containerItemID=r?.actionInPayload?.context,r.actionInPayload.caseID=r?.actionInPayload?.insKey,Cn(a,r?.actionInPayload)}}else await tSe(r,n,s);return n}),x(()=>(o&&yt.setComponentCache("redirectionInProgress",!1),v(n),St(n,e),n=[],n)))};var $q="FINISH_ASSIGNMENT";var nSe="Error occurred during ajax call at finishAssignment Epic : ",wq=(t,e)=>{let{assignmentID:n,actionID:o,caseID:r,context:i,additionalHeaders:s={},outcome:a,jsActionQueryParams:c,headers:l}=t,{state$:u}=e,p=QG(t),m=XG(t),f={assignmentID:n,actionID:o,caseID:r,viewType:p},{restApi:g}=F(m,f),{reqType:h}=F(m,f);p&&!g?.includes("viewType=")&&(g=g?.includes("?")?`${g}&viewType=${p}`:`${g}?viewType=${p}`),a&&!g?.includes("outcome")&&(g=g?.includes("?")?`${g}&outcome=${a}`:`${g}?outcome=${a}`),g=ed(c,g),g=G.appendExcludeQueryParamToUrl(g),t.viewType=p;let{content:E}=Mt(i),C=u.value.data[i]?.caseInfo?.headers||{},{etag:I}=C,_={"if-match":I,...l,...s};return Y(it()?Ot(m,{queryPayload:{...c,...f,outcome:a},body:E,headers:_}):k(g,{method:h,body:E,headers:_},i)).pipe(x(P=>{let{data:N,headers:z}=P;return qe.analyseResponse(N),{response:N,actionInPayload:t,headers:ke({..._,...z})}}),fe(nSe,i))};var Mq=t=>{w.publish(d.PUB_SUB_EVENTS.CASE_EVENTS.CREATE_STAGE_DONE,t)},fT=t=>{w.publish(d.PUB_SUB_EVENTS.EVENT_EXPRESS_LOCALACTION,t)},v1=t=>{w.publish(d.PUB_SUB_EVENTS.ERROR_ON_FINISH_ASSIGNMENT,t)},kq=t=>{w.publish(d.PUB_SUB_EVENTS.EVENT_LOCALACTION_SUBMISSION,t)},Lq=t=>{w.publish(d.PUB_SUB_EVENTS.DISPLAY_CASE_SUBMITTED_TOASTER,t)},Uq=t=>{w.publish(d.PUB_SUB_EVENTS.EVENT_FINISH_ASSIGNMENT_DONE,t)};var{RESOURCE_TYPES:rSe}=A,oSe=t=>{let e=we()?.getState()?.data,n=e?Object.keys(e).find(r=>r.includes(d.WORKAREA)):void 0;return/^app\/primary(_\d+)?$/.test(t)&&!n},zq=(t,e)=>{let n=0,o=[],r={},i="",s={},a=!1,c=!1;return t.pipe(te($q),V(l=>{let u,p,m,f=T.isCoexistenceAppOfType(d.APP_TYPE.UIKIT);if({actionMgrID:n}=l.payload,i=l.payload.context,ht({context:i,stateObj:J(i),clearContextMessages:!0}),!Fn(i)||oP(i)){let g={type:A.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return M.rejectActionByID(n,!0,g),vt.handleDeferredActionCompletion(l.payload.context).then(()=>{v1({errorType:A.ERROR_TYPE.CLIENT})}),ye([])}return ye(l.payload).pipe(V(g=>{yt.setComponentCache("lastActionID",g?.actionID),cT(o,g);let h={...g};return wq(h,{state$:e})}),V(async g=>{if(g&&g.type===ve){yA(g);let Ut=pe(g);return o.push(Ut),o}Vo.clearContextedCache(i);let{headers:h,actionInPayload:E,response:C}=g,{containerItemID:I,context:_=de(I),isModalAction:P,isInCreateStage:N}=E;a=E.isCaseWideAction,c=E.isProcessAction;let z=re(I);E.target=z;let H=Qn(I),ne=Object.freeze({target:E.target,containerItemID:I,context:_,containerName:H});y.setIn(C.data,d.CASE_INFO.IS_FIRST_ASSIGNMENT,!1),y.setIn(C.data,d.CASE_INFO_IS_LOCAL_ACTION,!1),C?.uiResources?.root?.config?.name&&E.viewType!=="page"&&y.setIn(C.data,d.CASE_INFO.VIEW_NAME,C?.uiResources?.root?.config?.name),fT({submitResponse:C});let j=ze(C,{[A.STOPMERGEACTIONS]:!C.nextAssignmentInfo}),oe=wo(j),Ae=Ye(E.context),he=Ke(Ae)[0]?se(Ke(Ae)[0]):Ae,Oe=TA(j),He=N&&!Oe;P&&!N&&!Yl(E.context,he)&&(j=zA(j,J(I)));let _e=Me(j,{headers:h,actionMgrID:n,directUrlUpdation:!1,isActiveWorkAreaPrimaryAndWorkareaAbsent:oSe(he||"")});if(vA(_e.data,E),_e.caseClassName=oe,_e.resourceType=rSe.ASSIGNMENT,_e.headers=h,j?.uiResources?.root?.type==="AutoClose"){let Ut=we()?.getState()?.data?.[ne.context]?.caseInfo,{ID:To,name:Cc,content:Ic}=Ut;return o=await iq(E),Lq({ID:To,caseName:Cc,content:Ic,status:ni(j).status}),o}let De,Et,an=j?.data?.caseInfo?.assignments?.some(Ut=>Ut.ID===E.assignmentID),vn=oq(j,E),cn=nq(an,he,j,P,vn),br=E?.actionID===A.LOCAL_ACTIONS.TRANSFER_ASSIGNMENT,Ho=Rt(re(he));if(j?.data?.nextAssignmentInfo&&!br)_e.caseViewMode=d.PERFORM_MODE,De=Zt(j),Et=!0;else if(cn&&!br)j?.confirmationNote&&j?.uiResources?.root?.config?.name===d.PY_CONFIRM?_e.caseViewMode=d.REVIEW_MODE:_e.caseViewMode=d.PERFORM_MODE,De=Zt(j),Ho&&(_e.flowName=" "),_e.deleteAssignmentSpecificResources=!1,Et=!1;else{_e.caseViewMode=d.REVIEW_MODE,y.setIn(_e.data,"context_data.caseViewMode",d.REVIEW_MODE);let Ut=bj(j?.data?.caseInfo);j?.confirmationNote&&(Ut||j?.uiResources?.root?.config?.name===d.PY_CONFIRM)&&!Ho?De=Zt(j):De="",Et=!1}let kn=Zt(j),oo=!1;qr(_e,j,{skipFlowNameUpdate:_e?.caseViewMode===d.REVIEW_MODE||cn});let cr=Dn(oe,Cs(j))||Nt("createWork",{caseClassName:oe}).replace(/{.+?}/,String(ln(kn)));if(j.semanticURL=cr,_e.semanticURL=cr,P){if(await dT(E,_e,Et,De,j,o,g,C,!1,s),He){let Ut=E.isProcessAction&&!a&&T.isWSSPortal()&&ie(".isChildCase",d.CONTEXT_DATA,_)===!0;r=uT(E,{showWhenCaseViewOpens:Ut}),_e.caseViewMode===d.PERFORM_MODE&&As(kn)}}else N&&f&&!Oe?(T.setDefaultCasePage(d.PY_DETAILS),await rq(C,o,Ye(_))):(await C1(_e,E,j,ne,o),oo=Et&&_e.caseViewMode===d.PERFORM_MODE&&!a&&!c);if(he?.includes(d.ACTIONAREA)&&_===he){Sr.clearChangedProperties(_);let Ut=J(he);o=[{type:is,payload:{actionID:Ut.caseInfo.activeActionID,context:he,containerItemID:I,target:re(he),actionMgrID:M.getNextActionMgrId(),containerName:d.ACTIONAREA,localActionType:A.LOCAL_ACTION_TYPE.CASE_WIDE,caseID:Ut.caseInfo.ID}}]}if(Pa(g,o),vt.handleDeferredActionCompletion(i).catch(()=>{}),pT(_e,E,he),oo&&As(kn),!j?.data?.nextAssignmentInfo){let Ut=eq(j,E);od(kn),IA({...Ut,containerItemID:I})}return lT(o,{transientItemID:I,target:z,isModalAction:P}),p=j,m=E,u=E,o}),x(()=>{let g=o.find(h=>h.type===ve);return g?(vt.handleDeferredActionCompletion(i).then(()=>{v1({errorType:A.ERROR_TYPE.SERVER})}).catch(()=>{}),mT(g),M.rejectActionByID(n)):M.resolveActionByID(n,r),s?.caseId&&Mq(s),Or(o),Nf()&&p&&m&&Cn(p,m.__deferCaseActionsPayload??m),!g&&(a||c)&&kq({updateState:!0}),!g&&u&&Uq(u),o=[],r={},s={},o}))}))};var jq="CANCEL_ASSIGNMENT";var Sc=t=>{let e={},{routeKey:n,isModalAction:o,caseID:r,context:i,RemoteSystemID:s}=t;s&&(e.RemoteSystemID=s);let a=n||x2,c={caseID:r,viewType:mt.PAGE},l=yt.getComponentCache(r),p={...e,...l&&typeof l=="object"?l:{}};return Y((()=>{if(it())return Ot(a,{queryPayload:c,headers:p});let{restApi:f,reqType:g}=F(a,{ID:r,...c});return k(G.appendExcludeQueryParamToUrl(f),{method:g,headers:p},i,{includeRemoteSystemIdIfPresent:!!s})})()).pipe(x(f=>(yt.resetComponentCache(r),o?{actionInPayload:t}:{response:f.data,actionInPayload:t,headers:ke(f.headers)})),fe(": Error occurred during ajax call at release lock request : ",i))};var R1=(t,e)=>{let{isModalAction:n}=e;return Sc({routeKey:N2,isModalAction:n,...t})};var Fq=t=>{let{isModalAction:e,containerItemID:n}=t;return e?Ee.MODAL:Qn(n)},Vq=async(t,e)=>{let{childContainerItemID:n,caseViewMode:o,referencedUsers:r,response:i}=e,s=Ye(n),a=de(s),c=!1,l=i?.data?.caseInfo;l&&(c=Object.prototype.hasOwnProperty.call(l,"assignments"),l.assignments??=[]);let u={context:a,data:{...i.data,referencedUsers:r,context_data:{caseViewMode:o}}},p=[];c&&p.push({path:d.CASE_INFO.ASSIGNMENTS,allowMultiple:!0}),p.length>0?t.push(B(Ne,u,{propertiesToReplace:p})):t.push(B(Ne,u))};var iSe=(t,e)=>{let n=de(e);return(n&&n!==t?[t,n]:[t]).some(r=>qs.isContextStale(r))},Bq=t=>{let e=0,n=[];return t.pipe(te(jq),x(o=>({actionMgrID:e}=o.payload,o.payload)),V(o=>{let{isModalAction:r}=o;o.context||(o.context=de(o.containerItemID));let{context:i}=o,s=Fq(o),a=X(s,i);return iSe(i,o.containerItemID)?(o.RemoteSystemID=ce.getRemoteHeaderByContext(o.context)??void 0,Y(R1(o,{isModalAction:r}))):Y(xt(a,{loadingContext:i})).pipe(V(({continueExecution:c})=>c?(o.RemoteSystemID=ce.getRemoteHeaderByContext(o.context)??void 0,Y(R1(o,{isModalAction:r}))):(M.rejectActionByID(e),Tt)))}),V(o=>{if(o&&o.type===ve)return n.push(pe(o)),Y([n]);let{actionInPayload:r,response:i}=o,{containerItemID:s,isModalAction:a,isInCreateStage:c}=r,l=r.caseID??Zt(i);i?.data.caseInfo&&(i.data.caseInfo.availableProcesses=i.data.caseInfo.availableProcesses??[]);let u=re(s),p=de(s),m={target:a?`${d.APP.APP}/${d.MODAL}`:u,containerItemID:s,caseViewMode:a?d.PERFORM_MODE:d.REVIEW_MODE,context:p,actionMgrID:e,key:Zt(i),skipReleaseLockRequest:!1};return c&&n.push(B(dn,m)),!a&&Wn(s)&&Vq(n,{childContainerItemID:s,caseViewMode:d.REVIEW_MODE,referencedUsers:i?.data.referencedUsers,response:i}),l&&od(l),m.skipReleaseLockRequest=!0,o.actionInPayload.shouldUpdateCaseActionsInParentContext=!0,Cn(o?.response,o?.actionInPayload),n.push(B(nt,m)),Y([n])}),x(()=>(v(n),St(n,e),n=[],n)))};var Hq="NAVIGATE_TO_STEP";var sSe="Error occurred during ajax call at navigateToStep Epic : ",Gq=(t,e)=>{let{ID:n,stepID:o,containerItemID:r,context:i=de(r),isInCreateStage:s}=t,{state$:a}=e,c=s?mt.PAGE:mt.FORM,l={ID:n,stepID:o,viewType:c},{restApi:u,reqType:p}=F(D2,l),{content:m}=Mt(i),f=a.value.data[i].caseInfo.headers,g=G.appendExcludeQueryParamToUrl(u);return Y(k(`${g}`,{method:p,body:m,headers:{"if-match":f&&f.etag}},i)).pipe(x(h=>({response:h.data,actionInPayload:t,headers:ke({...f,...h.headers})})),fe(sSe,i))};var{RESOURCE_TYPES:aSe}=A,qq=(t,e)=>{let n=0,o=[];return t.pipe(te(Hq),Yt(r=>{({actionMgrID:n}=r.payload);let i,s;return ye(r.payload).pipe(V(a=>(Ff(a.context),Gq(a,{state$:e}))),V(async a=>{if(a&&Qe(a.type))return o.push(pe(a)),o;let{actionInPayload:c,response:l,headers:u}=a,{containerItemID:p,context:m=de(p),isModalAction:f}=c;Vo.clearContextedCache(c.context);let g=re(p),h=Qn(p),E=Object.freeze({target:g,containerItemID:p,context:m,containerName:h}),C=l?.data?.caseInfo?.content,I=l?.uiResources?.root?.config?.name,_=l?.uiResources?.root?.config?.context;C&&!C[O.getDefaultQualifiedName("pyViewName")]&&I&&c.viewType!=="page"&&(y.setIn(C,O.getDefaultQualifiedName("pyViewName"),I),y.setIn(C,O.getDefaultQualifiedName("pyViewContext"),_)),i=ze(l);let P={acName:g,...E};await Pe(i,c,P),s=Me(i,{...E,headers:u}),l?.nextAssignmentInfo||(s.caseViewMode=d.REVIEW_MODE),Pa(a,o),s.doDeleteCaseSummary=c.doDeleteCaseSummary,s.resourceType=aSe.ASSIGNMENT,s.caseID=Zt(i),qr(s,i),vA(s.data,c);let N=i.data?.caseInfo?.stages,z=i.data?.caseInfo?.stageID;if(CA({caseID:Zt(i),context:c.context,assignmentId:c.assignmentID,isLocalAction:!!c.isLocalAction,isModalAction:f,stages:N,stageID:z}),Wn(p)){let H=G.getPropertiesToReplace(p);Lo(s,o,"",{propertiesToReplace:H})}return o.push(B(dn,s)),s.shouldUpdateCaseActionsInParentContext=!0,o}),x(()=>(v(o),i&&s&&Cn(i,s),St(o,n),o=[],o)))}))};var Wq=t=>{let{caseID:e,context:n}=t;return Y((()=>{if(it())return Ot(df,{queryPayload:{caseID:e}});let{restApi:r,reqType:i}=F(df,{ID:e});return k(r,{method:i},n)})()).pipe(x(r=>(qe.analyseResponse(r.data),{response:r.data,actionInPayload:t,headers:ke(r.headers)})),fe(": Error occurred during ajax call at deleteCaseInCreateStage Epic : ",n))};var Kq=t=>{w.publish(d.PUB_SUB_EVENTS.CASE_EVENTS.CREATE_STAGE_DELETED,t)};var cSe=(t,e)=>{let{context:n,isModalAction:o,parentCaseInfo:r,parentCases:i}=e;if(o||r?.ID||i?.length||T.getRenderingMode()==="EMBED")return null;let s=se(t);if(!s||n!==s&&!n.startsWith(`${s}/`))return null;let a=aT(n);return a.length>0?{caseItem:s,showHome:a}:null},lSe=(t,e)=>{let n=0,o,r=[];return t.pipe(te(Vy),x(i=>({actionMgrID:n,caseType:o}=i.payload,i.payload)),V(i=>i.ignoreCaseDeletion?ye({actionInPayload:i}):Wq(i)),V(async i=>{if(i&&Qe(i.type)){let{payload:g}=i,h=pe({...i,...g,actionMgrID:n});return r.push(h),r}let{actionInPayload:s}=i,{context:a,isModalAction:c}=s,l=c?Ee.MODAL:Ee.PRIMARY,u=X(l,a),p=cSe(u,s);if(!c&&u&&!p){let g={acName:u,target:u,context:a},h=e.value.containers[u],{semanticURL:E}=Tj(h);await Pe({directUrlUpdation:!0,semanticURL:E},s,g)}if(s.isProcessAction&&s.parentCaseInfo){let g={insKey:s.parentCaseInfo.ID,className:s.parentCaseInfo.content.classID,context:s.parentContext,acTargetName:d.PRIMARY,isChild:!0},h={type:Po,payload:{...g}};r.push(h)}let m=p?p.caseItem:a,f={target:u,containerItemID:m,context:p?de(m)||m:a,caseDeleted:!0};return r.push(B(nt,f)),p&&r.push(...p.showHome),r}),x(()=>(v(r),St(r,n)===d.PROMISE_VALUE.RESOLVE&&Kq({caseType:o}),r=[],r)))},Jq=lSe;var Yq=(t,e)=>{let{assignmentID:n,actionID:o,context:r}=t,{restApi:i,reqType:s}=F(O2,{assignmentID:n,actionID:o}),{content:a}=Mt(r),c=e.value.data[r]?.caseInfo?.headers,l=G.appendExcludeQueryParamToUrl(i);return Y(k(l,{method:s,body:a,headers:{"if-match":c&&c.etag}},r)).pipe(x(u=>({response:u.data,actionInPayload:t,headers:ke(u.headers)})),fe(": Error occurred during ajax call at saveAndCloseAssignment Epic at save action : ",r))};var Zq=t=>{w.publish(d.PUB_SUB_EVENTS.CASE_EVENTS.SAVE_ASSIGNMENT_COMPLETE,t)};var P1=(t,e=!1)=>{let{action:n,state$:o,actionMgrID:r}=t,i=n.payload.autosave===!0,s,a={},c=[];return ye(n.payload).pipe(V(l=>{s=ie("caseInfo.ID","",l.context)||void 0;let u=ie("caseInfo.caseTypeID","",l.context),p=ie("caseInfo.businessID","",l.context);return a=Dn(u,p)?{caseTypeID:u,businessID:p}:{},Yq(l,o)}),Gc(l=>{if(l&&Qe(l.type))return ye(l);let{containerItemID:u}=l&&l.actionInPayload,p=Ye(u),m=re(p),f=gt(m),g=Ke(p)[0],h=g?se(g):p;!Rt(re(h))&&({containerItemID:h}=zp(h,l.actionInPayload.caseID,g));let C=se(m);n.payload.canUpdateAvailableActions&&rd(l.response);let I=ce.getRemoteHeaderByContext(l.actionInPayload.context),_={...l.actionInPayload,RemoteSystemID:I===null?void 0:I},P=N=>B(Ne,{context:N,data:{caseInfo:{...l.response.data?.caseInfo||{},headers:l.headers}}});if(h&&c.push(P(h)),f?.items?.[C]?.key===l?.actionInPayload?.caseID){let N={context:p,data:{...l.response.data,caseInfo:{...l.response.data?.caseInfo||{},headers:l.headers}}},z=G.getPropertiesToReplace(u);c.push(B(Ne,N,{propertiesToReplace:z}))}return i||c.push(B(dn,{context:u})),Pa(l,c),Sc(_)}),V(async l=>{if(l&&Qe(l.type)){let{payload:E}=l,C=pe({...l,...E,actionMgrID:r});c.push(C);let I=t.action.payload.modalLoadingContainer;if(I){let _=I.context,{context_data:P}=J(_)||{};P?.isLoading&&Oa(_)}return c}let{actionInPayload:u,response:p}=l,{context:m,containerName:f}=u,h={target:X(f,m),containerItemID:m,context:m};return u.shouldUpdateCaseActionsInParentContext=!0,Cn(p,u),!e&&!i&&c.push(B(nt,h)),c}),x(()=>(v(c),St(c,r),i||Zq({context:n.payload.context,caseID:s,assignmentID:n.payload.assignmentID,...a}),e||(c=[]),vt.isDeferredActionInProgress(n.payload.context)&&vt.handleDeferredActionCompletion(n.payload.context),c)))},uSe=(t,e)=>{let n=0,o;return t.pipe(te(ji),Yt(r=>{let{saveOnly:i}=r.payload;return{actionMgrID:n,caseType:o}=r.payload,P1({action:r,state$:e,actionMgrID:n,caseType:o},i)}))},Qq=uSe;var Xq=t=>{w.unsubscribe(d.PUB_SUB_EVENTS.EVENT_EXPRESS_LOCALACTION,t)},e7=(t,e)=>{w.subscribe(d.PUB_SUB_EVENTS.EVENT_EXPRESS_LOCALACTION,t,e)};var gT=t=>{let{callbacks:e}=t;e?.submit&&e7(o=>{e.submit(o),Xq("expressLocalActionSubmit")},"expressLocalActionSubmit")},t7=t=>{let e=0,n,o=[],r={value:we()?.getState()};return ye(t).pipe(te(ji),Yt(i=>{let{isFormValid:s}=i.payload;if({actionMgrID:e,caseType:n}=i.payload,!s){let c={type:A.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return M.rejectActionByID(e,!0,c),ye([])}return P1({action:i,state$:r,actionMgrID:e,caseType:n,actionsOut:o},!0)}))};var{LOCAL_ACTION_TYPE:n7}=d,{RESOURCE_TYPES:dSe}=A,pSe=t=>{let e=t.localActionType?.toLowerCase();return e===n7.CASE_WIDE||e===n7.EXPRESS||e&&t.isPromotedAction?ga:bE},tm=(t,e)=>{let{actionID:n,assignmentID:o,caseID:r,context:i,openActionType:s,modalLoadingContainer:a,headers:c}=t,{isProcessAction:l}=e,u=l?Lu:pSe(t),p=mt.FORM,{reqType:m}=F(u,{caseID:r,ID:o,actionID:n,viewType:p}),{restApi:f}=F(u,{caseID:r,ID:o,actionID:n,viewType:p});t.actionType=u===ga?d.CASE:d.ASSIGNMENT,f&&!f.includes("viewType=")&&(f=f.includes("?")?`${f}&viewType=${p}`:`${f}?viewType=${p}`),f=G.appendExcludeQueryParamToUrl(f);let g=a?.context??i;return Y(k(f,{method:m,headers:c},g)).pipe(x(h=>({response:h.data,actionInPayload:t,headers:ke(h.headers,"",t.headers)})),fe(`: Error occurred during ajax call at ${s} Epic : `,g))},hT=(t,e)=>{let{isProcessAction:n}=e,o=n?Lu:bE;t.openActionType=o;let r=Wt(o,t),i;if(r==="modal"){if(!ei.isOnline()||t.isAppOffline)return M.rejectActionByID(t.actionMgrID),Promise.resolve();i=Ke(t.contextName)[0]?Ke(t.contextName)[0]:re(t.contextName);let s=i?se(i):t.contextName,a=de(s),c=Wt(t.openActionType,t),l=X(c,t.context),u=pr(t.context,En(c,t.context));if(v(kt({target:l,context:u,containerItemID:u,key:t.caseID,caseViewMode:d.PERFORM_MODE,actionName:t.name,showProgress:!0,root:{type:"reference",config:{context:d.CASE_INFO.CASE_INFO_CONTENT,type:"view"}},data:{key:t.caseID,caseInfo:{ID:t.caseID}},headers:{...t.headers}})),v(oS({context:u})),t.modalLoadingContainer={target:l,context:u},!Ke(t.contextName)[0]||!t.continueExecution||!jn(a))return tm(t,e);t.saveActionPayload.modalLoadingContainer=t.modalLoadingContainer,t.saveActionPayload.canUpdateAvailableActions=!t.saveActionPayload.isModalAction;let p=Gl(t.saveActionPayload);return Y([p]).pipe(V(m=>t7(m)),V(m=>m.length===1&&Qe(m[0].type)?Y(xt(i,{loadingContext:t.context})).pipe(V(({continueExecution:f})=>f?tm(t,e):(M.rejectActionByID(t.actionMgrID),Tt))):tm(t,e)),x(m=>m))}return tm(t,e)},mSe=t=>t==="async"?"submitBulkActionAsync":"submitBulkAction",fSe=t=>t.containerItemID?.includes(d.ACTIONAREA)&&t.context?.includes(d.ACTIONAREA),nm=async(t,e,{headers:n,actionInPayload:o})=>{let{context:r,actionName:i,openActionType:s,doDeleteCaseSummary:a,modalLoadingContainer:c,skipMergeAssignmentsAndActions:l}=o,u=ze(t),p=Wt(s,o),m=c?.target??X(p,r),f,g,h=!1;!Xn(m)||In(m)&&!Wl(m,t.data.caseInfo.ID)?(g=En(p,r),hr(p)&&(g=pr(r,g)),f=g,h=!0):(In(m)?f=Vt(m,t.data.caseInfo.ID):f=se(m),g=de(f)),await Pe(u,o,{acName:m,target:m,containerName:p,context:g}),(u?.data?.caseInfo?.content===void 0||u.data.caseInfo.content!==void 0&&typeof u.data.caseInfo.content=="object"&&Object.keys(u.data.caseInfo.content).length===0)&&delete u.data?.caseMessages;let C=u.uiResources?.root,I;C?I=d.PERFORM_MODE:I=d.REVIEW_MODE;let _=Me(u,{target:m,context:g,containerItemID:f,caseViewMode:I,doDeleteCaseSummary:a,headers:n,actionName:i,isMinimizable:!1,isInCreateStage:hr(p),resourceType:dSe.ASSIGNMENT,isProcessAction:o.isProcessAction,showProgress:o.showProgress,progressMessage:o.progressMessage,assignmentID:o.assignmentID,actionType:o.actionType,skipMergeAssignmentsAndActions:l});C&&qr(_,u),hr(p)&&delete _.doDeleteCaseSummary,o.openActionType===Lc&&(_.isBulkAction=!0,_.data.caseInfo.actionButtons.main[0].jsAction=mSe(o.runningMode),_.data.caseInfo.actionButtons.secondary[0].jsAction="cancelBulkAction",_.data.caseInfo.cases=o.selectedList,_.data.caseInfo.isAssignment=o.isAssignment);let P;if(h?P=kt:o.isProcessAction||fSe(o)?P=Yr:P=dn,_.data.context_data.isProcessAction=o.isProcessAction,e.push(B(P,_)),h||e.push(B(Bs,_)),h){let H=Ke(o.contextName),ne=Vt(H,t.data.caseInfo.ID);if(ne){let j={data:{caseInfo:{headers:n}},context:ne};e.push(B(Ne,j))}}f!==se(m)&&e.push(B(pn,{target:m,containerItemID:f})),Wn(f)&&!c?.context&&Lo(_,e);let N=_.nextAssignmentInfo?.context==="other";return o.isProcessAction&&!Wr(_.nextAssignmentInfo?.className)&&!N&&Pa({response:u,actionInPayload:{...o,containerItemID:f}},e),_.caseViewMode===d.REVIEW_MODE&&e.push(B(nt,_)),_.shouldUpdateCaseActionsInParentContext=!0,y.getIn(t.data,["caseInfo","isLocalAction"])||Cn(u,_),e};var r7="OPEN_LOCAL_ACTION";var o7=(t,e)=>hT(t,e);var gSe=t=>{let e=0,n=[];return t.pipe(te(r7),x(o=>({actionMgrID:e}=o.payload,o.payload)),Ai(()=>!sd(e)),V(o=>o7(o,{actionMgrID:e})),V(async o=>{if(!o)return Tt;if(Qe(o.type)){let l=pe(o);n.push(l);let{context_data:u}=J(o.payload.context)||{};return u?.isLoading&&n.push(B(Bs,o.payload)),n}let{actionInPayload:r,headers:i,response:s}=o,{actionID:a}=r;y.setIn(s,"data.caseInfo.activeActionID",a);let c=y.getIn(s,"data.caseInfo.ID");return As(c),y.setIn(s.data,d.CASE_INFO_IS_LOCAL_ACTION,!0),r.refreshConditions&&y.setIn(s.data,d.CASE_INFO_REFRESH_CONDITIONS,r.refreshConditions),await nm(s,n,{headers:i,actionInPayload:r}),gT(r),n}),x(()=>(v(n),St(n,e),n=[],n)))},i7=gSe;var s7=t=>{let{actionID:e,context:n,openActionType:o,caseTypeID:r,bulkContextID:i="",bulkContextType:s=""}=t,a=Lc,{reqType:c,restApi:l}=F(a,{caseTypeID:r,actionID:e,bulkContextID:i,bulkContextType:s});return Y(k(l,{method:c},n)).pipe(x(u=>({response:u.data,actionInPayload:t,headers:ke(u.headers)})),fe(`: Error occurred during ajax call at ${o} Epic : `,n))};var a7=t=>{w.unsubscribe(d.PUB_SUB_EVENTS.EVENT_BULKACTION,t)},c7=(t,e)=>{w.subscribe(d.PUB_SUB_EVENTS.EVENT_BULKACTION,t,e)};var l7=(t,e)=>{let{context:n}=t,{actionMgrID:o}=e;t.openActionType=Lc;let r=Wt(Lc,t),i=X(r,n);return Y(xt(i,{loadingContext:n})).pipe(V(({continueExecution:s})=>s?s7(t):(M.rejectActionByID(o),Tt)))},u7=t=>{let{callbacks:e}=t;e?.submit&&c7(o=>{e.submit(o),a7("bulkActionSubmit")},"bulkActionSubmit")};var d7="OPEN_BULK_ACTION";var hSe=t=>{let e=0,n=[];return t.pipe(te(d7),x(o=>({actionMgrID:e}=o.payload,o.payload)),V(o=>l7(o,{actionMgrID:e})),V(async o=>{if(o&&Qe(o.type??"")){let c=pe(o);return n.push(c),n}let{actionInPayload:r,headers:i,response:s}=o,{actionID:a}=r;return y.setIn(s,"data.caseInfo.activeActionID",a),await nm(s,n,{headers:i,actionInPayload:r}),u7(r),n}),x(()=>(n.length===1&&Qe(n[0].type)?M.rejectActionByID(e):M.resolveActionByID(e),v(n),n=[],n)))},p7=hSe;var m7=t=>{let{actionID:e,context:n,cases:o,classID:r,isAssignment:i}=t,{content:s}=Mt(n,{nonEmptyAndChangedData:!0}),a=5;try{wn.getSharedState(O.getQualifiedNameForComplexRuleReferences("D_pySingleExecutionBulkActionsMeta.D_pySingleExecutionBulkActionsMeta.pxResults"))?.find(E=>E[O.getDefaultQualifiedName("pyClassName")]===r)?.pyList.split(",").includes(e)&&(a=1)}catch(h){console.error('Failed to fetch to "D_pySingleExecutionBulkActionsMeta" DP response',h)}let c=o.map(h=>({ID:h})),l=c.length/a,u=i?k2:TE,{reqType:p,restApi:m}=F(u,{actionID:e}),f=[],g=c.length;for(let h=0;h<g;h+=l){let E=c.slice(h,h+l);i?s.assignments=E:s.cases=E,E.length&&f.push(Y(k(m,{method:p,body:s},n)).pipe(x(C=>{let{data:I,headers:_}=C;return{response:I,actionInPayload:t,headers:ke({..._})}}),fe("Error occurred during ajax call at submitbulkaction Epic : ",n)))}return Iv(f)};var f7=t=>{w.publish(d.PUB_SUB_EVENTS.EVENT_BULKACTION,t)};var g7="SUBMIT_BULK_ACTION";var h7=t=>{let e=0,n=[],o,r="";return t.pipe(te(g7),Yt(i=>{let{isFormValid:s}=i.payload;if({actionMgrID:e}=i.payload,!s){let a={type:A.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return M.rejectActionByID(e,!0,a),ye([])}return ye(i.payload).pipe(V(a=>(o=a,m7(o))),V(a=>{let c=0,l=0,u=[],{containerItemID:p,context:m}=o;return a.forEach(f=>{let{response:g}=f;c+=Number(g.successCount),l+=Number(g.failureCount),l&&g.results.forEach(h=>{h.status!=="200"&&h.error&&h.error.errorDetails&&h.error.errorDetails.forEach(E=>{u.push({ID:h.BusinessID,message:E.localizedValue})})})}),r=`${c} record(s) updated`,f7({submitResponse:a}),o.target=T.getRenderingMode()==="HYBRID"?re(p):`${d.APP.APP}/${Ee.MODAL}`,n.push(B(nt,{containerItemID:p,context:m,target:o.target,skipReleaseLockRequest:!0})),l&&n.push(B(zf,{messages:[{type:"error",message:l===1?"1 record failed to update":`${l} records failed to update`,errorDetails:u,showHeader:!1}],context:Ye(m)||m,category:"HTTP",showHeader:!1})),n}),x(()=>(M.resolveActionByID(e,r),v(n),n=[],n)))}))};var y7=t=>{let{actionID:e,context:n,cases:o}=t,{content:r}=Mt(n,{nonEmptyAndChangedData:!0});r.cases=o.map(c=>({ID:c}));let i=TE,{reqType:s,restApi:a}=F(i,{actionID:e,runningMode:"async"});return Y(k(a,{method:s,body:r},n)).pipe(x(c=>{let{data:l,headers:u}=c;return{response:l,actionInPayload:t,headers:ke({...u})}}),fe("Error occurred during ajax call at submitbulkactionasync Epic : ",n))};var S7=t=>{w.publish(d.PUB_SUB_EVENTS.EVENT_BULKACTION,t)};var E7="SUBMIT_BULK_ACTION_ASYNC";var A7=t=>{let e=0,n=[],o,r={};return t.pipe(te(E7),Yt(i=>{let{isFormValid:s}=i.payload;if({actionMgrID:e}=i.payload,!s){let a={type:A.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return M.rejectActionByID(e,!0,a),ye([])}return ye(i.payload).pipe(Yt(a=>(o=a,y7(o))),x(a=>{let{containerItemID:c,context:l}=o,{response:u}=a;return r={caseID:u.caseID,caseTypeID:"BackgroundJob"},S7({submitResponse:u}),o.target=`${d.APP.APP}/${Ee.MODAL}`,n.push(B(nt,{containerItemID:c,context:l,target:o.target,skipReleaseLockRequest:!0})),n}),x(()=>(M.resolveActionByID(e,r),v(n),n=[],n)))}))};var C7=(t,e)=>hT(t,e);var ySe=t=>{let e=0,n=[];return t.pipe(te(W_),x(o=>({actionMgrID:e}=o.payload,o.payload)),V(o=>{let i=Wt(Lu,o),s=X(i,o.context);return Y(xt(s,{loadingContext:o.context})).pipe(V(({continueExecution:a})=>a?(Ff(o.context),C7(o,{actionMgrID:e,isProcessAction:!0})):(M.rejectActionByID(o.actionMgrID),Tt)))}),V(async o=>{if(o&&Qe(o.type)){let a=pe(o);return n.push(a),n}let{actionInPayload:r,headers:i,response:s}=o;return await nm(s,n,{headers:i,actionInPayload:r}),n}),x(()=>(Or(n),St(n,e),n=[],n)))},I7=ySe;var _7=t=>{let e=0,n=[];return t.pipe(te(tt,st),x(o=>({actionMgrID:e}=o.payload,o.payload)),V(o=>{let{containerItemID:r,caseID:i,context:s,caseDeleted:a,skipReleaseLockRequest:c,currentCaseViewMode:l,isProcessAction:u,isInCreateStage:p,deleteWork:m}=o,f=l===d.PERFORM_MODE,g=i&&f;return m?ye([]):u&&p?Sc(o):r===s&&!a&&!c&&g?Sc(o):r?.includes(d.MODAL)&&Kr(cc(r))===d.REVIEW_MODE?Sc(o):ye([])}),V(o=>(o&&Qe(o.type)&&n.push(pe(o)),n)),x(()=>(v(n),St(n,e),n=[],n)))};var SSe=t=>{let{context:e,containerItemID:n}=t.payload;if(typeof n!="string"||!n)return!1;let o=de(n);return(o&&o!==e?[e,o]:[e||n]).some(i=>typeof i=="string"&&!!i&&qs.isAssignmentStale(i))},b7=t=>t.pipe(te(ku),iA(()=>oA(100)),x(e=>{if(SSe(e))return v({type:os,payload:e.payload}),[];let{actionMgrID:n,isChildCase:o,isModalAction:r,isProcessAction:i,isDataObject:s,skipReleaseLockRequest:a,isInCreateStage:c,containerItemID:l,context:u}=e.payload;return M.resolveActionByID(n),w.publish(d.PUB_SUB_EVENTS.EVENT_SHOW_CANCEL_ALERT,{isModalAction:r,hideDelete:i?!1:o,isDataObject:s,skipReleaseLockRequest:a,isInCreateStage:c,containerItemID:u||l}),[]})),T7=t=>t.pipe(te(CE),iA(()=>oA(100)),x(e=>{let{actionMgrID:n,context:o,containerName:r,containerItemID:i}=e.payload,s=X(r,o);return M.resolveActionByID(n),v(B(pn,{containerItemID:i,target:s,doDeleteCaseSummary:!1})),[]}));var v7=t=>{let e=0,n=[],o="";return t.pipe(te(ls),x(r=>({actionMgrID:e}=r.payload,r.payload)),V(r=>Zb(r)),V(async r=>{if(r&&r.type===ve)return n.push(pe(r)),{actionsOut:n,actionInPayload:{skipPageInstructions:!0}};let{actionInPayload:i,response:s,headers:a}=r,c=i.containerName,l=X(c,i.context),u=rt(l,c,i.context);u=pr(i.context,u);let{pageReference:p,targetProperty:m,index:f,subscriptFieldName:g,pageGroupName:h,actionType:E,isPageGroup:C}=i,I=p?.startsWith(A.OBJECT_INFO.OBJECT_INFO),_=null;I?(_=qe.transformCaseData(s),_.uiResources.root.config.context=`${p}${m}[${f}]`):_=s;let P=_?.uiResources?.root?.config?.name??i.interestPageActionID,N=ze(_);N.key=i.ID,N.data?.caseInfo?(N.data.caseInfo.ID=i.ID,D8(N,f,g,E,h)):N.data?.objectInfo&&(N.data.objectInfo.ID=i.ID);let{interestPageActionID:z,editType:H,isLocalAction:ne,actionID:j}=i,oe={isMultiRecordData:!0,viewName:i.viewID,parentContext:i.context,interestPage:i.interestPage,interestPageActionID:z,editType:H,isLocalAction:ne,actionID:j};N.uiResources.context_data.modalView=oe;let Ae=J(i.context)?.context_data?.caseInfo,he=`${i.pageReference}${i.targetProperty}`,Oe=nP(Ae,he,i.index);N.uiResources.context_data.caseInfo={...N.uiResources.context_data.caseInfo,content:y.mergeDeep(N.uiResources.context_data.caseInfo?.content,Oe?.content)};let He=Q.getProperty(d.CASE_INFO.REMOTESYSTEMID,"",i.context);await Pe(N,i,{acName:l,context:u});let Xe={target:l,context:u,containerItemID:u,headers:a,index:f,subscriptFieldName:g,pageGroupName:h,isPageGroup:C};He&&(Xe.headers={...Xe.headers,RemoteSystemID:He});let De=Me(N,Xe);De.resourceStatus=i.actionType,De.isMultiRecordData=!0,De.readOnly=i.readOnly,De.parentContext=i.context,De.heading=i.heading,De.data.caseInfo&&H===d.ACTION&&(De.data.caseInfo={...De.data.caseInfo,...$8(i),isLocalAction:i.isLocalAction}),De.clearStateMachine=!1,i.viewName=P;let Et=Jt(l,De);o=u,n.push(Et);let an={changedListProperty:[],leafProperty:[]};return H===d.ACTION&&(Ue.registerForServerChanges(),an=Nn.getServerProperties(De.data,u)),{actionsOut:n,actionInPayload:i,serverProps:an}}),x(({actionInPayload:r,serverProps:i={changedListProperty:[],leafProperty:[]}})=>{if(Zc(n)?M.rejectActionByID(e):M.resolveActionByID(e),r.skipPageInstructions||x8(o,r.pageReference,r.targetProperty,r.index,r.actionType),v(n),n=[],r.editType===d.ACTION){Nn.handleServerChanges(o,i.changedListProperty,i.leafProperty),Ue.unRegisterForServerChanges();let s=d.getProperty(A.CASE_INFO.CASE_INFO_CONTENT),a=y.convertClipboardPageToPageRefNotation(r.interestPage),c=s+a;r.columns.forEach(l=>{let u=ge.trimAnnotation(l.config.value),p=u.startsWith(".")?u:`.${u}`,m=ie(p,c,o),f=ft(p.split(".").pop(),l.config.classID),g=y.getFullPropertyReference([c,p.substring(1)]);be.isFieldExists(o,g)||be.addFieldNode(o,c,r.viewName,p,m,{isDeclarativeTarget:!!f?.isDeclarativeTarget,context:o,propertyName:p,pageReference:c,value:l.config.value,isInsideList:/\[\d+\]/.test(c)||/\[\d+\]/.test(p)})})}return n}))};var ESe=(t,e=!1)=>t===d.ACTION?e?Kt.REFRESH_CASE_DATA:Kt.REFRESH_ASSIGNMENT_DATA:Kt.REFRESH_CASE_VIEW,R7=t=>{let{context:e}=t,o={...Mt(e).content,contextData:!1},r=dd(e);y.isEmpty(r)||(o=ol(r,o));let i=ESe(t.editType,t.isLocalAction),{restApi:s,reqType:a}=F(i,{ID:!t.isLocalAction&&t.editType===d.ACTION?t.assignmentID:t.ID,actionID:t.actionID,viewID:t.viewID}),c=s;return t.editType===d.ACTION&&(c+=`?operation=${t.operationFlag}`,o.interestPageActionID=t.interestPageActionID),o.interestPage=t.interestPage,Y(k(c,{method:a,body:o,headers:t.headers},e)).pipe(x(l=>({actionInPayload:t,response:l.data,headers:ke(l.headers)})),fe(": Error occurred during getEmbeddedDataView request : ",e))};var ASe=()=>({rootView:null,data:null,uiResources:null,containerContext:null}),P7=(t,e,n)=>typeof n=="string"?`${t}${e}.${n}`:`${t}${e}[${n}]`,CSe=t=>{let{containerName:e,context:n}=t;if(!e)return{context:n,containerContext:null,target:null};let o=X(e,n),r=rt(o,e,n)||e,i=pr(n,r);return{context:i,containerContext:i,target:o}},ISe=(t,e,n,o,r)=>{if(r){let i=qe.transformCaseData(t);return i.uiResources.root.config.context=P7(e,n,o),i}return t},_Se=(t,e,n)=>{let o=c=>typeof c=="object"&&c!==null,r=(c,l)=>{if(o(c))return c[l]},s=e.replace(/^\./,"").split("."),a=t;for(let c of s)a=r(a,c);return typeof n=="string"?r(a,n)??null:Array.isArray(a)?a[n]??null:null},bSe=(t,e,n,o,r)=>{let i=t.data?.caseInfo?.content;if(i){let a=_Se(i,o,r);a&&v(wa({context:e,reference:n,value:a}))}let s=t.uiResources?.context_data;s&&v(wa({context:e,reference:d.CONTEXT_DATA,value:s}))},N7=t=>{let e=0,n=[];return t.pipe(te(xE),x(o=>{let{payload:r}=o;return{actionMgrID:e}=r,r}),V(o=>R7(o)),Gc(async o=>{let r=ASe();if(o?.type===ve)return n.push(pe(o)),{actionsOut:n,actionInPayload:{skipPageInstructions:!0},responseData:r};let{actionInPayload:i,response:s,headers:a}=o,{pageReference:c,targetProperty:l,index:u,containerName:p}=i,m=c?.startsWith(A.OBJECT_INFO.OBJECT_INFO),{context:f,containerContext:g,target:h}=CSe(i),E=ISe(s,c,l,u,m),C=ze(E);C.key=i.ID;let I=P7(c,l,u);if(await Pe(C,i,p?{acName:h,context:f}:{context:f}),p&&h){let z=Me(C,{target:h,context:f,containerItemID:f,headers:a,index:u});z.resourceStatus=i.actionType,z.isMultiRecordData=!0,z.readOnly=i.readOnly,z.parentContext=i.context,z.clearStateMachine=!1;let H=Jt(h,z);n.push(H)}else bSe(C,f,I,l,u);let P=C.uiResources?.root||null;return P?.config&&(P.config.context=I),r.rootView=P,r.data=C.data,r.uiResources=C.uiResources,r.containerContext=g,{actionsOut:n,actionInPayload:i,responseData:r}}),x(({actionsOut:o,responseData:r})=>{Zc(o)?M.rejectActionByID(e):M.resolveActionByID(e,r);let i=o;return n=[],i}))};var O7=(t,e)=>{let{pageReference:n,isMultiRecordData:o}=e,r=Q.getPropertyValue(d.getProperty(A.CASE_INFO.CASE_INFO_ID),n,t.parentContext),i=Q.getPropertyValue(d.CONTEXT_DATA_MODAL_VIEW.VIEW_NAME,n,t.parentContext),s=Q.getPropertyValue(A.CASE_INFO.ASSIGNMENT_ID,n,t.parentContext),a=Q.getPropertyValue(d.CONTEXT_DATA_MODAL_VIEW.CONTEXT_DATA_MODAL_VIEW,n,t.parentContext),{interestPage:c,interestPageActionID:l,actionID:u,isLocalAction:p}=a,f=t.pageReference.substring(0,t.pageReference?.lastIndexOf(".")).replace(d.getProperty(d.CASE_INFO.CASE_INFO_CONTENT),"");a.editType==="action"?cd(r,s,u,t.parentContext,c,l,p,o,a.editType):rl(r,i,t.parentContext,f,{})};var TSe=(t,e)=>{if(t&&e.editType==="action"&&t.type!==ve){let{context:n,pageReference:o}=e,r={context:n},{response:i}=t,s=o?.startsWith(A.OBJECT_INFO.OBJECT_INFO),a=null;s?(a=qe.transformCaseData(i),a.uiResources.root.config.context=o):a=i;let c=ze(a);c.key=e.ID,c.data?.caseInfo?c.data.caseInfo.ID=e.ID:c.data?.objectInfo&&(c.data.objectInfo.ID=e.ID);let l=Me(c,r);l.skipValidation=!0;let u=B(Ne,l);Ue.registerForServerChangesSync(),v(u),Ue.unRegisterForServerChanges()}return t},x7=t=>{let e="",n=[],o;return t.pipe(te(DE),Yt(r=>{o=r.payload;let{isFormValid:i}=r.payload;if({actionMgrID:e}=r.payload,!i){let s={type:A.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return M.rejectActionByID(e,!0,s),vt.handleDeferredActionCompletion(r.payload.context),ye([])}return ye(r.payload).pipe(V(s=>(o=s,Zb(o))),V(async s=>TSe(s,o)),V(async s=>{if(s&&s.type===ve){let m=pe(s);return n.push(m),n}let{containerItemID:a,context:c,pageReference:l,interestPage:u}=o,p=u?.replace(/\(\d+\)$/,"");return Wz(c,o.parentContext,l.startsWith(A.OBJECT_INFO.OBJECT_INFO_CONTENT)?d.getProperty(A.OBJECT_INFO.OBJECT_INFO_CONTENT):d.getProperty(A.CASE_INFO.CASE_INFO_CONTENT),!1,p),n.push(B(nt,{containerItemID:a,context:c,target:o.target,skipReleaseLockRequest:!0})),n}),x(()=>{if(Zc(n))M.rejectActionByID(e),vt.handleDeferredActionCompletion(o.context);else{M.resolveActionByID(e),vt.handleDeferredActionCompletion(o.context);let{pageReference:s}=r.payload,a=Q.getPropertyValue(d.CONTEXT_DATA_MODAL_VIEW.IS_MULTI_RECORD_DATA,s,o.parentContext);a?O7(o,{isMultiRecordData:a,pageReference:s}):ld(o.parentContext,d.getProperty(d.CASE_INFO.CASE_INFO_CONTENT),{})}return v(n),n=[],n}))}))};var vSe="Error ocurred during ajax call at getDescendants Epic : ",D7=t=>{let{caseID:e,headers:n,debugInfo:o,context:r}=t,i=F(v2,{caseID:e}),{restApi:s}=i,{reqType:a}=i;return Y(k(s,{method:a,headers:{...n,...o&&{...Ge.addDebugHeaders(o)}}},r)).pipe(x(c=>({actionInPayload:t,response:c.data,headers:ke({...n,...c.headers})})),fe(vSe,r))};var $7=t=>{let e=0,n=[];return t.pipe(te(Jw),x(o=>({actionMgrID:e}=o.payload,o.payload)),V(o=>D7(o)),V(async o=>{if(o&&Qe(o.type))return n.push(pe(o)),n;let{actionInPayload:r,response:i}=o,s={};if(y.setIn(s,"caseInfo.childCases",i?.childCases??[]),i?.uiResources?.resources&&Rf(i.uiResources.resources),i?.uiResources?.components)try{await Do(i.uiResources.components)}catch(c){return n.push(pe({payload:{...r,err:c}})),n}i?.uiResources?.localeReferences&&y.setIn(s,"localeReferences",i.uiResources.localeReferences),i?.uiResources?.childCases_context_data&&y.setIn(s,"childCases_context_data",i.uiResources.childCases_context_data);let a={data:s,context:r?.context};return n.push(B(Ne,a)),n}),x(()=>(v(n),St(n,e),n=[],n)))};var w7=(t,e)=>{let n={type:A.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};M.rejectActionByID(t,!0,n),vt.handleDeferredActionCompletion(e)},M7=(t,e,n)=>{jn(e)&&t.push(B(nt,{containerItemID:n,skipReleaseLockRequest:!0}))},k7=({itemData:t,workareaContainerData:e,subscriptData:n,pageGroupName:o,activeWorkArea:r,subscriptFieldName:i,actionMgrID:s,containerItemID:a})=>{let c={referenceList:t?.referenceList,ID:e?.caseInfo?.ID,index:n[i],containerName:A.MODAL,pageReference:A.CASE_INFO.CASE_INFO_CONTENT,viewID:A.VIEW_NAMES.DATA_OBJECT_CREATE_VIEW,skipSemanticUrl:!0,actionType:A.RESOURCE_STATUS.CREATE,interestPage:`.${o}.${n[i]??""}`,targetProperty:`.${o??""}`,pageGroupName:o,context:r??"",subscriptFieldName:i};return{type:ls,payload:{isInCreateStage:!1,isModalAction:!0,parentContext:"",target:"",...c,actionMgrID:s,containerItemID:a,doDeleteCaseSummary:!1,isFormValid:!0}}};var L7=t=>{let e="",n=[],o,r={};return t.pipe(te($E),Yt(i=>{o=i.payload;let{isFormValid:s}=i.payload;return{actionMgrID:e}=i.payload,s?ye(i.payload).pipe(V(a=>(o=a,ye({}))),V(async()=>{let{containerItemID:a}=o,c=J(a),l=a,u=c?.dataInfo.content;delete u.classID;let p=Ye(l),m=Ke(p).length,f=Ke(p)[m-1]?se(Ke(p)[m-1]):p,g=re(a),h=Ze(g,a)||{},E=h?.referenceList?.replaceAll(".",""),C=h?.subscriptName,I=J(f),_={...I,caseInfo:{content:{...u}}},P={containerItemID:f,data:_};n.push(B(dn,P)),M7(n,l,a);let N=k7({itemData:h,workareaContainerData:I,subscriptData:u,pageGroupName:E,activeWorkArea:f,subscriptFieldName:C,actionMgrID:e,containerItemID:a});return n.push(N),r=u,n}),x(()=>(M.resolveActionByID(e,r),v(n),n=[],n))):(w7(e,i.payload.context),ye([]))}))};var RSe=[JG,gq,Pq,Dq,i7,p7,h7,A7,I7,zq,qq,Bq,_7,Qq,Jq,b7,T7,v7,N7,x7,$7,L7],U7=RSe;var{RESOURCE_TYPES:N1}=A,yT="pyCasePreview",PSe=(t,e,n,o,r)=>{t&&r===Ee.PREVIEW?(n.data.caseInfo.progress=!1,delete n.root,Cn(n,n),o.actionsOut=B(dn,{...n,containerName:r})):t?(o.actionsOut=[],o.actionsOut.push(B(pn,{target:e,containerItemID:t}))):o.actionsOut=B(kt,{...n,containerName:r})},NSe=(t,e)=>{let n=G.isObjectCaseType(t.caseClassName);if(t.key&&!n){let o=re(t?.context),r=Vt(o,t.key),i=t?.context;(r||t.updateData||Hj(i))&&e.actionsOut.push(B(Ne,t))}else e.actionsOut.push(B(Ne,t))},OSe=t=>{let{containerName:e,updateData:n,viewLoadingContainer:o}=t,r=e||qt.getTargetViewContainerName(Vr),i=o?.target??X(r,t.context),s=o?.context??(e===Ee.PREVIEW&&n?t.context:rt(i,r,t.context,{buildNew:!!e}));return{target:i,context:s}},xSe=(t,e)=>{let n=F("loadView",e);t.viewContext===N1.PAGE&&(n=F(Vr,{page:t.viewName,pageClass:t.pageClass}));let o=O.getDefaultQualifiedName(yT);return t.containerName===Ee.PREVIEW&&t.caseId&&t.viewContext!==N1.PAGE&&(t.viewName===o||t.viewName===yT)&&(n=F(Gt,{caseID:t.caseId,params:{pageName:o}})),n},DSe=t=>t.pipe(te(Ou),x(e=>e.payload),Ai(e=>!sd(e.actionMgrID)),V(e=>{let n={caseID:e.caseId,viewID:e.viewName,caseClassName:e.caseClassName,RemoteSystemID:e.RemoteSystemID};if(e.containerName===Ee.PREVIEW&&e.context&&e.caseId&&!e.updateData){let s=X(Ee.PREVIEW,e.context),a=rt(s,Ee.PREVIEW,e.context,{buildNew:!0}),c=decodeURI(e.caseId);v(kt({...e,context:a,target:s,containerItemID:a,key:c,caseViewMode:d.REVIEW_MODE,root:{type:"reference",config:{context:d.getProperty(d.CASE_INFO.CASE_INFO_CONTENT),name:e.viewName,type:"view"}},data:{key:c,caseInfo:{ID:c,progress:!0,error:!1,caseTypeID:e.caseClassName,content:{classID:e.caseClassName}}}})),e.viewLoadingContainer={target:s,context:a}}let o={};if(n.RemoteSystemID)o.RemoteSystemID=n.RemoteSystemID;else if(ce.isRemoteCase(n.caseClassName)){let{RemoteSystemID:s}=ce.getRemoteCase(n.caseClassName);o.RemoteSystemID=s}let{restApi:r,reqType:i}=xSe(e,n);return Y(k(G.appendExcludeQueryParamToUrl(r),{method:i,headers:o},e.context)).pipe(x(s=>{let a=decodeURI(e.caseId),c="";return typeof s.data=="string"?s.data?c=JSON.parse(s.data):(console.error("response data is empty!!"),c={}):c=s.data,{response:{...c,key:a},actionConfig:e,headers:ke(s.headers),rootView:y.getIn(c,d.ROOT)}}),fe(": Error ocurred during ajax call at loadView Epic : ",e.viewLoadingContainer?.context??e.context))}),V(async e=>{let n={};if(e?.type===ve){if(n.actionsOut=pe(e),e?.payload?.context?.includes(Ee.PREVIEW)){let a={...J(e.payload.context),caseInfo:{progress:!1,error:!0}},c=X(Ee.PREVIEW,e.payload.context);n.actionsOut=B(dn,{key:a.key,target:c,containerName:Ee.PREVIEW,context:e.payload.context,containerItemID:e.payload.context,data:a})}return n}try{n.actionMgrID=e?.actionConfig?.actionMgrID,n.rootView=e?.rootView;let{actionConfig:s,response:a,headers:c}=e;e?.actionConfig?.skipAssignmentsUpdate&&(delete a?.data?.caseInfo?.assignments,delete a?.data?.caseInfo?.availableActions,delete a?.data?.caseInfo?.availableProcesses);let{containerItemID:l,containerName:u}=s,{target:p,context:m}=OSe(s);s.context=m;let f={acName:p,context:m},g={};g=ze(a),g.directUrlUpdation=!1,await Pe(g,s,f);let h={...s,target:p,context:m,containerItemID:l||m,headers:c},E=Me(g,h);if(E.resourceType=N1.CASE,s.viewName===d.PY_CONFIRM&&(E.caseViewMode=d.REVIEW_MODE,y.setIn(E.data,["context_data","caseViewMode"],d.REVIEW_MODE)),u&&!E.updateData){E.caseViewMode=d.REVIEW_MODE,y.setIn(E.data,["context_data","caseViewMode"],E.caseViewMode);let C=re(E?.context),I=Vt(C,E.key);PSe(I,C,E,n,u)}else{E.preserveClientChanges=!0,n.actionsOut=[],u===Ee.PREVIEW&&n.actionsOut.push({type:Rr,payload:{context:m,skipMergeAssignmentsAndActions:!1}});let{viewName:C}=s;C===O.getDefaultQualifiedName(yT)&&Cn(E,E),NSe(E,n)}}catch(s){console.error(s),n.rootView={type:"error",payload:s}}let{caseId:o,context:r,viewName:i}=e.actionConfig;return i===O.getDefaultQualifiedName(yT)&&Lj({caseId:o,context:r}),n}),x(({rootView:e,actionsOut:n,actionMgrID:o=0})=>(M.resolveActionByID(o,e),qe.setNeedsMapping(!1),n))),$Se=t=>{let e=0,n=[];return t.pipe(te(Un),x(o=>({actionMgrID:e}=o.payload,o.payload)),V(o=>{w.publish(A.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_STARTED);let{debugInfo:r,context:i,viewName:s,className:a,skipSemanticUrl:c=!1,containerName:l=qt.getTargetViewContainerName(Vr)}=o,u=r&&{...Ge.addDebugHeaders(r)},p=X(l,i),m="";if(!c){let{semanticURL:h,activate:E,activateContainerActionPayload:C}=yV(s,a,p);if(m=h,E)return pd(C),ye({type:mn,activateContainerActionPayload:C,actionConfig:o})}let g=se(p)?xt(p,{loadingContext:i}):Promise.resolve({continueExecution:!0,removeActionPayload:{}});return Y(g).pipe(V(({continueExecution:h,removeActionPayload:E})=>h?Y((()=>{if(it())return Ot("openPage",{pageName:s,pageClass:a,headers:u});let{restApi:I,reqType:_}=F(Vr,{page:s,pageClass:a});return k(I,{method:_,headers:u},i)})()).pipe(x(I=>{let _={};return typeof I.data=="string"?_=JSON.parse(I.data):_=I.data,{response:{..._,key:m,semanticURL:m},actionConfig:o,headers:ke(I.headers),removeActionPayload:E,skipSemanticUrl:c}}),fe(": Error ocurred during ajax call at showPage Epic : ",o.context)):(M.rejectActionByID(e),Tt)))}),V(async o=>{let r={};if(r.actionManagerID=o?.actionConfig?.actionMgrID,o&&o.type===ve)return n.push(pe(o)),r;let{type:i}=o,{actionConfig:s,skipSemanticUrl:a}=o,c=s.containerName||qt.getTargetViewContainerName(Un),l=X(c,s.context);w.publish(A.PUB_SUB_EVENTS.EVENT_PREVIEW_DISMISS,{pageName:o.actionConfig.viewName,pageClass:o.actionConfig.className}),w.publish(A.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_INIT,{pageName:o.actionConfig.viewName,pageClass:o.actionConfig.className});let{remoteCasePayload:u,updatedType:p}=EV(i,o,s,l);if(i=p??i,s.isDeferLoaded){let{response:m,headers:f={}}=o,{isCreateDataObject:g,context:h}=s,E=ze(m,{isCreateDataObject:g});E.directUrlUpdation=!a,await Pe(E,s,{acName:l,context:h});let _=Me(E,{containerItemID:h,target:l,headers:f,context:h});r.rootView=y.getIn(E,d.ROOT),n.push(B(Ne,_))}else if(i===mn){let{activateContainerActionPayload:{semanticURL:m,containerItemID:f}}=o,g=de(f),h={acName:l,context:g};s.isTraditionalRemoteCase||await Pe({directUrlUpdation:!0,semanticURL:m},s,h,!0),n.push(B(pn,{target:l,containerItemID:f}))}else{let m=rt(l,c,s.context),{response:f,headers:g={},removeActionPayload:h}=o,E=ze(f,{isCreateDataObject:s.isCreateDataObject});E.directUrlUpdation=!a;let C={acName:l,context:m},I=Kr(m);await Pe(E,s,C);let _={target:l,context:m,containerItemID:m,headers:g,debugInfo:s.debugInfo,currentCaseViewMode:I,referenceList:s?.referenceListStr,subscriptName:s?.subscriptName,pageName:s.viewName},P=Me(E,_);P.resourceType=A.PAGE,s.isCreateDataObject&&(P.resourceType=A.RESOURCE_TYPES.DATA,P.resourceStatus=A.RESOURCE_STATUS.CREATE,delete P.data.caseInfo,P.referenceList=s.referenceListStr,P.subscriptName=s.subscriptName),AV(s,u,P),P.data??={},P.data.traditionalGadgetId=G.getUniqueGadgetId();let N=Jt(l,P);h.containerItemID&&yr(N)&&n.push(B(nt,{containerItemID:h.containerItemID,target:l})),n.push(N)}return w.publish(A.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_DONE,{target:l,pageName:o.actionConfig.viewName,pageClass:o.actionConfig.className}),r}),x(({actionManagerID:o=0,rootView:r})=>{M.resolveActionByID(o,r),v(n),n=[]}),ps())},wSe=[DSe,$Se],z7=wSe;var MSe="Error occurred during ajax call at showData Epic : ",kSe=(t,e,n)=>{let{context:o,pageName:r,dataContext:i,dataContextParameters:s,semanticURL:a,skipSemanticUrl:c,RemoteSystemID:l}=t,{removeActionPayload:u}=e,p={};return p.RemoteSystemID=l,Y((()=>{if(it())return Ot(dr,{queryPayload:{pageName:r},body:{dataContext:i,dataContextParameters:s}});let{restApi:f,reqType:g,body:h}=F(dr,{pageName:r,dataContext:i,dataContextParameters:s});return k(f,{method:g,headers:p,body:h},o)})()).pipe(x(f=>({response:{...f.data,key:a,semanticURL:a},actionConfig:t,headers:ke(f.headers),removeActionPayload:u,skipSemanticUrl:c})),fe(MSe,t.context,String(n)))},O1=kSe;var{RESOURCE_TYPES:ST}=A,LSe=(t,e)=>+(t>e)-+(t<e),USe=(t,e)=>{if(!t)return"";let n=Object.entries(e??{}).sort(([r],[i])=>LSe(r,i)),o=new URLSearchParams(n.map(([r,i])=>[r,String(i)])).toString();return o?`${t}?${o}`:t},zSe=(t,e)=>{let{context:n,pageName:o,dataContext:r,dataContextParameters:i,skipSemanticUrl:s=!1,isDeferLoaded:a=!1,parentAction:c="",resourceType:l,containerName:u,RemoteSystemID:p,forceCoexistence:m=!1}=t,f=X(u,n),g="",h=USe(r,i),E={context:n,pageName:o,dataContext:r,dataContextParameters:i,semanticURL:g,skipSemanticUrl:s,containerName:u,isDeferLoaded:a,parentAction:c,resourceType:l,RemoteSystemID:p,dataKey:h,forceCoexistence:m};if(!s){g=Nt(dr,{pageName:o,dataViewName:r},i),E.semanticURL=g;let C=g||h,{activate:I,activateContainerActionPayload:_}=_s(ST.PAGE,f,{semanticURL:C});return I?ye({type:mn,activateContainerActionPayload:_&&{..._,semanticURL:g},actionConfig:t}):Y(xt(f,{loadingContext:n})).pipe(V(({continueExecution:P,removeActionPayload:N})=>P?O1(E,{removeActionPayload:N},e):(M.rejectActionByID(e),Tt)))}return O1(E,{removeActionPayload:{}},e)},jSe=(t,e)=>t.isCoexistenceCreate?ye({isCoexistenceCreate:!0,actionConfig:t}):t.isCoexistenceLanding?ye({isCoexistenceLanding:!0,actionConfig:t}):t.isCoexistenceHarness?ye({isCoexistenceHarness:!0,actionConfig:t}):zSe(t,e),x1=async(t,e,n,o)=>{let{containerName:r,context:i}=t,s=X(r,i),a=rt(s,r,i)??"";e.directUrlUpdation=!1,await Pe(e,t,{acName:s,context:a});let c=Me(e,{target:s,context:a,containerItemID:a,headers:{}});return c.resourceType=ST.DATA,c.key=c.key||n,o.push(Jt(s,c)),o},FSe=async(t,e)=>{let{actionConfig:n}=t,{containerName:o,context:r,createClassName:i}=n,s=X(o,r),a=rt(s,o,r)??"";return x1(n,cV(i,a),`create:${i}`,e)},VSe=async(t,e)=>{let{actionConfig:n}=t,{containerName:o,context:r,className:i,harnessName:s,label:a,levelC:c,readOnly:l,model:u}=n,p=X(o,r),m=rt(p,o,r)??"",f={className:i,harnessName:s,label:a,levelC:c,readOnly:l,model:u},g=`landing:${i}:${s}:${c??""}:${u??""}`;return x1(n,lV(f,m),g,e)},BSe=async(t,e)=>{let{actionConfig:n}=t,{containerName:o,context:r,className:i,harnessName:s,label:a,readOnly:c,preActivity:l,preActivityParams:u,preActivityDynamicParams:p}=n,m=X(o,r),f=rt(m,o,r)??"",g={className:i,harnessName:s,label:a,readOnly:c,preActivity:l,preActivityParams:u,preActivityDynamicParams:p},h=`harness:${i}:${s}:${a??""}`;return x1(n,uV(g,f),h,e)},HSe=async(t,e)=>{let{actionConfig:n,headers:o,response:r,skipSemanticUrl:i}=t,s=X(n.containerName,n.context),a=ze(r??{});a.directUrlUpdation=!i,Lf(a,{dataContext:n.dataContext,dataContextParameters:n.dataContextParameters,forceCoexistence:n.forceCoexistence}),await Pe(a,n,{acName:s,context:n.context});let c=Me(a,{target:s,headers:o,context:n.context,containerItemID:t.containerItemID});return e.push(B(Ne,c)),e},GSe=async(t,e)=>{let{actionConfig:n,activateContainerActionPayload:o}=t,r=X(n.containerName,n.context),{semanticURL:i,containerItemID:s}=o??{},a=de(s??null),c=a?J(a):void 0;a&&c&&dV(a,c,{dataContext:n.dataContext,dataContextParameters:n.dataContextParameters,forceCoexistence:n.forceCoexistence}),PA(a)&&pd(o),i&&await Pe({directUrlUpdation:!0,semanticURL:i},n,{acName:r,context:a},!0),e.push(B(pn,{target:r,containerItemID:s,resourceType:ST.DATA}))},qSe=(t,e)=>{let{actionConfig:n,response:o}=t;e.push(B(Ne,{context:n.context,data:o?.data}))},WSe=async(t,e)=>{let{actionConfig:n,headers:o,response:r,skipSemanticUrl:i,removeActionPayload:s}=t,{containerName:a,context:c}=n,l=X(a,c),u=rt(l,a,c),p=c?Kr(c):void 0,m=ze(r??{});m.directUrlUpdation=!i,Lf(m,{dataContext:n.dataContext,dataContextParameters:n.dataContextParameters,forceCoexistence:n.forceCoexistence}),await Pe(m,n,{acName:l,context:u});let f=Me(m,{target:l,context:u,containerItemID:u,headers:o,currentCaseViewMode:p});f.resourceType=ST.DATA,n.dataKey&&!f.key&&_R(m.data)&&(f.key=n.dataKey);let g=Jt(l,f);s?.containerItemID&&yr(g)&&e.push(B(nt,{containerItemID:s.containerItemID,target:l})),jA(e),e.push(g)},KSe=async(t,e,n)=>{if(t?.type===ve)return e.push(pe(t)),e;if(t.isCoexistenceCreate)return FSe(t,e);if(t.isCoexistenceLanding)return VSe(t,e);if(t.isCoexistenceHarness)return BSe(t,e);let{type:o,actionConfig:r,response:i}=t,{resourceType:s,parentAction:a}=r;return n(y.getIn(i,d.ROOT)),r.isDeferLoaded?HSe(t,e):o===mn?(await GSe(t,e),e):s==="DATA"&&a===cs?(qSe(t,e),e):(await WSe(t,e),e)},JSe=t=>{let e=0,n=[],o;return t.pipe(te(aa),Gc(r=>({actionMgrID:e}=r.payload,ye(r.payload).pipe(V(i=>jSe(i,e)),V(async i=>KSe(i,n,s=>{o=s})),x(()=>(M.resolveActionByID(e,o),v(n),n=[],n))))))},j7=JSe;var YSe="Error occurred during ajax call at deleteDataObject Epic",ZSe=t=>{let{dataViewName:e,context:n,dataViewParameters:o}=t,r={data_view_ID:e,dataViewParameters:encodeURIComponent(JSON.stringify(o))},{restApi:i,reqType:s}=F(z2,r);return Y(k(i,{method:s},n)).pipe(x(a=>({response:a.data,actionInPayload:t})),fe(YSe,n))},F7=ZSe;var QSe=t=>{let e=0,n=[];return t.pipe(te(PE),bn(100),x(o=>({actionMgrID:e}=o.payload,o.payload)),V(o=>F7(o)),V(async o=>{if(o&&o.type===ve){let{payload:r}=o,i=pe({...o,...r,actionMgrID:e});return n.push(i),n}return[]}),x(()=>(n.length===1&&Qe(n[0].type)?M.rejectActionByID(e):M.resolveActionByID(e),v(n),n=[],n)))},V7=QSe;var XSe="Error occurred during ajax call at GET data object actions : ",eEe=t=>{let{dataViewID:e,dataViewParameters:n,context:o}=t,r={data_view_ID:e},{restApi:i,reqType:s}=F(U2,r);return Y(k(i,{method:s,body:{dataViewParameters:n}},o)).pipe(x(a=>({...a.data})),fe(XSe,t.context))},B7=eEe;var tEe=t=>{let e=0,n=[],o=100,r={};return t.pipe(te(EE),bn(o),x(i=>({actionMgrID:e}=i.payload,i.payload)),V(i=>B7(i)),V(async i=>i&&i.type===ve?(n.push(pe(i)),n):(r=i,[])),x(()=>(n.length===1&&Qe(n[0].type)?M.rejectActionByID(e):M.resolveActionByID(e,r),v(n),n=[],n)))},H7=tEe;var nEe=[j7,Lw,Uw,zw,V7,H7,jw,Fw],G7=nEe;var{RESOURCE_TYPES:{CASE:rEe,DATA:oEe,OBJECT:iEe,PAGE:sEe}}=A,aEe=(t,e,n)=>{e===sEe&&n&&(t.pageName=n)},Zl=[],Ql=!1,rm=!1,ET=null,hS=null,D1={},cEe=t=>t?.routeKey===as?A5(t.payload?.caseTypeID,t.payload?.businessID):"",lEe=t=>t.pipe(te(AE),yf(200),x(e=>e.payload),V(e=>{rm=!1,w.subscribe(A.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_STARTED,()=>{rm=!0});let n=en.getPreviewMode()&&Ge.addDebugHeaders({debugId:y.generateUniqueID()});D1.dataContext=e.payload.dataViewName,D1.dataContextParameters=e.payload.dataViewKeys;let{context:o,requestType:r,routeKey:i}=e,{routeEndpoint:s}=e;s&&(s.indexOf("viewType={viewType}")>0?s=s.replace("{viewType}","page"):s.indexOf('viewType=""')>0&&(s=s.replace('viewType=""','viewType="page"'))),Ql=i===Gn,Ql&&qe.setNeedsMapping(!0);let a=At.getServerURL()+s,c=e.options.context,l,u={},p=e?.payload?.caseClassName;if(ce.isRemoteCase(p)){let{RemoteSystemID:m}=ce.getRemoteCase(p);u.RemoteSystemID=m}if(T.isWSSPortal()&&(u[d.X_ORIGIN_CHANNEL]="WSS"),r==="POST"){l=e.payload,s.indexOf("viewType=")<0&&(s=`${s}?viewType=page`);let m=qR(i),f;switch(m){case rEe:case iEe:f={caseTypeID:l.caseTypeID,processID:l.processID,content:{}};break;case oEe:f=D1;break;default:f=l}return Y(k(a,{method:r,body:f,headers:{...u,...n}},o)).pipe(x(g=>({response:{...g.data},payload:e,headers:ke(g.headers,"",u)})),fe(": Error occurred during ajax call at historyEpic : ",e))}return Y(k(G.appendExcludeQueryParamToUrl(a),{method:"GET",headers:{...u,...n}},c.substring(0,c.lastIndexOf("/")))).pipe(x(m=>({response:m.data,payload:e,headers:{...ke(m.headers),...n}})),ds(m=>{if(i===ha){let f={messages:[{type:"error",message:m.response.data.errorDetails[0].localizedValue}],category:"PAGE"};yt.setComponentCache("assignments-launchAssignment-Error",f);let g=RA(gb()),h=Se.getEndPointInfo(g.split("/assignments")[0]),E=At.getServerURL()+h.routeEndpoint;return e={...e,routeKey:Gt,resetSemanticURL:!0},Y(k(E,{method:h.reqType,headers:{...u,...n}},c.substring(0,c.lastIndexOf("/")))).pipe(x(C=>({response:C.data,payload:e,headers:{...ke(C.headers),...n}})))}return ye(bs(": Error occurred during ajax call at historyEpic : ",m,o))}))}),V(async e=>{if(rm)return Zl;if(w.subscribe(A.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_STARTED,()=>{rm=!0}),e&&e.type===ve)return pe(e);let{headers:n={},response:o,payload:r}=e,i=ze(o,{[A.STOPMERGEACTIONS]:!o.nextAssignmentInfo}),s=r.options.acName,a=Rt(s)&&Xn(s)?se(s):e.payload.options.context,c=a;n.RemoteSystemID=r?.payload?.RemoteSystemID,hS={target:s,context:a,containerItemID:c,headers:n,debugInfo:{debugId:n[d.COREHEADER_APP_DEBUG_ID]}};let l=r?.payload?.pageClass,u=r?.payload?.page,p=Ql?Gn:Gt,m=Ql?r.payload.objectID:r.payload.workID,f=Ql?"{objectID}":"{workID}",g=Ql?`objects/${m}`:cEe(r);r?.payload?.caseName&&m&&(g=Nt(p,{caseName:e.payload.payload.caseName}),g=g?.replace(f,m)||"",l=r?.payload?.caseClassName),(r?.routeKey===ha||r?.resetSemanticURL)&&Gj(c,i),IV(r?.routeKey,i),bV(r?.routeKey,i,r?.payload),_V(i),w.publish(A.PUB_SUB_EVENTS.EVENT_PREVIEW_DISMISS,{pageName:u,pageClass:l}),w.publish(A.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_INIT,{pageName:u,pageClass:l});let h=y.getIn(i,d.COMPONENTS);h&&await Do(h),hs(i,r.options.actionConfig,!0),w.publish(A.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_DONE,{target:s,pageName:u,pageClass:l});let E=Me(i,hS),C=qR(e.payload.routeKey);return E=SV(C,{...o.data,semanticURL:g,caseViewMode:d.REVIEW_MODE},E),E.data.traditionalGadgetId=G.getUniqueGadgetId(),aEe(E,C,u),Zl.push(Jt(s,E)),ET=i,CV(a,Zl),Zl}),x(()=>(rm||v(Zl),ET&&hS&&Cn(ET,hS),Zl=[],Ql=!1,rm=!1,hS=null,ET=null,Zl)),fe("Error occurred")),uEe=[lEe],q7=uEe;var dEe=t=>{let e=0;return t.pipe(te(Sa),x(n=>({actionMgrID:e}=n.payload,n.payload)),x(()=>{let n=we()?.getState(),o=fS();return Ro(n,o)&&e>0?M.resolveActionByID(e,{}):M.rejectActionByID(e),[]}),ps())},pEe=[dEe],W7=pEe;var mEe=t=>{let e=0,n=[];return t.pipe(te(fE),x(o=>({actionMgrID:e}=o.payload,o.payload)),V(o=>{let{context:r,skipSemanticUrl:i=!1,insightID:s}=o,a="",c;i||(a=Nt(kc,{insightID:"{insightID}"}),a=a.replace("{insightID}",s),c=Se.getEndPointInfo(a));let{restApi:l,reqType:u}=F(kc,{...c?.payload||[],insightID:s});return Y(k(l,{method:u},r)).pipe(x(p=>{let m={};return typeof p.data=="string"?m=JSON.parse(p.data):m=p.data,{response:{...m,key:a,semanticURL:a},actionConfig:o,skipSemanticUrl:i}}),fe(": Error occurred during ajax call at showPage Epic : ",o.context))}),V(async o=>{if(o&&o.type===ve)return n.push(pe(o)),n;let{actionConfig:r,skipSemanticUrl:i}=o,s=qt.getTargetViewContainerName(Un),a=X(s,r.context),c=rt(a,s,r.context),{response:l}=o,u=ze(l);u.directUrlUpdation=!i,await Pe(u,r,{acName:a,context:c},!i,i);let h=Me(u,{target:a,context:c,containerItemID:c});h.resourceType=A.PAGE;let E=Jt(a,h);return n.push(E),n}),x(()=>{M.resolveActionByID(e),v(n),n=[]}),ps())},fEe=[mEe],K7=fEe;var gEe=t=>{let e=0,n=[];return t.pipe(te(gE),x(o=>({actionMgrID:e}=o.payload,o.payload)),V(o=>{let{context:r,skipSemanticUrl:i=!1,dashboardID:s}=o,a="";i||(a=Nt(uf,{dashboardID:s}),a=a.replace("{dashboardID}",s));let{restApi:c,reqType:l}=F(uf,{dashboardID:s});return Y(k(c,{method:l},r)).pipe(x(u=>{let p={};return typeof u.data=="string"?p=JSON.parse(u.data):p=u.data,{response:{...p,key:a,semanticURL:a},actionConfig:o,skipSemanticUrl:i}}),fe(": Error occurred during ajax call at showPage Epic : ",o.context))}),V(async o=>{if(o&&o.type===ve)return n.push(pe(o)),n;let{actionConfig:r,skipSemanticUrl:i}=o,s=qt.getTargetViewContainerName(Un),a=X(s,r.context),c=rt(a,s,r.context),{response:l}=o,u=ze(l);u.directUrlUpdation=!i,await Pe(u,r,{acName:a,context:c},!i,i);let h=Me(u,{target:a,context:c,containerItemID:c});h.resourceType=A.PAGE;let E=Jt(a,h);return n.push(E)}),x(()=>{M.resolveActionByID(e),v(n),n=[]}),ps())},hEe=[gEe],J7=hEe;var yEe="Error occurred during ajax call at createObject Epic : ",Y7=(t,e)=>{let{class:n,context:o,viewType:r=mt.PAGE}=t,{removeActionPayload:i}=e,s=t?.pageName?t?.pageName:T.getDefaultCasePage();return Y(Ui.createCase(n,{...t,pageName:s,viewType:r,context:o})).pipe(x(({response:a,headers:c})=>(qe.analyseResponse(a),{response:a,actionInPayload:t,headers:c,removeActionPayload:i})),fe(yEe,o))};var Z7="CREATE_OBJECT";var SEe=(t,e)=>G.isExternalObject(t)&&e?e:Co(),EEe=t=>{let e=0,n=[],o={},r,i=100,s=!1;return t.pipe(te(Z7),bn(i),Yt(a=>{if({actionMgrID:e}=a.payload,G.isExternalObject(a.payload.class)&&!Fn(a.payload.context)){let c={type:A.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return M.rejectActionByID(e,!0,c),ye([])}return ye(a.payload).pipe(V(c=>{let{context:l}=c;r=c.class;let u=I1(c),p=X(u,l);return s=!1,Y(gc(p,{loadingContext:l})).pipe(V(({continueExecution:m,removeActionPayload:f,dirtyCheckPerformed:g})=>m?(s=g,Y7(c,{removeActionPayload:f})):(M.rejectActionByID(e),Tt)))}),V(async c=>{if(c&&c.type===ve)return c.payload.context=SEe(r,c.payload.context),n.push(pe(c)),n;let{actionInPayload:l,response:u,headers:p,removeActionPayload:m}=c,f=em(l,u);y.setIn(u.data,d.getProperty(d.CASE_INFO.IS_FIRST_ASSIGNMENT),!0);let g=I1({...l,isInCreateStage:f}),h=X(g,l.context),E=rt(h,g,l.context);if(aq(l,n),!s&&lq(g,h,r)){let{continueExecution:Ae}=await xt(h,{loadingContext:l.context});if(!Ae)return M.rejectActionByID(e),n}let C=l?.openCaseViewAfterCreate??!0;if(cq(C,f)){let{businessID:Ae,caseType:he,resolvedURL:Oe}=EA(u);return o={id:Ae,label:he,href:Oe},hc(o),Zp({caseId:Ae,caseType:he}),n}dq(l);let I=ze(u),_=String(ln($o(I))),P=fo(I),N=Dn(P,Es(I))||Nt(Si,{caseClassName:P}).replace(/{.+?}/,_);I.semanticURL=N,yt.setComponentCache(_,Ge.addDebugHeaders(l.debugInfo)),Qp(I,l),await Pe(I,l,{acName:h,context:E});let H=Xp(I),ne={target:h,context:E,headers:p,semanticURL:N,caseViewMode:H,containerItemID:E,isInCreateStage:f,isMinimizable:f,assignmentContext:y.getIn(I,Bo.NEXT_ASSIGNMENT_INFO_CONTEXT),nextAssignmentInfo:y.getIn(I,Bo.NEXT_ASSIGNMENT_INFO),resourceType:A.RESOURCE_TYPES.OBJECT,openCaseViewAfterCreate:l.openCaseViewAfterCreate,modalOptions:l.modalOptions,debugInfo:l.debugInfo};_i(ne,I);let j=Me(I,ne),oe=Jt(h,j);return uq(oe,{removeActionPayload:m,target:h},n),n.push(oe),n}),x(()=>(Or(n),St(n,e),setTimeout(()=>pq(r)),o={},n=[],n)))}))},Q7=EEe;var AEe="Error occurred during ajax call at executeObjectWideAction Epic : ",X7=(t,e)=>{let{assignmentID:n,actionID:o,caseID:r,context:i,additionalHeaders:s={},jsActionQueryParams:a}=t,{state$:c}=e,l=mt.PAGE,u=q2,p={assignmentID:n,actionID:o,viewType:l,objectID:r},{restApi:m}=F(u,p),{reqType:f}=F(u,p);l&&!m?.includes("viewType=")&&(m=m?.includes("?")?`${m}&viewType=${l}`:`${m}?viewType=${l}`),m=ed(a,m),t.viewType=l;let{content:g}=Mt(i,{isObjectWideAction:!0}),h=c.value.data[i]?.objectInfo?.headers||{},{etag:E}=h,C={"if-match":E,...s};return Y(k(m,{method:f,body:g,headers:C},i)).pipe(x(I=>{let{data:_,headers:P}=I;return qe.analyseResponse(I.data),{actionInPayload:t,response:_,headers:ke({...C,...P})}}),fe(AEe,i))};var CEe=(t,e)=>{let{isCaseWideAction:n}=e;return{isCaseWideAction:n,caseID:$o(t)}},eW=CEe;var{RESOURCE_TYPES:IEe}=A,_Ee=(t,e)=>{let n=0,o=[],r={},i="";return t.pipe(te(Vu),Yt(s=>{if({actionMgrID:n}=s.payload,i=s.payload.context,ht({context:i,stateObj:J(i),clearContextMessages:!0}),!Fn(i)){let a={type:A.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return M.rejectActionByID(n,!0,a),vt.handleDeferredActionCompletion(s.payload.context),ye([])}return ye(s.payload).pipe(V(a=>{cT(o,a);let c={...a};return X7(c,{state$:e})}),V(async a=>{if(a?.type===ve){let oe=pe(a);return o.push(oe),o}Vo.clearContextedCache(i);let{headers:c,actionInPayload:l,response:u}=a,{containerItemID:p,isModalAction:m,isInCreateStage:f}=l,g=re(p);l.target=g,y.setIn(u.data,d.OBJECT_INFO_IS_LOCAL_ACTION,!1),fT({submitResponse:u});let h=ze(u,{[A.STOPMERGEACTIONS]:!u.nextAssignmentInfo}),E=fo(h),C=Ye(l.context),I=Ke(C)[0]?se(Ke(C)[0]):C,_=Dj(h),P=f&&!_;m&&!f&&!Yl(l.context,I)&&(h=zA(h,J(p)));let N=Me(h,{headers:c,actionMgrID:n,directUrlUpdation:!1});$j(N.data,l),N.caseClassName=E,N.resourceType=IEe.ASSIGNMENT,N.headers=c;let z=!1,H=$o(h);_i(N,h);let ne=Dn(E,Es(h))||Nt(Si,{caseClassName:E}).replace(/{.+?}/,String(ln(H)));h.semanticURL=ne,N.semanticURL=ne,await dT(l,N,z,H,h,o,a,u,!0),P&&(r=uT(l),Zp({caseId:l.caseID,caseType:l.caseTypeID,assignmentId:l.assignmentID})),wj(a,o),vt.handleDeferredActionCompletion(i),pT(N,l,I);let j=eW(h,l);return IA({...j,containerItemID:p}),lT(o,{transientItemID:p,target:g,isModalAction:m}),o}),x(()=>{let a=o.find(c=>c.type===ve);return a?(vt.handleDeferredActionCompletion(i),mT(a),M.rejectActionByID(n)):M.resolveActionByID(n,r),Or(o),qe.setNeedsMapping(!1),o=[],r={},o}))}))},tW=_Ee;var bEe="Error occurred during ajax call at getObject Epic : ",nW=(t,e)=>{let{insKey:n,headers:o,context:r,debugInfo:i,viewType:s}=t,{removeActionPayload:a}=e,c=t.pageName?t.pageName:d.VIEW_NAMES.PY_DETAILS,l=F(Gn,{objectID:n,params:{pageName:c}}),{restApi:u}=l,{reqType:p}=l;return s==="none"&&(u=`${u?.split("viewType")[0]}viewType=none`),Y(k(u,{method:p,headers:{...o,...i&&{...Ge.addDebugHeaders(i)}}},r)).pipe(x(m=>(qe.analyseResponse(m.data),{response:m.data,actionInPayload:t,headers:ke({...o,...m.headers}),removeActionPayload:a})),fe(bEe,r))};var rW=async(t,e)=>{let{activateContainerActionPayload:{semanticURL:n,containerItemID:o},actionInPayload:r,actionInPayload:{context:i,skipBrowserSemanticUrlUpdate:s,doDeleteCaseSummary:a}}=e,c=Wt(Gn,r),l=X(c,i),u=de(o);await Pe({directUrlUpdation:!s,semanticURL:n},r,{acName:l,containerName:c,target:l,context:u}),t.push(B(pn,{containerItemID:o,target:l,context:u,doDeleteCaseSummary:a}))},oW=t=>{let e=$o(t),n=fo(t),o=Dn(n,Es(t));if(o)return o;let r=Nt(Gn,{objectClassName:n});return r=r?.replace("{objectID}",String(ln(e))),r};var iW="GET_OBJECT";var{RESOURCE_TYPES:sW}=A,TEe=async(t,e)=>{let{actionInPayload:n,activateContainerActionPayload:o,type:r,response:i,removeActionPayload:s,headers:a}=t,{context:c,skipBrowserSemanticUrlUpdate:l,debugInfo:u}=n,p=Wt(Gn,n),m=X(p,c);if(bA(r))await rW(e,{activateContainerActionPayload:o,actionInPayload:n});else{let g=rt(m,p,c,{buildNew:!0}),h=ze(i),E=oW(h);h.semanticURL=E,h.directUrlUpdation=!l,await Pe(h,n,{acName:m,context:g});let I=Me(h,{target:m,context:g,containerItemID:g,semanticURL:E,headers:a,debugInfo:u});I.caseViewMode=d.REVIEW_MODE,I.resourceType=sW.OBJECT,_i(I,h);let _=Jt(m,I);s.containerItemID&&yr(_)&&e.push(B(nt,{containerItemID:s.containerItemID,target:m})),e.push(_)}let f=n.insKey;_A({caseKey:f,actionInContext:c})},vEe=t=>{let e=0,n=[];return t.pipe(te(iW),x(o=>({actionMgrID:e}=o.payload,o.payload)),V(o=>{let{context:r,isChild:i,viewType:s}=o,a=Wt(Gn,o),c=X(a,r),l=s!=="none"?xt(c,{loadingContext:r}):Promise.resolve({continueExecution:!0,removeActionPayload:void 0});return Y(l).pipe(V(({continueExecution:u,removeActionPayload:p})=>{if(!u)return M.rejectActionByID(e),Tt;let{activate:m,activateContainerActionPayload:f}=_s(sW.OBJECT,c,o);return m&&!i&&s!=="none"?ye({type:mn,activateContainerActionPayload:f,actionInPayload:o}):nW(o,{removeActionPayload:p})}))}),V(async o=>{if(o&&Qe(o.type))return n.push(pe(o)),n;if(o?.actionInPayload?.viewType==="none"){if(J(o?.actionInPayload?.context)?.context_data?.caseViewMode!==d.PERFORM_MODE){let s={data:{...ze(o?.response)?.data},context:o?.actionInPayload?.context,isArrayDeepMerge:!0};n.push({type:Rr,payload:{context:s.context,doDeleteConfirmationDetails:!1}}),n.push(B(Ne,s));let a=re(o?.actionInPayload?.context),c=Qn(o?.actionInPayload?.context),l=Object.freeze({target:a,containerItemID:o?.actionInPayload?.context,context:o?.actionInPayload?.context,containerName:c});if(SA(o?.actionInPayload?.context)){let u=Me(o?.response,{...l});Lo({...u,isArrayDeepMerge:!0},n)}}}else await TEe(o,n);return n}),x(()=>(v(n),St(n,e),n=[],n)))},aW=vEe;var cW="OPEN_OBJECT_ACTION";var REe=(t,e,n,o)=>{let r,i,s=!1,a=In(t);return!Xn(t)||a&&!Wl(t,o)?(i=En(e,n),hr(e)&&(i=pr(n,i)),r=i,s=!0):(r=a?Vt(t,o):se(t),i=de(r)),{context:i,containerItemID:r,isNewContainerItem:s}},PEe=t=>t?d.PERFORM_MODE:d.REVIEW_MODE,NEe=t=>t?kt:dn,$1=t=>{let{actionID:e,caseID:n,context:o,openActionType:r,modalLoadingContainer:i}=t,s=mt.FORM,a=F(kE,{objectID:n,actionID:e,viewType:s}),{reqType:c}=a,{restApi:l}=a;t.actionType=d.RESOURCE_TYPES.OBJECT,l&&!l.includes("viewType=")&&(l=l.includes("?")?`${l}&viewType=${s}`:`${l}?viewType=${s}`);let u=i?.context??o;return Y(k(l,{method:c,headers:{}},u)).pipe(x(p=>(qe.analyseResponse(p.data),{response:p.data,actionInPayload:t,headers:ke(p.headers)})),fe(`: Error occurred during ajax call at ${r} Epic : `,u))},lW=async(t,e,{headers:n,actionInPayload:o})=>{let{context:r,actionName:i,openActionType:s,doDeleteCaseSummary:a,modalLoadingContainer:c}=o,l=ze(t,{info:A.OBJECT_INFO.OBJECT_INFO}),u=Wt(s,o),p=c?.target??X(u,r),{context:m,containerItemID:f,isNewContainerItem:g}=REe(p,u,r,t.data.objectInfo.ID);await Pe(l,o,{acName:p,target:p,containerName:u,context:m});let E=l.uiResources?.root,C=PEe(E),I=Me(l,{target:p,context:m,containerItemID:f,caseViewMode:C,doDeleteCaseSummary:a,headers:n,actionName:i,isMinimizable:!1,isInCreateStage:hr(u),resourceType:A.RESOURCE_TYPES.OBJECT,isProcessAction:o.isProcessAction,showProgress:o.showProgress,progressMessage:o.progressMessage,actionType:o.actionType});if(E&&_i(I,l),hr(u)&&delete I.doDeleteCaseSummary,e.push(B(NEe(g),I)),g||e.push(B(Bs,I)),g){let _=Ke(o.contextName),P=Vt(_,t.data.objectInfo.ID);if(P){let N={data:{objectInfo:{headers:n}},context:P};e.push(B(Ne,N))}}return f!==se(p)&&e.push(B(pn,{target:p,containerItemID:f})),SA(f)&&!c?.context&&Lo(I,e),e};var OEe=t=>{if(t.openActionType=kE,Wt(t.openActionType,t)===d.MODAL){let n=Wt(t.openActionType,t),o=X(n,t.context),r=pr(t.context,En(n,t.context));return v(kt({target:o,context:r,containerItemID:r,key:t.caseID,caseViewMode:d.PERFORM_MODE,actionName:t.name,showProgress:!0,root:{type:"reference",config:{context:d.getProperty(d.CASE_INFO.CASE_INFO_CONTENT),type:"view"}},data:{key:t.caseID,objectInfo:{ID:t.caseID}}})),v(oS({context:r})),t.modalLoadingContainer={target:o,context:r},$1(t)}return $1(t)},uW=OEe;var xEe=t=>{let e=0,n=[];return t.pipe(te(cW),x(o=>({actionMgrID:e}=o.payload,o.payload)),V(o=>uW(o)),V(async o=>{if(Qe(o.type)){let c=pe(o);return n.push(c),J(o.payload.context)?.context_data?.isLoading&&n.push(B(Bs,o.payload)),n}let{actionInPayload:r,headers:i,response:s}=o,{actionID:a}=r;return y.setIn(s,"data.objectInfo.activeActionID",a),y.setIn(s.data,d.getProperty(d.OBJECT_INFO_IS_LOCAL_ACTION),!0),r.refreshConditions&&y.setIn(s.data,d.getProperty(d.CASE_INFO_REFRESH_CONDITIONS),r.refreshConditions),await lW(s,n,{headers:i,actionInPayload:r}),gT(r),n}),x(()=>(v(n),St(n,e),n=[],n)))},dW=xEe;var w1=t=>{let{containerName:e,isInCreateStage:n}=t;return n?d.MODAL:e||qt.getTargetViewContainerName(Ea)};var DEe="Error occurred during ajax call at createObject Epic : ",pW=(t,e)=>{let{class:n,context:o,viewType:r=mt.PAGE}=t,{removeActionPayload:i}=e,s=t?.pageName?t?.pageName:T.getDefaultCasePage();return Y(Ui.createCase(n,{...t,pageName:s,viewType:r,context:o,retrieveActionViewForNewObject:!0})).pipe(x(({response:a,headers:c})=>(qe.analyseResponse(a),{response:a,actionInPayload:t,headers:c,removeActionPayload:i})),fe(DEe,o))};var mW="CREATE_EXTERNAL_OBJECT";var $Ee=t=>{let e=0,n=[],o=!1;return t.pipe(te(mW),bn(100),x(i=>({actionMgrID:e}=i.payload,i.payload)),V(i=>{let{context:s}=i,a=w1(i),c=X(a,s);return o=!1,Y(gc(c,{loadingContext:s})).pipe(V(({continueExecution:l,removeActionPayload:u,dirtyCheckPerformed:p})=>l?(o=p,pW(i,{removeActionPayload:u})):(M.rejectActionByID(e),Tt)))}),V(async i=>{if(i&&i.type===ve)return i.payload.context=Co(),n.push(pe(i)),n;let{actionInPayload:s,response:a,headers:c,removeActionPayload:l}=i,u=em(s,a);y.setIn(a.data,d.getProperty(d.CASE_INFO.IS_FIRST_ASSIGNMENT),!0);let p=w1({...s,isInCreateStage:u}),m=X(p,s.context),f=rt(m,p,s.context);if(!o&&!hr(p)&&Rt(m)){let{continueExecution:z}=await xt(m,{loadingContext:s.context});if(!z)return M.rejectActionByID(e),n}let g=ze(a),h=fo(g),E=Dn(h,Es(g))||Nt(Ea,{caseClassName:h}).replace(/{.+?}/,String(ln($o(g))));g.semanticURL=E,Qp(g,s),await Pe(g,s,{acName:m,context:f});let I=Xp(g),_={target:m,context:f,headers:c,semanticURL:E,caseViewMode:I,containerItemID:f,isInCreateStage:u,isMinimizable:u,assignmentContext:y.getIn(g,Bo.NEXT_ASSIGNMENT_INFO_CONTEXT),nextAssignmentInfo:y.getIn(g,Bo.NEXT_ASSIGNMENT_INFO),resourceType:A.RESOURCE_TYPES.OBJECT,openCaseViewAfterCreate:s.openCaseViewAfterCreate,modalOptions:s.modalOptions,debugInfo:s.debugInfo,isExternalObjectCreationFlow:!0};_i(_,g);let P=Me(g,_),N=Jt(m,P);return yr(N)&&bi(n,{removeActionPayload:l,target:m}),n.push(N),n}),x(()=>(Or(n),St(n,e),n=[],n)))},fW=$Ee;var gW=t=>{let{workId:e,context:n,isExternalCase:o}=t,r=o?df:K2,{restApi:i,reqType:s}=F(r,{ID:e});return Y(k(i,{method:s},n)).pipe(x(a=>({response:a.data,actionInPayload:t,headers:ke(a.headers)})),fe("Error occurred during ajax call at deleteWork Epic : ",n))};var hW=t=>{w.publish(d.PUB_SUB_EVENTS.WORK_EVENTS.WORK_DELETED,t)};var wEe=t=>{let e=0,n,o=[];return t.pipe(te(bw),x(r=>({actionMgrID:e,caseTypeID:n}=r.payload,r.payload)),V(r=>{if(!r.skipDeleteConfirmation&&!r.ignoreWorkDeletion){let i=Ee.MODAL,s=X(i,r.context),a=pr(r.context,En(i,r.context));return v([B(kt,{target:s,context:a,containerItemID:a,containerName:i,isDeleteConfirmation:!0,actionName:"Delete",workId:r.workId,caseTypeID:n,className:r.className,keys:r.keys,...r.enableBackNavigation&&{enableBackNavigation:!0},data:{caseInfo:{caseTypeID:n}}})]),M.resolveActionByID(e),Tt}return r.ignoreWorkDeletion?ye({actionInPayload:r}):gW(r)}),V(async r=>{if(r&&Qe(r.type)){let{payload:a}=r;return o.push(pe({...r,...a,actionMgrID:e})),o}let{actionInPayload:i}=r,{context:s}=i;if(hc({content:zn().getLocaleValue("Deleted successfully!","Messages")}),s?.includes(d.PREVIEW)&&o.push(B(cl,al({context:d.APP.APP,name:d.PREVIEW}))),s?.includes(d.MODAL)){let a=Ee.MODAL,c=X(a,s);Ze(c,s)?.enableBackNavigation&&window?.history?.back()}return o}),x(()=>(v(o),St(o,e)===d.PROMISE_VALUE.RESOLVE&&hW({caseTypeID:n}),o=[],o)))},yW=wEe;var MEe=[Q7,aW,tW,dW,fW,yW],SW=MEe;var EW=L8(...FG,...U7,...z7,...q7,...G7,...VG,...W7,...K7,...J7,...SW);var kEe=new Set([bt,Ht,tt,st,pa,ma,gi]),LEe=()=>t=>e=>{let{type:n="",payload:o={}}=e||{},{category:r,context:i,transientItemID:s}=o;if(r==="HTTP"||!kEe.has(n)){t(e);return}FA(i||s),be.removeContextTreeNode(i||s),(n===bt||n===tt)&&o?.target?.indexOf("modal")!==-1&&w.publish(A.PUB_SUB_EVENTS.PEGA_EMBED_CUSTOM,n),t(e)},AW=LEe;var Xl={},UEe=new Set([bt,Pn,yi,st,tt]),CW=t=>(Xl[t]||(Xl[t]={}),Xl[t]),zEe=(t,e,n)=>{let o=CW(t),r=CW(d.CONTEXT),i=o[e]??[];o[e]=[...new Set([...i,n])];let s=r[n]??[];r[n]=[...new Set([...s,e])]},jEe=(t,e)=>{let n=e.lastIndexOf("_"),o=n>-1?e.slice(0,n):e,r=Xl[o],i=r?.[e];if(i){let s=i.indexOf(t);s>-1&&i.splice(s,1)}return i&&i.length>0?null:(r&&(delete r[e],Object.keys(r).length===0&&delete Xl[o]),{dataPageName:o,dataPageNameWithHash:e})},M1=t=>{if(!t)return;let e=Xl[d.CONTEXT],o=(e?.[t]??[]).map(r=>jEe(t,r)).filter(r=>!!r);e&&(delete e[t],Object.keys(e).length===0&&delete Xl[d.CONTEXT]),o.length>0&&v(NM({dataPagesToBeRemoved:o}))},IW=(t={},e)=>{e&&Object.keys(t).forEach(n=>{let o=t[n];Object.keys(o??{}).forEach(r=>{zEe(n,r,e)})})};var FEe=(t,e)=>{e&&e.length>0&&(t===st||t===tt)&&e.forEach(n=>{M1(n)})},VEe=(t,e)=>{let{data:n={},context:o=null,childContainersContexts:r=[]}=e??{};if(FEe(t,r),t===bt||t===Pn||t===yi){let i=t===yi?n:n.shared;IW(i,o);return}if(t===st){M1(o),IW(n.shared,o);return}t===tt&&M1(o)},BEe=()=>t=>e=>{(Array.isArray(e)?e:[e]).forEach(o=>{let r=o?.type;UEe.has(r)&&VEe(r,o?.payload)}),t(e)},_W=BEe;var{PUB_SUB_EVENTS:bW}=A,HEe=new Set([tt,st]),GEe=(t,e,n,o,r,i)=>{let s=t.getState(),{resourceType:a,key:c,context:l}=y.getIn(s,["containers",e,"items",n])||{},u=y.getIn(s,["data",l,d.CONTEXT_DATA,"initiatingContext"]),p={resourceType:a,key:c,context:l,containerItemID:n,...u&&{initiatingContext:u},...o!==void 0?{eventName:o}:{}};w.publish(bW.CONTAINER_EVENTS.CLOSE_CONTAINER_ITEM,p),e===`${A.APP.APP}/${d.PRIMARY}`&&i===d.CONTAINER_TYPE.MULTIPLE&&w.publish(bW.CONTAINER_EVENTS.CLOSE_MULTI_TYPE_PRIMARY_CONTAINER_ITEM,{key:c,newAccessedOrder:r})},qEe=(t,e)=>{e&&e.length>0&&(t===st||t===tt)&&e.forEach(n=>{n&&Wy.cleanCaches(n)})},WEe=t=>e=>n=>{let o=r=>{if(!HEe.has(r.type))return;let{type:i,payload:{target:s,containerItemID:a,context:c,deleteContext:l,childContainersContexts:u=[],containerInfo:{newAccessedOrder:p,containerType:m}={newAccessedOrder:new Array,containerType:""},eventName:f}={}}=r;i===tt&&GEe(t,s,a,f,p,m),qEe(i,u),c&&(i===st||i===tt&&l)&&Wy.cleanCaches(c)};Array.isArray(n)?n.forEach(o):o(n),e(n)},TW=WEe;var KEe=t=>t===`${d.APP.APP}/${d.PRIMARY}`,JEe=new Set([bt,st,tt]),k1=t=>t===`${d.APP.APP}/${d.MODAL}`,YEe=(t,e,n,o,r)=>{t&&e&&(k1(r)?Fj({caseId:t,caseClass:n,context:o||""}):zj({caseId:t,caseClass:n,context:o||""}))},ZEe=(t,e)=>{t&&(k1(e)?Vj({caseId:t,caseClass:"",context:""}):jj({caseId:t}))},QEe=()=>t=>e=>{if(!e||typeof e!="object"||!("type"in e)||typeof e.type!="string"||!JEe.has(e.type)){t(e);return}let{type:n}=e,{payload:o}=e,{target:r,key:i,context:s,data:a}=o||{};if(KEe(r)||k1(r)){let c=a?.caseInfo?.ID,l=s||"",u=ie(d.CASE_INFO.CASE_INFO_ID,"",l)||"",p=a?.caseInfo?.caseTypeID||"";if((n===st||n===tt)&&ZEe(u,r),n===bt||n===st){t(e),YEe(i,!!c,p,l,r);return}}t(e)},vW=QEe;var XEe=new Set([bt,Ht,st,tt,No]),eAe=()=>t=>e=>{if(!e||!XEe.has(e.type)){t(e);return}let{payload:{context:n=null,transientItemID:o=null,clearStateMachine:r=!0}={},type:i}=e;n&&(i===bt||i===Ht||i===st||i===tt)&&r&&(If(n),Af(n)),o&&i===No&&(If(o),Af(o)),t(e)},RW=eAe;var tAe=new Set([bt,st,tt,Ht]),om=t=>typeof t=="object"&&t!==null,nAe=t=>om(t)&&typeof t.context=="string",rAe=t=>({context:t.context,data:om(t.data)?t.data:{},resourceType:typeof t.resourceType=="string"?t.resourceType:"",caseID:typeof t.caseID=="string"?t.caseID:void 0}),oAe=t=>om(t)&&typeof t.type=="string",NW=t=>t?.toString().includes(d.MODAL)??!1,Yi=t=>y.getIn(t,d.CASE_INFO.ASSIGNMENT_ID),yS=t=>y.getIn(t,["caseInfo","ID"]),PW=t=>{if(!t)return;let e=J(t);return om(e)?e:void 0},iAe=(t,e,n,o)=>{let r=yS(e),i=Yi(e);!r||!i||r===n&&i===o||id({actionInContext:t,assignmentID:i,caseKey:r})},sAe=(t,e,n,o)=>{if(t===tt){id(o);return}(t===Ht||t===st)&&iAe(e,n,o.caseKey,o.assignmentID),Of(o)},OW=t=>{let e=Object.keys(It.subscribers);for(let n=0;n<e.length;n+=1){let o=e[n],r=It.subscribers[o],{matcher:i,criteria:s}=r.filter;i==="COACH_UPDATE"&&s?.caseId===t&&It.unsubscribe(o)}},aAe=(t,e,n)=>{if(n===d.RESOURCE_TYPES.ASSIGNMENT){let o=Yi(e),r=y.getIn(e,["caseInfo","ID"]);if(o&&r)return{actionInContext:t,assignmentID:o,caseKey:r}}else if(n===d.RESOURCE_TYPES.CASE&&t?.includes("workarea")){let o=y.getIn(e,["caseInfo","ID"]),r=Yi(e);if(o&&r)return{actionInContext:t,assignmentID:r,caseKey:o}}},cAe=(t,e,n)=>{if(n!==d.RESOURCE_TYPES.ASSIGNMENT)return;let o=J(t),r=Yi(o),i=Yi(e),s=yS(e)??yS(o);if(r&&r!==i&&s&&id({actionInContext:t,assignmentID:r,caseKey:s}),i&&s)return{actionInContext:t,assignmentID:i,caseKey:s}},lAe=(t,e)=>{if(t?.includes("workarea")){let n=Yi(J(t));n&&id({actionInContext:t,assignmentID:n,caseKey:e})}else OW(e)},uAe=(t,e,n,o)=>{if(t?.includes("workarea")){let r=Yi(J(t));r&&id({actionInContext:t,assignmentID:r,caseKey:o})}else OW(o);if(n===d.RESOURCE_TYPES.ASSIGNMENT){let r=Yi(e);if(r)return{actionInContext:t,assignmentID:r,caseKey:o}}},dAe=(t,e)=>{let n=om(t.payload)?t.payload:void 0;if(!n||!NW(n.target))return!1;let o=typeof n.context=="string"?n.context:void 0,r=om(n.data)?n.data:void 0,i=typeof n.caseID=="string"?n.caseID:void 0,s=typeof n.assignmentID=="string"?n.assignmentID:void 0,a=PW(o);e(t);let c=t.type===tt?a:PW(o),l=i??yS(r)??yS(c),u=s??Yi(r)??Yi(c);if(!o||!l||!u)return!0;let p={actionInContext:o,assignmentID:u,caseKey:l};return sAe(t.type,o,a,p),!0},pAe=(t,e)=>{if(NW(e.target))return;let{context:n,data:o,resourceType:r,caseID:i}=e;if(t===bt)return aAe(n,o,r);if(t===Ht)return cAe(n,o,r);if(t===tt&&i){lAe(n,i);return}if(t===st&&i)return uAe(n,o,r,i)},mAe=()=>t=>e=>{if(!oAe(e)||!tAe.has(e.type)){t(e);return}let{type:n,payload:o}=e;if(dAe(e,t))return;let r;nAe(o)&&(r=pAe(n,rAe(o))),t(e),r&&Of(r)},xW=mAe;var DW=new Set([Ko,os,hE,T2,is,ZT]),fAe=new Set([bt,st,Ht,tt,YT,ls,Fr,Oo,...DW]),gAe=(t,e)=>t===is?e.saveActionPayload?.containerItemID:t===ZT?e.saveContainerItemID??e.context:e.containerItemID??e.context,hAe=(t,e)=>{if(!_H(e))return!1;let n=e.containerItemID||t,o=e.target||re(n),r=Ze(o,n),i=e.resourceType||r?.resourceType,s=e.key||r?.key;return i===d.RESOURCE_TYPES.ASSIGNMENT&&!!s},yAe=(t,e,n)=>{t===bt||t===st||t===Ht&&e.data?(Vs(n)&&pb(n),t===st&&R0(n),hAe(n,e)&&TH(n,{containerName:e.containerName??""})):t===tt&&(Vs(n)&&pb(n),R0(n))},SAe=(t,e)=>{if(t!==tt||!e.includes(d.MODAL))return;let n=Yo(e),o=`${n}/`;for(let r of RH())(r===n||r.startsWith(o))&&NH(r)},EAe=(t,e)=>{if(e.context){if(t===Fr){dA(e.context,null),Bp(e.context);return}t===Oo&&!e?.isDefault&&!e?.skipDirtyValidation&&Bp(e.context)}},AAe=(t,e,n)=>{if(t===YT){e.autosave||mb(n);return}if(t===ls){PH(n);return}DW.has(t)&&mb(n)},CAe=t=>typeof t=="object"&&t!==null,IAe=()=>t=>e=>{if(e&&typeof e=="object"&&"type"in e&&"payload"in e&&typeof e.type=="string"&&fAe.has(e.type)&&CAe(e.payload)){let{type:n,payload:o}=e,r=gAe(n,o);r&&(SAe(n,r),yAe(n,o,r),Vs(r)&&(EAe(n,o),AAe(n,o,r)))}t(e)},$W=IAe;var wW=U8(),_Ae=t=>{if(we()!==null){js();return}let e=[kH.propertyChangeMiddleware,AW,_W,RW,wW,xW,$W,vW,TW],n=aG({reducer:OG(t),middleware:o=>o({serializableCheck:!1,thunk:!1}).concat(e),enhancers:o=>o().prepend(e1).concat(e1)});wW.run(EW),hM(n)},eu=_Ae;var bAe=["ar","arc","ckb","dv","fa","ha","he","khw","ks","ps","ur","yi"],L1=t=>bAe.includes(t.split("-")[0])?"rtl":"ltr";async function TAe(t){if(!t)return;let e=T.getLocale();T.setLocale(t);let n=T.getLocale();if(!(!n||n===e)){if(hb(["lang"]),typeof window<"u"){let o=new URL(window.location.href);o.searchParams.set("lang",n),window.history.replaceState(window.history.state,"",o.toString())}T.isInfinityRuntime()&&await Us.loadLocaleBundle([n]),await qp(n),typeof document<"u"&&(document.documentElement.lang=n,document.documentElement.dir=L1(n)),v({type:zu,payload:{locale:n}}),w.publish(d.PUB_SUB_EVENTS.EVENT_LOCALE_CHANGED,{locale:n,previousLocale:e})}}var MW=TAe;var vAe={"RULE-UI-VIEW":"VIEW","RULE-OBJ-PROPERTY":"FIELD","RULE-OBJ-WHEN":"WHEN"},RAe="AI_ASSISTANT",PAe=["VIEW","FIELD","WHEN"],z1="UIDesignerRuleRefresh",tu=new Map,CT=[],kW=!1,Zi=t=>t.replace(/^\./,"").replace(/\[\d+\]/g,"").toUpperCase(),im=t=>t.trim().toUpperCase(),NAe=t=>{let n=t.trim().replace(/\s+#.*$/,"").trim().split(/\s+/);if(n.length<3)return null;let[o,r,...i]=n;return{type:vAe[o]||o,className:r,name:i.join(" ")}},OAe=t=>{let e=t.ruleInsKeys??t.RuleInsKeys,n=[];if(Array.isArray(e))n=e;else if(typeof e=="string")try{let o=JSON.parse(e);n=Array.isArray(o)?o:[e]}catch{n=e.split(",")}return n.filter(o=>typeof o=="string"&&o.trim().length>0).map(NAe).filter(o=>o!==null)},AT=t=>{let e=se(t),n=Qt(t);return!e||!n?null:{containerItemID:e,context:n}},j1=()=>{let t=Co(),e=`${t}/primary`,n=AT(e),o=AT(`${t}/modal`),r=o?[o]:[],i=[],s=n?AT(`${n.containerItemID}/workarea`):null;s?i.push(s):n&&i.push(n);let a=l=>{let u=`${l}/modal`;if(!Ke(l).includes(u))return;let p=AT(u);p&&(r.push(p),a(p.containerItemID))};o&&a(o.containerItemID),n&&a(n.containerItemID),s&&a(s.containerItemID);let c=new Set;return[...i,...r].filter(({context:l})=>c.has(l)?!1:(c.add(l),!0))},UW=t=>{let e=t;for(;e instanceof uo;){if(e.type==="PAGE")return e;e=e.parent}return null},IT=(t,e)=>{let n=e.props.pageReference||UW(e)?.name;return n?Q.resolveClassID(".classID",n,t):null},LW=(t,e)=>{let n=[],o=r=>{e.includes(r.type)&&n.push(r),r.children.forEach(o)};return t.children.forEach(o),n},xAe=t=>{let e=be.getContextNode(t);if(!e)return{views:[],fields:[],whens:[]};let{FIELD:n,DECLARATIVE_TARGET:o,VIEW:r,WHEN:i}=d.CONTEXT_TREE_NODE_TYPES,{references:s}=e,a=[...s.get(n)?.values()??[],...s.get(o)?.values()??[]].filter(u=>u instanceof uo),c=[...LW(e,[n,o]),...a],l=[...s.get(i)?.values()??[]].filter(u=>u instanceof sA);return{views:LW(e,[r]),fields:[...new Set(c)],whens:l}},DAe=(t,e,n)=>{if(!e.name||Zi(e.name)!==Zi(n.name))return!1;let o=IT(t,e);return!!o&&im(o)===im(n.className)},$Ae=(t,e,n)=>{if(Zi(e.name).split(".").pop()!==Zi(n.name))return!1;let r=IT(t,e);return!!r&&im(r)===im(n.className)},wAe=(t,e,n)=>{let o=n.whens.filter(i=>Zi(i.name)===Zi(e.name)&&i.props.context===t),r=[];return o.forEach(i=>{i.subType===d.CONTEXT_TREE_NODE_TYPES.VIEW?r.push(...n.views.filter(s=>Zi(s.name)===Zi(i.referenceName)&&UW(s)?.name===i.props.pageReference)):r.push(...n.fields.filter(s=>{let a=[i.props.pageReference,i.referenceName].filter(Boolean).join(".");return Zi(s.name)===Zi(a)}))}),r.filter(i=>im(IT(t,i)||"")===im(e.className))},MAe=(t,e)=>{let n=xAe(t);return e.flatMap(o=>o.type==="VIEW"?n.views.filter(r=>DAe(t,r,o)):o.type==="FIELD"?n.fields.filter(r=>$Ae(t,r,o)):o.type==="WHEN"?wAe(t,o,n):[])},kAe=t=>{let e=t;for(;e instanceof uo;){if(e.type===d.CONTEXT_TREE_NODE_TYPES.VIEW)return e;e=e.parent}return null},LAe=t=>{let e=[],n=t;for(;n instanceof uo;)n.type===d.CONTEXT_TREE_NODE_TYPES.VIEW&&e.push(n),n=n.parent;return e},UAe=t=>{let e=new Set(t);if(e.size===0)return[];let n=Array.from(e,LAe),o=n[0].find(r=>n.every(i=>i.includes(r)));return o?[o]:n.filter(([,...r])=>!r.some(i=>e.has(i))).map(([r])=>r)},zAe=(t,e)=>{let n=e.map(kAe).filter(r=>r!==null);return UAe(n).map(r=>({context:t,viewName:r.name,className:IT(t,r)||""})).filter(({viewName:r})=>r.length>0)},zW=({context:t,className:e,viewName:n})=>`${t}|${e}|${n}`,jW=t=>{let e=new Map;return t.forEach(n=>{e.set(zW(n),n)}),[...e.values()]},FW=async t=>{let e=zW(t);if(tu.has(e)){tu.set(e,!0);return}tu.set(e,!1);try{await t0(t.viewName,t.className,t.context)}catch(n){console.error("[UI Designer rule refresh] Failed to refresh common parent view.",t,n)}finally{let n=tu.get(e);tu.delete(e),n&&en.uiDesignerEnabled&&j1().some(({context:o})=>o===t.context)&&FW(t)}},VW=t=>{jW(t).forEach(e=>{FW(e)})},jAe=t=>{if(typeof t.userId!="string")return!1;let e=T.getOperatorIdentifier();return typeof e=="string"&&t.userId.trim().toLowerCase()===e.trim().toLowerCase()},FAe=t=>{let e=jW(t);e.length!==0&&w.publish(d.PUB_SUB_EVENTS.UI_EVENTS.UI_DESIGNER_RULE_REFRESH_AVAILABLE,{targets:e})},VAe=t=>{if(!en.uiDesignerEnabled||typeof t!="object"||t===null)return;let e="targets"in t&&Array.isArray(t.targets)?t.targets:[],n=new Set(j1().map(({context:r})=>r)),o=e.filter(r=>typeof r=="object"&&r!==null&&"context"in r&&typeof r.context=="string"&&n.has(r.context)&&"className"in r&&typeof r.className=="string"&&"viewName"in r&&typeof r.viewName=="string");VW(o)},BAe=(t,e)=>{if(!en.uiDesignerEnabled)return;let n=t?.message??{},o=OAe(n).filter(({type:i})=>i===e),r=j1().flatMap(({context:i})=>zAe(i,MAe(i,o)));jAe(n)?VW(r):FAe(r)},HAe=()=>{CT.length>0||(CT=PAe.map(t=>{let e=`${z1}_${t}`;return It.subscribe({matcher:RAe,criteria:{ruleType:t}},n=>BAe(n,t),void 0,e),e}))},U1=t=>{t?HAe():(tu.forEach((e,n)=>tu.set(n,!1)),CT.forEach(e=>{It.unsubscribe(e)}),CT=[])},BW=()=>{if(kW){U1(en.uiDesignerEnabled);return}kW=!0,w.subscribe(d.PUB_SUB_EVENTS.UI_EVENTS.UI_DESIGNER,U1,z1),w.subscribe(d.PUB_SUB_EVENTS.UI_EVENTS.UI_DESIGNER_RULE_REFRESH_REQUESTED,VAe,`${z1}_RefreshRequest`),U1(en.uiDesignerEnabled)};var GAe=t=>typeof t!="object"||t===null||Array.isArray(t)?!1:Object.values(t).every(e=>typeof e=="string"),F1=class{#e(e,n,o,r,i){let s=!1;return e.IncludeInURL&&n!==void 0&&(r[e.Key]=n,e.Key==="portal"&&n!==o&&(s=!0)),Array.isArray(e.IncludeInHeaders)&&n!==void 0&&e.IncludeInHeaders.forEach(a=>{i[a.Value]||(i[a.Value]=[]),i[a.Value].push(`${e.Key}=${n}`)}),s}#t(e,n,o){let r={},i={},s=!1;return Array.isArray(e)&&e.forEach(a=>{let c=n[a.Key];this.#e(a,c,o,r,i)&&(s=!0)}),{urlParams:r,headerMap:i,isPortalChanged:s}}#n(e){let n=yt.getComponentCache("lastActionID"),o=tl.truncateNamespace(e),r=tl.truncateNamespace(typeof n=="string"?n:(n??"").toString());return o===r}#r({message:e}){let{RequestContext:n,ActionName:o}=e;if(!this.#n(o))return;let r=JSON.parse(n);if(!GAe(r))throw new TypeError("RequestContext must be a JSON object with string values.");let i=r,s=T.environmentInfoObject?.requestContext,c=(typeof globalThis.location?.href=="string"?new URL(globalThis.location.href):null)?.searchParams.get("portal")??null,{urlParams:l,headerMap:u,isPortalChanged:p}=this.#t(s,i,c);yt.setURLParams(l),w.publish(d.PUB_SUB_EVENTS.EVENT_REQUEST_CONTEXT_CHANGED,i),Object.entries(u).forEach(([m,f])=>{let h=Ge.getRegisteredHeaders()[m]?.split(";").map(C=>C.trim())||[],E=new Map;[...h,...f].forEach(C=>{let I=C.indexOf("=");I!==-1&&E.set(C.slice(0,I),C)}),Ge.registerHeader(m,[...E.values()].join("; "))}),yt.setComponentCache("lastActionID",""),p&&globalThis.location&&globalThis.location.reload()}subscribeToInfinityGlobalEvents(){BW()}subscribeToGlobalEvents(){let e=y.generateUniqueID(),o={matcher:"SWITCH_REQUEST_CONTEXT",criteria:{UserID:T.getOperatorIdentifier()||""}};It.subscribe(o,this.#r.bind(this),void 0,e)}},V1=new F1;var HW="displaySaveAssignmentBrowserNotification",B1=!1,GW=t=>{B1||(w.subscribe(d.PUB_SUB_EVENTS.CASE_EVENTS.SAVE_ASSIGNMENT_COMPLETE,e=>{t("Save Assignment",e)},HW),B1=!0)},qW=()=>{w.unsubscribe(d.PUB_SUB_EVENTS.CASE_EVENTS.SAVE_ASSIGNMENT_COMPLETE,HW),B1=!1};var SS=()=>{if(!(typeof globalThis>"u"))return globalThis.Notification},H1=()=>{let t=T?.environmentInfoObject;return t?.features?.pyEnableBrowserNotifications===!0||t?.pyFeatures?.pyEnableBrowserNotifications===!0},qAe=()=>typeof document>"u"?"visible":document.visibilityState,_T=()=>typeof window<"u"&&typeof document<"u",WW=t=>{if(!t||typeof window>"u")return!1;try{return new URL(t,window.location.origin).origin===window.location.origin}catch{return!1}},G1=!1,Ws={initialize(){!_T()||G1||!H1()||(GW(Ws.notifyFromEvent),G1=!0,SS()?.permission==="default"&&Ws.requestPermission().catch(()=>{}))},destroy(){qW(),G1=!1},async requestPermission(){if(!_T()||!H1())return"denied";let t=SS();if(!t)return"denied";if(t.permission!=="default")return t.permission;let e=t.requestPermission(),n=await Promise.resolve(e);try{Object.defineProperty(t,"permission",{configurable:!0,value:n})}catch{}return n},canShowNativeNotifications(){if(!_T()||!H1())return!1;let t=SS();return!!(t&&t.permission==="granted")},notify(t){if(!_T()||!Ws.canShowNativeNotifications()||t.notifyWhenVisible===!1&&qAe()==="visible")return null;let e=SS();if(!e)return null;let n=t.href??(t.caseTypeID&&(t.caseId||t.caseID)?td.getSemanticURLForToaster(t.caseTypeID,t.caseId??t.caseID??"",void 0,void 0,void 0,t.businessID):void 0),o=WW(n)?n:void 0,r=t.title??t.label??t.caseTypeName??"Notification",i=t.body??t.caseId??t.caseID??t.caseTypeName??"",s=t.tag??t.caseId??t.caseID??t.caseTypeID??r,a=new e(r,{body:i,tag:s,icon:t.icon,silent:t.silent,requireInteraction:t.requireInteraction,data:{...t.data,href:o}});return a.addEventListener("click",()=>{Ws.openNotificationTarget(o),a.close()}),a},async showNotification(t){let e=SS();return e?.permission==="granted"?Ws.notify(t):e?.permission==="denied"||await Ws.requestPermission()!=="granted"?null:Ws.notify(t)},openNotificationTarget(t){WW(t)&&(window.focus(),window.location.assign(t))},notifyFromEvent(t,e){let n={...e,title:e.title??t,body:e.assignmentID?`Assignment ${e.assignmentID} has been saved.`:e.body};Ws.showNotification(n).catch(()=>{})}},bT=Ws;var WAe=()=>{w.publish(d.PUB_SUB_EVENTS.BOOTSTRAP_SHELL_EVENTS.CONSTELLATION_LOADED,{})},KW={publishConstellationLoadedEvent:WAe};var q1=class{activateContainerItemOnSwitch(e){let n=`${d.APP.APP}/${d.PRIMARY}`,o=Vt(n,e),r={target:n,containerItemID:o};ct({}).getPConnect().getContainerManager().activateContainerItem(r)}removeContainerItemOnClose(e){let n=`${d.APP.APP}/${d.PRIMARY}`,o=Vt(n,e),r={target:n,containerItemID:o};ct({}).getPConnect().getContainerManager().removeContainerItem(r)}showCasePreview(e,n){let r=ct({meta:{type:"PreviewViewContainer",config:{name:d.PREVIEW}},options:{context:d.APP.APP,target:"root/hybrid_preview"}});r.getPConnect().getContainerManager().resetContainers({name:d.PRIMARY,context:d.APP.APP}),By(d.APP.APP,d.PREVIEW)||r.getPConnect().getContainerManager().initializeContainers({type:"multiple",name:d.PREVIEW}),r.getPConnect().getActionsApi().showCasePreview(e,{caseClassName:n})}closeCasePreview(){ct({}).getPConnect().getContainerManager().resetContainers({name:d.PREVIEW,context:d.APP.APP})}isFormDirty(e){let n=`${d.APP.APP}/${d.PRIMARY}`,o=z0(n,e);return Sr.isStateModified(o)}getEventUtils(){return KW}getBroadcastUtils(){return Yp}isTraditionalUICase(e){return Wr(e)}isTraditionalUIDataObject(e){return xf(e)}},ES=new q1;var W1=class{static openCase(e,n=A.APP.APP,o={}){return o.renderInline=!0,o.pageName?(T.setDefaultCasePage(O.getDefaultQualifiedName(o.pageName)),o.pageName=O.getDefaultQualifiedName(o.pageName)):(T.setDefaultCasePage(O.getDefaultQualifiedName(d.PY_DETAILS)),o.pageName=O.getDefaultQualifiedName(d.PY_DETAILS)),o?.disableAssignmentHeader?T.disableAssignmentHeader(o.disableAssignmentHeader):T.disableAssignmentHeader(!1),Nr.openCase(e,n,d.PRIMARY,o)}static createCase(e,n=A.APP.APP,o={}){return o.renderInline=!0,o.pageName?(T.setDefaultCasePage(O.getDefaultQualifiedName(o.pageName)),o.pageName=O.getDefaultQualifiedName(o.pageName)):(T.setDefaultCasePage(O.getDefaultQualifiedName(d.PY_DETAILS)),o.pageName=O.getDefaultQualifiedName(d.PY_DETAILS)),o?.disableAssignmentHeader?T.disableAssignmentHeader(o.disableAssignmentHeader):T.disableAssignmentHeader(!1),Nr.createCase(e,n,d.PRIMARY,o)}static getNextWork(e=A.APP.APP,n={}){return n.renderInline=!0,n.pageName?(T.setDefaultCasePage(O.getDefaultQualifiedName(n.pageName)),n.pageName=O.getDefaultQualifiedName(n.pageName)):(T.setDefaultCasePage(O.getDefaultQualifiedName(d.PY_DETAILS)),n.pageName=O.getDefaultQualifiedName(d.PY_DETAILS)),n?.disableAssignmentHeader?T.disableAssignmentHeader(n.disableAssignmentHeader):T.disableAssignmentHeader(!1),Nr.getNextWork(e,d.PRIMARY,n)}static openAssignment(e,n=A.APP.APP,o={}){return o.renderInline=!0,o.pageName?(T.setDefaultCasePage(O.getDefaultQualifiedName(o.pageName)),o.pageName=O.getDefaultQualifiedName(o.pageName)):(T.setDefaultCasePage(O.getDefaultQualifiedName(d.PY_DETAILS)),o.pageName=O.getDefaultQualifiedName(d.PY_DETAILS)),o?.disableAssignmentHeader?T.disableAssignmentHeader(o.disableAssignmentHeader):T.disableAssignmentHeader(!1),Nr.openAssignment(e,n,d.PRIMARY,o)}static openPage(e,n,o=A.APP.APP,r={}){let i=Un;r?.defaultCasePage?(T.setDefaultCasePage(O.getDefaultQualifiedName(r.defaultCasePage)),r.defaultCasePage=O.getDefaultQualifiedName(r.defaultCasePage)):T.setDefaultCasePage(O.getDefaultQualifiedName(d.PY_DETAILS)),r?.disableAssignmentHeader?T.disableAssignmentHeader(r.disableAssignmentHeader):T.disableAssignmentHeader(!1);let s={viewName:e,className:n,acTargetName:d.PRIMARY,actionMgrID:M.getNextActionMgrId(),context:o},{promise:a}=M.actionManagerPromise(i,s.actionMgrID);return v({type:i,payload:{...s}}),a}static getCurrentContextAPI(e,n=A.APP.APP){let o={meta:{config:{}},options:{context:n,pageReference:e,containerName:d.PRIMARY}};return ct(o).getPConnect()}},TT=W1;var RT={};tn(RT,{buildResizeMessage:()=>JW,mashup:()=>vT});function KAe(){try{let{ancestorOrigins:t}=globalThis.location;if(t&&t.length>0)return t[0]??""}catch{}return""}function K1(t){if(!t||t==="*"||t==="null")return"";try{let e=new URL(t);return e.protocol!=="https:"&&e.protocol!=="http:"||e.origin==="null"?"":e.origin}catch{return""}}function JW(t){if(t.contentRect)return{height:t.contentRect.height};let e=Array.isArray(t.contentBoxSize)?t.contentBoxSize[0]:t.contentBoxSize;return"blockSize"in e?{height:e.blockSize}:"height"in e&&typeof e.height=="number"?{height:e.height}:{height:0}}var J1=class{gadgetName="";resize=!1;parentOrigin="";boundOnMessage=this.onMessage.bind(this);init(e){if(typeof globalThis.location>"u"||typeof globalThis.document>"u")return;let{resizing:n,parentOrigin:o}=e;this.gadgetName=globalThis.window.name,this.resize=n==="stretch",this.parentOrigin="",o?this.parentOrigin=K1(o):globalThis.document.referrer?this.parentOrigin=K1(globalThis.document.referrer):this.parentOrigin=K1(KAe());let r=globalThis.document.getElementsByTagName("app-root")[0];r&&(r.classList.add("mashup"),globalThis.window.parent!==globalThis.window&&this.resize&&this._registerResizeObserver(r))}send(e){if(typeof globalThis.window>"u"||typeof globalThis.location>"u")return;let{action:n,message:o}=e,r=JSON.stringify({gadgetName:this.gadgetName,action:n,message:o});globalThis.window.parent.postMessage(r,this.parentOrigin||globalThis.location.origin)}_registerResizeObserver(e){if(typeof globalThis.ResizeObserver!="function")return;new globalThis.ResizeObserver(o=>{for(let r of o){let i=JW(r);this.send({action:"resize",message:i})}}).observe(e)}_updateUrl(e){typeof globalThis.history>"u"||(globalThis.history.pushState({},"home",e),PCore.configureForBrowserBookmark({semanticURL:"",context:d.APP.ROOT,acName:"primary"}))}onMessage(e){if(!this.parentOrigin||e.origin!==this.parentOrigin||typeof e.data!="string")return!1;let n;try{n=JSON.parse(e.data)}catch{return!1}return n.action==="UpdateUrl"&&this._updateUrl(n.message.url),!0}getMessageHandler(){return this.boundOnMessage}},vT=new J1;typeof window<"u"&&window.addEventListener("message",vT.getMessageHandler(),!1);var YW={type:"RootContainer",config:{renderingMode:"noPortal"},children:[{type:"ViewContainer",config:{routingInfo:"@ROUTING_INFO",name:"primary"}}]},QW={type:"RootContainer",config:{renderingMode:"hybrid"},children:[{type:"HybridViewContainer",config:{routingInfo:"@ROUTING_INFO",name:"primary",contextName:"app"},children:[]}]},JAe={...QW,config:{renderingMode:"MCPApp"}},YAe="app-root.mashup > .case-view, app-root.mashup > .page-view { min-height: 0px !important; }",ZW="portal-less-styles",Y1=class{createC11nEnv=e=>ct(e);getContextUtils=()=>Bu;getRoutingManager=()=>Aa;getComponentsRegistry=()=>Ca;getStateManager=()=>Ie;getActionCreators=()=>pt;getStreamObservable=()=>fA;getActionProcessor=()=>Ve;getActionHandler=()=>Pb;renderApp=(e,n)=>{let o={context:d.APP.APP},i={...y.getIn(e,d.ROOT),options:o};eu(e),hs(e,o,!0);let s=this.createC11nEnv({meta:i,isRoot:!0});w.publish(A.PUB_SUB_EVENTS.EVENT_RENDER_APP,{props:s,domContainerID:n})};updateStoreWithUiRoot=async(e,n,o)=>{let{data:r,uiResources:i={}}=e,{root:s}=i,a=y.getIn(i,d.CONTEXT_DATA),c=ze(e);await Pe(c,{},{},!1,!0);let l={...r,[d.CONTEXT_DATA]:a};$0(s,n,l,o)};fetchEndPointResource=(e,n,o)=>{k(e,{method:"GET"},d.APP.ROOT).then(r=>{r.status===200&&this.updateStoreWithUiRoot(r.data,n,o)})};loadComponent=async(e,n,o)=>{await Do(o);let r=this.createC11nEnv({meta:e,isRoot:!0});we()||eu({}),w.publish(A.PUB_SUB_EVENTS.EVENT_RENDER_APP,{props:r,domContainerID:n})};setStaticServerUrl=(e,n,o)=>{We.initServer(e,n,o)};loadView=async(e,n,o=[])=>{At.init();let r=ze(e),i=y.getIn(r,d.VIEWS),s=y.getIn(r,d.NAVIGATIONS),a=y.getIn(r,d.COMPONENTS)||[];a.push(...o);let c=y.getIn(r,d.STATIC_SERVER_URL),l=y.getIn(r,d.APPLICATION_DATA);i&&Uf(i),s&&lM(s),O5(l),c&&We.initServer(c),await Do(a,c),this.renderApp(r,n)};initAppShell=(e,n,o)=>{sS(e),qt.buildActionTargetMap(n),At.init(o)};initRoutingTable=(e,n)=>{sS(e,!0),At.init(n)};setAppAlias=e=>{We.setAppAlias(e)};getHomeRestApi=e=>{let n=At.getServerURL(),{restApi:o}=el("home",{portalName:e});return`${n}${o}`};getViewRestApi=(e,n)=>{let{restApi:o}=v5(e,n);return At.getServerURL()+o};loadRootComponent=async(e,n,o=[],r,i,s)=>{let{config:a}=n||{},c=a?.name;if(we()||eu({}),s){let g=`${d.APP.ROOT}/${c}`;M0(g),fb().deleteContainerItem(g)}(fb().getContainerItems()||[]).length>1&&!c?.startsWith("hybrid_")&&c!=="authoring-preview"&&js(),v(Ne({data:{},context:d.APP.ROOT}));let u=this.createC11nEnv({meta:n,options:{context:d.APP.ROOT,pageReference:"",target:`${d.APP.ROOT}/${c}`}}),p=u.getPConnect(),m=`${p.getContextName()}/${p.getContainerName()}`;!se(m)&&a?.renderingMode!=="noPortal"&&p.getContainerManager().initializeContainers({type:"single"});let f=["RootContainer","Region","ModalViewContainer","PreviewViewContainer","reference","URL",...o];await Do(f),w.publish(A.PUB_SUB_EVENTS.EVENT_RENDER_APP,{props:u,domContainerID:e,componentName:"RootContainer",portalTarget:r,styleSheetTarget:i})};loadViewByName=(e,n,o,r)=>{let i=this.getViewRestApi(e,o);i===At.getServerURL()&&(i=this.getHomeRestApi(n)),this.fetchEndPointResource(i,r)};loadPortalView=(e,n)=>{let r=this.getHomeRestApi(e);nu.loadRuntimeDataPages(),this.fetchEndPointResource(r,n,!0)};configureForBrowserBookmark=e=>{P5(e)};checkIfSemanticURL=()=>iS();onPCoreReady=e=>{w.subscribe(A.PUB_SUB_EVENTS.EVENT_RENDER_APP,e,"renderAppCallback")};onPCoreCleanup=e=>{w.subscribe(A.PUB_SUB_EVENTS.EVENT_UNMOUNT_APP,e,"unmountAppCallback")};setFieldsDefaultConfigs=e=>{gr.updateFieldDefaults(e)};setGoogleMapsAPIKey=e=>{At.setGoogleMapsAPIKey(e)};setFetchDefaultHeaders=e=>{mo(e)};setFetchAuthInfo=e=>{gs(e)};getCaseApi=()=>Nr;getMashupApi=()=>TT;enableAppRouting=e=>{Ob(e)};initStore=()=>eu({});getBootstrapConfig=async(e,n)=>{let o=`${n.token_type} ${n.access_token}`;return fetch(`${e}/api/application/v2/data_views/D_pxBootstrapConfig`,{method:"GET",headers:new Headers({Authorization:o})}).then(r=>r.json())};getBootstrapConfigViaSB=async(e,n,o)=>{let r=o?`?dataViewParameters=${encodeURIComponent(JSON.stringify({themeID:o}))}`:"",i=`${e}/api/application/v2/data_views/D_pxBootstrapConfig${r}`;return k(i,{method:"GET",headers:new Headers(n)}).then(s=>{if(s.data)return s.data;throw Error("D_pxBootstrapConfig load failed.",{cause:s.status})})};initCoreContainers=(e={})=>{let{containerType:n="single"}=e,o=ct({meta:YW,options:{context:"root",pageReference:"",target:"root"}});return o.getPConnect().getContainerManager().initializeContainers({type:n,name:"primary",context:"app"}),{props:{getPConnect:o.getPConnect}}};loadMashup=async(e,n=!0)=>{if(n){let r=(document.querySelector(e)??document.getElementsByTagName(e)[0])?.parentNode;if(r&&!document.getElementById(ZW)){let i=document.createElement("style");i.id=ZW,i.textContent=YAe,r.appendChild(i)}}await this.loadRootComponent(e,YW,[d.LOAD_VIEW_STRING,"ViewContainer"]),globalThis.parent!==globalThis&&vT.init({resizing:"stretch"})};bootstrapWithAuthHeader=async(e,n,o=[],r,i)=>{let{customRendering:s=!1,onPCoreReadyCallback:a,staticContentServerUrl:c,dynamicSetCookie:l=!1,renderingMode:u,locale:p,envType:m,themeID:f,customCookies:g=!1,enableRouting:h}=e,{restServerUrl:E,authInfo:C,authorizationHeader:I,appAlias:_,theme:P={}}=e,N=e.additionalHeaders?{...e.additionalHeaders}:{},z=e.extras?.defaultPortalName;z&&(N={...N,"X-Pega-Portal-Name":z});let H=null,ne=!I&&C&&!C.authType;if(C||(e.authInfo={},C=e.authInfo),(I&&Object.keys(C).length===0||g&&!ne&&!C.authType)&&(C.authType="custom"),C.customCookies=g,!I&&C.tokenInfo?.access_token){let{tokenInfo:he}=C;I=`${he.token_type} ${he.access_token}`}if(C.tokenInfo?.csrf&&(N={...N,pzCTkn:C.tokenInfo.csrf}),_&&_.indexOf("/")===-1&&(_=`app/${_}`),m==="LAUNCHPAD"){N={...N,"X-Constellation-App":"Pega"},E=E.endsWith("/dx")?E:`${E}/dx`;let he=f?`?themeID=${f}`:"";globalThis.PCore&&(H=await this.getLPConfig(`${E}/api/application/v2/environmentInfo${he}`,I,N,g)),Object.keys(P).length===0&&H?.theme?.definition&&(P=JSON.parse(H.theme.definition).Theme)}else ne?H=await this.preInitBootstrapConfig(e,_,N,f):H=await this.getBootstrapConfigExtended(_?`${E}/${_}`:`${E}`,I,N,f,g,p);let j=H?.pyConfigJSON?JSON.parse(H.pyConfigJSON):{...H};m==="LAUNCHPAD"&&await this.applyEnvironmentInfoResponse(j),j.restServerConfig=E,j.dynamicSemanticUrl=!1,j.dynamicSetCookie=l,j.enableRouting=!1,j.serviceConfig?Object.assign(j.serviceConfig,{contextPath:"",appAlias:_}):j.serviceConfig={contextPath:"",appAlias:_,staticContentServer:c,appStaticContentServer:"no-appstatic"},j.additionalHeaders={Authorization:I,...N},j.customCookies=g,j.envType=m,j.dynamicLoadComponents=!s,j.dynamicSemanticUrl=!s,j.noHistory=!0,j.theme=P??{};let oe=f&&j?.themeObject?j.themeObject:null;j.theme=oe||P,j.renderingMode=u??j.renderingMode,j.locale=p||j.locale,e.semanticUrlArgs&&(j.semanticUrlArgs=e.semanticUrlArgs);let Ae=c||j.serviceConfig.staticContentServer;if(j.isSdk?(j.enableRouting=h,j.dynamicSemanticUrl=j.enableRouting,j.environmentInfo||(j.environmentInfo={}),j.environmentInfo.pyExecutionRuntimeName=A.APP.SDK_RUNTIME,We.initServer(c,"no-appstatic")):(j.serviceConfig.staticContentServer=Ae,j.serviceConfig.appStaticContentServer=j.serviceConfig.appStaticContentServer||"no-appstatic",We.initServer(Ae,Ae)),j.renderingMode==="EMBED"&&C?.authentication_service&&C.authentication_service!=="pega"&&(j.routingInfo||(j.routingInfo={}),j.routingInfo.authServiceAlias=C.authentication_service),C&&["OAuth2.0","custom"].includes(C?.authType)&&this.setFetchAuthInfo(C),await nu.initCoreConfig(j),a&&w.subscribe(A.PUB_SUB_EVENTS.EVENT_RENDER_APP,a,"renderAppCallback"),j.envType==="LAUNCHPAD"&&j.renderingMode==="EMBED"&&T.setIsWebEmbed(!0),!s){let he=T.environmentInfoObject?.pyInfinityStaticService,Oe=null;if(he){let Xe=await sn.getDataAsync("D_pxGetComponentLibraryListAndMap","",{});Array.isArray(Xe.data)&&Xe.data.length>0&&(Oe=Xe.data)}let He=async(Xe,De)=>{try{let Et=async()=>{await this.importReactRoot(),Xe(!0)};w.subscribe("component-map-loaded",Et),"ReactRoot"in Ca.getLazyMap()&&Xe(!0)}catch(Et){De(Et)}};await new Promise(He),nu.initCoreContainers(),await this.loadRootContainerWithHybrid(n,o,r,i),Oe&&await Promise.all(Oe.map(({pyComponentMap:Xe,pxUpdateDateTime:De})=>We.importCustomComponentMap(Xe,De)))}};loadRootContainerWithHybrid=(e,n=[],o,r)=>(n.push(d.CONTAINER_TYPE?.HYBRID||"HybridViewContainer",d.LOAD_VIEW_STRING),this.loadRootComponent(e,QW,n,o,r));loadRootContainerForMcpApp=e=>{let n=[d.CONTAINER_TYPE?.HYBRID||"HybridViewContainer",d.LOAD_VIEW_STRING];return this.loadRootComponent(e,JAe,n)};getBootstrapConfigExtended=async(e,n,o,r,i,s)=>{let a={};r&&(a.themeID=r),s&&(a.locale=s);let c=r||s?`?dataViewParameters=${encodeURIComponent(JSON.stringify(a))}`:"",l=`${e}/api/application/v2/data_views/D_pxBootstrapConfig${c}`,u=n?{Authorization:n,...o}:o;return fetch(l,{method:"GET",headers:new Headers(u),credentials:n&&!i?"same-origin":"include"}).then(p=>{if(p.ok)return p.json();throw Error("D_pxBootstrapConfig load failed.",{cause:p.status})})};getLPConfig=async(e,n,o,r)=>{let i=new Headers({...o,...n&&{Authorization:n}}),s=await fetch(e,{method:"GET",headers:i,credentials:n&&!r?"same-origin":"include"});if(!s.ok)throw new Error("environmentInfo load failed.",{cause:s.status});return s.json()};applyEnvironmentInfoResponse=async e=>{let{environmentInfo:n,pyCaseTypeList:o,theme:r,keyMapping:i}=e,{pxApplication:s,features:a,pxLocale:c}=n,l={simpleTable:{pageInstructionUUIDGeneration:!1},...a},u=Intl.DateTimeFormat().resolvedOptions().timeZone.toUpperCase(),p=u==="ETC/UNKNOWN"?"America/New_York":u;e.environmentInfo={...n,pxApplication:{...s},features:l,pyCaseTypeList:o,pxLocale:{...c,pyTimeZone:p}},e.timezone=p;let m=Object.keys(e.environmentInfo);return{isEnvInfoValid:["pxOperator","pxLocale","pxApplication"].every(h=>m.includes(h)),theme:r,keyMapping:i,features:l}};importReactRoot=async()=>{let e=[];return Ca.getComponent("ReactRoot").modules.forEach(n=>{e.push(n())}),Promise.allSettled(e)};preInitBootstrapConfig=async(e,n,o,r)=>{let{restServerUrl:i,customRendering:s=!1,staticContentServerUrl:a,dynamicSetCookie:c=!1,authInfo:l,renderingMode:u,locale:p,timezone:m="America/New_York",envType:f,theme:g={}}=e,h=r??null,E={restServerUrl:i,restServerConfig:i,dynamicSetCookie:c,enableRouting:!1,serviceConfig:{contextPath:"",appAlias:n,staticContentServer:a,appStaticContentServer:"no-appstatic"},additionalHeaders:{...o},envType:f,dynamicLoadComponents:!s,dynamicSemanticUrl:!s,noHistory:!0,themeIDObj:h,theme:h||g,renderingMode:u,locale:p,timezone:m,tokens:{C11NB2S:""}};return We.initServer(a,"no-appstatic"),l&&["OAuth2.0","custom"].includes(l?.authType)&&this.setFetchAuthInfo(l),await nu.init(E),this.getBootstrapConfigViaSB(n?`${i}/${n}`:`${i}`,o,r)}},ar=new Y1;var Z1=class{appAlias;appAliasWithoutServlet;googleMapKey;staticContentServer;appStaticContentServer;contextPath;messagingService;reAuthUrl;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}},XW=Z1;var Q1=class{routingInfo;actionModel;additionalHeaders;tokens;semanticUrl;queryParams;noPortal;portalTemplate;timezone;noHistory;viewName;fieldDefaults;theme;restServerConfig;dynamicLoadComponents;dynamicSemanticUrl;enableRouting;locale;environmentInfo;isAnonymousUser;renderingMode;remoteCaseMapping;envType;serviceConfig;behaviorOverrides;initBroadcast;storePercentageAsDecimal;cookieComplianceMethod;isExtraCallRequiredForDefaultHome;enablePriorityAndUrgencyImprovements;portalType;collab;customCookies;requestContext;pzencv1zzz;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.portalTemplate=e.portalTemplate,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=e.dynamicLoadComponents??!0,this.dynamicSemanticUrl=e.dynamicSemanticUrl??!0,this.enableRouting=e.enableRouting??!0,this.locale=e.locale,this.environmentInfo=e.environmentInfo,this.isAnonymousUser=e.isAnonymousUser??!1,this.renderingMode=e.renderingMode??"FULL_PORTAL",this.remoteCaseMapping=e.remoteCaseMapping??{},this.envType=e.envType,this.serviceConfig=new XW(e.serviceConfig),this.behaviorOverrides=e.behaviorOverrides,this.initBroadcast=!!e.initBroadcast,this.cookieComplianceMethod=e.cookieComplianceMethod??"none",this.isExtraCallRequiredForDefaultHome=e.isExtraCallRequiredForDefaultHome??"false",this.enablePriorityAndUrgencyImprovements=e.enablePriorityAndUrgencyImprovements??!1,this.storePercentageAsDecimal=e.storeC11nPercentageAsDecimal??!1,this.collab=e.collab,this.customCookies=e.customCookies??!1,this.requestContext=e.requestContext,this.pzencv1zzz=e.pzencv1zzz}},eK=Q1;var X1="@P .viewConfig",ZAe="@ROUTING_INFO",tK="runtimeEnvironmentInfo",sm=0,ek=class{#e=[];async init(e){let n=new eK(e);this.#t(),Ob(n.enableRouting),eu({}),gr.updateFieldDefaults(n.fieldDefaults),gr.setFieldDefault("Percentage","storePercentageAsDecimal",n.storePercentageAsDecimal),this.#o(n.routingInfo,n.actionModel,{server:n.restServerConfig,reAuthUrl:n.serviceConfig.reAuthUrl});let{appAliasWithoutServlet:o,appAlias:r,googleMapKey:i,staticContentServer:s,appStaticContentServer:a}=n.serviceConfig;We.setAppAlias(o||r),At.setGoogleMapsAPIKey(i),We.initServer(s,a,n.tokens.C11NB2S),ce.setRemoteCaseMapping(n.remoteCaseMapping),qs.init(n.collab),qs.subscribeToCaseEvents(),tl.subscribeToCaseEvents(),It.subscribeToCaseEvents(),It.setConnectionConfig({messagingService:n.serviceConfig.messagingService}),n.initBroadcast&&ES.getBroadcastUtils().init();let c=this.#a(n.renderingMode);n.additionalHeaders=n.additionalHeaders||{},n.additionalHeaders[d.X_ORIGIN_CHANNEL]??=c,Ge.setDefaultHeaders(n.additionalHeaders),Ge.setRequestContext(n.requestContext),n.envType==="Infinity"&&await this.loadEnvironmentInfoFromDataPage(n);let l={...n.environmentInfo,isAnonymousUser:n.isAnonymousUser===!0,encCSRFToken:n.pzencv1zzz,renderingMode:n.renderingMode,...n.portalTemplate?{pyPortalTemplate:n.portalTemplate}:{}};l.pyCaseTypeList?.forEach(m=>{let f=m.pyWorkTypeImplementationClassName;f&&(m.localeReference=Gi(kr.CASE,f))}),this.#c(n,l.features?.isNamespaceEnabled),this.configureTheme(n.theme),T.setCookieComplianceMethod(n.cookieComplianceMethod),T.setIsExtraCallRequiredForDefaultHome(n.isExtraCallRequiredForDefaultHome),T.setEnablePriorityAndUrgencyImprovements(n.enablePriorityAndUrgencyImprovements),T.setEnvironmentInfo(l);let p=(new URLSearchParams(globalThis.location?.search??"").get("lang")||n.locale||globalThis.navigator?.language||"en-US").replace("_","-");T.setLocale(p),typeof document<"u"&&(document.documentElement.lang=p,document.documentElement.dir=L1(p)),zn().setTimezone(n.timezone),yt.init(),n.envType==="Infinity"?V1.subscribeToInfinityGlobalEvents():V1.subscribeToGlobalEvents(),bT.initialize(),n.initBroadcast&&ES.getBroadcastUtils().init(),await qp(T.getLocale(),{withCredentials:!Ge.getDefaultHeaders().Authorization||n.customCookies})}configureTheme=e=>{if(e){let n=e.light,o=e.dark;n!==void 0&&o!==void 0?(this.#i(n),this.#i(o,{type:"dark"})):T.setTheme(e)}};getBootstrapConfig=async(e,n)=>{let o=`${n.token_type} ${n.access_token}`,r=`${e}/api/application/v2/data_views/${O.getDefaultQualifiedName("D_pxBootstrapConfig")}`;return(await fetch(r,{method:"GET",headers:new Headers({Authorization:o})})).json()};initCoreContainers=(e={})=>{let{containerType:n="single"}=e,r=ct({meta:{type:"RootContainer",config:{renderingMode:"noPortal"},children:[{type:"ViewContainer",config:{routingInfo:"@ROUTING_INFO",name:"primary"}}]},options:{context:"root",pageReference:"",target:"root"}});return r.getPConnect().getContainerManager().initializeContainers({type:n,name:"primary",context:"app"}),{props:{getPConnect:r.getPConnect}}};importReactRoot=async()=>{let e=[];return ar.getComponentsRegistry().getComponent("ReactRoot")?.modules?.forEach(n=>{e.push(n())}),Promise.allSettled(e)};importDesignSystemComponentMap=async(e,n,o)=>{try{E8(e)}catch(i){console.error("Design system load blocked: untrusted or malformed URL",i);return}let r=(i,s="true")=>new Promise((a,c)=>{if(typeof document>"u"){c(new Error("document is not available in this environment"));return}let l=document.createElement("script");l.type="text/javascript",l.src=i,l.async=s==="true",l.onload=()=>a(void 0),l.onerror=()=>c(new Error("Failed to load resource from Design System")),document.body.appendChild(l)});try{await r(`${e}component/project/${n}/designsystems/${o}/componentsmap.js?v=${Date.now()}`)}catch(i){console.log(i)}};buildSemanticUrl=(e,n,o,r,i)=>{let s=new URLSearchParams(n),a=o==="true"&&!!e,c=new URLSearchParams(globalThis.location?.search??"").get("lang");c&&!s.has("lang")&&s.set("lang",c);let l=null,u=null,p=null;if(e){let h=(e.startsWith("/")?e.substring(1):e).split("/");l=h[0]||null,u=h[1]||null,h[2]==="assignments"&&h[3]&&(p=h[3])}let m=[r];l&&m.push(l),u&&m.push(u),p&&m.push("assignments",p),a&&(s.has("noPortal")||s.append("noPortal","true"),u&&i&&s.append("view",i));let f=s.toString();return m.join("/")+(f?`?${f}`:"")};initCoreConfig=async e=>{let{routingInfo:n,serviceConfig:o,semanticUrl:r,queryParams:i,noPortal:s,noHistory:a,viewName:c,theme:l,restServerConfig:u,dynamicLoadComponents:p=!0,dynamicSemanticUrl:m=!0,renderingMode:f="FULL_PORTAL",envType:g,extras:h}=e,{appAlias:E,contextPath:C}=o,I=globalThis.location,_=I?.origin??"",P=u??_,N={};if(C&&(P+=C),E&&g!=="LAUNCHPAD"&&(P+=`/${E}`),e.restServerConfig=P,this.#s(),m===!0){let oe=this.buildSemanticUrl(r,i,s,P,c);!a&&oe&&typeof globalThis.history<"u"&&globalThis.history.replaceState({},"home",oe)}else if(f!=="HYBRID"){let oe=I?.href??"",Ae=oe.indexOf("?");Ae>0&&typeof globalThis.history<"u"&&globalThis.history.pushState({},"home",oe.substring(0,Ae)),N.dynamicSemanticUrl=!1}else console.log(`renderingMode :${f}`);p!==!0&&(N.dynamicLoadComponents=!1);let z=null;if(E){let oe=E.indexOf("/app/");z=oe>=0?E.substring(oe+1):E}if((N.dynamicSemanticUrl===!1||N.dynamicLoadComponents===!1)&&PCore.setBehaviorOverrides(N),e.appAlias=z,l)if(typeof l=="object")e.theme=l;else try{e.theme=JSON.parse(l)}catch{e.theme={}}let ne=I?`${I.protocol}//${I.host}`:n.domain;if(f==="EMBED")try{ne=new URL(e.restServerConfig).origin}catch{}let j={...n,domain:ne,searchParams:I?I.search:"",embedQueryParams:e.semanticUrlArgs};e.routingInfo=j,e.initBroadcast=T.environmentInfoObject?.pxMashupDetails?.pyIsTraditionalCoexistence==="true",e.noPortal&&(e.noPortal==="true"||e.noPortal===!0)&&(e.renderingMode="EMBED"),h?.cspNonce&&Reflect.set(globalThis,"__webpack_nonce__",h.cspNonce),T.setCaseLabelFirstInTitle(e.extras?.useDefaultBrowserTabTitle??!0),await this.init(e)};launchViewByName=async(e,n,o,r,i,s,a,c,l=[])=>{sm+=1;let u=c||`mashup${sm}`,p={type:"RootContainer",config:{viewConfig:X1,renderingMode:"view",name:u}};await ar.loadRootComponent(e,p,i,s,a),await this.loadCustomComponentLibrariesIfEnabled(l),ar.loadViewByName(n,o,r,u)};launchView=(e,n,o=[],r,i,s,a)=>{sm+=1;let c;a==="hybrid"?c=`hybrid_${sm}`:a?c=a:c=`mashup${sm}`;let l={type:"RootContainer",config:{viewConfig:X1,renderingMode:"portal",name:c}};a===d.HYBRID&&sc.setRuntimeParam(d.HYRBID_ROOT_CONTAINERNAME,c),sc.setRuntimeParams(r),ar.loadRootComponent(e,l,o,i,s).then(()=>ar.updateStoreWithUiRoot(n,c,!1))};launchPortal=async(e,n,o=`portal${sm+=1}`,r=[],i=[])=>{let s="LoadingComponent",a={type:"RootContainer",config:{viewConfig:X1,renderingMode:"portal",skeleton:s,name:o}},c=[...r,s];T.isPortalLoaded=!0;try{return await ar.loadRootComponent(e,a,c),await this.loadCustomComponentLibrariesIfEnabled(i),ar.loadPortalView(n,o)}catch(l){throw console.error(`Failed to launch portal ${n}:`,l),l}};launchMashup=(e,n=!0,o=[])=>{let r={type:"RootContainer",config:{renderingMode:"noPortal"},children:[{type:"ViewContainer",config:{routingInfoAnnotation:ZAe,name:"primary"}}]};if(n&&!document.getElementById("portal-less-styles")){let l=document.getElementsByTagName(e)[0]?.parentNode;if(l){let u=document.createElement("style");u.id="portal-less-styles",u.textContent="app-root.mashup > .case-view, app-root.mashup > .page-view { min-height: 0px !important; }",l.appendChild(u)}}(async()=>(await ar.loadRootComponent(e,r,[d.LOAD_VIEW_STRING,"ViewContainer"]),await this.loadCustomComponentLibrariesIfEnabled(o)))();let s=Reflect.get(globalThis,"parent"),a=Reflect.get(globalThis,"window");s&&s!==a&&import(`${We.getStaticServerUrl()}constellation-mashup-bridge.js`).then(l=>{l.mashup.init({resizing:"stretch"})})};loadEnvironmentInfoFromDataPage=async e=>{if(this.#t(),e.portalType==="wss"&&(e.environmentInfo={...e.environmentInfo,features:{case:{createInModal:!1}}}),e.environmentInfo?.pyDataPages&&Array.isArray(e.environmentInfo.pyDataPages)){let n=e.environmentInfo.pyDataPages,o=({pyLoadOnlyInRuntime:r})=>r===!0||r==="true";this.#e=n.filter(o),this.#n(n.filter(r=>!o(r))),this.#e.length>0&&w.subscribe(d.PUB_SUB_EVENTS.EVENT_POST_ACTION,({actionType:r})=>{(r===ua||r===Po||r===Jo)&&this.loadRuntimeDataPages()},tK)}};loadRuntimeDataPages=()=>{if(T.getRenderingMode()==="PREVIEW")return;let e=this.#e;this.#t(),this.#n(e)};#t(){this.#e=[],w.unsubscribe(d.PUB_SUB_EVENTS.EVENT_POST_ACTION,tK)}#n(e){e.length!==0&&setTimeout(()=>{this.loadDataPagesIntoEnvironmentInfo(e).catch(n=>{console.error("Error loading data pages into environment info:",n)})},d.PRIORITY.TRIVIAL)}loadDataPagesIntoEnvironmentInfo=async e=>{if(!e?.length)return;let n=T.environmentInfoObject;if(!n)return;let o=e.filter(({pyName:a,pyPath:c})=>!a||!c?(console.warn("Invalid data page configuration: missing pyName or pyPath"),!1):!0);if(o.length===0)return;let r=await Promise.allSettled(o.map(async({pyName:a,pyPath:c})=>{try{let l=await sn.getPageDataAsync(a,"",{});return{pyPath:c,response:l}}catch(l){return console.error(`Failed to load data page ${a}:`,l),null}})),i=r.length,s=!1;for(let a=0;a<i;a+=1){let c=r[a];if(c.status==="fulfilled"&&c.value){let{pyPath:l,response:u}=c.value;this.setNestedProperty(n,l,u),s=!0}}s&&T.setEnvironmentInfo(n)};#r(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)&&Object.getPrototypeOf(e)===Object.prototype}setNestedProperty(e,n,o){let r=n.startsWith(".")?n.slice(1):n;if(!r){typeof o=="object"&&o!==null&&Object.assign(e,o);return}let i=r.split("."),s=i.length,a=e;for(let c=0;c<s-1;c+=1){let l=i[c],u=a[l];if(this.#r(u))a=u;else{let p={};a[l]=p,a=p}}a[i[s-1]]=o}start=async(e,n)=>{let o=e.extras?.defaultPortalName;o&&(e.additionalHeaders={...e.additionalHeaders||{},"X-Pega-Portal-Name":o});let{serviceConfig:{appStaticContentServer:r},ccV2LibId:i,environmentId:s,isAlternateDesignSystemEnabled:a,alternateDesignSystemName:c}=e;await this.initCoreConfig(e);let l=T.environmentInfoObject?.pyC11nDXCBDevURL,u=a==="true"&&c!=="other",p=async()=>{await this.importReactRoot();let h=[];l?h.push(We.importCustomComponentMap("")):i&&h.push(We.importCustomComponentMap(i)),u&&h.push(this.importDesignSystemComponentMap(r,s,c)),h.length&&await Promise.all(h),n?.()},m=ar.getComponentsRegistry();return"ReactRoot"in m.getLazyMap()?!0:m.getComponent("ReactRoot")?(await p(),!0):new Promise(h=>{let E=async()=>{await p(),w.unsubscribe("component-map-loaded","component-map-loaded-id"),h(!0)};w.subscribeOnce("component-map-loaded",E,"component-map-loaded-id")})};registerForDebugInfo=e=>{if(T.setPreviewMode(),!e)return;let n=({debugInfo:o})=>{let r=o?.["X-Pega-App-Debug-ID"];r&&e.postMessage({appDebugID:r})};w.subscribe("fetchSuccess",n,"fetchSuccess"),w.subscribe("fetchFailure",n,"fetchFailure")};toggleTracerHeaders=e=>{e.addEventListener("message",n=>{n?.data?.enableTracer?en.enableTracer():en.disableTracer()})};loadEnvironmentInfo=async e=>{let n=Reflect.get(globalThis,"pms"),o=typeof n=="object"&&n!==null?Reflect.get(n,"device"):void 0,r=typeof o=="object"&&o!==null&&Reflect.get(o,"systemName")==="Android";if(e.theme&&!r)try{let i=JSON.parse(e.theme.definition),s=i.Branding,a=i.Theme;T.setBrandingInfo(s),T.setTheme(a)}catch{T.setBrandingInfo({}),T.setTheme({})}if(e.darkTheme&&!r){let i={type:"dark"};try{let s=JSON.parse(e.darkTheme.definition);T.setBrandingInfo(s.Branding,i),T.setTheme(s.Theme,i)}catch{T.setBrandingInfo({},i),T.setTheme(void 0,i)}}e.keyMapping&&T.setKeyMapping(e.keyMapping),T.setCookieComplianceMethod(e.cookieComplianceMethod??"none")};async loadCustomComponentLibrariesIfEnabled(e){e?.length>0&&(T.environmentInfoObject?.pyInfinityStaticService||it())&&await this.loadCustomComponentLibraries(e)}async loadCustomComponentLibraries(e){let n=e.map(o=>this.importSingleCustomComponent(o));await Promise.all(n)}importSingleCustomComponent(e){return typeof e=="object"&&"pyComponentMap"in e?We.importCustomComponentMap(e.pyComponentMap,e.pxUpdateDateTime):We.importCustomComponentMap(e)}#o(e,n,o){sS(e),qt.buildActionTargetMap(n),At.init(o)}#s(){document.querySelectorAll('head link[rel~="icon"], head link[rel~="apple-touch-icon"]').forEach(n=>{n.setAttribute("href",n.href)})}#i(e,n){if(e===null)return;if(typeof e=="object"){T.setTheme(e,n);return}let o;try{o=JSON.parse(e)}catch{T.setTheme(n?.type==="dark"?void 0:{},n);return}T.setTheme(o,n)}#a(e){return e===d.EMBED?d.X_ORIGIN_CHANNEL_EMBEDDED_BROWSER:d.X_ORIGIN_CHANNEL_BROWSER}#c(e,n){n&&(e.additionalHeaders.Prefer="namespaced",Ge.setDefaultHeaders(e.additionalHeaders))}},QAe=new ek,nu=QAe;var XAe="createViewRuleByID",eCe="getViewRuleByID",tCe="updateViewRuleByID",nCe="deleteViewRuleByID",rCe="getCalculatedFieldsInViewByID",oCe=(t,e)=>{let{restApi:n,reqType:o}=F(XAe);return k(n,{method:o,body:t},e).then(r=>r.data)},iCe=(t,e,n)=>{let{restApi:o,reqType:r}=F(eCe,{ID:t,includeMetadata:n?.includeMetadata??!1,caseClass:n?.caseClass??""});return k(o,{method:r},e).then(i=>i.data)},sCe=(t,e,n)=>{let{restApi:o,reqType:r}=F(tCe,{ID:t});return k(o,{method:r,body:e},n).then(i=>i.data)},aCe=(t,e)=>{let{restApi:n,reqType:o}=F(nCe,{ID:t});return k(n,{method:o},e).then(r=>r.data)},cCe=(t,e,n)=>{let{restApi:o,reqType:r}=F(rCe,{caseID:t,viewID:e});return k(o,{method:r,body:{calculations:{fields:n}}}).then(i=>i.data)},nK={createViewRule:oCe,getViewRule:iCe,updateViewRule:sCe,deleteViewRule:aCe,getCalculatedFields:cCe};var lCe="addCaseFollower",uCe="deleteCaseFollower",dCe="getCaseFollowers",pCe={"Content-Type":"application/json"},mCe=(t,e,n)=>{let o={caseID:t},r=JSON.stringify({users:e.map(i=>({ID:i}))});return Re(lCe,{body:r,queryPayload:o,headers:pCe},n)},fCe=(t,e,n)=>Re(uCe,{queryPayload:{caseID:t,followerID:e}},n),gCe=(t,e)=>Re(dCe,{queryPayload:{caseID:t}},e).then(o=>o.data.followers),rK={addCaseFollower:mCe,deleteCaseFollower:fCe,getCaseFollowers:gCe};var hCe="addRelatedCases",yCe="removeRelatedCase",SCe="getRelatedCases",ECe=(t,e,n)=>{let o={caseID:t},r=JSON.stringify({cases:e});return Re(hCe,{body:r,queryPayload:o},n)},ACe=(t,e,n)=>Re(yCe,{queryPayload:{caseID:t,relatedCaseID:e}},n),CCe=(t,e)=>Re(SCe,{queryPayload:{caseID:t}},e).then(o=>o.data.relatedCases),oK={addRelatedCases:ECe,removeRelatedCase:ACe,getRelatedCases:CCe};var tk="operatorDetails",ICe="operatorDetailsByBusinessID",_Ce=(t,e=!1)=>{let{reqType:n}=F(tk,{});if(n==="GET"){let o={encodedOperatorId:encodeURIComponent(`{"opname":"${t}"}`)};return Re(tk,{queryPayload:o})}return e?Re(ICe,{body:{dataViewParameters:{BusinessID:t}}}):Re(tk,{body:{dataViewParameters:{ID:t}}})},iK={getOperatorDetails:_Ce};var sK="postCustomFeedMessages",bCe="postFeedMessages",TCe="deleteFeedMessage",vCe="getFeedMessages",RCe="likeFeedMessages",PCe="unlikeFeedMessages",NCe="getMentionSuggestions",OCe="getTagSuggestions",xCe="getFeedMessageLikes",DCe="editFeedMessage",$Ce="getMentionTypes",wCe="getViewRuleByMessageType",MCe="refreshCustomPostTypeView",am={"Content-Type":"application/json"},nk=class{mentionsTagsCancelTokenSource;mentions;constructor(){this.mentionsTagsCancelTokenSource=[],this.mentions=[]}getFeeds=(e,n,o,r,i,s,a)=>{let c=s.getLocalizationService();a||(this.mentions=[]);let l="";r&&Array.isArray(r)&&r?.length>0&&(r.forEach(f=>{f.on&&(l=`${l}${f.id},`)}),l===""&&(l="ClearFilters"));let u="";a&&(u=s.getValue("pulse.pageLastEntry"));let p={filterForContext:n==="pyDataFeed"?encodeURIComponent(e):e,feedID:n,feedClass:o,filterBy:l,pageSize:10,olderThan:u};for(let f=0;f<i.length;f+=1)i[f].cancel();let m=zi();return i.push(m),Re(vCe,{queryPayload:p,cancelTokenSource:m},s.getContextName()).then(async f=>{if(f.status===200&&f.data){i.pop();let g=[],h={},E=!1,C=[];if(f?.data){if(C=Array.isArray(f.data.data.MessageTypes)&&f.data.data.MessageTypes.length?f.data.data.MessageTypes:[],f?.data?.data?.FeedList){let I=f.data.data.FeedList?.pxResults;Array.isArray(I)&&I?.length>0&&I.forEach((_,P)=>{_.ID=_.pzInsKey!==""?_.pzInsKey:`message${P}`,g.push(_.ID),h[_.ID]=_,_?.mentions&&Array.isArray(_?.mentions)&&_.mentions?.length>0&&this.mentions.push(_.mentions),_?.pxResults&&Array.isArray(_?.pxResults)&&_.pxResults?.length>0&&_.pxResults.forEach(N=>{N?.mentions&&Array.isArray(N?.mentions)&&N.mentions?.length>0&&this.mentions.push(...N.mentions)}),!E&&!["pzPostDetails","pzPrivatePostDetails"].includes(_.pyMessageViewReference)&&(E=!0)})}if(E&&await tb({uiResources:f.data.uiResources}),!r&&(r=[{id:"All",label:c.getLocalizedText("All"),on:!0,disabled:!1}],f?.data?.data?.FeedFilters)){let I=f.data.data.FeedFilters?.pxResults,_=!0;if(I&&Array.isArray(I)&&I?.length>0){I.forEach(N=>{let z={id:N.pyFeedSourceReference,label:c.getLocalizedText(N.pyLabel),disabled:!1,on:N.pySelected==="true"};z.on||(_=!1),r.push(z)});let P=r.find(N=>N.id==="All");P&&(P.on=_)}}}if(a&&s.getValue("pulse.messageIDs")){let I=s.getValue("pulse.messages");I={...I,...h},Object.values(I).forEach(_=>{_?.mentions&&Array.isArray(_?.mentions)&&_.mentions?.length>0&&this.mentions.push(_.mentions),_?.pxResults&&Array.isArray(_?.pxResults)&&_.pxResults?.length>0&&_.pxResults.forEach(P=>{P?.mentions&&Array.isArray(P?.mentions)&&P.mentions?.length>0&&this.mentions.push(...P.mentions)})})}if(D0(s.getContextName())){s.updateState({pulse:{messages:a&&s.getValue("pulse.messageIDs")?{...s.getValue("pulse.messages"),...h}:h,messageIDs:a&&s.getValue("pulse.messageIDs")?[...s.getValue("pulse.messageIDs"),...g]:g,nextPageFirstEntry:f?.data?.nextPageFirstEntry||"",pageLastEntry:f?.data?.pageLastEntry||"",postTypes:C,pulseContext:e}});let I=[...new Map(this.mentions.flat()?.map(_=>[_.mentionsID,_])).values()].filter(_=>Object.hasOwn(_,"mentionsType")).filter(_=>!_?.mentionsType?.toLowerCase().includes("user"));return{feedFilters:r,caseMentions:I}}}else return s.reportError(`getFeeds call failed ${f.status}`,f.data),f}).catch(f=>{if(!jy(f))return s.reportError(": Error occurred during ajax call at getFeeds API : ",f.response),f.response})};postMessage=(e,n,o,r=[],i=!1,s=[],a=!1)=>{let c={message:n,context:e,parentMessageId:i?e:"",attachments:r,pyRecipients:s.length?s:void 0},l=s.length===0?{body:JSON.stringify(c),queryPayload:{fromWidget:a},headers:am}:{body:JSON.stringify(c),queryPayload:{type:"PegaSocial-Post-Private",fromWidget:a},headers:am};return Re(s.length?sK:bCe,l,o.getContextName()).then(u=>{if((u.status===201||u.status===200)&&u.data){let p=u?.data;if(i){p.parentMessageID=e;let{pxResults:h,caseMentions:E}=this.buildMessageObject(p,i,o,r.length>0);return o.updateState({pulse:{messages:{[e]:{pxResults:h}}}}),E}let{messages:m,messageIDs:f,caseMentions:g}=this.buildMessageObject(p,i,o,r.length>0);return o.updateState({pulse:{messages:m,messageIDs:f}}),g}return o.reportError(`postMessage call failed with status ${u.status}`,u),""}).catch(u=>{throw o.reportError(": Error occurred during ajax call at postMessage API : ",u.response),u.response})};postCustomMessage=(e,n,o,r=!1)=>Re(sK,{body:n,queryPayload:{type:e,fromWidget:r},headers:am},o.getContextName()).then(async s=>{if(s.status===201&&s.data){let a=s.data.data,c={ID:a.ID,pzInsKey:a.ID,classID:a.classID,pyPostType:a.pyPostType,postedByUser:a.postedByUser,pyIsDeleteEnabled:a.pyIsDeleteEnabled,pyMessageViewReference:a.messageViewReference,pyFeed:{pyIconType:"user",pyCommentContext:a.pyCommentContext,pyPostedOn:a.postedTime,pyFeedTitle:a.postedByUser.name,pyIconReference:a.postedByUser.ID},...a.PostMessage};Ky(a.messageViewReference,o,n.context)||await tb({uiResources:s.data.uiResources}),o.updateState({pulse:{messages:{[c.ID]:c,...o.getValue("pulse.messages")},messageIDs:[c.ID,...o.getValue("pulse.messageIDs")]}})}else return o.reportError(`postCustomMessage call failed with status ${s.status}`,s),""}).catch(s=>{throw o.reportError(": Error occurred during ajax call at postCustomMessage API : ",s.response),s.response});editMessage=({messageID:e,parentMessageID:n,message:o,pConnectObj:r,isReply:i=!1,recipients:s=[]})=>{let a=JSON.stringify({message:o,...s.length&&{pyRecipients:s}});return Re(DCe,{queryPayload:{messageID:e},body:a,headers:am},r.getContextName()).then(l=>{if(l?.status===200&&l?.data){let u=l?.data;if(i){u.parentMessageID=n;let{pxResults:f,caseMentions:g}=this.buildMessageObject(u,i,r,!1);return r.updateState({pulse:{messages:{[n]:{pxResults:f}}}}),g}let{messages:p,caseMentions:m}=this.buildMessageObject(u,i,r,!1);return r.updateState({pulse:{messages:p}}),m}return r.reportError(`editMessage call failed with status ${l.status}`,l),""}).catch(l=>{throw r.reportError(": Error occurred during ajax call at editMessage API : ",l.response),l.response})};buildMessageObject=(e,n,o,r=!1)=>{let i={ID:e?.ID||"",classID:e?.classID||"PegaSocial-Message",tags:e?.tags||[],pyHasAttachment:r,pzInsKey:e?.ID||"",pyMessage:e?.message||"",mentions:e?.mentions||[],postedByUser:e?.postedByUser,pxCreateDateTime:e?.postedTime||"",pxUpdateDateTime:e?.updatedTime||"",parentMessageID:e?.parentMessageID||"",pyIsDeleteEnabled:e?.pyIsDeleteEnabled||!1,pyIsEdited:typeof e?.isEdited=="string"?e?.isEdited==="true":e?.isEdited||!1,pyFeed:{pyPostedOn:e?.postedTime||"",pyFeedTitle:e?.postedByUser?.name||"",pyIconType:"user",pyCommentContext:e?.pyCommentContext||".pzInsKey",pyIconReference:"pi pi-case"},pyContext:"",pxIcon:"globe",pyMessageViewReference:e?.messageViewReference||"pzPostDetails",pyPostType:e?.pyPostType,pyRecipients:e?.pyRecipients?.length?e.pyRecipients:void 0},s=o.getValue("pulse.messages");if(n){let{pxResults:c=[]}=Object.values(s)?.find(u=>u?.ID===i?.parentMessageID)||{},l=c?.findIndex(u=>u?.pzInsKey===i?.ID);if(l!==-1){let u=[...c];u[l]={...u[l],...i},c=u}else c=[...c,i];return{pxResults:c,messages:{},messageIDs:[],caseMentions:this.getCaseMentions(c)}}let a=o.getValue("pulse.messageIDs");if(a){let c=a.includes(i.ID)?{...s[i.ID],...i}:i,l={...s,[i.ID]:c},u=a.includes(i.ID)?a:[i.ID,...a];return{messages:l,messageIDs:u,caseMentions:this.getCaseMentions(Object.values(l))}}};getCaseMentions=e=>{let n=e?.filter(o=>o?.mentions&&Array.isArray(o?.mentions)&&o.mentions?.length>0)?.map(o=>o.mentions)?.concat(this.mentions);return[...new Map(n.flat()?.map(o=>[o.mentionsID,o])).values()].filter(o=>Object.hasOwn(o,"mentionsType")).filter(o=>!o?.mentionsType?.toLowerCase().includes("user"))};likeMessage=({pulseContext:e,likedBy:n,messageID:o,isReply:r,pConnectObj:i})=>{let s=n?PCe:RCe,a=JSON.stringify({ContextClass:e});Re(s,{body:a,queryPayload:{pulseContext:e},headers:am},i.getContextName()).then(l=>{if(l.status===200)if(r){let u=i.getValue(`pulse.messages.${o}`),p=u?.pxResults&&Array.isArray(u?.pxResults)&&u.pxResults?.length>0&&u.pxResults?.map(m=>{if(m={...m},m.pzInsKey===e){let f=0,g=!1,h=m.pyLikes?m?.pyLikes?.pxLikeCount:0;n?(f=h-1,g=!1):(f=h+1,g=!0),m.pyLikes={pxLikeCount:f,pxIsLiked:g}}return m});i.updateState({pulse:{messages:{[o]:{pxResults:p}}}})}else{let u={...i.getValue(`pulse.messages.${o}`)},p=u.pyLikes?u.pyLikes.pxLikeCount:0,m=0,f=!1;n?(m=p-1,f=!1):(m=p+1,f=!0),u.pyLikes={pxLikeCount:m,pxIsLiked:f},i.updateState({pulse:{messages:{[e]:u}}})}else i.reportError(`likeMessage call failed with status ${l.status}`,l)}).catch(l=>{i.reportError(": Error occurred during ajax call at likeMessage API : ",l.response.data)})};deleteMessage=(e,n,o,r)=>{let i=e;n&&(i=o),Re(TCe,{queryPayload:{messageID:i}},r.getContextName()).then(a=>{if(a.status===200)if(n){let c=r.getValue(`pulse.messages.${e}`),l=c?.pxResults&&Array.isArray(c?.pxResults)&&c.pxResults?.length>0&&c.pxResults?.filter(u=>u.pzInsKey!==o);r.updateState({pulse:{messages:{[e]:{pxResults:l}}}})}else{let c=r.getValue("pulse.messageIDs"),l=c&&Array.isArray(c)&&c?.length>0&&c?.filter(p=>p!==e),u={...r.getValue("pulse.messages")};delete u[e],r.updateState({pulse:{messageIDs:l,messages:u}})}else r.reportError(`deleteMessage call failed with status ${a.status}`,a)}).catch(a=>{r.reportError(": Error occurred during ajax call at deleteMessage API : ",a.response)})};getLikedUsers=(e,n)=>Re(xCe,{queryPayload:{messageID:e}},n.getContextName());getMentionSuggestions=(e,n)=>{let{pulseContext:o,searchFor:r,mentionsType:i,listSize:s=5}=e,a={pulseContext:o,searchFor:r,mentionsType:i,listSize:s};for(let l=0;l<this.mentionsTagsCancelTokenSource.length;l+=1)this.mentionsTagsCancelTokenSource[l].cancel();let c=zi();return this.mentionsTagsCancelTokenSource.push(c),Re(NCe,{queryPayload:a,cancelTokenSource:c},n.getContextName()).then(l=>(this.mentionsTagsCancelTokenSource=[],l.status===200&&l.data?l?.data:(n.reportError(`Get mention suggestions call failed ${l.status}`,l.data),[]))).catch(l=>{jy(l)||n.reportError(": Error occurred during ajax call at getMentionSuggestions API : ",l.response.data)})};getMentionTypes=e=>Re($Ce,{},e.getContextName());getPostTypeView=(e,n,o)=>Re(wCe,{queryPayload:{type:e,contextID:o??""}},n.getContextName());refreshCustomPostTypeView=(e,n,o,r)=>Re(MCe,{body:n,queryPayload:{type:e,contextID:r??""},headers:am},o.getContextName());getTagSuggestions=(e,n)=>{let{searchFor:o,listSize:r=5}=e,i={searchFor:o,listSize:r};for(let a=0;a<this.mentionsTagsCancelTokenSource.length;a+=1)this.mentionsTagsCancelTokenSource[a].cancel();let s=zi();return this.mentionsTagsCancelTokenSource.push(s),Re(OCe,{queryPayload:i,cancelTokenSource:s},n.getContextName()).then(a=>{this.mentionsTagsCancelTokenSource=[];let c=[];return a.status===200&&a?.data?c=a?.data?.tags&&Array.isArray(a?.data?.tags)&&a.data.tags.length>0&&a.data.tags?.map(l=>`#${l}`):n.reportError(`Get tag suggestions call failed ${a.status}`,a.data),c}).catch(a=>{jy(a)||n.reportError(": Error occurred during ajax call at getTagSuggestions API : ",a.response.data)})}},aK=new nk;var kCe="addTagsToCase",LCe="deleteCaseTag",UCe="getCaseTags",zCe=(t,e)=>{let n={caseID:t,viewID:O.getDefaultQualifiedName("pyTaggedCases")};return Re("loadView",{queryPayload:n},e.getContextName()).then(o=>o?.data).catch(o=>{e.reportError(": Error occurred during ajax call at fetchTaggedcases API : ",o.response)})},jCe=(t,e)=>Re(UCe,{queryPayload:{caseID:t}},e.getContextName()).then(o=>o?.data?.tagsList).catch(o=>{e.reportError(": Error occurred during ajax call at fetchTags API : ",o.response)}),FCe=(t,e,n)=>{let o={caseID:t},r=JSON.stringify({tags:e});return Re(kCe,{body:r,queryPayload:o},n.getContextName()).then(i=>i?.data?.results).catch(i=>{n.reportError(": Error occurred during ajax call at postTags API : ",i.response)})},VCe=(t,e,n)=>Re(LCe,{queryPayload:{caseID:t,tagID:e}},n.getContextName()).catch(r=>{n.reportError(": Error occurred during ajax call at removeTag API : ",r.response)}),BCe=t=>{let e=O.getDefaultQualifiedName("D_pxGetTagsLandingPageURL");return sn.getPageDataAsync(e,t.getContextName(),{},{invalidateCache:!0}).catch(n=>{t.reportError(": Error occurred during ajax call getTagsLandingPageURL API : ",n.response)})},cK={getTaggedCases:zCe,getTags:jCe,postTags:FCe,removeTag:VCe,getTagsLandingPageURL:BCe};var PT=(t,e)=>{k0(e.getContextName(),t.etag),L0(e.getContextName(),t.etag)};var HCe="getAllParticipants",GCe="getParticipantRoles",qCe="getParticipantRoleView",WCe="getParticipant",KCe="createParticipant",JCe="updateParticipant",YCe="deleteParticipant",ZCe=(t,e)=>Re(HCe,{queryPayload:{caseID:t}},e.getContextName()).then(o=>o?.data?.data.content.pyParticipants).catch(o=>{e.reportError(": Error occurred during ajax call at getParticipants API : ",o.response)}),QCe=(t,e)=>Re(GCe,{queryPayload:{caseID:t}},e.getContextName()).then(o=>o?.data?.participant_roles).catch(o=>{e.reportError(": Error occurred during ajax call at getParticipantRoles API : ",o.response)}),XCe=(t,e,n)=>Re(WCe,{queryPayload:{caseID:t,participantID:e}},n.getContextName()).then(r=>r?.data).catch(r=>{n.reportError(": Error occurred during ajax call at getParticipant API : ",r.response)}),eIe=async(t,e,n,o,r)=>{let i={caseID:t},s={...n,participantRoleID:e},a={"if-match":o.getCaseSummary().headers.etag};return new Promise((c,l)=>{Re(KCe,{body:s,queryPayload:i,headers:a},o.getContextName()).then(u=>{PT(u.headers,o),c()}).catch(u=>{u.response.data.errorDetails?.forEach(m=>{m.erroneousInputOutputFieldInPage=m.erroneousInputOutputFieldInPage.replace(/\.pyWorkParty\([^)]*\)/,"")});let p=il(r||o.getContextName());o.reportError(": Error occurred during ajax call at createParticipant API : ",{...u.response.data,formFields:p},r),l(u.response)})})},tIe=async(t,e,n,o,r)=>{let i={caseID:t,participantID:e},s={"if-match":o.getCaseSummary().headers.etag};return new Promise((a,c)=>{Re(JCe,{body:n,queryPayload:i,headers:s},o.getContextName()).then(l=>{PT(l.headers,o),a()}).catch(l=>{l.response.data.errorDetails?.forEach(p=>{p.erroneousInputOutputFieldInPage=p.erroneousInputOutputFieldInPage.replace(/\.pyWorkParty\([^)]*\)/,"")});let u=il(r||o.getContextName());o.reportError(": Error occurred during ajax call at updateParticipant API : ",{...l.response.data,formFields:u},r),c(l.response)})})},nIe=(t,e,n)=>{let o={caseID:t,participantID:e},r={"if-match":n.getCaseSummary().headers.etag};return new Promise((i,s)=>{Re(YCe,{queryPayload:o,headers:r},n.getContextName()).then(a=>{PT(a.headers,n),i()}).catch(a=>{n.reportError(": Error occurred during ajax call at deleteParticipant API : ",a.response),s(a.response)})})},rIe=(t,e,n)=>Re(qCe,{queryPayload:{caseID:t,participant_roleID:e}},n.getContextName()).then(r=>r?.data).catch(r=>{n.reportError(": Error occurred during ajax call at fetchTaggedcases API : ",r.response)}),lK={getParticipants:ZCe,getRoleView:rIe,getParticipantRoles:QCe,getParticipant:XCe,createParticipant:eIe,updateParticipant:tIe,deleteParticipant:nIe};var oIe="createListPersonalization",iIe="deleteListPersonalization",sIe="updateListPersonalization",aIe="getUIListPersonalizations",NT=()=>va("getDataFromSRS");function rk(t=[]){return t.reduce((e,n)=>(e[n.personalizationID]={name:n.name,personalizationState:JSON.parse(n.personalizationState||"{}")},e),{})}var ok="create",ik="update",dK="delete";function AS(t,e,n,o){let r=vb(e);if(r){switch(t){case ok:case ik:{let{markAsDefault:i,...s}=o;Object.entries(s).length>0&&(r.allPersonalizations[n]=s),i&&(r.defaultPersonalization=n);break}case dK:{delete r.allPersonalizations[n],r.defaultPersonalization===n&&(r.defaultPersonalization="");break}default:return null}return r}return null}function uK(t){return typeof t=="object"&&t!==null}function cIe(t){if(!uK(t))return null;let e=t[O.getDefaultQualifiedName("ID")];if(typeof e!="string"||!e)return null;let n=t[O.getDefaultQualifiedName("PersonalizationState")],o=typeof n=="string"?n:JSON.stringify(n);try{let i=JSON.parse(o);if(!uK(i)||Array.isArray(i))return null}catch{return null}let r=t[O.getDefaultQualifiedName("Name")];return{personalization:{personalizationID:e,name:typeof r=="string"?r:"",personalizationState:o},isDefault:!!t[O.getDefaultQualifiedName("MarkAsDefault")]}}async function pK(t){let e=T.getOperatorIdentifier(),o=(await sn.getDataAsync(O.getDefaultQualifiedName("InsightPersonalizationListByOperatorAndInsight"),void 0,{InsightID:t,UserID:e})).data;return(Array.isArray(o)?o:[]).reduce((i,s)=>{let a=cIe(s);return a&&i.push(a),i},[])}async function lIe(t){let e=await pK(t),n="",o=[];for(let r of e)r.isDefault&&(n=r.personalization.personalizationID),o.push(r.personalization);return{defaultPersonalization:n,allPersonalizations:o}}var Ec={};async function uIe(t,e,n){let o=O.getDefaultQualifiedName("InsightPersonalization"),i=(await Re("createWork",{body:{caseTypeID:o,content:{[O.getDefaultQualifiedName("InsightID")]:t,[O.getDefaultQualifiedName("Name")]:n.name??"",[O.getDefaultQualifiedName("MarkAsDefault")]:n.markAsDefault??!1,[O.getDefaultQualifiedName("PersonalizationState")]:JSON.stringify(n.personalizationState)},processID:O.getDefaultQualifiedName("pyStartCase")},queryPayload:{viewType:"none",caseClassName:o}})).data?.ID??e;return Ec[e]=i,i}async function mK(t,e){let n=O.getDefaultQualifiedName("Edit"),{restApi:o,reqType:r}=F("caseWideActions",{caseID:t,actionID:n}),s=(await k(`${o}?viewType=form`,{method:r}))?.headers?.etag;if(!s)throw new Error(`Missing etag for personalization case ${t}`);let a={};e.markAsDefault!==void 0&&(a[O.getDefaultQualifiedName("MarkAsDefault")]=e.markAsDefault),e.name!==void 0&&(a[O.getDefaultQualifiedName("Name")]=e.name),e.personalizationState!==void 0&&(a[O.getDefaultQualifiedName("PersonalizationState")]=JSON.stringify(e.personalizationState));let{restApi:c,reqType:l}=F("executeCaseWideActions",{caseID:t,actionID:n});await k(`${c}?viewType=form`,{method:l,headers:{"if-match":s},body:{content:a,pageInstructions:[]}})}async function fK(t,e){await(await pK(t)).filter(({isDefault:r,personalization:i})=>r&&i.personalizationID!==e).reduce((r,{personalization:i})=>r.then(()=>mK(i.personalizationID,{markAsDefault:!1})),Promise.resolve())}async function dIe(t){let e=O.getDefaultQualifiedName("MarkAsInactive"),{restApi:n,reqType:o}=F("caseWideActions",{caseID:t,actionID:e}),i=(await k(`${n}?viewType=form`,{method:o}))?.headers?.etag;if(!i)throw new Error(`Missing etag for personalization case ${t}`);let{restApi:s,reqType:a}=F("executeCaseWideActions",{caseID:t,actionID:e});await k(`${s}?viewType=form`,{method:a,headers:{"if-match":i},body:{content:{[O.getDefaultQualifiedName("ReasonForStatusUpdate")]:zn().getLocaleValue("Insight Personalization delete")},pageInstructions:[]}})}var pIe=async t=>{if(NT()){let r=await lIe(t);return Array.isArray(r.allPersonalizations)&&(r.allPersonalizations=rk(r.allPersonalizations)),r}let e=vb(t);if(e)return Array.isArray(e.allPersonalizations)&&(e.allPersonalizations=rk(e.allPersonalizations)),Promise.resolve(e);let{restApi:n,reqType:o}=F(aIe,{listID:t});return k(n,{method:o,body:{}}).then(r=>{let{data:i}=r;return{allPersonalizations:rk(i.allPersonalizations),defaultPersonalization:i.defaultPersonalization}})},mIe=async(t,e,n)=>{if(NT()){let i=await uIe(t,e,n);return AS(ok,t,e,n),n.markAsDefault&&await fK(t,i),{data:i}}let{restApi:o,reqType:r}=F(oIe,{listID:t});return AS(ok,t,e,n),k(o,{method:r,body:{...n,personalizationState:JSON.stringify(n.personalizationState)}}).then(i=>{let s=i.data;return Ec[e]=s,i})},fIe=async(t,e,n)=>{let o=Ec[e]||e;if(NT()){await mK(o,n),AS(ik,t,e,n),n.markAsDefault&&await fK(t,o);return}AS(ik,t,e,n);let{restApi:r,reqType:i}=F(sIe,{listID:t,personalizationID:o})||{};return k(r,{method:i,body:{...n,personalizationState:JSON.stringify(n.personalizationState)}})},gIe=async(t,e)=>{let n=Ec[e]||e;if(AS(dK,t,e),NT()){await dIe(n),Ec[e]&&delete Ec[e];return}let{restApi:o,reqType:r}=F(iIe,{listID:t,personalizationID:n});return k(o,{method:r,body:{}}).then(i=>(Ec[e]&&delete Ec[e],i))};function hIe(t){return t?{createPersonalization:mIe.bind(null,t),updatePersonalization:fIe.bind(null,t),deletePersonalization:gIe.bind(null,t),fetchPersonalizations:pIe.bind(null,t)}:{createPersonalization:()=>Promise.resolve(""),updatePersonalization:()=>Promise.resolve(),deletePersonalization:()=>Promise.resolve(),fetchPersonalizations:()=>Promise.resolve({})}}var gK=hIe;var Hn=typeof window<"u"?window.sessionStorage:{getItem:()=>null,setItem:()=>{}},sk="getDataObjects",yIe="getDataPageObjects",hK="getDataPages",SIe="getListData",EIe="getInsightIDs",EK="getInsightByID",AIe="getClassResources",CIe="createInsight",IIe="deleteInsight",_Ie="exportToExcel",bIe="exportToCSV",TIe="scheduleInsight",vIe="updateScheduledInsight",RIe="deleteScheduledInsight",PIe="translateStrings",NIe="updateInsight",OIe=["LocalList","RemoteList","PromptList","DataPage"],AK=async(t,e,n)=>{let o=await Ot(t,{queryPayload:n}),r=o.data?.outputs?.[e];if(!r)throw new Error(`MCP action ${t} returned no ${e}`);return{...o,data:r}},ru=null;function xIe(t=!0){if(ru)return ru;let e=fn.getAppCacheKey(yIe);if(t&&Hn.getItem(e))return Promise.resolve(JSON.parse(`${Hn.getItem(e)}`));let n={datapageRequestType:"explorable"};if(it())ru=AK(hK,"dataPages",n);else{let{restApi:o,reqType:r}=F(hK,n);ru=k(o,{method:r,datapageRequestType:"explorable"})}return ru.then(o=>{ru=null,Hn.setItem(e,JSON.stringify(o))}),ru}function DIe(){let t=fn.getAppCacheKey(sk);if(Hn.getItem(t))return Promise.resolve(JSON.parse(`${Hn.getItem(t)}`));let e;if(it())e=AK(sk,"dataObjects",{});else{let{restApi:n,reqType:o}=F(sk,{});e=k(n,{method:o})}return e.then(n=>{Hn.setItem(t,JSON.stringify(n))}),e}var yK=[],$Ie=async t=>{let e=t.filter(i=>!yK.includes(i));if(e.length===0)return;let n={classIDs:t.join(",")},{restApi:o,reqType:r}=F(AIe,n);return k(o,{method:r}).then(i=>{i.data.resources&&(yK.push(...e),mA(i.data.resources))})};function wIe(t){let e=fn.getAppCacheKey(`DefaultColumns_${Object.values(t).join("_")}`);if(Hn.getItem(e))return Promise.resolve(JSON.parse(`${Hn.getItem(e)}`));let n={dataViewName:O.getDefaultQualifiedName("D_pzGetDefaultColumns")},{restApi:o,reqType:r}=F(SIe,n),i=k(o,{method:r,body:{dataViewParameters:t}});return i.then(s=>{Hn.setItem(e,JSON.stringify(s))}),i}function MIe(t){return"type"in t&&"classID"in t}function kIe(t){let e=$n(t);if(e&&e.classID){let n=pM(e.classID),o=e.rdFields,r=(o&&!Array.isArray(o)?o.fields:void 0)?.filter(i=>i.indexOf(".")>0);if(r&&!y.isEmpty(r)){let i=r.reduce((s,a)=>{let c=Tb(a,e.classID);return c&&MIe(c)&&(s[a]=c),s},{});n={...n,...i}}if(n&&Object.keys(n).length>0){for(let i of Object.keys(n))n[i].type.startsWith("Page")?delete n[i]:n[i]?.datasource&&OIe.includes(n[i].datasource.tableType)&&(n[i].fieldType="Picklist");return{sourceFields:n,sourceMetadata:e}}}return{}}function LIe(t,e,n){if(!e){let i=$n(t),s=Array.isArray(i?.rdFields)?i?.rdFields:i?.rdFields?.fields;return s?Promise.resolve({data:{data:s.map(a=>({pyFieldName:a}))}}):Promise.resolve({data:{data:[]}})}let o=fn.getAppCacheKey(`RDColumns-${t}`);if(Hn.getItem(o))return Promise.resolve(JSON.parse(`${Hn.getItem(o)}`));let r=fn.getData(O.getDefaultQualifiedName("D_pxFieldsForDataSource"),{dataViewParameters:{DataPageName:t}},n);return r.then(i=>{Hn.setItem(o,JSON.stringify(i))}),r}function UIe(t="",e=""){let n=fn.getAppCacheKey(`PFColumns-${t}${e}`);if(Hn.getItem(n))return Promise.resolve(JSON.parse(`${Hn.getItem(n)}`));let o=fn.getData(O.getDefaultQualifiedName("D_pxGetInitialFieldsForDataSource"),{dataViewParameters:{DataPageName:t,ClassName:e}});return o.then(r=>{Hn.setItem(n,JSON.stringify(r))}),o}var ak={},ck=t=>fn.getAppCacheKey(`PrimaryFields-${t}`),zIe=async(t,e,n,o,r)=>{let i=fn.getData(O.getDefaultQualifiedName("D_pxGetPrimaryFieldsForInsights"),{dataViewParameters:{...e&&{topLevelClassID:e},...o&&{joinedClassIDs:o.join(",")},...n&&{topLevelDataPageID:n}}},r).then(s=>{let a=s.data?.data||[],c={};t.forEach(l=>{c[l]=[]}),a.forEach(l=>{let u=l.classID,p=l[O.getDefaultQualifiedName("pyFieldName")];c[u].push(p)}),Object.entries(c).forEach(([l,u])=>{let p=ck(l);Hn.setItem(p,JSON.stringify(u))})}).finally(()=>{t.forEach(s=>{delete ak[s]})});return t.forEach(s=>{ak[s]=i}),i};function jIe(t,e){let n=[],o=[],r=!1,i=[],s=[];return t&&s.push(t),e&&e.length>0&&s.push(...e),s.forEach(a=>{let c=ck(a);if(Hn.getItem(c))return;let l=ak[a];if(l){o.push(l);return}n.push(a),a===t?r=!0:i.push(a)}),{allClasses:s,promisesToAwait:o,classesToFetch:n,isTopLevelClassPresent:r,joinedClassesToFetch:i}}async function FIe(t,e,n,o){let{allClasses:r,promisesToAwait:i,classesToFetch:s,isTopLevelClassPresent:a,joinedClassesToFetch:c}=jIe(t,n);return s.length&&i.push(zIe(s,a?t:void 0,a?e:void 0,c.length>0?c:void 0,o)),Promise.allSettled(i).then(()=>{let l={};return r.forEach(u=>{let p=ck(u);if(Hn.getItem(p))try{l[u]=JSON.parse(`${Hn.getItem(p)}`)}catch{}}),{data:l}})}function VIe(t){let e;return t[1].category?e=t[1].category:t[0].indexOf(":")>0&&(e=t[0].substring(0,t[0].indexOf(":"))),e}function CK(t){return typeof t=="object"&&t!==null}function BIe(t){return CK(t)&&typeof t.classID=="string"&&Array.isArray(t.fields)}function HIe(t){return{...t[1],fieldID:t[0],fieldType:t[1].fieldType||(t[1].isUserReference?"User reference":void 0),category:VIe(t),classID:t[1].associationClassID?t[1].associationClassID:t[1].classID}}function SK({data:t}){let e=(i,s)=>Gi("FIELD",i,s),n=typeof t.classID=="string"?t.classID:"",o=Gi("CASE",n);t.classNameLocaleReference=o;let r=Array.isArray(t.fields)?t.fields:[];for(let i=0;i<r.length;i+=1){let s=r[i];if(CK(s)){let a={nameLocaleReference:"INSIGHTS",categoryLocaleReference:"INSIGHTS",parentCategoryLocaleReference:"INSIGHTS"},c=s.definedOnClassIDs;if(typeof c=="string"){let l=c.split(":").reverse(),p=(typeof s.fieldID=="string"?s.fieldID:"").split("!").pop()?.split(":").reverse()||[];l[0]&&p[0]&&(a.nameLocaleReference=e(p[0],l[0])),l[1]&&p[1]&&(a.categoryLocaleReference=e(p[1],l[1])),l[2]&&p[2]?a.parentCategoryLocaleReference=e(p[2],l[2]):s.parentCategory&&(a.parentCategoryLocaleReference=o)}Object.assign(s,a)}}return{data:t}}function GIe(t,e,n){if(!e){let{sourceMetadata:r,sourceFields:i}=kIe(t);if(r&&i&&Object.keys(i).length>0){let s={...r,fields:Object.entries(i).map(HIe)};if(BIe(s)){let a=SK({data:s});return Promise.resolve(a)}}}let o={dataSource:t,columns:[],parameters:{},associationFilter:n,matchPosition:"",ignoreCase:!1};return Vo.init(o).then(({dataSourceMetaData:r})=>r?SK({data:r}):{data:{classID:"",className:"",isQueryable:!1,fields:[]}})}function qIe(){let{restApi:t,reqType:e}=F(EIe);return k(t,{method:e})}function WIe(t){let e=dM(t);if(e)return Promise.resolve({data:{pyInsights:[e]}});let n={insightID:t},{restApi:o,reqType:r}=F(EK,n);return k(o,{method:r})}function KIe(t){let e={insightID:t.join(",")},{restApi:n,reqType:o}=F(EK,e);return k(n,{method:o})}function JIe(t){let{restApi:e,reqType:n}=F(CIe);return k(e,{method:n,body:JSON.stringify(t),headers:{"Content-Type":"application/json"}})}function YIe(t,e){let n={insightID:t},{restApi:o,reqType:r}=F(NIe,n),i;return"UpdateDateTime"in e&&(i=e.UpdateDateTime),k(o,{method:r,body:JSON.stringify(e),headers:{"if-match":i,"Content-Type":"application/json"}})}function ZIe(t){let e={insightID:t},{restApi:n,reqType:o}=F(IIe,e);return k(n,{method:o})}function QIe(t){let{restApi:e,reqType:n}=F(_Ie);return k(e,{method:n,body:JSON.stringify(t)})}function XIe(t){let{restApi:e,reqType:n}=F(bIe);return k(e,{method:n,body:JSON.stringify(t)})}var e_e=(t,e)=>{let n={insightID:t},{restApi:o,reqType:r}=F(TIe,n);return k(o,{method:r,body:JSON.stringify(e)})},t_e=(t,e,n)=>{let o={insightID:t,scheduleID:e},{restApi:r,reqType:i}=F(vIe,o);return k(r,{method:i,body:JSON.stringify(n)})},n_e=(t,e)=>{let n={insightID:t,scheduleID:e},{restApi:o,reqType:r}=F(RIe,n);return k(o,{method:r})};function r_e(t){let{restApi:e,reqType:n}=F(PIe);return k(e,{method:n,body:JSON.stringify(t)})}var IK={getDataObjects:DIe,getDataPageObjects:xIe,getDataViewMetadata:GIe,getDefaultColumns:wIe,getFieldsForDataSource:LIe,getPrimaryFieldsForDataSource:UIe,getPrimaryFieldsForInsights:FIe,getInsightIDs:qIe,getInsightByID:WIe,getInsightsByID:KIe,loadClassResources:$Ie,createInsight:JIe,updateInsight:YIe,deleteInsight:ZIe,exportToExcel:QIe,exportToCSV:XIe,scheduleInsight:e_e,updateScheduledInsight:t_e,deleteScheduledInsight:n_e,translateStrings:r_e};var lk=class{addRoutes=e=>N5(e)},_K=new lk;var uk=class{static registerModule(e,n,o){Object.assign(o,{[e]:()=>n})}},bK=uk;var dk=class{static getPostActionEvent=()=>A.PUB_SUB_EVENTS.EVENT_POST_ACTION;static getCaseEvent=()=>Object.freeze(A.PUB_SUB_EVENTS.CASE_EVENTS);static getDataEvent=()=>Object.freeze(A.PUB_SUB_EVENTS.DATA_EVENTS);static getTransientEvent=()=>Object.freeze(A.PUB_SUB_EVENTS.EVENT_TRANSIENT_ITEMS);static getBootstrapShellEvent=()=>Object.freeze(A.PUB_SUB_EVENTS.BOOTSTRAP_SHELL_EVENTS);static getBulkProcessEvent=()=>Object.freeze(A.PUB_SUB_EVENTS.EVENT_BULKACTION);static getLocalActionProcessEvent=()=>Object.freeze(A.PUB_SUB_EVENTS.EVENT_LOCALACTION_SUBMISSION)},TK=dk;var pk=class{genericFailedMessage;constructor(){this.genericFailedMessage="Failed to display content. Contact the application administrator."}getGenericFailedMessage(){return this.genericFailedMessage}setGenericFailedMessage(e){this.genericFailedMessage=e}},vK=new pk;var o_e=t=>{gs({tokenInfo:t}),t?.csrf&&!t?.access_token?mo({pzCTkn:t?.csrf}):mo({Authorization:`${t?.token_type} ${t?.access_token}`}),setTimeout(()=>w.publish("updateSession",{updateStatus:"success"}),0)},i_e=t=>aA.init(t),s_e=async()=>nj(),a_e=t=>{mo({Authorization:t}),setTimeout(()=>w.publish("updateSession",{updateStatus:"success"}),0)},RK={setTokens:o_e,revokeTokens:s_e,getAuthInstance:i_e,setAuthorizationHeader:a_e};var Ik={};tn(Ik,{SDK_VERSION:()=>Ck,compareSdkPCoreVersions:()=>B_e,createCustomEvent:()=>ibe,dateFormatInfoDefault:()=>MK,filterForFieldValueList:()=>Z_e,getAllFields:()=>Y_e,getAutoFlexClass:()=>nbe,getBooleanValue:()=>U_e,getCurrentTimezone:()=>j_e,getDateFormatInfo:()=>F_e,getFilteredStages:()=>ebe,getInitials:()=>z_e,getInstructions:()=>Q_e,getIsAssignmentView:()=>LK,getLocale:()=>kK,getOptionList:()=>K_e,getReferenceList:()=>V_e,getSDKAssignmentUtils:()=>sbe,getSDKCaseUtils:()=>abe,getSDKContainerUtils:()=>cbe,getSDKDashboardUtils:()=>lbe,getSdkVersion:()=>H_e,getUniqueControlID:()=>k_e,getVBodyClass:()=>tbe,handleEvent:()=>J_e,initPConnectField:()=>X_e,isLastStep:()=>rbe,resetControlID:()=>L_e,resolveContext:()=>obe,setVisibilityForList:()=>Ak});var mk={};tn(mk,{findCurrentIndices:()=>NK,flattenSteps:()=>PK,getAssignmentValidationMessages:()=>p_e,getRefreshProps:()=>OK,handleAssignmentButtonPress:()=>m_e,handleSaveActionSuccess:()=>xK,hasNavigation:()=>c_e,isVerticalNavigation:()=>l_e,parseActionButtons:()=>d_e,registerRefresh:()=>u_e});function PK(t,e=[]){for(let n of t)n.steps?PK(n.steps,e):e.push(n);return e}function NK(t,e,n){let o=0;for(let r of t)r.visited_status==="current"?(e[n]=o,r.step_status=""):r.visited_status==="success"?(o+=1,r.step_status="completed"):(o+=1,r.step_status=""),r.steps&&NK(r.steps,e,n+1);return e}function c_e(t){if(!t)return!1;let e=t.template?.toLowerCase()==="standard",n=t.steps?.length===1;return!e&&!n}function l_e(t){return t?.template?.toLowerCase()==="vertical"}function OK(t){return t?t.filter(e=>e.event==="Changes"&&e.field).map(e=>[e.field,e.field?.substring(1)??""]):[]}function u_e(t){let e=t.getCaseInfo().getActionRefreshConditions?.(),n=t.getContextName(),o=t.getPageReference();PCore.getRefreshManager().deRegisterForRefresh(n);let r=OK(e);if(r.length===0)return;let i=t.getCaseInfo().getKey(),s={autoDetectRefresh:!0,preserveClientChanges:!1},a=PCore.getRefreshManager();for(let c of r)a.registerForRefresh("PROP_CHANGE",t.getActionsApi().refreshCaseView.bind(t.getActionsApi(),i,"",o,{...s,refreshFor:c[0]}),`${o}.${c[1]}`,`${n}/${o}`,n)}function d_e(t){return{main:t?.main??[],secondary:t?.secondary??[]}}function p_e(t,e){try{return PCore.getMessageManager().getValidationErrorMessages(t,e)??[]}catch{return[]}}function xK(t,e,n){t.cancelAssignment(e,!1).then(()=>{PCore.getPubSubUtils().publish(PCore.getConstants().PUB_SUB_EVENTS.CASE_EVENTS.CREATE_STAGE_SAVED,n)})}function m_e(t){let{sAction:e,sButtonType:n,itemKey:o,isInModal:r,getPConnect:i,actionsApi:s,localizedVal:a,localeCategory:c,showToast:l}=t;if(n==="secondary")switch(e){case"navigateToStep":{s.navigateToStep("previous",o).then(()=>{}).catch(()=>{l(a("Navigation failed!",c))});break}case"saveAssignment":{let u=i(),p=u.getCaseInfo().getKey(),m=u.getCaseInfo().getAssignmentID();s.saveAssignment?.(o)?.then(()=>{let f=u.getCaseInfo().c11nEnv.getValue(PCore.getConstants().CASE_INFO.CASE_TYPE_ID);xK(s,o,{caseType:f,caseID:p,assignmentID:m})})?.catch(()=>{l(a("Save failed",c))});break}case"cancelAssignment":{let{PUB_SUB_EVENTS:u}=PCore.getConstants(),{publish:p}=PCore.getPubSubUtils(),m=i(),f=m.getCaseInfo().isAssignmentInCreateStage(),g=m.getCaseInfo().isLocalAction()||!!(PCore.getConstants().CASE_INFO.IS_LOCAL_ACTION&&m.getValue(PCore.getConstants().CASE_INFO.IS_LOCAL_ACTION));f&&r&&!g?s.cancelCreateStageAssignment(o).then(h=>{p(u.EVENT_CANCEL,h)}).catch(()=>{l(a("Cancel failed!",c))}):s.cancelAssignment(o,!1).then(h=>{p(u.EVENT_CANCEL,h)}).catch(()=>{l(a("Cancel failed!",c))});break}case"rejectCase":{s.rejectCase?.(o)?.then(()=>{})?.catch(()=>{l(a("Rejection failed!",c))});break}default:break}else if(n==="primary")switch(e){case"finishAssignment":{s.finishAssignment(o).then(()=>{}).catch(()=>{l(a("Submit failed!",c))});break}case"approveCase":{s.approveCase?.(o)?.then(()=>{})?.catch(()=>{l(a("Approve failed!",c))});break}default:break}}var fk={};tn(fk,{extractTabsInfo:()=>h_e,filterSummaryFields:()=>f_e,getChildRegionByName:()=>g_e,openCaseEditAction:()=>S_e,resolveCaseTypeIcon:()=>y_e});function f_e(t){let e=t().getRawMetadata(),n=e.children?.[0],o=e.children?.[1],r=n?.children??[],i=o?.children??[],s=r.filter(c=>t().resolveConfigProps(c.config).visibility!==!1&&c.type!=="TextContent"),a=i.filter(c=>t().resolveConfigProps(c.config).visibility!==!1&&c.type!=="TextContent");return[s,a]}function g_e(t,e){for(let n of t){let o=n.props?.getPConnect?.();if(o){let r=o.getRawMetadata?.();if(r?.type?.toLowerCase()==="region"&&r?.name?.toLowerCase()===e.toLowerCase())return n}}return null}function h_e(t){let e=[],n=[],o=t?.props?.getPConnect?.()?.getChildren?.();return o?(o.forEach((r,i)=>{let s=r.getPConnect().getConfigProps(),{label:a}=s,{inheritedProps:c,visibility:l}=s;if(!a&&c){let u=c.find(p=>p.prop==="label");u&&(a=u.value)}(l===void 0||l===!0)&&(e.push({name:a??"",id:i}),n.push({type:"DeferLoad",config:s}))}),{vertTabInfo:e,deferLoadInfo:n}):{vertTabInfo:e,deferLoadInfo:n}}function y_e(t,e){let n=t?t.replace("pi pi-",""):e;return!n||n.includes(".")?"polaris-solid":n}function S_e(t,e){let n=t.getActionsApi();n.openLocalAction.bind(n)(e.ID,{...e,containerName:"modal",type:"express"})}var yk={};tn(yk,{addContainerItem:()=>C_e,addFlowContainerItem:()=>__e,configureBrowserBookmark:()=>I_e,getActiveCaseActionName:()=>DK,getFirstCaseActionName:()=>N_e,getToDoAssignments:()=>P_e,getTodoVisibility:()=>hk,hasContainerItems:()=>b_e,isCaseWideLocalAction:()=>gk,isContainerInitialized:()=>E_e,isRenderWithToDoWrapper:()=>O_e,setContainerLimit:()=>A_e,showBanner:()=>R_e});function E_e(t){let e=t.getContextName(),n=t.getContainerName();return PCore.getContainerUtils().isContainerInitialized(e,n)??!1}function A_e(t,e,n,o){let{CONTAINER_TYPE:r}=PCore.getConstants();if(n===r.MULTIPLE&&o){let i=t.getContextName();PCore.getContainerUtils().setContainerLimit(`${i}/${e}`,o)}}function C_e(t){let e=t.getContainerManager(),n=t.getContextName();e.addContainerItem({context:n,semanticURL:""})}function I_e(t){let e=p=>p,n=t.getContextName(),o=t.getContainerName(),r=PCore.getEnvironmentInfo(),{APP:i}=PCore.getConstants(),s=t.getValue(`pyPortal.${e("pyPrimaryNavPages")}`),a="",c="",l="",u=r?.environmentInfoObject?.pyExecutionRuntimeName===i.INFINITY_RUNTIME;if(Array.isArray(s)&&s.length>0){let p=s[0],m=p.NavigationPages?.[0];u?m?.[e("pyRuleName")]?(a=m[e("pyRuleName")],c=m[e("pyClassName")]??""):p?.[e("pyRuleName")]?(a=p[e("pyRuleName")],c=p[e("pyClassName")]??""):m?.[e("pyLabel")]?l=m[e("pyLabel")]:p?.[e("pyLabel")]&&(l=p[e("pyLabel")]):m?.[e("pyLabel")]?l=m[e("pyLabel")]:p?.[e("pyLabel")]&&(l=p[e("pyLabel")])}try{PCore.configureForBrowserBookmark({context:n,containerName:o,acName:o,semanticURL:"",defaultViewLabel:l,ruleName:a,className:c})}catch{}}function __e(t){let e=t.getContainerManager(),n=t.getContextName(),o=t.getValue("context_data.caseViewMode"),r,i;if(o!=="review"){let s=n.substring(0,n.lastIndexOf("_")),a=PCore.getContainerUtils().getActiveContainerItemName(s),c=PCore.getContainerUtils().getContainerItemData(s,a);c&&({key:r,flowName:i}=c)}e.addContainerItem({semanticURL:"",key:r,flowName:i,caseViewMode:"perform",resourceType:"ASSIGNMENT",data:t.getDataObject(n)})}function b_e(t){let e=t.getContextName(),n=t.getContainerName();return!!PCore.getContainerUtils().hasContainerItems(`${e}/${n}`)}function cm(){return PCore.getConstants().CASE_INFO}function DK(t){let e=cm(),n=t.getValue(e.CASE_INFO_ACTIONS),o=t.getValue(e.ACTIVE_ACTION_ID);return n?.find(i=>i.ID===o)?.name??""}function gk(t){let e=cm(),n=t.getValue(e.ACTIVE_ACTION_ID),o=t.getValue(e.CASE_INFO_ACTIONS);return o&&n?o.find(i=>i.ID===n)?.type==="Case":!1}function $K(t){let e=cm(),n=t.getValue(e.CHILD_ASSIGNMENTS),o=[];if(n&&n.length>0){for(let{assignments:r,Name:i}of n)if(r)for(let s of r)o.push({...s,caseName:i})}return o}function T_e(t){return!!t.getValue("caseMessages")}function v_e(t){let e=cm(),n=t.getValue(e.D_CASE_ASSIGNMENTS_RESULTS),o=$K(t);return!!(n||o.length>0||gk(t))}function R_e(t){let e=t();return T_e(e)||!v_e(e)}function hk(t){return t.getValue("context_data.caseViewMode")!=="perform"}function P_e(t){let e=cm(),n=t.getValue(e.CASE_INFO_ACTIONS),o=t.getValue(e.ASSIGNMENT_LABEL),r=t.getValue(e.D_CASE_ASSIGNMENTS_RESULTS)??[],s=$K(t).map(c=>({...c,isChild:!0})),a=[...r,...s];if(n&&!hk(t)){let c=DK(t);return a.map(l=>({...l,name:c||o}))}return a}function N_e(t){let e=cm();return t.getValue(e.CASE_INFO_ACTIONS)?.[0]?.name??""}function O_e(t,e){let n=t(),{showWithToDo:o}=e;return!!(o&&(!gk(n)||hk(n)))}var Sk={};tn(Sk,{combineFilters:()=>x_e,convertDateToGMT:()=>D_e,createFilter:()=>wK,getFilterExpression:()=>w_e,getFormattedDate:()=>$_e,getLayoutDataFromRegion:()=>M_e});function wK(t,e,n="EQ"){return{condition:{lhs:{field:e},comparator:n,rhs:{value:t}}}}function x_e(t,e){return t&&t.length?e?{AND:[e,...t]}:t.length>1?{AND:[...t]}:t[0]:e}function D_e(t){let{valueAsISOString:e}=t;return e?e.substring(0,e.indexOf("T")):void 0}function $_e(t){if(t)return`${t.getFullYear()}-${`0${t.getMonth()+1}`.slice(-2)}-${`0${t.getDate()}`.slice(-2)}`}function w_e(t,e,n){if(t==="")return null;let o="EQ";return n.type==="TextInput"&&!n.isNumber&&(o="CONTAINS"),n.config.filterType==="RelativeDates"?"":wK(t,e,o)}function M_e(t){let e={width:"full",fillAvailable:!0,minWidth:[300,"px"]};return t.props?.getPConnect()?.getChildren()?.map((n,o)=>{let r=n?.getPConnect();return{id:r?.getComponentName()?`${r.getComponentName()}--${o}`:`item--${o}`,content:r?.getComponent(),layoutConfig:{...e,...r?.getConfigProps().layoutConfig}}})}var Ck="0.1.0",MK={dateFormatString:"MM/DD/YYYY",dateFormatStringLong:"MMM DD, YYYY",dateFormatStringLC:"mm/dd/yyyy",dateFormatMask:"__/__/____"},Ek=0;function k_e(){return Ek+=1,`control-${Ek}`}function L_e(){Ek=0}function U_e(t){if(typeof t=="string"){let e=t.toLowerCase();return e==="true"||e==="on"||e===""}return!!t}function z_e(t){if(!t)return"";let e=t.charAt(0),n=t.lastIndexOf(" "),o=t.lastIndexOf(".");return n>0?e+=t.substring(n+1).charAt(0):o>0&&(e+=t.substring(o+1).charAt(0)),e.toUpperCase()}function kK(t=""){if(t)return t;let e=PCore.getEnvironmentInfo().getLocale?.();return e||(typeof document<"u"&&document.documentElement?.lang?document.documentElement.lang:Intl.DateTimeFormat().resolvedOptions().locale)}function j_e(t){if(t)return t;let e=PCore.getLocaleUtils().getTimeZoneInUse?.();return e||Intl.DateTimeFormat().resolvedOptions().timeZone}function F_e(){let t=PCore.getLocaleUtils(),e={...MK},n=kK(),o=new Date(Date.parse("30 November 2023 12:00:00 GMT")),r=new Intl.DateTimeFormat(n).format(o),i=r.indexOf("11"),s=r.indexOf("30"),a=r.indexOf("2023"),c=t.getLocaleValue("month_placeholder","CosmosFields")!=="month_placeholder"||t.getLocaleValue("day_placeholder","CosmosFields")!=="day_placeholder"||t.getLocaleValue("year_placeholder","CosmosFields")!=="year_placeholder",l=[{loc:i,format:"MM",longFormat:"MMM",placeholder:c?t.getLocaleValue("month_placeholder","CosmosFields"):"mm",mask:"__",separator:r[i+2]},{loc:s,format:"DD",longFormat:"DD",placeholder:c?t.getLocaleValue("day_placeholder","CosmosFields"):"dd",mask:"__",separator:r[s+2]},{loc:a,format:"YYYY",longFormat:"YYYY",placeholder:c?t.getLocaleValue("year_placeholder","CosmosFields"):"yyyy",mask:"____",separator:r[a+4]}];return l.sort((u,p)=>u.loc-p.loc),e.dateFormatString=`${l[0].format}${l[0].separator}${l[1].format}${l[1].separator}${l[2].format}`,e.dateFormatStringLong=`${l[0].longFormat} ${l[1].longFormat}, ${l[2].longFormat}`,e.dateFormatStringLC=`${l[0].placeholder}${l[0].separator}${l[1].placeholder}${l[1].separator}${l[2].placeholder}`,e.dateFormatMask=`${l[0].mask}${l[0].separator}${l[1].mask}${l[1].separator}${l[2].mask}`,e}function V_e(t){let e=t.getComponentConfig(),n=String(e.referenceList??"").replace("@P ","");if(n.includes("D_")){let o=t.resolveDatasourceReference?.(n);o!=null&&(typeof o=="object"&&"pxResults"in o?n=o.pxResults:typeof o=="string"&&o.startsWith("D_")&&!o.endsWith(".pxResults")&&(n=`${o}.pxResults`))}return n}function B_e(){console.warn(`Using Constellation version ${PCore.getPCoreVersion()}. SDK version: ${Ck}. Ensure the Constellation version matches your Infinity server.`)}function H_e(){return Ck}function G_e(t){if(typeof t=="string")return t;if(t)return String(t)}function q_e(t){return typeof t.datasource=="object"&&Array.isArray(t.datasource)?t.datasource:[]}function W_e(t,e){let n=t.datasource;if(typeof n=="string"&&e[n])return[];let o=t.listOutput;if(typeof n=="object"&&!Array.isArray(o)){let r=n.source;o=Array.isArray(r)?r:[]}return(o??[]).forEach(r=>{r.value=r.text??r.value}),o??[]}function K_e(t,e={}){let n=t.listType;return n?n.toLowerCase()==="associated"?q_e(t):n.toLowerCase()==="datapage"?W_e(t,e):[]:[]}function J_e(t,e,n,o){switch(e){case"change":t.updateFieldValue(n,o);break;case"blur":t.triggerFieldChange(n,o);break;case"changeNblur":t.updateFieldValue(n,o),t.triggerFieldChange(n,o);break;default:break}}function Y_e(t){let e=t.getRawMetadata()?.children;return Array.isArray(e)?e.map(n=>(Array.isArray(n.children)?n.children:[]).map(r=>r.config??{})):[]}function Z_e(t){return t.filter(({visibility:e})=>e!==!1).map(({value:e,label:n})=>({id:(n??"").toLowerCase(),name:n??"",value:e}))}function LK(t){let e=String(t.getValue(A.CASE_INFO.CASE_INFO_CLASSID)??""),o=`${String(t.getValue(A.CASE_INFO.ASSIGNMENTACTION_ID)??"")}!${e}`,r=`${t.getCurrentView()}!${t.getCurrentClassID()}`;return o===r}function Q_e(t,e="casestep"){let n=G_e(t.getValue(A.CASE_INFO.INSTRUCTIONS)),o=LK(t);switch(e){case"casestep":return o&&n?.length?n:void 0;case"none":return;default:return e.startsWith("@PARAGRAPH")?void 0:e}}function Ak(t,e){let{selectionMode:n,selectionList:o,renderMode:r,referenceList:i}=t.getComponentConfig(),s=A.LIST_SELECTION_MODE;(n===s.MULTI&&o||r==="Editable"&&i)&&t.getListActions()?.setVisibility(e)}function X_e(t){if(t.isEditable()){let e=t.getActionsApi();e&&(t.setAction?.("onChange",n=>{e.changeHandler?.(t,n)}),t.setAction?.("onBlur",n=>{e.eventHandler?.(t,n)}))}return t.addFormField(),Ak(t,!0),()=>{t.removeFormField?.(),Ak(t,!1),t.removeNode()}}function ebe(t){return Array.isArray(t)?t.filter(e=>e.type!=="Alternate"||e.type==="Alternate"&&e.visited_status==="active"):[]}function tbe(t,e){let n="psdk-vertical-step-body";return t<e-1?`${n} psdk-vertical-step-line`:n}function nbe(t,e){let n=e.length,o=e[n-1],r=e.findIndex(a=>a.ID===t?.ID),i=t.visited_status==="current",s=r===n-2&&o?.visited_status==="current";return i||s?"flex-auto":""}function rbe(t,e){return t===e-1}function obe(t){return t?t.replace(/\((\d+)\)/g,(e,n)=>`[${parseInt(n,10)-1}]`):null}function ibe(t,e){return typeof window<"u"?new CustomEvent(t,{detail:{additionalData:e}}):null}function sbe(){return mk}function abe(){return fk}function cbe(){return yk}function lbe(){return Sk}var _k=class{getDebouncedSubject(e){return new _a().pipe(yf(e))}},UK=new _k;var ube=(()=>{let t="[!#-'*+/0-9=?A-Z\\^_`a-z{|}~\\-]+",e="\\\\[\\x00-\\x7f]",n=`"(?:[^\\r"\\\\\\x80-\\xff]|${e})*"`,o=`\\[(?:[^\\r\\[\\]\\\\\\x80-\\xff]|${e})*\\]`,r=`(?:${t}|${n})`,i=`(?:${t}|${o})`,s=`${r}(?:\\.${r})*`,a=`${i}(?:\\.${i})*`;return new RegExp(`^${s}@${a}$`)})();function dbe(t){return ube.test(t)}var pbe=(()=>{let e="[A-Za-z0-9!#$%&'*+/=?^_`{|}~-]+",u=`${`(?:${`${e}(?:\\.${e})*`}|"(?:[^\\x0d\\x22\\x5c]|\\\\[\\x00-\\x7f])+")`}@(?:[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?\\.)+[A-Za-z]{2,63}`;return new RegExp(`^${u}$`)})();function mbe(t){return pbe.test(t)}Ft.register("email",(t,{useRFC822Validation:e})=>{let n=null,o=e?dbe(t):mbe(t);return t&&!o&&(n="Enter a valid email address"),n});Ft.register("integer",t=>{let e=null;return t&&!/^(-)?\d+$/.test(t)&&(e="Invalid number"),e});Ft.register("required",t=>Array.isArray(t)&&t.length===0||t==null||t===""?"Cannot be blank":null);function fbe(t){if(We.isStaticContentReference(t))return!0;try{let e=new URL(t);return e.protocol==="http:"||e.protocol==="https:"||e.protocol==="ftp:"}catch{return!1}}Ft.register("url",t=>{let e=null;return t&&!fbe(t)&&(e="Enter a valid url"),e});var OT={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|[2-467])\\d{4}",[5,6]],AD:["376","00","(?:1|6\\d)\\d{7}|[135-9]\\d{5}",[6,8,9],[["(\\d{3})(\\d{3})","$1 $2",["[135-9]"]],["(\\d{4})(\\d{4})","$1 $2",["1"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]]],AE:["971","00","(?:[4-7]\\d|9[0-689])\\d{7}|800\\d{2,9}|[2-4679]\\d{7}",[5,6,7,8,9,10,11,12],[["(\\d{3})(\\d{2,9})","$1 $2",["60|8"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[236]|[479][2-8]"],"0$1"],["(\\d{3})(\\d)(\\d{5})","$1 $2 $3",["[479]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"]],"0"],AF:["93","00","[2-7]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"]],"0"],AG:["1","011","(?:268|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([457]\\d{6})$|1","268$1",0,"268"],AI:["1","011","(?:264|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2457]\\d{6})$|1","264$1",0,"264"],AL:["355","00","(?:700\\d\\d|900)\\d{3}|8\\d{5,7}|(?:[2-5]|6\\d)\\d{7}",[6,7,8,9],[["(\\d{3})(\\d{3,4})","$1 $2",["80|9"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["4[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2358][2-5]|4"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["[23578]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["6"],"0$1"]],"0"],AM:["374","00","(?:[1-489]\\d|55|60|77)\\d{6}",[8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[89]0"],"0 $1"],["(\\d{3})(\\d{5})","$1 $2",["2|3[12]"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["1|47"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[3-9]"],"0$1"]],"0"],AO:["244","00","[29]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[29]"]]]],AR:["54","00","(?:11|[89]\\d\\d)\\d{8}|[2368]\\d{9}",[10,11],[["(\\d{4})(\\d{2})(\\d{4})","$1 $2-$3",["2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9])","2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8]))|2(?:2[24-9]|3[1-59]|47)","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5[56][46]|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|58|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|54(?:4|5[13-7]|6[89])|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:454|85[56])[46]|3(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["1"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[68]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2-$3",["[23]"],"0$1",1],["(\\d)(\\d{4})(\\d{2})(\\d{4})","$2 15-$3-$4",["9(?:2[2-469]|3[3-578])","9(?:2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9]))","9(?:2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8])))|92(?:2[24-9]|3[1-59]|47)","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5(?:[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|5(?:4(?:4|5[13-7]|6[89])|[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",0,"$1 $2 $3-$4"],["(\\d)(\\d{2})(\\d{4})(\\d{4})","$2 15-$3-$4",["91"],"0$1",0,"$1 $2 $3-$4"],["(\\d{3})(\\d{3})(\\d{5})","$1-$2-$3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{4})","$2 15-$3-$4",["9"],"0$1",0,"$1 $2 $3-$4"]],"0",0,"0?(?:(11|2(?:2(?:02?|[13]|2[13-79]|4[1-6]|5[2457]|6[124-8]|7[1-4]|8[13-6]|9[1267])|3(?:02?|1[467]|2[03-6]|3[13-8]|[49][2-6]|5[2-8]|[67])|4(?:7[3-578]|9)|6(?:[0136]|2[24-6]|4[6-8]?|5[15-8])|80|9(?:0[1-3]|[19]|2\\d|3[1-6]|4[02568]?|5[2-4]|6[2-46]|72?|8[23]?))|3(?:3(?:2[79]|6|8[2578])|4(?:0[0-24-9]|[12]|3[5-8]?|4[24-7]|5[4-68]?|6[02-9]|7[126]|8[2379]?|9[1-36-8])|5(?:1|2[1245]|3[237]?|4[1-46-9]|6[2-4]|7[1-6]|8[2-5]?)|6[24]|7(?:[069]|1[1568]|2[15]|3[145]|4[13]|5[14-8]|7[2-57]|8[126])|8(?:[01]|2[15-7]|3[2578]?|4[13-6]|5[4-8]?|6[1-357-9]|7[36-8]?|8[5-8]?|9[124])))15)?","9$1"],AS:["1","011","(?:[58]\\d\\d|684|900)\\d{7}",[10],0,"1",0,"([267]\\d{6})$|1","684$1",0,"684"],AT:["43","00","1\\d{3,12}|2\\d{6,12}|43(?:(?:0\\d|5[02-9])\\d{3,9}|2\\d{4,5}|[3467]\\d{4}|8\\d{4,6}|9\\d{4,7})|5\\d{4,12}|8\\d{7,12}|9\\d{8,12}|(?:[367]\\d|4[0-24-9])\\d{4,11}",[4,5,6,7,8,9,10,11,12,13],[["(\\d)(\\d{3,12})","$1 $2",["1(?:11|[2-9])"],"0$1"],["(\\d{3})(\\d{2})","$1 $2",["517"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["5[079]"],"0$1"],["(\\d{3})(\\d{3,10})","$1 $2",["(?:31|4)6|51|6(?:48|5[0-3579]|[6-9])|7(?:20|32|8)|[89]","(?:31|4)6|51|6(?:485|5[0-3579]|[6-9])|7(?:20|32|8)|[89]"],"0$1"],["(\\d{4})(\\d{3,9})","$1 $2",["[2-467]|5[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["5"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,7})","$1 $2 $3",["5"],"0$1"]],"0"],AU:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{7}(?:\\d(?:\\d{2})?)?|8[0-24-9]\\d{7})|[2-478]\\d{8}|1\\d{4,7}",[5,6,7,8,9,10,12],[["(\\d{2})(\\d{3,4})","$1 $2",["16"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,4})","$1 $2 $3",["16"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["14|4"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[2378]"],"(0$1)"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:30|[89])"]]],"0",0,"(183[12])|0",0,0,0,[["(?:(?:241|349)0\\d\\d|8(?:51(?:0(?:0[03-9]|[12479]\\d|3[2-9]|5[0-8]|6[1-9]|8[0-7])|1(?:[0235689]\\d|1[0-69]|4[0-589]|7[0-47-9])|2(?:0[0-79]|[18][13579]|2[14-9]|3[0-46-9]|[4-6]\\d|7[89]|9[0-4])|[34]\\d\\d)|91(?:(?:[0-58]\\d|6[0135-9])\\d|7(?:0[0-24-9]|[1-9]\\d)|9(?:[0-46-9]\\d|5[0-79]))))\\d{3}|(?:2(?:[0-26-9]\\d|3[0-8]|4[02-9]|5[0135-9])|3(?:[0-3589]\\d|4[0-578]|6[1-9]|7[0-35-9])|7(?:[013-57-9]\\d|2[0-8])|8(?:55|6[0-8]|[78]\\d|9[02-9]))\\d{6}",[9]],["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,["163\\d{2,6}",[5,6,7,8,9]],["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],AW:["297","00","(?:[25-79]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[25-9]"]]]],AX:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","2\\d{4,9}|35\\d{4,5}|(?:60\\d\\d|800)\\d{4,6}|7\\d{5,11}|(?:[14]\\d|3[0-46-9]|50)\\d{4,8}",[5,6,7,8,9,10,11,12],0,"0",0,0,0,0,"18",0,"00"],AZ:["994","00","365\\d{6}|(?:[124579]\\d|60|88)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[28]|2|365|46","1[28]|2|365[45]|46","1[28]|2|365(?:4|5[02])|46"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[13-9]"],"0$1"]],"0"],BA:["387","00","6\\d{8}|(?:[35689]\\d|49|70)\\d{6}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["6[1-3]|[7-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2-$3",["[3-5]|6[56]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["6"],"0$1"]],"0"],BB:["1","011","(?:246|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","246$1",0,"246"],BD:["880","00","[1-469]\\d{9}|8[0-79]\\d{7,8}|[2-79]\\d{8}|[2-9]\\d{7}|[3-9]\\d{6}|[57-9]\\d{5}",[6,7,8,9,10],[["(\\d{2})(\\d{4,6})","$1-$2",["31[5-8]|[459]1"],"0$1"],["(\\d{3})(\\d{3,7})","$1-$2",["3(?:[67]|8[013-9])|4(?:6[168]|7|[89][18])|5(?:6[128]|9)|6(?:[15]|28|4[14])|7[2-589]|8(?:0[014-9]|[12])|9[358]|(?:3[2-5]|4[235]|5[2-578]|6[0389]|76|8[3-7]|9[24])1|(?:44|66)[01346-9]"],"0$1"],["(\\d{4})(\\d{3,6})","$1-$2",["[13-9]|2[23]"],"0$1"],["(\\d)(\\d{7,8})","$1-$2",["2"],"0$1"]],"0"],BE:["32","00","4\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:80|9)0"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[239]|4[23]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[15-8]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4"],"0$1"]],"0"],BF:["226","00","[024-7]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[024-7]"]]]],BG:["359","00","00800\\d{7}|[2-7]\\d{6,7}|[89]\\d{6,8}|2\\d{5}",[6,7,8,9,12],[["(\\d)(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["43[1-6]|70[1-9]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[356]|4[124-7]|7[1-9]|8[1-6]|9[1-7]"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:70|8)0"],"0$1"],["(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3",["43[1-7]|7"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[48]|9[08]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"]],"0"],BH:["973","00","[136-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[13679]|8[02-4679]"]]]],BI:["257","00","(?:[267]\\d|31)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2367]"]]]],BJ:["229","00","(?:01\\d|8)\\d{7}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["0"]]]],BL:["590","00","7090\\d{5}|(?:[56]9|[89]\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["(?:59(?:0(?:2[7-9]|3[3-7]|5[12]|87)|87\\d)|80[6-9]\\d\\d)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5]))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],["8[129]\\d{7}"],0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],BM:["1","011","(?:441|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","441$1",0,"441"],BN:["673","00","[2-578]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-578]"]]]],BO:["591","00(?:1\\d)?","(?:[2-7]\\d\\d|8001)\\d{5}",[8,9],[["(\\d)(\\d{7})","$1 $2",["[23]|4[46]|50"]],["(\\d{8})","$1",["[5-7]"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["8"]]],"0",0,"0(1\\d)?"],BQ:["599","00","(?:[34]1|7\\d)\\d{5}",[7],0,0,0,0,0,0,"[347]"],BR:["55","00(?:1[245]|2[1-35]|31|4[13]|[56]5|99)","[1-467]\\d{9,10}|55[0-46-9]\\d{8}|[34]\\d{7}|55\\d{7,8}|(?:5[0-46-9]|[89]\\d)\\d{7,9}",[8,9,10,11],[["(\\d{4})(\\d{4})","$1-$2",["300|4(?:0[02]|37|86)","300|4(?:0(?:0|20)|370|864)"]],["(\\d{3})(\\d{2,3})(\\d{4})","$1 $2 $3",["(?:[358]|90)0"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-57]"],"($1)"],["(\\d{2})(\\d{5})(\\d{4})","$1 $2-$3",["[16][1-9]|[2-57-9]"],"($1)"]],"0",0,"(?:0|90)(?:(1[245]|2[1-35]|31|4[13]|[56]5|99)(\\d{10,11}))?","$2"],BS:["1","011","(?:242|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([3-8]\\d{6})$|1","242$1",0,"242"],BT:["975","00","[178]\\d{7}|[2-8]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[2-6]|7[246]|8[2-4]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[67]|[78]"]]]],BW:["267","00","(?:0800|(?:[37]|800)\\d)\\d{6}|(?:[2-6]\\d|90)\\d{5}",[7,8,10],[["(\\d{2})(\\d{5})","$1 $2",["90"]],["(\\d{3})(\\d{4})","$1 $2",["[24-6]|3[15-9]"]],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37]"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["8"]]]],BY:["375","810","(?:[12]\\d|33|44|902)\\d{7}|8(?:0[0-79]\\d{5,7}|[1-7]\\d{9})|8(?:1[0-489]|[5-79]\\d)\\d{7}|8[1-79]\\d{6,7}|8[0-79]\\d{5}|8\\d{5}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3})","$1 $2",["800"],"8 $1"],["(\\d{3})(\\d{2})(\\d{2,4})","$1 $2 $3",["800"],"8 $1"],["(\\d{4})(\\d{2})(\\d{3})","$1 $2-$3",["1(?:5[169]|6[3-5]|7[179])|2(?:1[35]|2[34]|3[3-5])","1(?:5[169]|6(?:3[1-3]|4|5[125])|7(?:1[3-9]|7[0-24-6]|9[2-7]))|2(?:1[35]|2[34]|3[3-5])"],"8 0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["1(?:[56]|7[467])|2[1-3]"],"8 0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-4]"],"8 0$1"],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["[89]"],"8 $1"]],"8",0,"0|80?",0,0,0,0,"8~10"],BZ:["501","00","(?:0800\\d|[2-8])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1-$2",["[2-8]"]],["(\\d)(\\d{3})(\\d{4})(\\d{3})","$1-$2-$3-$4",["0"]]]],CA:["1","011","[2-9]\\d{9}|3\\d{6}",[7,10],0,"1",0,0,0,0,0,[["(?:2(?:04|[23]6|[48]9|5[07]|63)|3(?:06|43|54|6[578]|82)|4(?:03|1[68]|[26]8|3[178]|50|74)|5(?:06|1[49]|48|79|8[147])|6(?:04|[18]3|39|47|72)|7(?:0[59]|42|53|78|8[02])|8(?:[06]7|19|25|7[39])|9(?:0[25]|42))[2-9]\\d{6}",[10]],["",[10]],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",[10]],["900[2-9]\\d{6}",[10]],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|(?:5(?:2[125-9]|3[23]|44|66|77|88)|6(?:22|33))[2-9]\\d{6}",[10]],0,["310\\d{4}",[7]],0,["600[2-9]\\d{6}",[10]]]],CC:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:02|31|60|89)|1(?:18|76)|223)|91(?:0(?:1[0-2]|29)|1(?:[28]2|50|79)|2(?:10|64)|3(?:[06]8|22)|4[29]8|62\\d|70[23]|959))\\d{3}",[9]],["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CD:["243","00","(?:(?:[189]|5\\d)\\d|2)\\d{7}|[1-68]\\d{6}",[7,8,9,10],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["[1-6]"],"0$1"],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["5"],"0$1"]],"0"],CF:["236","00","8776\\d{4}|(?:[27]\\d|61)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[26-8]"]]]],CG:["242","00","222\\d{6}|(?:0\\d|80)\\d{7}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[02]"]]]],CH:["41","00","8\\d{11}|[2-9]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8[047]|90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]|81"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["8"],"0$1"]],"0"],CI:["225","00","[02]\\d{9}",[10],[["(\\d{2})(\\d{2})(\\d)(\\d{5})","$1 $2 $3 $4",["2"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3 $4",["0"]]]],CK:["682","00","[2-578]\\d{4}",[5],[["(\\d{2})(\\d{3})","$1 $2",["[2-578]"]]]],CL:["56","(?:0|1(?:1[0-69]|2[02-5]|5[13-58]|69|7[0167]|8[018]))0","12300\\d{6}|6\\d{9,10}|[2-9]\\d{8}",[9,10,11],[["(\\d{5})(\\d{4})","$1 $2",["219","2196"],"($1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["60|809"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["44"]],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2[1-36]"],"($1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["9(?:10|[2-9])"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["3[2-5]|[47]|5[1-3578]|6[13-57]|8(?:0[1-8]|[1-9])"],"($1)"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["60|8"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{3})(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3 $4",["60"]]]],CM:["237","00","[26]\\d{8}|88\\d{6,7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["88"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[26]|88"]]]],CN:["86","00|1(?:[12]\\d|79)\\d\\d00","(?:(?:1[03-689]|2\\d)\\d\\d|6)\\d{8}|1\\d{10}|[126]\\d{6}(?:\\d(?:\\d{2})?)?|86\\d{5,6}|(?:[3-579]\\d|8[0-57-9])\\d{5,9}",[7,8,9,10,11,12],[["(\\d{2})(\\d{5,6})","$1 $2",["(?:10|2[0-57-9])[19]|3(?:[157]|35|49|9[1-68])|4(?:1[124-9]|2[179]|6[47-9]|7|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:07|1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3|4[13]|5[1-5]|7[0-79]|9[0-35-9])|(?:4[35]|59|85)[1-9]","(?:10|2[0-57-9])(?:1[02]|9[56])|8078|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))1","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|80781|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))12","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|807812|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:078|1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123"],"0$1"],["(\\d{3})(\\d{5,6})","$1 $2",["3(?:[157]|35|49|9[1-68])|4(?:[17]|2[179]|6[47-9]|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])|(?:4[35]|59|85)[1-9]","(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))[19]","85[23](?:10|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:10|9[56])","85[23](?:100|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:100|9[56])"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["(?:4|80)0"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|2(?:[02-57-9]|1[1-9])","10|2(?:[02-57-9]|1[1-9])","10[0-79]|2(?:[02-57-9]|1[1-79])|(?:10|21)8(?:0[1-9]|[1-9])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["3(?:[3-59]|7[02-68])|4(?:[26-8]|3[3-9]|5[2-9])|5(?:3[03-9]|[468]|7[028]|9[2-46-9])|6|7(?:[0-247]|3[04-9]|5[0-4689]|6[2368])|8(?:[1-358]|9[1-7])|9(?:[013479]|5[1-5])|(?:[34]1|55|79|87)[02-9]"],"0$1",1],["(\\d{3})(\\d{7,8})","$1 $2",["9"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["80"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[3-578]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["1[3-9]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3 $4",["[12]"],"0$1",1]],"0",0,"(1(?:[12]\\d|79)\\d\\d)|0",0,0,0,0,"00"],CO:["57","00(?:4(?:[14]4|56)|[579])","(?:46|60\\d\\d)\\d{6}|(?:1\\d|[39])\\d{9}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["46"]],["(\\d{3})(\\d{7})","$1 $2",["6|90"],"($1)"],["(\\d{3})(\\d{7})","$1 $2",["3[0-357]|9[14]"]],["(\\d)(\\d{3})(\\d{7})","$1-$2-$3",["1"],"0$1",0,"$1 $2 $3"]],"0",0,"0([3579]|4(?:[14]4|56))?"],CR:["506","00","(?:8\\d|90)\\d{8}|(?:[24-8]\\d{3}|3005)\\d{4}",[8,10],[["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[3-9]"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[89]"]]],0,0,"(19(?:0[0-2468]|1[09]|20|66|77|99))"],CU:["53","119","(?:[2-7]|8\\d\\d)\\d{7}|[2-47]\\d{6}|[34]\\d{5}",[6,7,8,10],[["(\\d{2})(\\d{4,6})","$1 $2",["2[1-4]|[34]"],"(0$1)"],["(\\d)(\\d{6,7})","$1 $2",["7"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["[56]"],"0$1"],["(\\d{3})(\\d{7})","$1 $2",["8"],"0$1"]],"0"],CV:["238","0","(?:[2-59]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2-589]"]]]],CW:["599","00","(?:[34]1|60|(?:7|9\\d)\\d)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[3467]"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["9[4-8]"]]],0,0,0,0,0,"[69]"],CX:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:01|30|59|88)|1(?:17|46|75)|2(?:22|35))|91(?:00[6-9]|1(?:[28]1|49|78)|2(?:09|63)|3(?:12|26|75)|4(?:56|97)|64\\d|7(?:0[01]|1[0-2])|958))\\d{3}",[9]],["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CY:["357","00","(?:[279]\\d|[58]0)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[257-9]"]]]],CZ:["420","00","(?:[2-578]\\d|60)\\d{7}|9\\d{8,11}",[9,10,11,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]|9[015-7]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3 $4",["96"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]]],DE:["49","00","[2579]\\d{5,14}|49(?:[34]0|69|8\\d)\\d\\d?|49(?:37|49|60|7[089]|9\\d)\\d{1,3}|49(?:2[024-9]|3[2-689]|7[1-7])\\d{1,8}|(?:1|[368]\\d|4[0-8])\\d{3,13}|49(?:[015]\\d|2[13]|31|[46][1-8])\\d{1,9}",[4,5,6,7,8,9,10,11,12,13,14,15],[["(\\d{2})(\\d{3,13})","$1 $2",["3[02]|40|[68]9"],"0$1"],["(\\d{3})(\\d{3,12})","$1 $2",["2(?:0[1-389]|1[124]|2[18]|3[14])|3(?:[35-9][15]|4[015])|906|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1","2(?:0[1-389]|12[0-8])|3(?:[35-9][15]|4[015])|906|2(?:[13][14]|2[18])|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1"],"0$1"],["(\\d{4})(\\d{2,11})","$1 $2",["[24-6]|3(?:[3569][02-46-9]|4[2-4679]|7[2-467]|8[2-46-8])|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]","[24-6]|3(?:3(?:0[1-467]|2[127-9]|3[124578]|7[1257-9]|8[1256]|9[145])|4(?:2[135]|4[13578]|9[1346])|5(?:0[14]|2[1-3589]|6[1-4]|7[13468]|8[13568])|6(?:2[1-489]|3[124-6]|6[13]|7[12579]|8[1-356]|9[135])|7(?:2[1-7]|4[145]|6[1-5]|7[1-4])|8(?:21|3[1468]|6|7[1467]|8[136])|9(?:0[12479]|2[1358]|4[134679]|6[1-9]|7[136]|8[147]|9[1468]))|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]|3[68]4[1347]|3(?:47|60)[1356]|3(?:3[46]|46|5[49])[1246]|3[4579]3[1357]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["138"],"0$1"],["(\\d{5})(\\d{2,10})","$1 $2",["3"],"0$1"],["(\\d{3})(\\d{5,11})","$1 $2",["181"],"0$1"],["(\\d{3})(\\d)(\\d{4,10})","$1 $2 $3",["1(?:3|80)|9"],"0$1"],["(\\d{3})(\\d{7,8})","$1 $2",["1[67]"],"0$1"],["(\\d{3})(\\d{7,12})","$1 $2",["8"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["185","1850","18500"],"0$1"],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["18[68]"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["15[1279]"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["15[03568]","15(?:[0568]|3[13])"],"0$1"],["(\\d{3})(\\d{8})","$1 $2",["18"],"0$1"],["(\\d{3})(\\d{2})(\\d{7,8})","$1 $2 $3",["1(?:6[023]|7)"],"0$1"],["(\\d{4})(\\d{2})(\\d{7})","$1 $2 $3",["15[279]"],"0$1"],["(\\d{3})(\\d{2})(\\d{8})","$1 $2 $3",["15"],"0$1"]],"0"],DJ:["253","00","(?:2\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[27]"]]]],DK:["45","00","[2-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-9]"]]]],DM:["1","011","(?:[58]\\d\\d|767|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","767$1",0,"767"],DO:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,0,0,0,"8001|8[024]9"],DZ:["213","00","(?:[1-4]|[5-79]\\d|80)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["9"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-8]"],"0$1"]],"0"],EC:["593","00","1\\d{9,10}|(?:[2-7]|9\\d)\\d{7}",[8,9,10,11],[["(\\d)(\\d{3})(\\d{4})","$1 $2-$3",["[2-7]"],"(0$1)",0,"$1-$2-$3"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{3})(\\d{3,4})","$1 $2 $3",["1"]]],"0"],EE:["372","00","8\\d{9}|[4578]\\d{7}|(?:[3-8]\\d|90)\\d{5}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[369]|4[3-8]|5(?:[0-2]|5[0-478]|6[45])|7[1-9]|88","[369]|4[3-8]|5(?:[02]|1(?:[0-8]|95)|5[0-478]|6(?:4[0-4]|5[1-589]))|7[1-9]|88"]],["(\\d{4})(\\d{3,4})","$1 $2",["[45]|8(?:00|[1-49])","[45]|8(?:00[1-9]|[1-49])"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],EG:["20","00","[189]\\d{8,9}|[24-6]\\d{8}|[135]\\d{7}",[8,9,10],[["(\\d)(\\d{7,8})","$1 $2",["[23]"],"0$1"],["(\\d{2})(\\d{6,7})","$1 $2",["1[35]|[4-6]|8[2468]|9[235-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{8})","$1 $2",["1"],"0$1"]],"0"],EH:["212","00","[5-8]\\d{8}",[9],0,"0",0,0,0,0,0,[["528[89]\\d{5}"],["(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[016-8]\\d|2[0-8]|3[01]|5[0-5]))\\d{6}"],["80[0-7]\\d{6}"],["89\\d{7}"],0,0,0,0,["(?:592(?:4[0-2]|93)|80[89]\\d\\d)\\d{4}"]]],ER:["291","00","[178]\\d{6}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[178]"],"0$1"]],"0"],ES:["34","00","(?:400|[5-9]\\d\\d)\\d{6}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]00"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[4-9]"]]]],ET:["251","00","(?:11|[2-57-9]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-57-9]"],"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{2})(\\d{2})(\\d{2})","$1 $2 $3",["[2-9]"]]],0,0,"(10(?:01|[12]0|88))"],FR:["33","00","[1-9]\\d{8}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0 $1"],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[1-79]"],"0$1"]],"0"],GA:["241","00","(?:[067]\\d|11)\\d{6}|[2-7]\\d{6}",[7,8],[["(\\d)(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-7]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["11|[67]"],"0$1"]],0,0,"0(11\\d{6}|60\\d{6}|61\\d{6}|6[256]\\d{6}|7[467]\\d{6})","$1"],GB:["44","00","[1-357-9]\\d{9}|[18]\\d{8}|8\\d{6}",[7,9,10],[["(\\d{3})(\\d{4})","$1 $2",["800","8001","80011","800111","8001111"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["845","8454","84546","845464"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["800"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["1(?:38|5[23]|69|76|94)","1(?:(?:38|69)7|5(?:24|39)|768|946)","1(?:3873|5(?:242|39[4-6])|(?:697|768)[347]|9467)"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["1(?:[2-69][02-9]|[78])"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[25]|7(?:0|6[02-9])","[25]|7(?:0|6(?:[03-9]|2[356]))"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[1389]"],"0$1"]],"0",0,"0|180020",0,0,0,[["(?:1(?:1(?:3(?:[0-58]\\d\\d|73[0-5])|4(?:(?:[0-5]\\d|70)\\d|69[7-9])|(?:(?:5[0-26-9]|[78][0-49])\\d|6(?:[0-4]\\d|5[01]))\\d)|(?:2(?:(?:0[024-9]|2[3-9]|3[3-79]|4[1-689]|[58][02-9]|6[0-47-9]|7[013-9]|9\\d)\\d|1(?:[0-7]\\d|8[0-3]))|(?:3(?:0\\d|1[0-8]|[25][02-9]|3[02-579]|[468][0-46-9]|7[1-35-79]|9[2-578])|4(?:0[03-9]|[137]\\d|[28][02-57-9]|4[02-69]|5[0-8]|[69][0-79])|5(?:0[1-35-9]|[16]\\d|2[024-9]|3[015689]|4[02-9]|5[03-9]|7[0-35-9]|8[0-468]|9[0-57-9])|6(?:0[034689]|1\\d|2[0-35689]|[38][013-9]|4[1-467]|5[0-69]|6[13-9]|7[0-8]|9[0-24578])|7(?:0[0246-9]|2\\d|3[0236-8]|4[03-9]|5[0-46-9]|6[013-9]|7[0-35-9]|8[024-9]|9[02-9])|8(?:0[35-9]|2[1-57-9]|3[02-578]|4[0-578]|5[124-9]|6[2-69]|7\\d|8[02-9]|9[02569])|9(?:0[02-589]|[18]\\d|2[02-689]|3[1-57-9]|4[2-9]|5[0-579]|6[2-47-9]|7[0-24578]|9[2-57]))\\d)\\d)|2(?:0[013478]|3[0189]|4[017]|8[0-46-9]|9[0-2])\\d{3})\\d{4}|1(?:2(?:0(?:46[1-4]|87[2-9])|545[1-79]|76(?:2\\d|3[1-8]|6[1-6])|9(?:7(?:2[0-4]|3[2-5])|8(?:2[2-8]|7[0-47-9]|8[3-5])))|3(?:6(?:38[2-5]|47[23])|8(?:47[04-9]|64[0157-9]))|4(?:044[1-7]|20(?:2[23]|8\\d)|6(?:0(?:30|5[2-57]|6[1-8]|7[2-8])|140)|8(?:052|87[1-3]))|5(?:2(?:4(?:3[2-79]|6\\d)|76\\d)|6(?:26[06-9]|686))|6(?:06(?:4\\d|7[4-79])|295[5-7]|35[34]\\d|47(?:24|61)|59(?:5[08]|6[67]|74)|9(?:55[0-4]|77[23]))|7(?:26(?:6[13-9]|7[0-7])|(?:442|688)\\d|50(?:2[0-3]|[3-68]2|76))|8(?:27[56]\\d|37(?:5[2-5]|8[239])|843[2-58])|9(?:0(?:0(?:6[1-8]|85)|52\\d)|3583|4(?:66[1-8]|9(?:2[01]|81))|63(?:23|3[1-4])|9561))\\d{3}",[9,10]],["7(?:457[0-57-9]|700[01]|911[028])\\d{5}|7(?:[1-3]\\d\\d|4(?:[0-46-9]\\d|5[0-689])|5(?:0[0-8]|[13-9]\\d|2[0-35-9])|7(?:0[1-9]|[1-7]\\d|8[02-9]|9[0-689])|8(?:[014-9]\\d|[23][0-8])|9(?:[024-9]\\d|1[02-9]|3[0-689]))\\d{6}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[2-49]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]],0," x"],GD:["1","011","(?:473|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","473$1",0,"473"],GE:["995","00","(?:[3-57]\\d\\d|800)\\d{6}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["32"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[57]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[348]"],"0$1"]],"0"],GF:["594","00","(?:694\\d|7093)\\d{5}|(?:59|[89]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]|80[6-9]|9[47]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[89]"],"0$1"]],"0"],GG:["44","00","(?:1481|[357-9]\\d{3})\\d{6}|8\\d{6}(?:\\d{2})?",[7,9,10],0,"0",0,"([25-9]\\d{5})$|0|180020","1481$1",0,0,[["1481[25-9]\\d{5}",[10]],["7(?:(?:781|839)\\d|911[17])\\d{5}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[0-3]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]]],GH:["233","00","[235]\\d{8}|800\\d{5,6}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2358]"],"0$1"]],"0"],GI:["350","00","(?:[25]\\d|60)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["2"]]]],GL:["299","00","(?:19|[2-689]\\d|70)\\d{4}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["19|[2-9]"]]]],GM:["220","00","[2-9]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],GN:["224","00","722\\d{6}|(?:3|6\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["3"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[67]"]]]],GP:["590","00","7090\\d{5}|(?:[56]9|[89]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-79]|80[6-9]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0",0,0,0,0,0,[["(?:59(?:0(?:0[1-68]|[14][0-24-9]|2[0-68]|3[1-9]|5[3-579]|[68][0-689]|7[08]|9\\d)|87\\d)|80[6-9]\\d\\d)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5]))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],["8[129]\\d{7}"],0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],GQ:["240","00","222\\d{6}|(?:3\\d|55|[89]0)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235]"]],["(\\d{3})(\\d{6})","$1 $2",["[89]"]]]],GR:["30","00","5005000\\d{3}|8\\d{9,11}|(?:[269]\\d|70)\\d{8}",[10,11,12],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["21|7"]],["(\\d{4})(\\d{6})","$1 $2",["2(?:2|3[2-57-9]|4[2-469]|5[2-59]|6[2-9]|7[2-69]|8[2-49])|5"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2689]"]],["(\\d{3})(\\d{3,4})(\\d{5})","$1 $2 $3",["8"]]]],GT:["502","00","80\\d{6}|(?:1\\d{3}|[2-7])\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1 $2",["[2-8]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],GU:["1","011","(?:[58]\\d\\d|671|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","671$1",0,"671"],GW:["245","00","[49]\\d{8}|4\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["40"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"]]]],GY:["592","001","(?:[2-8]\\d{3}|9008)\\d{3}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],HK:["852","00(?:30|5[09]|[126-9]?)","8[0-46-9]\\d{6,7}|9\\d{4,7}|(?:[2-7]|9\\d{3})\\d{7}",[5,6,7,8,9,11],[["(\\d{3})(\\d{2,5})","$1 $2",["900","9003"]],["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[1-4]|9(?:0[1-9]|[1-8])"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{3})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]],0,0,0,0,0,0,0,"00"],HN:["504","00","8\\d{10}|[237-9]\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1-$2",["[237-9]"]]]],HR:["385","00","[2-69]\\d{8}|80\\d{5,7}|[1-79]\\d{7}|6\\d{6}",[7,8,9],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["6[01]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{4})(\\d{3})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6|7[245]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-57]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"]],"0"],HT:["509","00","[2-589]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[2-589]"]]]],HU:["36","00","[235-7]\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27][2-9]|3[2-7]|4[24-9]|5[2-79]|6|8[2-57-9]|9[2-69]"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"06 $1"]],"06"],ID:["62","00[89]","00[1-9]\\d{9,14}|(?:[1-36]|8\\d{5})\\d{6}|00\\d{9}|[1-9]\\d{8,10}|[2-9]\\d{7}",[7,8,9,10,11,12,13,14,15,16,17],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["15"]],["(\\d{2})(\\d{5,9})","$1 $2",["2[124]|[36]1"],"(0$1)"],["(\\d{3})(\\d{5,7})","$1 $2",["800"],"0$1"],["(\\d{3})(\\d{5,8})","$1 $2",["[2-79]"],"(0$1)"],["(\\d{3})(\\d{3,4})(\\d{3})","$1-$2-$3",["8[1-35-9]"],"0$1"],["(\\d{3})(\\d{6,8})","$1 $2",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["804"],"0$1"],["(\\d{3})(\\d)(\\d{3})(\\d{3})","$1 $2 $3 $4",["80"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1-$2-$3",["8"],"0$1"]],"0"],IE:["353","00","(?:1\\d|[2569])\\d{6,8}|4\\d{6,9}|7\\d{8}|8\\d{8,9}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["2[24-9]|47|58|6[237-9]|9[35-9]"],"(0$1)"],["(\\d{3})(\\d{5})","$1 $2",["[45]0"],"(0$1)"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["1"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2569]|4[1-69]|7[14]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["81"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[78]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["4"],"(0$1)"],["(\\d{2})(\\d)(\\d{3})(\\d{4})","$1 $2 $3 $4",["8"],"0$1"]],"0"],IL:["972","0(?:0|1[2-9])","1\\d{6}(?:\\d{3,5})?|[57]\\d{8}|[1-489]\\d{7}",[7,8,9,10,11,12],[["(\\d{4})(\\d{3})","$1-$2",["125"]],["(\\d{4})(\\d{2})(\\d{2})","$1-$2-$3",["121"]],["(\\d)(\\d{3})(\\d{4})","$1-$2-$3",["[2-489]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1-$2-$3",["12"]],["(\\d{4})(\\d{6})","$1-$2",["159"]],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3-$4",["1[7-9]"]],["(\\d{3})(\\d{1,2})(\\d{3})(\\d{4})","$1-$2 $3-$4",["15"]]],"0"],IM:["44","00","1624\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([25-8]\\d{5})$|0|180020","1624$1",0,"74576|(?:16|7[56])24"],IN:["91","00","(?:000800|[2-9]\\d\\d)\\d{7}|1\\d{7,12}",[8,9,10,11,12,13],[["(\\d{8})","$1",["5(?:0|2[23]|3[03]|[67]1|88)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|888)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|8888)"],0,1],["(\\d{4})(\\d{4,5})","$1 $2",["180","1800"],0,1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["140"],0,1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["11|2[02]|33|4[04]|79[1-7]|80[2-46]","11|2[02]|33|4[04]|79(?:[1-6]|7[19])|80(?:[2-4]|6[0-589])","11|2[02]|33|4[04]|79(?:[124-6]|3(?:[02-9]|1[0-24-9])|7(?:1|9[1-6]))|80(?:[2-4]|6[0-589])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1(?:2[0-249]|3[0-25]|4[145]|[68]|7[1257])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|5[12]|[78]1)|6(?:12|[2-4]1|5[17]|6[13]|80)|7(?:12|3[134]|61|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)|(?:43|59|75)[15]|(?:1[59]|29|67)[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(?:(?: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)|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(?:3171|5[15][2-6]|61[346]|88(?:[2-7]|82))|8(?:70[2-6]|84(?:[2356]|7[19])|91(?:[3-6]|7[19]))|73[134][2-6]|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]|3[129]|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(?:[23569]|8[0-57-9])|8[1-6])|7(?:1(?:[013-8]|9[6-9])|3(?:17|2[0-49]|9[2-57])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4|5[0-367])|70[13-7])|807[19]","1(?:[2-479]|5(?:[0236-9]|5[013-9]))|[2-5]|6(?:2(?:84|95)|355|8(?:28[235-7]|3))|73179|807(?:1|9[1-3])|(?:1552|6(?:(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578])\\d|7(?:[23569]\\d|8[0-57-9])|8(?:[14-6]\\d|2[0-79]))|7(?:1(?:[013-8]\\d|9[6-9])|3(?:2[0-49]|9[2-57])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\d|5[0-367])|70[13-7]))[2-7]"],"0$1",1],["(\\d{5})(\\d{5})","$1 $2",["16|[6-9]"],"0$1",1],["(\\d{4})(\\d{2,4})(\\d{4})","$1 $2 $3",["18[06]","18[06]0"],0,1],["(\\d{4})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["18"],0,1]],"0"],IO:["246","00","3\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["3"]]]],IQ:["964","00","(?:1|7\\d\\d)\\d{7}|[2-6]\\d{7,8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-6]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"]],"0"],IR:["98","00","[1-9]\\d{9}|(?:[1-8]\\d\\d|9)\\d{3,4}",[4,5,6,7,10],[["(\\d{4,5})","$1",["96"],"0$1"],["(\\d{2})(\\d{4,5})","$1 $2",["(?:1[137]|2[13-68]|3[1458]|4[145]|5[1468]|6[16]|7[1467]|8[13467])[12689]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[1-8]"],"0$1"]],"0"],IS:["354","00|1(?:0(?:01|[12]0)|100)","(?:38\\d|[4-9])\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["[4-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["3"]]],0,0,0,0,0,0,0,"00"],IT:["39","00","0\\d{5,11}|1\\d{8,10}|3(?:[0-8]\\d{7,10}|9\\d{7,8})|(?:43|55|70)\\d{8}|8\\d{5}(?:\\d{2,4})?",[6,7,8,9,10,11,12],[["(\\d{2})(\\d{4,6})","$1 $2",["0[26]"]],["(\\d{3})(\\d{3,6})","$1 $2",["0[13-57-9][0159]|8(?:03|4[17]|9[2-5])","0[13-57-9][0159]|8(?:03|4[17]|9(?:2|3[04]|[45][0-4]))"]],["(\\d{4})(\\d{2,6})","$1 $2",["0(?:[13-579][2-46-8]|8[236-8])"]],["(\\d{4})(\\d{4})","$1 $2",["894"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[26]|5"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["1(?:44|[679])|[378]|43"]],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[13-57-9][0159]|14"]],["(\\d{2})(\\d{4})(\\d{5})","$1 $2 $3",["0[26]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[03]"]]],0,0,0,0,0,0,[["0(?:669[0-79]\\d{1,6}|831\\d{2,8})|0(?:1(?:[0159]\\d|[27][1-5]|31|4[1-4]|6[1356]|8[2-57])|2\\d\\d|3(?:[0159]\\d|2[1-4]|3[12]|[48][1-6]|6[2-59]|7[1-7])|4(?:[0159]\\d|[23][1-9]|4[245]|6[1-5]|7[1-4]|81)|5(?:[0159]\\d|2[1-5]|3[2-6]|4[1-79]|6[4-6]|7[1-578]|8[3-8])|6(?:[0-57-9]\\d|6[0-8])|7(?:[0159]\\d|2[12]|3[1-7]|4[2-46]|6[13569]|7[13-6]|8[1-59])|8(?:[0159]\\d|2[3-578]|3[2356]|[6-8][1-5])|9(?:[0159]\\d|[238][1-5]|4[12]|6[1-8]|7[1-6]))\\d{2,7}"],["3[2-9]\\d{7,8}|(?:31|43)\\d{8}",[9,10]],["80(?:0\\d{3}|3)\\d{3}",[6,9]],["(?:0878\\d{3}|89(?:2\\d|3[04]|4(?:[0-4]|[5-9]\\d\\d)|5[0-4]))\\d\\d|(?:1(?:44|6[346])|89(?:38|5[5-9]|9))\\d{6}",[6,8,9,10]],["1(?:78\\d|99)\\d{6}",[9,10]],["3[2-8]\\d{9,10}",[11,12]],0,0,["55\\d{8}",[10]],["84(?:[08]\\d{3}|[17])\\d{3}",[6,9]]]],JE:["44","00","1534\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([0-24-8]\\d{5})$|0|180020","1534$1",0,0,[["1534[0-24-8]\\d{5}"],["7(?:(?:(?:50|82)9|937)\\d|7(?:00[378]|97\\d))\\d{5}"],["80(?:07(?:35|81)|8901)\\d{4}"],["(?:8(?:4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|90(?:066[59]|1810|71(?:07|55)))\\d{4}"],["701511\\d{4}"],0,["(?:3(?:0(?:07(?:35|81)|8901)|3\\d{4}|4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|55\\d{4})\\d{4}"],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}"],["56\\d{8}"]]],JM:["1","011","(?:[58]\\d\\d|658|900)\\d{7}",[10],0,"1",0,0,0,0,"658|876"],JO:["962","00","(?:(?:[2689]|7\\d)\\d|32|427|53)\\d{6}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2356]|87"],"(0$1)"],["(\\d{3})(\\d{5,6})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["70"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[47]"],"0$1"]],"0"],JP:["81","010","00[1-9]\\d{6,14}|[25-9]\\d{9}|(?:00|[1-9]\\d\\d)\\d{6}",[8,9,10,11,12,13,14,15,16,17],[["(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3",["(?:12|57|99)0"],"0$1"],["(\\d{4})(\\d)(\\d{4})","$1-$2-$3",["1(?:26|3[79]|4[56]|5[4-68]|6[3-5])|499|5(?:76|97)|746|8(?:3[89]|47|51)|9(?:80|9[16])","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:76|97)9|7468|8(?:3(?:8[7-9]|96)|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:769|979[2-69])|7468|8(?:3(?:8[7-9]|96[2457-9])|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["60"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2-$3",["3|4(?:2[09]|7[01])|6[1-9]","3|4(?:2(?:0|9[02-69])|7(?:0[019]|1))|6[1-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["1(?:1|5[45]|77|88|9[69])|2(?:2[1-37]|3[0-269]|4[59]|5|6[24]|7[1-358]|8[1369]|9[0-38])|4(?:[28][1-9]|3[0-57]|[45]|6[248]|7[2-579]|9[29])|5(?:2|3[0459]|4[0-369]|5[29]|8[02389]|9[0-389])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9[2-6])|8(?:2[124589]|3[26-9]|49|51|6|7[0-468]|8[68]|9[019])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9[1-489])","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2(?:[127]|3[014-9])|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9[19])|62|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|8[1-9]|9[29])|5(?:2|3(?:[045]|9[0-8])|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0-2469])|3(?:[29]|60)|49|51|6(?:[0-24]|36|5[0-3589]|7[23]|9[01459])|7[0-468]|8[68])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9(?:[1289]|3[34]|4[0178]))|(?:264|837)[016-9]|2(?:57|93)[015-9]|(?:25[0468]|422|838)[01]|(?:47[59]|59[89]|8(?:6[68]|9))[019]","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2[127]|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9(?:17|99))|6(?:2|4[016-9])|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|9[29])|5(?:2|3(?:[045]|9(?:[0-58]|6[4-9]|7[0-35689]))|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0169])|3(?:[29]|60|7(?:[017-9]|6[6-8]))|49|51|6(?:[0-24]|36[2-57-9]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|7(?:2[2-468]|3[78])|9[0145])|7[0-468]|8[68])|9(?:4[15]|5[138]|7[156]|8[189]|9(?:[1289]|3(?:31|4[357])|4[0178]))|(?:8294|96)[1-3]|2(?:57|93)[015-9]|(?:223|8699)[014-9]|(?:25[0468]|422|838)[01]|(?:48|8292|9[23])[1-9]|(?:47[59]|59[89]|8(?:68|9))[019]"],"0$1"],["(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3",["[14]|[289][2-9]|5[3-9]|7[2-4679]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["800"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[25-9]"],"0$1"]],"0",0,"(000[2569]\\d{4,6})$|(?:(?:003768)0?)|0","$1"],KE:["254","000","(?:[17]\\d\\d|900)\\d{6}|(?:2|80)0\\d{6,7}|[4-6]\\d{6,8}",[7,8,9,10],[["(\\d{2})(\\d{5,7})","$1 $2",["[24-6]"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[17]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0"],KG:["996","00","8\\d{9}|[235-9]\\d{8}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["3(?:1[346]|[24-79])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-79]|88"],"0$1"],["(\\d{3})(\\d{3})(\\d)(\\d{2,3})","$1 $2 $3 $4",["8"],"0$1"]],"0"],KH:["855","00[14-9]","1\\d{9}|[1-9]\\d{7,8}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],KI:["686","00","(?:[37]\\d|6[0-79])\\d{6}|(?:[2-48]\\d|50)\\d{3}",[5,8],0,"0"],KM:["269","00","[3478]\\d{6}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[3478]"]]]],KN:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","869$1",0,"869"],KP:["850","00|99","85\\d{6}|(?:19\\d|[2-7])\\d{7}",[8,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"]],"0"],KR:["82","00(?:[125689]|3(?:[46]5|91)|7(?:00|27|3|55|6[126]))","00[1-9]\\d{8,11}|(?:[12]|5\\d{3})\\d{7}|[13-6]\\d{9}|(?:[1-6]\\d|80)\\d{7}|[3-6]\\d{4,5}|(?:00|7)0\\d{8}",[5,6,8,9,10,11,12,13,14],[["(\\d{2})(\\d{3,4})","$1-$2",["(?:3[1-3]|[46][1-4]|5[1-5])1"],"0$1"],["(\\d{4})(\\d{4})","$1-$2",["1"]],["(\\d)(\\d{3,4})(\\d{4})","$1-$2-$3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[36]0|8"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1-$2-$3",["[1346]|5[1-5]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{2})(\\d{5})(\\d{4})","$1-$2-$3",["5"],"0$1"]],"0",0,"0(8(?:[1-46-8]|5\\d\\d))?"],KW:["965","00","18\\d{5}|(?:[2569]\\d|41)\\d{6}",[7,8],[["(\\d{4})(\\d{3,4})","$1 $2",["[169]|2(?:[235]|4[1-35-9])|52"]],["(\\d{3})(\\d{5})","$1 $2",["[245]"]]]],KY:["1","011","(?:345|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","345$1",0,"345"],KZ:["7","810","8\\d{13}|[78]\\d{9}",[10,14],0,"8",0,0,0,0,"7",0,"8~10"],LA:["856","00","[23]\\d{9}|3\\d{8}|(?:[235-8]\\d|41)\\d{6}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2[13]|3[14]|[4-8]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["3"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[23]"],"0$1"]],"0"],LB:["961","00","[27-9]\\d{7}|[13-9]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[13-69]|7(?:[2-57]|62|8[0-6]|9[04-9])|8[02-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27-9]"]]],"0"],LC:["1","011","(?:[58]\\d\\d|758|900)\\d{7}",[10],0,"1",0,"([2-8]\\d{6})$|1","758$1",0,"758"],LI:["423","00","[68]\\d{8}|(?:[2378]\\d|90)\\d{5}",[7,9],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2379]|8(?:0[09]|7)","[2379]|8(?:0(?:02|9)|7)"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["69"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]],"0",0,"(1001)|0"],LK:["94","00","[1-9]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[1-689]"],"0$1"]],"0"],LR:["231","00","(?:[2457]\\d|33|88)\\d{7}|(?:2\\d|[4-6])\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["4[67]|[56]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-578]"],"0$1"]],"0"],LS:["266","00","(?:[256]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2568]"]]]],LT:["370","00","(?:[3469]\\d|52|[78]0)\\d{6}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["52[0-7]"],"(0-$1)",1],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[7-9]"],"0 $1",1],["(\\d{2})(\\d{6})","$1 $2",["37|4(?:[15]|6[1-8])"],"(0-$1)",1],["(\\d{3})(\\d{5})","$1 $2",["[3-6]"],"(0-$1)",1]],"0",0,"[08]"],LU:["352","00","35[013-9]\\d{4,8}|6\\d{8}|35\\d{2,4}|(?:[2457-9]\\d|3[0-46-9])\\d{2,9}",[4,5,6,7,8,9,10,11],[["(\\d{2})(\\d{3})","$1 $2",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["20[2-689]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4",["20"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,5})","$1 $2 $3 $4",["[3-57]|8[13-9]|9(?:0[89]|[2-579])|(?:2|80)[2-9]"]],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["80[01]|90[015]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["20"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4 $5",["20"]]],0,0,"(15(?:0[06]|1[12]|[35]5|4[04]|6[26]|77|88|99)\\d)"],LV:["371","00","(?:[268]\\d|78|90)\\d{6}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2679]|8[01]"]]]],LY:["218","00","[2-9]\\d{8}",[9],[["(\\d{2})(\\d{7})","$1-$2",["[2-9]"],"0$1"]],"0"],MA:["212","00","[5-8]\\d{8}",[9],[["(\\d{4})(\\d{5})","$1-$2",["892"],"0$1"],["(\\d{2})(\\d{7})","$1-$2",["8(?:0[0-7]|9)"],"0$1"],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[5-8]"],"0$1"]],"0",0,0,0,0,"[5-8]"],MC:["377","00","(?:[3489]|[67]\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["4"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[389]"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[67]"],"0$1"]],"0"],MD:["373","00","(?:[235-7]\\d|[89]0)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["22|3"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[25-7]"],"0$1"]],"0"],ME:["382","00","(?:20|[3-79]\\d)\\d{6}|80\\d{6,7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"0$1"]],"0"],MF:["590","00","7090\\d{5}|(?:[56]9|[89]\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["(?:59(?:0(?:0[079]|[14]3|[27][79]|3[03-7]|5[0-268]|87)|87\\d)|80[6-9]\\d\\d)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5]))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],["8[129]\\d{7}"],0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],MG:["261","00","[23]\\d{8}",[9],[["(\\d{2})(\\d{2})(\\d{3})(\\d{2})","$1 $2 $3 $4",["[23]"],"0$1"]],"0",0,"([24-9]\\d{6})$|0","20$1"],MH:["692","011","329\\d{4}|(?:[256]\\d|45)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1-$2",["[2-6]"]]],"1"],MK:["389","00","[2-578]\\d{7}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2|34[47]|4(?:[37]7|5[47]|64)"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[347]"],"0$1"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["[58]"],"0$1"]],"0"],ML:["223","00","[24-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-9]"]]]],MM:["95","00","1\\d{5,7}|95\\d{6}|(?:[4-7]|9[0-46-9])\\d{6,8}|(?:2|8\\d)\\d{5,8}",[6,7,8,9,10],[["(\\d)(\\d{2})(\\d{3})","$1 $2 $3",["16|2"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["4(?:[2-46]|5[3-5])|5|6(?:[1-689]|7[235-7])|7(?:[0-4]|5[2-7])|8[1-5]|(?:60|86)[23]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[12]|452|678|86","[12]|452|6788|86"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[4-7]|8[1-35]"],"0$1"],["(\\d)(\\d{3})(\\d{4,6})","$1 $2 $3",["9(?:2[0-4]|[35-9]|4[137-9])"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["92"],"0$1"],["(\\d)(\\d{5})(\\d{4})","$1 $2 $3",["9"],"0$1"]],"0"],MN:["976","001","[12]\\d{7,9}|[5-9]\\d{7}",[8,9,10],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["11|2[16]"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[5-9]"]],["(\\d{3})(\\d{5,6})","$1 $2",["[12]2[1-3]"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["[12](?:27|3[2-8]|4[2-68]|5[1-4689])","[12](?:27|3[2-8]|4[2-68]|5[1-4689])[0-3]"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["[12]"],"0$1"]],"0"],MO:["853","00","0800\\d{3}|(?:28|[68]\\d)\\d{6}",[7,8],[["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{4})(\\d{4})","$1 $2",["[268]"]]]],MP:["1","011","[58]\\d{9}|(?:67|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","670$1",0,"670"],MQ:["596","00","7091\\d{5}|(?:[56]9|[89]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-79]|8(?:0[6-9]|[36])"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],MR:["222","00","(?:[2-4]\\d\\d|800)\\d{5}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-48]"]]]],MS:["1","011","(?:[58]\\d\\d|664|900)\\d{7}",[10],0,"1",0,"([34]\\d{6})$|1","664$1",0,"664"],MT:["356","00","3550\\d{4}|(?:[2579]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2357-9]"]]]],MU:["230","0(?:0|[24-7]0|3[03])","(?:[57]|8\\d\\d)\\d{7}|[2-468]\\d{6}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[2-46]|8[013]"]],["(\\d{4})(\\d{4})","$1 $2",["[57]"]],["(\\d{5})(\\d{5})","$1 $2",["8"]]],0,0,0,0,0,0,0,"020"],MV:["960","0(?:0|19)","(?:800|9[0-57-9]\\d)\\d{7}|[34679]\\d{6}",[7,10],[["(\\d{3})(\\d{4})","$1-$2",["[34679]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"]]],0,0,0,0,0,0,0,"00"],MW:["265","00","(?:[1289]\\d|31|77)\\d{7}|1\\d{6}",[7,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["1[2-9]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-37-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-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],NA:["264","00","[68]\\d{7,8}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["87"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],NC:["687","00","(?:050|[2-57-9]\\d\\d)\\d{3}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1.$2.$3",["[02-57-9]"]]]],NE:["227","00","[027-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["08"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[089]|2[013]|7[0467]"]]]],NF:["672","00","[13]\\d{5}",[6],[["(\\d{2})(\\d{4})","$1 $2",["1[0-3]"]],["(\\d)(\\d{5})","$1 $2",["[13]"]]],0,0,"([0-258]\\d{4})$","3$1"],NG:["234","009","(?:20|9\\d)\\d{8}|[78]\\d{9,13}",[10,11,12,13,14],[["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[7-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["20[129]"],"0$1"],["(\\d{4})(\\d{2})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[78]"],"0$1"],["(\\d{3})(\\d{5})(\\d{5,6})","$1 $2 $3",["[78]"],"0$1"]],"0"],NI:["505","00","(?:1800|[25-8]\\d{3})\\d{4}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[125-8]"]]]],NL:["31","00","(?:[124-7]\\d\\d|3(?:[02-9]\\d|1[0-8]))\\d{6}|8\\d{6,9}|9\\d{6,10}|1\\d{4,5}",[5,6,7,8,9,10,11],[["(\\d{3})(\\d{4,7})","$1 $2",["[89]0"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["66"],"0$1"],["(\\d)(\\d{8})","$1 $2",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["1[16-8]|2[259]|3[124]|4[17-9]|5[124679]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-578]|91"],"0$1"],["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3",["9"],"0$1"]],"0"],NO:["47","00","(?:0|[2-9]\\d{3})\\d{4}",[5,8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]"]]],0,0,0,0,0,"[02-689]|7[0-8]"],NP:["977","00","(?:1\\d|9)\\d{9}|[1-9]\\d{7}",[8,10,11],[["(\\d)(\\d{7})","$1-$2",["1[2-6]"],"0$1"],["(\\d{2})(\\d{6})","$1-$2",["1[01]|[2-8]|9(?:[1-59]|[67][2-6])"],"0$1"],["(\\d{3})(\\d{7})","$1-$2",["9"]]],"0"],NR:["674","00","(?:222|444|(?:55|8\\d)\\d|666|777|999)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[24-9]"]]]],NU:["683","00","(?:[4-7]|888\\d)\\d{3}",[4,7],[["(\\d{3})(\\d{4})","$1 $2",["8"]]]],NZ:["64","0(?:0|161)","[1289]\\d{9}|50\\d{5}(?:\\d{2,3})?|[27-9]\\d{7,8}|(?:[34]\\d|6[0-35-9])\\d{6}|8\\d{4,6}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,8})","$1 $2",["8[1-79]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["50[036-8]|8|90","50(?:[0367]|88)|8|90"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["24|[346]|7[2-57-9]|9[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:10|74)|[589]"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["1|2[028]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,5})","$1 $2 $3",["2(?:[169]|7[0-35-9])|7"],"0$1"]],"0",0,0,0,0,0,0,"00"],OM:["968","00","(?:1505|[279]\\d{3}|500)\\d{4}|800\\d{5,6}",[7,8,9],[["(\\d{3})(\\d{4,6})","$1 $2",["[58]"]],["(\\d{2})(\\d{6})","$1 $2",["2"]],["(\\d{4})(\\d{4})","$1 $2",["[179]"]]]],PA:["507","00","(?:00800|8\\d{3})\\d{6}|[68]\\d{7}|[1-57-9]\\d{6}",[7,8,10,11],[["(\\d{3})(\\d{4})","$1-$2",["[1-57-9]"]],["(\\d{4})(\\d{4})","$1-$2",["[68]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]]],PE:["51","00|19(?:1[124]|77|90)00","(?:[14-8]|9\\d)\\d{7}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["80"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["1"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[4-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"]]],"0",0,0,0,0,0,0,"00"," Anexo "],PF:["689","00","4\\d{5}(?:\\d{2})?|8\\d{7,8}",[6,8,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["44"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4|8[7-9]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],PG:["675","00|140[1-3]","(?:180|[78]\\d{3})\\d{4}|(?:[2-589]\\d|64)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["18|[2-69]|85"]],["(\\d{4})(\\d{4})","$1 $2",["[78]"]]],0,0,0,0,0,0,0,"00"],PH:["63","00","(?:[2-7]|9\\d)\\d{8}|2\\d{5}|(?:1800|8)\\d{7,9}",[6,8,9,10,11,12,13],[["(\\d)(\\d{5})","$1 $2",["2"],"(0$1)"],["(\\d{4})(\\d{4,6})","$1 $2",["3(?:23|39|46)|4(?:2[3-6]|[35]9|4[26]|76)|544|88[245]|(?:52|64|86)2","3(?:230|397|461)|4(?:2(?:35|[46]4|51)|396|4(?:22|63)|59[347]|76[15])|5(?:221|446)|642[23]|8(?:622|8(?:[24]2|5[13]))"],"(0$1)"],["(\\d{5})(\\d{4})","$1 $2",["346|4(?:27|9[35])|883","3469|4(?:279|9(?:30|56))|8834"],"(0$1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|8[2-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{4})(\\d{1,2})(\\d{3})(\\d{4})","$1 $2 $3 $4",["1"]]],"0"],PK:["92","00","122\\d{6}|[24-8]\\d{10,11}|9(?:[013-9]\\d{8,10}|2(?:[01]\\d\\d|2(?:[06-8]\\d|1[01]))\\d{7})|(?:[2-8]\\d{3}|92(?:[0-7]\\d|8[1-9]))\\d{6}|[24-9]\\d{8}|[89]\\d{7}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,7})","$1 $2 $3",["[89]0"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["1"]],["(\\d{3})(\\d{6,7})","$1 $2",["2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:2[2-8]|3[27-9]|4[2-6]|6[3569]|9[25-8])","9(?:2[3-8]|98)|(?:2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:22|3[27-9]|4[2-6]|6[3569]|9[25-7]))[2-9]"],"(0$1)"],["(\\d{2})(\\d{7,8})","$1 $2",["(?:2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)[2-9]"],"(0$1)"],["(\\d{5})(\\d{5})","$1 $2",["58"],"(0$1)"],["(\\d{3})(\\d{7})","$1 $2",["3"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[24-9]"],"(0$1)"]],"0"],PL:["48","00","(?:6|8\\d\\d)\\d{7}|[1-9]\\d{6}(?:\\d{2})?|[26]\\d{5}",[6,7,8,9,10],[["(\\d{5})","$1",["19"]],["(\\d{3})(\\d{3})","$1 $2",["11|20|64"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["30|(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])1","30|(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])19"]],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["64"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["21|39|45|5[0137]|6[0469]|7[02389]|8(?:0[14]|8)"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[2-8]|[2-7]|8[1-79]|9[145]"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["8"]]]],PM:["508","00","[78]\\d{8}|[2-9]\\d{5}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],PR:["1","011","(?:[589]\\d\\d|787)\\d{7}",[10],0,"1",0,0,0,0,"787|939"],PS:["970","00","[2489]2\\d{6}|(?:1\\d|5)\\d{8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2489]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["5"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],PT:["351","00","1693\\d{5}|(?:[26-9]\\d|30)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["2[12]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["16|[236-9]"]]]],PW:["680","01[12]","(?:[24-8]\\d\\d|345|900)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],PY:["595","00","[36-8]\\d{5,8}|4\\d{6,8}|59\\d{6}|9\\d{5,10}|(?:2\\d|5[0-8])\\d{6,7}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3,6})","$1 $2",["[2-9]0"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["3[289]|4[246-8]|61|7[1-3]|8[1-36]"],"(0$1)"],["(\\d{3})(\\d{4,5})","$1 $2",["2[279]|3[13-5]|4[359]|5|6(?:[34]|7[1-46-8])|7[46-8]|85"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2[14-68]|3[26-9]|4[1246-8]|6(?:1|75)|7[1-35]|8[1-36]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["87"]],["(\\d{3})(\\d{6})","$1 $2",["9(?:[5-79]|8[1-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["9"]]],"0"],QA:["974","00","800\\d{4}|(?:2|800)\\d{6}|(?:0080|[3-7])\\d{7}",[7,8,9,11],[["(\\d{3})(\\d{4})","$1 $2",["2[136]|8"]],["(\\d{4})(\\d{4})","$1 $2",["[3-7]"]]]],RE:["262","00","709\\d{6}|(?:26|[689]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[26-9]"],"0$1"]],"0",0,0,0,0,0,[["2631[0-6]\\d{4}|26(?:2\\d|30|88)\\d{5}"],["(?:69(?:2\\d\\d|3(?:[06][0-6]|1[0-3]|2[0-2]|3[0-39]|4\\d|5[0-5]|7[0-37]|8[0-8]|9[0-479]))|7092[0-3])\\d{4}"],["80\\d{7}"],["89[1-37-9]\\d{6}"],0,0,0,0,["9(?:399[0-3]|479[0-6]|76(?:2[278]|3[0-37]))\\d{4}"],["8(?:1[019]|2[0156]|84|90)\\d{6}"]]],RO:["40","00","(?:[236-8]\\d|90)\\d{7}|[23]\\d{5}",[6,9],[["(\\d{3})(\\d{3})","$1 $2",["2[3-6]","2[3-6]\\d9"],"0$1"],["(\\d{2})(\\d{4})","$1 $2",["219|31"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[23]1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[236-9]"],"0$1"]],"0",0,0,0,0,0,0,0," int "],RS:["381","00","38[02-9]\\d{6,9}|6\\d{7,9}|90\\d{4,8}|38\\d{5,6}|(?:7\\d\\d|800)\\d{3,9}|(?:[12]\\d|3[0-79])\\d{5,10}",[6,7,8,9,10,11,12],[["(\\d{3})(\\d{3,9})","$1 $2",["(?:2[389]|39)0|[7-9]"],"0$1"],["(\\d{2})(\\d{5,10})","$1 $2",["[1-36]"],"0$1"]],"0"],RU:["7","810","8\\d{13}|[347-9]\\d{9}",[10,14],[["(\\d{4})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-8]|2[1-9])","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:1[23]|[2-9]2))","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:13[03-69]|62[013-9]))|72[1-57-9]2"],"8 ($1)",1],["(\\d{5})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-68]|2[1-9])","7(?:1(?:[06][3-6]|[18]|2[35]|[3-5][3-5])|2(?:[13][3-5]|[24-689]|7[457]))","7(?:1(?:0(?:[356]|4[023])|[18]|2(?:3[013-9]|5)|3[45]|43[013-79]|5(?:3[1-8]|4[1-7]|5)|6(?:3[0-35-9]|[4-6]))|2(?:1(?:3[178]|[45])|[24-689]|3[35]|7[457]))|7(?:14|23)4[0-8]|71(?:33|45)[1-79]"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[349]|8(?:[02-7]|1[1-8])"],"8 ($1)",1],["(\\d{4})(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3 $4",["8"],"8 ($1)"]],"8",0,0,0,0,"[3489]",0,"8~10"],RW:["250","00","(?:06|[27]\\d\\d|[89]00)\\d{6}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[7-9]"],"0$1"]],"0"],SA:["966","00","(?:[15]\\d|800|92)\\d{7}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["9"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]],"0"],SB:["677","0[01]","[6-9]\\d{6}|[1-6]\\d{4}",[5,7],[["(\\d{2})(\\d{5})","$1 $2",["6[89]|7|8[4-9]|9(?:[1-8]|9[0-8])"]]]],SC:["248","010|0[0-2]","(?:[2489]\\d|64)\\d{5}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[246]|9[57]"]]],0,0,0,0,0,0,0,"00"],SD:["249","00","[19]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[19]"],"0$1"]],"0"],SE:["46","00","(?:[26]\\d\\d|9)\\d{9}|[1-9]\\d{8}|[1-689]\\d{7}|[1-4689]\\d{6}|2\\d{5}",[6,7,8,9,10,12],[["(\\d{2})(\\d{2,3})(\\d{2})","$1-$2 $3",["20"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{4})","$1-$2",["9(?:00|39|44|9)"],"0$1",0,"$1 $2"],["(\\d{2})(\\d{3})(\\d{2})","$1-$2 $3",["[12][136]|3[356]|4[0246]|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3"],["(\\d)(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2,3})(\\d{2})","$1-$2 $3",["1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[125689]|4[02-57]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{2,3})(\\d{3})","$1-$2 $3",["9(?:00|39|44)"],"0$1",0,"$1 $2 $3"],["(\\d{2})(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["1[13689]|2[0136]|3[1356]|4[0246]|54|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3 $4"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["10|7"],"0$1",0,"$1 $2 $3 $4"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1-$2 $3 $4",["[13-5]|2(?:[247-9]|5[0138])|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{3})","$1-$2 $3 $4",["9"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4 $5",["[26]"],"0$1",0,"$1 $2 $3 $4 $5"]],"0"],SG:["65","0[0-3]\\d","(?:(?:1\\d|8)\\d\\d|7000)\\d{7}|[3689]\\d{7}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["[369]|8(?:0[1-9]|[1-9])"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]],["(\\d{4})(\\d{4})(\\d{3})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],SH:["290","00","(?:[256]\\d|8)\\d{3}",[4,5],0,0,0,0,0,0,"[256]"],SI:["386","00|10(?:22|66|88|99)","[1-7]\\d{7}|8\\d{4,7}|90\\d{4,6}",[5,6,7,8],[["(\\d{2})(\\d{3,6})","$1 $2",["8[09]|9"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["59|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37][01]|4[013]|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{2})(\\d{5,7})","$1 $2",["1|28|9[2-9]"]],["(\\d)(\\d{7})","$1 $2",["[267]|904"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[346-9]"]]],"0"],SR:["597","00","(?:[2-5]|[6-9]\\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-9]"]]]],SS:["211","00","[19]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[19]"],"0$1"]],"0"],ST:["239","00","(?:22|9\\d)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[29]"]]]],SV:["503","00","[25-7]\\d{7}|(?:80\\d|900)\\d{4}(?:\\d{4})?",[7,8,11],[["(\\d{3})(\\d{4})","$1 $2",["[89]"]],["(\\d{4})(\\d{4})","$1 $2",["[25-7]"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[89]"]]]],SX:["1","011","7215\\d{6}|(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"(5\\d{6})$|1","721$1",0,"721"],SY:["963","00","[1-359]\\d{8}|[1-5]\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-4]|5[1-3]"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[59]"],"0$1",1]],"0"],SZ:["268","00","0800\\d{4}|(?:[237]\\d|900)\\d{6}",[8,9],[["(\\d{4})(\\d{4})","$1 $2",["[0237]"]],["(\\d{5})(\\d{4})","$1 $2",["9"]]]],TA:["290","00","8\\d{3}",[4],0,0,0,0,0,0,"8"],TC:["1","011","(?:[58]\\d\\d|649|900)\\d{7}",[10],0,"1",0,"([2-479]\\d{6})$|1","649$1",0,"649"],TD:["235","00|16","(?:22|[3689]\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[236-9]"]]],0,0,0,0,0,0,0,"00"],TG:["228","00","[279]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[279]"]]]],TH:["66","00[1-9]","(?:001800|[2-57]|[689]\\d)\\d{7}|1\\d{7,9}",[8,9,10,13],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[13-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],TJ:["992","810","(?:[0-57-9]\\d|66)\\d{7}",[9],[["(\\d{6})(\\d)(\\d{2})","$1 $2 $3",["331","3317"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["44[02-479]|[34]7"]],["(\\d{4})(\\d)(\\d{4})","$1 $2 $3",["3(?:[1245]|3[12])"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["\\d"]]],0,0,0,0,0,0,0,"8~10"],TK:["690","00","[2-47]\\d{3,6}",[4,5,6,7]],TL:["670","00","7\\d{7}|(?:[2-47]\\d|[89]0)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[2-489]|70"]],["(\\d{4})(\\d{4})","$1 $2",["7"]]]],TM:["993","810","[1-7]\\d{7}",[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-79]"],"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{3})(\\d{5})","$1 $2",["826"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["83"],"0$1"],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["82"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[25]0|37|49|8[09]"],"0$1"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["[23568]|4(?:0[02-48]|[1-478])|7[1-9]","[23568]|4(?:0[2-48]|[1-478])|(?: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,[["(?:472[2-47-9]|983[2-57-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[02469]|8[13])|3(?:0[1-57-9]|1[02-9]|2[013-79]|3[0-24679]|4[167]|5[0-3]|6[01349]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-57-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|3[016]|4[0156]|5[01679]|6[0-279]|78|8[0-269])|7(?:0[1-46-8]|1[2-9]|2[04-8]|3[0-2478]|4[0378]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[0168]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-3589]|8[04-69]))[2-9]\\d{6}"],[""],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|3[23]|44|66|77|88)[2-9]\\d{6}"]]],UY:["598","0(?:0|1[3-9]\\d)","0004\\d{2,9}|[1249]\\d{7}|2\\d{3,4}|(?:[49]\\d|80)\\d{5}",[4,5,6,7,8,9,10,11,12,13],[["(\\d{4,5})","$1",["21"]],["(\\d{3})(\\d{3,4})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[49]0|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[124]"]],["(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3 $4",["0"]]],"0",0,0,0,0,0,0,"00"," int. "],UZ:["998","00","(?:20|33|[5-9]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[235-9]"]]]],VA:["39","00","0\\d{5,10}|3[0-8]\\d{7,10}|55\\d{8}|8\\d{5}(?:\\d{2,4})?|(?:1\\d|39)\\d{7,8}",[6,7,8,9,10,11,12],0,0,0,0,0,0,"06698"],VC:["1","011","(?:[58]\\d\\d|784|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","784$1",0,"784"],VE:["58","00","[68]00\\d{7}|(?:[24]\\d|[59]0)\\d{8}",[10],[["(\\d{3})(\\d{7})","$1-$2",["[24-689]"],"0$1"]],"0"],VG:["1","011","(?:284|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-578]\\d{6})$|1","284$1",0,"284"],VI:["1","011","[58]\\d{9}|(?:34|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","340$1",0,"340"],VN:["84","00","[12]\\d{9}|[135-9]\\d{8}|[16]\\d{6,7}|7\\d{6}",[7,8,9,10],[["(\\d{4})(\\d{4,6})","$1 $2",["1(?:2[02]|[89])"],0,1],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[26]|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","(?:639\\d|7093)\\d{5}|(?:26|80|9\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["26(?:89\\d|9(?:0[0-467]|15|5[0-4]|6\\d|[78]0))\\d{4}"],["(?:639(?:0[0-79]|1[019]|[267]\\d|3[09]|40|5[05-9]|9[04-79])|7093[5-7])\\d{4}"],["80\\d{7}"],0,0,0,0,0,["9(?:(?:39|47)8[01]|769\\d)\\d{4}"]]],ZA:["27","00","[1-79]\\d{8}|8\\d{4,9}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,4})","$1 $2",["8[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["8[1-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["860"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],ZM:["260","00","800\\d{6}|(?:21|[579]\\d|63)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[28]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[579]"],"0$1"]],"0"],ZW:["263","00","2(?:[0-57-9]\\d{6,8}|6[0-24-9]\\d{6,7})|[38]\\d{9}|[35-8]\\d{8}|[3-6]\\d{7}|[1-689]\\d{6}|[1-3569]\\d{5}|[1356]\\d{4}",[5,6,7,8,9,10],[["(\\d{3})(\\d{3,5})","$1 $2",["2(?:0[45]|2[278]|[49]8)|3(?:[09]8|17)|6(?:[29]8|37|75)|[23][78]|(?:33|5[15]|6[68])[78]"],"0$1"],["(\\d)(\\d{3})(\\d{2,4})","$1 $2 $3",["[49]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["80"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["24|8[13-59]|(?:2[05-79]|39|5[45]|6[15-8])2","2(?:02[014]|4|[56]20|[79]2)|392|5(?:42|525)|6(?:[16-8]21|52[013])|8[13-59]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:1[39]|2[0157]|[378]|[56][14])|3(?:12|29)","2(?:1[39]|2[0157]|[378]|[56][14])|3(?:123|29)"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["1|2(?:0[0-36-9]|12|29|[56])|3(?:1[0-689]|[24-6])|5(?:[0236-9]|1[2-4])|6(?:[013-59]|7[0-46-9])|(?:33|55|6[68])[0-69]|(?:29|3[09]|62)[0-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["29[013-9]|39|54"],"0$1"],["(\\d{4})(\\d{3,5})","$1 $2",["(?:25|54)8","258|5483"],"0$1"]],"0"]},nonGeographic:{800:["800",0,"(?:00|[1-9]\\d)\\d{6}",[8],[["(\\d{4})(\\d{4})","$1 $2",["\\d"]]],0,0,0,0,0,0,[0,0,["(?:00|[1-9]\\d)\\d{6}"]]],808:["808",0,"[1-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[1-9]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,0,["[1-9]\\d{7}"]]],870:["870",0,"7\\d{11}|[235-7]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-7]"]]],0,0,0,0,0,0,[0,["(?:[356]|774[45])\\d{8}|7[6-8]\\d{7}"],0,0,0,0,0,0,["2\\d{8}",[9]]]],878:["878",0,"10\\d{10}",[12],[["(\\d{2})(\\d{5})(\\d{5})","$1 $2 $3",["1"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["10\\d{10}"]]],881:["881",0,"6\\d{9}|[0-36-9]\\d{8}",[9,10],[["(\\d)(\\d{3})(\\d{5})","$1 $2 $3",["[0-37-9]"]],["(\\d)(\\d{3})(\\d{5,6})","$1 $2 $3",["6"]]],0,0,0,0,0,0,[0,["6\\d{9}|[0-36-9]\\d{8}"]]],882:["882",0,"[13]\\d{6}(?:\\d{2,5})?|[19]\\d{7}|(?:[25]\\d\\d|4)\\d{7}(?:\\d{2})?",[7,8,9,10,11,12],[["(\\d{2})(\\d{5})","$1 $2",["16|342"]],["(\\d{2})(\\d{6})","$1 $2",["49"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["1[36]|9"]],["(\\d{2})(\\d{4})(\\d{3})","$1 $2 $3",["3[23]"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["16"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|23|3(?:[15]|4[57])|4|5[12]"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["34"]],["(\\d{2})(\\d{4,5})(\\d{5})","$1 $2 $3",["[1-35]"]]],0,0,0,0,0,0,[0,["342\\d{4}|(?:337|49)\\d{6}|(?:3(?:2|47|7\\d{3})|5(?:0\\d{3}|2[0-2]))\\d{7}",[7,8,9,10,12]],0,0,0,["348[57]\\d{7}",[11]],0,0,["1(?:3(?:0[0347]|[13][0139]|2[035]|4[013568]|6[0459]|7[06]|8[15-8]|9[0689])\\d{4}|6\\d{5,10})|(?:345\\d|9[89])\\d{6}|(?:10|2(?:3|85\\d)|3(?:[15]|[69]\\d\\d)|4[15-8]|51)\\d{8}"]]],883:["883",0,"(?:[1-4]\\d|51)\\d{6,10}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,8})","$1 $2 $3",["[14]|2[24-689]|3[02-689]|51[24-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["510"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["21"]],["(\\d{4})(\\d{4})(\\d{4})","$1 $2 $3",["51[13]"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[235]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["(?:2(?:00\\d\\d|10)|(?:370[1-9]|51\\d0)\\d)\\d{7}|51(?:00\\d{5}|[24-9]0\\d{4,7})|(?:1[0-79]|2[24-689]|3[02-689]|4[0-4])0\\d{5,9}"]]],888:["888",0,"\\d{11}",[11],[["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3"]],0,0,0,0,0,0,[0,0,0,0,0,0,["\\d{11}"]]],979:["979",0,"[1359]\\d{8}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[1359]"]]],0,0,0,0,0,0,[0,0,0,["[1359]\\d{8}"]]]}};function bk(t,e,n){var o=Array.prototype.slice.call(e);o.push(OT);var r=t.apply(this,o);return n&&r&&Object.setPrototypeOf(r,n),r}function Tk(t,e){t=t.split("-"),e=e.split("-");for(var n=t[0].split("."),o=e[0].split("."),r=0;r<3;r++){var i=Number(n[r]),s=Number(o[r]);if(i>s)return 1;if(s>i)return-1;if(!isNaN(i)&&isNaN(s))return 1;if(isNaN(i)&&!isNaN(s))return-1}return t[1]&&e[1]?t[1]>e[1]?1:t[1]<e[1]?-1:0:!t[1]&&e[1]?1:t[1]&&!e[1]?-1:0}var gbe={}.constructor;function Qi(t){return t!=null&&t.constructor===gbe}var hbe=/^\d+$/;function vk(t){return hbe.test(t)}var ybe="1.2.0",Sbe="1.7.35",zK=" ext. ",_t=class{constructor(e){Nk(e),this.metadata=e,VK.call(this,e)}getCountries(){return Object.keys(this.metadata.countries).filter(e=>e!=="001")}getCountryMetadata(e){return this.metadata.countries[e]}nonGeographic(){if(!(this.v1||this.v2||this.v3))return this.metadata.nonGeographic||this.metadata.nonGeographical}hasCountry(e){return this.getCountryMetadata(e)!==void 0}hasCallingCode(e){if(this.getCountryCodesForCallingCode(e))return!0;if(this.nonGeographic()){if(this.nonGeographic()[e])return!0}else{let n=this.countryCallingCodes()[e];if(n&&n.length===1&&n[0]==="001")return!0}}isNonGeographicCallingCode(e){return this.nonGeographic()?!!this.nonGeographic()[e]:!this.getCountryCodesForCallingCode(e)}country(e){return this.selectNumberingPlan(e)}selectNumberingPlan(e,n){let o,r;if(e&&(vk(e)?r=e:o=e),n&&(r=n),o&&o!=="001"){let i=this.getCountryMetadata(o);if(!i)throw new Error(`Unknown country: ${o}`);this.numberingPlan=new xT(i,this)}else if(r){if(!this.hasCallingCode(r))throw new Error(`Unknown calling code: ${r}`);this.numberingPlan=new xT(this.getNumberingPlanMetadata(r),this)}else this.numberingPlan=void 0;return this}getCountryCodesForCallingCode(e){let n=this.countryCallingCodes()[e];if(n)return n.length===1&&n[0].length===3?void 0:n}getCountryCodeForCallingCode(e){let n=this.getCountryCodesForCallingCode(e);if(n)return n[0]}getNumberingPlanMetadata(e){let n=this.getCountryCodeForCallingCode(e);if(n)return this.getCountryMetadata(n);if(this.nonGeographic()){let o=this.nonGeographic()[e];if(o)return o}else{let o=this.countryCallingCodes()[e];if(o&&o.length===1&&o[0]==="001")return this.metadata.countries["001"]}}countryCallingCode(){return this.numberingPlan.callingCode()}IDDPrefix(){return this.numberingPlan.IDDPrefix()}defaultIDDPrefix(){return this.numberingPlan.defaultIDDPrefix()}nationalNumberPattern(){return this.numberingPlan.nationalNumberPattern()}possibleLengths(){return this.numberingPlan.possibleLengths()}formats(){return this.numberingPlan.formats()}nationalPrefixForParsing(){return this.numberingPlan.nationalPrefixForParsing()}nationalPrefixTransformRule(){return this.numberingPlan.nationalPrefixTransformRule()}leadingDigits(){return this.numberingPlan.leadingDigits()}hasTypes(){return this.numberingPlan.hasTypes()}type(e){return this.numberingPlan.type(e)}ext(){return this.numberingPlan.ext()}countryCallingCodes(){return this.v1?this.metadata.country_phone_code_to_countries:this.metadata.country_calling_codes}chooseCountryByCountryCallingCode(e){return this.selectNumberingPlan(e)}hasSelectedNumberingPlan(){return this.numberingPlan!==void 0}},xT=class{constructor(e,n){this.globalMetadataObject=n,this.metadata=e,VK.call(this,n.metadata)}callingCode(){return this.metadata[0]}_getDefaultCountryMetadataForThisCallingCode(){return this.globalMetadataObject.getNumberingPlanMetadata(this.callingCode())}getDefaultCountryMetadataForRegion(){return this._getDefaultCountryMetadataForThisCallingCode()}IDDPrefix(){if(!(this.v1||this.v2))return this.metadata[1]}defaultIDDPrefix(){if(!(this.v1||this.v2))return this.metadata[12]}nationalNumberPattern(){return this.v1||this.v2?this.metadata[1]:this.metadata[2]}possibleLengths(){if(!this.v1)return this.metadata[this.v2?2:3]}_getFormats(e){return e[this.v1?2:this.v2?3:4]}formats(){return(this._getFormats(this.metadata)||this._getFormats(this._getDefaultCountryMetadataForThisCallingCode())||[]).map(n=>new Rk(n,this))}nationalPrefix(){return this.metadata[this.v1?3:this.v2?4:5]}_getNationalPrefixFormattingRule(e){return e[this.v1?4:this.v2?5:6]}nationalPrefixFormattingRule(){return this._getNationalPrefixFormattingRule(this.metadata)||this._getNationalPrefixFormattingRule(this._getDefaultCountryMetadataForThisCallingCode())}_nationalPrefixForParsing(){return this.metadata[this.v1?5:this.v2?6:7]}nationalPrefixForParsing(){return this._nationalPrefixForParsing()||this.nationalPrefix()}nationalPrefixTransformRule(){return this.metadata[this.v1?6:this.v2?7:8]}_getNationalPrefixIsOptionalWhenFormatting(){return!!this.metadata[this.v1?7:this.v2?8:9]}nationalPrefixIsOptionalWhenFormattingInNationalFormat(){return this._getNationalPrefixIsOptionalWhenFormatting(this.metadata)||this._getNationalPrefixIsOptionalWhenFormatting(this._getDefaultCountryMetadataForThisCallingCode())}leadingDigits(){return this.metadata[this.v1?8:this.v2?9:10]}types(){return this.metadata[this.v1?9:this.v2?10:11]}hasTypes(){return this.types()&&this.types().length===0?!1:!!this.types()}type(e){if(this.hasTypes()&&jK(this.types(),e))return new Pk(jK(this.types(),e),this)}ext(){return this.v1||this.v2?zK:this.metadata[13]||zK}},Rk=class{constructor(e,n){this._format=e,this.metadata=n}pattern(){return this._format[0]}format(){return this._format[1]}leadingDigitsPatterns(){return this._format[2]||[]}nationalPrefixFormattingRule(){return this._format[3]||this.metadata.nationalPrefixFormattingRule()}nationalPrefixIsOptionalWhenFormattingInNationalFormat(){return!!this._format[4]||this.metadata.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}nationalPrefixIsMandatoryWhenFormattingInNationalFormat(){return this.usesNationalPrefix()&&!this.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}usesNationalPrefix(){return!!(this.nationalPrefixFormattingRule()&&!Ebe.test(this.nationalPrefixFormattingRule()))}internationalFormat(){return this._format[5]||this.format()}},Ebe=/^\(?\$1\)?$/,Pk=class{constructor(e,n){this.type=e,this.metadata=n}pattern(){return this.metadata.v1?this.type:this.type[0]}possibleLengths(){if(!this.metadata.v1)return this.type[1]||this.metadata.possibleLengths()}};function jK(t,e){switch(e){case"FIXED_LINE":return t[0];case"MOBILE":return t[1];case"TOLL_FREE":return t[2];case"PREMIUM_RATE":return t[3];case"PERSONAL_NUMBER":return t[4];case"VOICEMAIL":return t[5];case"UAN":return t[6];case"PAGER":return t[7];case"VOIP":return t[8];case"SHARED_COST":return t[9]}}function Nk(t){if(!t)throw new Error("[libphonenumber-js] `metadata` argument not passed. Check your arguments.");if(!Qi(t)||!Qi(t.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 ${Qi(t)?"an object of shape: { "+Object.keys(t).join(", ")+" }":"a "+Abe(t)+": "+t}.`)}var Abe=t=>typeof t;function CS(t,e){let n=new _t(e);if(n.hasCountry(t))return n.selectNumberingPlan(t).countryCallingCode();throw new Error(`Unknown country: ${t}`)}function FK(t,e){return e.countries.hasOwnProperty(t)}function VK(t){let{version:e}=t;typeof e=="number"?(this.v1=e===1,this.v2=e===2,this.v3=e===3,this.v4=e===4):e?Tk(e,ybe)===-1?this.v2=!0:Tk(e,Sbe)===-1?this.v3=!0:this.v4=!0:this.v1=!0}function Ok(t,e){let n=t.slice();for(let o of e)t.indexOf(o)<0&&n.push(o);return n.sort((o,r)=>o-r)}function ou(t,e,n){return BK(t,void 0,e,n)}function BK(t,e,n,o){n&&(o=new _t(o.metadata),o.selectNumberingPlan(n));let r=o.type(e),i=r&&r.possibleLengths()||o.possibleLengths();if(!i)return"IS_POSSIBLE";if(e==="FIXED_LINE_OR_MOBILE"){if(!o.type("FIXED_LINE"))return BK(t,"MOBILE",n,o);let c=o.type("MOBILE");c&&(i=Ok(i,c.possibleLengths()))}else if(e&&!r)return"INVALID_LENGTH";let s=t.length,a=i[0];return a===s?"IS_POSSIBLE":a>s?"TOO_SHORT":i[i.length-1]<s?"TOO_LONG":i.indexOf(s,1)>=0?"IS_POSSIBLE":"INVALID_LENGTH"}function xk(t,e,n){e===void 0&&(e={});let o=new _t(n);if(e.v2){if(!t.countryCallingCode)throw new Error("Invalid phone number object passed");o.selectNumberingPlan(t.country||t.countryCallingCode)}else{if(!t.phone)return!1;if(t.country){if(!o.hasCountry(t.country))throw new Error(`Unknown country: ${t.country}`);o.selectNumberingPlan(t.country)}else{if(!t.countryCallingCode)throw new Error("Invalid phone number object passed");o.selectNumberingPlan(t.countryCallingCode)}}if(o.possibleLengths())return Dk(t.phone||t.nationalNumber,o);if(t.countryCallingCode&&o.isNonGeographicCallingCode(t.countryCallingCode))return!0;throw new Error('Missing "possibleLengths" in metadata. Perhaps the metadata has been generated before v1.0.18.')}function Dk(t,e){return ou(t,void 0,e)==="IS_POSSIBLE"}function Ir(t,e){return t=t||"",new RegExp("^(?:"+e+")$").test(t)}var Cbe=["MOBILE","PREMIUM_RATE","TOLL_FREE","SHARED_COST","VOIP","PERSONAL_NUMBER","PAGER","UAN","VOICEMAIL"];function iu(t,e,n){if(e=e||{},!t.country&&!t.countryCallingCode)return;let o=new _t(n);o.selectNumberingPlan(t.country||t.countryCallingCode);let r=e.v2?t.nationalNumber:t.phone;if(Ir(r,o.nationalNumberPattern())){if($k(r,"FIXED_LINE",o))return o.type("MOBILE")&&o.type("MOBILE").pattern()===""||!o.type("MOBILE")||$k(r,"MOBILE",o)?"FIXED_LINE_OR_MOBILE":"FIXED_LINE";for(let i of Cbe)if($k(r,i,o))return i}}function $k(t,e,n){let o=n.type(e);return!o||!o.pattern()||o.possibleLengths()&&o.possibleLengths().indexOf(t.length)<0?!1:Ir(t,o.pattern())}function wk(t,e,n){e=e||{};let o=new _t(n);if(o.selectNumberingPlan(t.country||t.countryCallingCode),o.hasTypes())return iu(t,e,o.metadata)!==void 0;let r=e.v2?t.nationalNumber:t.phone;return Ir(r,o.nationalNumberPattern())}var Ibe=/^[A-Z]{2}$/;function Mk(t){return Ibe.test(t)}var _be=!1;function kk(t,e){let n,o,r=new _t(e);return Mk(t)?(n=t,r.selectNumberingPlan(n),o=r.countryCallingCode()):(o=t,_be&&r.isNonGeographicCallingCode(o)&&(n="001")),{country:n,callingCode:o}}function Lk(t,e,n){let r=new _t(n).getCountryCodesForCallingCode(t);return r?r.filter(i=>bbe(e,i,n)):[]}function bbe(t,e,n){let o=new _t(n);return o.selectNumberingPlan(e),o.numberingPlan.possibleLengths().indexOf(t.length)>=0}var _r="0-90-9٠-٩۰-۹",Tbe="-‐-―−ー-";var vbe=" ",Rbe="()()[]\\[\\]",Pbe="~⁓∼~",lm=`${Tbe}//..${vbe}${Rbe}${Pbe}`,IS="++";var Nbe=new RegExp("(["+_r+"])");function Uk(t,e,n,o){if(!e)return;let r=new _t(o);r.selectNumberingPlan(e||n);let i=new RegExp(r.IDDPrefix());if(t.search(i)!==0)return;t=t.slice(t.match(i)[0].length);let s=t.match(Nbe);if(!(s&&s[1]!=null&&s[1].length>0&&s[1]==="0"))return t}function zk(t,e){if(t&&e.numberingPlan.nationalPrefixForParsing()){let n=new RegExp("^(?:"+e.numberingPlan.nationalPrefixForParsing()+")"),o=n.exec(t);if(o){let r,i,s=o.length-1,a=s>0&&o[s];if(e.nationalPrefixTransformRule()&&a)r=t.replace(n,e.nationalPrefixTransformRule()),s>1&&(i=o[1]);else{let l=o[0];r=t.slice(l.length),a&&(i=o[1])}let c;if(a){let l=t.indexOf(o[1]);t.slice(0,l)===e.numberingPlan.nationalPrefix()&&(c=e.numberingPlan.nationalPrefix())}else c=o[0];return{nationalNumber:r,nationalPrefix:c,carrierCode:i}}}return{nationalNumber:t}}function jk(t,e,n){let o=new _t(n);for(let r of e)if(o.selectNumberingPlan(r),o.leadingDigits()){if(t&&t.search(o.leadingDigits())===0)return r}else if(iu({phone:t,country:r},void 0,o.metadata))return r}var Obe=!1;function _S(t,{nationalNumber:e,metadata:n}){if(Obe&&n.isNonGeographicCallingCode(t))return"001";let o=n.getCountryCodesForCallingCode(t);if(o)return o.length===1?o[0]:jk(e,o,n.metadata)}function um(t,e,n){let{carrierCode:o,nationalNumber:r}=zk(t,n);if(r!==t){if(!xbe(t,r,n))return{nationalNumber:t};if(n.numberingPlan.possibleLengths()&&(e||(e=_S(n.numberingPlan.callingCode(),{nationalNumber:r,metadata:n})),!Dbe(r,e,n)))return{nationalNumber:t}}return{nationalNumber:r,carrierCode:o}}function xbe(t,e,n){return!(Ir(t,n.nationalNumberPattern())&&!Ir(e,n.nationalNumberPattern()))}function Dbe(t,e,n){switch(ou(t,e,n)){case"TOO_SHORT":case"INVALID_LENGTH":return!1;default:return!0}}function Fk(t,e,n,o,r){if(!(e||n||o))return{number:t};let i=e||n?CS(e||n,r):o;if(t.indexOf(i)===0){let s=new _t(r);s.selectNumberingPlan(e||n||o);let a=t.slice(i.length),{nationalNumber:c}=um(a,void 0,s),{nationalNumber:l}=um(t,void 0,s);if(!Ir(l,s.nationalNumberPattern())&&Ir(c,s.nationalNumberPattern())||ou(l,void 0,s)==="TOO_LONG")return{countryCallingCode:i,number:a}}return{number:t}}function bS(t,e,n,o,r){if(!t)return{};let i;if(t[0]!=="+"){let c=Uk(t,e||n,o,r);if(c&&c!==t)i=!0,t="+"+c;else{if(e||n||o){let{countryCallingCode:l,number:u}=Fk(t,e,n,o,r);if(l)return{countryCallingCodeSource:"FROM_NUMBER_WITHOUT_PLUS_SIGN",countryCallingCode:l,number:u}}return{number:t}}}if(t[1]==="0")return{};let s=new _t(r),a=2;for(;a-1<=3&&a<=t.length;){let c=t.slice(1,a);if(s.hasCallingCode(c))return s.selectNumberingPlan(c),{countryCallingCodeSource:i?"FROM_NUMBER_WITH_IDD":"FROM_NUMBER_WITH_PLUS_SIGN",countryCallingCode:c,number:t.slice(a)};a++}return{}}function Vk(t){return t.replace(new RegExp(`[${lm}]+`,"g")," ").trim()}var $be=/(\$\d)/;function Bk(t,e,{useInternationalFormat:n,withNationalPrefix:o,carrierCode:r,metadata:i}){let s=t.replace(new RegExp(e.pattern()),n?e.internationalFormat():o&&e.nationalPrefixFormattingRule()?e.format().replace($be,e.nationalPrefixFormattingRule()):e.format());return n?Vk(s):s}var wbe=/^[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?$/;function Hk(t,e,n){let o=new _t(n);if(o.selectNumberingPlan(t||e),o.defaultIDDPrefix())return o.defaultIDDPrefix();if(wbe.test(o.IDDPrefix()))return o.IDDPrefix()}var Mbe=";ext=",dm=t=>`([${_r}]{1,${t}})`;function TS(t){var e="20",n="15",o="9",r="6",i="[ \\t,]*",s="[:\\..]?[ \\t,-]*",a="#?",c="(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)",l="(?:[xx##~~]|int|int)",u="[- ]+",p="[ \\t]*",m="(?:,{2}|;)",f=Mbe+dm(e),g=i+c+s+dm(e)+a,h=i+l+s+dm(o)+a,E=u+dm(r)+"#",C=p+m+s+dm(n)+a,I=p+"(?:,)+"+s+dm(o)+a;return f+"|"+g+"|"+h+"|"+E+"|"+C+"|"+I}var kbe="["+_r+"]{"+2+"}",Lbe="["+IS+"]{0,1}(?:["+lm+"]*["+_r+"]){3,}["+lm+_r+"]*",Ube=new RegExp("^["+IS+"]{0,1}(?:["+lm+"]*["+_r+"]){1,2}$","i"),zbe=Lbe+"(?:"+TS()+")?",jbe=new RegExp("^"+kbe+"$|^"+zbe+"$","i");function Gk(t){return t.length>=2&&jbe.test(t)}function HK(t){return Ube.test(t)}function GK({number:t,ext:e}){if(!t)return"";if(t[0]!=="+")throw new Error('"formatRFC3966()" expects "number" to be in E.164 format.');return`tel:${t}${e?";ext="+e:""}`}var qK={formatExtension:(t,e,n)=>`${t}${n.ext()}${e}`};function Wk(t,e,n,o){n?n=Bbe({},qK,n):n=qK;let r=new _t(o);if(t.country&&t.country!=="001"){if(!r.hasCountry(t.country))throw new Error(`Unknown country: ${t.country}`);r.selectNumberingPlan(t.country)}else if(t.countryCallingCode)r.selectNumberingPlan(t.countryCallingCode);else return t.phone||"";let i=r.countryCallingCode(),s=n.v2?t.nationalNumber:t.phone,a;switch(e){case"NATIONAL":return s?(a=$T(s,t.carrierCode,"NATIONAL",r,n),qk(a,t.ext,r,n.formatExtension)):"";case"INTERNATIONAL":return s?(a=$T(s,null,"INTERNATIONAL",r,n),a=`+${i} ${a}`,qk(a,t.ext,r,n.formatExtension)):`+${i}`;case"E.164":return`+${i}${s}`;case"RFC3966":return GK({number:`+${i}${s}`,ext:t.ext});case"IDD":if(!n.fromCountry)return;let c=Vbe(s,t.carrierCode,i,n.fromCountry,r);return c?qk(c,t.ext,r,n.formatExtension):void 0;default:throw new Error(`Unknown "format" argument passed to "formatNumber()": "${e}"`)}}function $T(t,e,n,o,r){let i=Fbe(o.formats(),t);return i?Bk(t,i,{useInternationalFormat:n==="INTERNATIONAL",withNationalPrefix:!(i.nationalPrefixIsOptionalWhenFormattingInNationalFormat()&&r&&r.nationalPrefix===!1),carrierCode:e,metadata:o}):t}function Fbe(t,e){return Hbe(t,n=>{if(n.leadingDigitsPatterns().length>0){let o=n.leadingDigitsPatterns()[n.leadingDigitsPatterns().length-1];if(e.search(o)!==0)return!1}return Ir(e,n.pattern())})}function qk(t,e,n,o){return e?o(t,e,n):t}function Vbe(t,e,n,o,r){if(CS(o,r.metadata)===n){let a=$T(t,e,"NATIONAL",r);return n==="1"?n+" "+a:a}let s=Hk(o,void 0,r.metadata);if(s)return`${s} ${n} ${$T(t,null,"INTERNATIONAL",r)}`}function Bbe(...t){let e=1;for(;e<t.length;){if(t[e])for(let n in t[e])t[0][n]=t[e][n];e++}return t[0]}function Hbe(t,e){let n=0;for(;n<t.length;){if(e(t[n]))return t[n];n++}}function Kk(){return Kk=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)({}).hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Kk.apply(null,arguments)}var Ac=class{constructor(e,n,o){if(!e)throw new TypeError("First argument is required");if(typeof e!="string")throw new TypeError("First argument must be a string");if(e[0]==="+"&&!n)throw new TypeError("`metadata` argument not passed");if(Qi(n)&&Qi(n.countries)){o=n;let s=e;if(!Gbe.test(s))throw new Error('Invalid `number` argument passed: must consist of a "+" followed by digits');let{countryCallingCode:a,number:c}=bS(s,void 0,void 0,void 0,o);if(n=c,e=a,!n)throw new Error("Invalid `number` argument passed: too short")}if(!n)throw new TypeError("`nationalNumber` argument is required");if(typeof n!="string")throw new TypeError("`nationalNumber` argument must be a string");Nk(o);let{country:r,callingCode:i}=kk(e,o);this.country=r,this.countryCallingCode=i,this.nationalNumber=n,this.number="+"+this.countryCallingCode+this.nationalNumber,this.getMetadata=()=>o}setExt(e){this.ext=e}getPossibleCountries(){return this.country?[this.country]:Lk(this.countryCallingCode,this.nationalNumber,this.getMetadata())}isPossible(){return xk(this,{v2:!0},this.getMetadata())}isValid(){return wk(this,{v2:!0},this.getMetadata())}isNonGeographic(){return new _t(this.getMetadata()).isNonGeographicCallingCode(this.countryCallingCode)}isEqual(e){return this.number===e.number&&this.ext===e.ext}getType(){return iu(this,{v2:!0},this.getMetadata())}format(e,n){return Wk(this,e,n?Kk({},n,{v2:!0}):{v2:!0},this.getMetadata())}formatNational(e){return this.format("NATIONAL",e)}formatInternational(e){return this.format("INTERNATIONAL",e)}getURI(e){return this.format("RFC3966",e)}},Gbe=/^\+\d+$/;var Lr=class t extends Error{constructor(e){super(e),Object.setPrototypeOf(this,t.prototype),this.name=this.constructor.name}};var WK=new RegExp("(?:"+TS()+")$","i");function Jk(t){let e=t.search(WK);if(e<0)return{};let n=t.slice(0,e),o=t.match(WK),r=1;for(;r<o.length;){if(o[r])return{number:n,ext:o[r]};r++}}var qbe={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 KK(t){return qbe[t]}function wT(t){let e="";for(let n of t.split(""))e+=Wbe(n,e)||"";return e}function Wbe(t,e,n){if(t==="+"){if(e){typeof n=="function"&&n("end");return}return"+"}return KK(t)}var Zk="+",Kbe="[\\-\\.\\(\\)]?",JK="(["+_r+"]|"+Kbe+")",Jbe="^\\"+Zk+JK+"*["+_r+"]"+JK+"*$",Ybe=new RegExp(Jbe,"g"),Yk=_r,Zbe="["+Yk+"]+((\\-)*["+Yk+"])*",Qbe="a-zA-Z",Xbe="["+Qbe+"]+((\\-)*["+Yk+"])*",eTe="^("+Zbe+"\\.)*"+Xbe+"\\.?$",tTe=new RegExp(eTe,"g"),Qk="tel:",MT=";phone-context=",YK=";isub=";function Xk(t){let e=t.indexOf(MT);if(e<0)return null;let n=e+MT.length;if(n>=t.length)return"";let o=t.indexOf(";",n);return o>=0?t.substring(n,o):t.substring(n)}function ZK(t){return t===null?!0:t.length===0?!1:Ybe.test(t)||tTe.test(t)}function eL(t,{extractFormattedPhoneNumber:e}){let n=Xk(t);if(!ZK(n))throw new Lr("NOT_A_NUMBER");let o;if(n===null)o=e(t)||"";else{o="",n.charAt(0)===Zk&&(o+=n);let i=t.indexOf(Qk),s;i>=0?s=i+Qk.length:s=0;let a=t.indexOf(MT);o+=t.substring(s,a)}let r=o.indexOf(YK);if(r>0&&(o=o.substring(0,r)),o!=="")return o}var rTe=250,oTe=new RegExp("["+IS+_r+"]"),iTe=new RegExp("[^"+_r+"#]+$"),sTe=!1;function tL(t,e,n){e=e||{};let o=new _t(n);if(e.defaultCountry&&!o.hasCountry(e.defaultCountry))throw e.v2?new Lr("INVALID_COUNTRY"):new Error(`Unknown country: ${e.defaultCountry}`);let{number:r,ext:i,error:s}=cTe(t,e.v2,e.extract);if(!r){if(e.v2)throw s==="TOO_SHORT"?new Lr("TOO_SHORT"):new Lr("NOT_A_NUMBER");return{}}let{country:a,nationalNumber:c,countryCallingCode:l,countryCallingCodeSource:u,carrierCode:p}=uTe(r,e.defaultCountry,e.defaultCallingCode,o);if(!o.hasSelectedNumberingPlan()){if(e.v2)throw new Lr("INVALID_COUNTRY");return{}}if(!c||c.length<2){if(e.v2)throw new Lr("TOO_SHORT");return{}}if(c.length>17){if(e.v2)throw new Lr("TOO_LONG");return{}}if(e.v2){let f=new Ac(l,c,o.metadata);return a&&(f.country=a),p&&(f.carrierCode=p),i&&(f.ext=i),f.__countryCallingCodeSource=u,f}let m=(e.extended?o.hasSelectedNumberingPlan():a)?Ir(c,o.nationalNumberPattern()):!1;return e.extended?{country:a,countryCallingCode:l,carrierCode:p,valid:m,possible:m?!0:!!(e.extended===!0&&o.possibleLengths()&&Dk(c,o)),phone:c,ext:i}:m?lTe(a,c,i):{}}function aTe(t,e,n){if(!t)return;if(t.length>rTe){if(n)throw new Lr("TOO_LONG");return}if(e===!1)return t;let o=t.search(oTe);if(!(o<0))return t.slice(o).replace(iTe,"")}function cTe(t,e,n){let o=eL(t,{extractFormattedPhoneNumber:i=>aTe(i,n,e)});if(!o)return{};if(!Gk(o))return HK(o)?{error:"TOO_SHORT"}:{};let r=Jk(o);return r.ext?r:{number:o}}function lTe(t,e,n){let o={country:t,phone:e};return n&&(o.ext=n),o}function uTe(t,e,n,o){let{countryCallingCodeSource:r,countryCallingCode:i,number:s}=bS(wT(t),void 0,e,n,o.metadata),a;if(i)o.selectNumberingPlan(i);else if(s&&(e||n))e?(a=e,o.selectNumberingPlan(e),i=o.numberingPlan.callingCode()):(o.selectNumberingPlan(n),i=n,sTe&&o.isNonGeographicCallingCode(i)&&(a="001"));else return{};if(!s)return{countryCallingCodeSource:r,countryCallingCode:i};let{nationalNumber:c,carrierCode:l}=um(wT(s),void 0,o),u=_S(i,{nationalNumber:c,metadata:o});return u&&(a=u,u==="001"||o.selectNumberingPlan(a)),{country:a,countryCallingCode:i,countryCallingCodeSource:r,nationalNumber:c,carrierCode:l}}function nL(){return nL=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)({}).hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},nL.apply(null,arguments)}function rL(t,e,n){return tL(t,nL({},e,{v2:!0}),n)}function oL(){return oL=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)({}).hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},oL.apply(null,arguments)}function iL(t){let[e,n,o,r]=Array.prototype.slice.call(t),i,s,a;if(typeof e=="string")i=e;else throw new TypeError("A text for parsing must be a string.");if(!n||typeof n=="string")r?(s=o,a=r):(s=void 0,a=o),n&&(s=oL({defaultCountry:n},s));else if(Qi(n))o?(s=n,a=o):a=n;else throw new Error(`Invalid second argument: ${n}`);return{text:i,options:s,metadata:a}}function sL(){return sL=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)({}).hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},sL.apply(null,arguments)}function aL(t,e,n){e&&e.defaultCountry&&!FK(e.defaultCountry,n)&&(e=sL({},e,{defaultCountry:void 0}));try{return rL(t,e,n)}catch(o){if(!(o instanceof Lr))throw o}}function vS(){let{text:t,options:e,metadata:n}=iL(arguments);return aL(t,e,n)}var kT=class extends Ac{constructor(e){super(e,OT)}};function LT(){return bk(vS,arguments,kT.prototype)}var QK="Enter a valid phone number";Ft.register("phone",t=>{let e=null;t&&!/^\+?\d+$/.test(t)&&(e=QK);let o=t?.startsWith("+");if(t&&o){let r=LT(t);(!r||!r.isPossible()||t!==r.number)&&(e=QK)}return e});var XK="",eJ="",dTe=t=>{if(t&&t.startsWith(XK)&&t.endsWith(XK))return"invalid";if(t&&t.startsWith(eJ)&&t.endsWith(eJ))return"incomplete"},cL=(t,e)=>{switch(dTe(e)??e){case"invalid":return`Incorrect ${t}`;case"incomplete":return`Incomplete ${t}`;default:return null}};Ft.register("datetime",t=>cL("date and time",t));Ft.register("date",t=>cL("date",t));Ft.register("time",t=>cL("time",t));var tJ=t=>{let e="Error with one or more files";for(let n of t)if(n?.error)return e;return null};Ft.register("attachment",t=>{let e=null,n="Error with one or more files";return t&&("pyCount"in t&&Array.isArray(t.pxResults)?e=tJ(t.pxResults):Array.isArray(t)?e=tJ(t):"error"in t&&t.error&&(e=n)),e});var su=()=>{let t={},e=typeof Intl<"u"?Intl.DateTimeFormat().resolvedOptions().timeZone:void 0;e&&(t["user-timezone"]=e);let n=typeof navigator<"u"?navigator.language:void 0;return n&&(t["user-locale"]=n),t},rJ="createConversation",UT="sendMessage",oJ="getConversations",iJ="getMessages",sJ="createConversationForAgent",nJ="sendMessageForAgent",pTe="getConversationsForAgent",mTe="getMessagesForAgent",fTe="likeAgentMessage",gTe="dislikeAgentMessage",hTe="getAgent",aJ="getCoach",cJ=(t,e,n,o,r,i,s)=>{for(let c of s)c?.cancel&&typeof c.cancel=="function"&&c.cancel();let a=zi();return s.push(a),Re(t,{queryPayload:oJ===t?{assistantID:e,contextID:n,pageSize:o,pageIndex:r}:{agentID:e,contextID:n,pageSize:o,pageIndex:r},cancelTokenSource:a,headers:su()},i).finally(()=>{let c=s.indexOf(a);c!==-1&&s.splice(c,1)})},lJ=(t,e,n,o,r)=>{for(let s of r)s?.cancel&&typeof s.cancel=="function"&&s.cancel();let i=zi();return r.push(i),Re(t,{queryPayload:iJ===t?{assistantID:e,conversationID:n}:{agentID:e,conversationID:n},cancelTokenSource:i,headers:su()},o).then(s=>(r.pop(),s))},uJ=(t,e,n,o,r,i,s=!1)=>{for(let c of r)c?.cancel&&typeof c.cancel=="function"&&c.cancel();let a=zi();return r.push(a),Re(t,{body:JSON.stringify({contextID:e,executeStarterQuestion:!1,...i&&i.isManualConfirmationSupported&&{capabilities:{tools:{isManualConfirmationSupported:!0}}},...t===sJ&&s&&{showAgentRecommendations:s}}),cancelTokenSource:a,queryPayload:t===rJ?{assistantID:n}:{agentID:n},headers:su()},o).then(c=>(r.pop(),c))},dJ=(t,e,n,o,r,i,s)=>{let a={...o&&{request:o},...s&&s.additionalInstruction&&{additionalInstruction:s.additionalInstruction},...s&&s.isManualConfirmationSupported&&{capabilities:{tools:{isManualConfirmationSupported:!0}}},...s&&s.toolsReviewed&&s.toolsReviewed.length>0&&{toolsReviewed:s.toolsReviewed},...i&&i?.length>0&&{attachments:i}};return Re(t,{body:JSON.stringify(a),queryPayload:t===UT?{assistantID:e,conversationID:n}:{agentID:e,conversationID:n},headers:su()},r)},pJ=(t,e,n,o,r,i,s,a)=>{let c={...o&&{request:o},...s&&s.additionalInstruction&&{additionalInstruction:s.additionalInstruction},...i&&i.length>0&&{attachments:i},...s&&s.toolsReviewed&&s.toolsReviewed.length>0&&{toolsReviewed:s.toolsReviewed},capabilities:{stream:{isEnabled:!0},...s&&s.isManualConfirmationSupported&&{tools:{isManualConfirmationSupported:!0}}},...s&&s.questionnaire&&{questionnaire:s.questionnaire}},l=t===UT?{assistantID:e,conversationID:n}:{agentID:e,conversationID:n},{restApi:u,reqType:p}=F(t,l),m={method:p,headers:{Accept:"text/event-stream",...su()},body:JSON.stringify(c),responseType:"stream",adapter:"fetch",...a&&{signal:a.token}};return k(u,m,r)},mJ=(t,e,n,o,r)=>{for(let s of o)s?.cancel&&typeof s.cancel=="function"&&s.cancel();let i=zi();return o.push(i),Re(t,{queryPayload:t===aJ?{assistantID:e,...r&&{contextID:r}}:{agentID:e,...r&&{contextID:r}},cancelTokenSource:i},n).then(s=>(o.pop(),s)).catch(s=>{throw o.pop(),s})},yTe=(t,e,n,o,r,i=[])=>cJ(oJ,t,e,n,o,r,i),STe=(t,e,n,o,r,i=[])=>cJ(pTe,t,e,n,o,r,i),ETe=(t,e,n,o=[])=>lJ(iJ,t,e,n,o),ATe=(t,e,n,o=[])=>lJ(mTe,t,e,n,o),CTe=(t,e,n,o=[])=>uJ(rJ,t,e,n,o),ITe=(t,e,n,o=[],r,i)=>uJ(sJ,t,e,n,o,r,i),_Te=(t,e,n,o,r)=>r?.enableStreaming?pJ(UT,t,e,n,o,void 0,r):dJ(UT,t,e,n,o),bTe=(t,e,n,o,r,i)=>i?.enableStreaming?pJ(nJ,t,e,n,o,r,i,i.cancelTokenSource):dJ(nJ,t,e,n,o,r,i),TTe=(t,e,n,o=[])=>mJ(hTe,t,e,o,n),vTe=(t,e,n,o=[])=>mJ(aJ,t,e,o,n),RTe=(t,e,n,o)=>{let r={queryPayload:{agentID:t,conversationID:e,messageID:n},headers:su()};return Re(fTe,r,o)},PTe=(t,e,n,o,r="")=>{let i={queryPayload:{agentID:t,conversationID:e,messageID:n},body:JSON.stringify({feedbackText:r}),headers:su()};return Re(gTe,i,o)},fJ={createConversation:CTe,sendMessage:_Te,createConversationForAgent:ITe,sendMessageForAgent:bTe,getAgent:TTe,getCoach:vTe,likeAgentMessage:RTe,unLikeAgentMessage:PTe,getConversations:yTe,getConversationsForAgent:STe,getMessages:ETe,getMessagesForAgent:ATe};var lL=class{async rewriteText(e){let{originalText:n,rewriteAction:o,additionalInstructions:r,context:i}=e,s=T.isInfinityRuntime(),a=T.getRewriteGenAIDP()??O.getDefaultQualifiedName("D_RewriteWithAI"),c={OriginalText:n,RewriteAction:o,AdditionalInstructions:r||""};try{let l,u;if(s){let p=await sn.getPageDataAsync(a,i,c),f=Object.fromEntries(Object.entries(p)).pyResponseData;l=typeof f=="string"?f:void 0}else{let m=(await sn.getDataAsync(a,i,c)).data[0],f=m[O.getDefaultQualifiedName("Content")];l=typeof f=="string"?f:void 0;let g=m[O.getDefaultQualifiedName("ErrorMessage")];u=typeof g=="string"?g:void 0}return l?{success:!0,rewrittenText:l}:{success:!1,errorMessage:u||"AI rewrite failed: No rewritten text returned"}}catch(l){return{success:!1,errorMessage:l instanceof Error?l.message:"An unexpected error occurred during AI rewrite"}}}},gJ=new lL;var uL=class{classAccessMap=new Map;static instance;constructor(){let e=T.getClassesAccessList();e.length!==0?this.classAccessMap=e.reduce((n,o)=>(n.set(o.pyClassName,o.pyHasCreateAccess),n),new Map):this.classAccessMap=T.getCaseTypeList().reduce((n,o)=>(n.set(o.pyWorkTypeImplementationClassName,o.hasCreateAccess??!0),n),new Map)}hasCreateAccess(e){return this.classAccessMap.get(e)}static getInstance(){return this.instance||(this.instance=new this),this.instance}},hJ=uL;var dL=class{static AUTOSAVE_SAVE_STATUS=Fp;static isAutosaveEnabledForContext(e){return Vs(e)}static subscribeAutosaveStatus(e,n){return vH(e,n)}static notifyChange(e,n,o){Vs(e)&&(bH(e,n,o),Bp(e))}},yJ=dL;var pL=class t{static behaviorOverrides={};getPersonalizationUtils=gK;constructor(){t.behaviorOverrides={}}getPCoreVersion=()=>"27.1.0";onPCoreReady=e=>ar.onPCoreReady(e);onPCoreCleanup=e=>ar.onPCoreCleanup(e);getComponentsRegistry=()=>ar.getComponentsRegistry();checkIfSemanticURL=()=>ar.checkIfSemanticURL();isValidSemanticURL=()=>R5();getRoutingUtils=()=>_K;getViewResources=()=>n0;configureForBrowserBookmark=e=>ar.configureForBrowserBookmark(e);getStore=()=>we();resetStore=()=>js();getMessageManager=()=>yd;getCoexistenceManager=()=>ES;getStoreValue=(e,n,o)=>ie(e,n,o);getContainerUtils=()=>xa;getAnnotationUtils=()=>On;getFieldUtils=()=>Ii;getFieldDefaultUtils=()=>gr;getAssetLoader=()=>We;getAttachmentUtils=()=>Zu;getViewRuleApi=()=>nK;getFeedUtils=()=>aK;getTagUtils=()=>cK;getGenAIAssistantUtils=()=>fJ;getGenAIUtils=()=>gJ;getStakeholderUtils=()=>lK;getUserApi=()=>iK;getCaseFollowerApi=()=>rK;getCaseUtils=()=>G;getStateUtils=()=>wn;getRelatedCasesApi=()=>oK;getDataApi=()=>Vo;getDataApiUtils=()=>fn;getAnalyticsUtils=()=>IK;getLocaleUtils=e=>{let n=e??T.getLocale()??"en-US";return Hi(n)};registerLocaleManager=e=>{let n=this.getLocaleUtils();Object.keys(e).forEach(o=>{n[o]=e[o]})};setBehaviorOverrides=e=>{t.behaviorOverrides=e};setBehaviorOverride=(e,n)=>{t.behaviorOverrides[e]=n};getBehaviorOverrides=()=>t.behaviorOverrides;getBehaviorOverride=e=>t.behaviorOverrides[e];getAsynchronousUtils=()=>UK;createPConnect=e=>ct(e);getPubSubUtils=()=>w;registerComponentCreator=e=>{lH(e)};getConstants=()=>Object.freeze(A);getResolvedConstantValue=e=>d.getProperty(e);getEvents=()=>TK;getRestClient=()=>G_;getMashupApi=()=>TT;getEnvironmentInfo=()=>T;switchLocale=e=>MW(e);getRuntimeParamsAPI=()=>sc;getSemanticUrlUtils=()=>td;getRemoteCaseUtils=()=>ce;getNavigationUtils=()=>yt;getSDKUtils=()=>Ik;registerModule=(e,n)=>bK.registerModule(e,n,this);getErrorHandler=()=>vK;getFormUtils=()=>Sr;getAutosaveUtils=()=>yJ;getMessagingServiceManager=()=>It;getMetadataUtils=()=>go;getDataPageUtils=()=>sn;getDataTypeUtils=()=>Fi;getCascadeManager=()=>Nn;isDeepEqual=(e,n)=>Ro(e,n);getAuthUtils=()=>RK;getDebugger=()=>en;getDeferLoadManager=()=>Lp;getExpressionEngine=()=>_0;getActionsSequencer=()=>vt;getRefreshManager=()=>Bi;getInitialiser=()=>nu;getBootstrapUtils=()=>ar;getContextTreeManager=()=>be;getAccessPrivilege=()=>hJ.getInstance();getObjectTransformer=()=>qe;getAllStateMachines=(e,n,o)=>!n||!o?Ue.getAllStateMachinesByContext(e):Ue.getAllStateMachines(e,n,o);isNamespaceEnabled=()=>O.isNamespaceEnabled();getQualifiedName=(e,n)=>O.getQualifiedName(e,n);getDefaultQualifiedName=e=>this.getQualifiedName(e,"PegaPlatform");getNameSpaceUtils=()=>O;getNetworkUtils=()=>ei;getMashupBridge=()=>RT;getConfirmDialogService=()=>vi;getBrowserNotificationService=()=>bT;getMCPClient=()=>ky},SJ=new pL;globalThis.PCore=SJ;var b$t=SJ;export{b$t as default};
|
|
102
|
+
container holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:b.string().optional().describe("User's language and region preference in BCP 47 format."),timeZone:b.string().optional().describe("User's timezone in IANA format."),userAgent:b.string().optional().describe("Host application identifier."),platform:b.union([b.literal("web"),b.literal("desktop"),b.literal("mobile")]).optional().describe("Platform type for responsive design decisions."),deviceCapabilities:b.object({touch:b.boolean().optional().describe("Whether the device supports touch input."),hover:b.boolean().optional().describe("Whether the device supports hover interactions.")}).optional().describe("Device input capabilities."),safeAreaInsets:b.object({top:b.number().describe("Top safe area inset in pixels."),right:b.number().describe("Right safe area inset in pixels."),bottom:b.number().describe("Bottom safe area inset in pixels."),left:b.number().describe("Left safe area inset in pixels.")}).optional().describe("Mobile safe area boundaries in pixels.")}).passthrough(),$de=b.object({method:b.literal("ui/notifications/host-context-changed"),params:M9.describe("Partial context update containing only changed fields.")}),lHe=b.object({method:b.literal("ui/update-model-context"),params:b.object({content:b.array(Mi).optional().describe("Context content blocks (text, image, etc.)."),structuredContent:b.record(b.string(),b.unknown().describe("Structured content for machine-readable context data.")).optional().describe("Structured content for machine-readable context data.")})}),uHe=b.object({method:b.literal("ui/initialize"),params:b.object({appInfo:$i.describe("App identification (name and version)."),appCapabilities:Nde.describe("Features and capabilities this app provides."),protocolVersion:b.string().describe("Protocol version this app supports.")})}),wde=b.object({protocolVersion:b.string().describe('Negotiated protocol version string (e.g., "2025-11-21").'),hostInfo:$i.describe("Host application identification and version."),hostCapabilities:Pde.describe("Features and capabilities provided by the host."),hostContext:M9.describe("Rich context about the host environment.")}).passthrough(),Mde={target:"draft-2020-12"};async function $9(t,e){let n=t["~standard"];if(n.jsonSchema)return n.jsonSchema[e](Mde);throw Error(`Schema (vendor: ${n.vendor}) does not implement Standard JSON Schema (~standard.jsonSchema). Use a library that does (zod v4, ArkType, Valibot) or wrap your schema accordingly.`)}async function w9(t,e,n=""){let o=await t["~standard"].validate(e);if(o.issues){let r=o.issues.map(i=>{let s=i.path?.map(a=>typeof a=="object"?a.key:a).join(".");return s?`${s}: ${i.message}`:i.message}).join("; ");throw Error(n+r)}return o.value}function kde(t,e){let n={...t,...e};return e.experimental!==void 0&&(n.experimental={...t.experimental,...e.experimental}),e.tools!==void 0&&(n.tools={...t.tools,...e.tools}),n}var $_=class t extends G${_appInfo;_appCapabilities;options;_hostCapabilities;_hostInfo;_hostContext;_registeredTools={};_initializedSent=!1;_registeredEvents=new Set;_events=new q$;_methods=new W$;setRequestHandler=(...e)=>{let[n,...o]=x9("request",e)??e;this._methods.claim(n,"setRequestHandler"),super.setRequestHandler.call(this,n,...o)};setNotificationHandler=(...e)=>{let[n,...o]=x9("notification",e)??e;this._methods.claim(n,"setNotificationHandler"),super.setNotificationHandler.call(this,n,...o)};removeRequestHandler=e=>{this._methods.release(e),super.removeRequestHandler(e)};removeNotificationHandler=e=>{this._methods.release(e),super.removeNotificationHandler(e)};replaceRequestHandler=(e,...n)=>{this._methods.replace(e),super.setRequestHandler.call(this,e,...n)};_assertInitialized(e){if(this._initializedSent)return;let n=`[ext-apps] App.${e}() called before connect() completed the ui/initialize handshake. Await app.connect() before calling this method, or move data loading to an ontoolresult handler.`;if(this.options?.strict)throw Error(n);console.warn(`${n}. This will throw in a future release.`)}eventSchemas={toolinput:Cde,toolinputpartial:Ide,toolresult:Dde,toolcancelled:_de,hostcontextchanged:$de};static ONE_SHOT_EVENTS=new Set(["toolinput","toolinputpartial","toolresult","toolcancelled"]);_everHadListener=new Set;_assertHandlerTiming(e){if(!t.ONE_SHOT_EVENTS.has(e)||this._everHadListener.has(e)||(this._everHadListener.add(e),!this._initializedSent))return;let n=`[ext-apps] "${String(e)}" handler registered after connect() completed the ui/initialize handshake. The host may have already sent this notification. Register handlers before calling app.connect().`;if(this.options?.strict)throw Error(n);console.warn(n)}setEventHandler(e,n){n&&this._assertHandlerTiming(e),this._ensureEventSlot(e),this._events.setHandler(e,n)}addEventListener(e,n){this._assertHandlerTiming(e),this._ensureEventSlot(e),this._events.addEventListener(e,n)}removeEventListener(e,n){this._events.removeEventListener(e,n)}_ensureEventSlot(e){if(this._registeredEvents.has(e))return;let n=this.eventSchemas[e];if(!n)throw Error(`Unknown event: ${String(e)}`);this.setNotificationHandler(n.shape.method.value,{params:n.shape.params},o=>{let r=o;e==="hostcontextchanged"&&(this._hostContext={...this._hostContext,...r}),this._events.dispatch(e,r)}),this._registeredEvents.add(e)}getEventHandler(e){return this._events.getHandler(e)}warnIfRequestHandlerReplaced(e,n,o){n&&o&&console.warn(`[MCP Apps] ${e} handler replaced. Previous handler will no longer be called.`)}constructor(e,n={},o={autoResize:!0}){super(o),this._appInfo=e,this._appCapabilities=n,this.options=o,this._methods.replace("notifications/cancelled"),this._methods.replace("notifications/progress"),!o.allowUnsafeEval&&b.config({jitless:!0}),this.replaceRequestHandler("ping",r=>(console.log("Received ping:",r.params),{})),this.setEventHandler("hostcontextchanged",void 0)}buildContext(e){return e}registerAppCapabilities(e){if(this.transport)throw Error("Cannot register capabilities after transport is established");this._appCapabilities=kde(this._appCapabilities,e)}registerTool(e,n,o){if(this._registeredTools[e])throw Error(`Tool ${e} is already registered`);let r=this,i=()=>{r._initializedSent&&r._appCapabilities.tools?.listChanged&&r.sendToolListChanged()},s=n.inputSchema!==void 0,a={title:n.title,description:n.description,inputSchema:n.inputSchema,outputSchema:n.outputSchema,annotations:n.annotations,_meta:n._meta,enabled:!0,enable(){this.enabled=!0,i()},disable(){this.enabled=!1,i()},update(c){Object.assign(this,c),i()},remove(){r._registeredTools[e]===a&&(delete r._registeredTools[e],i())},handler:async(c,l)=>{if(!a.enabled)throw Error(`Tool ${e} is disabled`);let u;if(s){let p=a.inputSchema,m=p?await w9(p,c??{},`Invalid input for tool ${e}: `):c??{};u=await o(m,l)}else u=await o(l);return a.outputSchema&&!u.isError&&(u.structuredContent=await w9(a.outputSchema,u.structuredContent,`Invalid output for tool ${e}: `)),u}};return this._registeredTools[e]=a,!this._appCapabilities.tools&&!this.transport&&this.registerAppCapabilities({tools:{listChanged:!0}}),this.ensureToolHandlersInitialized(),i(),a}_toolHandlersInitialized=!1;ensureToolHandlersInitialized(){this._toolHandlersInitialized||(this._toolHandlersInitialized=!0,this.oncalltool=async(e,n)=>{let o=this._registeredTools[e.name];if(!o)throw Error(`Tool ${e.name} not found`);return o.handler(e.arguments,n)},this.onlisttools=async(e,n)=>({tools:await Promise.all(Object.entries(this._registeredTools).filter(([o,r])=>r.enabled).map(async([o,r])=>{let i={name:o,title:r.title,description:r.description,inputSchema:r.inputSchema?await $9(r.inputSchema,"input"):{type:"object",properties:{}}};return r.outputSchema&&(i.outputSchema=await $9(r.outputSchema,"output")),r.annotations&&(i.annotations=r.annotations),r._meta&&(i._meta=r._meta),i}))}))}async sendToolListChanged(e={}){this._assertInitialized("sendToolListChanged"),await this.notification({method:"notifications/tools/list_changed",params:e})}getHostCapabilities(){return this._hostCapabilities}getHostVersion(){return this._hostInfo}getHostContext(){return this._hostContext}get ontoolinput(){return this.getEventHandler("toolinput")}set ontoolinput(e){this.setEventHandler("toolinput",e)}get ontoolinputpartial(){return this.getEventHandler("toolinputpartial")}set ontoolinputpartial(e){this.setEventHandler("toolinputpartial",e)}get ontoolresult(){return this.getEventHandler("toolresult")}set ontoolresult(e){this.setEventHandler("toolresult",e)}get ontoolcancelled(){return this.getEventHandler("toolcancelled")}set ontoolcancelled(e){this.setEventHandler("toolcancelled",e)}get onhostcontextchanged(){return this.getEventHandler("hostcontextchanged")}set onhostcontextchanged(e){this.setEventHandler("hostcontextchanged",e)}_onteardown;get onteardown(){return this._onteardown}set onteardown(e){this.warnIfRequestHandlerReplaced("onteardown",this._onteardown,e),this._onteardown=e,this.replaceRequestHandler("ui/resource-teardown",{params:vde.shape.params,result:Rde},(n,o)=>{if(!this._onteardown)throw Error("No onteardown handler set");return this._onteardown(n,o)})}_oncalltool;get oncalltool(){return this._oncalltool}set oncalltool(e){this.warnIfRequestHandlerReplaced("oncalltool",this._oncalltool,e),this._oncalltool=e,this.replaceRequestHandler("tools/call",(n,o)=>{if(!this._oncalltool)throw Error("No oncalltool handler set");return this._oncalltool(n.params,o)})}_onlisttools;get onlisttools(){return this._onlisttools}set onlisttools(e){this.warnIfRequestHandlerReplaced("onlisttools",this._onlisttools,e),this._onlisttools=e,this.replaceRequestHandler("tools/list",(n,o)=>{if(!this._onlisttools)throw Error("No onlisttools handler set");return this._onlisttools(n.params,o)})}assertCapabilityForMethod(e){switch(e){case"sampling/createMessage":if(!this._hostCapabilities?.sampling)throw Error(`Host does not support sampling (required for ${e})`);break}}assertRequestHandlerCapability(e){switch(e){case"tools/call":case"tools/list":if(!this._appCapabilities.tools)throw Error(`Client does not support tool capability (required for ${e})`);return;default:return}}assertNotificationCapability(e){}async callServerTool(e,n){if(this._assertInitialized("callServerTool"),typeof e=="string")throw Error(`callServerTool() expects an object as its first argument, but received a string ("${e}"). Did you mean: callServerTool({ name: "${e}", arguments: { ... } })?`);return await this.request({method:"tools/call",params:e},{onprogress:()=>{},resetTimeoutOnProgress:!0,...n})}async readServerResource(e,n){return this._assertInitialized("readServerResource"),await this.request({method:"resources/read",params:e},n)}async listServerResources(e,n){return this._assertInitialized("listServerResources"),await this.request({method:"resources/list",params:e},n)}async createSamplingMessage(e,n){return this._assertInitialized("createSamplingMessage"),await this.request({method:"sampling/createMessage",params:e},n)}sendMessage(e,n){return this._assertInitialized("sendMessage"),this.request({method:"ui/message",params:e},Ade,n)}sendLog(e){return this.notification({method:"notifications/message",params:e})}updateModelContext(e,n){return this._assertInitialized("updateModelContext"),this.request({method:"ui/update-model-context",params:e},Xa,n)}openLink(e,n){return this._assertInitialized("openLink"),this.request({method:"ui/open-link",params:e},Sde,n)}sendOpenLink=this.openLink;downloadFile(e,n){return this._assertInitialized("downloadFile"),this.request({method:"ui/download-file",params:e},Ede,n)}requestTeardown(e={}){return this.notification({method:"ui/notifications/request-teardown",params:e})}requestDisplayMode(e,n){return this._assertInitialized("requestDisplayMode"),this.request({method:"ui/request-display-mode",params:e},Ode,n)}sendSizeChanged(e){return this.notification({method:"ui/notifications/size-changed",params:e})}setupSizeChangedNotifications(){let e=!1,n=0,o=0,r=()=>{e||(e=!0,requestAnimationFrame(()=>{e=!1;let s=document.documentElement,a=s.style.height;s.style.height="max-content";let c=Math.ceil(s.getBoundingClientRect().height);s.style.height=a;let l=Math.ceil(window.innerWidth);(l!==n||c!==o)&&(n=l,o=c,this.sendSizeChanged({width:l,height:c}))}))};r();let i=new ResizeObserver(r);return i.observe(document.documentElement),i.observe(document.body),()=>i.disconnect()}async connect(e=new wy(window.parent,window.parent),n){if(this.transport)throw Error("App is already connected. Call close() before connecting again.");this._initializedSent=!1;try{await super.connect(e);let o=await this.request({method:"ui/initialize",params:{appCapabilities:this._appCapabilities,appInfo:this._appInfo,protocolVersion:mde}},wde,n);if(o===void 0)throw Error(`Server sent invalid initialize result: ${o}`);this._hostCapabilities=o.hostCapabilities,this._hostInfo=o.hostInfo,this._hostContext=o.hostContext,await this.notification({method:"ui/notifications/initialized"}),this._initializedSent=!0,this.options?.autoResize&&this.setupSizeChangedNotifications()}catch(o){throw this.close(),o}}};var Y$=["inline","fullscreen"],F9="pxC11nAction",Zn,M_,k_=new WeakMap,nw=new WeakMap,Z$=new Set,Q$=new WeakMap,Bl,w_=Promise.resolve(),xp=0,V9,X$=!1,ew,B9=!1,Ls=(...t)=>{B9&&console.log("[MCP]",...t)},Dp=()=>{Z$.forEach(t=>{try{t()}catch(e){console.error("MCP display mode listener failed",e)}})},H9=t=>{V9=t},G9=F9,q9=()=>G9,k9=()=>new DOMException("MCP initialization was superseded by a newer initialize or disconnect call","AbortError"),tw=class extends wy{initializeRequestSent;resolveInitializeRequestSent=()=>{};constructor(...e){super(...e),this.initializeRequestSent=new Promise(n=>{this.resolveInitializeRequestSent=n})}async send(...e){await super.send(...e);let[n]=e;"method"in n&&n.method==="ui/initialize"&&this.resolveInitializeRequestSent()}},Lde=(t,e,n,o)=>{let r=new tw(e,n),i=t.connect(r);return k_.set(t,i),o?i:(i.catch(s=>{Zn===t&&(Zn=void 0,M_=void 0,console.error("MCP host did not complete the initialize handshake",s),Dp())}),Promise.race([r.initializeRequestSent,i]))},W9=t=>{Q$.get(t)?.(),Q$.delete(t)},L9=t=>(W9(t),t.close()),Ude=t=>{k_.get(t)?.then(()=>{Zn===t&&Q$.set(t,t.setupSizeChangedNotifications())}).catch(()=>{})},U9=t=>nw.get(t)??t.getHostContext()?.displayMode,z9=t=>{let e=t.getHostContext()?.availableDisplayModes;return e?Y$.filter(n=>e.includes(n)):Y$},zde=(t,e)=>{Ls("host context changed",e),e.displayMode&&nw.delete(t),Zn===t&&Dp()},jde=t=>{k_.get(t)?.then(()=>{Ls("host context",t.getHostContext()),Zn===t&&Dp()}).catch(()=>{})},j9=()=>{let t=new Set([Zn,Bl].filter(n=>n!==void 0)),e=Zn!==void 0;return Zn=void 0,M_=void 0,Bl=void 0,e&&Dp(),t},nc=()=>{if(!Zn)throw new Error("MCP client is not initialized");return Zn},Fde=(t,e)=>{Zn!==t&&Bl!==t||(X$=!0,ew=e,Ls("host tool result",e),V9?.(e))},Vde={async initialize(t){xp+=1;let e=xp;X$=!1,ew=void 0,G9=t.c11nToolName||F9;let n=Promise.all(Array.from(j9(),L9)),o=w_.catch(()=>{}).then(async()=>{if(await n,e!==xp)throw k9();let r=t.eventTarget;if(!r)try{r=window.parent}catch(c){throw new Error("MCP client cannot access window.parent",{cause:c})}let i=t.eventSource??r,s=t.waitForHandshake??!0,a=new $_({name:t.name,version:t.version},{availableDisplayModes:Y$},{autoResize:!1,strict:t.strict??s});Bl=a,a.ontoolresult=c=>Fde(a,c),a.addEventListener("hostcontextchanged",c=>zde(a,c));try{await Lde(a,r,i,s)}catch(c){throw Bl===a&&(Bl=void 0),e===xp&&await a.close(),c}if(e!==xp)throw k9();Bl=void 0,Zn=a,M_={name:t.name,version:t.version},t.autoResize&&Ude(a),Dp(),jde(a)});w_=o.catch(()=>{}),await o},callTool(t,e){return Ls("tool call",t.name,t.arguments),nc().callServerTool(t,e).then(n=>(Ls("tool result",t.name,n),n),n=>{throw Ls("tool call failed",t.name,n),n})},listResources(t,e){return nc().listServerResources(t,e)},readResource(t,e){return nc().readServerResource(t,e)},listPrompts(t,e){return nc().request({method:"prompts/list",params:t},e)},getPrompt(t,e){return nc().request({method:"prompts/get",params:t},e)},async disconnect(){xp+=1;let t=Promise.all(Array.from(j9(),L9));w_=w_.catch(()=>{}).then(()=>t).then(()=>{}),await t},isConnected(){return Zn!==void 0},hasReceivedToolResult(){return X$},getToolResult(){return ew},setDebug(t){B9=t},async requestDisplayMode(t){let e=nc();await k_.get(e);let n=U9(e);if(n===t||!z9(e).includes(t))return n;let o=await e.requestDisplayMode({mode:t});return Ls("display mode",o.mode),nw.set(e,o.mode),Zn===e&&Dp(),o.mode},getAppInfo(){return M_},getDisplayMode(){return Zn?U9(Zn):void 0},getAvailableDisplayModes(){return Zn?z9(Zn):[]},onDisplayModeChange(t){return Z$.add(t),()=>{Z$.delete(t)}},requestTeardown(){return Ls("teardown requested"),nc().requestTeardown()},collapse(){let t=nc();return W9(t),Ls("collapse requested"),t.sendSizeChanged({height:0})}},ky=Vde;var Bde=(t,e)=>e[A.TRACE_ID]?{type:"error",message:t.localizedValue||t.message,correlationID:e[A.TRACE_ID]}:{type:"error",message:t.localizedValue||t.message},Hde=new Set(["resource is stale","resource is locked","resource in the wrong state","resource not found"]),Gde=t=>t?Hde.has(t.toLowerCase()):!1,qde=(t,e)=>{if(!Gde(e))return t;if(t&&t.includes("/workarea")&&!t.includes("/modal")){let n=t.lastIndexOf("/workarea");if(n!==-1)return t.slice(0,n)}return t},K9=t=>typeof t=="object"&&t!==null,Wde=t=>{if(t instanceof ArrayBuffer)try{let n=new TextDecoder().decode(t),o=JSON.parse(n);return K9(o)?o:{}}catch{return{}}return K9(t)?t:{}},Kde=(t,e,n,o)=>{if(t.config&&Ta(t.config.url,n))return Promise.reject(t);if(t.response&&t.response.status&&t.response.status===401&&!t.config.isExternalUrl&&!e.getUpdateSessionStatus()&&t.config.fetchTimeStamp>e.latestUpdateSessionTimeStamp){if(w.unsubscribeAllWithEventType($p),e.setUpdateSessionStatus(!0),n?.authType==="custom"){w.publish(A.PUB_SUB_EVENTS.EVENT_CUSTOM_REAUTH);let{url:i,config:s,context:a}=Kv(t);return Tf(i,s,a,e)}return uj(t,e,n)}if(t.response&&t.response.status&&t.response.status===401&&!t.config.isExternalUrl&&e.getUpdateSessionStatus()&&!lA(t.config.url)){let{url:i,config:s,context:a}=Kv(t);return k(i,s,a)}let r=Wde(t.response?.data);if(t.response&&t.response.status&&t.response.status!==422&&t.response.status!==424&&!(t.response.status===400&&r.errorClassification===A.INVALID_INPUTS)&&t.config.headers.context&&t.response.data&&!o){let i=r.errorDetails&&r.errorDetails.map(a=>Bde(a,t.response.headers)),s=qde(t.config.headers.context,r.errorClassification);return Hr({messages:i,category:"HTTP",context:s}),Promise.reject(t)}return Promise.reject(t)},J9=Kde;var rw=class{languagePacks;constructor(){this.languagePacks=[]}getLocalizationBundles(e=T.getLocale()){return(this.languagePacks.find(o=>o.pyLangCode===e)?.pyBundles??this.languagePacks.find(o=>o.pyLangCode===d.DEFAULT.toUpperCase())?.pyBundles??[]).sort((o,r)=>o.pyOrder-r.pyOrder)}hasLocalizationBundles(e=T.getLocale()){let n=this.languagePacks.find(o=>o.pyLangCode===e)?.pyBundles;return!!n&&n.length>0}async loadLocaleBundle(e){let n=e.map(i=>sn.getPageDataAsync("D_pzBundlesForLocalization","",{locale:i,onlyApp:"false"},{invalidateCache:!0})),r=(await Promise.allSettled(n)).filter(i=>i.status==="fulfilled").flatMap(i=>i.value.pyLanguagePacks);this.setLanguagePack(r)}setLanguagePack(e){e.forEach(n=>{let o=this.languagePacks.findIndex(r=>r.pyLangCode===n.pyLangCode);o!==-1?this.languagePacks[o]=n:this.languagePacks.push(n)})}},Us=new rw;var ow="Accept-Language",Y9=(t,e)=>Object.keys(t).some(n=>n.toLowerCase()===e.toLowerCase()),iw=class{externalHeaders;defaultHeaders;SPECIAL_CHARS;constructor(){this.externalHeaders={},this.defaultHeaders={},this.SPECIAL_CHARS={SLASH:"/"}}registerHeader(e,n){return this.defaultHeaders[e]?!1:(this.externalHeaders[e]=n,!0)}unRegisterHeader(e){this.externalHeaders[e]&&delete this.externalHeaders[e]}getRegisteredHeaders(){return{...this.getLocaleHeaders(),...this.externalHeaders}}getLocaleHeaders(){let e=T.getLocale()??T.getUseLocale();return!e||!Us.hasLocalizationBundles(e)||Y9(this.defaultHeaders,ow)||Y9(this.externalHeaders,ow)?{}:{[ow]:e.replaceAll("_","-")}}setDefaultHeaders(e){e?.Prefer&&this.defaultHeaders.Prefer&&(e.Prefer=`${this.defaultHeaders.Prefer},${e.Prefer}`),this.defaultHeaders={...this.defaultHeaders,...e}}setRequestContext(e){if(!e||e.length===0)return;let n=new URLSearchParams(globalThis.location?.search??""),o=this.buildHeaderMapFromRequestContext(e,n);this.registerHeadersFromMap(o)}buildHeaderMapFromRequestContext(e,n){let o={};return e?.forEach(r=>{Array.isArray(r.IncludeInHeaders)&&r.IncludeInHeaders.forEach(i=>{let s=i.Value,a=n.get(r.Key)??i.defaultValue;a&&(o[s]||(o[s]=[]),o[s].push(`${r.Key}=${a}`))})}),o}registerHeadersFromMap(e){Object.entries(e).forEach(([n,o])=>{o.length>0&&this.registerHeader(n,o.join("; "))})}getDefaultHeaders(){return this.defaultHeaders}addDebugHeaders(e={}){return{[d.COREHEADER_APP_DEBUG_ID]:e.debugId,[d.COREHEADER_APP_DEBUG_LEVELS]:en.getDebugLevels()}}getCoreHeadersFromContext(e){if(["root","app"].includes(e)||!e)return;let n=Q.getProperty(d.COREHEADERS,"",e);return n?{...n,debugInfo:en.getPreviewMode()&&{...n.debugInfo,[d.COREHEADER_APP_DEBUG_LEVELS]:en.getDebugLevels()}}:(e=e.substr(0,e.lastIndexOf(this.SPECIAL_CHARS.SLASH)),this.getCoreHeadersFromContext(e))}processCoreHeaders(e,n,o){let r=this.getCoreHeadersFromContext(o);if(r){let i=Object.keys(e);if(i.includes(d.SKIPCOREHEADERS)){delete e[d.SKIPCOREHEADERS];return}let s=Object.assign({},...Object.values(r));Object.keys({...s}).forEach(a=>{i.includes(a)||(e[a]=s[a])})}}injectCoreAdditionalHeaders(e,n,o,r){if(r?.includeRemoteSystemIdIfPresent){let i=n?.caseTypeID?{caseTypeID:n.caseTypeID}:void 0;ce.injectRemoteCaseHeader(e,i,o)}this.processCoreHeaders(e,n,o)}},Jde=new iw,Ge=Jde;var Ly=class{timerID;expiryBuffer;timeoutWarned;onWarnedReset;constructor(e){this.timerID=void 0,this.expiryBuffer=45,this.timeoutWarned=!1,this.onWarnedReset=e}setTimerID=e=>{this.timerID=e};getTimerID=()=>this.timerID;resetInactiveTimeout=e=>{let n=globalThis.PCore?.getEnvironmentInfo().getInactivityTimeout();if(this.timeoutWarned&&(w.unsubscribeAllWithEventType(A.PUB_SUB_EVENTS.RESET_TIMER),this.timeoutWarned=!1,this.onWarnedReset?.()),!!n)return e&&clearTimeout(e),this.startInactivityTimeout(n>60?n:60)};startInactivityTimeout=e=>{let n=setTimeout(()=>{w.publish(A.PUB_SUB_EVENTS.TIMEOUT_REMINDER,{timeRemaining:this.expiryBuffer}),clearTimeout(n),w.subscribe(A.PUB_SUB_EVENTS.RESET_TIMER,this.resetInactiveTimeout,"resetCallback"),this.timeoutWarned=!0},(e-this.expiryBuffer)*1e3);return this.setTimerID(n),n}};var sw=class{handlers=[];use(e,n){return this.handlers.push({fulfilled:e,rejected:n}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}forEach(e){for(let n of this.handlers)n!==null&&e(n)}get size(){return this.handlers.filter(e=>e!==null).length}},aw=sw;var Ao={ERR_NETWORK:"ERR_NETWORK",ECONNABORTED:"ECONNABORTED",ERR_CANCELED:"ERR_CANCELED",ERR_BAD_REQUEST:"ERR_BAD_REQUEST",ERR_BAD_RESPONSE:"ERR_BAD_RESPONSE"},L_="GET",U_="content-type",cw="accept";var Yde=async t=>{let e=await t.text();if(!e||e.trim().length===0)return e;try{return JSON.parse(e)}catch{return e}},Zde=async t=>{let e=await t.text();if(!e||e.trim().length===0)return e;try{return JSON.parse(e)}catch{return e}},Z9=async(t,e)=>{switch(e){case"json":return Yde(t);case"text":return t.text();case"arraybuffer":return t.arrayBuffer();case"blob":return t.blob();case"stream":return t.body;default:return Zde(t)}},Q9=t=>{let e={};return t.forEach((n,o)=>{e[o]=n}),e};var z_=()=>{let t=new AbortController;return{token:t.signal,cancel(e){t.abort(e)}}},j_=t=>t instanceof DOMException&&t.name==="AbortError"||t&&typeof t=="object"&&"name"in t&&t.name==="AbortError"?!0:!!(t&&typeof t=="object"&&"code"in t&&t.code===Ao.ERR_CANCELED),X9=(t,e)=>{let n=t!==void 0,o=e!==void 0&&e>0;if(!n&&!o)return;if(!o&&n)return t;let r=o?e:void 0;if(r===void 0)return t;let i=AbortSignal.timeout(r);if(!n)return i;if(typeof AbortSignal.any=="function")return AbortSignal.any([t,i]);let s=new AbortController,a=()=>{s.abort(t.reason??i.reason)};return t.aborted||i.aborted?(s.abort(t.aborted?t.reason:i.reason),s.signal):(t.addEventListener("abort",a,{once:!0}),i.addEventListener("abort",a,{once:!0}),s.signal)},e8=t=>t?.reason==="TimeoutError"||t?.reason instanceof DOMException&&t.reason.name==="TimeoutError"?Ao.ECONNABORTED:Ao.ERR_CANCELED;var rc=(t,e,n,o)=>{let r=new Error(t);return r.name="HttpError",r.config=e,r.code=n,r.response=o,r.isAxiosError=!0,r},lw=(t,e)=>typeof t=="object"&&t!==null&&"name"in t&&t.name===e,uw=t=>typeof t=="object"&&t!==null&&"message"in t&&typeof t.message=="string",t8=t=>t.timeout?`timeout of ${t.timeout}ms exceeded`:"timeout exceeded",Uy=(t={})=>{let e=rc("canceled",t,Ao.ERR_CANCELED);return e.name="AbortError",e},oc=(t,e)=>{if(e.signal?.aborted){let n=e8(e.signal),o=rc(n===Ao.ECONNABORTED?t8(e):"canceled",e,n);return o.name=n===Ao.ECONNABORTED?"TimeoutError":"AbortError",o}if(lw(t,"TimeoutError")){let n=rc(t8(e),e,Ao.ECONNABORTED);return n.name="TimeoutError",n}if(lw(t,"AbortError"))return Uy(e);if(lw(t,"TypeError")&&uw(t)){let n=rc(t.message||"Network Error",e,Ao.ERR_NETWORK);return n.isOffline=!navigator.onLine,n}if(uw(t)&&t.message==="Network Offline"){let n=rc("Network Offline",e,Ao.ERR_NETWORK);return n.isOffline=!0,n}if(uw(t)){let n=rc(t.message,e);return n.cause=t.cause,n}return rc(String(t),e)},n8=(t,e)=>{let n;t.status>=400&&t.status<500?n=Ao.ERR_BAD_REQUEST:t.status>=500&&t.status<600&&(n=Ao.ERR_BAD_RESPONSE);let o=rc(`Request failed with status code ${t.status}`,e,n,t);return o.status=t.status,o};var Qde="application/json, text/plain, */*",Xde="application/x-www-form-urlencoded",epe=["POST","PUT","PATCH"],tpe=/[^\t\x20-\x7e\x80-\xff]+/g,r8=t=>t===" "||t===" ",npe=t=>{let e=t.replace(tpe,""),n=0,o=e.length;for(;n<o&&r8(e[n]);)n+=1;for(;o>n&&r8(e[o-1]);)o-=1;return e.slice(n,o)},rpe=t=>{let e={};if(!t)return e;let n=new Map;for(let[o,r]of Object.entries(t))if(r!=null){let i=o.toLowerCase(),s=n.get(i)??o;n.set(i,s),e[s]=npe(String(r))}return e},i8=t=>(typeof t[Symbol.iterator]!="function"&&Object.defineProperty(t,Symbol.iterator,{value(){return Object.entries(this)[Symbol.iterator]()},enumerable:!1,configurable:!0}),t),s8=t=>t instanceof FormData||t instanceof Blob||t instanceof ArrayBuffer||ArrayBuffer.isView(t)||t instanceof URLSearchParams||typeof ReadableStream<"u"&&t instanceof ReadableStream,a8=t=>typeof t=="object"&&t!==null&&!s8(t),o8=(t,e)=>Object.keys(t).find(n=>n.toLowerCase()===e),dw=(t,e)=>{let n=rpe(t.headers),{body:o}=t;o8(n,cw)||(n[cw]=Qde);let r=o8(n,U_);return o===void 0||o instanceof FormData?r&&delete n[r]:!r&&!(o instanceof URLSearchParams)&&(a8(o)?n[U_]="application/json":epe.includes(e)&&(n[U_]=Xde)),n},c8=t=>s8(t)||typeof t=="string"?t:JSON.stringify(t),ope=t=>{let e=(t.method??L_).toUpperCase(),n={method:e,headers:dw(t,e),credentials:t.credentials};t.body!==void 0&&t.body!==null&&e!=="GET"&&e!=="HEAD"&&(n.body=c8(t.body));let o=X9(t.signal,t.timeout);return o&&(n.signal=o),n},l8=async t=>{let e=t.url??"",n=ope(t),o;try{o=await globalThis.fetch(e,n)}catch(s){throw oc(s,t)}let r=Q9(o.headers),i;try{i=await Z9(o,t.responseType)}catch(s){throw oc(s,t)}return t.headers&&i8(t.headers),{data:i,status:o.status,statusText:o.statusText,headers:r,config:t}},ipe=t=>{let e={};if(!t)return e;let n=t.trim().split(/[\r\n]+/);for(let o of n){let r=o.indexOf(":");if(r>0){let i=o.substring(0,r).trim().toLowerCase(),s=o.substring(r+1).trim();e[i]=s}}return e},u8=t=>new Promise((e,n)=>{let o=new XMLHttpRequest,r=t.url??"",i=(t.method??L_).toUpperCase();if(o.open(i,r,!0),Object.entries(dw(t,i)).forEach(([a,c])=>{o.setRequestHeader(a,c)}),t.credentials==="include"&&(o.withCredentials=!0),t.responseType==="arraybuffer"?o.responseType="arraybuffer":t.responseType==="blob"?o.responseType="blob":o.responseType="text",t.onUploadProgress&&o.upload&&o.upload.addEventListener("progress",t.onUploadProgress),t.onDownloadProgress&&o.addEventListener("progress",t.onDownloadProgress),t.signal){if(t.signal.aborted){o.abort(),n(oc(new DOMException("The operation was aborted.","AbortError"),t));return}t.signal.addEventListener("abort",()=>{o.abort(),n(oc(new DOMException("The operation was aborted.","AbortError"),t))},{once:!0})}t.timeout&&t.timeout>0&&(o.timeout=t.timeout),o.ontimeout=()=>{n(oc(new DOMException("The operation timed out.","TimeoutError"),t))},o.onload=()=>{t.headers&&i8(t.headers);let a=ipe(o.getAllResponseHeaders()),c;if(o.responseType==="arraybuffer"||o.responseType==="blob")c=o.response;else{let u=o.responseText;try{c=JSON.parse(u)}catch{c=u}}let l={data:c,status:o.status,statusText:o.statusText,headers:a,config:t};e(l)},o.onerror=()=>{n(oc(new TypeError("Network Error"),t))},o.onabort=()=>{n(oc(new DOMException("The operation was aborted.","AbortError"),t))};let s=t.body!==void 0&&t.body!==null?c8(t.body):null;o.send(s)}),d8=t=>{let e=(t.method??L_).toUpperCase(),n=dw(t,e),{body:o}=t,r=t.headers??{},i=Object.keys(r).map(s=>s.toLowerCase());Object.entries(n).forEach(([s,a])=>{i.includes(s.toLowerCase())||(r[s]=a)}),t.headers=r,a8(o)?t.data=JSON.stringify(o):o instanceof URLSearchParams&&(t.data=o.toString())};var pw=t=>(Object.defineProperty(t,"data",{get:()=>t.body,set:e=>{t.body=e},enumerable:!1,configurable:!0}),t),p8=t=>{let e=Object.getOwnPropertyDescriptor(t,"data");return e&&"value"in e&&e.value!==void 0&&e.value!==t.body&&(t.body=e.value),pw(t)};var spe=t=>{if(typeof t!="object"||t===null)return!1;let e=Object.getPrototypeOf(t);return e===null||Object.getPrototypeOf(e)===null},mw=t=>{if(Array.isArray(t))return t.map(mw);if(spe(t)){let e={};return Object.keys(t).forEach(n=>{e[n]=mw(t[n])}),e}return t},fw=class{interceptors;constructor(){this.interceptors={request:new aw,response:new aw}}async request(e){let n=pw({...e,...e.body!==void 0&&{body:mw(e.body)}}),o=[s=>this.dispatchRequest(s),void 0];this.interceptors.request.forEach(s=>{o=[s.fulfilled,s.rejected,...o]}),this.interceptors.response.forEach(s=>{o=[...o,s.fulfilled,s.rejected]});let r=Promise.resolve(n),i=0;for(;i<o.length;)r=r.then(o[i],o[i+1]),i+=2;return await r}async dispatchRequest(e){let n=p8(e);if(typeof n.adapter=="function")return d8(n),n.adapter(n);let o;if(n.onUploadProgress||n.onDownloadProgress?o=await u8(n):o=await l8(n),o.status>=200&&o.status<300)return o;throw n8(o,n)}get(e,n){return this.request({...n,url:e,method:"GET"})}post(e,n,o){return this.request({...o,url:e,method:"POST",body:n})}put(e,n,o){return this.request({...o,url:e,method:"PUT",body:n})}patch(e,n,o){return this.request({...o,url:e,method:"PATCH",body:n})}delete(e,n){return this.request({...n,url:e,method:"DELETE"})}static createCancelSource(){return z_()}static isCanceled(e){return j_(e)}},ape=new fw,F_=ape;var $p="updateSession",cpe=t=>typeof t!="object"||t===null||!("caseTypeID"in t)?!1:typeof t.caseTypeID=="string",zy=t=>typeof t=="object"&&t!==null,f8=t=>cpe(t)?{caseTypeID:t.caseTypeID}:void 0,lpe=t=>{if(!zy(t))return!1;let{caseInfo:e}=t;return zy(e)?"errorMessage"in e:!1},zs={},Mp=new rj,Hl={},Li={},hw={},yw="",gw=new Ly(()=>sj(Li,Mp)),g8=t=>{Hl=t},upe=t=>!t||typeof t!="object"?!1:"continueWithDefaultErrorHandler"in t||"error"in t,h8=t=>{let{context:e}=t??{};if(typeof e=="string")return e},dpe=t=>zy(t)&&"config"in t,ppe=t=>zy(t),mpe=t=>t.code==="ERR_NETWORK"||t.code==="ECONNABORTED"||t.message==="Network Offline"||t.isOffline===!0,fpe=t=>t.message!=="Network Offline"&&!!J(d.APP.APP)?.context_data?.isOffline,gpe=t=>!!(t.response&&t.response.status===401&&!t.config?.isExternalUrl&&(!t.config||!Ta(t.config.url,Li))),hpe=t=>t.response&&t.response.status&&t.response.status===Number(yw)?yw:null,V_=t=>{let e=h8(t.config?.headers);return mpe(t)?(J(e)?.isLoading&&v({type:Wo,payload:{context:e}}),Yz(),Promise.reject(new Error("Network Offline"))):(fpe(t)&&Zz(),!t.response&&t.cause?.response&&(t.response=t.cause.response),gpe(t)&&w.subscribe($p,n=>{Mp.setUpdateSessionStatus(!n.updateStatus)},$p),J9(t,Mp,Li,hpe(t)))},ype=(t,e)=>{if(typeof e=="boolean")return e?V_(t):Promise.reject(t);if(upe(e)){let n=e.error??t;return e.continueWithDefaultErrorHandler??!0?V_(dpe(n)?n:t):Promise.reject(n)}return V_(t)},Spe=t=>typeof t=="function",Epe=t=>typeof t=="function",Ape=t=>{w.publish(d.PUB_SUB_EVENTS.FETCH_SUCCESS,t)},Cpe=t=>{w.publish(d.PUB_SUB_EVENTS.FETCH_FAILURE,t)},Ipe=t=>{if(t?.authType==="OAuth2.0"&&t.secureCookie||t.customCookies)return!0},it=()=>T.environmentInfoObject?.["protocol-jsonrpc"]===!0,wp=t=>typeof t=="object"&&t!==null,_pe=t=>wp(t)?Object.entries(t).filter(e=>e[0].toLowerCase()==="etag"&&typeof e[1]=="string").map(([,e])=>e)[0]:void 0,Sw=t=>{let e=t.content?.find(c=>c.type==="text")?.text;if(t.isError)throw new Error(e||"MCP tool call failed");let n;if(e)try{n=JSON.parse(e)}catch(c){if(!(c instanceof SyntaxError))throw c;n=e}let o=wp(n)&&"Response"in n?n.Response:n,r=wp(o)&&wp(o.outputs)?o.outputs:void 0,i=[r,o].map(_pe).find(c=>c!==void 0),s=wp(o)?o.ViewResponse:void 0;return{data:[r?.ViewResponse,r?.ShowPageResponse,r?.PageResponse,r?.Component,r?.responseData,s].find(c=>wp(c)||typeof c=="string")??o,etag:i}},bpe=(t,e)=>{let n=()=>e.abort();return t.aborted?(n(),()=>{}):(t.addEventListener("abort",n),()=>t.removeEventListener("abort",n))},Tpe=new Set(["openAssignment","createWork","openWorkByHandle","caseWideActions","getNextWork","finishAssignment","save","navigateToStep","refreshAssignmentData","recalculateAssignmentData","openStage","executeCaseWideActions","refreshCaseData","recalculateCaseData"]),vpe=new Set(["context","authorization","pzctkn"]),Rpe=(t,{headers:e,...n})=>{if(!Tpe.has(t)||typeof e!="object"||e===null)return n;let o=Object.fromEntries(Object.entries(e).filter(([r,i])=>!vpe.has(r.toLowerCase())&&typeof i=="string"&&i!==""));return Object.keys(o).length>0?{...n,headers:o}:n},Ot=async(t,e,n,o)=>{let r=new AbortController,i=n?bpe(n,r):void 0;try{if(r.signal.aborted)throw Uy();let s={name:q9(),arguments:{ActionName:t,Payload:JSON.stringify(Rpe(t,e))}},a={...n&&{signal:r.signal},...o!==void 0&&{timeout:o}},c=await(Object.keys(a).length>0?ky.callTool(s,a):ky.callTool(s)),{data:l,etag:u}=Sw(c);return{data:l,status:200,statusText:"OK",headers:u?{etag:u}:{},config:{url:t}}}catch(s){throw r.signal.aborted?Uy():s}finally{i?.()}},Ppe=t=>{if(typeof t!="object"||t===null||Array.isArray(t))return!1;let e=Object.getPrototypeOf(t);return e!==Object.prototype&&e!==null},B_=({body:t,responseType:e,adapter:n})=>(e===void 0||e==="json")&&n===void 0&&!Ppe(t),H_=t=>{if(typeof t!="string")return t;try{return JSON.parse(t)}catch{return t}},Ti=(t,e="root",n={})=>{let{Authorization:o,pzCTkn:r,...i}=t.headers||{};if(t.withoutDefaultHeaders)return i;Ge.injectCoreAdditionalHeaders(i,f8(t.body),e,{includeRemoteSystemIdIfPresent:n.includeRemoteSystemIdIfPresent??!0});let s={...Ge.getDefaultHeaders(),...Ge.getRegisteredHeaders(),...i,context:e};return delete s.Authorization,delete s.pzCTkn,s},k=(t,e,n="root",o={})=>{let{doNotMergeHttpMessagesForStatusCode:r=null,cancelContext:i=n,includeRemoteSystemIdIfPresent:s=!0}=o;yw=r,t===null&&console.error("Error: url passed to Service Broker fetch is null (or) undefined");let{body:a,signal:c,responseType:l,adapter:u,withoutDefaultHeaders:p=!1,withCredentials:m,...f}=e,{Authorization:g,pzCTkn:h,...E}=e.headers||{};if(!p){let P=f8(e.body);Ge.injectCoreAdditionalHeaders(E,P,n,{includeRemoteSystemIdIfPresent:s})}i&&zs[i]>=0?zs[i]+=1:i&&zs[i]===void 0&&(zs[i]=1);let C=p?{...E}:{...Ge.getDefaultHeaders(),...Ge.getRegisteredHeaders(),...E,context:n};f.isExternalUrl=tj(t||""),f.fetchTimeStamp=Date.now();let I=Se.doesRestApiExist("Logout")?Se.getRestEndPoint("Logout")?.restApi:void 0,_=lA(t,I);return t&&Ta(t,Li)&&Mp.getUpdateSessionStatus()||!Mp.getUpdateSessionStatus()||f.isExternalUrl||_?(Ta(t,Li)&&Li?.authType==="OAuth2.0"&&(C={...E}),(!I||t&&!_)&&gw.setTimerID(gw.resetInactiveTimeout(gw.getTimerID())),Av(Y(F_.request({context:n,...f,url:t??void 0,body:a,...c&&{signal:c},responseType:l,adapter:u,headers:C,credentials:m||Ipe(Li)?"include":void 0})).pipe(_v(()=>{let P=Ge.getCoreHeadersFromContext(C.context);P&&Ape({...P})}),ds(P=>{let N=C,H=!!N?.[d.COREHEADER_APP_DEBUG_ID]?{debugInfo:{[d.COREHEADER_APP_DEBUG_ID]:N?.[d.COREHEADER_APP_DEBUG_ID],[d.COREHEADER_APP_DEBUG_LEVELS]:en.getDebugLevels()}}:Ge.getCoreHeadersFromContext(C.context);throw H&&Cpe({...H,error:P}),P})))):Tf(t,e,n,Mp)},Tf=(t,e,n,o)=>new Promise((r,i)=>{w.subscribe($p,s=>{if(o.setUpdateSessionStatus(!s.updateStatus),s.updateStatus==="success")k(t,e,n).then(r).catch(i);else{let{updateStatus:a}=s;i(zy(a)?a.error:void 0)}},$p)}),m8=t=>{zs[t]>0&&(zs[t]-=1,zs[t]===0&&delete zs[t])};F_.interceptors.request.use(t=>{if(!ei.isOnline())return J(t.context)?.isLoading&&v({type:Wo,payload:{context:t.context}}),v({type:la,payload:{context:"app"}}),Promise.reject(new Error("Network Offline"));if(Hl?.request){let e=Hl.request;Spe(e)&&(t=e(t))}return t},t=>Promise.reject(t));F_.interceptors.response.use(t=>{if(t.status===202&&t.config.headers?.context&&lpe(t.data)){let e=[{type:"error",message:String(t.data.caseInfo.errorMessage)}],n=t.config.headers.context;return n&&n.includes("/workarea")&&(n=n.substring(0,n.lastIndexOf("/workarea"))),Hr({messages:e,category:"HTTP",context:n}),Promise.reject(t)}if(t.config.headers&&t.config.headers.context){let e=t.config.headers.context;t.config.skipClearErrorMessages||(Xt({type:"error",category:"HTTP",context:e}).length>0&&ht({type:"error",category:"HTTP",context:e}),Xt({type:"error",category:e===d.APP.APP?"PAGE":"",context:e}).length>0&&ht({type:"error",category:"PAGE",context:e}),e.slice(e.lastIndexOf("/")+1).startsWith("primary")&&(Xt({type:"error",category:"HTTP",context:d.APP.APP}).length>0&&ht({type:"error",category:"HTTP",context:d.APP.APP}),Xt({type:"error",category:"PAGE",context:d.APP.APP}).length>0&&ht({type:"error",category:"PAGE",context:d.APP.APP}))),m8(e)}if(Hl?.response){let e=Hl.response;Epe(e)&&(t=e(t))}return t},t=>{if(!ppe(t))return Promise.reject(t);let e=h8(t.config?.headers);return e&&m8(e),Hl?.error?Promise.resolve(Hl.error(t)).then(n=>ype(t,n)):V_(t)});var y8=t=>zs[t],Qu=()=>z_(),uA=t=>j_(t),mo=t=>{Ge.setDefaultHeaders(t)},gs=t=>{Li={...Li,...t}},Qz=t=>{hw={...hw,...t}},Xz=()=>({...hw}),bf=()=>({...Li});var Ew=class t{static createCase(e,n){let{caseInfo:o,startingFields:r,flowType:i,viewType:s=mt.PAGE,pageName:a,context:c=d.APP.APP,debugInfo:l,headers:u,theType:p,retrieveActionViewForNewObject:m=!1,scope:f}=n,g={};o&&o.content&&(g=o.content);let{content:h={},pageInstructions:E}=t.getExternalCaseOrObjectContent(e,m,c),C={[t.getKeyBasedOnWorkType(e)]:e,content:{...g,...r,...h}};if(C={...C,...E&&{pageInstructions:E},...!G.isObjectCaseType(e)&&{processID:i}},p==="CREATE_EXTERNAL_CASE"){let _=J(c)?.caseInfo?.content;if(_&&Object.keys(_).length>0){let P=f?.Namespace&&f?.RuleResolutionID?{..._,[d.getDefaultQualifiedName("Scope")]:{[d.getDefaultQualifiedName("Namespace")]:f.Namespace,[d.getDefaultQualifiedName("RuleResolutionID")]:f.RuleResolutionID}}:_,N=y.pruneKeys(P,new Set(["pxObjClass",O.getDefaultQualifiedName("pxObjClass"),"EmbedListUUID__",O.getDefaultQualifiedName("EmbedListUUID__")]),!1);C.content[d.getDefaultQualifiedName("pyAddCaseContextPage")]=N}}let I=t.getObjectTypeViewPayload(m,e);return Re(G.getRouteKeyForCreateWork(e,m),{body:C,queryPayload:{...I,...G.isExternalCaseType(e)?{casetypeID:e}:{caseClassName:e},viewType:s,params:{pageName:a}},headers:{...u,...l&&{...Ge.addDebugHeaders(l)}}},c).then(_=>({response:_.data,requestPayload:C,headers:ke(_.headers,e,u)}))}static getObjectTypeViewPayload=(e,n)=>e?G.shouldUseUnifiedHandling()?{casetypeID:n,actionID:d.getDefaultQualifiedName(d.VIEW_NAMES.OBJECT_CREATE_VIEW)}:{objectTypeID:n,actionID:d.getDefaultQualifiedName(d.VIEW_NAMES.OBJECT_CREATE_VIEW)}:{};static getExternalCaseOrObjectContent=(e,n,o)=>{let r=G.isExternalObject(e),i=G.isExternalCaseType(e);if((i||r)&&!n){let s=Mt(o,{isExternalObject:!!(!i&&r)}),{content:a,pageInstructions:c}=s.content;return{content:a,pageInstructions:c}}return{}};static getKeyBasedOnWorkType=e=>G.shouldUseUnifiedHandling()?"caseTypeID":G.isObjectCaseType(e)?"objectTypeID":"caseTypeID"},Ui=Ew;var Npe=()=>({registerHeader:(...t)=>Ge.registerHeader(...t),unRegisterHeader:(...t)=>Ge.unRegisterHeader(...t),getRegisteredHeaders:()=>Ge.getRegisteredHeaders()}),Re=(t,{body:e={},queryPayload:n={},cancelTokenSource:o,headers:r={},responseType:i,withCredentials:s},a,c)=>{if(it()&&B_({body:e,responseType:i}))return Ot(t,{queryPayload:n,body:H_(e),headers:r},o?.token);let{restApi:l,reqType:u}=F(t,n),p={method:u,headers:r,body:e,...i&&{responseType:i},...s&&{withCredentials:s}};o&&(p.signal=o.token);let m=t==="createWork"?G.appendExcludeQueryParamToUrl(l):l;return k(m,p,a,c??{})},PR=(t,{method:e="GET",body:n={},headers:o={},withoutDefaultHeaders:r=!1,responseType:i,adapter:s,signal:a},c)=>{t.startsWith("http:")||t.startsWith("https:")||(t=At.getServerURL()+t);let l={method:e,headers:o,body:n,withoutDefaultHeaders:r,...i&&{responseType:i},...s&&{adapter:s},...a&&{signal:a}};return k(t,l,c)},va=t=>Se.doesRestApiExist(t),zi=()=>Qu(),jy=t=>uA(t),Ope=t=>{g8(t)},xpe=()=>Ui;var Aw=new Set;function S8(){Aw.clear()}function Fy(t){try{let e=new URL(t);(e.protocol==="https:"||e.protocol==="http:")&&Aw.add(e.origin)}catch{}}function E8(t){let e;try{let o=globalThis.location;e=o?new URL(t,o.href).origin:new URL(t).origin}catch{throw new Error("Blocked: malformed URL")}let n;try{let o=globalThis.location;n=o?.origin??(o?new URL(o.href).origin:"")}catch{n=""}if(e!==n&&!Aw.has(e))throw new Error(`Blocked: untrusted script origin "${e}"`)}var A8="getCustomComponent",Dpe="getBinaryFile",$pe="getOperatorImage",q_="text/javascript",wpe=100,C8=3e4,I8=t=>{let e=document.createElement("script");e.type=q_,e.textContent=t,document.head.appendChild(e)},R8=t=>{let e=atob(t),n=new Uint8Array(e.length);for(let o=0;o<e.length;o+=1)n[o]=e.charCodeAt(o);return n},Mpe=t=>{if(typeof t!="string")throw new TypeError(`Custom component response must be a string, received: ${JSON.stringify(t)?.slice(0,300)}`);return new TextDecoder().decode(R8(t))},kpe=12e4,_8=Promise.resolve(),Lpe=t=>{let e=_8.then(t);return _8=e.catch(()=>{}),e},b8=async(t,e)=>{let n=Object.entries(e).filter(([,i])=>i);if(it()){let i=await Lpe(()=>Ot(A8,{queryPayload:{componentName:t,...Object.fromEntries(n)},body:{},headers:{}},void 0,kpe));return Mpe(i.data)}let o=n.map(([i,s])=>`${i}=${s}`).join("&");return(await Re(A8,{queryPayload:{componentName:o?`${t}?${o}`:t}})).data},P8=new Set(["jpg","jpeg","png","gif","webp","bmp","tif","tiff","svg","ico","heic","heif","avif"]),Upe=/^DATA-CONTENT-IMAGE\s+[^!]+!([^!]+)!\/OPERATORIMAGES\/$/i,T8=/url\(\s*(?:(['"])([^'"\r\n]+)\1|([^'"\s)][^'"\r\n]*?))\s*\)/gi;function N8(t){return t.toLowerCase().split("!").pop()||""}function Cw(t){return t.includes("?")||t.includes("#")?!1:P8.has(N8(t))}function zpe(t){let e=t.match(Upe);return e?P8.has(e[1].toLowerCase()):Cw(t)}function v8(t){let e;try{e=new URL(t).protocol}catch{throw new Error("Component fetch blocked: malformed dev server URL")}if(e!=="http:"&&e!=="https:")throw new Error(`Component fetch blocked: unsupported dev server URL scheme "${e}"`)}var Iw=class{loaderObj;staticServerURL;appStaticUrl;pegaOnlyUrl;loadedAssets;componentsConfig;appAlias;b2sJWT;ccV2LibId;isolationID;imageBlobUrlCache;isolationAssetBlobCache;getTypes={SCRIPT:"script",STYLE:"link"};constructor(){this.loaderObj={},this.staticServerURL="",this.appStaticUrl=null,this.pegaOnlyUrl=!1,this.loadedAssets={},this.componentsConfig=null,this.appAlias="",this.b2sJWT=null,this.ccV2LibId="",this.isolationID=null,this.imageBlobUrlCache={},this.isolationAssetBlobCache=new Map}getStaticServerUrl(){return this.staticServerURL}setCCV2LibId(e){this.ccV2LibId=e}getCCV2LibId(){return this.ccV2LibId}async getThemeSchemaJSON(){let e=`${this.staticServerURL}themeOverrides.schema.json`;return fetch(e).then(n=>n.json())}getConstellationServiceUrl(){return this.staticServerURL?.endsWith("/")?this.staticServerURL.substring(0,this.staticServerURL.length-1):this.staticServerURL}setAppAlias(e){this.appAlias=e}getAppAlias(){return this.appAlias}async getSvcComponentsConfig(e,n={}){let o="",r=0;return e.forEach(i=>{o+=`${r===0?"?":"&"}field${r}=${i.field}&value${r}=${i.value}`,r+=1}),this.pegaOnlyUrl?this.getSvcComponentsConfigSeparatedUrls(e,o,n):this.getSvcComponentsConfigCombinedUrl(e,o,n)}async getSvcComponentsConfigSeparatedUrls(e,n,o){let r=T.getBuiltOnAppNames(),i=this.loadAndFilterPegaComponentsConfig(e,r),s=Promise.resolve([]);o.skipLoadCustomerComponents!==!0&&(s=this.loadAndCustomerComponentsConfig(n,e));let a=[];if(T.environmentInfoObject?.pyInfinityStaticService){let l=[],u=await Promise.all([i,s]),[p,m]=u,f=[];for(let h of m)h.isSdkOverridden===!0?l.push(h.componentDefinition):f.push(h.componentDefinition);let g=this.mergeComponentList([p,f,l]);a.push(...g)}else{let l=this.fetchSDKComponent(n);await Promise.all([i,s,l]).then(u=>{let p=this.mergeComponentList(u);a.push(...p)})}if(o.alternateDesignSystemURL&&a.length===1){let l=await this.getSvcComponentsConfigADS(e,n,o);a[0].alternateDesignSystemConfig=l}return{data:{components:a}}}mergeComponentList=e=>{let[n=[],o=[],r=[]]=e,i="alternateDesignSystemConfig",s=[...n,...o];return this.appStaticUrl?s.map(a=>{let{name:c,type:l,subtype:u}=a,p=r.reduce((m,f)=>(c===f.name&&l===f.type&&u===f.subtype&&(m=f),m),{});return Object.keys(p).length>0?{...a,[i]:{...p}}:a}):s};async fetchSDKComponent(e){if(this.appStaticUrl&&this.appStaticUrl.length>8&&this.appStaticUrl!==this.staticServerURL){let n=`${this.appStaticUrl}v102/${this.appAlias}/componentslist-ext${e}`;return fetch(n,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then(o=>o.json()).then(o=>o.components).catch(()=>[])}return Promise.resolve([])}async loadAndFilterPegaComponentsConfig(e,n){return this.loadPegaComponentsConfig().then(()=>{let o=[];return this.componentsConfig&&this.componentsConfig.forEach(r=>{let i=!0;e.forEach(s=>{Array.isArray(r[s.field])?r[s.field].includes(s.value)||(i=!1):r[s.field]!==s.value&&(i=!1)}),i&&this.checkForBuiltOnSupport(n,r.allowedApplications)&&o.push(r)}),o})}async loadPegaComponentsConfig(){let e=null;if(this.componentsConfig===null){let n=`${this.staticServerURL}components/componentsconfig.json?v=${new Date().getTime()}`;e=fetch(n,{method:"GET"}).then(o=>o.json()).then(async o=>{this.componentsConfig=o,this.ccV2LibId&&await this.loadLibraryComponentsConfig(this.ccV2LibId).then(r=>{r&&r.length>0&&(this.componentsConfig=(this.componentsConfig||[]).concat(r))}).catch(r=>{console.error(`Exception while appending custom component config from library ${this.ccV2LibId} : ${r}`)})}).catch()}else e=Promise.resolve();return e}async loadLibraryComponentsConfig(e){let n=null;return n=fetch(`${this.appStaticUrl}v100/componentlib/componentsconfig/${e}?v=${Date.now()}`,{headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then(o=>{if(!o.ok)throw console.error("Error while fetching custom component config/library component config"),new Error(o.statusText);return o}).then(o=>o.json()).then(o=>Promise.resolve(o)).catch(o=>(console.error(`Exception while fetching custom component config from library ${e} : ${o}`),{error:o.message})),n}async loadAndCustomerComponentsConfig(e,n){let o=null;if(T.environmentInfoObject?.pyInfinityStaticService){let i={};n.forEach((s,a)=>{i[`field${a}`]=s.field,i[`value${a}`]=s.value}),o=PCore.getDataPageUtils().getDataAsync(O.getDefaultQualifiedName("D_pzGetComponentsConfig"),"",i).then(s=>s.data.map(a=>{let c=JSON.parse(a.pxComponentDefinition),l=a.pyIsSDKOverridden!==void 0?a.pyIsSDKOverridden:!1;return{componentDefinition:c,isSdkOverridden:l}}))}else if(this.appStaticUrl&&this.appStaticUrl.length>8&&this.appStaticUrl!==this.staticServerURL){let i=`${this.appStaticUrl}v103/${this.appAlias}/componentslist${e}`;o=fetch(i,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then(s=>s.json()).then(s=>s.components).catch(()=>[])}else o=Promise.resolve([]);return o}checkForBuiltOnSupport(e,n){if(!e||!n||e.length===0||n.length===0)return!0;let o=e.split(",");return o.length===0?!0:o.some(r=>n.includes(r))}async getSvcComponentsConfigCombinedUrl(e,n,o){let r=`${this.staticServerURL}v102/${this.appAlias}/componentslist${n}`,i=await fetch(r,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then(s=>s.json()).then(s=>({data:s}));if(o.skipLoadCustomerComponents===!0&&i?.data?.components?.length>0&&(i.data.components=i.data.components.filter(s=>s.componentKey===void 0)),o.alternateDesignSystemURL&&i?.data?.components?.length===1){let s=await this.getSvcComponentsConfigADS(e,n,o);i.data.components[0].alternateDesignSystemConfig=s}return i}getSvcComponentsConfigADS(e,n,o){let r=`${o.alternateDesignSystemURL}${o.alternateDesignSystemURL?.endsWith("/")?"":"/"}components/${e[0].value}/config-ext.json`;return fetch(r,{method:"GET"}).then(i=>{if(i.ok)return i.json();throw new Error(i.statusText)}).catch(i=>({error:i.message}))}getSvcImage(e){let n=`${this.appStaticUrl}v102/${this.appAlias}/image/${e}`;return fetch(n,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then(o=>o.blob()).catch()}getSvcImageUrl(e){try{let n=T.environmentInfoObject?.pyInfinityStaticService,{callUrlKey:o,queryPayload:r,callUrl:i}=this.buildImageRequest(e,n);return zpe(e)?(this.imageBlobUrlCache[i]||(this.imageBlobUrlCache[i]=this.fetchImage(o,r,i,n)),this.imageBlobUrlCache[i]):Promise.resolve("")}catch{return Promise.resolve(null)}}buildImageRequest(e,n){let o=Dpe,r,i=`${this.appStaticUrl}v102/${this.appAlias}/image/${e}`;if(n){let s=/DATA-CONTENT-IMAGE\s([^!]*)!.*\/OPERATORIMAGES\//i,a=e.match(s);if(a){let c=a[1]?.trim();if(c)o=$pe,r={user_ID:c.toLowerCase()};else throw console.warn("AssetLoader.buildImageRequest: operator image key is missing user id"),new Error("AssetLoader.buildImageRequest: operator image key is missing user id")}else r={fileID:e};i=F(o,r)?.restApi||i}return{callUrlKey:o,queryPayload:r,callUrl:i}}fetchImage(e,n,o,r){return r?Re(e,{queryPayload:n}).then(i=>{let s=this.decodeBase64ToByteArray(i.data),a=this.getMimeTypeFromKey(n?.fileID||n?.user_ID||""),c=new Blob([s],{type:a});return window.URL.createObjectURL(c)}).catch(i=>{throw console.error("Error fetching image:",i),i}):fetch(o,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then(i=>i.blob()).then(i=>window.URL.createObjectURL(i)).catch()}decodeBase64ToByteArray(e){return R8(e)}getMimeTypeFromKey(e){let n={svg:"image/svg+xml",png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",webp:"image/webp",bmp:"image/bmp",tif:"image/tiff",tiff:"image/tiff",ico:"image/vnd.microsoft.icon",heic:"image/heic",heif:"image/heif",avif:"image/avif"},o=N8(e);return n[o]?n[o]:"application/octet-stream"}isStaticContentReference(e){let n=e.trim();return!n||/^[a-z][a-z\d+.-]*:/i.test(n)||n.startsWith("//")?!1:y.isWebFilePath(n)}async resolveImageSource(e){if(!this.isStaticContentReference(e))return typeof e=="string"?e:"";let n=y.normalizeStaticContentKey(e);if(!Cw(n))return"";let o=await this.getSvcImageUrl(n);return typeof o=="string"&&o?o:""}async resolveBackgroundImage(e){let n=await Promise.all([...e.matchAll(T8)].map(async([o,,r,i])=>{let s=r??i;if(!s||!this.isStaticContentReference(s))return o;if(!Cw(y.normalizeStaticContentKey(s)))return"none";let a=await this.resolveImageSource(s);return a?o.replace(s,a):"none"}));return e.replace(T8,o=>n.shift()??o)}async resolveThemeBackgroundImages(e){if(!this.themeHasBackgroundImage(e))return e;if(Array.isArray(e))return Promise.all(e.map(n=>this.resolveThemeBackgroundImages(n)));if(e&&typeof e=="object"){let n=await Promise.all(Object.entries(e).map(async([o,r])=>[o,await this.resolveThemeBackgroundImages(r)]));return Object.fromEntries(n)}return typeof e=="string"&&e.includes("url(")?this.resolveBackgroundImage(e):e}themeHasBackgroundImage(e){return Array.isArray(e)?e.some(n=>this.themeHasBackgroundImage(n)):e&&typeof e=="object"?Object.values(e).some(n=>this.themeHasBackgroundImage(n)):typeof e=="string"&&e.includes("url(")}getSvcLocale(e,n){let o=`${this.appStaticUrl}v102/${this.appAlias}/locales/${e}/${n}`;return fetch(o,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}})}getSvcAvailableLocales(){let e=`${this.appStaticUrl}v102/app/${this.appAlias}/locales/getLocaleCodes`;return fetch(e,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then(n=>n.json()).catch(()=>[])}async getSvcComponent(e){try{let n=T.environmentInfoObject?.pyC11nDXCBDevURL;if(n){let i=n.replace(/\/+$/,"");v8(i);let s=await fetch(`${i}/index.js`);if(!s.ok)throw new Error(s.statusText);return await s.text()}if(T.environmentInfoObject?.pyInfinityStaticService||it()){let i=T.environmentInfoObject?.pxApplication?.pxUpdateDateTime,s=i?y.parsePegaDateTimeToTimestamp(i):null;return await b8(e,{v:s})}let r=await fetch(`${this.appStaticUrl}v102/${this.appAlias}/component/${e}`,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}});if(!r.ok)throw new Error(r.statusText);return await r.text()}catch(n){throw console.error("Error fetching service component:",n),n}}async importCustomComponentMap(e,n){try{let o=T.environmentInfoObject?.pyInfinityStaticService||it(),r=T.environmentInfoObject?.pyC11nDXCBDevURL,i=`${this.appStaticUrl}v100/componentlib/componentsmap/${e}`;if(r&&(v8(r),i=`${r.replace(/\/+$/,"")}/index.js`),o&&!r){let c=T.environmentInfoObject?.pxApplication?.pxUpdateDateTime,l=await b8(e,{v:y.parsePegaDateTimeToTimestamp(c),libV:y.parsePegaDateTimeToTimestamp(n)});await this.appendCustomScriptToHead(l);return}if(o||r){if(typeof document>"u")return;await new Promise((c,l)=>{let u=document.createElement("script");u.src=i,u.type="text/javascript";let p=setTimeout(()=>{l(new Error(`Timed out waiting for custom component script to load: ${i}`))},C8);u.onload=()=>{clearTimeout(p),c()},u.onerror=()=>{clearTimeout(p),l(new Error("Error while appending custom component map"))},document.head.appendChild(u)});return}let s=await fetch(i,{headers:{Authorization:`Bearer ${this.b2sJWT}`}});s.ok||console.error("Error while fetching custom component map");let a=await s.text();this.setCCV2LibId(e),await this.appendCustomScriptToHead(a)}catch(o){console.error("Exception while appending custom component map (or load blocked):",o)}}async appendCustomScriptToHead(e){if(!(typeof document>"u"))try{if(it()){I8(e);return}await new Promise((n,o)=>{let r=document.createElement("script");r.src=window.URL.createObjectURL(new Blob([e],{type:q_}));let i=setTimeout(()=>{o(new Error("Timed out waiting for custom component script to load"))},C8);r.onload=()=>{clearTimeout(i),n()},r.onerror=()=>{clearTimeout(i),o(new Error("Error while appending custom component map"))},document.head.appendChild(r)})}catch(n){console.error("Exception appendCustomScriptToHead:",n)}}loadSvcComponent(e){return new Promise((n,o)=>{this.getSvcComponent(e).then(r=>{if(typeof document>"u"){o(e);return}if(it()){I8(r),n(e);return}let i=document.createElement("script");i.src=window.URL.createObjectURL(new Blob([r],{type:q_})),i.onload=()=>n(e),i.onerror=()=>o(e),document.head.appendChild(i)}).catch(r=>{console.error(`Failed to load service component ${e}:`,r),o(e)})})}initServer(e,n,o){console.log(`asset-loader.initServer(${e}, ${n})`),this.appStaticUrl=null,this.staticServerURL=null,this.pegaOnlyUrl=!1,this.componentsConfig=null,this.isolationID=null,this.isolationAssetBlobCache=new Map,S8(),e&&n&&n!=="no-appstatic"&&n!=="no-cdn"?(this.appStaticUrl=n.endsWith("/")?n:`${n}/`,this.staticServerURL=e.endsWith("/")?e:`${e}/`,this.pegaOnlyUrl=!0,Fy(this.staticServerURL),Fy(this.appStaticUrl)):e&&n&&n==="no-appstatic"?(this.staticServerURL=e.endsWith("/")?e:`${e}/`,this.appStaticUrl=this.staticServerURL,this.pegaOnlyUrl=!0,Fy(this.staticServerURL)):e&&n&&n==="no-cdn"&&(this.staticServerURL=e.endsWith("/")?e:`${e}/`,this.appStaticUrl=this.staticServerURL,Fy(this.staticServerURL)),console.log(`asset-loader.initServer() staticServerURL=${this.staticServerURL}, appStaticUrl=${this.appStaticUrl}, pegaOnlyUrl=${this.pegaOnlyUrl})`),this.b2sJWT=o}register(e,n){this.loaderObj[e]=n}getLoader(e){let n;return e?n=this.loaderObj[e]:n=(r,i)=>new Promise((s,a)=>{if(typeof document>"u"){a(r);return}let c=document.createElement(i);if(i==="script"){let l=c;l.onload=()=>{s(r)},l.onerror=()=>{a(r)},l.type=q_,l.charset="UTF-8",l.async=!1,l.src=r}else{let l=c;l.type="text/css",l.rel="stylesheet",l.href=r}document.head.appendChild(c)}).catch(s=>{console.log(s)}),n}loadAssets(e,n){let{isDevServerMode:o}=n;if(!e)return Promise.resolve();let r=[];return e.forEach(i=>{let s=Object.keys(i)[0],a=o?Object.values(i)[0]:this.getStaticServerUrl();a=a.endsWith("/")?a:`${a}/`,!this.loadedAssets[s]&&(s.includes(".js")?r.push(this.getLoader()(a+s,this.getTypes.SCRIPT)):s.includes(".css")&&this.getLoader()(a+s,this.getTypes.STYLE),this.loadedAssets[s]=!0)}),Promise.all(r)}getAssetsFromIsolations(e){let n=this.getIsolationID(),{restApi:o,reqType:r}=el("getAssetsFromIsolations",{isolationID:n,assetPath:e})||{},i=`${this.appStaticUrl}${o}`,s=this.isolationAssetBlobCache.get(i);if(s)return this.isolationAssetBlobCache.delete(i),this.isolationAssetBlobCache.set(i,s),s;let a=fetch(i,{method:r,credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then(c=>{if(!c.ok)throw new Error(`Failed to fetch isolation asset: ${c.status} ${c.statusText}`.trim());return c.blob()}).catch(c=>{throw this.isolationAssetBlobCache.delete(i),c});return this.isolationAssetBlobCache.set(i,a),this.evictIsolationAssetBlobCacheOverflow(),a}evictIsolationAssetBlobCacheOverflow(){for(;this.isolationAssetBlobCache.size>wpe;){let e=this.isolationAssetBlobCache.keys().next().value;if(!e)return;this.isolationAssetBlobCache.delete(e)}}getIsolationID(){if(this.isolationID===null){let e=this.b2sJWT?.split(".")[1].replace(/-/g,"+").replace(/_/g,"/")||"",n=decodeURIComponent(globalThis.atob(e).split("").map(r=>`%${`00${r.charCodeAt(0).toString(16)}`.slice(-2)}`).join("")),o=JSON.parse(n);this.isolationID=o?.tenant_id}return this.isolationID}},We=new Iw;var _w=class{c11nEnv;constructor(e){this.c11nEnv=e}validate(e,n){let{value:o}=this.c11nEnv.getStateProps();if(!n&&(n=o,!n)){let s=this.c11nEnv.getComponentConfig(),a=this.c11nEnv.getStateProps();s.selectionMode==="multi"?n=a.selectionList:s.renderMode==="Editable"?n=a.referenceList:s.selectionMode==="single"?n=a.selectionKey:n=a.value}let r=DV(this.c11nEnv.getContextName(),this.c11nEnv.getPageReference(),n),{message:i}=Ft.validate(this.c11nEnv.getComponentName()?.toLowerCase(),n,e,r);return i?{status:!1,message:i}:{status:!0}}validateEmail(e,n={}){let o=Ft.getValidator("email");if(!o)return{status:"success"};let r=o(e,n);return r?{status:"failure",message:r}:{status:"success"}}},O8=_w;var x8=(t,e,n,o,r)=>{if(r!==d.RESOURCE_STATUS.CREATE)return;Ue.isStateMachineExist(t,e,n)||Ue.setStateMachine(t,n,e,new qc(n,e,t)),Ue.getStateMachine(t,e,n).insert({},typeof o=="string"?o:o+1,!0,{isDefault:!0})},D8=(t,e,n,o,r)=>{typeof e=="string"&&t.data?.caseInfo?.content&&n&&(o==="CREATE"||o==="UPDATE")&&(t.data.caseInfo.content[r][e][n]=e)},$8=t=>{let e=!t.isLocalAction&&t.editType===d.ACTION;return{...e?{}:{activeActionID:t.actionID},assignments:[{ID:t.assignmentID,...e?{actions:[{ID:t.actionID}]}:{}}]}},w8=t=>{let{CASE_INFO:e}=A,n=(r,i)=>Q.getPropertyValue(r,"",i),o=n(d.CONTEXT_DATA_MODAL_VIEW.PARENT_CONTEXT,t);for(;o;){let r=n(e.ASSIGNMENT_ID,o),i=n(e.ACTIVE_ACTION_ID,o),s=n(e.ASSIGNMENTACTION_ID,o);if(r||i||s)return{assignmentID:r,activeActionID:i,assignmentActionID:s,isLocalAction:n(e.IS_LOCAL_ACTION,o)};o=n(d.CONTEXT_DATA_MODAL_VIEW.PARENT_CONTEXT,o)}};var W_="OPEN_PROCESS_ACTION";var ic="OPEN_ASSIGNMENT";var Vy="DELETE_CASE_IN_CREATE_STAGE",M8=t=>({type:Vy,payload:t});var ji="SAVE_AND_CLOSE",Gl=t=>({type:ji,payload:t});var jpe="DELETE_DATA_OBJECT",k8=t=>({type:jpe,payload:t});var bw="DELETE_WORK",Tw=t=>({type:bw,payload:t});var vw=class{static getSavableDataPage(e){return Rw(e)}static getLookUpDataPage(e){return Nw(e)}static getLookUpDataPageInfo(e){return Ow(e)}static getDataPageKeys(e){return Pw(e)}},Fi=vw;var xw=class{static getPropertyName(e){return ge.getPropertyName(e)}static isProperty(e){return ge.isProperty(e)}static getLeafPropertyName(e){return ge.getLeafPropertyName(e)}static isPropertyInternal(e){return e.startsWith("px")||e.startsWith("pz")}},On=xw;var Dw=class t{static createContainerPConnect(e,n,o,r=!1){let{accessedOrder:i,items:s}=e;if(i&&s){let a=i[i.length-1];if(s[a]?.view&&Object.keys(s[a].view).length>0){let c=s[a],l=a.substring(0,a.lastIndexOf("_")),{view:u,context:p}=c,{viewName:m,viewContext:f}=this.processRootViewDetails(u,c,n);if(!m)return null;let g={meta:u,options:{context:p,pageReference:f||n,containerName:o,containerItemID:a,parentPageReference:n,hasForm:r||o===Ee.WORKAREA||o===Ee.MODAL||m===d.CREATE_DETAILS_VIEW_NAME,target:l}};return ct(g).getPConnect}}return null}static processRootViewDetails(e,n,o){let{config:{context:r,name:i}={}}=e,{context:s}=n,a=i,c=r,l=On.isProperty(i),u=On.isProperty(r);if(u){let p=On.getPropertyName(r);c=ie(`.${p}`,p.startsWith(".")?o:"",s)}if(c||(c=o),l){let p=On.getPropertyName(i);a=ie(`.${p}`,c,s)}return l&&u&&a!==""&&(a=i,c=r),{viewName:a,viewContext:c}}static addFlowContainerItem(e){let n=e.getContainerManager(),o=e.getContextName(),r=e.getValue("context_data.caseViewMode"),i,s;if(r!=="review"){let a=o.substring(0,o.lastIndexOf("_")),c=se(a),l=Ze(a,c);l&&({key:i,flowName:s}=l)}n.addContainerItem({semanticURL:"",key:i,flowName:s,caseViewMode:"perform",resourceType:"ASSIGNMENT",data:e.getDataObject(o)})}static hasContainerItems=e=>{let n=e.getContextName(),o=e.getContainerName();return PCore.getContainerUtils().hasContainerItems(`${n}/${o}`)};static hasGetNextWorkLinks=e=>e.getValue(d.CASE_INFO.GETNEXTWORK);static getActiveCaseActionName=e=>{let n=e.getValue(d.CASE_INFO.CASE_INFO_ACTIONS),o=e.getValue(d.CASE_INFO.ACTIVE_ACTION_ID);return n.find(i=>i.ID===o)?.name||""};static getFirstCaseActionName=e=>e.getValue(d.CASE_INFO.CASE_INFO_ACTIONS)[0]?.name||"";static hasNotificationMessages=e=>!!e.getValue("caseMessages");static isCaseWideLocalAction=e=>{let n=e.getValue(d.CASE_INFO.ACTIVE_ACTION_ID),o=e.getValue(d.CASE_INFO.CASE_INFO_ACTIONS);return o&&n?o.find(i=>i.ID===n)?.type==="Case":!1};static getChildCaseAssignments=e=>{let n=e.getValue(d.CASE_INFO.CHILD_ASSIGNMENTS),o=[];return n&&n.length>0&&n.forEach(({assignments:r=[],Name:i,caseTypeID:s})=>{let a=r.map(c=>({...c,caseName:i,caseTypeID:s}));o=o.concat(a)}),o};static hasAssignments=e=>{let n=e.getValue(d.CASE_INFO.D_CASE_ASSIGNMENTS_RESULTS),o=t.getChildCaseAssignments(e);return!!(Array.isArray(o)&&o.length>0||Array.isArray(n)&&n.length>0||t.isCaseWideLocalAction(e))};static showBanner=e=>{let n=e();return t.hasNotificationMessages(n)||!t.hasAssignments(n)};static showTodo=e=>e.getValue("context_data.caseViewMode")!=="perform";static isRenderWithToDoWrapper=(e,n)=>{let o=e(),{showWithToDo:r}=n;return r&&(!t.isCaseWideLocalAction(o)||t.showTodo(o))};static getToDoAssignments=e=>{let n=e.getValue(d.CASE_INFO.CASE_INFO_ACTIONS),o=e.getValue(d.CASE_INFO.ASSIGNMENT_LABEL),r=e.getValue(d.CASE_INFO.D_CASE_ASSIGNMENTS_RESULTS)||[],i=t.getChildCaseAssignments(e)||[],s=JSON.parse(JSON.stringify(i));s=s.map(l=>(l.isChild=!0,l));let a=[...r,...s],c=JSON.parse(JSON.stringify(a));return n&&!t.showTodo(e)&&(c=c.map(l=>(l.name=t.getActiveCaseActionName(e)||l?.name||o,l))),c}},K_=Dw;var $w=class{c11nEnv;constructor(e){this.c11nEnv=e}containerManagerPromise=e=>{let n=M.getNextActionMgrId(),o,r,i=new Promise((s,a)=>{o=s,r=a});if(o&&r)M.register(n,i,o,r,e);else throw new Error("resolveFn or rejectFn is not defined.");return{actionMgrID:n,promise:i}};initializeContainers(e){let n=wu,o=this.c11nEnv,r=o.getContextName(),i=o.getContainerName(),s={context:r,name:i,type:d.CONTAINER_TYPE.SINGLE},{actionMgrID:a,promise:c}=this.containerManagerPromise(n),l={...s,...e,actionMgrID:a};return l.type||(l.type=s.type),v(ww(l)),c}addContainerItem(e){let n=bt,o=this.c11nEnv,r=o.getMetadata(),{children:i}=r||{},s;Array.isArray(i)&&i.length>0&&([s]=i);let a=o.getContextName(),c=o.getContainerName(),l=En(c,a,e?.containerType===d.CONTAINER_TYPE.SINGLE),u=X(c,a),p={root:{...s,config:{...s?.config,context:s?.config?.context||o.getPageReference?.()}},containerItemID:l,context:l,target:u,containerName:c};e=JSON.parse(JSON.stringify(e)),[d.WORKAREA].includes(c)&&delete e.data?.coreHeaders;let{actionMgrID:m,promise:f}=this.containerManagerPromise(n),g={...p,...e,actionMgrID:m};return v(kt(g)),f}updateContainerItem(e){if(!e?.containerItemID)return Promise.reject(new Error("updateContainerItem : containerItemID is required in containerInfo object"));let n=Ht,o=de(e.containerItemID),r=re(e.containerItemID),i={context:o,target:r},{actionMgrID:s,promise:a}=this.containerManagerPromise(n),c={...i,...e,actionMgrID:s};return v(dn(c)),a}activateContainerItem(e){if(!e?.containerItemID)return Promise.reject(new Error("activateContainerItem : containerItemID is required in containerInfo object"));let n=mn,r={target:re(e.containerItemID)},{actionMgrID:i,promise:s}=this.containerManagerPromise(n),a={...r,...e,actionMgrID:i};return v(pn(a)),s}removeContainerItem(e){if(!e?.containerItemID)return Promise.reject(new Error("removeContainerItem : containerItemID is required in containerInfo object"));let n=tt,o=de(e.containerItemID),r=re(e.containerItemID),i={context:o,target:r},{actionMgrID:s,promise:a}=this.containerManagerPromise(n),c={...i,...e,actionMgrID:s};return v(nt(c)),a}resetContainers(e){if(!e?.context||!e?.name)return Promise.reject(new Error("resetContainers : context and name are required in containerInfo object"));let n=fi,o=al(e),{actionMgrID:r,promise:i}=this.containerManagerPromise(n),s={...o,...e,actionMgrID:r};return v(cl(s)),i}addTransientItem(e){let{id:n,data:o,sourceContainerItemId:r}=e,i=this.c11nEnv.getContextName(),s=av(n,i),a=Vi(i);if(s&&a.includes(s))return s;let c=o;if(r){let l=J(r);if(!l)throw new Error(`addTransientItem: source container item "${r}" not found in store`);c=y.deepClone(l)}return v(Mw({transientItemID:s,contextName:i,target:re(i),data:c})),s}updateTransientData(e){let{transientItemID:n,data:o}=e,r=this.c11nEnv.getContextName();if(n){if(!Vi(r).includes(n))return}else return;v(Hy({transientItemID:n,data:o}))}removeTransientItem(e){let n=this.c11nEnv.getContextName(),{target:o=this.c11nEnv.getTarget(),containerItemID:r,transientItemID:i}=e;if(i&&r){if(!Vi(n).includes(i))return}else return;v(Gy({target:o,containerItemID:r,transientItemID:i}))}createContainerPConnect(e,n,o,r=!1){K_.createContainerPConnect(e,n,o,r)}hasContainerItems(){let e=this.c11nEnv.getContextName(),n=this.c11nEnv.getContainerName();return Xn(`${e}/${n}`)}isContainerInitialized(){let e=this.c11nEnv.getContextName(),n=this.c11nEnv.getContainerName();return By(e,n)}},kp=$w;var kw=class extends yv{constructor(e,n){super(n)}},te=(...t)=>Ai(e=>t.includes(e.type)),L8=(...t)=>(e,n)=>new zt(o=>{let r=t.map(i=>i(e,n).subscribe(o));return()=>{r.forEach(i=>i.unsubscribe())}}),Fpe=t=>typeof t!="object"||t===null||!("type"in t)?!1:typeof t.type=="string",U8=()=>{let t=new _a,e=null,n=null,o=r=>(n=r,e=new kw(t.asObservable(),r.getState()),i=>s=>{let a=i(s);return e?.next(r.getState()),Fpe(s)&&t.next(s),a});return o.run=r=>{if(!e||!n)throw new Error("Epic middleware must be added to the store before calling run().");return r(t.asObservable(),e).subscribe(i=>{n?.dispatch(i)})},o};var fe=(t,e,n)=>ds(o=>(o?.code!=="ERR_CANCELED"&&console.error(t,o),ye(bs(t,o,e,null,n))));var bn=(t,e)=>n=>new zt(o=>{let r={},i=0;return n.pipe(V(s=>{let a=Date.now(),c;return e?c=e:c=Ro,c&&c(s,r)&&a-i<t?Hc():(r=s,i=a,ye(s))})).subscribe(o)});var Vpe="Error occurred during ajax call at createDataObject Epic",Bpe=t=>{let{dataPageID:e,context:n,headers:o,containerItemID:r}=t,i={data_view_ID:e},{restApi:s,reqType:a}=F(L2,i),{content:c}=Mt(r);return Y(k(s,{method:a,headers:o,body:{data:c.content,pageInstructions:c?.pageInstructions}},r)).pipe(x(l=>({response:l.data,actionInPayload:t})),fe(Vpe,n))},z8=Bpe;var Hpe="CREATE_DATA_OBJECT",J_=t=>({type:Hpe,payload:t});var Lw=t=>{let e=0,n=[];return t.pipe(te(ju),bn(100),Yt(o=>{let{isFormValid:r}=o.payload;if({actionMgrID:e}=o.payload,!r){let i={type:A.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return M.rejectActionByID(e,!0,i),ye([])}return ye(o.payload).pipe(V(i=>z8(i)),V(async i=>{if(i&&i.type===ve){let{payload:m}=i,f=pe({...i,...m,actionMgrID:e});return n.push(f),{actionsOut:n,data:void 0}}let{actionInPayload:s}=i,{containerItemID:a,isModalAction:c}=s,l=c?Ee.MODAL:Ee.PRIMARY,p={target:X(l,a),containerItemID:a,context:a};return n.push(B(nt,p)),{actionsOut:n,data:i?.response}}),x(({data:i})=>(n.length===1&&Qe(n[0].type)?M.rejectActionByID(e):M.resolveActionByID(e,i),v(n),n=[],n)))}))};var Gpe="Error occurred during ajax call at getDataObjectView Epic",qpe=t=>{let{dataLookUp:e,context:n,headers:o,viewName:r,requestPayload:i}=t,s={data_view_ID:e,view_ID:r},{restApi:a,reqType:c}=F(j2,s);return Y(k(a,{method:c,headers:o,body:{dataViewParameters:i}},n)).pipe(x(l=>({response:l.data,headers:ke(l.headers),actionInPayload:t})),fe(Gpe,n))},j8=qpe;var Wpe="VIEW_DATA_OBJECT",Y_=t=>({type:Wpe,payload:t});var Uw=t=>{let e=0,n=[];return t.pipe(te(NE),bn(100),x(o=>({actionMgrID:e}=o.payload,o.payload)),V(o=>j8(o)),V(async o=>{if(o&&o.type===ve){let{payload:h}=o,E=pe({...o,...h,actionMgrID:e});return n.push(E),n}let{actionInPayload:r,response:i,headers:s={}}=o,{containerName:a,readOnly:c,actionName:l}=r,u=X(a,r.context),p=rt(u,a,r.context),m={acName:u,context:p};if(i?.data?.dataInfo){let{dataInfo:h}=i.data;h.dataContext||=r.dataLookUp,h.dataContextParameters||=r.requestPayload}await Pe(i,r,m);let g=Me(i,{target:u,context:p,containerItemID:p,headers:s});return g.resourceType=A.RESOURCE_TYPES.DATA,g.resourceStatus=A.RESOURCE_STATUS.UPDATE,g.readOnly=c,g.actionName=l,g.key=JSON.stringify(r.requestPayload),n.push(B(kt,g)),n}),x(()=>(n.length===1&&Qe(n[0].type)?M.rejectActionByID(e):M.resolveActionByID(e),v(n),n=[],n)))};var Kpe="Error occurred during ajax call at updateDataObject Epic",Jpe=t=>{let{dataPageID:e,context:n,headers:o,containerItemID:r,key:i}=t,s={data_view_ID:e},{restApi:a,reqType:c}=F(vE,s),{content:l}=Mt(r);return Y(k(a,{method:c,headers:{...o,"if-match":t?.etag},body:{data:{...l.content,...i},pageInstructions:l.pageInstructions||[]}},r)).pipe(x(u=>({response:u.data,actionInPayload:t})),fe(Kpe,n))},F8=Jpe;var Ype="UPDATE_DATA_OBJECT",Z_=t=>({type:Ype,payload:t});var zw=t=>{let e=0,n=[];return t.pipe(te(Fu),bn(100),Yt(o=>{let{isFormValid:r}=o.payload;if({actionMgrID:e}=o.payload,!r){let i={type:A.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return M.rejectActionByID(e,!0,i),ye([])}return ye(o.payload).pipe(V(i=>F8(i)),V(async i=>{if(i&&i.type===ve){let{payload:m}=i,f=pe({...i,...m,actionMgrID:e});return n.push(f),n}let{actionInPayload:s}=i,{containerItemID:a,isModalAction:c}=s,l=c?Ee.MODAL:Ee.PRIMARY,p={target:X(l,a),containerItemID:a,context:a};return n.push(B(nt,p)),n}),x(()=>(n.length===1&&Qe(n[0].type)?M.rejectActionByID(e):M.resolveActionByID(e),v(n),n=[],n)))}))};var Zpe="Error occurred during ajax call at getDataObjectView Epic",Qpe=t=>{let{lookupDatapage:e,context:n,headers:o,actionID:r,dataViewParameters:i}=t,s={data_view_ID:e,action_ID:r},{restApi:a,reqType:c}=F("openDataObjectAction",s);return Y(k(a,{method:c,headers:o,body:{dataViewParameters:i}},n)).pipe(x(l=>({response:l.data,headers:ke(l.headers),actionInPayload:t})),fe(Zpe,n))},V8=Qpe;var jw=t=>{let e=0,n=[];return t.pipe(te(OE),bn(100),x(r=>({actionMgrID:e}=r.payload,r.payload)),V(r=>V8(r)),V(async r=>{if(r&&r.type===ve){let{payload:C}=r,I=pe({...r,...C,actionMgrID:e});return n.push(I),n}let{actionInPayload:i,response:s,headers:a={}}=r,{containerName:c,actionID:l,context:u,actionName:p}=i,m=X(c,i.context),f=En(c,u);c===d.MODAL&&(f=pr(u,f));let g={target:m,context:f,containerItemID:f,headers:a,resourceType:A.RESOURCE_TYPES.DATA,resourceStatus:A.RESOURCE_STATUS.OPEN_FLOW_ACTION,key:JSON.stringify(i.dataViewParameters),actionID:l,actionName:p,hideDefaultActionButtons:s?.uiResources?.hideDefaultActionButtons===!0};if(s?.data?.dataInfo){let{dataInfo:C}=s.data;C.dataContext||=i.lookupDatapage,C.dataContextParameters||=i.dataViewParameters}await Pe(s,i,{acName:m,context:u});let E=Me(s,g);return n.push(B(kt,E)),n}),x(()=>(n.length===1&&Qe(n[0].type)?M.rejectActionByID(e):M.resolveActionByID(e),v(n),n=[],n)))};var Xpe="Error occurred during ajax call at getDataObjectView Epic",eme=t=>{let{savableDatapage:e,context:n,headers:o,actionID:r,keys:i,containerItemID:s,jsActionQueryParams:a}=t,c={data_view_ID:e,action_ID:r},{restApi:l}=F("submitDataObjectAction",c),{reqType:u}=F("submitDataObjectAction",c),{content:p}=Mt(s);return l=ed(a,l),Y(k(l,{method:u,headers:{...o,"if-match":t?.etag},body:{data:{...p?.content,...i},pageInstructions:p?.pageInstructions||[]}},n)).pipe(x(m=>({response:m.data,actionInPayload:t})),fe(Xpe,n))},B8=eme;var tme=(t,e,n,o)=>{let{resourceType:r,key:i,containerItemID:s}=o,a=Me(n,e);a.resourceType=r||A.RESOURCE_TYPES.DATA;let c=Yo(s);t.push(B(nt,a));let l=ie(".dataContext","dataInfo",c),u=ie(".dataContextParameters","dataInfo",c),p={context:c,skipSemanticUrl:!0,resourceType:r,parentAction:cs,dataContext:l,dataContextParameters:u},m=l&&u&&Nt(dr,{pageName:d.PY_DETAILS,dataViewName:l},u)||"";if(s?.includes(d.PREVIEW)){let f={type:aa,payload:{pageName:d.VIEW_NAMES.PY_DATA_PREVIEW,container:d.PREVIEW,containerName:d.PREVIEW,...p}};t.push(f)}else if(r!==d.PAGE&&i===m&&s?.includes(d.PRIMARY)){let f={type:aa,payload:{pageName:d.VIEW_NAMES.PY_DETAILS,containerName:"",...p}};t.push(f)}return t},Fw=t=>{let e=0,n=[];return t.pipe(te(cs),bn(100),Yt(r=>{let{isFormValid:i}=r.payload;({actionMgrID:e}=r.payload);let s=r.payload.context;if(!i){let a={type:A.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return M.rejectActionByID(e,!0,a),ye([])}return ht({context:s,stateObj:J(s),clearContextMessages:!0}),ye(r.payload).pipe(V(a=>B8(a)),V(async a=>{if(a&&a.type===ve){yA(a,"dataObject");let{payload:I}=a,_=pe({...a,...I,actionMgrID:e});return n.push(_),n}let{actionInPayload:c,response:l,headers:u={}}=a,{containerName:p,containerItemID:m,resourceType:f,key:g}=c,h=X(p,c.context),E={acName:h,context:c.context};await Pe(l,c,E);let C={key:g,target:h,resourceType:f,containerItemID:m,headers:u,context:c.context};return n=tme(n,C,l,{key:g,resourceType:f,containerItemID:m}),n}),x(()=>(n.length===1&&Qe(n[0].type)?M.rejectActionByID(e):M.resolveActionByID(e),v(n),n=[],n)))}))};var Vw=class{components;constructor(){this.components={}}_checkComponent(e,n){return!!this.components[n]?.[e]}start(e,n,o,r,i){let s={viewName:e,pageReference:o,contextName:r,isInProgress:!0,active:!0,caseKey:n};this.components[r]=this.components[r]||{},this.components[r][i]=s}stop(e,n){this._checkComponent(e,n)&&(this.components[n][e].isInProgress=!1)}remove(e,n){this._checkComponent(e,n)&&delete this.components[n][e]}removeContext(e){delete this.components[e]}enableCascade(e){this.components[e]&&Object.values(this.components[e]).forEach(n=>{n.isInProgress&&(n.cascade=!0)})}activate(e,n){this._checkComponent(e,n)&&(this.components[n][e].active=!0)}deactivate(e,n){this._checkComponent(e,n)&&(this.components[n][e].active=!1)}refreshActiveComponents(e){e&&this.components[e]&&Object.keys(this.components[e]).forEach(n=>{this.refreshComponent(n,e)})}refreshComponent(e,n){if(!this._checkComponent(e,n))return;let o=this.components[n][e];if(o.active&&o.cascade){let{caseKey:r,viewName:i,pageReference:s}=o;rl(r,i,n,s,{})}}},Lp=new Vw;var Bw=class{constructor(e,n,o,r,i=100,s=500){this.finalDataViewCall=e;this.combiner=n;this.comparator=o;this.separator=r;this.maxtime=i;this.maxsize=s;this.groupedDataViewArray=[]}finalDataViewCall;combiner;comparator;separator;maxtime;maxsize;groupedDataViewArray;timeoutId;findCombinableDataViewCall(e){return this.groupedDataViewArray.find(n=>this.comparator(n,e))}dequeueAllDataViewCalls(){for(this.groupedDataViewArray.reverse();this.groupedDataViewArray.length>0;){let e=this.groupedDataViewArray.pop();this.finalDataViewCall(e).then(n=>{this.separator(e,n)})}clearTimeout(this.timeoutId)}dequeueDataViewCallOnSizeExceed(e){let n=this.groupedDataViewArray.findIndex(o=>this.comparator(o,e));this.groupedDataViewArray[n]&&(this.groupedDataViewArray.splice(n,1),this.finalDataViewCall(e).then(o=>{this.separator(e,o)}))}queueDataViewCall(e,n){let o=this.findCombinableDataViewCall(e),r,i;return r=new Promise(s=>{i=s}),o&&!o.dataViewCallMap[n]?(this.combiner(o,e),o.dataViewCallMap[n]={promise:r,resolve:i}):o?r=o.dataViewCallMap[n].promise:(o={...e,dataViewCallMap:{[n]:{promise:r,resolve:i}}},this.groupedDataViewArray.push({...e,dataViewCallMap:{[n]:{promise:r,resolve:i}}})),Object.keys(o.dataViewCallMap).length===this.maxsize?this.dequeueDataViewCallOnSizeExceed(o):(clearTimeout(this.timeoutId),this.timeoutId=setTimeout(()=>this.dequeueAllDataViewCalls(),this.maxtime)),r}},H8=Bw;var Hw=class{bufferedDataQueues;constructor(){this.bufferedDataQueues={}}getBufferedDataQueueForDataPage(e){return this.bufferedDataQueues[e]}addBufferedDataQueueForDataPage(e,n,o,r,i,s,a){return this.getBufferedDataQueueForDataPage(e)||(this.bufferedDataQueues[e]=new H8(n,o,i,r,s,a)),this.bufferedDataQueues[e]}},G8=Hw;var nme=t=>{let e=t?.F0.rhs?.value;t.F0.rhs={values:[e]},t.F0.comparator="IN"},rme=(t,e)=>Object.keys(t).length===1&&Object.keys(t).length===Object.keys(e).length,ome=(t,e)=>e.F0.comparator==="EQ"&&(t.F0.comparator===e.F0.comparator||t.F0.comparator==="IN"),ime=(t,e)=>rme(t,e)&&ome(t,e)&&t.F0.ignoreCase===e.F0.ignoreCase,q8=t=>t.map(e=>e.field),sme=(t,e)=>{let n=(t.query?.filter).filterConditions,o=(e.query?.filter).filterConditions,r=(e.query?.filter).logic,i=Object.keys(n).length;ime(n,o)?(n.F0.comparator==="EQ"&&nme(n),(n.F0.rhs?.values).push(o.F0.rhs?.value)):(Object.keys(o).forEach((c,l)=>{let u=`F${i+l}`;n[u]=o[c],r=r.replace(c,u)}),(t.query?.filter).logic+=` OR ${r}`);let s=q8(t.query?.select);q8(e.query?.select).forEach(c=>{s.includes(c)||(t.query?.select).push({field:c})})},ame=(t,e)=>t.dataViewParameters&&e.dataViewParameters&&Object.keys(e.dataViewParameters).length===Object.keys(t.dataViewParameters).length&&!Object.keys(t.dataViewParameters).some(n=>typeof e.dataViewParameters?.[n]=="string"?t.dataViewParameters?.[n]!==e.dataViewParameters?.[n]:!y.isEqual(t.dataViewParameters?.[n],e.dataViewParameters?.[n])),cme=(t,e)=>!t.dataViewParameters&&!e.dataViewParameters,lme=(t,e)=>Object.keys(t.filterConditions).length%Object.keys(e.filterConditions).length===0?!Object.keys(e.filterConditions).some(n=>t.filterConditions[n].lhs.field!==e.filterConditions[n]?.lhs.field):!1,ume=(t,e)=>lme(t.query?.filter,e.query?.filter)&&(ame(t,e)||cme(t,e)),dme=(t,e)=>{let{data:n}=e,{dataViewCallMap:o,filterDataOnClient:r}=t;Object.keys(o).forEach(i=>{o[i].resolve({data:r(i,n)})})},pme=t=>({combiner:sme,comparator:ume,separator:dme,...t}),W8=pme;var Gw=(t,e)=>{if(!(typeof window>"u"))try{window.sessionStorage.setItem(t,e)}catch{}},K8=(t,e="",n="IS_NULL")=>({comparator:n,lhs:{field:t},...e&&{rhs:{value:e}}}),qy=t=>t!=null&&typeof t=="object"&&!("then"in t),mme=(t=[],e={},n="")=>{if(!(t.length&&Object.keys(e)))return;let o={};return t.forEach((i,s)=>{let a=e[i],c;a?c=K8(i,a,"EQ"):c=K8(i);let l=`T${s+1}`;o[l]=c}),{logic:Object.keys(o).join(` ${n} `),filterConditions:o}},qw=class t{isInitialised;isQueryable;nonQueryableData;fetchedNQData;previousSearchText;totalRecordCount;fetchedRecordCount;pageNumber;parameters;enablePagination;columns;pageSize;maxResultsDisplay;matchPosition;ignoreCase;cache;keyCache;dataSourceMetaData;isNQDataFetchInProgress;fetchNQDataPromise;dataSource;context;associationFilter;propertyFilter;listType;bufferInitialized;constructor(e,n){this.isInitialised=!1,this.isQueryable=!0,this.dataSourceMetaData={},this.nonQueryableData=[],this.fetchedNQData=!1,this.previousSearchText=null,this.totalRecordCount=0,this.fetchedRecordCount=0,this.cache=new Map,this.keyCache=new Map,this.pageNumber=0,this.isNQDataFetchInProgress=!1,this.fetchNQDataPromise=null,this.dataSource="",this.bufferInitialized=!1,e&&(this.listType=e.listType,this.dataSource=e.dataSource,e.enablePagination?(this.enablePagination=e.enablePagination,this.pageSize=e.pageSize):this.maxResultsDisplay=e.maxResultsDisplay,this.parameters=e.parameters,this.columns=e.columns,this.matchPosition=e.matchPosition,this.ignoreCase=e.ignoreCase!==!1,this.dataSourceMetaData=e.dataSourceMetaData,this.context=n)}static searchResultsCache={};static init(e,n){return new Promise((o,r)=>{let i=e.columns.map(m=>m.value),s=Object.entries(e.parameters).map(([m,f])=>`${m}+${f}`),a=[...i,...s,e.matchPosition,e.maxResultsDisplay].join(d.HASH_DELIMITER),c=y.getHashedString(a),l=`${e.dataSource}_${c}`,u=`__dataviewmetadata__${e.dataSource}`,p=fn.getAppCacheKey(u);if(typeof window<"u"&&window.sessionStorage.getItem(p)){let m=JSON.parse(`${window.sessionStorage.getItem(p)}`);if(n&&t.searchResultsCache?.[n]?.[l])o(t.searchResultsCache[n][l]);else if(e.cacheLifeSpan!=="form"&&t.searchResultsCache?.persisted?.[l])o(t.searchResultsCache.persisted[l]);else{let f=new t(e,n);JSON.stringify(m.associationFilter)===JSON.stringify(e.associationFilter)?(f.dataSourceMetaData=m.dataSourceMetaData,f.isQueryable=m.isQueryable,f.isInitialised=m.isInitialised,f.associationFilter=m.associationFilter,t.initializeCache(n,e,l,f),o(f)):(f.associationFilter=e.associationFilter,f.propertyFilter=e.propertyFilter,f.fetchMetaData(n).then(g=>{Gw(p,JSON.stringify({isQueryable:g.data.isQueryable,dataSourceMetaData:g.data,isInitialised:!0,associationFilter:e.associationFilter})),f.isQueryable=g.data.isQueryable,f.dataSourceMetaData=g.data,f.isInitialised=!0,t.initializeCache(n,e,l,f),o(f)}).catch(g=>{f.isInitialised=!1,r(g)}))}}else if(e.deferDatasource&&$n(e.dataSource)){let m=new t(e,n),f=$n(e.dataSource);m.isQueryable=!!f?.isQueryable,m.isInitialised=!0,m.dataSourceMetaData=f,Gw(p,JSON.stringify({isQueryable:f?.isQueryable,dataSourceMetaData:f,isInitialised:!0})),m.context=n,t.initializeCache(n,e,l,m),o(m)}else{let m=new t(e,n);m.associationFilter=e.associationFilter,m.propertyFilter=e.propertyFilter,m.fetchMetaData(n).then(f=>{Gw(p,JSON.stringify({isQueryable:f.data.isQueryable,dataSourceMetaData:f.data,isInitialised:!0,associationFilter:e.associationFilter})),m.isQueryable=f.data.isQueryable,m.dataSourceMetaData=f.data,m.isInitialised=!0,t.initializeCache(n,e,l,m),o(m)}).catch(f=>{m.isInitialised=!1,r(f)})}})}static bufferedDataView=new G8;registerForBufferedCall(e){return this.isQueryable&&(this.initializeBufferCallsForDataPage(W8(e)),this.bufferInitialized=!0),this}static clearContextedCache(e){delete t.searchResultsCache[e]}static initializeCache(e,n,o,r){e&&n.cacheLifeSpan?.toLowerCase()==="form"?(t.searchResultsCache[e]===void 0&&(t.searchResultsCache[e]={}),t.searchResultsCache[e][o]=r):(t.searchResultsCache.persisted===void 0&&(t.searchResultsCache.persisted={}),t.searchResultsCache.persisted[o]=r)}fetchMetaData(e){return fn.getDataViewMetadata(this.dataSource,e,this.associationFilter,this.propertyFilter)}initializeBufferCallsForDataPage(e){let n=o=>sn.getDataAsync(this.dataSource,this.context,o.dataViewParameters,o.paging,o.query);t.bufferedDataView.addBufferedDataQueueForDataPage(this.dataSource,n,e.combiner,e.separator,e.comparator,e.waitTime,e.maxSize)}buildSchemaForQueryableBufferDP(e){return{...this.buildSchemaForQueryableDP(e),paging:void 0,filterDataOnClient:this.filterDataOnClient.bind(this)}}buildQueryWithKeys=(e,n,o)=>{let r=this.buildSelect(o),i=mme(e,n,"AND");return{select:r,...i&&{filter:i},...fn.isDistinctResultsOnly(r)&&{distinctResultsOnly:"true"}}};buildSchemaForQueryableDPWithKeys=(e,n,o)=>({dataViewParameters:this.parameters,query:this.buildQueryWithKeys(e,n,o),paging:this.buildPageOptions()});getRowDataByKeys=async(e,n,o)=>this.memoizedGetRowDataByKeys(e,n,o);buildKeyCacheKey(e,n,o){let r=e.map(s=>[s,n[s]??""]),i=o?.columns?.map(s=>s.value);return JSON.stringify({filterEntries:r,columns:i,pageNumber:this.pageNumber})}memoizedGetRowDataByKeys(e,n,o){let r=this.buildKeyCacheKey(e,n,o);(o?.invalidateCache||o?.purgeDataPageCache)&&this.keyCache.delete(r);let i=this.keyCache.get(r);if(i)return i;let s=this.isQueryable?this.buildSchemaForQueryableDPWithKeys(e,n,o):this.buildSchemaForNonQueryableDP(),c=sn.getDataAsync(this.dataSource,this.context,s.dataViewParameters,this.isQueryable?s.paging:void 0,this.isQueryable?s.query:void 0,{...o}).catch(l=>(this.keyCache.delete(r),Promise.reject(l)));return this.keyCache.set(r,c),c}getData(e,n){if(this.isQueryable){if(this.bufferInitialized)try{let r=this.buildSchemaForQueryableBufferDP(e);return t.bufferedDataView.getBufferedDataQueueForDataPage(this.dataSource).queueDataViewCall(r,e)}catch{let r=this.buildSchemaForQueryableDP(e,n);return sn.getDataAsync(this.dataSource,this.context,r.dataViewParameters,r.paging,r.query)}let o=this.buildSchemaForQueryableDP(e,n);return sn.getDataAsync(this.dataSource,this.context,o.dataViewParameters,o.paging,o.query,{...n})}return this.fetchNonQueryableResults(e,n)}getCachedResult(e,n){if(this.enablePagination&&qy(n)&&n.has(this.pageNumber))return n.get(this.pageNumber);let o=this.cache.get(e);if(!this.enablePagination&&o&&!qy(o))return o}handleCacheError(e,n){if(this.enablePagination){let o=this.cache.get(e);o&&qy(o)&&o.delete(this.pageNumber)}else this.cache.delete(e);return Promise.reject(n)}storeCacheResult(e,n){if(this.enablePagination){let o=this.cache.get(e);(!o||!qy(o))&&(o=new Map,this.cache.set(e,o)),o.set(this.pageNumber,n)}else this.cache.set(e,n)}isResultCached(e){if(!this.isInitialised||!this.isValidDatasource()||this.context&&!Up(this.context))return!1;let n=e.toLowerCase(),o=this.cache.get(n);return o?this.enablePagination?qy(o)&&o.has(this.pageNumber):!0:!1}memoizedGetData(e,n){let o=e?.toLowerCase(),r=this.cache.get(o);if(this.isResultCached(e)&&r){let c=this.getCachedResult(o,r);if(c)return c}let a=this.getData(e,n).catch(c=>this.handleCacheError(o,c));return this.storeCacheResult(o,a),a}fetchData(e,n=!1,o){return this.isValidDatasource()?this.context&&!Up(this.context)?Promise.resolve({data:[]}):this.isInitialised?(this.pageNumber=n?this.pageNumber:1,this.memoizedGetData(e??"",o)):Promise.reject(new Error):Promise.reject(new Error)}fetchPaginatedData(e){return this.pageNumber+=1,this.fetchData(e,!0)}fetchNonQueryableResults(e,n){if(e===void 0)return Promise.resolve({data:[]});if(this.fetchedNQData)return Promise.resolve({data:this.filterDataOnClient(e,this.nonQueryableData,n)});if(this.isNQDataFetchInProgress&&this.fetchNQDataPromise)return this.fetchNQDataPromise.then(()=>({data:this.filterDataOnClient(e,this.nonQueryableData,n)})).catch(o=>Promise.reject(o));if(this.dataSourceMetaData&&"structure"in this.dataSourceMetaData&&this.dataSourceMetaData.structure?.toLowerCase()==="list"){let o=this.buildSchemaForNonQueryableDP();return this.fetchNQDataPromise=sn.getDataAsync(this.dataSource,this.context,o.dataViewParameters,void 0,void 0,n),this.isNQDataFetchInProgress=!0,new Promise((r,i)=>{this.fetchNQDataPromise?.then(s=>(this.nonQueryableData=[...s.data],this.fetchedNQData=!0,r({data:this.filterDataOnClient(e,this.nonQueryableData,n)}))).catch(s=>i(s)).finally(()=>{this.isNQDataFetchInProgress=!1,this.fetchNQDataPromise=null})})}return Promise.resolve(null)}filterDataOnClient(e,n,o){let r=(o?.columns??this.columns)?.filter(i=>i.useForSearch).map(i=>i.value);return n.reduce((i,s)=>(r?.some(c=>{let l=t.resolveEmbeddedPath(c),u=y.getIn(s,l);return u!=null&&this.positionMatches(`${u}`,e,o)})&&i.push({...s}),i),[])}static resolveEmbeddedPath(e){return e.startsWith("!P!")||e.startsWith("!PL!")?e.substring(e.lastIndexOf("!")+1).replace(/:/g,"."):e}positionMatches(e,n,o){let r=o?.ignoreCase??this.ignoreCase,i=r?e.toLowerCase():e,s=r?n.toLowerCase():n;switch(o?.matchPosition??this.matchPosition){case"start":return i.startsWith(s);case"contains":return i.includes(s);case"equals":return i===s;default:return!1}}buildSelect(e){let n=[],o=[];return(e?.columns??this.columns)?.forEach(r=>{if(!o.includes(r.value)){o.push(r.value);let i={field:r.value};n.push(i)}}),n}buildFilters(e,n){let o=n?.matchPosition??this.matchPosition,r=n?.ignoreCase??this.ignoreCase,i={},s=0;(n?.columns??this.columns)?.forEach(c=>{if(c.useForSearch){let l=`F${s}`;s+=1;let u={field:c.value},p={value:e},m="CONTAINS";o==="start"?m="STARTS_WITH":o==="equals"&&(m="EQ");let f={...`${parseFloat(e)}`!==e&&{ignoreCase:r?"true":"false"},lhs:u,rhs:p,comparator:m};i[l]=f}});let a=Object.keys(i).join(" OR ");return{filterConditions:i,logic:a}}buildQuery(e,n){let o=this.buildSelect(n);return e?{select:o,filter:this.buildFilters(e,n),...fn.isDistinctResultsOnly(o)&&{distinctResultsOnly:"true"}}:{select:o,...fn.isDistinctResultsOnly(o)&&{distinctResultsOnly:"true"}}}buildPageOptions(){return this.enablePagination?{pageNumber:this.pageNumber,pageSize:this.pageSize}:{maxResultsToFetch:this.maxResultsDisplay}}buildSchemaForQueryableDP(e,n){return{dataViewParameters:this.parameters,query:this.buildQuery(e,n),paging:this.buildPageOptions()}}buildSchemaForNonQueryableDP(){return{dataViewParameters:this.parameters}}isValidDatasource(){return!!this.dataSource}},Vo=qw;var Ww=class t{refreshMap;propChangeRefreshMap;constructor(){this.refreshMap={},this.propChangeRefreshMap={}}static initializeRefreshCache(e,n,o,r,i){typeof e[n]>"u"&&(e[n]={}),e[n][o]=[{uniqueHash:r,callback:i}]}registerForRefresh(e,n,o,r,i){o=y.convertClipboardPageToPageRefNotation(o);let s=r.split("/").join(d.HASH_DELIMITER),a=y.getHashedString(s);e==="PROP_CHANGE"?this.propChangeRefreshMap?.[i]?.[o]?this.propChangeRefreshMap[i][o].some(l=>l.uniqueHash===a)||this.propChangeRefreshMap[i][o].push({uniqueHash:a,callback:n}):t.initializeRefreshCache(this.propChangeRefreshMap,i,o,a,n):this.refreshMap?.[i]?.[`${e}-${o}`]?this.refreshMap[i][`${e}-${o}`].some(l=>l.uniqueHash===a)||this.refreshMap[i][`${e}-${o}`].push({uniqueHash:a,callback:n}):t.initializeRefreshCache(this.refreshMap,i,`${e}-${o}`,a,n)}triggerPropChangeRefresh(e,n){let o=this.propChangeRefreshMap?.[n];if(!o)return!1;let r=Q.getPropertyValue(d.CONTEXT_DATA_MODAL_VIEW.CONTEXT_DATA_MODAL_VIEW,e,n),{interestPage:i=""}=r||{},s=u=>y.convertPageRefToClipboardPageNotation(u).replace(`${d.CASE_INFO?.CASE_INFO_CONTENT}${i}`,"");if(o[e]){let u=s(e);return o[e].forEach(p=>p.callback(u)),!0}let a=be.getContextReferences(n)?.get(e),c=a&&Q.resolveContextTreeNodeProps(a.props)||{},{contextPageRef:l}=c;if(l&&o[l]){let u=s(l);return o[l].forEach(p=>p.callback(u)),!0}for(let u of Object.keys(o)){let p;if(y.segmentsMatch(u,e)?p=e:l&&y.segmentsMatch(u,l)&&(p=l),p){let m=s(p);return o[u].forEach(f=>f.callback(m)),!0}}return!1}triggerRefreshForType(e,n,o){return e==="PROP_CHANGE"?this.triggerPropChangeRefresh(n,o):this.refreshMap?.[o]?.[`${e}-${n}`]?(this.refreshMap[o][`${e}-${n}`].forEach(r=>r.callback()),!0):!1}deRegisterForRefresh(e){delete this.propChangeRefreshMap[e],delete this.refreshMap[e]}},Bi=new Ww;var Kw=class{static cleanCaches(e){Nn.purgeCascadeFields(e),Lp.removeContext(e),Vo.clearContextedCache(e),w.cleanContextSubscribers(e),FA(e),be.removeContextTreeNode(e),It.clearContext(e),Bi.deRegisterForRefresh(e)}},Wy=Kw;var Jw="GET_DESCENDANTS",J8=t=>({type:Jw,payload:t});var Yw=class{runtimeParams;runtimeParamsMap;constructor(){this.runtimeParams={},this.runtimeParamsMap={}}setRuntimeParams(e){this.runtimeParams=e}getRuntimeParams(){return this.runtimeParams}setRuntimeParam(e,n){this.runtimeParamsMap[e]=n}getRuntimeParam(e){return this.runtimeParamsMap[e]}},sc=new Yw;var Zw=class{MISSING_CONTEXT_PARAM="context is required parameter";INVALID_CONTEXT_DETAILS="Invalid Context";INVALID_CONTEXT_OPERATION="Invalid Operation on Given Context";schedulePendingActionOnCompletion(e,n){let o=[],r=n.context_data?.blocking_action_counter??0,i=n.context_data?.deferred_action_queue?[...n.context_data.deferred_action_queue]:[],s=n.context_data?.is_deferred_action_in_progress??!1;if(r<=0){if(s)o.push({type:Pn,payload:{context:e,data:{context_data:{is_deferred_action_in_progress:!1}}}});else if(i.length>0){let a=i.shift();s=!s,o.push({type:Pn,payload:{context:e,data:{context_data:{deferred_action_queue:i,blocking_action_counter:r,is_deferred_action_in_progress:s}}}}),a&&o.push(a)}else return;v(o)}}executeOrQueueDeferredAction(e){if(!e?.payload?.context)return Promise.reject(new Error("Action Context is Mandatory Field."));let n=J(e?.payload?.context);if(n){let o=[],r=n.context_data?.blocking_action_counter??0,i=n.context_data?.deferred_action_queue?[...n.context_data.deferred_action_queue]:[],s=n.context_data?.is_deferred_action_in_progress??!1;return i.length<=0&&!s&&(r<=0?(o.push(e),s=!s):i.push(e),o.unshift({type:Pn,payload:{context:e.payload.context,data:{context_data:{deferred_action_queue:i,blocking_action_counter:r,is_deferred_action_in_progress:s}}}}),v(o)),Promise.resolve()}return Promise.reject(new Error(this.INVALID_CONTEXT_DETAILS))}handleDeferredActionCompletion(e){if(!e)return Promise.reject(new Error(this.MISSING_CONTEXT_PARAM));let n=J(e);return n&&n.context_data?.is_deferred_action_in_progress===!0?(v({type:Pn,payload:{context:e,data:{context_data:{is_deferred_action_in_progress:!1}}}}),this.schedulePendingActionOnCompletion(e,n),Promise.resolve()):Promise.reject(new Error(this.INVALID_CONTEXT_DETAILS))}registerBlockingAction(e){return e?J(e)?(v({type:Uc,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));let n={...J(e)};return n.context_data={...n.context_data},n&&n.context_data?.blocking_action_counter>0?(v({type:Uc,payload:{context:e,isInitiateBlockingAction:!1}}),n.context_data.blocking_action_counter-=1,this.schedulePendingActionOnCompletion(e,n),Promise.resolve()):Promise.reject(new Error(this.INVALID_CONTEXT_OPERATION))}cancelDeferredActionsOnError(e){if(!e)return;let n=J(e);if(n){let o={...n};o.context_data={...o.context_data},o.context_data?.deferred_action_queue&&y.rejectPendingActions(o.context_data.deferred_action_queue)&&(o.context_data.deferred_action_queue=[]),o.context_data?.blocking_action_counter&&(o.context_data.blocking_action_counter=0),o.context_data?.is_deferred_action_in_progress&&(o.context_data.is_deferred_action_in_progress=!1),v({type:Pn,payload:{context:e,data:{...o}}}),Gr.disableLoadingIndicator({context:e})}}isDeferredActionInProgress(e){if(!e)return Promise.reject(new Error(this.MISSING_CONTEXT_PARAM));let n=J(e);return!!(n&&n.context_data?.is_deferred_action_in_progress===!0)}},fme=new Zw,vt=fme;var Y8=(t,e)=>{let n={},o=Fi.getLookUpDataPage(t),r=Fi.getDataPageKeys(o);if(r)for(let i of r)n[i.keyName]=i.isAlternateKeyStorage?e[i.linkedField]:e[i.keyName];return{dataViewParameters:n,dataPageID:o,dataPageKeys:r}},Z8=(t,e)=>{let n=Fi.getSavableDataPage(t),o=Fi.getDataPageKeys(n);return o?.forEach(r=>{r.isAlternateKeyStorage&&(r.keyName===r.linkedField||Object.keys(e).includes(r.linkedField))?r.keyName=e[r.linkedField]:r.isAlternateKeyStorage&&Object.keys(e).includes(r.keyName)&&r.keyName!==r.linkedField?(e[r.linkedField]=e[r.keyName],delete e[r.keyName]):r.keyName=e[r.keyName]}),{keys:e,dataPageID:n,dataPageKeys:o}},Q_=t=>{w.publish(A.PUB_SUB_EVENTS.EVENT_CANCEL,t)},gme=t=>{if(t.includes(d.ACTIONAREA))return!0;let e=cc(t);return!!se(`${e}/${d.ACTIONAREA}`)?.includes(d.ACTIONAREA)},hme=(t,e,n)=>G.shouldUseUnifiedHandling()||gme(t)?Ko:Nj(e,n??!1),Q8=(t,e,n)=>{let{callbacks:o}=n;return n.callbacks=null,t(e,n).then(r=>{r==="cancel"?o?.cancel?.():o?.submit?.()})},yme=t=>{let e=G.shouldUseUnifiedHandling();return G.isExternalCaseType(t)?nv:G.isExternalObject(t)?e?nv:G2:e?ua:G.isObjectCaseType(t)?V2:ua},Sme=t=>!G.shouldUseUnifiedHandling()&&(t.type==="Object"||G.isObjectCaseType(t?.caseClassName||"")||globalThis.location?.href?.includes("/objects/"))?H2:is,X8=(t,e,n)=>!n&&e===d.ACTION?t.getValue(A.CASE_INFO.ASSIGNMENTACTION_ID):t.getValue(A.CASE_INFO.ACTIVE_ACTION_ID),Eme=(t,e)=>{let n=t.getValue(A.CASE_INFO.IS_LOCAL_ACTION),o=t.getValue(A.CASE_INFO.ASSIGNMENT_ID),r=X8(t,e,n);if(e===d.ACTION&&(!r||!n&&!o)){let i=w8(t.getContextName());i&&(!o&&!r&&(n=i.isLocalAction),o=o||i.assignmentID,r=r||(n?i.activeActionID:i.assignmentActionID))}return{localAction:n,assignmentID:o,actionID:r}},Qw=class{MSG_CLASSNAME_REQUIRED="className is required parameter";MSG_CLASSNAME_STRING="className must be a string";MSG_ACTION_ID_REQUIRED="actionID is required parameter";MSG_ACTION_ID_STRING="actionID must be a string";MSG_ACTION_NAME_REQUIRED="actionName is required parameter";MSG_ACTION_NAME_STRING="actionName must be a string";MSG_KEY_PROPERTIES_REQUIRED="keyProperties is required parameter";MSG_DATAVIEWID_REQUIRED="dataViewID is required parameter";MSG_DATAVIEWID_STRING="dataViewID must be a string";MSG_CONTAINERITEMID_REQUIRED="containerItemID is required parameter";MSG_CONTAINERITEMID_STRING="containerItemID must be a string";MSG_PAGENAME_REQUIRED="pageName is required parameter";MSG_PAGENAME_STRING="pageName must be string";MSG_INSIGHTID_REQUIRED="insightID is required parameter";MSG_DASHBOARDID_REQUIRED="DashboardID is required parameter";MSG_ACTIVE_SUGGESTION_UNATTENDED="You must accept or decline autofilled fields.";MSG_CASE_ID_REQUIRED="caseID is required parameter";MSG_CONTEXT_STRING="context must be string";MSG_SUBSCRIPT_VIEW_REQUIRED="subscriptView is required";c11nEnv;constructor(e){this.c11nEnv=e}shouldDeleteCaseInCreateStage=(e,n,o)=>!e&&n||o;getCaseID=e=>e.caseID||this.c11nEnv.getValue(d.getProperty(A.CASE_INFO.CASE_INFO_ID))||e?.links?.open?.href?.split("/")?.[2];getSaveActionPayload=(e,n=!1,o=!1)=>{let r=e,i=r&&r.includes(d.MODAL),s=this.c11nEnv.getValue(A.CASE_INFO.CASE_INFO_ID),a=this.c11nEnv.getValue(A.CASE_INFO.ASSIGNMENT_ID),c=this.c11nEnv.getValue(A.CASE_INFO.ACTIVE_ACTION_ID)?this.c11nEnv.getValue(A.CASE_INFO.ACTIVE_ACTION_ID):this.c11nEnv.getValue(A.CASE_INFO.ASSIGNMENTACTION_ID),l=this.c11nEnv.getContainerName(),u=this.c11nEnv.getValue(A.CASE_INFO.CASE_TYPE_ID),p=n?void 0:Fn(this.c11nEnv.getContextName()),m=this.c11nEnv.getValue("isProcessAction","isProcessAction");return Ve.buildActionObject({context:r,containerItemID:e,assignmentID:a,actionID:c,caseID:s,containerName:l,caseType:u,isModalAction:i,isFormValid:p,isProcessAction:m,saveOnly:n,autosave:o},this.c11nEnv)};actionsApiPromise=(e,n,o=!0)=>{let r="";n&&n.actionMgrID!==null?r=n.actionMgrID||"":r=M.getNextActionMgrId();let i,s,a=new Promise((c,l)=>{i=c,s=l});if(i&&s)M.register(r,a,i,s,e,n,o);else throw new Error("resolveFn or rejectFn is not defined.");return{actionMgrID:r,promise:a}};showDataObjectCreateView(e,n=A.VIEW_NAMES.DATA_OBJECT_CREATE_VIEW){let o=Ve.buildActionObject({viewName:n,className:e},this.c11nEnv),r=Un,{promise:i}=this.actionsApiPromise(r,o);return v({type:r,payload:{...o,containerName:A.MODAL,skipSemanticUrl:!0,isCreateDataObject:!0}}),i}cancelDataObject(e){if(!e)return Promise.reject(new Error("containerItemId is required parameter"));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));let n=e,o=jn(n),r=ie(d.CASE_INFO.CASE_INFO_ID,"",n),i=ie(d.CASE_INFO.ASSIGNMENT_ID,"",n);if(!o)return new kp(this.c11nEnv).removeContainerItem({containerItemID:e,skipReleaseLockRequest:!0});let s=ku,a=Ve.buildActionObject({containerItemID:e,context:n},this.c11nEnv),c=n&&n.includes(d.MODAL);v({type:s,payload:{...a,isModalAction:c,isDataObject:!0,skipReleaseLockRequest:!0}});let{promise:l}=this.actionsApiPromise(s,a);return l.then(()=>{Q_({caseID:r,assignmentID:i,context:n})})}createDataObject(e){if(!e)return Promise.reject(new Error("containerItemID is required parameter"));let{data:n}=we()?.getState()||{},o=n[e]?.dataInfo?.content?.classID;if(!o)return Promise.reject(new Error(d.DATA_CLASS_NOT_FOUND));if(ac(A.VIEW_NAMES.SUBSCRIPT_CREATE_VIEW)){let u=this.handleSubscript.call(this,e,this.c11nEnv);if(u)return u}let i=Fi.getSavableDataPage(o),s=ju,a=!!e&&e.includes(d.MODAL),c=Ve.buildActionObject({containerItemID:e,dataPageID:i},this.c11nEnv),{promise:l}=this.actionsApiPromise(s,c);return v(J_({...c,isModalAction:a,isFormValid:Fn(e)})),l}deleteDataObject(e,n){if(!e)return Promise.reject(new Error("className is required parameter"));if(!n)return Promise.reject(new Error("keys is required parameter"));let o=PE,r=Fi.getSavableDataPage(e),i=Fi.getDataPageKeys(r),s={};if(i)for(let l of i)s[l.keyName]=l.isAlternateKeyStorage?n[l.linkedField]:n[l.keyName];let a=Ve.buildActionObject({dataViewName:r,dataViewParameters:s},this.c11nEnv),{promise:c}=this.actionsApiPromise(o,a);return v(k8({...a})),c}getDataObjectView(e,n,o={viewName:"",readOnly:!1,actionName:""}){if(!e)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(!n)return Promise.reject(new TypeError(this.MSG_KEY_PROPERTIES_REQUIRED));if(typeof n!="object")return Promise.reject(new TypeError("keyProperties must be a object"));let r=NE,{dataPageID:i,dataViewParameters:s}=Y8(e,n),a=Ve.buildActionObject({dataLookUp:i,keyProperties:n,requestPayload:s,viewName:o.viewName||A.VIEW_NAMES.DATA_OBJECT_EDIT_VIEW,containerName:d.MODAL,readOnly:o.readOnly,actionName:o.actionName},this.c11nEnv),{promise:c}=this.actionsApiPromise(r,a);return v(Y_({...a})),c}updateDataObject(e,n){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if(!n)return Promise.reject(new Error("keys is required parameter"));let{data:o}=we()?.getState()||{},r=o[e]?.dataInfo?.content?.classID;if(!r)return Promise.reject(new Error(d.DATA_CLASS_NOT_FOUND));let{dataPageID:i,keys:s}=Z8(r,n),a=Fu,c=e&&e.includes(d.MODAL),l=Ve.buildActionObject({containerItemID:e,dataPageID:i,key:s},this.c11nEnv),u=o[e]?.caseInfo?.headers?.etag,{promise:p}=this.actionsApiPromise(a,l);return v(Z_({...l,isModalAction:c,isFormValid:Fn(e),etag:u})),p}updateDataObjectFields(e,n,o,r={}){if(!e)return Promise.reject(new Error(this.MSG_DATAVIEWID_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_DATAVIEWID_STRING));if(!n||Object.keys(n).length===0)return Promise.reject(new Error(this.MSG_KEY_PROPERTIES_REQUIRED));let{etag:i,context:s=this.c11nEnv.getContextName()}=r,{restApi:a,reqType:c}=F(vE,{data_view_ID:e});return k(a,{method:c,headers:i?{"if-match":i}:{},body:{data:{...o,...n},pageInstructions:[]}},s)}openDataObjectAction(e,n,o,r,i){if(!e)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(!n)return Promise.reject(new TypeError(this.MSG_KEY_PROPERTIES_REQUIRED));if(typeof n!="object")return Promise.reject(new TypeError("keyProperties must be a object"));if(!o)return Promise.reject(new Error(this.MSG_ACTION_ID_REQUIRED));if(!r)return Promise.reject(new Error(this.MSG_ACTION_NAME_REQUIRED));let s=OE,{dataViewParameters:a,dataPageID:c,dataPageKeys:l}=Y8(e,n),u=Ve.buildActionObject({actionID:o,actionName:r,dataViewParameters:a,lookupDatapage:c,containerName:i?.containerName||d.MODAL,dataViewPayload:l,context:this.c11nEnv.getContextName()},this.c11nEnv),{promise:p}=this.actionsApiPromise(s,u);return v({type:s,payload:{...u}}),p}submitDataObjectAction(e,n,o,r){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));if(!n)return Promise.reject(new Error(this.MSG_KEY_PROPERTIES_REQUIRED));if(!o)return Promise.reject(new Error(this.MSG_ACTION_ID_REQUIRED));let{data:i}=we()?.getState()||{},s=i[e]?.dataInfo?.content?.classID;if(!s)return Promise.reject(new Error(d.DATA_CLASS_NOT_FOUND));let a=r?.jsActionQueryParams,c=cc(e),l=re(c),u=Ze(l,c)||{},{resourceType:p="",key:m=""}=u,f=cs,{dataPageID:g,keys:h}=Z8(s,n),E=Ve.buildActionObject({containerItemID:e,actionID:o,resourceType:p,key:m,keys:h,savableDatapage:g,containerName:d.MODAL,context:e,jsActionQueryParams:a},this.c11nEnv);E.context=e;let C=i[e]?.caseInfo?.headers?.etag,{promise:I}=this.actionsApiPromise(f,E);return v({type:f,payload:{...E,isFormValid:Fn(e),etag:C}}),I}createWork(e,n={flowType:"",containerName:"",openCaseViewAfterCreate:!1,modalOptions:{dockable:!1},startingFields:Object,remoteCaseMeta:{},channelName:""}){if(!e)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(e=ce.getRemoteCaseClassBySourceClass(e)??e,window.pms?.plugins?.c11n?.createWork)return window.pms.plugins.c11n.createWork(e,O.getDefaultQualifiedName("pyStartCase"),n);let{dockable:o=!1}=n?.modalOptions||{},r=n.theType?n.theType:yme(e),i=Ve.buildActionObject({class:e,flowType:O.getDefaultQualifiedName("pyStartCase"),containerName:d.PRIMARY,openCaseViewAfterCreate:!0,...n,theType:r,modalOptions:{isDockable:o}},this.c11nEnv),{promise:s}=this.actionsApiPromise(r,i);if(i.headers={...i.headers},n.channelName?i.headers[d.X_ORIGIN_CHANNEL]=n.channelName:T.isWSSPortal()&&(i.headers[d.X_ORIGIN_CHANNEL]="WSS"),r=this.handleRemoteCaseForCreateWork(e,i,r),en.getPreviewMode()){i.debugInfo={debugId:y.generateUniqueID()};let a=Ge.getCoreHeadersFromContext(i?.context||""),c=String(a?.debugInfo?.[d.COREHEADER_APP_DEBUG_ID]||"");c&&r!==ua&&(i.debugInfo={debugId:c})}return v({type:r,payload:{...i}}),s}handleRemoteCaseForCreateWork(e,n,o){if(ce.isRemoteCase(e)){let{RemoteClassName:r,RemoteSystemID:i,name:s}=ce.getRemoteCase(e);if(n.className=e,n.class=r,M.setRemoteCaseHeaderByContext(n,i),ce.isTraditionalRemoteCase(e)||ce.isRemoteCaseVersionDifferent(e)){let a={className:e,name:s,action:pf,remoteClassName:r};return M.setTraditionalRemoteCaseParams(n,a)}}return o}createCase(e,n={}){return this.createWork(e,{...n,theType:"CREATE_WORK"})}getDataObjectActions(e,n){if(!e)return Promise.reject(new Error(this.MSG_DATAVIEWID_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_DATAVIEWID_STRING));let o=EE,r=Ve.buildActionObject({dataViewID:e,dataViewParameters:n},this.c11nEnv),{promise:i}=this.actionsApiPromise(o,r);return v({type:o,payload:{...r}}),i}getDescendants(e,n){if(!e)return Promise.reject(new Error(this.MSG_CASE_ID_REQUIRED));if(typeof n!="string")return Promise.reject(new TypeError(this.MSG_CONTEXT_STRING));let o=n||this.c11nEnv.getContextName(),r=_2,i=Ve.buildActionObject({caseID:e,currentContext:o},this.c11nEnv),{promise:s}=this.actionsApiPromise(r,i),a=J8({...i,context:o});return v(a),s}openWorkByHandle(e,n,o={}){if(!e)return Promise.reject(new Error("workID is required parameter"));if(typeof e!="string")return Promise.reject(new TypeError("workID must be a string"));if(!n)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if(typeof n!="string")return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(n=ce.getRemoteCaseClassBySourceClass(n)??n,window.pms?.plugins?.c11n?.openWorkByHandle)return window.pms.plugins.c11n.openWorkByHandle(e,n);let r={insKey:e,acTargetName:o.targetContainer||d.PRIMARY,containerName:o.targetContainer||d.PRIMARY},i=G.shouldUseUnifiedHandling()||!G.isObjectCaseType(n)?Po:B2,s=Ve.buildActionObject(r,this.c11nEnv),{promise:a}=this.actionsApiPromise(i,s);return s.headers={...s.headers},o.channelName?s.headers[d.X_ORIGIN_CHANNEL]=o.channelName:T.isWSSPortal()&&(s.headers[d.X_ORIGIN_CHANNEL]="WSS"),s.className=n,ce.isRemoteCase(n)&&(i=this.setRemoteCaseParamsForOpenCase(s,n,i,o.remoteCaseMeta)),en.getPreviewMode()&&o.targetContainer!==d.WORKAREA&&(s.debugInfo={debugId:y.generateUniqueID()}),v({type:i,payload:{...o,...s}}),a}setRemoteCaseParamsForOpenCase(e,n,o,r={}){let{RemoteSystemID:i,RemoteClassName:s,name:a}=ce.getRemoteCase(n);if(M.setRemoteCaseHeaderByContext(e,i),e.isRemoteCase=!0,e.remoteCaseClass=n,e.remoteCaseMeta=r,ce.isTraditionalRemoteCase(n)||ce.getRemoteAppPlatformVersion(i??"")){let c={className:n,name:a,action:ME,remoteClassName:s};return M.setTraditionalRemoteCaseParams(e,c)}return o}openAssignment(e,n,o={isActionFromToDoList:!1,isChild:!1,context:"",viewType:"",skipBrowserSemanticUrlUpdate:!1,containerName:"",channelName:"",remoteCaseMeta:{}}){if(!e)return Promise.reject(new Error("assignmentID is required parameter"));if(typeof e!="string")return Promise.reject(new TypeError("assignmentID must be a string"));if(!n)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if(typeof n!="string")return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(n=ce.getRemoteCaseClassBySourceClass(n)??n,window.pms?.plugins?.c11n?.openAssignment)return window.pms.plugins.c11n.openAssignment(e,n);let r={assignmentID:e,doDeleteCaseSummary:!0,containerName:o.containerName,isActionFromToDoList:o.isActionFromToDoList,isChild:!1,...o.renderInline!==void 0&&{renderInline:o.renderInline},...o.pageName!==void 0&&{pageName:o.pageName}};o.isChild&&(r.containerName=d.PRIMARY,r.isChild=o.isChild);let i=ic,s=Ve.buildActionObject(r,this.c11nEnv),{promise:a}=this.actionsApiPromise(i,s);if(s.headers=s.headers||{},o.channelName?s.headers[d.X_ORIGIN_CHANNEL]=o.channelName:T.isWSSPortal()&&(s.headers[d.X_ORIGIN_CHANNEL]="WSS"),ce.isRemoteCase(n)){let{RemoteClassName:l,RemoteSystemID:u,name:p}=ce.getRemoteCase(n);if(M.setRemoteCaseHeaderByContext(s,u),s.remoteCaseMeta=o.remoteCaseMeta,ce.isTraditionalRemoteCase(n)||ce.getRemoteAppPlatformVersion(u??"")){let m={className:n,name:p,action:wE,remoteClassName:l};i=M.setTraditionalRemoteCaseParams(s,m)}}s.className=n,s.activeItemCaseViewMode=this.c11nEnv.getValue("context_data.caseViewMode"),en.getPreviewMode()&&![d.WORKAREA].includes(o.containerName)&&(s.debugInfo={debugId:y.generateUniqueID()});let c={context:s.context||o.context,containerName:s.containerName||o.containerName,targetContainerName:s.containerName||o.containerName,viewType:s.viewType||o.viewType,skipBrowserSemanticUrlUpdate:o.skipBrowserSemanticUrlUpdate};return v({type:i,payload:{...s,...c}}),a}finishAssignment(e,n={outcomeID:"",jsActionQueryParams:{}}){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));e.endsWith(d.ACTIONAREA)&&(e=se(e)||e);let o=de(e),r=o;if(o?.includes(`/${d.WORKAREA}`)&&(r=o.substring(0,r?.lastIndexOf(`/${d.WORKAREA}`))),$V(o)){let oe=[{type:"error",message:this.c11nEnv.getLocalizationService().getLocalizedMessage(this.MSG_ACTIVE_SUGGESTION_UNATTENDED)}];return Hr({messages:oe,context:r,category:A.PAGE}),Promise.reject({type:A.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR})}let i=n?.isTriggeredFromDifferentContext,{caseID:s,assignments:a,localActionID:c,caseActions:l,caseInfo:u,businessID:p,caseTypeID:m,caseTypeName:f}=lR(e,this.c11nEnv,{isTriggeredFromDifferentContext:i}),g=on(u),h=!1,E,C=l?.find(oe=>oe.ID===c);C?h=C?.type==="Case":E=J(o);let{assignmentID:I}=lR(e,this.c11nEnv,{isTriggeredFromDifferentContext:i});E?.context_data?.actionType&&(h=E.context_data.actionType===d.CASE,I=I||E.context_data.assignmentID);let _=Pj(a,I,c,u?.activeActionID),[P,N]=s.split(" "),z={class:P,actionID:_,assignmentID:I,caseID:s,workID:N,containerName:this.c11nEnv.getContainerName(),containerItemID:e,isCaseWideAction:h,doDeleteCaseSummary:!0,isInCreateStage:g,businessID:p,caseTypeID:m,caseTypeName:f};e?.includes(d.MODAL)&&(z.containerName=d.MODAL,z.isModalAction=!0),z.outcome=n.outcomeID,z.jsActionQueryParams=n.jsActionQueryParams,u?.isLocalAction&&(z.viewType=mt.FORM);let H=hme(e,m,u?.isObjectWideAction),ne=Ve.buildActionObject(z,this.c11nEnv);ne.context=o;let{promise:j}=this.actionsApiPromise(H,ne);return ne.isProcessAction=this.c11nEnv.getValue("isProcessAction","isProcessAction")||J(o).context_data.isProcessAction,ne.headers??={},T.isWSSPortal()&&(ne.headers[d.X_ORIGIN_CHANNEL]="WSS"),vt.executeOrQueueDeferredAction({type:H,payload:{...ne,context:o}}),j}getNextWork(e={}){if(T.getRenderingMode()==="HYBRID")return w.publish(A.PUB_SUB_EVENTS.CASE_EVENTS.GET_NEXT_WORK,{userIdentifier:T.getOperatorIdentifier()}),Promise.resolve();let n=ic,o=Ve.buildActionObject({...e,containerName:d.PRIMARY,isGetNextWork:!0},this.c11nEnv),{promise:r}=this.actionsApiPromise(n,o);return v({type:n,payload:{...o}}),r}openStage(e){if(!e)return Promise.reject(new Error("stageID is required parameter for openStage"));let n=ic,o=this.c11nEnv.getValue(A.CASE_INFO.CASE_INFO_ID),r=this.c11nEnv.getCaseSummary().headers,i=Ve.buildActionObject({containerName:this.c11nEnv.getContainerName(),isOpenStage:!0,stageID:e},this.c11nEnv),{promise:s}=this.actionsApiPromise(n,i),a={type:n,payload:{...i,caseID:o,headers:r}};return v(a),s}submitBulkAction(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));let n=yE,o=this.c11nEnv.getValue(A.CASE_INFO.CASES),r=this.c11nEnv.getValue(A.CASE_INFO.ACTIVE_ACTION_ID),i=this.c11nEnv.getValue(A.CASE_INFO.IS_ASSIGNMENT),s={containerName:this.c11nEnv.getContainerName(),containerItemID:e,isCaseWideAction:!0,doDeleteCaseSummary:!0,isInCreateStage:!1};e&&e.includes(d.MODAL)&&(s.containerName=d.MODAL,s.isModalAction=!0);let a=Ve.buildActionObject(s,this.c11nEnv),c=de(e);a.context=c;let{promise:l}=this.actionsApiPromise(n,a);return v({type:n,payload:{...a,context:c,cases:o,actionID:r,isAssignment:i,isFormValid:Fn(c),classID:this.c11nEnv.getCurrentClassID()}}),l}submitBulkActionAsync(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));let n=SE,o=this.c11nEnv.getValue(A.CASE_INFO.CASES),r=this.c11nEnv.getValue(A.CASE_INFO.ACTIVE_ACTION_ID),s={containerName:e.includes(d.MODAL)?d.MODAL:this.c11nEnv.getContainerName(),containerItemID:e,isCaseWideAction:!0,doDeleteCaseSummary:!0,isInCreateStage:!1,isModalAction:e.includes(d.MODAL)},a=Ve.buildActionObject(s,this.c11nEnv),c=de(e);a.context=c;let{promise:l}=this.actionsApiPromise(n,a);return v({type:n,payload:{...a,context:c,cases:o,actionID:r,isFormValid:Fn(c),classID:this.c11nEnv.getCurrentClassID()}}),l}openBulkAction(e,n){if(!e)return Promise.reject(new Error("actionID is required parameter for openBulkAction"));if(typeof e!="string")return Promise.reject(new TypeError("actionID must be a string openBulkAction"));if(window.pms?.plugins?.c11n?.openBulkAction){let{callbacks:u}=n;return n.callbacks=null,window.pms.plugins.c11n.openBulkAction(e,n).then(p=>{p==="cancel"?u?.cancel?.():u?.submit?.()})}let{selectedList:o,runningMode:r}=n,i=n.type,s={selectedList:o,vcName:n.target,actionName:n?.name,actionID:e,doDeleteCaseSummary:!0,localActionType:i,runningMode:r,...n},a=b2,c=Ve.buildActionObject(s,this.c11nEnv),{promise:l}=this.actionsApiPromise(a,c);return v({type:a,payload:{...c}}),l}cancelBulkAction(e){return e?typeof e!="string"?Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING)):new kp(this.c11nEnv).removeContainerItem({containerItemID:e,skipReleaseLockRequest:!0}):Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED))}approveCase(e){return e?typeof e!="string"?Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING)):(v({type:Pt,payload:{reference:A.CASE_INFO.APPROVALFLAG,value:d.APPROVED,context:e}}),this.finishAssignment(e)):Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED))}rejectCase(e){return e?typeof e!="string"?Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING)):(v({type:Pt,payload:{reference:A.CASE_INFO.APPROVALFLAG,value:d.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(typeof e!="string")return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));let[,n]=this.c11nEnv.getValue(A.CASE_INFO.DUPLICATECASEINSKEY).split(" "),o={type:Pt,payload:{reference:A.CASE_INFO.DUPLICATECASEFLAG,value:d.DUPLICATE,context:e}},r={type:Pt,payload:{reference:A.CASE_INFO.DUPLICATECASEID,value:n,context:e}};return v([o,r]),this.finishAssignment(e)}ignoreDuplicateCase(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));let n={type:Pt,payload:{reference:A.CASE_INFO.DUPLICATECASEFLAG,value:d.IGNORE,context:e}},o={type:Pt,payload:{reference:A.CASE_INFO.DUPLICATECASEID,value:"",context:e}},r={type:Pt,payload:{reference:A.CASE_INFO.DUPLICATECASEINSKEY,value:"",context:e}};return v([n,o,r]),this.finishAssignment(e)}openLocalAction(e,n){if(!e)return Promise.reject(new Error(this.MSG_ACTION_ID_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_ACTION_ID_STRING));let o=this.getCaseID(n);if(window.pms?.plugins?.c11n?.openLocalAction)return n.caseID=o,Q8(window.pms.plugins.c11n.openLocalAction,e,n);let r=n.assignKey||this.c11nEnv.getValue(A.CASE_INFO.ASSIGNMENT_ID),i=n.type,s={caseID:o,assignmentID:r,vcName:n.target,actionName:n?.name,assignKey:r,actionID:e,doDeleteCaseSummary:!0,localActionType:i,...n},a=n.containerName===d.ACTIONAREA?is:Sme(n),c=Ve.buildActionObject(s,this.c11nEnv);(n.containerName===d.ACTIONAREA||n.containerName===d.WORKAREA)&&(c.skipMergeAssignmentsAndActions=!1);let{promise:l}=this.actionsApiPromise(a,c),u=this.c11nEnv.getContextName(),p=Ke(u)[0],m;if(m=se(p),m?.includes("actionarea")&&a===is)return v({type:a,payload:{...c}}),l;if(n.type==="Object")return v({type:a,payload:{...c}}),l;let f=se(p),g=this.c11nEnv.getValue(d.getProperty(A.CASE_INFO.CASE_INFO_ID)),E=o!==g&&f?ce.getRemoteHeaderByContext(f)||ce.getRemoteHeaderByContext(u):ce.getRemoteHeaderByContext(u);if(M.setRemoteCaseHeaderByContext(c,E),!p)return m=u,v({type:a,payload:{...c,contextName:u,continueExecution:!1}}),l;let{continueExecution:C,containerItemID:I}=zp(u,o,p);if(m=I,!C||m&&we()?.getState()?.data[m]?.context_data?.caseViewMode==="review")return v({type:a,payload:{...c,contextName:u,continueExecution:C}}),l;let _=m,P=_&&_.includes(d.MODAL),N=n.assignKey||this.c11nEnv.getValue(A.CASE_INFO.ASSIGNMENT_ID),z=J(m),H=z?.caseInfo?.assignments?z.caseInfo.assignments[0]?.actions[0]?.ID:void 0,ne=o,j=se(p),oe=In(re(j)),Ae=J(j),he=oe&&Ae;he&&(ne=Ae?.caseInfo?.ID,N=Ae?.caseInfo?.assignments[0]?.ID,H=Ae?.caseInfo?.assignments[0]?.actions[0]?.ID);let Oe=this.c11nEnv.getContainerName(),He=this.c11nEnv.getValue(A.CASE_INFO.CASE_TYPE_ID),_e=!0,Xe=this.c11nEnv.getValue("isProcessAction","isProcessAction"),De=Ve.buildActionObject({context:_,containerItemID:he?j:m,assignmentID:N,actionID:H,caseID:he?ne:o,containerName:Oe,caseType:He,isModalAction:P,isFormValid:_e,isProcessAction:Xe},this.c11nEnv);De.context=he?j:m;let Et=de(m),an=this.c11nEnv.getCaseSummary(),vn=on(an),cn=Ve.buildActionObject({caseID:o,containerItemID:m,cancelContext:Et},this.c11nEnv),br={};return P?(cn.acTargetName=d.MODAL,cn.isInCreateStage=vn,cn.isModalAction=P,br={...cn}):br={...cn,acName:X(this.c11nEnv.getContainerName(),cn.context)},v({type:a,payload:{...c,contextName:u,saveActionPayload:De,cancelActionPayload:br,continueExecution:C}}),l}openProcessAction(e,n){if(!e)return Promise.reject(new Error(this.MSG_ACTION_ID_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_ACTION_ID_STRING));let o=this.c11nEnv.getValue(A.CASE_INFO.CASE_INFO_ID)||n.caseID;if(window.pms?.plugins?.c11n?.openProcessAction)return n.caseID=o,Q8(window.pms.plugins.c11n.openProcessAction,e,n);let r=this.c11nEnv.getValue(A.CASE_INFO.ASSIGNMENT_ID)||n.assignKey,i=n.type,s={caseID:o,assignmentID:r,vcName:n.target,actionName:n?.name,assignKey:r,actionID:e,doDeleteCaseSummary:!0,processActionType:i,isProcessAction:!0,...n},a=W_,c=Ve.buildActionObject(s,this.c11nEnv),l=this.c11nEnv.getContextName(),u=Ke(l)[0],p=ce.getRemoteHeaderByContext(l);if(!p&&u){let g=gt(u);g?.accessedOrder.forEach(h=>{(n.caseID||o)===g.items[h].key&&(p=ce.getRemoteHeaderByContext(g.items[h].context))})}M.setRemoteCaseHeaderByContext(c,p);let{promise:m}=this.actionsApiPromise(a,c),{containerItemID:f}=zp(l,o,u);return v({type:a,payload:{...c,saveContainerItemID:f}}),m}navigateToStep(e,n){if(!e)return Promise.reject(new Error("stepID is required parameter"));if(typeof e!="string")return Promise.reject(new TypeError("stepID must be a string"));if(!n)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if(typeof n!="string")return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));let o=hE,r=this.c11nEnv.getValue(A.NEXT_ASSIGNMENT_INFO_ID)?this.c11nEnv.getValue(A.NEXT_ASSIGNMENT_INFO_ID):this.c11nEnv.getValue(A.CASE_INFO.ASSIGNMENT_ID),i=on(this.c11nEnv.getCaseSummary()),s=this.c11nEnv.getValue(A.CASE_INFO.CASE_INFO_ID),a={ID:r,stepID:e,acTargetName:this.c11nEnv.getContainerName(),targetContainerName:this.c11nEnv.getContainerName(),containerItemID:n,doDeleteCaseSummary:!0,isInCreateStage:i,caseID:s};n&&n.includes(d.MODAL)&&(a.acTargetName=d.MODAL);let c=Ve.buildActionObject(a,this.c11nEnv),{promise:l}=this.actionsApiPromise(o,c),u=de(n);return v({type:o,payload:{...c,containerItemID:n,context:u}}),l}cancelAssignment(e,n){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));let{CASE_INFO:o}=A,r=os,i=de(e),s=e&&e.includes(d.MODAL),a=this.c11nEnv.getCaseSummary(),c=on(a),l=this.c11nEnv.getValue(d.getProperty(o.CASE_INFO_ID)),u=this.c11nEnv.getValue(o.ASSIGNMENT_ID),p=Ve.buildActionObject({caseID:l,containerItemID:e,context:i},this.c11nEnv),m={};s?(p.acTargetName=d.MODAL,p.isInCreateStage=c,p.isModalAction=s,m={...p}):m={...p,acName:X(this.c11nEnv.getContainerName(),p.context)};let{promise:f}=this.actionsApiPromise(r,p);return v({type:r,payload:m}),f.then(()=>{n||Q_({caseID:l,assignmentID:u,context:i||e})})}cancelLocalAction(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));let{CASE_INFO:n}=A,o=e,r=ku,i=e&&e.includes(d.MODAL),s=this.c11nEnv.getValue(n.CASE_INFO_ID),a=Ve.buildActionObject({caseID:s,containerItemID:e,context:o},this.c11nEnv);if(!jn(o))return new kp(this.c11nEnv).removeContainerItem({containerItemID:e}).then(()=>{od(s),Q_({caseID:s,context:this.c11nEnv.getContextName()})});v({type:r,payload:{...a,isModalAction:i}});let{promise:l}=this.actionsApiPromise(r,a);return l}cancelCreateStageAssignment(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));let{CASE_INFO:n}=A,o=ku,r=e,i=r&&r.includes(d.MODAL),s=this.c11nEnv.getCaseSummary(),a=this.c11nEnv.getValue(d.getProperty(d.CASE_INFO.CASE_TYPE_ID)),c=on(s),l=this.c11nEnv.getValue(d.getProperty(n.CASE_INFO_ID)),u=Ve.buildActionObject({caseID:l,containerItemID:e,context:r},this.c11nEnv),p=this.c11nEnv.getValue("isProcessAction","isProcessAction"),m=T.isCoexistenceAppOfType(d.APP_TYPE.UIKIT);u.isProcessAction=p;let f=T.getRenderingMode();if(c&&(i||m||f==="EMBED")&&!Kc(s)){let h=this.c11nEnv.getValue(d.getProperty(d.CASE_INFO.IS_FIRST_ASSIGNMENT)),E=jn(r);if(this.shouldDeleteCaseInCreateStage(E,h,m)){let C=!!G.isExternalObject(a);return this.deleteCaseInCreateStage(e,C)}v({type:o,payload:{...u,isModalAction:i,isChildCase:Rj(s),isInCreateStage:c}})}let{promise:g}=this.actionsApiPromise(o,u);return g.then(()=>{})}saveAssignment(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));let n=ji,o=this.getSaveActionPayload(e,!0),{promise:r}=this.actionsApiPromise(n,o);return vt.executeOrQueueDeferredAction(Gl(o)),r}saveAndClose(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));let n=ji,o=this.getSaveActionPayload(e),{promise:r}=this.actionsApiPromise(n,o);return v(Gl(o)),r}deleteCaseInCreateStage(e,n=!1){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));let o=Vy,r=e,i=r&&r.includes(d.MODAL),s=this.c11nEnv.getValue(d.getProperty(A.CASE_INFO.CASE_INFO_ID)),a=this.c11nEnv.getValue(d.getProperty(A.CASE_INFO.CASE_TYPE_ID)),c=Ve.buildActionObject({caseID:s,caseType:a,containerItemID:e,context:r,ignoreCaseDeletion:n},this.c11nEnv),l=this.c11nEnv.getValue("isProcessAction","isProcessAction"),u=this.c11nEnv.getValue(d.getProperty(A.CASE_INFO.PARENTCASEINFO));c.isProcessAction=l,c.parentCaseInfo=u,c.parentCases=this.c11nEnv.getValue(d.getProperty(A.CASE_INFO.PARENTCASES));let p=`${d.APP.APP}/${Ee.PRIMARY}`,m=rt(p,Ee.PRIMARY);c.parentContext=m,i&&(c.targetName=d.MODAL,c.containerName=Ee.MODAL,c.isModalAction=i),v(M8(c));let{promise:f}=this.actionsApiPromise(o,c);return f.then(()=>{Q_({caseID:s,context:this.c11nEnv.getContextName()})})}getRecents(e){if(!e)return Promise.reject(new Error("maxResultsToFetch is required parameter"));if(typeof e!="number")return Promise.reject(new TypeError("maxResultsToFetch must be number"));let{restApi:n}=Se.getRestEndPoint("getRecents")||{};n=`${n}?maxResultsToFetch=${e}`;let o=At.getServerURL()+n;return k(o,{method:"GET",headers:{}})}updateRecents(e,n,o,r){let{restApi:i}=Se.getRestEndPoint("updateRecents")||{},s=`${At.getServerURL()}${i}`;return k(s,{method:"PATCH",headers:{"Content-Type":"application/json"},body:{pyLabel:o,pyID:n,classID:e,ID:r}})}logout(){let{restApi:e}=Se.getRestEndPoint("Logout")||{},n=`${At.getServerURL()}${e}`;return k(n,{method:"GET",headers:{}}).then(o=>(Object.keys(be.rootNodes).forEach(r=>{Wy.cleanCaches(r)}),be.rootNodes={},sessionStorage.clear(),js(),Promise.resolve(o)))}invoke(e,n={}){let o={method:n.method||"GET",body:n.body};return k(e,o,this.c11nEnv.getContextName())}showCasePreview(e,n={}){this.loadView(e,O.getDefaultQualifiedName("pyCasePreview"),{container:Ee.PREVIEW,containerName:Ee.PREVIEW,context:A.APP.APP,...n})}showDataPreview(e,n,o){return e?typeof e!="string"?Promise.reject(new TypeError("dataContext must be string")):n?typeof n!="object"?Promise.reject(new TypeError("dataContextParameters must be an object")):this.showData(O.getDefaultQualifiedName("pyDataPreview"),e,n,{container:Ee.PREVIEW,containerName:Ee.PREVIEW,context:A.APP.APP,...o||{},skipSemanticUrl:!0}):Promise.reject(new Error("dataContextParameters is required parameter")):Promise.reject(new Error("dataContext is required parameter"))}loadView(e,n,o){let r=Ve.buildActionObject({caseId:e,viewName:n,caseClassName:this.c11nEnv.getValue(d.getProperty(A.CASE_INFO.CASE_TYPE_ID)),RemoteSystemID:ce.getRemoteHeaderByContext(this.c11nEnv.getContextName())},this.c11nEnv);o||(o={containerName:this.c11nEnv.getContainerName(),updateData:!1}),o&&typeof o=="object"?(Object.hasOwn(o,"container")&&!Object.hasOwn(o,"containerName")&&(o.containerName=o.container),r={...r,...o}):r={...r,containerName:this.c11nEnv.getContainerName()};let i=Ou,{promise:s}=this.actionsApiPromise(i,r,!1);return v({type:i,payload:{...r}}),s}showPage(e,n,o={containerName:"",skipSemanticUrl:""}){if(!e)return Promise.reject(new Error(this.MSG_PAGENAME_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_PAGENAME_STRING));if(!n)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if(typeof n!="string")return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(window.pms?.plugins?.c11n?.showPage)return window.pms.plugins.c11n.showPage(e,n,o);let r=Ve.buildActionObject({viewName:e,className:n},this.c11nEnv),i=Un,{promise:s}=this.actionsApiPromise(i,r);return en.getPreviewMode()&&(r.debugInfo={debugId:y.generateUniqueID()}),v({type:i,payload:{...r,...o,containerName:o.containerName||this.c11nEnv.getContainerName(),skipSemanticUrl:o.skipSemanticUrl}}),s}showInsight(e,n={}){if(!e)return Promise.reject(new Error(this.MSG_INSIGHTID_REQUIRED));let o=Ve.buildActionObject({},this.c11nEnv),r=fE,{promise:i}=this.actionsApiPromise(r,o);return v({type:r,payload:{...o,containerName:this.c11nEnv.getContainerName(),skipSemanticUrl:n.skipSemanticUrl||!1,insightID:e}}),i}showDashboard(e,n={}){if(!e)return Promise.reject(new Error(this.MSG_DASHBOARDID_REQUIRED));let o=Ve.buildActionObject({},this.c11nEnv),r=gE,{promise:i}=this.actionsApiPromise(r,o);return v({type:r,payload:{...o,containerName:this.c11nEnv.getContainerName(),skipSemanticUrl:n.skipSemanticUrl||!1,dashboardID:e}}),i}showData(e,n,o,r={containerName:"",skipSemanticUrl:!1}){if(!e)return Promise.reject(new Error(this.MSG_PAGENAME_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_PAGENAME_STRING));if(!n)return Promise.reject(new Error("dataContext is required parameter"));if(typeof n!="string")return Promise.reject(new TypeError("dataContext must be string"));let i=Ve.buildActionObject({pageName:e,dataContext:n,dataContextParameters:o,RemoteSystemID:ce.getRemoteHeaderByContext(this.c11nEnv.getContextName())},this.c11nEnv),s=aa;r?.containerName||(r.containerName=T.getRenderingMode()==="HYBRID"?sc.getRuntimeParam(d.HYRBID_ROOT_CONTAINERNAME):qt.getTargetViewContainerName(s));let{promise:a}=this.actionsApiPromise(s,i);return v({type:s,payload:{...i,...r,skipSemanticUrl:!!r.skipSemanticUrl}}),a}validateCoexistenceHarnessConfig(e){let{className:n,harnessName:o}=e??{};return n?typeof n!="string"?Promise.reject(new TypeError("className must be string")):o?typeof o!="string"?Promise.reject(new TypeError("harnessName must be string")):null:Promise.reject(new Error("harnessName is required parameter")):Promise.reject(new Error("className is required parameter"))}dispatchCoexistenceShowData(e,n,o){let r=Ve.buildActionObject({dataContext:e,...n},this.c11nEnv),i=aa;o?.containerName||(o.containerName=T.getRenderingMode()==="HYBRID"?sc.getRuntimeParam(d.HYRBID_ROOT_CONTAINERNAME):qt.getTargetViewContainerName(i));let{promise:s}=this.actionsApiPromise(i,r);return v({type:i,payload:{...r,...o,...n,skipSemanticUrl:!0}}),s}showCoexistenceCreateObject(e,n={}){return e?typeof e!="string"?Promise.reject(new TypeError("createClassName must be string")):this.dispatchCoexistenceShowData(e,{createClassName:e,isCoexistenceCreate:!0},n):Promise.reject(new Error("createClassName is required parameter"))}showCoexistenceLandingPage(e,n={}){let o=this.validateCoexistenceHarnessConfig(e);return o||this.dispatchCoexistenceShowData(e.className,{...e,isCoexistenceLanding:!0},n)}showCoexistenceHarness(e,n={}){let o=this.validateCoexistenceHarnessConfig(e);return o||this.dispatchCoexistenceShowData(e.className,{...e,isCoexistenceHarness:!0},n)}changeHandler(e,n){Ve.changeHandler(e,n)}eventHandler(e,n){Ve.eventHandler(e,n)}triggerFieldChange(e,n,o=!1,r={skipDirtyValidation:!1,skipPageInstructionGeneration:!1}){let i=this.c11nEnv.getContextName(),s=this.c11nEnv.getPageReference(),a=Q.getContextPath(s,e);o||this.c11nEnv.getValidationApi().validate(n),this.c11nEnv.isInsideList()&&!r.skipPageInstructionGeneration&&this.c11nEnv.getListActions().updateProperty(e,n,r);let c=this.c11nEnv.getValue(d.CLASS_ID),l=e?e.split(".").filter(u=>!!u):[];l.length>1&&(l.pop(),c=ie(`.${l.join(".")}.classID`,s,i)),e=y.trimDotForProperty(e),v({type:Fr,payload:{reference:a,value:n,context:i,pageReference:this.c11nEnv.getPageReference(),propertyName:e||this.c11nEnv.getComponentConfig().value,classID:c}})}updateFieldValue(e,n,o={}){let{removePropertyFromChangedList:r=!1,isArrayDeepMerge:i=!0,contextPageReference:s="",isListEntry:a=!1,skipDirtyValidation:c=!1,associatedProperty:l,skipPageInstructionGeneration:u=!1}=o,p=this.c11nEnv.getContextName(),m=this.c11nEnv.getPageReference(),f=s?.startsWith(m)?s.replace(m,""):s;m=s||m;let g=Q.getContextPath(m,e),h=!1;this.c11nEnv.isInsideList()&&!u&&this.c11nEnv.getListActions().updateProperty(f?`${f}${e}`:e,n,{isArrayDeepMerge:i,skipDirtyValidation:c}),this.c11nEnv.isBulkAction()&&(h=!0),e||(e=this.c11nEnv.getStateProps().value),ht({type:A.MESSAGES.MESSAGES_TYPE_ERROR,property:e,pageReference:m,context:p,isListEntry:a}),v({type:Pt,payload:{reference:g,value:n,context:p,isArrayDeepMerge:i,skipDirtyValidation:c,...h&&{isStrictTracking:h},...r&&{removePropertyFromChangedList:r},...l&&{associatedProperty:`${m}${l}`}}})}activateModalContainerItem(e){let n=CE,{context:o}=e,r=o&&o.includes(d.MODAL),i=Ve.buildActionObject({...e,containerName:this.c11nEnv.getContainerName(),containerItemID:o},this.c11nEnv);r&&(i.containerName=d.MODAL,i.isModalAction=r),v({type:n,payload:i});let{promise:s}=this.actionsApiPromise(n,i);return s}refreshCaseView(e,n,o,r={}){let{promise:i,actionMgrID:s}=this.actionsApiPromise("REFRESH_DATA"),{autoDetectRefresh:a,propertyName:c,preserveClientChanges:l,classID:u,context:p,optionalPayload:m,isArrayDeepMerge:f}=r,g={actionMgrID:s,caseViewAction:!0,preserveClientChanges:l,propertyName:c,classID:u,isArrayDeepMerge:f,optionalPayload:m};r.refreshFor&&(g.refreshFor=r?.refreshFor),r.resetForm&&(g.resetForm=r?.resetForm),r.skipPayloadGeneration&&(g.skipPayloadGeneration=r?.skipPayloadGeneration);let h=p||this.c11nEnv.getContextName(),E=this.c11nEnv.getPageReference(),C=this.c11nEnv.getValue(d.CONTEXT_DATA_MODAL_VIEW.CONTEXT_DATA_MODAL_VIEW),{isMultiRecordData:I,editType:_}=C||{};if(a&&I&&_===d.ACTION){let P=this.c11nEnv.getValue(A.CASE_INFO.ASSIGNMENT_ID),{actionID:N,interestPage:z,interestPageActionID:H,isLocalAction:ne}=C;cd(e,P,N,h,z,H,ne,I,_,g)}else!I&&a&&(vj(h,E)||Jc(h,E))?ld(h,o,g):rl(e,n,h,o,g);return i}refreshEmbeddedDataWithAction(e,n,o,r,i,s,a,c,l={}){let{promise:u}=this.actionsApiPromise(Kt.REFRESH_DATA),p=this.c11nEnv.getContextName();return cd(e,n,o,p,r||this.c11nEnv.getPageReference(),i,s,a,c,l),u}openEmbeddedDataModal(e,n,o,r,i,s,a,c,l=!1,u=A.MODAL){let p=ls,m=n.getCaseInfo().getKey(),{localAction:f,assignmentID:g,actionID:h}=Eme(n,a),E=n.getPageReference(),C=typeof r=="string"?`${n.getPageReference().replace(d.getProperty(A.CASE_INFO.CASE_INFO_CONTENT),"")}${o}.${r}`:`${n.getPageReference().replace(d.getProperty(A.CASE_INFO.CASE_INFO_CONTENT),"")}${o}[${r}]`;E.startsWith(A.OBJECT_INFO.OBJECT_INFO)&&!m&&(m=n.getCaseInfo().getObjectKey(),C=`${n.getPageReference().replace(A.OBJECT_INFO.OBJECT_INFO_CONTENT,"")}${o}[${r}]`);let I=n.getMetadata(),_=Array.isArray(I?.config?.children)?I.config.children[0]?.children||[]:[],P={readOnly:l,targetProperty:o,index:r,viewID:e,ID:m,actionType:i,interestPage:y.convertPageRefToClipboardPageNotation(C),heading:s,editType:a,interestPageActionID:a===d.ACTION?c:void 0,actionID:h,isLocalAction:f,operationFlag:d.EMBEDDED_DATA_MODAL.SHOW_ROW,isPageGroup:typeof r=="string",assignmentID:!f&&a===d.ACTION?g:void 0,columns:_},N=Ve.buildActionObject(P,this.c11nEnv);if(a===d.ACTION){let ne=y.getETag(N.context);N.headers={"If-Match":ne}}let{promise:z}=this.actionsApiPromise(p,N);return T.getFeatureMap().granularUIRefresh&&_.forEach(ne=>{let j=ge.trimAnnotation(ne.config.value),oe=ft(j.startsWith(".")?j.replace(".",""):j,ne.config.classID);oe&&!Array.isArray(oe)&&oe.isDeclarativeTarget&&be.addFieldNode(n.getContextName(),E+C,n.viewName??"",j,"",{isDeclarativeTarget:!0,propertyName:j,pageReference:E+C})}),v({type:p,payload:{...N,containerName:u,skipSemanticUrl:!0}}),z}getEmbeddedDataView(e,n,o,r,i,s="",a="",c=!1,l=""){let u=xE,p=n.getCaseInfo().getKey(),m=n.getValue(A.CASE_INFO.IS_LOCAL_ACTION),f=n.getValue(A.CASE_INFO.ASSIGNMENT_ID),g=X8(n,s,m),h=n.getPageReference(),E=typeof r=="string"?`${n.getPageReference().replace(d.getProperty(A.CASE_INFO.CASE_INFO_CONTENT),"")}${o}.${r}`:`${n.getPageReference().replace(d.getProperty(A.CASE_INFO.CASE_INFO_CONTENT),"")}${o}[${r}]`;h.startsWith(A.OBJECT_INFO.OBJECT_INFO)&&!p&&(p=n.getCaseInfo().getObjectKey(),E=`${n.getPageReference().replace(A.OBJECT_INFO.OBJECT_INFO_CONTENT,"")}${o}[${r}]`);let C={readOnly:c,targetProperty:o,index:r,viewID:e,ID:p,actionType:i,interestPage:y.convertPageRefToClipboardPageNotation(E),editType:s,interestPageActionID:s===d.ACTION?a:void 0,actionID:g,isLocalAction:m,operationFlag:d.EMBEDDED_DATA_MODAL.SHOW_ROW,isPageGroup:typeof r=="string",assignmentID:!m&&s===d.ACTION?f:void 0,containerName:l},I=Ve.buildActionObject(C,this.c11nEnv);if(s===d.ACTION){let P=y.getETag(I.context);I.headers={"If-Match":P}}let{promise:_}=this.actionsApiPromise(u,I);return v({type:u,payload:{...I,skipSemanticUrl:!0}}),_}submitEmbeddedDataModal(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));let n=DE,o=this.c11nEnv.getValue(d.getProperty(A.CASE_INFO.CASE_INFO_ID)),r=this.c11nEnv.getValue(d.getProperty(A.CASE_INFO.ASSIGNMENT_ID)),i=this.c11nEnv.getPageReference().replace(d.getProperty(A.CASE_INFO.CASE_INFO_CONTENT),""),s=de(e),a=this.c11nEnv.getValue(d.getProperty(d.CONTEXT_DATA_MODAL_VIEW.CONTEXT_DATA_MODAL_VIEW)),{interestPageActionID:c,editType:l,isLocalAction:u,actionID:p,viewName:m,parentContext:f}=a;i.startsWith(A.OBJECT_INFO.OBJECT_INFO)&&!o&&(o=this.c11nEnv.getValue(A.OBJECT_INFO.OBJECT_INFO_ID),i=this.c11nEnv.getPageReference().replace(A.OBJECT_INFO.OBJECT_INFO_CONTENT,"")),ht({context:s,stateObj:J(s),clearContextMessages:!0});let g={containerItemID:e,containerName:this.c11nEnv.getContainerName(),doDeleteCaseSummary:!0,isInCreateStage:!1,ID:o,viewID:m,isFormValid:Fn(s),interestPage:y.convertPageRefToClipboardPageNotation(i),parentContext:f,isModalAction:!1,target:this.c11nEnv.getTarget(),editType:l,actionID:p,operationFlag:d.EMBEDDED_DATA_MODAL.SUBMIT_ROW,interestPageActionID:c,isLocalAction:u,assignmentID:r};e&&e.includes(d.MODAL)&&(g.containerName=d.MODAL,g.isModalAction=!0);let h=Ve.buildActionObject(g,this.c11nEnv);if(l===d.ACTION){let C=y.getETag(h.context);h.headers={"If-Match":C}}let{promise:E}=this.actionsApiPromise(n,h);if(jn(s)){let[C,I,_]=ms.getPageListNameAndIndexFromPageName(this.c11nEnv.getPageReference());be.mutatePageList(f,C,I,{type:lo,rowIndex:_}),v({type:lo,payload:{pageReference:this.c11nEnv.getPageReference(),context:f,isListEntry:!0}})}return vt.executeOrQueueDeferredAction({type:n,payload:{...h,context:s}}),E}fillFormWithAI(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));let n=de(e),o=this.c11nEnv.getPageReference(),{promise:r,actionMgrID:i}=this.actionsApiPromise(zc);return ld(n,o,{actionMgrID:i,isFillFormWithAI:!0,preserveClientChanges:!1}),r}handleSubscript(e,n){if(!ac(A.VIEW_NAMES.SUBSCRIPT_CREATE_VIEW))return Promise.reject(new Error(this.MSG_SUBSCRIPT_VIEW_REQUIRED));let r=$E,i=Ve.buildActionObject({containerItemID:e},n);v({type:r,payload:{...i,isDataObject:!0,skipReleaseLockRequest:!0,isFormValid:Fn(e),context:e}});let{promise:s}=this.actionsApiPromise(r,i);return s}showSubscriptCreateView(e,n,o,r=A.VIEW_NAMES.SUBSCRIPT_CREATE_VIEW){let i=Ve.buildActionObject({viewName:r,className:e,referenceListStr:n,subscriptName:o},this.c11nEnv),s=Un,{promise:a}=this.actionsApiPromise(s,i);return v({type:s,payload:{...i,containerName:A.MODAL,skipSemanticUrl:!0,isCreateDataObject:!0}}),a}deleteWork(e,n,o){if(!e)return Promise.reject(new Error("workId is required parameter"));let r=rv,i=G.isExternalCaseType(n),s=Ve.buildActionObject({workId:e,caseTypeID:n,isExternalCase:i,...o?.skipDeleteConfirmation&&{skipDeleteConfirmation:!0},...o?.enableBackNavigation&&{enableBackNavigation:!0}},this.c11nEnv),{promise:a}=this.actionsApiPromise(r,s);return v(Tw({...s})),a}deleteDataRecord(e,n){if(!e)return Promise.reject(new Error("className is required parameter"));if(!n)return Promise.reject(new Error("keys is required parameter"));let o=rv,r=Ve.buildActionObject({className:e,keys:n},this.c11nEnv),{promise:i}=this.actionsApiPromise(o,r);return v(Tw({...r})),i}},eH=Qw;var Xw=class{c11nEnv;constructor(e){this.c11nEnv=e}getContextKey(){return this.c11nEnv.getValue(d.getProperty(d.DATA_INFO.DATA_INFO_CONTEXT_KEY))}},tH=Xw;var X_=class{fieldType;constructor(e){this.fieldType=e}applyFallback(e){let n=gr.getDefaultsforType(this.fieldType);e.currencyISOCode=e.currencyISOCode||n?.currencyISOCode||"USD"}};var eb=class{static getStrategy(e){switch(e){case"Currency":case"Decimal":case"Integer":case"Percentage":return new X_(e);default:return}}};var kr={DATAPAGE:"DATAPAGE",VIEW:"VIEW",FIELD:"FIELD",CASE:"CASE",PARAGRAPH:"PARAGRAPH",PORTAL:"PORTAL"};var nH=/[\\^$.*+?()[\]{}|]/g,Ame=RegExp(nH.source);function Cme(t){return t=aE(t),t&&Ame.test(t)?t.replace(nH,"\\$&"):t}var rH=Cme;var Ime=/\{(\d+)\}/,_me=t=>{let e=t.split(Ime),n=[],o=new Map,r="",i=0;return e.forEach((s,a)=>{if(a%2===0){r+=rH(s),i+=s.length;return}let c=Number(s),l=o.get(c);if(l!==void 0){r+=`\\${l}`;return}n.push(c),o.set(c,n.length),r+="(.+?)"}),{key:t,pattern:new RegExp(`^${r}$`),groupToPlaceholder:n,literalLength:i}},oH=(t,e)=>{if(!t)return;let n;for(let s of Object.keys(e)){let a=_me(s),c=a.pattern.exec(t);c&&(!n||a.literalLength>n.template.literalLength)&&(n={template:a,captures:c.slice(1)})}if(!n)return;let{template:o,captures:r}=n,i=[];return o.groupToPlaceholder.forEach((s,a)=>{i[s]=r[a]}),{message:e[o.key],args:i}};var Gi=(t,e,n,o)=>{let r=[kr.VIEW,kr.FIELD,kr.PARAGRAPH],s=[kr.DATAPAGE,kr.PARAGRAPH].includes(t)&&o?`#${o}`:"",a=t===kr.DATAPAGE?"@BASECLASS":n;return t===kr.DATAPAGE||r.includes(t)?`${a}!${t}!${e}${s}`.toUpperCase():`${t}!${e}${s}`.toUpperCase()},jp=class t{locale;localeReference;static COMMON_LABELS="COMMONLABELS";static MESSAGES="MESSAGES";static COMPONENT_FIELDS="COMPONENTFIELDS";static CASE_HISTORY="CASEHISTORY";lookupList=[];constructor(e,n){this.localeReference=n,this.locale=e}getLocalizedText(e,n){let o=[...this.localeReference?[this.localeReference.toUpperCase()]:[],...this.lookupList,t.COMPONENT_FIELDS,t.COMMON_LABELS],r=this.#t(e,o)||e;return(n?this.#e(r,n):r)||e}getLocalizedMessage(e,n){let o=this.#t(e,[t.MESSAGES,t.COMMON_LABELS])??e;return(n?this.#e(o,n):o)||e}getLocalizedDataPage(e,n,o,r){if(!n||!o||!e)return e;let s=[Gi(kr.DATAPAGE,n,void 0,o),t.COMMON_LABELS,...this.lookupList],a=this.#t(e,s)??e;return(r?this.#e(a,r):a)||e}getLocalizedCaseHistory(e){if(!e)return e;let n=Hi(this.locale).localeStore[t.CASE_HISTORY];if(!n||Object.keys(n).length===0)return e;let o=oH(e,n);if(!o?.message)return e;let r=o.args.map(i=>this.getLocalizedText(i));return this.#e(o.message,r,!0)}#e(e,n,o=!1){if(n.length===0)return e;let r=o?0:1;return e.replace(/\{(\d+)\}/g,(i,s)=>n[`${Number(s)-r}`]??i)}#t(e,n=this.lookupList){if(n.length===0)return;let o=Hi(this.locale);for(let r of n){let i=this.#n(e,o.localeStore[r]);if(i)return i}}#n(e,n={}){let o=n[e];if(typeof o=="string")return o}setLookupList(e){Array.isArray(e)&&(this.lookupList=e)}};var e0=class{_dataSourceMap;constructor(){this._dataSourceMap={}}hasContextName(e){return e in this._dataSourceMap}addContextName(e,n){n&&Object.keys(n).length>0?this._dataSourceMap[e]=n: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,n,o){if(this.hasContextName(e)){let r=this.getContextObjectByName(e);if(r)if(Array.isArray(o))r[n]=o;else{let i=r[n];r[n]=[...new Set([...i,o])]}}else{let r={};Array.isArray(o)?r[n]=o:r[n]=[o],this.addContextName(e,r)}}deletePropertyInContext(e,n){if(this.hasContextName(e)){let o=this.getContextObjectByName(e);o&&n in o&&delete o[n]}}getPropertyFromContext(e,n){if(this.hasContextName(e)){let o=this.getContextObjectByName(e);if(o&&n in o)return o[n]}return[]}getDependencies(e,n){let o=this.getPropertyFromContext(e,n),r=new Set(o);return o.forEach(i=>{r.add(i)}),[...r]}},lc=new e0;var n0={};tn(n0,{fetchViewResources:()=>Ky,refreshViewByName:()=>t0,updateViewResources:()=>tb});var tb=async t=>{let e=ze(t),n=y.getIn(e,d.COMPONENTS);hs(e,{},!0),await Do(n)},Ky=(t,e,n)=>Q.resolveView(t,e,n),iH=(t,e,n,o)=>{let r=t[e];if(!r)return!1;let i=y.getIn(r,A.CASE_INFO.CASE_INFO_CLASSID);return y.getIn(r,d.CASE_INFO.VIEW_NAME)===n&&(!o||i===o)},sH=t=>{let{accessedOrder:e,items:n}=t;if(!e||!n)return null;let o=e[e.length-1];return o?n[o]?.context??null:null},bme=(t,e)=>{let n=we();if(!n)return null;let o=n.getState(),{data:r,containers:i}=o;if(!i||!r)return null;let s=`${A.APP.APP}/primary`;if(i[s]){let a=sH(i[s]);if(a&&iH(r,a,t,e))return a}for(let a of Object.keys(i)){if(a===s)continue;let c=sH(i[a]);if(c&&iH(r,c,t,e))return c}return null},t0=(t,e="",n="")=>{let o=n||null;if(!o){let a=`${A.APP.APP}/primary`;o=bme(t,e),o||(o=Qt(a))}if(!o)return Promise.reject(new Error(`Unable to find an active context for view "${t}".`));let r=J(o);if(!r)return Promise.reject(new Error(`No data found for context "${o}".`));let i=y.getIn(r,A.CASE_INFO.CASE_INFO_ID)||"",s=ct({options:{context:o,pageReference:A.CASE_INFO.CASE_INFO_CONTENT}});return r0(),s.getPConnect().getActionsApi().refreshCaseView(i,t,"",{autoDetectRefresh:!0,preserveClientChanges:!1}).finally(()=>{o0()})};var i0=class{meta;datasource;options;index;datasourceObj;constructor(e,n,o){this.meta=e,this.datasource=n,this.index=0,this.options=o,this.datasourceObj=Q.getPropertyValue(n,o.pageReference,o.context)}hasNext(){return this.index<this.datasourceObj.length}next(){if(!this.hasNext())throw new Error("No Children");let e=Q.getContextPath(this.datasource,this.index);return this.index+=1,ct({meta:this.meta,options:{...this.options,pageReference:e}})}resetIndex(){this.index=0}},s0=i0;var a0=class{children;options;index;constructor(e,n){this.children=e,this.index=0,this.options=n}hasNext(){return this.index<this.children.length}next(){if(!this.hasNext())throw new Error("No Children");let e=this.index,n=this.children[e];this.index+=1;let o=n?._relativePath??`${this.options?.relativePath??""}.children[${e}]`;return ct({meta:n,index:this.index,options:{...this.options,relativePath:o}})}resetIndex(){this.index=0}},Tme=(t,e)=>{let n=!!t?.repeat;if(!!t?.["repeat-self"])return new s0(t,t.context||"",e);if(n){let r=uc(`${e.context}.${d.SUMMARY_OF_LISTS}`,t.pageReference,e.context);return new s0(t.children[0],r||t.context,e)}if(t?.children)return new a0(t.children,e)},aH=Tme;var ql=class{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,n){let o=[];if(e&&["portal","view"].includes(n)){let{accessedOrder:r,items:i}=e;if(r&&i){let s=r[r.length-1];i[s]&&i[s].view&&Object.keys(i[s].view).length>0&&o.push(i[s])}}return o}static getDependentProperties=e=>{let n=[];return e._rawConfig?.config?.parameters?n=Object.values(e._rawConfig?.config?.parameters||{}):e.getFieldMetadata(e.getStateProps()?.value)?.datasource?.parameters&&(n=(e.getFieldMetadata(e.getStateProps()?.value)?.datasource?.parameters||[]).map(o=>o?.value)),n.filter(o=>On.isProperty(o)).map(o=>On.getPropertyName(o))}},vme=new ql;Object.freeze(vme);var c0,nb=(t,e,n)=>{t&&(Object.keys(t).forEach(o=>{if(o!=="children"){let r=t[o],i=ge.trimAnnotation(r);if((typeof i=="string"||typeof r=="string")&&(y.isValidAnnotation(r)&&y.isPropertyRef(i)||r.startsWith("@W ")||r.startsWith("@DW ")||r.startsWith("@E ")||r.startsWith("@PARAGRAPH ")||r.startsWith("@ATTACHMENT ")))n&&n.parentKey&&(n.isObjHasValue=!0),r.startsWith("@PARAGRAPH ")?e[o]=r:e[o]=i;else if(Array.isArray(i))i.forEach((s,a)=>{let c={parentStateObj:e,parentKey:o,isObjHasValue:!!e[o]};e[o]=e[o]||[],e[o][a]=Object.create({}),nb(s,e[o][a],c)});else if(i&&typeof i=="object"&&i.type!=="exp"){let s={parentStateObj:e,parentKey:o,isObjHasValue:!!e[o]};e[o]=e[o]||{},nb(i,e[o],s)}}}),n&&!n.isObjHasValue&&delete n.parentStateObj[n.parentKey])},cH=(t,e)=>{t._inheritedProps=t._inheritedProps||[],t.inheritedProps=[...t._inheritedProps,...y.deepClone(e.inheritedProps)]},Na=class{useCustomContext;_rawConfig;_classID;index;_ruleClass;viewName;meta;_isRoot;options;_isExpressionExist;_isWhenExist;_isValidatorExist;_pageReference;_referenceContext;_contextName;_stateProps;_actions;_children;_additionalRegisteredProps;_caseInfo;_dataInfo;parentViewName;_referenceList;_isInsideList;_inheritedConfig;_localeRuleName;_containerTarget;_readOnly;_hasSuggestions;_isState;_type;_actionsApi;categoryName;_relativePath;_dpResolver;constructor(e){let{meta:n,isRoot:o,options:r={},useCustomContext:i}=e;this.meta=n,this._isRoot=o,this.options=r,this.useCustomContext=i,this._rawConfig=n?.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._dataInfo=null,this.viewName=r.viewName,this.parentViewName=r.viewName??"",this._referenceList=r.referenceList||"",this._isInsideList=r.isInsideList||!1,this._inheritedConfig={},this._localeRuleName=r.localeReference,this._containerTarget=r.target,this._readOnly=n?.config?.readOnly||r.readOnly,this._hasSuggestions=!1,this._actionsApi=null,this._classID=null,this.index=e.index,this.categoryName=r.categoryName||"",this._relativePath=r.relativePath??"",r.inheritedConfig&&Object.keys(r.inheritedConfig).length>0&&(this._inheritedConfig=y.deepClone(r.inheritedConfig)),n?.config?.inheritedProps&&cH(this._inheritedConfig,n?.config),this.meta?.config?.value&&typeof this.meta?.config?.value=="string"&&this.meta?.config?.value?.startsWith("@P ")&&this.meta?.config?.value?.includes("(")&&(this.meta.config.value=Ii.formatePageReferenceToArrayIndex(this.meta.config.value)),nb(this._rawConfig,this._stateProps),this._isState=!y.isObjectEmpty(this._stateProps),this._rawConfig&&this._rawConfig.config&&(this._isExpressionExist=y.isExpressionExist(this._rawConfig.config),this._isWhenExist=y.isWhenExist(this._rawConfig.config),this._isValidatorExist=Ft.isValidatorExist(this._rawConfig.config)),this._isRoot?this._contextName=A.APP.APP:this._contextName=this.meta?.config?.contextName||this.options.context||"",this._type=this.meta?.type;let s=this.options.pageReference;this.options.pageReference&&(s=ge.handleAnnotation(this.options.pageReference,this)),this._pageReference=Q.getContextPath(s||this.options.parentPageReference,this._pageReference),this._pageReference||(this._pageReference=""),this._type==="reference"&&(this._rawConfig=n);let a=this._type==="reference"&&y.isWhenExist({visibility:this.meta?.config?.visibility}),c=this._checkAndSetDecisionParagraph("instructions",this._rawConfig?.instructions),l=!1;if(this._type!=="reference"&&n&&(this._rawConfig=Q.resolveReference(n,this)),this._rawConfig){let u=this.getRawConfigProps();u&&(this._localeRuleName=ge.trimAnnotation(u.localeReference)||r.localeReference,this._isExpressionExist=y.isExpressionExist(u),this._isWhenExist=y.isWhenExist(u),this._isValidatorExist=Ft.isValidatorExist(u),l=this._checkAndSetDecisionParagraph("label",u?.label)),this._children=this._rawConfig.children,this._rawConfig?.type?.toLowerCase()===d.VIEW&&this._rawConfig.name&&(this.viewName=ge.handleAnnotation(this._rawConfig.name,this)),this.options.hasForm&&YF(this)}(a||c||l)&&$A(this.viewName,this._contextName,this._pageReference)}_checkAndSetDecisionParagraph(e,n,o){let r=!1;if(n&&n.startsWith(d.PARAGRAPH_ANNOTATION)){let i=ge.trimAnnotation(n);r=ko.isDecisionParagraph(i,o??this.getCurrentClassID()),r&&this.setStateProps({[e]:n})}return r}isDeclarativeTarget(){let e=!1;if(this.getValue(this._pageReference)||this._pageReference===""){let n=ge.trimAnnotation(this.getPropertyName());e=this.getFieldMetadata(n)?.isDeclarativeTarget||!1}return e}_getPropertyName(){let e=ge.trimAnnotation(this.getPropertyName());return this._pageReference===""&&e.startsWith(".")?e.substring(1,e.length):e}addFieldNode(){let e=this._getPropertyName(),{value:n,contextPage:o,label:r,required:i,readOnly:s,disabled:a,visibility:c,validationType:l,caption:u,allowMultiple:p,useRFC822Validation:m,displayAs:f}=this.getRawConfigProps();if(this.getValue(this._pageReference)||this._pageReference===""){let g=this._type==="Address"&&this._rawConfig?.config?.associatedView?ge.trimAnnotation(this._rawConfig.config.associatedView):"",h=r||u,E=this._rawConfig?.type,C={target:this._containerTarget,context:this._contextName,pageReference:this._pageReference,propertyName:ge.trimAnnotation(n),label:h?.startsWith("@")?ge.handleAnnotation(h,this,void 0):h,required:i,readOnly:s,disabled:a,visibility:c||this.options?.visibility,skipRequiredValidation:this.options?.isBulkAction,inheritedProps:this.getInheritedProps(),useCustomContext:this.useCustomContext,value:n,validationType:l,...o&&{contextPageRef:`${this._pageReference}${ge.trimAnnotation(o)}`},componentName:E,hasSuggestions:this._hasSuggestions,isInsideList:this.isInsideList(),index:this.index,allowMultiple:p,isDeclarativeTarget:this.isDeclarativeTarget(),...f&&{displayAs:f},...this._type==="Email"&&{useRFC822Validation:m}};be.addFieldNode(this._contextName,this._pageReference,(g||this.categoryName||this.viewName)??"",e,this.getValue(e),C)}}removeNode(){if(Object.hasOwn(this._rawConfig?.config??{},"value")&&this._type!=="Address")be.removeFieldNode(this._contextName,this._pageReference,this.viewName||"",ge.trimAnnotation(this.getPropertyName()),this.index);else if(this._type==="Address"&&this._rawConfig?.config?.associatedView)be.removeViewNode(this._contextName,this._pageReference,ge.trimAnnotation(this._rawConfig.config.associatedView),this.index);else{let e=this._rawConfig?.config?.context?`${this._pageReference}${this._rawConfig?.config.context}`:this._pageReference,o={visibility:this.options?.visibility??this._rawConfig?.config?.visibility??this._rawConfig?.config?.referenceVisibility};be.removeViewNode(this._contextName,e,this._rawConfig?.config?.name||this._rawConfig?.config?.id||"",this.index,o)}}addViewNode(){if(!this.isReadOnly()){if(this._rawConfig?.type?.toLowerCase()===d.VIEW&&this._rawConfig.name&&this.viewName){let n={visibility:this.options?.visibility??this._rawConfig.config?.visibility??this._rawConfig.config?.referenceVisibility};be.addViewNode(this._contextName,this._pageReference,this.viewName,this.parentViewName,n)}this._rawConfig?.type==="Group"&&this._rawConfig?.config?.id&&be.addViewNode(this._contextName,this._pageReference,this._rawConfig.config.id,this.parentViewName),this._rawConfig?.type==="Address"&&this._rawConfig?.config?.associatedView&&be.addViewNode(this._contextName,this._pageReference,ge.trimAnnotation(this._rawConfig.config.associatedView),this.parentViewName),this._rawConfig?.type?.toLowerCase()==="deferload"&&this._rawConfig.config?.name&&be.addViewNode(this._contextName,this._pageReference,this._rawConfig.config.name,this.parentViewName)}}addWhenNode(){let e="",n="",o=y.getWhenNames(this._rawConfig?.config),r=this.getRawConfigProps();if(r?.type&&r?.type?.toLowerCase()===d.VIEW)n=d.CONTEXT_TREE_NODE_TYPES.VIEW,e=this.getCurrentView();else{n=d.CONTEXT_TREE_NODE_TYPES.FIELD;let i=this.getPropertyName();e=ge.isProperty(i)?ge.trimAnnotation(i):""}e&&o.forEach(i=>{be.addWhenNode(this.getContextName(),this.getPageReference(),n,e,i,{pageReference:this.getPageReference(),context:this.getContextName()})})}updateContextTree(){if(this.isVisible()&&(this.addViewNode(),this._rawConfig?.config&&Object.hasOwn(this._rawConfig.config,"value")&&this._inheritedConfig.displayMode!=="DISPLAY_ONLY"&&this._rawConfig.config?.displayMode!=="DISPLAY_ONLY"&&this.addFieldNode(),(this._rawConfig?.type?.toLowerCase()!==d.VIEW||this._rawConfig.config?.renderMode==="Editable")&&this._rawConfig?.config?.referenceList&&this._rawConfig.config?.displayMode!=="DISPLAY_ONLY")){let{value:e,label:n,required:o,contextPage:r,readOnly:i,disabled:s,visibility:a,validationType:c,selectionMode:l,selectionList:u,selectionKey:p,referenceList:m,renderMode:f,caption:g,uniqueField:h}=this.getRawConfigProps(),E=n||g,C=[];["Multiselect","Checkbox"].includes(this._rawConfig.type)&&(C=this.getSelfReferencingDatapageKeys()),be.addPageListNode(this._contextName,this._pageReference,this.viewName??"",ge.trimAnnotation(this.getPropertyName()),{target:this._containerTarget,context:this._contextName,pageReference:this._pageReference,propertyName:ge.trimAnnotation(this.getPropertyName()),label:E?.startsWith("@")?ge.handleAnnotation(E,this,void 0):E,required:o,readOnly:i,disabled:s,...r&&{contextPageRef:`${this._pageReference}${ge.trimAnnotation(r)}`},visibility:a||this.options.visibility,skipRequiredValidation:this.options.isBulkAction,inheritedProps:this.getInheritedProps(),useCustomContext:this.useCustomContext,value:e,validationType:c,componentName:this._rawConfig.type,type:this._rawConfig.config?.type,hasSuggestions:this._hasSuggestions,isInsideList:this.isInsideList(),selectionMode:l,selectionList:u,renderMode:f,referenceList:m,selectionKey:p,index:this.index,uniqueField:h,selfReferencingDatapageKeys:["Multiselect","Checkbox"].includes(this._rawConfig.type)?C:void 0});let I=this.getValue(ge.trimAnnotation(this.getPropertyName()),this._pageReference)||[];be.updatePageListNode(this._contextName,this._pageReference,ge.trimAnnotation(this.getPropertyName()),I.length)}this.isWhenExist()&&this.addWhenNode(),this.isVisible()||this.removeNode()}getStateProps(){return this._stateProps}setStateProps(e){y.mergeDeep(e,this._stateProps)}getMetadata(){return this._rawConfig}getSharedDataPageForReferenceList(){let e=this.getCaseInfo().getClassName(),n=this.getCurrentView();if(!n||!e)return;let o=Ky(n,this,e);if(!o)return;let r=this.getRawMetadata()?.config?.referenceList;if(!r)return;let i={};typeof o.config?.parameters=="object"&&o.config.parameters!==null&&(i=o.config.parameters);let s=y.generateDataPageHashWithParameters(i,r,this),a=oi(),c=a?a[r]?.[s]:{};return Array.isArray(c?.[O.getDefaultQualifiedName("pxResults")])?c[O.getDefaultQualifiedName("pxResults")]:void 0}getParameterizedDataPageFieldValue(e,n){return this._dpResolver??=new DA(this),this._dpResolver.resolve(e,n)}getCaseInfo(){return this._caseInfo||(this._caseInfo=new AA(this)),this._caseInfo}getDataInfo(){return this._dataInfo||(this._dataInfo=new tH(this)),this._dataInfo}getCaseLocaleReference(e){let n=this.getRawConfigProps(),o=e||this.getValue(d.getProperty(d.CASE_INFO.CASE_TYPE_ID))||this.getValue(d.CLASS_ID,d.getProperty(d.DATA_INFO.DATA_INFO_CONTENT))||n?.referenceClass||n?.className;return o?Gi(kr.CASE,o):null}getListActions(){return Kz(this)}getReferenceList(){return this._referenceList}isInsideList(){return this._isInsideList||/\[\d+\]/g.test(this.getPageReference())||/\[\d+\]/g.test(this.getPropertyName())}getRawMetadata(){return this.getMetadata()}setReferenceList(e){this._referenceList=e}getComponentConfig(){return this.getMetadata()?.config||{}}isExpressionExist(){return this._isExpressionExist}isWhenExist(){return this._isWhenExist}isConditionExist(){return this.isExpressionExist()||this.isWhenExist()}isBoundToState(){return this._isState}getPageReference(){return this._pageReference}getPropertyName(){let e=this.getComponentConfig(),n;return e.selectionMode==="multi"?n="selectionList":e.selectionMode==="single"&&e.selectionKey?n="selectionKey":e.renderMode==="Editable"?n="referenceList":this._type==="Address"?n="addressProp":n="value",this.getComponentConfig()[n]}getFullReference(){let e=this.getPageReference(),n=this.getPropertyName();return Q.getContextPath(e,n)}getContextName(){return this._contextName}getContainerName(){let{type:e}=this.getMetadata()||{},n=[d.CONTAINERS.ROOT_CONTAINER,d.CONTAINERS.VIEW_CONTAINER,d.CONTAINERS.FLOW_CONTAINER,d.CONTAINERS.MODAL_VIEW_CONTAINER,d.CONTAINERS.PREVIEW_VIEW_CONTAINER,d.CONTAINERS.HYBRID_VIEW_CONTAINER],{acTargetName:o=Ee.PRIMARY,name:r,routingInfo:i}=this.getComponentConfig();return(e&&n.includes(e)||i==="@ROUTING_INFO")&&r?r:this.options.containerName||o}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){let n=Ie?.getStore()?.getState()?.data[`${this.getContextName()}/${d.SUGGESTION}`],o=this.getStateProps()?.value,r=Q.getContextPath(this.getPageReference(),o),i=n?wn.getSuggestionsContext(this.getContextName()).getField(r):void 0;this._hasSuggestions=!!i,e.hasSuggestions=this._hasSuggestions,this._stateProps.hasSuggestions=this._hasSuggestions}}getConfigProps(e={}){let n={...gr.getDefaultsforType(this._type),readOnly:this._readOnly,...this._rawConfig?.config,...this._additionalRegisteredProps,...this._inheritedConfig};return eb.getStrategy(this._type)?.applyFallback(n),this.populateSuggestionProps(n),this.resolveConfigProps(n,e),y.resolveStringBooleans(e)}getLocalizationService(e){let n=this.getComponentName(),o=e||(n==="View"?this._rawConfig?.config?.template:n),r=T.getLocale()??"en-US",i=new jp(r,o),s=this.getCaseLocaleReference();return i.setLookupList(["APP!APPLICATION"]),s&&i.setLookupList([s]),i}getRawConfigProps(){let{_deepProps:e,...n}={...gr.getDefaultsforType(this._type),...this._rawConfig?.config,...this._additionalRegisteredProps,...this._inheritedConfig};return this.populateSuggestionProps(n),n}resolveConfigProps(e,n={}){return e&&(Q.resolveProps(e,n,this),ge.handleComponentMapping(n,{type:this.getComponentName()||"",config:e},this)),n}registerAdditionalProps(e={}){return Object.assign(this._additionalRegisteredProps,e),nb(e,this._stateProps),this.resolveConfigProps(this._additionalRegisteredProps)}deRegisterAdditionalProps(e=[]){return e.forEach(n=>{delete this._additionalRegisteredProps[n]}),!0}populateAdditionalProps(e){let n=a=>a?.map(c=>({...c,message:this.getLocalizationService()?.getLocalizedMessage(c.message)??c.message})),o=this.getComponentName(),r=this.getComponentConfig(),i=o===d.ROOT_CONTAINER&&e.renderingMode!=="portal";if(o===d.MODAL_VIEW_CONTAINER||o===d.CASE_CREATE_STAGE||o===d.OBJECTACTIONCONTAINER){let a=se(`${d.APP.APP}/${this.getContainerName()}`),c=Xt({context:a,category:A.PAGE});e.pageMessages=n(c),this._stateProps.pageMessages=e.pageMessages}if(this.isEditable()){let{value:a}=this.getStateProps();a===void 0&&this.getComponentConfig()?.selectionMode==="multi"?a=this.getStateProps().selectionList||ge.trimAnnotation(this.getRawConfigProps().selectionList):!a&&this.getComponentConfig()?.renderMode==="Editable"&&this.getStateProps().referenceList&&(a=this.getStateProps().referenceList);let c=Xt({property:a,pageReference:this.getPageReference(),context:this.getContextName(),type:A.MESSAGES.MESSAGES_TYPE_ERROR}),l=Xt({property:a,pageReference:this.getPageReference(),context:this.getContextName(),type:A.MESSAGES.MESSAGES_TYPE_INFO});c&&c[0]&&(e.validatemessage=c.map(p=>this.getLocalizationService().getLocalizedMessage(p.message).replace(/\.$/,"")).join(". ")+(c[c.length-1].message.endsWith(".")?".":""),e.status=d.FIELD_LEVEL_ERROR,this._stateProps.validatemessage=e.validatemessage,this._stateProps.status=e.status,c?.find(p=>p.type==="error"&&p.subType==="required")&&!e.required&&this.isVisible()&&this.clearErrorMessages({property:a,subType:"required"})),l&&l[0]&&(e.infoMessage=l[0].message,e.status=d.FIELD_LEVEL_WARNING,this._stateProps.infoMessage=e.infoMessage,this._stateProps.status=e.status)}if(o===d.ROOT_CONTAINER){let a=rP(i,se(`${d.APP.APP}/${this.getContainerName()}`));e.httpMessages=Array.isArray(a)?n(a):a,this._stateProps.httpMessages=e.httpMessages;let c=wn.getSharedState("isLoggedOut");e.isLoggedOut=c,this._stateProps.isLoggedOut=c;let l=Xt({context:d.APP.ROOT,category:"PAGE"});e.pageMessages=n(l),this._stateProps.pageMessages=e.pageMessages}if(o===d.HYBRID_VIEW_CONTAINER){let a=Xt({context:d.APP.APP,category:d.HTTP});e.httpMessages=n(a),this._stateProps.httpMessages=a}if(o===d.APP_SHELL&&e.portalDocMode===d.CONTAINER_TYPE.MULTIPLE&&(e.activeCases=Nr.getOpenedCaseItems(`${A.APP.APP}/${d.PRIMARY}`),this._stateProps.activeCases=e.activeCases),o===d.APP_SHELL){let a=d.APP.APP,c=se(`${a}/${this.getContainerName()}`),l=[...Xt({context:a,category:"PAGE"})||[],...Xt({context:c,category:"PAGE"})||[]],u=l.length>0?l:void 0;e.pageMessages=u&&n(u),this._stateProps.pageMessages=e.pageMessages}if(e.value&&o===d.SCALARLIST&&(this._stateProps.value=e.value),o===d.APP_SHELL||o===d.MODAL_VIEW_CONTAINER||o===d.CASE_CREATE_STAGE||r.template===d.CASE_PREVIEW||r.template===d.RULE_PREVIEW){let a=Xt({context:d.APP.APP,category:"HTTP"}),c=T.getRenderingMode()==="HYBRID"?`${this.getContextName()}/${this.getContainerName()}`:`${d.APP.APP}/${this.getContainerName()}`,l=Xt({context:se(c),category:"HTTP"});a?l&&(a=a.concat(Xt({context:se(c),category:"HTTP"}))):a=Xt({context:se(c),category:"HTTP"}),e.httpMessages=a&&a.map(u=>this.getLocalizationService().getLocalizedMessage(u.message)),this._stateProps.httpMessages=e.httpMessages,a?.forEach(u=>{u.errorDetails&&(e.errorDetails=e.errorDetails?e.errorDetails.push(...u.errorDetails):u.errorDetails,this._stateProps.errorDetails=e.errorDetails),u.correlationID&&(e.correlationID=u.correlationID)})}if(o===d.VIEW_CONTAINER||o===d.FLOW_CONTAINER||o===d.MODAL_VIEW_CONTAINER||o===d.PREVIEW_VIEW_CONTAINER||o===d.ROOT_CONTAINER||o===d.OBJECTACTIONCONTAINER){if(e.routingInfo=mf(this.getContainerName(),this._contextName),o===d.ROOT_CONTAINER&&(e.rootConfig=ql.getItemView(e.routingInfo,e.renderingMode),this._stateProps.rootConfig=e.rootConfig),this._stateProps.routingInfo=e.routingInfo,o===d.FLOW_CONTAINER||o===d.OBJECTACTIONCONTAINER){let a=Xt({context:this.getContextName(),category:d.CASEMESSAGES}),c=this.getContextName();e.caseMessages=a,this._stateProps.caseMessages=e.caseMessages,e.caseViewMode=this.getValue("context_data.caseViewMode"),this._stateProps.caseViewMode=e.caseViewMode;let l=Ke(c)[0];if(l){let u=se(l),p=Ie?.getStore()?.getState()?.data;p&&u&&(e.lastUpdateTime=p[u]?.caseInfo?.lastUpdateTime,this._stateProps.lastUpdateTime=p[u]?.caseInfo?.lastUpdateTime);let m=Xt({context:u,category:A.PAGE}),f=Xt({context:u,category:"HTTP"});e.httpMessages=n(f),e.pageMessages=n(m),this._stateProps.pageMessages=e.pageMessages,this._stateProps.httpMessages=e.httpMessages,f?.forEach(g=>{g.errorDetails&&(e.errorDetails=e.errorDetails?e.errorDetails.push(...g.errorDetails):g.errorDetails,this._stateProps.errorDetails=e.errorDetails),g.correlationID&&(e.correlationID=g.correlationID)})}}if(e.loadingInfo=this.getLoadingStatus(this.getContextName()),e.isAppOffline=J(d.APP.APP).context_data?.isOffline,e.assignmentNames=this.getCaseInfo().getAssignments()?.map(a=>a.name),e.childAssignmentNames=this.getCaseInfo().getChildAssignments()?.map(a=>a.name),o===d.MODAL_VIEW_CONTAINER){let a=e.routingInfo?.accessedOrder||[],c=a[a.length-1];c&&(e.loadingInfo=this.getLoadingStatus(c))}this._stateProps.loadingInfo=e.loadingInfo,this._stateProps.isAppOffline=e.isAppOffline,this._stateProps.assignmentNames=e.assignmentNames,this._stateProps.childAssignmentNames=e.childAssignmentNames}else r.template===d.CASE_VIEW||r.template===d.RULE_VIEW||r.template===d.SELF_SERVICE_CASE_VIEW||r.template===d.CASE_PREVIEW||r.template===d.RULE_PREVIEW||r.template===d.OBJECT_PAGE?(e.caseInfo=this.getCaseSummary(),this._stateProps.caseInfo=e.caseInfo):o===d.CASE_STAGES&&(e.stages=this.getCaseStages(),e.stageID=this.getStageID(),this._stateProps.stages=e.stages,this._stateProps.stageID=e.stageID);this.getInheritedProps()?.shouldAutoRefresh&&this.meta?.config?.value?.includes("@P")&&this.meta.config._autoRefresh_===void 0&&(this.meta.config._autoRefresh_=`@REFRESH ${this.meta.config?.value.split("@P ")[1]}`),this.populateFieldMetadata(e),this.doesContextExist()&&this.updateContextTree()}populateFieldMetadata(e){let{value:n,datasource:o,listType:r}=this.getComponentConfig(),{propertyValue:i,propertyAnnotation:s}=this.getPropertyDetails(r,o,n);if(i&&typeof i=="string"&&(i.includes(s)||i.includes(d.ATTACHMENT_ANNOTATION))){let a=ge.getPropertyName(i),c=this.getFieldMetadata(a);c&&this.updateConfigData(e,c,a)}}resolvePropertyMetadata(e,n){if(!e)return e;let o=l0(`${this._pageReference}.${n}`,this._contextName);if(!Array.isArray(e)){let{additionalInformation:r,classID:i}=e;this._checkAndSetDecisionParagraph("additionalInformation",r??void 0,i)?this._additionalRegisteredProps.additionalInformation=r:r&&this.setStateProps({additionalInformation:o}),e.additionalInformation=o;let{inputFormat:a}=e;if(typeof a=="string"&&a.startsWith("@")){let c=ge.handleAnnotation(a,this);typeof c=="object"&&c!==null&&"pattern"in c&&typeof c.pattern=="string"?e.inputFormat={pattern:c.pattern}:e.inputFormat=null}}return e}getFieldMetadata(e){if(!e)return null;let n=e.split(".");if(n.length<2){let s=this.getValue(d.CLASS_ID);return!s&&this._rawConfig&&this._rawConfig.config&&this._rawConfig.config.ruleClass&&(s=this._rawConfig.config.ruleClass),this.resolvePropertyMetadata(ft(e,s),e)}let o=n.pop(),r=n.join(".")?".":"",i=this.getValue(`${r}${n.join(".")}${d.CLASS_ID}`);return i||(i=y.resolvePageClass(e,this.getCurrentClassID())),this.resolvePropertyMetadata(ft(o,i),e)}getCurrentPageFieldMetadata(e=null){let n=this.getPageReference().split(".");e!==null&&(n=e.split("."));let o=n.pop();return this.resolvePropertyMetadata(ft(o,this.getValue(`${n.join(".")}${d.CLASS_ID}`)))}getCurrentClassID(){return this._classID??this.getValue(d.CLASS_ID)}getCaseSummary(){let e={...this.getDataObject()[d.getProperty(A.CASE_INFO.CASE_INFO)]};return e.CaseID=e.CaseID||this.getValue(d.getProperty(A.CASE_INFO.CASE_INFO_PZINSKEY)),{...e,isCaseWideAction:()=>Jc(this.getContextName(),this.getPageReference())}}getReferencedUser(e){let n=this.getValue("referencedUsers");if(Array.isArray(n)){let o=n.find(r=>r.UserID===e);if(o)return{userId:o.UserID,UserName:o.UserName}}return n&&n[e]?n[e]:null}getCaseStages(){return this.getDataObject()[A.CASE_INFO.CASE_INFO].stages}getStageID(){return this.getDataObject()[A.CASE_INFO.CASE_INFO].stageID}getActions(){return this._actions}isRoot(){return this._isRoot}getRelativePath(){return this._relativePath}resolveContextProps(e){let{value:n}=this.getStateProps();n&&(e.error=this.getContextDataValue(`${this.getPageReference()+n}.error`),e.validatemessage=this.getContextDataValue(`${this.getPageReference()+n}.validatemessage`))}isValidatorExist(){return!!this._isValidatorExist}getValidationApi(){return new O8(this)}isEditable(){return!!(this._rawConfig&&this._rawConfig.config&&!(this._inheritedConfig&&this._inheritedConfig.readOnly)&&(Object.hasOwn(this._rawConfig.config,"value")||this._rawConfig.config.selectionList||this._rawConfig.config.renderMode==="Editable"&&this._rawConfig.config.referenceList)&&!(typeof this._rawConfig.config?.value=="string"&&this._rawConfig.config.value.includes("@FILTERED_LIST"))&&!(Object.hasOwn(this._rawConfig.config,"readOnly")&&(this._rawConfig.config.readOnly==="true"||this._rawConfig.config.readOnly===!0))&&!(Object.hasOwn(this._rawConfig.config,"disabled")&&this._rawConfig.config.disabled===!0))}isVisible(){return this._rawConfig?.config&&Object.hasOwn(this._rawConfig?.config,"visibility")&&typeof this._rawConfig?.config?.visibility=="string"?ge.handleAnnotation(this._rawConfig?.config?.visibility,this):typeof this.options?.visibility=="string"?ge.handleAnnotation(this.options?.visibility,this):!0}isReadOnly(){return this._readOnly===void 0?!1:this._readOnly==="true"||this._readOnly===!0?!0:typeof this._readOnly=="string"?ge.handleAnnotation(this._readOnly,this)===!0:!1}hasChildren(){return!!this._children}getComputedVisibility(e=[]){let n=this._type==="reference"&&!!this.getReferencedView(),o=n?this.getReferencedViewPConnect().getPConnect():this,r=e;if(n){let u=`${this.getRawMetadata()?.config?.name}!${this._ruleClass}`;if(e.includes(u))return!1;r=[...e,u]}if(this.getConfigProps().visibility===!1)return!1;if(o.getConfigProps().requiresVisibleChildren===!1||this.getConfigProps().requiresVisibleChildren===!1)return!0;let i=o.getConfigProps(),s={includeTypes:["Group","Region","View"],excludeTemplates:["ListView","SimpleTable","StudioTable"]},a=o._type&&s.includeTypes.includes(o._type)&&!s.excludeTemplates.includes(i.template);if(i.highlightedData&&i.highlightedData.length&&i.showHighlightedData&&(a=!1),!a)return!0;let l=o.getChildren();return l?l.some(u=>u.getPConnect().getComputedVisibility(r)):!1}getChildrenIterator(){return this._children.setContext(this.getPageReference()),this._children}setAction(e,n){this._actions[e]=n}getComponentName(){return this._rawConfig&&this._rawConfig.type}isComponentRefreshable(){return!!(this._rawConfig&&this._rawConfig.isRefreshable)}getDataObject(e){return J(e||this.getContextName())}getImagePath(e){return`${We.getConstellationServiceUrl()}/v860/${We.getAppAlias()}/image/${e}?org=${Se.getOrganizationName()}`}skipRequiredValidation(){return this.options.isBulkAction}isBulkAction(){return this.options.isBulkAction}getChildren(){if(this._children&&this._children.length){let e=this.options?.inheritedProps?.find(r=>r?.prop==="shouldAutoRefresh");e&&(this._inheritedConfig._inheritedProps=[...this._inheritedConfig._inheritedProps||[],e]);let n=aH(this._rawConfig,{pageReference:this._pageReference,context:this._contextName,localeReference:this._localeRuleName,hasForm:this.options.hasForm,isBulkAction:this.options.isBulkAction,containerName:this.getContainerName(),containerItemName:this.options.containerItemName,viewName:this.viewName,inheritedConfig:this._inheritedConfig,target:this._containerTarget,readOnly:this._readOnly,categoryName:this._type==="Group"?this._rawConfig?.config?.id:null,relativePath:this._relativePath}),o=[];for(;n?.hasNext();){let r=n.next();(!this.isBulkAction()||!this.#n(r))&&o.push(r)}return n?.resetIndex(),o}return[]}setInheritedProp(e,n,o=!1){this._inheritedConfig[e]=n;let r=Object.hasOwn(this._inheritedConfig._deepProps??{},e);(o||r)&&(this._inheritedConfig._deepProps={...this._inheritedConfig._deepProps,[e]:n})}getDeepInheritedProps(){return{...this._inheritedConfig?._deepProps}}getDeepInheritedConfig(){let e=this.getDeepInheritedProps();return Object.keys(e).length>0?{...e,_deepProps:e}:void 0}#e(e){let n=this.getDeepInheritedConfig();return n?{...e,inheritedConfig:{...e.inheritedConfig,...n}}:e}getLocaleRuleName(){return this._localeRuleName}getLocalizedValue(e,n,o){let r=o||this.getLocaleRuleName(),i=r&&n?`${r}#${n}`:r,s=this.getLocalizationService(i).getLocalizedText(e);return s===e?this.getLocalizationService().getLocalizedText(e):s}getLocaleRuleNameFromKeys(e,n,o){return`${e}!${n}!${o}`}getValue(e,n){if(e=e?.replace(/\((\d+)\)/g,(i,s)=>`[${parseInt(s,10)-1}]`),this.useCustomContext)return e=e.startsWith?.(".")?e.substring(1):e,e.split?.(".").reduce((i,s)=>i?.[s]??void 0,this.useCustomContext);let o=n||this.getPageReference(),r=e?.match(/^(Parent(?:\.Parent)*)(?:\.(.*))?$/);if(r){let i=r[1].split(".").length,s=r[2]||"",a=o?.split(".")||[];o=a.slice(0,Math.max(a.length-i,0)).join("."),s?e=`.${s}`:(e=o,o="")}return this._hasSuggestions&&this.getStateProps()?.value===e?Q.getPropertyValue(e,o,`${this._contextName}/${d.SUGGESTION}`):Q.getPropertyValue(e,o,this._contextName)}setInheritedConfig(e){if(!e)return;let{readOnly:n,displayMode:o,referenceType:r,hideLabel:i}=e;i&&(this._inheritedConfig.hideLabel=i),r&&(this._inheritedConfig.referenceType=r),o&&(this._inheritedConfig.displayMode=o),(this._inheritedConfig.readOnly||n)&&(this._inheritedConfig.readOnly=n),e.inheritedProps&&(e.inheritedProps?.forEach(s=>{s.prop==="required"&&(this._inheritedConfig[s.prop]=s.value)}),cH(this._inheritedConfig,e))}getInheritedProps(){let e={},n={};return this._inheritedConfig.inheritedProps?.forEach(o=>{n[o.prop]=o.value}),Q.resolveProps(n,e,this),e}setValue(e,n,o,r=!1,i={}){if(!y.isValidPropertyReference(e))return;let s,a,{isArrayDeepMerge:c}=i;this.isInsideList()&&this.getListActions().updateProperty(e,n),this.isBulkAction()&&(s=!0,n||(a=!0)),v({type:"SET_PROPERTY",payload:{reference:Q.getContextPath(this.getPageReference(),e),value:n,initialValue:o,isImplicit:r,context:this.getContextName(),...c!==void 0&&{isArrayDeepMerge:c},...s&&{isStrictTracking:s},...a&&{removePropertyFromChangedList:a}}})}updateDirtyCheckChangeList(e,n){let o={reference:`${this.getPageReference()}${e}`,value:n,context:this.getContextName()};uH(o)}getContextDataValue(e,n){return Ss(n||this.getPageReference(),e,this._contextName)}updateState(e){let n=this._pageReference.indexOf(d.CASE_INFO.CASE_INFO_CONTENT),o=this._pageReference.indexOf("."),r=d.CASE_INFO.CASE_INFO_CONTENT;n!==0&&(r=o>0?this._pageReference.substring(o):this._pageReference),v(Ne({context:this._contextName,data:e,rootPageReference:r}))}replaceState(e,n,o={}){if(!y.isValidPropertyReference(e))return;let{skipDirtyValidation:r=!1}=o;v({type:"REPLACE_PROPERTY",payload:{reference:Q.getContextPath(this.getPageReference(),e),value:n,context:this.getContextName(),skipDirtyValidation:r}})}reportError(e,n,o){v(bs(e,n||{},o,n?.formFields))}getComponent(){return c0({getPConnect:()=>this})}createComponent(e,n,o,r){let i=this._pageReference;if(n){let s=uc(`${this.getPageReference()}.${d.SUMMARY_OF_LISTS}`,n,this._contextName);i=Q.getContextPath(s||n,o)||n}else if(r&&r.pageReference){let s=r.pageReference;s=ge.handleAnnotation(s,this),i=Q.getContextPath(this._pageReference,s)||""}return c0(ct({meta:e,index:this.index,options:this.#e({containerName:this.getContainerName(),hasForm:this.options.hasForm,...e.options,pageReference:i,context:this._contextName,target:this._containerTarget,readOnly:this._readOnly||this._inheritedConfig?.readOnly,viewName:this.viewName}),useCustomContext:this.useCustomContext}),r)}getReferencedView(){if(this.meta)return Q.resolveReference(this.resolveConfigProps(this.meta),this)}_resolvePageRef(e){return this.getPageReference().includes(e)||e.startsWith(d.CLASS_ANNOTATION)?this.getPageReference():`${this.getPageReference()}${e}`}getReferencedViewPConnect(e=!1){let n={...this.getComponentConfig()},o=this.options?.inheritedConfig?._inheritedProps?.find(r=>r.prop==="shouldAutoRefresh");return o&&!n?.inheritedProps?.some(r=>r.prop==="shouldAutoRefresh")&&n?.inheritedProps?.push(o),delete n?.name,delete n?.type,ct({meta:this.getReferencedView(),options:this.#e({...e?this.options:void 0,...n,context:this.getContextName(),pageReference:n.context?this._resolvePageRef(n.context):this.getPageReference(),viewName:this.viewName})})}getContainerManager(){return new kp(this)}getActionsApi(){return this._actionsApi||(this._actionsApi=new eH(this)),this._actionsApi}getActionManager(){return M}doesContextExist(e){return Up(e??this.getContextName())}getGoogleMapsAPIKey(){return At.getGoogleMapsAPIKey()}getServerURL(){return At.getServerURL()}getLoadingStatus(e){let n=null;return e?(n=J(e),n=n?n.context_data:null):n=this.getDataObject().context_data,n&&n.isLoading?n.isLoading:!1}clearErrorMessages(e){e?.property?ht({type:"error",property:e.property,pageReference:this.getPageReference(),context:this.getContextName(),...e.subType&&{subType:e.subType}}):e?.context?ht({type:"error",...e}):(ht({type:"error",...e,context:d.APP.APP}),ht({type:"error",...e,context:se(`${d.APP.APP}/${this.getContainerName()}`)}))}resolveDatasourceReference(e){return uc(`${this.getPageReference()}.${d.SUMMARY_OF_LISTS}`,e,this.getContextName())||e}removeFormField(){}addFormField(){}setPageValue(e,n,o){delete e?.classID,this.replaceState(n,e),o?qz(e,n,this):NV(this.getContextName(),`${this.getPageReference()}${n}`,this.getStateProps()?.value??"")}acceptSuggestion(e){if(this.getStateProps()?.value&&this.options.hasForm&&this._hasSuggestions){let n=wn.getSuggestionsContext(this.getContextName()),o=this.getStateProps()?.value||e,r=Q.getContextPath(this.getPageReference(),o),i=n.getField(r);this._hasSuggestions=!1,this.getActionsApi().updateFieldValue(o,i),this.getActionsApi().triggerFieldChange(o,i),n.removeField(r,{actionPerformed:"accepted"})}}ignoreSuggestion(e){if(this.getStateProps()?.value&&this.options.hasForm&&this._hasSuggestions){let n=this.getStateProps()?.value||e,o=Q.getContextPath(this.getPageReference(),n);this._hasSuggestions=!1,wn.getSuggestionsContext(this.getContextName()).removeField(o,{actionPerformed:"ignored"}),lc.getDependencies(this._contextName,o)?.forEach(i=>{wn.getSuggestionsContext(this.getContextName()).removeField(i,{actionPerformed:"ignored"})})}}getSelfReferencingDatapageKeys(){let e=[],n=this.getPropertyName(),o=this.getFieldMetadata(n),{datasource:{parameters:r={}}={}}=o||{};return Object.values(r).forEach(i=>{let[,s]=i.split("."),a=n?.split(".").pop();s===a&&e.push(i.substring(i.lastIndexOf(".")+1))}),e}isReadOnlyField(){let{value:e,datasource:n,listType:o}=this.getComponentConfig(),{propertyValue:r,propertyAnnotation:i}=this.getPropertyDetails(o,n,e);if(!r||typeof r!="string"||!(r.includes(i)||r.includes(d.ATTACHMENT_ANNOTATION)))return!1;let s=ge.getPropertyName(r),a=this.getFieldMetadata(s);if(!a)return!1;let c={...this.getComponentConfig(),fieldMetadata:a,template:this._rawConfig?.config?.template};return this.#t(c,s)}#t(e,n){let o=On.isPropertyInternal(n),r=e.datasource,i=this.getComponentConfig().isSearchField,{isClassKey:s,isSpecial:a,isDeclarativeTarget:c}=e.fieldMetadata??{},l=e.template==="DataReference"||this.meta?.type==="ObjectReference",u=e.listType!==d.ASSOCIATED;return i?!1:!!(c||o||!r&&(s&&!l||a)&&u)}getPropertyDetails(e,n,o){return e===d.ASSOCIATED?{propertyValue:n,propertyAnnotation:d.ASSOCIATED_PROPERTY_ANNOTATION}:{propertyValue:o,propertyAnnotation:d.PROPERTY_ANNOTATION}}updateConfigData(e,n,o){e.fieldMetadata=n,n.additionalInformation&&(e.additionalInformation=n?.additionalInformation),n.inputFormat&&typeof n.inputFormat!="string"&&(e.inputFormat=n.inputFormat),this.#t(e,o)&&(e.readOnly=!0,this._stateProps.readOnly=e.readOnly,e.fieldMetadata.isDeclarativeTarget&&this.registerAdditionalProps({readOnly:!0})),e.fieldMetadata?.isReadOnly&&(e.readOnly=!0,this.registerAdditionalProps({readOnly:!0}))}#n(e){let n=e.getPConnect().getComponentName(),o=e.getPConnect().getConfigProps().template;return!(ql.allowedComponetsForBulkProcessing[n]===!0||ql.allowedComponetsForBulkProcessing[n]?.[o]===!0)}};function ct(t){let e=new Na(t);return{getPConnect:()=>e}}function lH(t){c0=t}var u0=class t{_grammar;_state;_tree;_exprStr;_endState;_subParser;_position;constructor(e,n,o){this._grammar=e,this._state="expectOperand",this._exprStr=n||"",this._endState=o||{},this._subParser=null}static _setParent(e,n){Object.defineProperty(e,"_parent",{value:n,writable:!0})}_addToken(e){let n=rb[this._state],o=this._exprStr;if(this._exprStr+=e.element,n.subHandler){this._subParser||this._startSubExpression(o);let r=this._subParser?._addToken(e);r&&(this._endSubExpression(),this._state=r)}else if(n.operatorTypes?.[e.tokenType]){let r=n.operatorTypes[e.tokenType],i=d0[e.tokenType];i&&i.call(this,e),r.toState&&(this._state=r.toState)}else{if(this._endState[e.tokenType])return this._endState[e.tokenType];throw new Error(`Token ${e.element} (${e.tokenType}) unexpected in expression: ${this._exprStr}`)}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){let{endStates:n}=rb[this._state];this._subParser=new t(this._grammar,e,n)}_endSubExpression(){rb[this._state].subHandler.call(this,this._subParser.buildAst()),this._subParser=null}setPositionInAST(e){this._position?(this._position.right=e,t._setParent(e,this._position)):this._tree=e,this._position=e}},ob=u0;var Rme="literal",f0="identifier",Pme=t=>typeof t=="object"&&t!==null&&"operationType"in t,p0={operatorType:"binaryOperator",precedence:1,evaluate:(t,e)=>typeof t=="object"||typeof e=="object"?!1:t&&e},m0={operatorType:"binaryOperator",precedence:1,evaluate:(t,e)=>typeof t=="object"||typeof e=="object"?!1:t||e},dH=(t,e,n)=>{let o=t==="",r=e===""||e===null||e===void 0;if(o&&r)return n;if(typeof e=="boolean"){let s=!o&&t!=="false"&&t!=="0"?!!t:!1;return n?s===e:s!==e}return o!==r?!n:n?t===e:t!==e},pH={">":{operatorType:"binaryOperator",precedence:2,evaluate:(t,e)=>t>e},">=":{operatorType:"binaryOperator",precedence:2,evaluate:(t,e)=>t>=e},"<":{operatorType:"binaryOperator",precedence:2,evaluate:(t,e)=>t<e},"<=":{operatorType:"binaryOperator",precedence:2,evaluate:(t,e)=>t<=e},"==":{operatorType:"binaryOperator",precedence:2,evaluate:(t,e)=>typeof t=="object"||typeof e=="object"?!1:dH(t,e,!0)},"!=":{operatorType:"binaryOperator",precedence:2,evaluate:(t,e)=>typeof t=="object"||typeof e=="object"?!0:dH(t,e,!1)},"!":{operatorType:"unaryOperator",precedence:999,evaluate:t=>{let e=typeof t=="object"?t.value:t;return e==="true"||e==="false"?e!=="true":!e}},"(":{operatorType:"openParenthesis"},")":{operatorType:"closeParenthesis"},"&&":p0,AND:p0,and:p0,"||":m0,OR:m0,or:m0,CONTAINS:{operatorType:"binaryOperator",precedence:2,evaluate:(t,e)=>String(t).includes(String(e))},NOT_CONTAINS:{operatorType:"binaryOperator",precedence:2,evaluate:(t,e)=>!String(t).includes(String(e))},STARTS_WITH:{operatorType:"binaryOperator",precedence:2,evaluate:(t,e)=>String(t).startsWith(String(e))},NOT_STARTS_WITH:{operatorType:"binaryOperator",precedence:2,evaluate:(t,e)=>!String(t).startsWith(String(e))},ENDS_WITH:{operatorType:"binaryOperator",precedence:2,evaluate:(t,e)=>String(t).endsWith(String(e))},NOT_ENDS_WITH:{operatorType:"binaryOperator",precedence:2,evaluate:(t,e)=>!String(t).endsWith(String(e))},IS_NULL:{operatorType:"binaryOperator",precedence:2,evaluate:t=>!t},IS_NOT_NULL:{operatorType:"binaryOperator",precedence:2,evaluate:t=>!!t},IS_IN_LIST:{operatorType:"binaryOperator",precedence:2,evaluate:(t,e)=>String(e).split(",").includes(String(t))},IS_NOT_IN_LIST:{operatorType:"binaryOperator",precedence:2,evaluate:(t,e)=>!String(e).split(",").includes(String(t))}},Nme=(t,e,n)=>{if(typeof t.value!="string")return"";let o=t.value.substring(1),r=e?.getFieldMetadata(o)?.type??"";if(r)return r;let{pageReference:i,context:s}=n??{};if(!i||!s)return"";let a=Q.resolveClassID(t.value,i,s),c=ft(o,a);return c&&!Array.isArray(c)?c.type??"":""},g0={BinaryExpression:function(e){let n=[],o=e.right,r=e.operator??"",i=e.left;if(!i)return!1;let s=typeof i.value=="boolean"?"True-False":"";n[0]=this.evaluateAST(i),!s&&i.operationType===f0&&(s=Nme(i,this._context,this._contextTreeNodeContext)),n[1]=o?this.evaluateAST(o,s):"";let a=this._grammar[r];return a?.evaluate?a.evaluate(n[0],n[1]):!1},identifier:function(e){let n=typeof e.value=="string"?e.value:"";if(this._localDataObject)return y.getIn(this._localDataObject,n?n.substring(1).split("."):[])??"";if(this._contextTreeNodeContext)return Q.getLitePropertyValue(this._contextTreeNodeContext,n)??"";if(!this._context)return"";let o=this._context.getFieldMetadata(n)?.type??"",r=this._context.getValue(n)??"";if(o==="Decimal"&&typeof r=="string"){let i=parseFloat(r);return Number.isNaN(i)?"":i}return r},literal:function(e,n){return(n===void 0||n===""||n==="True-False")&&(e.value==="true"||e.value==="false")?e.value==="true":e.value??""},UnaryExpression:function(e){let n=e.operator,o=e.right;if(!n||!o)return!1;let r=this._grammar[n];return r?.evaluate?r.evaluate(o):!1}},d0={unaryOperator:function(e){this.setPositionInAST({operationType:"UnaryExpression",operator:String(e.value)})},binaryOperator:function(e){let n=String(e.value),{precedence:o}=this._grammar[n],r=this._position._parent,i=r?r.operator:null,s=i?this._grammar[i]:null,a=s?s.precedence:null;if(a&&o)for(;r?.operator&&a>=o;)this._position=r,r=r._parent;let c={operationType:"BinaryExpression",operator:n,left:this._position};ob._setParent(this._position,c),r?(this._position=r,this.setPositionInAST(c)):(this._tree=c,this._position=c)},identifier:function(e){let n={operationType:f0,value:e.value};this.setPositionInAST(n)},literal:function(e){this.setPositionInAST({operationType:Rme,value:e.value})},subExpression:function(e){Pme(e)&&this.setPositionInAST(e)}},rb={expectOperand:{operatorTypes:{literal:{toState:"expectBinOp"},identifier:{toState:f0},unaryOperator:{},openParenthesis:{toState:"subExpression"}}},expectBinOp:{operatorTypes:{binaryOperator:{toState:"expectOperand"}}},identifier:{operatorTypes:{binaryOperator:{toState:"expectOperand"}}},subExpression:{subHandler:d0.subExpression,endStates:{closeParenthesis:"expectBinOp"}}};var Ome=["binaryOperator","unaryOperator","openParenthesis"],xme=/^\s*$/,mH=/^[a-zA-Z_.$][(0-9)a-zA-Z0-9_.$]*$/,Dme="literal",$me="identifier",wme=/\\\\/,Mme=["'(?:(?:\\\\')|[^'])*'",'"(?:(?:\\\\")|[^"])*"',"\\s+","\\btrue\\b","\\bfalse\\b"],kme=["[a-zA-Z_.$][a-zA-Z0-9_.$]*(?:\\(\\d+\\))?(?:\\.[a-zA-Z0-9_.$]+)*","[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}|[0-9]{4}-[0-9]{2}-[0-9]{2}","(?:(?:[0-9]*\\.[0-9]+)|[0-9]+)"],Lme=/^-?(?:(?:[0-9]*\.[0-9]+)|[0-9]+)$/,h0=class t{_grammar;_splitRegex;constructor(e){this._grammar=e}static _isNegative(e){return Ome.some(n=>n===e[e.length-1].tokenType)}static _isWhitespace(e){return!!e.match(xme)}static _createWordboundary(e){return e=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),e.match(mH)&&(e=`\\b${e}\\b`),e}static _unquote(e){let[n]=e,o=new RegExp(`\\\\${n}`,"g");return e.substr(1,e.length-2).replace(o,n).replace(wme,"\\")}_getSplitRegex(){if(!this._splitRegex){let e=Object.keys(this._grammar).sort((n,o)=>o.length-n.length).map(n=>t._createWordboundary(n),this);this._splitRegex=new RegExp(`(${[Mme.join("|"),e.join("|"),kme.join("|")].join("|")})`)}return this._splitRegex}_splitExpression(e){let n=this._getSplitRegex();return e.split(n).filter(o=>o.trim())}_createToken(e){let n={tokenType:Dme,value:e,element:e};return e.startsWith('"')||e.startsWith("'")?n.value=t._unquote(e):e.match(Lme)?n.value=parseFloat(e):e==="true"||e==="false"?n.value=e==="true":this._grammar[e]?n.tokenType=this._grammar[e].operatorType:e.match(mH)&&(n.tokenType=$me),n}_getTokens(e){let n=[],o=!1;for(let r=0;r<e.length;r+=1)t._isWhitespace(e[r])?n.length&&(n[n.length-1].element+=e[r]):e[r]==="-"&&t._isNegative(n)?o=!0:(o&&(e[r]=`-${e[r]}`,o=!1),n.push(this._createToken(e[r])));return n}tokenize(e){let n=this._splitExpression(e);return this._getTokens(n)}},fH=h0;var y0=class{_grammar;_expression;_ast;_context;_contextTreeNodeContext;_localDataObject;constructor(e,n){this._grammar={...pH},this._expression=e,this._ast=null,this._contextTreeNodeContext=null,this._localDataObject=n}buildAST(){let n=new fH(this._grammar).tokenize(this._expression),o=new ob(this._grammar);return o.addTokens(n),this._ast=o.buildAst(),this}evaluate(e,n){return this._context=e,this._contextTreeNodeContext=n,this.evaluateAST(this._ast)}evaluateAST(e,n){return hH(e.operationType,g0)&&g0[e.operationType].call(this,e,n)}},gH=y0;var S0=(t,e)=>{let n=/[a-zA-Z0-9_)"'\s]=[a-zA-Z0-9_("'\s]/,o=t.replace(n,r=>r.replace("=","=="));return new gH(o,e)},E0=t=>t?t.buildAST():!0,A0=(t,e,n)=>t?t.evaluate(e,n):!0,ib=(t,e,n)=>{let o=S0(t,e),r=E0(o);return A0(r,n)},hH=(t,e)=>t in e;var C0=class{static handleExpression(e,n,o,r){let i=this.getContext(e,r),a={actionObject:{action:"decexp",params:{source:e,value:n,targets:o},context:i}};At.fetchData(a).then(c=>c.json()).then(c=>{this.updateState(c,r)}).catch(c=>console.log(c))}static getContext(e,n){let o=e.substring(0,e.indexOf(".")),r=Q.getPropertyValue(`${o}.${O.getDefaultQualifiedName("pxObjClass")}`,null,n)||Q.getPropertyValue(`${o}.${O.getDefaultQualifiedName("pyClassName")}`,null,n);return{name:o,class:r}}static updateState(e,n){Object.keys(e).forEach(o=>v({type:Pt,payload:{context:n,reference:o,value:e[o]}}))}},yH=C0;var sb={},SH=(t,e)=>sb[e]&&Object.hasOwn(sb[e],t),I0=t=>{let{context:e}=t;SH(t.reference,e)&&yH.handleExpression(t.reference,t.value,sb[e][t.reference],e)},nR=(t={})=>{y.copy(t,sb)},Ume=(t,e,n)=>ib(t,e,n?.pConnect.getPConnect());var b0=class{static isPageInstruction(e){return e&&e.includes("[")&&e.includes("]")}},ab=b0;var Fp={IDLE:"idle",SAVING:"saving",SKIPPED:"skipped",ERROR:"error"},zme=5e3,jme=()=>{let t=Number(T.getFeatureMap()?.pyAutoSaveDurationInMS);return t>0?t:zme},T0='input[type="text"], input[type="email"], input[type="number"], input[type="search"], input[type="tel"], input[type="url"], input[type="password"], input[type="date"], input[type="time"], input[type="month"], input[type="week"], input[type="datetime-local"], input:not([type])',Fme=`${T0}, textarea, [contenteditable="true"]`,qi=new Map,Fs=new Map,lb=new Set,Jy=new Map,Yy=new Map,Vp=new Set,cb=(t,e)=>{Jy.get(t)?.forEach(n=>n(e))},Vme=t=>{let e=Yy.get(t);if(!(!e||e.size===0)){for(let[n,o]of e)Ue.executeStateMachine(t,n,o,!0,{skipStateUpdate:!1,skipDirtyValidation:!1})||v(wa({reference:n,value:o,context:t,isImplicit:!1,skipDirtyValidation:!1}));Yy.delete(t)}},Bme=(t,e)=>{let n=t,o=n.includes(d.MODAL),r=ie(A.CASE_INFO.CASE_INFO_ID,null,n),i=ie(A.CASE_INFO.ASSIGNMENT_ID,null,n),a=ie(A.CASE_INFO.ACTIVE_ACTION_ID,null,n)||ie(A.CASE_INFO.ASSIGNMENTACTION_ID,null,n),c=ie(A.CASE_INFO.CASE_TYPE_ID,null,n),l=ie("isProcessAction","isProcessAction",n),u=M.getNextActionMgrId(),p={context:n,containerItemID:t,assignmentID:i,actionID:a,caseID:r,containerName:e,caseType:c,isModalAction:o,isFormValid:void 0,isProcessAction:l,saveOnly:!0,autosave:!0,actionMgrID:u},m,f,g=new Promise((h,E)=>{m=h,f=E});if(m&&f)M.register(u,g,m,f,ji,p,!0);else throw new Error("Promise executor did not synchronously assign resolveFn/rejectFn.");return vt.executeOrQueueDeferredAction(Gl(p)),g},ub=(t,e)=>{let n=Fs.get(t);n!==void 0&&clearTimeout(n),Fs.set(t,setTimeout(()=>{Fs.delete(t),e()},jme()))},v0=t=>{let e=Ye(t),n=re(e);return!n||!In(n)?!0:se(n)===e},db=async t=>{if(lb.has(t)||Vp.has(t))return;let e=qi.get(t);if(!e||!v0(t))return;let n=typeof document<"u"?document.activeElement:null;if(n&&n===hj(t)&&n.matches(T0)){ub(t,()=>db(t).catch(()=>{}));return}Vme(t);let o=!1;Xv(!0);try{if(!Sr.hasUnsavedChanges(t))return;o=Sr.isFormValid(t)}finally{Xv(!1)}if(!o){cb(t,Fp.SKIPPED);return}lb.add(t),cb(t,Fp.SAVING);try{await Bme(t,e.containerName),Sr.clearChangedProperties(t),cb(t,Fp.IDLE)}catch{cb(t,Fp.ERROR)}finally{lb.delete(t)}},EH=()=>{if(!(typeof document>"u"||!document.activeElement?.matches(Fme)))for(let e of qi.keys())Fs.has(e)&&v0(e)&&ub(e,()=>db(e).catch(()=>{}))},AH=EH,CH=t=>{t.key==="Tab"&&EH()},IH=t=>{let{target:e}=t;if(!(typeof Element>"u"||!(e instanceof Element)||!e.matches(T0)))for(let n of qi.keys())Fs.has(n)&&v0(n)&&(dA(n,e),ub(n,()=>db(n).catch(()=>{})))},_H=t=>{let e=t?.data?.caseInfo?.settings?.autoSave;if(e!=null)return!!e;let n=t?.containerItemID??t?.context;if(n){let o=ie("caseInfo.settings.autoSave",null,n);if(o!=null)return!!o}return!1},Vs=t=>qi.has(t),bH=(t,e,n)=>{let o=Yy.get(t);o||(o=new Map,Yy.set(t,o)),o.set(e,n)},TH=(t,e)=>{qi.size===0&&typeof document<"u"&&(document.addEventListener("pointerdown",AH,{passive:!0}),document.addEventListener("keydown",CH,{passive:!0}),document.addEventListener("input",IH,{capture:!0,passive:!0})),qi.set(t,e)},pb=t=>{let e=Fs.get(t);e!==void 0&&clearTimeout(e),Fs.delete(t),lb.delete(t),qi.delete(t),Vp.delete(t),Yy.delete(t),pA(t),qi.size===0&&typeof document<"u"&&(document.removeEventListener("pointerdown",AH),document.removeEventListener("keydown",CH),document.removeEventListener("input",IH,{capture:!0}))},R0=t=>{let e=`${t}/`;for(let n of[...qi.keys()])n.startsWith(e)&&pb(n)},vH=(t,e)=>{let n=Jy.get(t);return n||(n=new Set,Jy.set(t,n)),n.add(e),()=>{let o=Jy.get(t);o&&(o.delete(e),o.size===0&&Jy.delete(t))}},mb=t=>{let e=Fs.get(t);e!==void 0&&(clearTimeout(e),Fs.delete(t))},Bp=t=>{qi.has(t)&&(Vp.has(t)||ub(t,()=>db(t).catch(()=>{})))},RH=()=>Vp,PH=t=>{mb(t),Vp.add(t)},NH=t=>{Vp.delete(t),Sr.hasUnsavedChanges(t)&&Bp(t)};var{APP:Hme}=d,Tn={},dc={},pc={},xH=new Set([Ht,tt,st,hi]),Gme=new Set([Fr,Oo,Pt,Mc,No,ss,...xH]),md="You will lose unsaved changes. Do you want to continue?",vV="You have reached maximum limit of pending changes. Please commit/cancel one or more changes to continue.",qme=(t,e,n)=>{let o=dc[e]||{};return Object.keys(o).forEach(r=>{let i=o[r].associatedProperty;Object.hasOwn(o,r)&&(i===void 0||n.has(i))&&y.buildObject(r,t,o[r].value)}),t},sl=(t=Hme.APP,e,n)=>{let o=Tn[t]||{},r=dc[t]||{};if(Object.keys(o).length===0&&Object.keys(r).length===0)return{};let i=[],s=null;e||(i=il(t,!0)),n||(s=new Set(wV(t)));let a=new Set(i),c={};return qme(c,t,a),Object.keys(o).forEach(l=>{let u=!e&&a.has(l)||e;Object.hasOwn(o,l)&&u&&!s?.has(l)&&y.buildObject(l,c,o[l].value)}),c};var Zy=t=>{let{context:e}=t,n=t.reference.startsWith(".")?t.reference.substr(1):t.reference;delete Tn[e]?.[n],delete dc[e]?.[n]};Oz((t,e)=>{Zy({context:t,reference:e});let n=e.lastIndexOf(".");n<1||n===e.length-1||ht({type:d.MESSAGES.MESSAGES_TYPE_ERROR,context:t,pageReference:e.slice(0,n),property:e.slice(n)})});var DH=t=>t&&pc[t],ZR=t=>{t&&pc[t]&&(pc[t]=!1)},OH=(t,e)=>{let{context:n,initialValue:o="",isStrictTracking:r,associatedProperty:i}=e,s=e.reference.startsWith(".")?e.reference.substr(1):e.reference;t[s]?t[s].previousValue=ie(e.reference,null,n):(t[s]={initialValue:o||ie(e.reference,null,n)},t[s].previousValue=t[s].initialValue),t[s].value=e.value,i&&(t[s].associatedProperty=i),r&&t[s].value===t[s].initialValue&&Zy(e)},$H=t=>{let{payload:e}=t,{context:n}=e,o=e.reference.startsWith(".")?e.reference.substr(1):e.reference;be.isFieldExists(n,o)||(dc[n]=dc[n]||{},OH(dc[n],e)),Tn[n]=Tn[n]||{},OH(Tn[n],e)},wH=(t,e,n)=>{let o=Tn[t]||{},r;n instanceof Set?r=n:n&&n.length>0&&(r=new Set(n)),Object.keys(o).forEach(i=>{r?.has(i)||y.hasIn(e,i)&&(o[i].value=y.getIn(e,i))})},Qy=t=>{let e=Tn[t];if(!e)return{};let n={};return Object.keys(e).forEach(o=>{n[o]=e[o].value}),n},uH=({value:t,context:e,reference:n})=>{let o=re(e),r=Ze(o,e)||{};if(ab.isPageInstruction(n)||r?.subscriptFieldName)return;let i=n?.startsWith(".")?n?.substr(1):n;Tn[e]=Tn[e]||{},Tn[e][i]||(Tn[e][i]={initialValue:ie(i,null,e)}),Tn[e][i].value=t},jn=t=>t&&Tn[t]&&Object.keys(Tn[t]).some(e=>Tn[t][e].initialValue!==Tn[t][e].value)||!!DH(t),P0=(t,e)=>{if(!(t&&e))return!1;let n=Tn[t]&&Tn[t][e];return n?n.previousValue!==n.value:!1},Wme=()=>Object.keys(Tn).some(t=>jn(t)),fd=t=>{t&&Tn[t]?(Tn[t]={},dc[t]={}):t==="all"&&(Tn={},dc={},pc={}),pc[t]&&(pc[t]=!1),pA(t)},MH=(t,e,n=new Set)=>{if(n.has(e))return;n.add(e);let o=lc.getDependencies(t,e),r=Nn.getResetDependencies(t,e);[...o,...r].forEach(i=>{let s=y.getPropertyNameFromDependency(i);if(typeof i=="object"&&i.mode==="multiRecord"){let a=s.split("."),c=`.${a.pop()}`,l=a.join(".");Ue.isStateMachineExist(t,l,c)?Ue.getStateMachine(t,l,c).deleteAll():Vs(t)&&(Ue.setStateMachine(t,c,l,new qc(c,l,t)),Ue.getStateMachine(t,l,c)?.deleteAll(!1))}else ab.isPageInstruction(s)&&Ue.executeStateMachine(t,s,""),v({type:Pt,payload:{reference:s,value:"",context:t,isArrayDeepMerge:!0,isImplicit:!0}});MH(t,s,n)})},Kme=t=>{let{context:e,pageReference:n,value:o,reference:r}=t;Nn.triggerCascade(e,r,o);let i=lc.getDependencies(e,r),s={context:e,datapages:{}};MH(e,r),i.forEach(a=>{let c=n;a.startsWith(n)||(c="");let l=a.replace(`${c}`,"").split(".").filter(_=>!!_);l.pop();let u=l.join("."),p=ie(`.${u}`,c,e)?.classID||t.classID,m=ft(a.split(".").pop(),p),{datasource:f}=m,g={},h=[];f.parameters.forEach(_=>{_?.value?(g[_.name]=On.isProperty(_.value)?ie(`.${y.getFullPropertyReference([u,y.getPropertyName(_.value)])}`,c,e):_.value,g[_.name]===void 0||g[_.name]===null||g[_.name]===""?(g[_.name]="",h.push(d.NULL_STRING)):h.push(g[_.name])):(g[_.name]="",h.push(d.NULL_STRING))});let E=f.name.concat(d.UNDERSCORE_STRING,y.getHashedString(h.join(d.HASH_DELIMITER))),{name:C}=f,I=$n(C);s.datapages[E]={mode:f.mode,propertyName:a,name:f.name,dataViewParameters:g,refreshStrategy:I?.refreshStrategy}}),i.length&&v({type:RE,payload:s})},Jme=()=>t=>e=>{let{type:n,payload:o={}}=e||{};if(!n||!Gme.has(n)){t(e);return}if(n===Fr&&(I0(o),Kme(o),vt.registerBlockingAction(o.context).catch(()=>{}),setTimeout(()=>{kf()?!Bi.triggerRefreshForType("PROP_CHANGE",o.reference,o.context)&&(P0(o.context,o.reference)||_f(o.context))&&ud(o):((P0(o.context,o.reference)||_f(o.context))&&ud(o),Bi.triggerRefreshForType("PROP_CHANGE",o.reference,o.context)),vt.deRegisterBlockingAction(o.context).catch(()=>{})},0)),n===Oo&&!o?.isDefault){let{context:r,referenceList:i,c11nEnv:s,listIndex:a,instruction:c,skipDirtyValidation:l=!1,skipRefresh:u=!1}=o;a===0&&c==="INSERT"&&s&&ZF(s),u||setTimeout(()=>{Bi.triggerRefreshForType("PROP_CHANGE",i,r)||ud({context:r,pageReference:i})},0),l||(pc[`${r}`]=!0)}if(n===Pt||n===Mc){let{reference:r,isImplicit:i,context:s,skipDirtyValidation:a=!1}=o;be.updateFieldNodeValue(s,r,o.value),!ab.isPageInstruction(r)&&!a?$H(e):a||(pc[`${s}`]=!0),(o.removePropertyFromChangedList||i)&&Zy(o)}if(n===No||n===ss){let{transientItemID:r,data:i}=o;y.iterateLeafNodes(i,s=>{Zy({context:r,reference:s.join(".")})})}n&&xH.has(n)&&(fd(o.context),Nn.purgeResetDependencies(o.context),KF(o.context),(o.childContainersContexts||[]).forEach(s=>{fd(s)}),(o.transientItems||[]).forEach(s=>{fd(s)})),t(e)},kH={propertyChangeMiddleware:Jme,getChanges:sl,recordChange:$H,isDirty:Wme,isPropertyDirty:P0,isContextDirty:jn,resetChangedProperties:fd,deleteRecordedChange:Zy,isComplexObjectMerged:DH,resetComplexObjectDirtyStatus:ZR};var N0=class{getCoreheaders(e){let n=`${A.APP.APP}${d.FORWARD_SLASH_STRING}${d.PRIMARY}`,o=se(n),r=de(o),i=Q.getProperty(d.COREHEADERS,"",r);if(i&&e in i)return i[e]}},LH=new N0;var Xy={defaultLimit:16},x0={SINGLE:"single",MULTIPLE:"multiple"},Ee={PRIMARY:"primary",WORKAREA:"workarea",MODAL:"modal",PREVIEW:"preview"},no=()=>we()?.getState()?.containers;function dt(t){return typeof t=="string"&&t.trim()!==""}var gt=t=>dt(t)?we()?.getState().containers[t]:null,zp=(t,e,n)=>{if(!n)return{continueExecution:!1,containerItemID:t};let o=gt(n),r=!1,i=t;return o?.accessedOrder.forEach(s=>{e===o.items[s].key&&(r=!0,i=o.items[s].context)}),{continueExecution:r,containerItemID:i}},Ze=(t,e)=>{if(!dt(t)||!dt(e))return null;let o=no()?.[t];return o&&o.items&&o.items[e]||null},WR=t=>dt(t)?we()?.getState().containers[t]?.items:null,Hp=t=>dt(t)?we()?.getState().containers[t]?.accessedOrder||[]:[],Yme=t=>dt(t)&&Hp(t)?.length>0||!1,Wl=(t,e,n)=>{if(!dt(t)||!dt(e))return!1;let r=no()?.[t],i=r&&r.items||null,s=n||((a,c)=>a===c);if(e&&i){for(let a of Object.keys(i))if(s(e,i[a].key))return!0}return!1},D0=t=>{let{containers:e}=we()?.getState()||{};return!e||!dt(t)?!1:Object.keys(e).some(n=>e[n]?.accessedOrder?.includes(t))},Vt=(t,e,n)=>{if(!dt(t)||!dt(e))return null;let r=no()?.[t],i=r&&r.items||null,s=n||((a,c)=>a?.toLowerCase()===c?.toLowerCase());if(e&&i){for(let a of Object.keys(i))if(s(e,i[a].key))return a}return null},Zme=(t,e)=>{let n=(o,r)=>o?.toLowerCase()===r?.toLowerCase();if(t&&e){for(let o of Object.keys(e))if(n(t,e[o].key))return e[o]}return null},Qme=t=>{if(!dt(t))return null;let e=no()??{};for(let n of Object.keys(e))if(e[n]){let r=e[n].items??null,i=Zme(t,r);if(i)return i}return null},By=(t,e)=>{if(!dt(t)||!dt(e))return!1;let n=no();return n&&Object.hasOwn(n,`${t}/${e}`)},Xme=(t,e)=>{if(!dt(t)||!dt(e))return null;let o=no()?.[`${t}/${e}`];return o&&o.type},se=t=>{if(!dt(t))return null;let e=null,n=no();if(n&&n[t]){let o=n[t],{accessedOrder:r}=o;e=r&&r.length>0?r[r.length-1]:null}return e},efe=(t,e,n)=>{if(!dt(t)||!dt(e))return!1;let o=Vt(t,e,n);return o?o===se(t):!1},UH=(t,e)=>{let n=null,o=no();if(!o)return null;for(let r of Object.keys(o))if(o[r].items){let i=o[r].items[t];if(i?n=i[e]:n=null,n)break}return n},de=t=>dt(t)?UH(t,"context"):null,Qt=t=>{if(!dt(t))return null;let e=null,n=no();if(n&&n[t]){let o=n[t],{accessedOrder:r}=o,i=r&&r.length>0?r[r.length-1]:null;e=de(i)}return e},ad=t=>{if(!dt(t))return[];let e=t.endsWith("/")?t:`${t}/`,n=[],o=!1,r=no();if(!r)return[];let i=s=>{let a=[];return Object.keys(s).forEach(l=>{l.startsWith(e)&&l!==e&&a.push(l),l===t&&(o=!0)}),a};for(let s of Object.keys(r))if(r[s].items){let a=i(r[s].items);a&&a.length>0&&(n=n.concat(a)),n=n.sort()}return o?n:[]},Ke=t=>{if(!dt(t))return[];let e=[],n=no();if(!n)return[];let o=`${t}${d.FORWARD_SLASH_STRING}`;for(let r of Object.keys(n))r.startsWith(o)&&e.push(r);return e},ti=t=>{if(!dt(t))return[];let e=[],n=no();if(!n)return[];let o=`${t}${d.FORWARD_SLASH_STRING}`;for(let r of Object.keys(n))r.startsWith(o)&&(Hp(r)||[]).forEach(s=>{de(s)!==t&&e.push(de(s))});return e},eS=t=>{let e=[...ti(t),t],n=[],o=we()?.getState().data||{};return e.forEach(r=>{Object.hasOwn(o,`${r}/${d.SUGGESTION}`)&&n.push(`${r}/${d.SUGGESTION}`)}),n},Rt=t=>dt(t)?t&>(t)&>(t).type===x0.SINGLE:null,In=t=>dt(t)?t&>(t)&>(t).type===x0.MULTIPLE:null,Xn=t=>dt(t)&>(t)&>(t).items&&Object.keys(gt(t)?.items).length>0||!1,zH=t=>t&&Xy[t]?Xy[t]:Xy.defaultLimit,tfe=(t,e=Xy.defaultLimit)=>{dt(t)&&(Xy[t]=e)},KR=t=>{if(!dt(t))return!1;let e=!1,n=gt(t),{items:o={}}=n,r=Object.keys(o),i=zH(t);return r&&r.length>0&&r.length>=i&&(e=!0),e},al=t=>{if(!t||!dt(t.name)||!dt(t.context))return null;let e=t?.name,n=`${t?.context}/${e}`,o=gt(n),r=Array.isArray(o?.accessedOrder)&&o?.accessedOrder.map(a=>o?.items[`${a}`]?.context)||[],i=Ke(`${d.APP.APP}/${d.PREVIEW}`),s=ti(`${d.APP.APP}/${d.PREVIEW}`);return{context:t?.context,name:e,containerItems:[...r,...s],childContainers:i}},tS=t=>{if(!dt(t))return!1;let e=de(t);return jn(e)||GR(t)},JR=t=>{if(!dt(t))return null;let e,n=gt(t),{accessedOrder:o=[]}=n;for(let r=0;r<o.length;r+=1){let i=o[r];if(!tS(i)){e=i;break}}return e},re=t=>{if(!dt(t))return null;let{containers:e}=we()?.getState()||{};if(e){for(let o of Object.keys(e))if(e[o]?.accessedOrder?.includes(t))return o}let n=t.lastIndexOf(d.UNDERSCORE_STRING);return t.slice(0,n)},Oa=async(t,e={})=>{if(!dt(t))return Promise.reject(new Error("closeContainerItem: containerItemID is the required parameter"));let n=re(t),o=de(t),{skipDirtyCheck:r}=e,i=!0,s=[];if(tS(t)&&!r&&(Gr.disableLoadingIndicator({context:o}),i=await vi.confirm(zn().getLocaleValue(md,"Messages")),Gr.enableLoadingIndicator({context:o})),i){let{accessedOrder:a=[],items:c={},type:l}=gt(n);s=a.filter(h=>h!==t);let u=s[s.length-1],p=c[u]||{},{semanticURL:m=d.FORWARD_SLASH_STRING,context:f}=p;n?.includes(Ee.MODAL)||(s.length>0&&m&&m!==d.FORWARD_SLASH_STRING?ys({directUrlUpdation:!0,semanticURL:m,options:{containerItemID:u,context:f}}):ys({directUrlUpdation:!0,semanticURL:d.FORWARD_SLASH_STRING,options:{}})),v(nt({containerItemID:t,context:o,target:n,containerInfo:{newAccessedOrder:s,containerType:l},...e.eventName!==void 0?{eventName:e.eventName}:{}}))}return{newAccessedOrder:s,removeItem:i}},$0=(t,e,n,o)=>{let r="root",i=En(e,r,!0),s=X(e,r),a={root:t,containerItemID:i,context:o?"app":i,target:s,containerName:e},c={data:n,context:o?"app":i},l=[kt(a)];l.push(Ne(c)),v(l)},nfe=(t,e,n)=>{let o=Hp(t);o=o.filter(i=>i!==e);let r=!1;for(let i=0;i<o.length;i+=1)if(de(o[i])===n){r=!0;break}return r},w0=t=>{if(!dt(t))return!1;let e=no(),n=de(t),o=e?Object.keys(e):[],r=!1;for(let i=0;i<o.length&&(r=nfe(o[i],t,n),!r);i+=1);return r},Vi=t=>{Array.isArray(t)||(t=[t]);let e=no()||{};return t.map(n=>{let o=re(n);return y.getIn(e,[o,"items",n,"transientItems"])||[]}).flat()},rfe=t=>{let{transientItemID:e,data:n,options:o}=t,r=y.deepClone(we()?.getState().data[e]);o?.reset&&y.iterateLeafNodes(r,i=>{i[i.length-1]!=="classID"&&y.setIn(r,i,"")}),v(Hy({transientItemID:e,data:y.mergeDeep(n,r)}))},ofe=t=>{let{transientItemID:e,data:n}=t;v(F0({transientItemID:e,data:n}))},ife=t=>{let e=y.deepClone(we()?.getState().data[t]);y.iterateLeafNodes(e,n=>{n[n.length-1]!=="classID"&&y.setIn(e,n,"")}),v(j0({transientItemID:t,data:e}))},jH=t=>{let e=y.deepClone(we()?.getState().data[t]);y.iterateLeafNodes(e,n=>y.setIn(e,n,"")),v(V0({transientItemID:t,data:e}))},sfe=t=>{we()?.getState().data[t]&&jH(t);let e=t.lastIndexOf("/"),n=e>0?t.substring(0,e):t,o=re(n);v(Gy({transientItemID:t,containerItemID:n,target:o}))},O0=class{static items;static addContainerItems(e){this.items=e}static getContainerItems(){return this.items}static deleteContainerItem(e){let n=this?.items?.indexOf(e);n!==void 0&&n!==-1&&this.items.splice(n,1)}},afe=(t,e={})=>{if(!dt(t))return;let n=gt(t),o=Array.isArray(n?.accessedOrder)?n.accessedOrder:[];if(o.length===0)return;let{remove:r,keep:i}=e,s;if(i!==void 0){let a=new Set(i);s=o.filter(c=>!a.has(c))}else if(r!==void 0){let a=new Set(r);s=o.filter(c=>a.has(c))}else s=[...o];for(let a of s){let c=de(a),l=Vi(a);v(nt({containerItemID:a,context:c,target:t,...l.length>0&&{transientItems:l}}))}},fb=()=>O0,M0=t=>{let e={containerName:t};e.childContainers=Ke(t),v({type:IE,payload:e})},k0=(t,e)=>{let n=ad(t),{key:o}=Ze(re(t),t),r=[];n.forEach(i=>{let{key:s}=Ze(re(i),i);if(s===o){let a={data:{caseInfo:{headers:{etag:e}}},target:re(i),context:i};r.push({type:Pn,payload:a})}}),r.length&&v(r)},L0=(t,e)=>{let n=[],o={data:{caseInfo:{headers:{etag:e}}},target:re(t),context:t};n.push({type:Pn,payload:o}),n.length&&v(n)},Co=()=>T.isPortalLoaded?"app":"root",cfe=()=>LH,U0=(t,e)=>{let n={data:{caseInfo:{lastUpdateTime:e}},target:re(t),context:t};v({type:Pn,payload:n})},z0=(t,e)=>{let n=Vt(t,e),o=Vt(`${n}/workarea`,e);return de(o)},UA=t=>dt(t)?UH(t,"parentContext"):null,lfe=t=>{let{accessedOrder:e}=t;return e&&e.length>0?e[e.length-1]:""},cc=t=>{if(t&&typeof t=="string"){let e=t.split("/");return e.pop(),e.join("/")}return null},ufe=()=>K_;var FH=t=>{typeof window>"u"||(window.document.title=t)},VH=(t,e)=>(t!==void 0&&(t.options=e),{stateObj:t}),BH=(t,e,n)=>{if(!(typeof window>"u"))try{window.history.pushState(t,e,n),window.scrollTo(0,0)}catch{throw new Error("Error- Unable to Add to Browser History")}},HH=(t,e,n)=>{if(!(typeof window>"u"))try{window.history.replaceState(t,e,n)}catch{throw new Error("Error- Unable to Replace Browser History")}},GH=t=>t.state?.type==="ui-navigation"?(w.publish(A.PUB_SUB_EVENTS.URL_NAVIGATION,t.state),null):t.state?t.state.stateObj:null,qH=t=>{typeof window>"u"||window.addEventListener("popstate",e=>t(e))},WH=()=>{typeof window>"u"||(window.onbeforeunload=()=>null)},Gp=()=>typeof window>"u"?"":Mo(window.location.pathname),gb=()=>typeof window>"u"?"":Mo(window.location.pathname+window.location.search);var KH=()=>typeof window>"u"?"":window.location.search,nS=(t,e,n)=>{switch(n){case"warning":e?console.warn(t,e):console.warn(t);break;case"error":e?console.error(t,e):console.error(t);break;default:e?console.log(t,e):console.error(t)}};var dfe=/^(?!\.+$)[\w.~-]+$/,pfe=/^[^/?#{}]+\/\{businessID\}$/,mfe=/^[A-Za-z0-9]+__/,ffe={reqType:"GET",endPoint:"/api/application/v2/cases/[{caseTypeID}][businessID={businessID}]?viewType={viewType}",body:{},urlPattern:"cases/[{caseTypeID}][businessID={businessID}]",params:{caseTypeID:"",businessID:"",viewType:"page"}},B0=class{routingInfo;appRoutes;appRoutesMeta;appName;appAlias;orgName;reqContextName;reqServletPath;defaultViewUrlPath;staticRoutePage;defaultClassName;staticRoutesList=[];dynamicRoutesList;appDelimeter;reqServletNameReal;bDefaultPortal;portalName;ignoreFromEndPoint;constructor(){this.staticRoutesList=[],this.dynamicRoutesList=[],this.reqContextName="",this.defaultViewUrlPath="",this.staticRoutePage="",this.defaultClassName="",this.portalName=""}init=(e,n)=>{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=n,this.defaultClassName="",this._createStaticDynamicRoutesList(this.appRoutes),this.appDelimeter=e.appDelimeter,this.reqServletNameReal=e.pxReqServletNameReal,this.bDefaultPortal=e.isDefaultPortal,this.portalName=e.portalName,this.ignoreFromEndPoint=["reactMode=dev","reactMode=prod"]):console.error("Routing info is not appropriate. Missing routes and routesMeta objects in routingInfo",JSON.stringify(e))};addRoutes=e=>{e?.routes&&e.routesMeta&&(this.appRoutes={...this.appRoutes,...e.routes},this.appRoutesMeta={...this.appRoutesMeta,...e.routesMeta},this.routingInfo&&(this.routingInfo.routes={...this.routingInfo.routes,...e.routes},this.routingInfo.routesMeta={...this.routingInfo.routesMeta,...e.routesMeta}),this._createStaticDynamicRoutesList(e.routes))};setDefaultRoute=e=>{this.defaultViewUrlPath=e};setStaticRoutePage=e=>{this.staticRoutePage=e};getStaticRoutePage=()=>this.staticRoutePage||"";setDefaultClassName=e=>{this.defaultClassName=e};_createStaticDynamicRoutesList=e=>{Object.keys(e).forEach(o=>{ri(o)?this.dynamicRoutesList?.push(o):this.staticRoutesList?.push({[o]:e[o]})})};_getDynamicKeyName=e=>{let n=e.indexOf("{")+1,o=e.lastIndexOf("}");return e.slice(n,o)};isDefaultPortal=()=>`${this.bDefaultPortal}`!="false";getPortalName=()=>this.portalName;getApplicationPath=()=>Mo(`${this.getReqContextName()}/${this.getReqServletNameReal()}`);getReqServletNameReal=()=>`${this.reqServletNameReal}`;getAppDelimeter=()=>`${this.appDelimeter}`;getApplicationName=()=>`${this.appName}`;getApplicationAlias=()=>`${this.appAlias}`;getServletPath=()=>`${this.reqServletPath}`;getOrganizationName=()=>`${this.orgName}`;getReqContextName=()=>Mo(this.reqContextName);getRoutingInfo=()=>this.routingInfo;processUrl=(e,n)=>{n&&(e=e.toLowerCase()),e&&(e=decodeURIComponent(e));let o=new RegExp(this.getApplicationPath(),"i");return e=e.replace(o,""),e.startsWith("/")&&Is()&&T.getRenderingMode()!=="PREVIEW"&&this.setDefaultClassName(""),Mo(e)};stripIgnoredParams(e){return this.ignoreFromEndPoint?.forEach(n=>{e.includes(n)&&(e=e.substring(0,e.indexOf(n)))}),e}getRouteDetails=(e,n)=>{if(!n)return this.appRoutes[e];let o="",r={caseClassName:"",caseID:"",RemoteSystemID:void 0,page:""};return Object.keys(this.appRoutes||{}).forEach(i=>{let s=this.appRoutes[i];s&&s.payload&&s.payload.page===e&&(o=s.routeKey,r={...s.payload})}),!o&&this.appRoutes&&this.appRoutes[e]&&(o=this.appRoutes[e].routeKey,r={...this.appRoutes[e].payload}),{routeKey:o,payload:r}};transformRemoteCasePayload(e){let{caseClassName:n,caseID:o}=e;if(!ce.isRemoteCase(n))return e;let{RemoteClassGroup:r,RemoteSystemID:i}=ce.getRemoteCase(n??"");return{...e,caseID:o?.replace(n??"",r?.toUpperCase()),RemoteSystemID:i}}getEndPointInfo=e=>{e=this.stripIgnoredParams(e);let n=Is(),o=this.processUrl(e,!0),r=this._getMatchedRouteInRoutingTable(o,n?this.defaultClassName:void 0);r||(o=this.processUrl(this.defaultViewUrlPath,!n),r=this._getMatchedRouteInRoutingTable(o,n?this.defaultClassName:void 0)||"");let{routeKey:i,payload:s}=this.getRouteDetails(r,n),a=this.appRoutesMeta?.[i]?.restApi??(i===as?ffe:void 0);if(!a)return null;let{reqType:c,endPoint:l,params:u}=a,p=this.transformRemoteCasePayload(s),m={routeKey:i,requestType:c,routeEndpoint:l,payload:{...u,...p}};return this._resolveRoute(m,this.processUrl(e,!1),r)};getSemanticURL(e,n,o){return this.buildSemanticURL(e,n,o)}findBusinessIDRoute(e){let n=[];Object.entries(this.appRoutes??{}).forEach(([s,a])=>{let c=a?.payload?.caseTypeID;a?.routeKey===as&&typeof c=="string"&&c&&pfe.test(s)&&n.push({pattern:s,typeID:c})});let o=n.find(({typeID:s})=>s===e);if(o)return o.pattern;let r=s=>s.replace(mfe,""),i=n.filter(({typeID:s})=>r(s)===r(e));return i.length===1?i[0].pattern:void 0}getBusinessIDURLPath(e,n){return!this.appRoutesMeta||!(as in this.appRoutesMeta)||n?.endsWith("-")?"":this.getBusinessIDRoutePath(e,n)}getBusinessIDRoutePath(e,n){return!e||!n||!dfe.test(n)||ce.isRemoteCase(e)?"":this.findBusinessIDRoute(e)?.replace("{businessID}",n)??""}getResolvedSemanticURL(e,n,o={},r){let i=e===Gt||e===Gn,s=o?.businessID,a=i&&typeof s=="string"?this.getBusinessIDURLPath(n?.caseClassName,s):"";if(!a){let p=this.getSemanticURL(e,n,o);a=p,ri(p)&&p.match(Qc)?.forEach(f=>{let g=this._getDynamicKeyName(f);o[g]&&(a=a.replace(f,String(o[g])))})}let c=YH(a,r),l=new URL(c),u=this.getPortalName();return this.isDefaultPortal()?l.searchParams.delete("portal"):u&&!tF(l.searchParams)&&l.searchParams.append("portal",u),r&&!l.searchParams.has("lang")&&l.searchParams.append("lang",r),Xc(l.toString())}buildDocumentTitle(e,n,o){let r=o??"";return T.getCaseLabelFirstInTitle()?e&&n?`${e} (${n}) - ${r}`:r:e&&n?`${n}: ${e} - ${r}`:r}updateSemanticURLAndDocumentTitle(e,n){let o=/{.+?}/,{key:r,actionName:i,caseClassName:s,isRemoteCase:a,name:c}=e;if(a&&!s)return;let l=this.getSemanticURL(i,{caseClassName:s}).replace(o,String(ln(r))),u=`${A.APP.APP}${d.FORWARD_SLASH_STRING}${A.PRIMARY}`,p={semanticURL:l,directUrlUpdation:!0,options:{acName:u,context:Qt(u)}},m=Gp();l&&!m.includes(l)&&H0(p,n);let f=r.substring(r.lastIndexOf(" ")+1),g=T.environmentInfoObject?.pxApplication?.pyLabel,h=this.buildDocumentTitle(c,f,g);G0(h)}updateDataObjectSemanticURLAndDocumentTitle(e,n){let{dataViewName:o,dataContextParameters:r={},name:i}=e,s=d.DATA_OBJECT_SEMANTIC_PAGE_NAMES.find(c=>this.getSemanticURL(dr,{pageName:c,dataViewName:o},r));if(s){let c={pageName:s,dataViewName:o},l=this.getSemanticURL(dr,c,r),u=this.getResolvedSemanticURL(dr,c,r,n);if(!eF(u)){let p=`${A.APP.APP}${d.FORWARD_SLASH_STRING}${A.PRIMARY}`;H0({semanticURL:l,directUrlUpdation:!0,options:{acName:p,context:Qt(p)}},n)}}let a=T.environmentInfoObject?.pxApplication?.pyLabel??"";G0(i?`${i} - ${a}`:a)}buildSemanticURL(e,n,o){let{urlPattern:r}=this.appRoutesMeta?.[e]||{},i=r?.split("/").length,s=r?.split("/");this.setDefaultClassName(n?.pageClass||this.defaultClassName);let a=Object.keys(this.appRoutes).filter(l=>i===l.split("/").length).filter(l=>{let u=l.split("?")[0].split("/");return s?.every((p,m)=>p.startsWith("{")||p===u[m])});if(a.length===1)return this._getQueryParamsResolvedURL(a[0],o);if(Object.keys(n).length===0)return"";let c=a.find(l=>{let u=this.appRoutes[l].payload,p={...o};delete p.dataViewName,delete p.dataContext;let m=u.dataViewKeys||u.dataContextParameters||{},f=Object.keys(n).every(g=>n[g]===u[g]);return f?!y.isEmpty(m)&&!y.isEmpty(p)?Object.keys(p).every(g=>Object.hasOwn(m,g)):f:!1});return c?this._getQueryParamsResolvedURL(c,o):a.includes("cases/{id}")&&o?.id?"cases/{id}":""}_getQueryParamsResolvedURL(e,n,o=!1){let[r,i]=e.includes("?")?e.split("?"):[e];if(i&&n&&Object.keys(n).length>0){let s={};for(let[u,p]of Object.entries(n))s[u.toLowerCase()]=p;let a=new URLSearchParams(i),c={};for(let[u,p]of a.entries())if(typeof p=="string"&&ri(p)){let m=this._getDynamicKeyName(p),f=m.toLowerCase(),g=o?s:n,h=o?n[m]??g[f]:g[m];h!=null&&(c[u]=h)}else typeof p=="string"&&(c[u]=p);let l=new URLSearchParams(Object.entries(c).map(([u,p])=>[u,String(p??"")]));return`${r}?${Xc(l.toString())}`}return r}_getQueryParamsObject(e){let n={};if(!e)return n;for(let o of e.split("&")){let r=o.indexOf("=");if(r!==-1){let i=o.slice(0,r),s=o.slice(r+1);try{n[decodeURIComponent(i)]=decodeURIComponent(s)}catch{n[i]=s}}}return n}getRestEndPoint(e,n){try{return this._buildRestApi(e,n)}catch(o){return console.error(o),null}}_buildRestApi(e,n){if(e&&this.appRoutesMeta?.[e]){let{reqType:o,body:r,params:i}=this.appRoutesMeta[e].restApi,{endPoint:s}=this.appRoutesMeta[e].restApi;n?.params&&n.params.pageName&&(s=`${s}&pageName=${n.params.pageName}`);let a=s.match(Qc);if(a)for(let c=0;c<a.length;c+=1){let l=a[c].replace("{","").replace("}",""),u=new RegExp(a[c],"g");s=s.replace(u,()=>n?.[l]??i?.[l])}if(r){let c={};return Object.keys(r).forEach(u=>{if(n&&this._isSpecialInstruction(u)){let p=r[u];Array.isArray(p)&&p.every(m=>typeof m=="string")&&(c={...c,...this._processInstruction(u,p,n)})}}),{restApi:s,reqType:o,body:c}}return{restApi:s,reqType:o}}throw new Error(`Cannot find route metadata for the routeKey: ${e}.`)}_isSpecialInstruction(e){return e&&e.startsWith("@")}_processInstruction(e,n,o){let r={};return e==="@COPY"&&n.forEach(i=>{r[i]=o?.[i]}),r}doesRestApiExist(e){return!!(this.appRoutesMeta&&this.appRoutesMeta[e])}_resolveMatchedRouteQueryParams=(e,n,o,r)=>{if(!e)return;let i=n.indexOf("?"),s=i!==-1?n.substring(i+1):void 0;if(s){let a=`${o.join("/")}?${s}`;return this._getQueryParamsResolvedURL(a,r,!0)}};_resolveRoute=(e,n,o)=>{let r=[],[i,s]=n.includes("?")?n.split("?"):[n],[a,c]=o.includes("?")?o.split("?"):[o],l=i.split("/"),u=a.split("/"),p={};for(let C=0;C<u.length;C+=1)if(r[C]=u[C],ri(u[C])){let I=this._getDynamicKeyName(u[C]);p[I]=l[C],r[C]=l[C]}let m=this._getQueryParamsObject(c),f=this._getQueryParamsObject(s),g={};for(let[C,I]of Object.entries(f))g[C.toLowerCase()]=I;for(let C of Object.keys(m))ri(m[C])?p[C]=f[C]||g[C.toLowerCase()]:p[C]=m[C];let h=this._resolveMatchedRouteQueryParams(s,o,r,f),E=this._resolvePayload(e,p,o);return{...this._resolveRouteEndPoint(E,o),urlPath:h||r.join("/")}};_resolveRouteEndPoint=(e,n)=>{let{routeEndpoint:o}=e;if(!ri(o))return e;let r={};if(r[n]=e,e.payload!==void 0){let i=o.match(Qc);for(let s=0;s<i.length;s+=1){let a=i[s],c=this._getDynamicKeyName(a);if(e.payload[c]!==void 0){let u=e.routeKey===as&&c==="businessID"?encodeURIComponent(e.payload[c]):e.payload[c];o=o.replace(a,u)}else this._sendWarningAndErrorMessages(`Unable to resolve dynamic token {${c}} in routeEndpoint- ${c} 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:o}};_resolvePayload=(e,n,o)=>{if(typeof e.payload>"u")return e;let r={};r[o]=e;let i={...e.payload,...this._resolvePayloadRecursive(e.payload,n)};return{...e,payload:i}};_resolvePayloadRecursive(e,n){if(Array.isArray(e))return e.map(r=>this._resolvePayloadRecursive(r,n)).flat();let o={};for(let r of Object.keys(e)){let i=e[r];if(typeof i=="string"&&ri(i)){let s=i.match(Qc)??[];for(let a of s){let c=this._getDynamicKeyName(a);n[c]!==void 0?i=i.replace(a,n[c]):this._sendWarningAndErrorMessages(`Unable to resolve dynamic token {${c}} in payload - {${c}} is missing in semantic url construct`)}o[r]=i}else i&&typeof i=="object"?o[r]=this._resolvePayloadRecursive(i,n):o[r]=i}return o}_getMatchedRouteInRoutingTable=(e,n)=>{let[o]=e.includes("?")?e.split("?"):[e],r=this._findMatchedRouteInStaticList(o,n);if(r!==void 0||(r=this._findMatchedRouteInDynamicList(e),r!==void 0))return r};_findMatchedRouteInStaticList=(e,n)=>{if(!this.staticRoutesList||!e)return;let o=e.toLowerCase(),r=n?.toLowerCase();if(Is()){let i=this._findMatchingRouteByClass(o,r);if(!i)return;let a=Object.values(i)[0]?.payload?.page||"";return this.setStaticRoutePage(a),Object.keys(i)[0]}return this._findInStaticList(o)};_findMatchingRouteByClass=(e,n)=>{if(this.staticRoutesList)return this.staticRoutesList.find(o=>Object.entries(o).some(([r,i])=>{if(!i)return!1;let s=i.payload?.page?.toLowerCase(),a=i.payload?.pageClass?.toLowerCase(),c=s===e||r.toLowerCase()===e;return n?c&&a===n:c}))};_findInStaticList=e=>{if(!this.staticRoutesList)return;let n=this.staticRoutesList.find(o=>Object.keys(o)[0].toLowerCase()===e);return n?Object.keys(n)[0]:void 0};_findMatchedRouteInDynamicList=e=>{let[n,o]=e.includes("?")?e.split("?"):[e],r=n.split("/");return this.dynamicRoutesList?.find(i=>{let[s,a]=i.includes("?")?i.split("?"):[i],c=s.split("/");if(c.length!==r.length)return!1;let l=0;for(l=0;l<c.length;l+=1){let u=c[l].toLowerCase();if(!ri(u)&&u!==r[l]&&Zj(u)!==r[l])return!1}if(a){let u=new URLSearchParams(o.toLowerCase()),p=new URLSearchParams(a.toLowerCase()),m=new Set,f=new Set,g=/\{[a-zA-Z]+\}/;for(let h of u.keys())m.add(h);for(let h of p.keys())f.add(h);if(f.size!==m.size)return!1;for(let h of m){if(!f.has(h))return!1;let E=p.get(h);if(u.get(h)!==E&&!g.test(E??""))return!1}}return!0})};_sendWarningAndErrorMessages=(e,n)=>{nS(e,n,"warning"),nS("Error in Generated Routing Table",null,"error"),nS("Back | Forward for this page may NOT work as intended",null,"warning"),nS("Bookmark | Refresh for this page may NOT work as intended",null,"warning")}},gfe=new B0,Se=gfe;var q0=class{environmentInfoObject;isPortalLoaded;pageName;KeyMapping;isAssignmentHeaderHidden;coexistenceMeta;brandingInfo;brandingInfoDark;themeOverrides;darkThemeOverrides;locale;cookieComplianceMethod;isExtraCallRequiredForDefaultHome;enablePriorityAndUrgencyImprovements;isWebEmbed;caseLabelFirstInTitle;nav;constructor(){this.environmentInfoObject=null,this.isPortalLoaded=!1,this.pageName=null,this.KeyMapping={},this.isAssignmentHeaderHidden=!1,this.coexistenceMeta={appType:"",isCoexistence:!1},this.brandingInfo=null,this.cookieComplianceMethod="none",this.isExtraCallRequiredForDefaultHome="false",this.enablePriorityAndUrgencyImprovements=!1}setEnvironmentInfo(e){let n=e?.pxOperator?.pyUserName,o=n?y.decodeHtmlEntities(n):void 0,r={...e,pxOperator:e.pxOperator?{...e.pxOperator,...o?{pyUserName:o}:{}}:e.pxOperator};this.environmentInfoObject=r;let i=this.environmentInfoObject?.features||y.convertObjectWithStringToBoolean(this.environmentInfoObject?.pyFeatures)||{granularUIRefresh:!1};this.environmentInfoObject.features={...i,granularUIRefresh:i.granularUIRefresh||i.pyEnableGranularUIRefresh||!1},this.environmentInfoObject.pyGenAIEnabled=!!this.environmentInfoObject.pyGenAIEnabled,O.setNamespaceSupport(this.getFeatureMap()?.isNamespaceEnabled);let s=e.requestContext;if(Array.isArray(s)&&s.length>0){let a=s.filter(c=>c.IncludeInURL).map(c=>c.Key);a.length>0&&hb(a)}Us.setLanguagePack(this.environmentInfoObject.pyLanguagePacks||[])}isAnonymousUser(){return this.environmentInfoObject?.isAnonymousUser===!0}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 Se.getPortalName()}getStudioPath(){return Se.getRoutingInfo()?.studioPath}setCaseLabelFirstInTitle(e=!0){this.caseLabelFirstInTitle=e}getCaseLabelFirstInTitle(){return this.caseLabelFirstInTitle}getApplicationName(){return this.environmentInfoObject?.pxApplication?.pyRuleName}getUseLocale(){return this.environmentInfoObject?.pxLocale?.pyUseLocale}getAccessGroup(){return this.environmentInfoObject?.pxOperator?.pyAccessGroup}getApplicationID(){return this.environmentInfoObject?.pxApplication?.pyRuleId}getTimeZone(){return this.environmentInfoObject?.pxLocale?.pyTimeZone?.trim()||void 0}getTheme(e){return e?.type==="dark"?this.darkThemeOverrides:this.themeOverrides}setTheme(e,n){return n?.type==="dark"?this.darkThemeOverrides=e:this.themeOverrides=e,w.publish(d.PUB_SUB_EVENTS.UI_EVENTS.THEME_CHANGE,e),n?.type==="dark"?this.darkThemeOverrides:this.themeOverrides}getNavOrientation(){return this.nav?.orientation??this.environmentInfoObject?.pyNavOrientation}setNavOrientation(e){return this.nav={...this.nav,orientation:e},w.publish(d.PUB_SUB_EVENTS.UI_EVENTS.NAV_ORIENTATION_CHANGE,e),this.nav.orientation}setIsWebEmbed(e){return this.isWebEmbed=e,this.isWebEmbed}isWSSPortal(){return this.environmentInfoObject?.pyPortalTemplate===d.PORTAL_TYPE.WSS}isDefaultWSSPortal(){return this.isWSSPortal()&&!this.environmentInfoObject?.pyFullObjectDisplayTemplate}isInfinityRuntime(){return this.environmentInfoObject?.pyExecutionRuntimeName==="Infinity"}isSdkRuntime(){return this.environmentInfoObject?.pyExecutionRuntimeName==="SDK"}isGenAIEnabled(){return!!this.environmentInfoObject?.pyGenAIEnabled}getRewriteGenAIDP(){return this.environmentInfoObject?.pyRewriteGenAIDP}isBlueprintExperience(){return!!this.environmentInfoObject?.features?.fromBlueprintExperience}getBrandingInfo(e){return e?.type==="dark"?this.brandingInfoDark:this.brandingInfo}setBrandingInfo(e,n){return n?.type==="dark"?this.brandingInfoDark=e:this.brandingInfo=e,this.brandingInfo}getCookieComplianceMethod(){return this.cookieComplianceMethod}setCookieComplianceMethod(e){this.cookieComplianceMethod=e}setLocale(e){let o=e.replaceAll("-","_").split("_").slice(0,2);this.locale=o.join("-"),this.environmentInfoObject?.pxLocale&&(this.environmentInfoObject.pxLocale.pyUseLocale=this.locale)}getLocale=()=>this.locale;getEnvironmentKeys(){return Object.keys(d.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}isPegaMobile(){let e=Reflect.get(globalThis,"pms");if(typeof e!="object"||e===null)return!1;let n=Reflect.get(e,"plugins");return typeof n=="object"&&n!==null&&(!!Reflect.get(n,"c11n_spa")||!!Reflect.get(n,"c11n"))}isOfflineEnabled(){return typeof navigator<"u"&&(navigator.userAgent||"").includes("pxUsesOffline")}shouldUseURLParams(){return this.environmentInfoObject?.renderingMode==="FULL_PORTAL"&&this.getFeatureMap()?.pyUseURLParams}getBuiltOnAppNames(){return this.environmentInfoObject?.pxApplication?.pyBuiltOnApplications}setPreviewMode(){en.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){let n=this.environmentInfoObject?.features;return this.environmentInfoObject&&e&&(this.environmentInfoObject?.features?this.environmentInfoObject.features={...n,...e}:this.environmentInfoObject.features={...e}),this.getFeatureMap()}getFeatureMap(){return this.environmentInfoObject?.features||{}}getFeature(...e){if(e.length!==0)return y.getIn(this.getFeatureMap(),e)}setKeyMapping(e){return this.KeyMapping=e,this.KeyMapping}getKeyMapping(e){let n=this.KeyMapping[e];return n!==void 0?n:null}setCoexistenceMeta(e){return e&&(this.coexistenceMeta=e),this.getCoexistenceMeta()}getCoexistenceMeta(){return this.coexistenceMeta}isCoexistenceAppOfType(e){return!!(this.coexistenceMeta.isCoexistence&&this.coexistenceMeta.appType===e)}getGatewayType(){return this.environmentInfoObject?.gatewayType??""}isOptimizedCaseLoadingEnabled(){return this.getFeatureMap().pyEnableOptimizedCaseLoading||this.getFeatureMap().optimizedCaseLoading||!1}isOpenCasePageAfterCreateInMultiDocEnabled(){return this.getFeatureMap().pyOpenCasePageAfterCreateInMultiDoc||!1}getCaseTypeList(){return this.environmentInfoObject?this.environmentInfoObject?.pyCaseTypeList||[]:[]}getBlendedDataTypeList(){return this.environmentInfoObject?this.environmentInfoObject?.pyBlendedDataTypeList||[]:[]}isRuleBlendedModeEnabled(){return this.getPortalName()===d.RULE_BLENDED_MODE_PORTAL_NAME}supportsBlendedMode(e){return!this.isRuleBlendedModeEnabled()||!e||!(/^Rule-/i.test(e)||/^Data-Rule-AppMetadata/i.test(e))?!1:!this.getBlendedDataTypeList().some(n=>n.pyClassName===e)}getClassesAccessList(){return this.environmentInfoObject?.pyClassesAccessList?.pxResults??[]}getUserSettings(){return this.environmentInfoObject?.pyUserSettings||null}getLocalizationVersion(){let e=this.getFeatureMap().pyLocalizationVersion,n=this.getFeatureMap().localizationVersion;return n!==void 0?n:e!==void 0?parseInt(e,10):1}getLocalizationBundles(e=this.locale){return Us.getLocalizationBundles(e)}getAvailableLocalePacks(){return this.getFeatureMap()?.availableLanguagePacks||void 0}getIsExtraCallRequiredForDefaultHome(){return this.isExtraCallRequiredForDefaultHome}setIsExtraCallRequiredForDefaultHome(e){this.isExtraCallRequiredForDefaultHome=e}getEnablePriorityAndUrgencyImprovements(){return this.enablePriorityAndUrgencyImprovements}setEnablePriorityAndUrgencyImprovements(e){this.enablePriorityAndUrgencyImprovements=e}getInactivityTimeout(){let e=this.environmentInfoObject?.pxOperator?.pyAuthenticationTimeout;return e&&Number(e)}isUnifiedObject(){return this.environmentInfoObject?.features?.isUnifiedObject||!1}getRuntime(){return typeof window<"u"&&window.document?"Browser":"Native"}getInlineEditActions(e){return this.environmentInfoObject?.pyInlineEditActions?.filter(n=>n.pyClassName===e).map(n=>n.pyActionName)??[]}getInlineEditActionViews(e){return this.environmentInfoObject?.pyInlineEditActions?.filter(n=>n.pyClassName===e).map(n=>n.pyViewName)??[]}getFullObjectDisplayTemplate(){return this.environmentInfoObject?.pyFullObjectDisplayTemplate??void 0}setFullObjectDisplayTemplate(e){this.environmentInfoObject&&(this.environmentInfoObject.pyFullObjectDisplayTemplate=e),w.publish(d.PUB_SUB_EVENTS.UI_EVENTS.CASE_VIEW_TEMPLATE_CHANGE,e)}setNavAlignment(e){return this.nav?.alignment===e||(this.nav={...this.nav,alignment:e},this.environmentInfoObject&&(this.environmentInfoObject.pyNavAlignment=e),w.publish(d.PUB_SUB_EVENTS.UI_EVENTS.NAV_ALIGNMENT_CHANGE,e)),e}getNavAlignment(){return this.nav?.alignment??this.environmentInfoObject?.pyNavAlignment}setNavPosition(e){return this.nav?.position===e||(this.nav={...this.nav,position:e},this.environmentInfoObject&&(this.environmentInfoObject.pyNavPosition=e),w.publish(d.PUB_SUB_EVENTS.UI_EVENTS.NAV_POSITION_CHANGE,e)),e}getNavPosition(){return this.nav?.position??this.environmentInfoObject?.pyNavPosition}getMultiStepNavDisplay(){return this.environmentInfoObject?.pyMultiStepNavDisplay??void 0}setMultiStepNavDisplay(e){this.environmentInfoObject&&(this.environmentInfoObject.pyMultiStepNavDisplay=e),w.publish(d.PUB_SUB_EVENTS.UI_EVENTS.MULTI_STEP_NAV_DISPLAY_CHANGE,e)}getCaseStageDisplay(){return this.environmentInfoObject?.pyCaseStageDisplay??void 0}setCaseStageDisplay(e){this.environmentInfoObject&&(this.environmentInfoObject.pyCaseStageDisplay=e),w.publish(d.PUB_SUB_EVENTS.UI_EVENTS.CASE_STAGE_DISPLAY_CHANGE,e)}getPortalContentWidth(){return this.environmentInfoObject?.pyPortalContentWidth??void 0}setPortalContentWidth(e){this.environmentInfoObject&&(this.environmentInfoObject.pyPortalContentWidth=e),w.publish(d.PUB_SUB_EVENTS.UI_EVENTS.PORTAL_CONTENT_WIDTH_CHANGE,e)}},T=new q0;var hfe=t=>t.status==="fulfilled",yfe=async(t,e)=>{let n=T.getAvailableLocalePacks(),o=T.getLocalizationBundles(t),r;if(t&&n&&n.includes(t)?r=[Re("getLocalizationPack",{queryPayload:{locale:t},withCredentials:e})]:o.length>0&&(r=o.map(l=>Re("getLocalizationPack",{queryPayload:{version:l.pyBundleVersion,bundle:l.pyBundleName},withCredentials:e}))),!r||r.length===0)return;let i=200,s=201,a=await Promise.allSettled(r),c=Hi(t??"en-US");a.filter(hfe).forEach(({value:l})=>{if([i,s].includes(l.status)&&l.data){let u=l.data;Object.keys(u).forEach(p=>{c.setLocaleForRule(u[p],p)})}})},Sfe=async(t=T.getLocale(),{withCredentials:e=!1}={})=>{try{await yfe(t,e)}catch(n){console.warn(n)}},qp=Sfe;var W0=class{static regex=/\{@P[^}]*\s*:\s*[^}]*\}/g;static subRegex=/:'[a-zA-Z0-9!@#$&()\\-`.+,/\s"]*'/;static keyMap={};static formatLocaleKey(e){let n=0,o="";for(;n<=e.length;){let r=e.indexOf("{@P ",n);if(r===-1){o+=e.substring(n,e.length);break}o+=e.substring(n,r);let i=e.indexOf("}",n),s=e.substring(r,i+1),[a,c]=this.getKeyAndValue(s);this.addKeyToMap(a,c),o+=`${s.split(":")[0]}}`,n=i+1}return o}static getKeyAndValue(e){let n=e.indexOf(":"),o=e.indexOf("}");return[`${e.substring(0,n)}}`,e.substring(n+1,o)]}static addKeyToMap(e,n){this.keyMap[e]=n}static replaceWithValue(e){let n=0,o="";for(;n<=e.length;){let r=e.indexOf("{@P ",n);if(r===-1){o+=e.substring(n,e.length);break}o+=e.substring(n,r);let i=e.indexOf("}",n),s=e.substring(r,i+1);o+=this.keyMap[s],n=i+1}return o}},K0=W0;var yb=class{GENERIC_BUNDLE_KEY="@BASECLASS!GENERIC!PYGENERICFIELDS";FIELD_LABELS_BUNDLE_KEY="@BASECLASS!LABEL!PYFIELDLABELS";GENERIC_BUNDLE_KEY_LP="GENERIC!GENERICFIELDS";MESSAGE_BUNDLE_KEY="@BASECLASS!MESSAGE!PYMESSAGES";BASE_CLASS="@BASECLASS";DATA_PAGE_LOCALECONTEXT="datapage";localeStore;timezone;availableLangPacks;constructor(){this.localeStore={},this.getLocaleValue=this.getLocaleValue.bind(this)}setLocaleForRule=(e,n)=>{let o=e.LocaleContent,r=n.toUpperCase();r.startsWith("@BASECLASS!DATAPAGE!")&&r.split(/[!#]/).length<4?Object.entries(o).forEach(([i,s])=>{s!==null&&typeof s=="object"&&"fields"in s&&this.updateLocaleStore(s,`${r}#${i}`.toUpperCase())}):r==="GENERIC!GENERICFIELDS"?Object.entries(o).forEach(([i,s])=>{s!==null&&typeof s=="object"&&this.sanitizeLocaleField(s,i.toUpperCase())}):this.sanitizeLocaleField(o,r)};updateLocaleStore=(e,n)=>{let o=e.fields||e,r=this.localeStore[n];r?y.mergeDeep(o,r):o&&typeof o=="object"&&(this.localeStore[n]=o)};sanitizeLocaleField=(e,n)=>{["DASHBOARDSMANAGER","DATAEXPLORER","INSIGHT"].includes(n.toUpperCase())&&Object.entries(e).forEach(([,r])=>{r!==null&&typeof r=="object"&&"fields"in r&&this.updateLocaleStore(r,n)}),this.updateLocaleStore(e,n)};getLocaleForRule(e){return this.localeStore[e]}resetLocaleStore=()=>{this.localeStore={}};getLocaleValue(e,n,o,r){let i=this.#e(o,n),s=this.#t(e);s&&(e=K0.formatLocaleKey(e));let a=i?this.localeStore[i.toUpperCase()]??{}:{},c=r?this.localeStore[r.toUpperCase()]??{}:{};return o?.toUpperCase()==="MESSAGES"&&typeof e=="string"?this.getLocalizedErrorMessage(a,e)||e:s?K0.replaceWithValue(a[e]||c[e]||e):a[e]||c[e]||e}#e(e,n){return e?.toUpperCase().startsWith("@BASECLASS!DATAPAGE!")?n?`${e}#${n}`:e:e||n}getParagraphLocaleValue(e,n){let o=`${e}!${d.PARAGRAPH}!${n}`,r=this.localeStore[o.toUpperCase()];if(r){let i=typeof globalThis.atob=="function"?decodeURIComponent(globalThis.atob(r.content).split("").map(s=>`%${`00${s.charCodeAt(0).toString(16)}`.slice(-2)}`).join("")):r.content;return{category:r.category,content:i}}return null}getPortalLocaleReference(e){return T.getLocalizationVersion()!==2?"":e?`PORTAL!${e}`.toUpperCase():`PORTAL!${T.getPortalName()}`.toUpperCase()}getCaseLocaleReference(e){return e?`CASE!${e}`.toUpperCase():null}getLocalizationVersion(){return 2}async getLocaleJsons(e){if(!await this.isCurrentLocalePackAvailable())return[];let n=T.getUseLocale(),o=[],r=PCore.getLocaleUtils().localeStore;if(e=e.filter(i=>!r[i]),e=e.map(i=>i.toUpperCase()),e.length>0){let i=e.map(a=>({localeRuleKey:a,promise:We.getSvcLocale(n,`${a}.json`)})),s=await Promise.allSettled(i.map(a=>a.promise));await Promise.all(s.map(async(a,c)=>{if(a.status==="fulfilled"){let l=i[c],u;try{u=await a.value.json()}catch{u=null}u&&o.push({localeRuleKey:l.localeRuleKey,jsonData:u})}}))}return o}async loadLocaleResources(e){await Us.loadLocaleBundle(e),await Promise.all(e.map(n=>qp(n)))}setTimezone(e){this.timezone=e}getTimeZoneInUse(){let e=Intl.DateTimeFormat().resolvedOptions().timeZone;return this.timezone||e}matchPatternWithText(e,n){let o=n,r=[];for(let i=0;i<e.length;){let s=e[i];if(s.length!==0){let a=o.indexOf(s);if(a===-1)return null;if(i>0){let c=o.slice(0,a);r.push(c)}o=o.slice(a+s.length)}i+=1}return o&&r.push(o),r}getLocalizedErrorMessage(e,n){let o="";if(e[n])return e[n];for(let r of Object.keys(e)){let i=r.split(/\{\d+\}/),s=this.matchPatternWithText(i,n);if(s){let a=e[r];if(o=this.replacePlaceHolders(s,a),o)return o}}return o}replacePlaceHolders(e,n){for(let o=0;o<e.length;){if(!n.includes(`{${o+1}}`))return"";n=n.replace(`{${o+1}}`,e[o]),o+=1}return n}async isCurrentLocalePackAvailable(){let e=T.getLocale();return this.availableLangPacks||(this.availableLangPacks=await We.getSvcAvailableLocales()),e&&this.availableLangPacks.includes(e)}getBaseComponentLabels=()=>this.getLocaleForRule("COSMOSFIELDS");#t(e){let n=!1;return e&&typeof e=="string"&&(n=e.includes("@P ")),n}},zn=t=>{let e=t??T.getLocale()??"en-US";return Hi(e)};$e.registerHandler("@L",(t,e)=>e?e.getLocalizationService(e.getLocaleRuleName()).getLocalizedText(t):t);$e.registerHandler("@P",(t,e,n)=>n?Q.getLitePropertyValue(n):e.getValue(t));$e.registerHandler("@E",(t,e,n)=>{try{let o=S0(t),r=E0(o);return A0(r,e,n)}catch{}return!0});$e.registerHandler("@W",(t,e,n)=>{let o;if(n){let{pageReference:r,context:i}=n;o=Ss(r,`.${d.SUMMARY_OF_WHEN_CONDITIONS}.${t}`,i)}else o=e.getContextDataValue(`.${d.SUMMARY_OF_WHEN_CONDITIONS}.${t}`);return o===!0||o==="true"});function Efe(t,e,n,o){let r="",i=n;if(e.join(d.HASH_DELIMITER)&&(r=y.getHashedString(e.join(d.HASH_DELIMITER)),i=n+d.UNDERSCORE_STRING+r),o){let l=oi(),u=l?l[n]?.[i]:{};return Array.isArray(u?.[O.getDefaultQualifiedName("pxResults")])?u[O.getDefaultQualifiedName("pxResults")]:[]}let c=(t.getDataObject()?.[n]||{})?.[i]||{};return Array.isArray(c?.[O.getDefaultQualifiedName("pxResults")])?c[O.getDefaultQualifiedName("pxResults")]:[]}function Afe(t,e,n){let o=ge.getPropertyName(t?.propertyForDisplayText??""),r=ge.getPropertyName(t?.propertyForValue??""),i=n?.lastIndexOf(".")??-1,s=i>0?n?.substring(0,i):"",a=n?.substring(i+1),c=s?`${e.getPageReference()}.${s}`:void 0,l=`.${d.SUMMARY_OF_EXPRESSIONS}.${t?.name}`,u=e.getContextDataValue(l,c)??e.getContextDataValue(l)??[];if(Array.isArray(u)&&u.some(p=>Object.hasOwn(p,"field"))){let p=u.find(m=>m.field===a);u=Array.isArray(p?.results)?p.results:[]}return u.map(p=>({key:p[r]||p[`.${r}`],value:p[o]||p[`.${o}`]}))}$e.registerHandler("@ASSOCIATED",(t,e)=>{let n={},o=[],r="",i="",s=e.getPageReference();if(t.startsWith(".")){r=`${s}.${t.substring(1)}`;let _=t.split(".").filter(P=>!!P);_.length>1&&(_.pop(),i=_.join(".")),n=e.getFieldMetadata(t.substring(1))}else n=e.getFieldMetadata(t),r=t;let a=n?.datasource?.tableType,c=n?.datasource?.mode===d.READONLY,l=n?.datasource?.name||"",u=e.getComponentConfig();if(u&&u.deferDatasource&&((typeof u.datasourceMetadata!="object"||u.datasourceMetadata===null)&&(u.datasourceMetadata=`@FIELD_META ${t}`,e.setStateProps({datasourceMetadata:u.datasourceMetadata})),a===d.DATA_PAGE))return null;if(a===d.DECISION||a===d.RULE_REFERENCE)return Afe(n?.datasource,e,t.substring(1));if(a!==d.DATA_PAGE){let _=e.getLocalizationService(n?.localeReference);return n?.datasource?.records?.map(P=>({key:P.key,value:_.getLocalizedText(P.value)}))}let p=ge.getPropertyName(n?.datasource?.propertyForDisplayText),m=ge.getPropertyName(n?.datasource?.propertyForValue),f=Array.isArray(n?.datasource?.parameters)?n?.datasource?.parameters:[],g=e.getContextName(),h=[];if(f.forEach(_=>{if(ge.isProperty(_?.value)){let P=ie(`.${y.getFullPropertyReference([i,ge.getPropertyName(_.value)])}`,s,g);h.push(y.getFullPropertyReference([s,i,ge.getPropertyName(_?.value)])),(P==null||P==="")&&(P=d.NULL_STRING),o.push(P)}else o.push(_?.value||d.NULL_STRING)}),g){let _=lc.getContextObjectByName(g)||{};h.forEach(P=>{if(P in _){let N=_[P];_[P]=[...new Set([...N,r])]}else _[P]=[r]}),lc.addContextName(g,_)}let E=Efe(e,o,l,c),C=e.getLocalizationService(),I=_=>C.getLocalizedDataPage(_,l,p);return E.map(_=>{let P=_[p]||_[`.${p}`];return typeof P=="string"&&(P=I(P)),{key:_[m]||_[`.${m}`],value:P}})});$e.registerHandler("@ROUTING_INFO",(t,e)=>mf(e.getContainerName(),e.getContextName()));$e.registerHandler("@ENV",(t,e)=>{let n=xA(t);return n?n(e):t});$e.registerHandler("@DATASOURCE",(t,e)=>{let n=e.getSharedDataPageForReferenceList()||e.getValue(t)||[],o=e.getComponentConfig(),r=Object.keys(o).find(i=>o[i]?.source?.includes(t));if(r){let{fields:i,copyAll:s,filterDownloadedFields:a}=o[r],c=[];return n.forEach(l=>{let u={};s||a?Object.keys(l).forEach(p=>{let m=ge.getPropertyName(p);u[m]=l[m]}):Object.keys(i).forEach(p=>{let m=ge.getPropertyName(i[p]);u[p]=l[m]}),c.push(u)}),c}return[]});$e.registerHandler("@FIELD_META",(t,e)=>{let n={};t.startsWith(".")?n=e.getFieldMetadata(t.substring(1)):n=e.getFieldMetadata(t);let o;if(n&&n.datasource&&n.datasource.parameters){let r="",i=t.split(".").filter(s=>!!s);if(i.length>1&&(i.pop(),r=`.${i.join(".")}`),Array.isArray(n.datasource.parameters)){let s=[];n.datasource.parameters.forEach(a=>{let c={},{name:l,value:u}=a;c.name=l,typeof u=="string"&&u.startsWith("@P")?c.value=`@P ${r}${u.substring(3)}`:c.value=u,s.push(e.resolveConfigProps(c))}),o=s}else o=e.resolveConfigProps(n.datasource.parameters);n={...n,datasource:{...n.datasource,parameters:o}}}return n});$e.registerHandler("@USER",(t,e,n)=>{let o=n?Q.getLitePropertyValue(n,t):e.getValue(t),r=n?Q.getReferencedUser(o,n):e.getReferencedUser(o);return{userId:o,userName:r?r.UserName:null}});$e.registerHandler("@ACTIVE_CASES",(t,e)=>Nr.getOpenedCaseItems(`${e.getContextName()}/${e.getContainerName()}`));$e.registerHandler("@LR",t=>t);$e.registerHandler("@CASE",(t,e)=>t===d.ID?e.getCaseInfo().getKey():t);$e.registerHandler("@SHARED",t=>wn.getSharedState(t));$e.registerHandler("@PARAGRAPH",(t,e)=>{let{useDecision:n,isBanner:o,messageType:r,dismissBanner:i}=ko.getParagraphProperties(t,e),s=ko.hasDecisionBannerContent(t,e);return n&&s?ko.processBannerDecisionParagraph(t,e):o?{htmlContent:ko.processParagraph(t,e),messageType:r,dismissBanner:i}:ko.processParagraph(t,e)});$e.registerHandler("@FORMAT",(t,e)=>{let n=e.getCurrentClassID(),o=J0(t,n);if(!o?.dynamicContents?.length)return null;let{dynamicContents:r}=o;for(let i=0;i<r.length-1;i+=1)if(Q.resolveWhen(r[i].when,e))return{pattern:r[i].content};return{pattern:r[r.length-1].content}});$e.registerHandler("@FILTERED_LIST",(t,e)=>{let n=t.substring(1,t.indexOf("[")),o=t.substring(t.indexOf("]")+2),r=t.substring(t.indexOf("[")+1,t.indexOf("]"));if(!e)return null;let{useCustomContext:i}=e,s;return y.isEmpty(i)?s=e.getValue(`.${n}`):(s=i,s=y.getIn(s,n)),s&&o.length>0?(r&&(s=s.filter(a=>ib(r,a))),s.map(a=>y.getIn(a,o))):null});$e.registerHandler("@ADDRESS",(t,e)=>{let n=e.getValue(t)?.[O.getDefaultQualifiedName("pyCountry")];return n?`${PCore.getDefaultQualifiedName("pyAddressForm")}_${n}`:PCore.getDefaultQualifiedName("pyAddressForm")});$e.registerHandler("@DATATYPE",(t,e)=>e.getValue(t));$e.registerHandler("@ATTACHMENT",(t,e,n)=>{let o;return n?o=Q.getLitePropertyValue(n):o=e.getValue(t),Zu.prepareAttachmentData(o)});var Cfe=t=>t.startsWith(".")?t.slice(1):t,ZH=t=>{let e=t.lastIndexOf(".");return e<0?t:t.slice(e+1)};$e.registerHandler("@FL",(t,e)=>{let n=Cfe(t),o=e.getFieldMetadata(n);return!o||!o.label?ZH(n):e.getLocalizationService(o.localeReference).getLocalizedText(o.label)});$e.registerHandler("@DEFERRED",(t,e)=>e.getFieldMetadata(t)?.isDeclarativeTarget?{isDeferred:!0,propertyName:t}:e.getValue(t));$e.registerHandler("@GENAICOACH",(t,e)=>Y0(t,e.getCurrentClassID()));$e.registerHandler("@AIAGENT",(t,e)=>{let n=Z0(t,e.getCurrentClassID());if(n)return n;let o=e.getComponentConfig();if(o){let r=o?.coaches?.find(i=>i?.config?.coach?.substring(9)===t&&i?.config?.ruleNamespace)?.config;if(r?.label){let i={label:r.label};e.resolveConfigProps({label:r.label},i);let s=i.label;return{insName:T.getFeatureMap()?.isNamespaceEnabled&&t.includes(d.DOUBLE_UNDERSCORE_STRING)?t:`${r.ruleNamespace}${d.DOUBLE_UNDERSCORE_STRING}${t}`,label:e.getLocalizedValue(s),type:"agent"}}}return null});$e.registerHandler("@REFRESH",(t,e)=>{let n=e.getCaseInfo().getKey(),o=e.getContextName(),r=e.getPageReference(),i={autoDetectRefresh:!0,preserveClientChanges:!1};Bi.registerForRefresh("PROP_CHANGE",e.getActionsApi().refreshCaseView.bind(e.getActionsApi(),n,"",r,{...i,refreshFor:`${r.replace("caseInfo.content","")}${t}`,resetForm:!0}),`${r}${t}`,`${o}/${r}`,o)});$e.registerHandler("@DW",(t,e,n)=>{let o,r=`${d.CONTEXT_DATA}.${d.SUMMARY_OF_DYNAMIC_WHENS}.${t}`;if(n){let{context:i}=n??{};o=ie(r,null,i)}else o=e.getValue(r);return o===!0||o==="true"});$e.registerHandler("@CA",(t,e,n)=>n?Q.getLitePropertyValue(n):e.getValue(t));function Sb(t){return t&&t.startsWith("@")?t.replace(/^@\w+\s+\./,""):t}function Ife(t,e){let n=t.value&&typeof t.value=="string"&&Sb(t.value);return n?n===e:!1}function QH(t,e){let n=t.authorContext;return typeof n!="string"||!n?!1:(n.startsWith(".")?n.substring(1):n)===e}function X0(t,e,n){let o=t.config;if(!o?.name||typeof o.name!="string")return null;let r=e(o.name);return r?Array.isArray(r)?r.length===1?r[0]:r.find(i=>i.classID===o.ruleClass)??r.find(i=>i.classID===n)??null:r:null}function e5(t,e,n,o,r=[]){if(t.config&&Ife(t.config,e)&&r.push({type:t?.type,config:t.config}),!t.children)return r;for(let i=0;i<t.children.length;i+=1){let s=t.children[i],a=s.type==="reference"?X0(s,n,o):s;a&&e5(a,e,n,o,r)}return r}var _fe=new Set(["autocomplete","dropdown","combobox"]);function t5(t){let e=t.config;return e?e.template==="DataReference"&&typeof e.displayAs=="string"&&_fe.has(e.displayAs.toLowerCase())&&e.selectionMode!=="multi":!1}function bfe(t){let e=t?.children;return Array.isArray(e)&&e.length>0?e[0]:null}function Tfe(t){let e=t.config??{},n={};return(e.contextClass!==void 0||e.targetObjectClass!==void 0)&&(n.contextClass=e.contextClass??e.targetObjectClass),e.referenceList!==void 0&&(n.referenceList=e.referenceList),n.parameters=e.parameters,n.name=e.name,n}function vfe(t){let n=(Array.isArray(t?.inheritedProps)?t.inheritedProps:[]).reduce((r,i)=>(typeof i!="object"||i===null||Array.isArray(i)||"prop"in i&&typeof i.prop=="string"&&"value"in i&&(r[i.prop]=i.value),r),{}),o={};return o.referenceType=t.referenceType,o.ruleClass=t.ruleClass,o.authorContext=t.authorContext,t.visibility!==void 0&&(o.visibility=t.visibility),t.readOnly!==void 0&&(o.readOnly=t.readOnly),t.disabled!==void 0&&(o.disabled=t.disabled),t.required!==void 0&&(o.required=t.required),t.isManyToMany!==void 0&&(o.isManyToMany=t.isManyToMany),{...o,...n}}function n5(t,e,n){let o=Tfe(t),r=bfe(t),i=vfe(e),s={...r?.config,...o,...i};return Array.isArray(n)&&n.length>0&&(s.descriptors=n),s.dataRelationshipContext=s.contextClass&&s.name?s.name:null,{type:r?.type,config:s}}function Rfe(t,e,n,o,r){try{if(!t.name||typeof t.name!="string")return null;let i=e(t.name),s;if(Array.isArray(i))s=i;else if(i)s=[i];else return null;let a=s.find(l=>l.classID===t.ruleClass);if(!a||!t5(a))return null;let c=[];if(r){let l=typeof t.ruleClass=="string"&&t.ruleClass?t.ruleClass:o,u=r(n,l);u&&typeof u=="object"&&"descriptors"in u&&u.descriptors&&Array.isArray(u.descriptors)&&u.descriptors.length>0&&(c=u.descriptors)}return n5(a,t,c)}catch{return null}}function r5(t,e,n,o=[],r="",i){if(t.config&&QH(t.config,e)){let s=Rfe(t.config,n,e,r,i);s&&o.push(s)}if(!t.children)return o;for(let s=0;s<t.children.length;s+=1){let a=t.children[s],c=a.type==="reference"&&!(a.config&&QH(a.config,e))?X0(a,n,r):a;c&&r5(c,e,n,o,r,i)}return o}function Pfe(t,e){return!t||typeof t!="object"?null:Array.isArray(t)?t.find(o=>o.classID===e)??null:t}function Nfe(t){let e=T.getInlineEditActionViews(t);return e&&e.length>0?e[0]:O.getDefaultQualifiedName("pyEdit")}function o5(t,e){let n=Nfe(t),o=e(n);return Pfe(o,t)}function eM(t,e,n,o){let r=o5(e,n);if(!r)return[];let i=e5(r,t,n,e);return i.length>0?i:r5(r,t,n,[],e,o)}function XH(t,e){let n=t.parameters;return!n||typeof n!="object"||Array.isArray(n)?!1:Object.values(n).some(o=>{let r=Sb(o);return e.some(i=>r===i||r.startsWith(`${i}.`))})}function Q0(t,e,n,o,r=[]){if(t.config&&XH(t.config,e)&&t.type!=="View"&&r.push({type:t.type,config:t.config,children:t.children}),!t.children)return r;for(let i=0;i<t.children.length;i+=1){let s=t.children[i];if(s&&s.type==="reference"&&s.config){let a=X0(s,n,o);a&&a.config&&(t5(a)&&XH(a.config,e)?r.push(n5(a,s.config)):Q0(a,e,n,o,r))}else Q0(s,e,n,o,r)}return r}function i5(t,e,n,o){let r=o5(e,n);if(!r)return[];let i=eM(t,e,n);if(!i||i.length===0)return[];let s=[],a=Sb(i[0].config.value);if(a&&s.push(a),o){let c=o(t,e);c&&!Array.isArray(c)&&(c?.descriptors||[]).forEach(u=>{let p=Sb(u);p&&!s.includes(p)&&s.push(p)})}return Q0(r,s,n,e)}var tM="D_pzRuleLookup",Eb="pzInsKey",Ab=t=>t.startsWith("Rule-"),Ofe="Data-Rule-AppMetadata",nM=t=>typeof t=="string"&&(Ab(t)||t.startsWith(Ofe))&&T.isRuleBlendedModeEnabled(),s5=()=>({isAlternateKeyStorage:!1,parameters:{[Eb]:"@P .pzInsKey"}});var c5={},l5={},Ib={},aM=0,_b=!1,cM={},Cb={},rS={},iM={},sM={},Wi={},bb={},u5={},d5={},rM={},oM={},xfe=(t,e,n,o)=>{let r=Array.isArray(n)?n:[n];(Array.isArray(o)?o:[o]).forEach(s=>{let a=r.findIndex(c=>c.classID===s.classID);if(a===-1)r.push(s);else{let c={isDeclarativeTarget:!1},l={...r[a],...c,...s};r[a]=l}}),e[t]=r.length===1?r[0]:r},ro=(t={},e={})=>{if(Object.keys(e).length===0){y.copy(t,e);return}Object.keys(t).forEach(n=>{let o=t[n],r=e[n];r?xfe(n,e,r,o):e[n]=o})},ft=(t,e="")=>{if(!t)return null;let n=Cb[t];if(!n)return null;if(!e)return y.deepClone(n);let o;return Array.isArray(n)?o=n.find(r=>r.classID.toLowerCase()===e.toLowerCase()||r.associationClassID?.toLowerCase()===e.toLowerCase())||null:o=n.classID.toLowerCase()===e.toLowerCase()||n.associationClassID?.toLowerCase()===e.toLowerCase()||(n.type==="Page"||n.type==="Page List")&&n?.pageClass?.toLowerCase()===e.toLowerCase()?n:null,o?y.deepClone(o):null},Hi=t=>(rM[t]||(rM[t]=new yb),rM[t]),Dfe=(t,e)=>(oM[t]||(oM[t]=e()),oM[t]),Tb=(t,e,n,o=[])=>{if(!e||!t)return null;if(!t.includes(".")){let a,c=ft(t,e);return o.length&&(a=o.join(".")),{...c,embeddedType:n,category:a}}let[r,...i]=t.split("."),s=ft(r,e);return s&&o.push(s.label),Tb(i.join("."),s?.pageClass,s?.type,o)},Uf=t=>{Object.keys(t).length!==0&&(ro(t,Ib),_b&&(aM+=1))},$fe=()=>aM,r0=()=>{_b=!0},o0=()=>{_b=!1},lM=t=>{ro(t,cM)},wfe=t=>{t.views&&Object.keys(t.views).length>0&&(ro(t.views,Ib),_b&&(aM+=1)),t.navigations&&ro(t.navigations,cM),t.personalizations&&ro(t.personalizations,iM),t.insights&&ro(t.insights,sM),t.paragraphs&&ro(t.paragraphs,c5),t.formats&&ro(t.formats,l5),t.dataTypes&&ro(t.dataTypes,Wi),t.datapages&&ro(t.datapages,bb),t.genAICoaches&&ro(t.genAICoaches,u5),t.AIAgents&&ro(t.AIAgents,d5)},Mfe=t=>{let e=t.fields||{};Object.keys(e).forEach(n=>{let o=e[n];if(Array.isArray(o)){if(o.forEach(r=>{t.datapages&&r.datasource&&r.datasource.tableType==="DataPage"&&(r.datasource.mode=t.datapages?.[r.datasource.name].mode);let i=Gi(kr.FIELD,n,r.definedOnClassID??r.classID);r.localeReference=i}),o.length===1){let[r]=o;e[n]=r}}else t.datapages&&o?.datasource&&o.datasource.tableType==="DataPage"&&(o.datasource.mode=t.datapages[o.datasource.name].mode)})},Rf=t=>{wfe(t),Mfe(t);let{datapages:e={}}=t;Object.keys(e).forEach(n=>{rS[n]=e[n]}),ro(t.fields,Cb)},ac=t=>Ib[t],dR=(t,e)=>{let n=Ib[t];return Array.isArray(n)?n.some(o=>o.classID===e):n?.classID===e},uM=t=>cM[t],$n=t=>t in rS?rS[t]:null,vb=t=>t in iM?iM[t]:null,dM=t=>t in sM?sM[t]:null,pM=t=>{let e={};return Object.keys(Cb).forEach(n=>{let o=Cb[n],r;Array.isArray(o)?r=o.find(i=>t===i.classID):t===o.classID&&(r=o),r&&(e[n]=y.deepClone(r))}),e},kfe=(t,e)=>{let o=ft(t,e)?.datasource?.parameters;return o?y.deepClone(o):null},nl=(t,e)=>{let n=null,o=c5[t];return o&&(Array.isArray(o)?n=o.find(r=>r.classID===e):o.classID===e&&(n=o)),n?y.deepClone(n):null},J0=(t,e)=>{let n=null,o=l5[t];return o&&(Array.isArray(o)?n=o.find(r=>r.classID===e):o.classID===e&&(n=o)),n?y.deepClone(n):null},Y0=(t,e)=>{let n=null,o=u5[t];return o&&(Array.isArray(o)?n=o.find(r=>r.classID===e):o.classID===e&&(n=o)),n?y.deepClone(n):null},Z0=(t,e)=>{let n=null,o=d5[t];return o&&(Array.isArray(o)?n=o.find(r=>r.classID===e):o.classID===e&&(n=o)),n?y.deepClone(n):null},Rw=t=>{if(t in Wi){let{savableDataPage:e}=Wi[t];return e}return null},a5=(t,e)=>({isAlternateKeyStorage:e,parameters:t.reduce((n,o)=>(n[o.name]=o.linkedField?`@P .${o.linkedField}`:`@P .${o.name}`,n),{})}),Lfe=t=>{let e=Object.entries(bb).find(([,o])=>o.classID===t&&o.structure==="page");if(e)return e[0];let n=Object.entries(rS).find(([,o])=>o.classID===t&&o.structure==="page");return n?n[0]:null},Ufe=t=>{let e=bb[t];if(e?.parameters?.length)return a5(e.parameters,!!e.isAlternateKeyStorage);let o=rS[t]?.parameters;if(o){let r=Array.isArray(o)?o:[o];if(r.length>0)return a5(r.map(i=>({name:i.name,linkedField:i.linkedField})),!1)}return null},p5=t=>{if(Object.hasOwn(Wi,t)){let{lookupDataPage:n,lookupDataPageInfo:o}=Wi[t];if(n||!Ab(t))return{dataPageName:n,info:o}}let e=Lfe(t);return e?{dataPageName:e,info:Ufe(e)}:Ab(t)?{dataPageName:tM,info:s5()}:{dataPageName:null,info:null}},Pw=t=>{if(t===tM)return[{keyName:Eb,isAlternateKeyStorage:!0,linkedField:Eb}];let e=bb[t];if(!e)return null;let{classID:n,isAlternateKeyStorage:o,parameters:r}=e;if(o)return r.map(s=>({keyName:s.name,isAlternateKeyStorage:o,linkedField:s.linkedField}));let i=Wi[n];return i?i.classKeys.map(s=>({keyName:s,isAlternateKeyStorage:o})):[]},Nw=t=>{if(nM(t))return p5(t).dataPageName;if(t in Wi){let{lookupDataPage:e}=Wi[t];return e}return null},Ow=t=>{if(nM(t))return p5(t).info;if(Object.hasOwn(Wi,t)){let{lookupDataPageInfo:e}=Wi[t];return e}return null},l0=(t,e)=>{let n=t.split("."),o=n.pop(),r=new Na({options:{pageReference:`${n.join(".")}`,context:e}}),i=ft(o,r.getCurrentClassID())?.additionalInformation;if(!i?.includes("@PARAGRAPH"))return i;let s=ge.trimAnnotation(i);return ko.processParagraph(s,r)},zfe=(t,e)=>{let n=t.split("."),o=n.pop(),r=new Na({options:{pageReference:`${n.join(".")}`,context:e}}),i=ft(o,r.getCurrentClassID()),s={};return r._classID=r.getCurrentClassID(),r.resolveConfigProps(i,s),s},jfe=(t,e)=>eM(t,e,ac,ft),Ffe=(t,e)=>i5(t,e,ac,ft);var mM=class t{name;cascadeSubscribers;cascadeResetSubscribers;listChangeSubscribers;constructor(){this.name="CascadeManager",this.cascadeSubscribers={},this.cascadeResetSubscribers={},this.listChangeSubscribers=[]}registerResetDependencies(e,n,o,r,i,s="singleRecord"){if(!e||!o||!r?.length)return;let a=o.startsWith(".")?`${n}.${o.substring(1)}`:o,c=this.cascadeResetSubscribers[e]||{},l=this._handlePageReference(n,o,i);r.forEach(u=>{if(!u)return;let p=u.startsWith(".")?u.substring(1):u;if(p=this._resolveDependentPropertyReference(l,p),p in c){let m=c[p];m.find(g=>g.propertyName===a)||m.push({propertyName:a,mode:s})}else c[p]=[{propertyName:a,mode:s}]}),Object.keys(c).length>0&&(this.cascadeResetSubscribers[e]=c)}deregisterResetDependencies(e,n,o,r,i){if(!e||!o||!r?.length)return;let s=o.startsWith(".")?`${n}.${o.substring(1)}`:o,a=this.cascadeResetSubscribers[e]||{},c=this._handlePageReference(n,o,i);r.forEach(l=>{if(l){let u=l.startsWith(".")?l.substring(1):l;if(u=this._resolveDependentPropertyReference(c,u),u in a){let p=a[u];y.removeExistingDependentProperty(p,s)}}}),Object.keys(a).length>0&&(this.cascadeResetSubscribers[e]=a)}getResetDependencies(e,n){return this.cascadeResetSubscribers[e]?.[n]||[]}purgeResetDependencies(e){e&&this.cascadeResetSubscribers[e]&&delete this.cascadeResetSubscribers[e]}registerFields(e,n,o,r,i){this.cascadeSubscribers[e]=this.cascadeSubscribers[e]||{},o?.forEach(s=>{this.cascadeSubscribers[e][`${n}${s}`]=this.cascadeSubscribers[e][`${n}${s}`]||{};let a=this.cascadeSubscribers[e][`${n}${s}`];if(!a[i]){a[i]=r;let c=ie(s,n,e);a.previousValue=typeof c=="object"?null:c}})}registerListField(e,n,o,r,i){let s=t._getFieldsForList(e,n,o);s.length>0&&(this.registerFields(e,n,s,r,i),Lp.enableCascade(e))}unRegisterListField(e,n,o,r){let i=t._getFieldsForList(e,n,o);i.length>0&&this.unRegisterFields(e,n,i,r)}static _getFieldsForList(e,n,o){let r=[],i=ft(o,ie("classID",n,e));return i&&!Array.isArray(i)&&i.datasource&&i.datasource.parameters&&Object.values(i.datasource.parameters).forEach(s=>{if(ge.isProperty(s)){let a=ge.trimAnnotation(s);r.push(a)}}),r}unRegisterFields(e,n,o,r){this.cascadeSubscribers[e]&&o?.forEach(i=>{if(!this.cascadeSubscribers[e][`${n}${i}`])return;let s=this.cascadeSubscribers[e][`${n}${i}`];s[r]&&delete s[r]})}triggerCascade(e,n,o,r){let i=!1;this.cascadeSubscribers[e]&&this.cascadeSubscribers[e][n]&&(Object.keys(this.cascadeSubscribers[e][n]).forEach(s=>{let a=this.cascadeSubscribers[e][n];s!=="previousValue"&&a.previousValue!==o&&(i=!0,r?r.add(a[s]):a[s](n,o))}),i&&(this.cascadeSubscribers[e][n].previousValue=o))}purgeCascadeFields(e){delete this.cascadeSubscribers[e]}handleServerChanges(e,n=[],o=[]){if(!e)return;let r=new Set;o.forEach(i=>{let s=ie(i,"",e);this.triggerCascade(e,i,s,r)}),r.forEach(i=>{i()}),!(this.listChangeSubscribers.length===0||n.length===0)&&n.forEach(i=>{this.listChangeSubscribers.forEach(s=>{let a=ie(i,"",e);s(e,i,a)})})}_updateChangedProperties(e,n,o,r,i,s,a,c){let l=o&&c.some(u=>r.startsWith(u));if(e!==n||l){let u=r.lastIndexOf("."),p=r.substring(0,u),m=r.substring(u);if(yd.getMessages({type:"error",property:m,context:i,pageReference:p})?.length>0&&a.push(r),!o)return;s.push(r)}}isChangedListPropertyExist(e){let n=!0;return(this.listChangeSubscribers.length===0||!y.isValidPageListProperty(e))&&(n=!1),n}_getServerProperties(e,n,o,r,i,s,a){if(typeof e!="object"){i.push(o.replace(/\.(\d+)/g,"[$1]"));let l=this.isChangedListPropertyExist(o);o=o.replace(/\.(\d+)/g,"[$1]");let u=ie(o,"",n);if(u===void 0&&!e&&e!==0)return;this._updateChangedProperties(u,e,l,o,n,r,s,a);return}let c=Object.keys(e??{});for(let l=0,u=c.length;l<u;l+=1){let p=c[l],m=`${o}.${p}`;if(Array.isArray(e[p])){let f=ie(m,"",n);(!f||f?.length!==e[p].length)&&a.push(m.replace(/\.(\d+)/g,"[$1]"))}this._getServerProperties(e[p],n,m,r,i,s,a)}}getServerProperties(e,n,o=d.CASE_INFO.CASE_INFO_CONTENT){let r=[],i=[],s=[],a=[],c=y.getIn(e,o);return!c||!n?{changedListProperty:r,leafProperty:s,changedPropertyWithError:i}:(this._getServerProperties(c,n,o,r,s,i,a),{changedListProperty:r,leafProperty:s,changedPropertyWithError:i})}_handlePageReference(e,n,o){let r=e;if(o==="Page"&&n.startsWith(".")&&n.slice(1).includes(".")){let i=n.substring(0,n.lastIndexOf("."));r=`${e}${i}`}return r}_resolveDependentPropertyReference(e,n){let o=n.match(/^(Parent(?:\.Parent)*)(?:\.(.*))?$/);if(!o)return y.getFullPropertyReference([e,n]);let r=o[1].split(".").length,i=o[2]||"",s=e.split("."),a=s.slice(0,Math.max(s.length-r,0)).join(".");return i?a?`${a}.${i}`:i:a}registerForListChanges(e=()=>{}){this.listChangeSubscribers.push(e)}unRegisterForListChanges(){this.listChangeSubscribers=[]}},Nn=new mM;var Vfe=/\.(?![^[]+\])|\[|\]/g,Bfe=new Set(["createWork","showHarness","openAssignment","openWorkByHandle","initRouting"]),gM=null,Io=t=>t?.split(Vfe).filter(Boolean),hM=t=>{gM=t},we=()=>gM,v=t=>{if(!t)return;let e=[],n=[],o=[];!Array.isArray(t)&&t.type==="MERGE_DATA"&&({changedListProperty:e,leafProperty:n,changedPropertyWithError:o}=Nn.getServerProperties(t.payload.data,t.payload.context,t.payload.rootPageReference)),gM?.dispatch(t),!Array.isArray(t)&&t.type==="MERGE_DATA"&&(o.length&&!t.payload.skipValidation&&o.map(i=>{let s=i.lastIndexOf(".");return{property:i.substring(s),pageReference:i.substring(0,s)}}).forEach(({property:i,pageReference:s})=>{yd.clearMessages({type:"error",property:i,pageReference:s,context:t.payload.context});let a=be.getFieldReferenceForProperty(t.payload.context,`${s}${i}`);if(a){let c=Q.resolveContextTreeNodeProps(a.props);Ft.validate(c.componentName?.toLowerCase(),c.propertyName,Q.getLitePropertyValue(c,c.propertyName),c)}}),Nn.handleServerChanges(t.payload.context,e,n))},J=t=>we()?.getState().data?.[t],oi=()=>we()?.getState().data[d.SHARED],Hfe=t=>!!(t&&!t.startsWith('"')&&!t.startsWith("'")),Gfe=t=>t&&t.trim().substring(1,t.length-1),fM=(t,e,n)=>{if(!Hfe(t))return Gfe(t);let o=t?.startsWith(".")?e+t:t,r=Io(o);return y.getIn(n,r)},ie=(t,e,n)=>fM(t,e,J(n)),Ss=(t,e,n)=>t?fM(e,`${d.CONTEXT_DATA}.${t}`,J(n)):fM(e,`${d.CONTEXT_DATA}`,J(n)),qfe=(t,e,n)=>{let o=Io(`${e}.${n}`);return y.getIn(t,o)},uc=(t,e,n)=>qfe(J(n),`${d.CONTEXT_DATA}.${t}`,e),Wfe=t=>{let{context:e}=t;if(we()?.getState().data[e])return JT;let{action:o}=t;return Bfe.has(o)?bt:JT},yM=(t,e)=>{let n=Io(e);return y.deleteIn(t,n)},m5=t=>!Array.isArray(t)&&typeof t=="object",Rb=(t,e=[],n=[])=>{let o=new Set(n);Array.isArray(e)&&e.length>0&&e.forEach(r=>{r.allowMultiple?r.allowMultiple&&!o.has(r.path)&&y.setIn(t,r.path,[]):y.setIn(t,r.path,{})}),n.length>0&&y.rearrangeProperties(n,t)},jt=(t,e,n={})=>{let{isArrayDeepMerge:o,propertiesToReplace:r=[],propertiesToReArrange:i=[]}=n;Array.isArray(t)&&!e&&(e=[]),(r.length>0||i.length>0)&&Rb(t,r,i);let s=(a,c)=>{if(m5(a)&&c!==null&&typeof c!="string"&&typeof c!="number"&&typeof c!="boolean")return Array.isArray(c)?c:rs(a,c,s);if(Array.isArray(a)&&c!==null&&Array.isArray(c)){if(o)return rs(a,c,s);{let l=c.length;if(typeof o>"u"&&l===a.length)return rs(a,c,s)}}return c===""&&a&&typeof a=="object"?a:c};return s(t,e)},SM=(t,e,n,o={isArrayDeepMerge:!0})=>{let{isArrayDeepMerge:r}=o,i=Io(e),s=y.getIn(t,i);if(typeof n=="object"&&n!==null){if(s===n)return t;let a=jt(s,n,{isArrayDeepMerge:r});return y.setIn(t,i,a)}return y.setIn(t,i,n)},EM=(t,e,n)=>{let o=Io(e);return y.setIn(t,o,n)},js=()=>{let t=Sa,{promise:e,actionMgrID:n}=M.actionManagerPromise(t);return v({type:t,payload:{actionMgrID:n}}),e},Up=t=>!!we()?.getState()?.data?.[t];var Kfe=" @#$%=!<>/\\",Jfe=/^[^/]+\/[^/]+\.[^/.]+$/,Yfe=typeof structuredClone=="function",AM=class t{static mergeDeep(e,n){return rs(n,e)}static hasIn(e,n){return FU(e,n)}static getIn(e,n,o){return sf(e,n,o)}static setIn(e,n,o){return BU(e,n,o)}static deleteIn(e,n){return UU(e,n)}static isObjectEmpty(e){return!e||Object.entries(e).length===0}static isEmpty(e){return A2(e)}static deepClone(e={}){if(e===null||typeof e!="object")return e;if(Yfe)try{return structuredClone(e)}catch{}return JSON.parse(JSON.stringify(e))}static copy(e,n){Object.keys(e).forEach(o=>{n[o]=e[o]})}static isPropertyRef(e){if(!e||!e.includes("."))return!1;for(let n=0;n<e.length;n+=1)if(Kfe.includes(e[n]))return!1;return!0}static isValidPropertyReference(e){return typeof e!="string"?!1:e===""||e.trim()!==""}static isWhenExist(e){let n=["visibility","disabled","readOnly","required"],o=!1;for(let r of Object.keys(e)){let i=e[r];i&&typeof i=="object"&&!Array.isArray(i)?o=o||t.isWhenExist(i):n.includes(r)&&typeof i=="string"&&i?.startsWith("@W ")&&(o=!0)}return!o&&e?.type==="multirecordlist"&&e?.renderMode==="Editable"&&(o=Object.keys(e?.allowActions??{}).some(r=>typeof e?.allowActions?.[r]=="string"&&e.allowActions[r]?.startsWith("@W "))),o}static getWhenNames(e){let n=["visibility","disabled","readOnly","required"],o="",r=new Set;if(e&&Object.keys(e).forEach(i=>{let s=e[i];n.includes(i)&&typeof s=="string"&&s.startsWith("@W ")&&(o=ge.trimAnnotation(s),r.add(o))}),e?.type==="multirecordlist"&&e?.renderMode==="Editable"){let i=e?.allowActions??{};Object.keys(i).forEach(s=>{typeof i[s]=="string"&&i[s]?.startsWith("@W ")&&(o=ge.trimAnnotation(i[s]),r.add(o))})}return[...r]}static isExpressionExist(e){let n=["disabled","visibility","readOnly","required"],o=!1;for(let r of Object.keys(e))n.includes(r)&&typeof e[r]=="string"&&e[r]?.startsWith("@E ")&&(o=!0);return o}static buildDataObject(e,n){let o={},r=o;return n.indexOf(".")>0?n.split(".").forEach(s=>{if(s.includes("[")){let[a]=s.split("[");o[a]=[],o=o[a],s=s.substring(s.indexOf("[")+1,s.lastIndexOf("]"))}o[s]={},o=o[s]}):(o[n]={},o=o[n]),Object.keys(e).forEach(i=>{let s=i;i.startsWith(".")&&(s=i.substring(1)),o[s]=e[i]}),r}static buildObject=(e,n,o)=>{if(o===void 0)return;let r=e.split("."),i=0;for(;i<r.length-1;i+=1){let s=r[i];s?.toString().length&&!n[s]&&(n[s]={}),n[s]&&(n=n[s])}typeof o=="object"?(n[r[i]]||(n[r[i]]=Array.isArray(o)?[]:{}),jt(n[r[i]],o,{isArrayDeepMerge:!0})):n[r[i]]=o};static crc32(e){let n=-1,o=t.getUtf8Bytes(e);for(let r of o)n=n>>>8^t.CRC32_TABLE[(n^r)&255];return(n^-1)>>>0}static getUtf8Bytes(e){if(t.utf8Encoder===null&&typeof globalThis.TextEncoder=="function"&&(t.utf8Encoder=new globalThis.TextEncoder),t.utf8Encoder)return Array.from(t.utf8Encoder.encode(e));let n=[];for(let o=0;o<e.length;o+=1){let r=t.getCodePoint(e,o);n.push(...t.encodeCodePoint(r.value)),o=r.nextIndex}return n}static getCodePoint(e,n){let o=e.charCodeAt(n),r=e.charCodeAt(n+1);return o>=55296&&o<=56319&&r>=56320&&r<=57343?{value:65536+(o-55296<<10)+(r-56320),nextIndex:n+1}:o>=55296&&o<=57343?{value:65533,nextIndex:n}:{value:o,nextIndex:n}}static encodeCodePoint(e){return e<=127?[e]:e<=2047?[192|e>>>6,128|e&63]:e<=65535?[224|e>>>12,128|e>>>6&63,128|e&63]:[240|e>>>18,128|e>>>12&63,128|e>>>6&63,128|e&63]}static CRC32_TABLE=(()=>{let e=[];for(let n=0;n<256;n+=1){let o=n;for(let r=0;r<8;r+=1)o=o&1?3988292384^o>>>1:o>>>1;e[n]=o>>>0}return e})();static utf8Encoder=null;static getHashedString(e){return t.crc32(e).toString(16)}static getPropertyName(e){if(e){let n=e.startsWith("@P"),o=n?e.indexOf(" "):-1;return n?e.substring(o+2):e}return e}static getPropertyNameFromDependency(e){return typeof e=="string"?e:e.propertyName}static isValidJson(e){try{return JSON.parse(e)}catch(n){return console.error("not a Valid JSON",n),!1}}static isEqual(e,n){return Ro(e,n)}static isContains(e,n){let o=Object.keys(e);for(let r=0;r<o.length;r+=1)if(e[o[r]]&&t.isEqual(e[o[r]],n))return!0;return!1}static removeExistingDependentProperty(e,n){let o=e.findIndex(r=>r.propertyName===n);o>=0&&e.splice(o,1)}static getFullPropertyReference(e){return Array.isArray(e)?e.filter(n=>!!n).join("."):""}static iterateLeafNodes(e,n){let o=(r,i=[])=>{Object.entries(r).forEach(([s,a])=>{i.push(Array.isArray(r)?Number(s):s),Array.isArray(a)?a.forEach((c,l)=>{i.push(l),o(c,i),i.pop()}):a!==null&&typeof a=="object"?o(a,i):n(i.slice(),a),i.pop()})};o(e)}static resolveStringBooleans(e){let n=["required","readOnly","visibility"],o=r=>r==="true";return Object.keys(e).forEach(r=>{n.includes(r)&&typeof e[r]=="string"&&(e[r]=o(e[r]))}),e}static generateUniqueID(){if(typeof crypto<"u"&&typeof crypto.randomUUID=="function")return crypto.randomUUID();let e=typeof performance<"u"&&typeof performance.now=="function"?performance.now().toString(36).replace(".",""):Math.random().toString(36).slice(2);return`${Date.now().toString(36)}${e}`}static unflatten(e){let n={};return Object.entries(e).forEach(([o,r])=>{let i=o.split("."),s;i.reduce((a,c,l)=>(a[c]?s=a[c]:Number.isNaN(Number(i[l+1]))?i.length-1===l?s=r:s={}:s=[],a[c]=s,a[c]),n)}),n}static flatten(e,n,o){n||(n=""),Array.isArray(e)?e.forEach((r,i)=>{t.flatten(r,`${n}[${i}]`,o)}):typeof e=="object"&&e!==null?Object.keys(e).forEach(r=>{let i=n?`${n}.${r}`:r;t.flatten(e[r],i,o)}):o[n]=e}static buildInstructionPageReference(e,n){let r=e.startsWith(d.OBJECT_INFO.OBJECT_INFO)?`${e}${n}`.replace(d.OBJECT_INFO.OBJECT_INFO_CONTENT,""):`${e}${n}`.replace(d.CASE_INFO.CASE_INFO_CONTENT,"").replace(d.DATA_INFO.DATA_INFO_CONTENT,"");return Ii.formatPageReference(r)}static convertPageRefToClipboardPageNotation(e){let n=/\[\d+\]/g;return e.replace(n,o=>o.replace(/\d+/g,r=>`${parseInt(r,10)+1}`).replace("[","(").replace("]",")"))}static convertClipboardPageToPageRefNotation(e){let n=/\(\d+\)/g;return e.replace(n,o=>o.replace(/\d+/g,r=>`${parseInt(r,10)-1}`).replace("(","[").replace(")","]"))}static segmentsMatch=(e,n)=>{let o=e.split("."),r=n.split(".");return o.length!==r.length?!1:o.every((i,s)=>{if(i===r[s])return!0;if(i.endsWith("()")){let a=i.slice(0,-2),c=r[s];return c.startsWith(a)&&/^\[\d+\]$/.test(c.slice(a.length))}return!1})};static isString(e){return typeof e=="string"}static rejectPendingActions(e){return e.forEach(n=>n.payload.actionMgrID&&M.rejectActionByID(n.payload.actionMgrID)),!0}static isValidAnnotation(e){let n=new Set(["@DATASOURCE","@ACTIVE_CASES","@ADDRESS","@ASSOCIATED","@ATTACHMENT","@CASE","@FILTERED_LIST","@PARAGRAPH","@P","@ROUTING_INFO","@USER","@W","@E","@SHARED","@CA"]),o=e.indexOf(" "),r=e.substring(0,o);return n.has(r)}static trimDotForProperty(e){return typeof e=="string"&&e.startsWith(".")?e.substring(1):e}static decodeHtmlEntities(e){if(typeof document<"u"){let r=document.createElement("textarea");return r.innerHTML=e,r.value}let n={"&":"&","<":"<",">":">",""":'"',"'":"'","'":"'","/":"/","/":"/"},o=e;return Object.entries(n).forEach(([r,i])=>{o=o.split(r).join(i)}),o=o.replace(/&#(\d+);/g,(r,i)=>String.fromCharCode(parseInt(i,10))),o=o.replace(/&#x([a-f\d]+);/gi,(r,i)=>String.fromCharCode(parseInt(i,16))),o}static convertObjectWithStringToBoolean(e){if(e&&!(Array.isArray(e)||typeof e!="object"))return Object.keys(e).forEach(n=>{let o,r=e[n];typeof r=="string"?r==="true"?o=!0:r==="false"?o=!1:o=r:typeof r=="object"?(o=r,t.convertObjectWithStringToBoolean(r)):o=r,e[n]=o}),e}static rearrangeProperties(e,n){e.forEach(o=>{let r=t.getIn(n,o);if(!r)return;let i=Object.hasOwn(r,O.getDefaultQualifiedName("pyCount"));if(i&&(r=r.pxResults),!r)return;let s=r.filter(c=>!c.error),a=r.filter(c=>c.error);t.setIn(n,i?`${o}.pxResults`:o,[...s,...a])})}static getETag(e){if(!e)return;let n=e,o=n?.split("/")||[],r=["workarea","modal","actionarea"],i=o.findIndex(s=>r.some(a=>s.startsWith(a)));return i!==-1&&(n=o.slice(0,i+1).join("/")),we()?.getState()?.data[n]?.caseInfo?.headers?.etag}static PAGELIST_PATH_REGEX=/^(?!.*\.\.)(?!\d)\w+(\.\w+)*\.\d+(\.\w+)+$/;static isValidPageListProperty(e){return t.PAGELIST_PATH_REGEX.test(e)}static generateDataPageHashWithParameters(e,n,o){let r=[],i="",s=o.getPageReference(),a=o.getContextName();Object.keys(e).forEach(u=>{let p=e[u],m=ge.isProperty(p)?ie(`.${ge.getPropertyName(p)}`,s,a):p;(m==null||m==="")&&(m=d.NULL_STRING),r.push(m)});let c=n,l=r.join(d.HASH_DELIMITER);return l&&(i=t.getHashedString(l),c=n+d.UNDERSCORE_STRING+i),c}static parsePegaDateTimeToTimestamp(e){if(!e)return null;let n=e.replace(" GMT","").match(/^(\d{4})(\d{2})(\d{2})T(\d{2})(\d{2})(\d{2})\.(\d{3})$/);if(!n){let p=new Date(e).getTime();return Number.isNaN(p)?null:p}let[,o,r,i,s,a,c,l]=n.map(Number);return new Date(o,r-1,i,s,a,c,l).getTime()}static formatToUTCDate(e,n){if(!e)return e;let o=new Date(e);if(Number.isNaN(o.getTime()))return e;let r=(m,f=2)=>String(m).padStart(f,"0"),i=o.getUTCFullYear(),s=r(o.getUTCMonth()+1),a=r(o.getUTCDate());if(n==="Date")return`${i}${s}${a}`;let c=r(o.getUTCHours()),l=r(o.getUTCMinutes()),u=r(o.getUTCSeconds()),p=r(o.getUTCMilliseconds(),3);return`${i}${s}${a}T${c}${l}${u}.${p} GMT`}static isLeafProperty(e){return!!e&&!e.includes(".")}static getMetadataType(e,n,o){let r=t.isLeafProperty(e)?ft(e,n):o.getFieldMetadata(e);return Array.isArray(r)?r[0]?.type:r?.type}static toStringParameterValue(e){return typeof e=="string"?e:e instanceof Date?e.toISOString():null}static resolveParameterValue(e,n,o,r,i){if(o&&Object.hasOwn(o,e))return o[e];if(!On.isProperty(n))return n;let a=i!==null?On.getPropertyName(n):On.getLeafPropertyName(n);return r.getValue(`.${a}`)}static formatParameterValue(e,n,o,r,i){if(!On.isProperty(n))return e;let a=r!==null?On.getPropertyName(n):On.getLeafPropertyName(n);if(!a)return e;let c=t.getMetadataType(a,i,o);if(!c)return e;let l=t.toStringParameterValue(e);return c==="Date"?l?l.includes("T")?t.formatToUTCDate(l,"Date"):t.formatToUTCDate(`${l}T00:00:00Z`,"Date"):e:c==="DateTime"&&l?t.formatToUTCDate(l,"DateTime"):e}static resolveAndFormatParameters(e,n,o,r,i){let s={};for(let a of Object.keys(e)){let c=e[a];if(typeof c!="string")s[a]=c;else{let l=t.resolveParameterValue(a,c,i,n,o);s[a]=t.formatParameterValue(l,c,n,o,r)}}return s}static normalizePropertyRef(e){let n=e.replace(/\[\d+\]/g,"");return n.startsWith(".")?n.substring(1):n}static resolvePageClass(e,n){if(!n)return;e=this.normalizePropertyRef(e);let o=e.split("."),r;o.length>1?r=o.slice(0,-1):r=o;let i=n;for(let s of r){let a=ft(s,i);if(!a||(Array.isArray(a)&&a[0]?.pageClass?i=a[0].pageClass:!Array.isArray(a)&&a.pageClass&&(i=a.pageClass),!i))return}return i}static isNestedObject(e){return sa(e)&&!Array.isArray(e)}static pruneKeys=(e,n,o=!1)=>{if(!Ln(e))return e;let r=n instanceof Set?n:new Set(n);return o?(t.isNestedObject(e)?Object.keys(e).forEach(i=>{let s=e[i];if(r.has(i)){let a=Object.getOwnPropertyDescriptor(e,i);a&&a.configurable?delete e[i]:Reflect.set(e,i,void 0)}else s&&(sa(s)||Array.isArray(s))&&t.pruneKeys(s,r,!0)}):Array.isArray(e)&&e.forEach(i=>{(sa(i)||Array.isArray(i))&&t.pruneKeys(i,r,!0)}),e):Array.isArray(e)?e.map(i=>sa(i)||Array.isArray(i)?t.pruneKeys(i,r,!1):i):t.isNestedObject(e)?Object.keys(e).reduce((i,s)=>{if(!r.has(s)){let a=e[s];i[s]=sa(a)||Array.isArray(a)?t.pruneKeys(a,r,!1):a}return i},{}):e};static normalizeStaticContentKey(e){let n=this.getWebFilePath(e);if(!n)return e.trim();let o=n.decodedFileName.lastIndexOf(".");if(o<1||o===n.decodedFileName.length-1)return e.trim();let r=n.decodedFileName.slice(0,o),i=n.decodedFileName.slice(o+1);return`${n.marker.toUpperCase()}!${r.toUpperCase()}!${i.toUpperCase()}`}static isWebFilePath(e){return this.getWebFilePath(e)!==void 0}static getWebFilePath(e){let n=e.trim();if(!Jfe.test(n))return;let o=n.indexOf("/"),r=n.slice(0,o),s=n.slice(o+1).split(/[?#]/)[0];try{let a=decodeURIComponent(s);return a.includes("/")||a.includes("\\")?void 0:{marker:r,decodedFileName:a}}catch{return}}},y=AM;var Zfe=d.SUMMARY_OF_LISTS,Qfe=d.SUMMARY_OF_WHEN_CONDITIONS,CM=class t{static updateData(e){Object.keys(e).forEach(n=>{v(Ne({context:n,data:e[n]}))})}static updateContextData(e){Object.keys(e).forEach(n=>{v(Ne({context:n,data:e[n]}))})}static resolveWhen(e,n){return!!n.getContextDataValue(`.${Qfe}.${e}`)}static resolveFieldValue(e,n){return n.getLocalizedValue(e)}static resolveNavigation(e,n){let o=this.resolveName(e,n);return uM(typeof o=="string"?o:"")}static resolveView(e,n,o=""){let r=ac(this.resolveName(e,n)),i=[];if(Array.isArray(r)&&r.length>0){if(n&&r.length>1){if(o||(o=n.getValue(d.CLASS_ID)||""),!o)return;i=r.filter(s=>s[d.CLASSID]===o)}return i.length===0?r[0]:i[0]}return r}static resolveName(e,n){return e&&typeof e=="string"&&e.startsWith("param.")?(e=e.substring(6),n.getContextDataValue(`.$parameters.${e}`)):(e&&typeof e=="string"&&e.startsWith("@")&&(e=ge.handleAnnotation(e,n)),e)}static getContextPath(e,n){return typeof n!="number"&&!n?e:(n=ge.trimAnnotation(n),typeof n=="number"||typeof n=="string"?typeof n=="number"&&Number.isInteger(n)?`${e}[${n}]`:typeof n=="string"&&n.startsWith(".")?e+n:n:e)}static getRuleClass(e,n,o){let r;if(n)r=n.startsWith(d.CLASS_ANNOTATION)?n.split(d.CLASS_ANNOTATION)[1].trim():this.resolveClassID(n,e.getPageReference(),e.getContextName(),e.getValue(d.CASE_INFO.CASE_INFO_CLASSID));else if(o?.authorContext){let i=e.getFieldMetadata(o.authorContext);if(i){let s=["refer","copy"].includes(i.dataRetrievalType),a=i.type==="Page List";r=s&&a?i.pageClass:i.classID}r||(r=o.ruleClass)}return r}static resolveReference(e,n){let{type:o}=e,r;if(o==="reference"){let{config:i}=e,s=i?.type,{ref:a,name:c,context:l}=i||{},u=this.getRuleClass(n,l,i);return n&&(n._ruleClass=u),s==="navigation"?r=this.resolveNavigation(a||c,n):s==="view"?r=this.resolveView(a||c,n,u||""):s==="widget"&&(r={type:"Widget",config:{name:c,ruleClass:u}}),r}return e}static resolvePropertyReference(e,n,o){return ie(n,e,o)}static getProperty(e,n,o){let r=this.resolvePropertyReference(n,e,o);if(r==null||r.length===0){let i=uc(`${n}.${Zfe}`,e,o);i&&(r=this.resolvePropertyReference(n,i,o))}return r}static getPropertyValue(e,n,o){return e=ge.trimAnnotation(e),this.getProperty(e,n,o)}static getReferencedUser(e,n){let o=t.getLitePropertyValue(n,"referencedUsers");if(Array.isArray(o)){let r=o.find(i=>i.UserID===e);if(r)return{userId:r.UserID,UserName:r.UserName}}return o?.[e]}static getLitePropertyValue(e,n){if(!e)return;let{useCustomContext:o,propertyName:r,hasSuggestions:i,pageReference:s,context:a}=e,c=n||r||"";return o?(c=c.startsWith(".")?c.substring(1):c,c.split(".").reduce((l,u)=>l?.[u]??void 0,o)):i&&c===r?t.getPropertyValue(c,s,a?`${a}/${d.SUGGESTION}`:void 0):t.getPropertyValue(c,s,a||void 0)}static _handlePropString(e,n,o,r,i){o.startsWith("@")?e[n]=ge.handleAnnotation(o,r,i):e[n]=o}static _resolveProps(e,n,o){e&&Object.keys(e).forEach(r=>{let i=e[r];typeof i=="string"?this._handlePropString(e,r,i,n,o):Array.isArray(i)?i.forEach(s=>{this._resolveProps(typeof s=="object"?s:e[s],n,o)}):typeof i=="object"&&this._resolveProps(e[r],n,o)})}static resolveProps(e,n,o){return!e||!n||(y.mergeDeep(e,n),this._resolveProps(n,o,void 0)),n}static resolveContextTreeNodeProps(e){let n={};return e?(y.mergeDeep(e,n),this._resolveProps(n,void 0,e),y.resolveStringBooleans(n)):n}static resolvePropertyPageClass(e,n){let o=y.resolvePageClass(e,n),r=e.substring(e.lastIndexOf(".")+1),i=ft(r,o),s;if(i)return Array.isArray(i)?s=i[0]?.pageClass:s=i.pageClass,s}static resolveClassID(e,n,o,r){let i=ge.trimAnnotation(e),s=i.startsWith(".")?`${n}${i}`:i;for(;s;){let a=ie(d.CLASS_ID,s,o);if(a)return a;if(r){let l=this.resolvePropertyPageClass(i,r);if(l)return l}let c=s.lastIndexOf(".");if(c===-1)break;s=s.substring(0,c)}return null}},Q=CM;var IM=class{actionHandlers;constructor(){this.actionHandlers={}}getHandler(e){return this.actionHandlers[e]}registerHandler(e,n){this.actionHandlers[e]=n}},Xfe=new IM,Pb=Xfe;function ege(t){return typeof t=="object"&&t!==null}var _M=class{static#e=[];static#t=!1;static getActionHandlers=(e,n,o)=>{let r=[];return{mouseenter:"hover",change:"onChange",blur:"onBlur"}[o]!==n||e.forEach(s=>{let a=Pb.getHandler(s.action),{config:c}=s;r.push({handler:a,config:c})}),r};static isEditable=e=>{let{tagName:n}=e;return n==="INPUT"||n==="TEXTAREA"||n==="SELECT"||n==="DATETIME"};static isNonKeyInput=e=>{let{tagName:n,type:o}=e;return n==="SELECT"||o==="checkbox"||o==="radio"};static#n=(e,n,o)=>{for(let r=0;r<e.length;r+=1){let i=e[r],s={actionHandler:i.handler,component:n,eventType:o,config:i.config};this.#e.push(s)}};static buildActionObject=(e,n)=>{let o={...e};return o.context=T.getRuntime()==="Browser"?n.getContextName():o.context,o.pageReference=n.getPageReference(),o.actionMgrID=M.getNextActionMgrId(),o};static#r=e=>{let n=e.actionHandler,o=e.component,{config:r}=e,i={};Q.resolveProps(r,i,o),n&&(n(e.eventType,i,o),this.#o())};static#o=()=>{if(!this.#t){if(this.#e.length===0)return;let e=this.#e.shift();if(!e)return;this.#r(e),e.config&&e.config.parallel==="true"&&this.#e.length>0&&this.#o()}};static#s=()=>{this.#o()};static#i=(e,n,o)=>{this.#n(e,n,o),this.#s()};static getFullRef=e=>{let n=e.getPageReference(),o=e.getComponentConfig().value;return Q.getContextPath(n,o)};static#a(e,n){let r=e.getComponentConfig().behaviours||[];for(let i=0;i<r.length;i+=1){let{behaviour:s,actions:a}=r[i];if(a){let c=this.getActionHandlers(a,s,n);c&&c.length>0&&this.#i(c,e,n)}}}static changeHandler=(e,n)=>{let o=e.getStateProps().value,r=e.getContextName();if(ht({type:A.MESSAGES.MESSAGES_TYPE_ERROR,property:o,pageReference:e.getPageReference(),context:r}),(T.getRuntime()==="Browser"?"nativeEvent"in n&&n.nativeEvent instanceof Event||n instanceof Event:"nativeEvent"in n&&!!n.nativeEvent||n instanceof Event)||!("value"in n)||n.value!==null&&(!("prop"in n)||n.prop===void 0)){let{target:s}=n;s===null&&n&&"auxiliaryTarget"in n&&n.auxiliaryTarget&&(s=n.auxiliaryTarget);let a;s===void 0?a="value"in n?n.value:void 0:"value"in s?a=s.value:a=s.innerText;let c=this.getFullRef(e);v({type:Pt,payload:{reference:c,value:a,context:r}}),(s===void 0||!this.isEditable(s)||this.isNonKeyInput(s))&&v({type:Fr,payload:{reference:c,pageReference:e.getPageReference(),value:a,context:r,propertyName:e.getComponentConfig().value,classID:e.getValue(d.CLASS_ID)}})}else if(ege(n)){let s=e.getPageReference(),a=e.getStateProps();for(let c of Object.keys(n)){let l=a[c],u=n[c];v({type:Pt,payload:{reference:Q.getContextPath(s,l),value:u,context:r}}),v({type:Fr,payload:{reference:Q.getContextPath(s,l),value:u,context:r}})}}};static blurHandler=(e,n)=>{let{target:o}=n;o===null&&n&&"auxiliaryTarget"in n&&(o=n.auxiliaryTarget);let{value:r,validationValue:i}=o,s=this.getFullRef(e),a=e.getContextName();o.clearMessages&&ht({type:A.MESSAGES.MESSAGES_TYPE_ERROR,property:e.getStateProps().value,pageReference:e.getPageReference(),context:a}),this.isEditable(o)&&(e.getValidationApi().validate("validationValue"in o?i:r),e.isInsideList()&&e.getListActions().updateProperty(e.getStateProps().value,r),this.isNonKeyInput(o)||v({type:Fr,payload:{reference:s,pageReference:e.getPageReference(),value:r,context:a,propertyName:e.getComponentConfig().value,classID:e.getValue(d.CLASS_ID)}}))};static eventHandler=(e,n)=>{let{type:o}=n;switch(o){case"change":this.changeHandler(e,n);break;case"blur":this.blurHandler(e,n);break;default:break}o&&this.#a(e,o)};static pause=()=>{this.#t=!0};static resume=()=>{this.#t=!1,this.#o()};static isQueueEmpty=()=>this.#e.length===0;static clearQueue=()=>{this.#e=[]};static getActionsQueue=()=>this.#e;static EVENTS_MAP={click:"onClick",change:"onChange",hover:"onMouseEnter",blur:"onBlur"}},Ve=_M;var bM="CREATE_WORK",f5=t=>({type:bM,payload:t});var TM=(t,e)=>{let n=e.UserID;if(n==null)return;let o=String(n);if(t.has(o)){let r=t.get(o);t.set(o,{...r,...e})}else t.set(o,e)},tge=t=>{if(t.length<2)return;let e=new Map;for(let n of t)TM(e,n);t.length=0;for(let n of e.values())t.push(n)};function nge(t,e,n){let o;if(!Array.isArray(t)&&typeof t=="object"){o=y.getIn(n,d.REFERENCED_USERS,{}),y.setIn(e,d.REFERENCED_USERS,{...o,...t});return}if(o=y.getIn(n,d.REFERENCED_USERS,[]),o.length===0){tge(t);return}let r=new Map;for(let i of o)TM(r,i);for(let i of t)TM(r,i);t.length=0;for(let i of r.values())t.push(i)}function rge(t,e,n,o,r,i,s){let a=o.substring(0,o.indexOf("[")),c=o.substring(o.indexOf("[")+1,o.indexOf("]")),l=e[a],u=`${y.trimDotForProperty(r)}.${a}`;s.includes(u)&&Object.hasOwn(l,O.getDefaultQualifiedName("pyCount"))&&(l=l.pxResults),Array.isArray(l)&&(l?.splice(+c,1,t[o]),i.push(a),n.add(`${r}.${o}`))}function oge(t,e,n){let o=new Set(n);Object.keys(t).forEach(r=>{(Array.isArray(t[r])&&!o.has(r)||!Array.isArray(t[r])&&!Object.hasOwn(e,r))&&delete t[r]})}var g5=(t,e,n,o,r="")=>{let i=[];Object.keys(t).forEach(s=>{typeof t[s]=="object"&&s.includes("[")?rge(t,e,n,s,r,i,o):t[s]&&typeof t[s]=="object"?(e[s]||(e[s]=Array.isArray(t[s])?[]:{}),g5(t[s],e[s],n,o,`${r}.${s}`)):e[s]=t[s]}),oge(e,t,i)},ige=(t,e,n)=>{let o=new Set;t.forEach(r=>{r=y.trimDotForProperty(r);let[i,s,a]=ms.getPageListNameAndIndexFromPageName(r);if(i&&s&&a&&!o.has(`${i}.${s}`)){let c=y.getIn(n,`${i}.${s}`)||[];Array.isArray(c)&&c.forEach((l,u)=>{u!==+a&&y.setIn(e,`${i}.${s}[${u}]`,l)}),o.add(`${i}.${s}`)}})},sge=(t,e,n)=>{if(!n||n.length===0)return e;let o=Qy(t),r={},i=!1;return n.forEach(s=>{Object.hasOwn(o,s)&&y.hasIn(e,Io(s).slice(0,-1))&&(y.setIn(r,s,o[s]),i=!0)}),i?jt(e,r,{isArrayDeepMerge:!0}):e},Ne=(t,e={})=>{let{serverPrecedenceFields:n=[],propertiesToReplace:o=[],propertiesToReArrange:r=[],preserveFields:i}=e,{context:s,data:a,isArrayDeepMerge:c,preserveClientChanges:l=!1}=t,u=sl(s,!0),p=J(s),m={};if(l&&p&&a){m=y.deepClone(p);let h=y.deepClone(a);r.length>0&&y.rearrangeProperties(r,m);let E=new Set;g5(u,m,E,r),ige(E,m,h)}let f=a?y.getIn(a,d.REFERENCED_USERS):void 0;f!==void 0&&nge(f,a,p);let g=a;if(l){let h=y.getIn(t?.data,d.OBJECT_INFO.OBJECT_INFO_CONTENT_CLASS_ID),E=G.isExternalObject(h),C=E?{[d.OBJECT_INFO.OBJECT_INFO]:{[d.CONTENT]:{...m[d.OBJECT_INFO.OBJECT_INFO]?.[d.CONTENT]}}}:{[d.CASE_INFO.CASE_INFO]:{[d.CONTENT]:{...m[d.CASE_INFO.CASE_INFO]?.[d.CONTENT]}}},I=E?d.OBJECT_INFO.OBJECT_INFO_CONTENT:d.CASE_INFO.CASE_INFO_CONTENT;n.forEach(_=>{let P=`${I}.${_}`;y.deleteIn(C,P)}),g=jt(a,C,{isArrayDeepMerge:c??!0})}else wH(s,a,i),g=sge(s,a,i);return{type:Pn,payload:{...t,data:g,...o.length>0?{propertiesToReplace:o}:null,...r.length>0?{propertiesToReArrange:r}:null}}},age=t=>({type:C2,payload:t}),Df=t=>({type:Ou,payload:t}),cge=t=>({type:Un,payload:t}),lge=t=>({type:I2,payload:t}),uge=t=>({type:Po,payload:t}),ww=t=>({type:wu,payload:t}),cl=t=>({type:fi,payload:t}),kt=t=>({type:bt,payload:t}),Mw=t=>({type:da,payload:t}),Hy=t=>({type:pa,payload:t}),j0=t=>({type:No,payload:t}),F0=t=>({type:ma,payload:t}),V0=t=>({type:ss,payload:t}),dn=t=>{let{containerItemID:e}=t;t.suggestionContexts=eS(e);let n=t?.data?.caseInfo?.content,o=Object.keys(n||{}).length>0;return t.propertiesToReplace||(t.propertiesToReplace=o?G.getPropertiesToReplace(e):[]),{type:Ht,payload:t}},oS=t=>{let{context:e}=t;return{type:ca,payload:{context:e}}},Bs=t=>{let{context:e}=t;return{type:Wo,payload:{context:e}}},dge=t=>({type:fa,payload:t}),pn=t=>({type:mn,payload:t}),zf=t=>({type:ya,payload:t}),nt=t=>{let{context:e,containerItemID:n}=t,o=e;return o||(o=de(n)),t.context=o,t.deleteContext=!w0(n),t.childContainers=Ke(n),t.childContainersContexts=ti(n),t.transientItems=Vi([...t.childContainersContexts,n]),t.suggestionContexts=eS(n),n===e&&(t.caseID=ie(d.CASE_INFO.CASE_INFO_ID,"",e)||ie(d.OBJECT_INFO.OBJECT_INFO_ID,"",e),t.RemoteSystemID=ie(d.CASE_INFO.REMOTESYSTEMID,"",e)),{type:tt,payload:t}},vM=t=>{let{containerItemID:e}=t;return t.transientItems=Vi([...ti(e),e]),{type:hi,payload:t}},Gy=t=>{let{transientItemID:e}=t;return t.transientItems=[e],{type:gi,payload:t}},Yr=t=>{let{context:e,containerItemID:n}=t,o=e;if(o||(o=de(n)),t.context=o,t.childContainers=Ke(n),t.childContainersContexts=ti(n),t.transientItems=Vi([...t.childContainersContexts,n]),t.suggestionContexts=eS(n),n===e){t.caseID=ie(d.CASE_INFO.CASE_INFO_ID,"",e),t.RemoteSystemID=ie(d.CASE_INFO.REMOTESYSTEMID,"",e);let r=ie(d.CASE_INFO.CASE_INFO_CLASSNAME,"",e);ce.isTraditionalRemoteCase(r)&&(t.skipReleaseLockRequest=!0)}return{type:st,payload:t}},pge=t=>({type:Ko,payload:t}),mge=t=>({type:Jo,payload:t}),RM=t=>({type:AE,payload:t}),B=(t,...e)=>(Ve.resume(),t(...e)),bs=(t,e,n,o,r)=>({type:ve,payload:{msg:t,err:e,context:n,formFields:o,actionMgrID:r}}),PM=t=>({type:yi,payload:t}),NM=t=>({type:Uu,payload:t}),po=t=>({type:Oo,payload:t}),fge=t=>({type:F2,payload:t}),jR=t=>({type:Du,payload:t}),wa=t=>({type:Pt,payload:t});var gge="VIEW",hge="PAGE",wM="add",y5="replace",xM=["portal","noPortal","preview","debug","devtool","activeTab","contextParam","lang"],Nb="",Wp="Home",S5="",DM=!0,Ob=t=>(DM=t,DM),E5=()=>DM,Nt=(t,e,n)=>Se.getSemanticURL(t,e,n),Dn=(t,e)=>Se.getBusinessIDURLPath(t,e),A5=(t,e)=>Se.getBusinessIDRoutePath(t,e),el=(t,e)=>Se.getRestEndPoint(t,e),F=(t,e)=>{let n=At.getServerURL(),o=el(t,e);return o?(o.restApi?.startsWith("/")||(o.restApi=`/${o.restApi}`),n?.endsWith("/")&&(n=n.substring(0,n.length-1)),o.restApi=n+o.restApi,o):{}},yge=t=>{if(t&&t.root){let{root:e}=t,{resources:n}=t,{views:o}=n,i=e.config,s=i.type,a=i.name;if(s.toUpperCase()===gge){let c=o[a],l=c;Array.isArray(c)&&c.length>0&&([l]=c);let u=l.config;if(u.type){let p=u.type;return!!(u.urlPath&&p.toUpperCase()===hge)}}return!1}return!1},h5=(t,e,n)=>{let{root:o,resources:r}=t,{views:i}=r,{config:s}=o,a=wM,c="";if(n)c=n;else{let u=i[s.name],p=u;Array.isArray(u)&&u.length>0&&([p]=u),c=p.config.urlPath}let l=c.match(Qc);if(l){let u=y.getIn(e,s.context);c=c.replace(l[0],u.pyID)}return c.startsWith("/")&&(c=c.substring(1,c.length)),{pxURLPath:c,historyAction:a}},Sge=(t,e,n)=>{for(let[r,i]of e.entries())!t.has(r)&&xM.includes(r)&&t.append(r,i);n&&!t.has("lang")&&t.append("lang",n);let o=Se.getRoutingInfo()?.embedQueryParams;if(o)for(let[r,i]of Object.entries(o))t.has(r)||t.append(r,String(i));return Se.isDefaultPortal()&&t.delete("portal"),t},$M=(t,e)=>{let n=`${t}/${e}`;if(!(T.getRenderingMode()==="EMBED"))return n;let r=Se.getRoutingInfo()?.authServiceAlias;if(!r)return n;let i=encodeURIComponent(r),s;try{s=new URL(n)}catch{return n}let a=s.pathname.split("/").filter(Boolean),c=a.findIndex(p=>p.toLowerCase()==="app");if(c<0)return n;a[c-1]?.toLowerCase()!=="prauth"&&a.splice(c,0,"PRAuth");let u=a.findIndex(p=>p.toLowerCase()==="app")+2;return(u===a.length||a[u]!==i)&&a.splice(u,0,i),s.pathname=`/${a.join("/")}`,s.toString().replace(/\/$/,"")},Ege=(t,e,n,o,r)=>{let i=Se.getStaticRoutePage(),s=Wp?.toLowerCase();return(i?.toLowerCase()===s||o.toLowerCase()===s)&&!r.has("noPortal")?$M(e,n):t},C5=(t,e,n,o)=>{let r,i;Mo(e)?r=$M(t,e):r=t;let s=Mo(n?.pxURLPath||"");s&&(r=`${r}/${s}`);try{i=new URL(r).searchParams,r=r.includes("?")?r.split("?")[0]:r}catch(l){return console.log("Invalid url",l),""}let a=new URLSearchParams(KH());if(Is()?(r=Ege(r,t,e,s,a),Se.setStaticRoutePage("")):s.toLowerCase()===Wp.toLowerCase()&&!a.has("noPortal")&&(r=$M(t,e)),!Se.isDefaultPortal()){let l=Se.getPortalName();a.has("portal")?a.set("portal",l):a.append("portal",l)}i=Sge(i,a,o);let c=Xc(i.toString());return c&&(r+=`?${c}`),r},Age=(t,e,n)=>{if(t=t&&t!==""?t:Se.getApplicationName(),t=Xj(t),n===`${Nb}/${e}/`)return{title:t};let r=new URL(n).pathname.replace(`${e}/`,""),i=r.split("/");return Qj(r)?{title:`${t} - ${i[i.length-1]}`}:{title:`${t} - ${i[0]}`}},I5=(t,{urlPathObjParam:e,infoParam:n,optionsParam:o,queryParam:r},i=!1,s)=>{let a,c,l;if(window.PCore.getBehaviorOverride("dynamicSemanticUrl")===!1)return;if(i)a=e,c=n,l=o;else{let{uiResources:f,data:g}=t;({options:l}=t),e&&e.pxURLPath&&ri(e.pxURLPath)?a=h5(f,g,e.pxURLPath):a=e||h5(f,g),c=Se.getEndPointInfo(a.pxURLPath),a.pxURLPath=c.urlPath}let u=C5(Nb,Se.getApplicationPath(),a,s),{title:p}=Age(S5,Se.getApplicationPath(),u),m=VH(c,{...l,title:p});a?.historyAction===wM?BH(m,p,u):a?.historyAction===y5&&(r&&(u+=`?${r}`),HH(m,p,u))},_5=(t,e)=>{let n=null;t.directUrlUpdation&&(n={historyAction:wM,pxURLPath:""},n.pxURLPath=t.semanticURL),I5(t,{urlPathObjParam:n,infoParam:null,optionsParam:null},!1,e)},H0=(t,e)=>{_5(t,e)},YH=(t,e)=>{let n={pxURLPath:t};return C5(Nb,Se.getApplicationPath(),n,e)},ys=t=>{let{uiResources:e}=t;E5()&&(t.directUrlUpdation||yge(e))&&_5(t)},b5=t=>{let e={routeEndpoint:t.routeEndpoint,requestType:t.requestType,payload:t.payload,routeKey:t.routeKey,options:null};return t.options&&(e.options=t.options),e},Cge=t=>t?ce.isRemoteCase(t)&&(ce.isTraditionalRemoteCase(t)||ce.isRemoteCaseVersionDifferent(t)):!1,T5=(t,e,n)=>{let{caseClassName:o,workID:r}=t.payload,{containerName:i,context:s}=e,{RemoteClassGroup:a,RemoteSystemID:c,name:l}=ce.getRemoteCase(o),u={...t,headers:{RemoteSystemID:c},className:o,isTraditionalRemoteCase:ce.isTraditionalRemoteCase(o),isRemoteCase:ce.isRemoteCase(o),action:ME,viewName:LE,gadgetId:G.getUniqueGadgetId(),context:n??s,skipSemanticUrl:!0,insKey:`${a?.toUpperCase()} ${r}`,containerName:i,name:l};v(pt["showPage"](u))},OM=!1,Ige=async t=>{if(OM){OM=!1;return}let e="showHistory",n=GH(t);if(n){let o=Co(),r=se(`${o}/primary`);if(r&&tS(r)){let i=zn().getLocaleValue(md,"Messages");if(!await vi.confirm(i)){OM=!0,window.history.go(1);return}}ce.isRemoteCase(n.payload?.caseClassName)?T5({...n},n.options):v(pt[e](b5(n)))}},iS=()=>{let t=Se.getApplicationPath(),e=Gp();return t!==e},v5=(t,e)=>{let n={restApi:""};try{if(iS()&&!e){let o=Gp(),r=Se.processUrl(o,!0),i=Se._getMatchedRouteInRoutingTable(r)||"",s=Se.getRoutingInfo(),a=Se.processUrl(o,!1).split("/"),c=a[a.length-1],l=s?.routes?.[i]?.payload?.caseID?.replace("{workID}",c).replace("{id}",c);n=Se.getRestEndPoint("loadView",{caseID:l,viewID:t})||{}}else n=Se.getRestEndPoint("showView",{page:t,pageClass:e})||{}}catch{}return n},R5=()=>{if(iS()){let t=Se.processUrl(Gp(),!0);return!!Se._getMatchedRouteInRoutingTable(t)}return!1},_ge=(t,e)=>{let n=Se.getRoutingInfo();if(Is()&&Object.values(n?.routes??{}).find(c=>c?.payload?.pageClass===e&&c?.payload?.page===t))return t;let o=t.split(" ").join(""),r=t.split(" ").join("-").toLowerCase(),i=nF(t);return n?.routes?.[o]?o:n?.routes?.[r]?r:n?.routes?.[i]?i:t},bge=t=>{Wp=t};var Tge=()=>{let t=T.getIsExtraCallRequiredForDefaultHome();return t===!0||t==="true"},vge=(t,e,n)=>{let o={routeEndpoint:t.routeEndpoint,requestType:t.requestType,payload:t.payload,options:e,routeKey:t.routeKey};Cge(t.payload?.caseClassName)?T5(o,n,e.context):v(RM(b5(o)))},P5=t=>{let{acName:e,context:n,defaultViewLabel:o,ruleName:r,className:i,skipUrlRestore:s}=t,a=_ge(r||o,i);bge(a),Se.setDefaultRoute(a),Se.setDefaultClassName(i);let c=En(e,n),l=X(e,n),u=Tge(),p={historyAction:y5,pxURLPath:""},m,f=null,g={acName:l,context:c,actionConfig:{context:c}},h=s;if(h||u||iS()){let E=h?Wp:RA(gb());T.shouldUseURLParams()&&(f=E.includes("?")?E.split("?")[1]:null),m=rF(E,g),p.pxURLPath=m.urlPath,typeof m.payload?.pageClass<"u"&&(m.payload.pageClass=we()?.getState()?.data?.app?.pyPortal?.classID),vge(m,g,t)}else m=Se.getEndPointInfo(Wp),p.pxURLPath="";I5(null,{urlPathObjParam:p,infoParam:m,optionsParam:g,queryParam:f},!0)},sS=(t,e=!1)=>{Nb=t.domain,e===!1&&E5()&&(qH(Ige),WH()),Se.init(t,Wp)},N5=t=>{Se.addRoutes(t)},O5=t=>{t&&(S5=t.pyLabel)},G0=t=>{FH(t)},hb=t=>{for(let e of t)xM.includes(e)||xM.push(e)};function sr(t){return`Minified Redux error #${t}; visit https://redux.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var Pge=typeof Symbol=="function"&&Symbol.observable||"@@observable",x5=Pge,MM=()=>Math.random().toString(36).substring(7).split("").join("."),Nge={INIT:`@@redux/INIT${MM()}`,REPLACE:`@@redux/REPLACE${MM()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${MM()}`},xb=Nge;function Db(t){if(typeof t!="object"||t===null)return!1;let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e||Object.getPrototypeOf(t)===null}function kM(t,e,n){if(typeof t!="function")throw new Error(sr(2));if(typeof e=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(sr(0));if(typeof e=="function"&&typeof n>"u"&&(n=e,e=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(sr(1));return n(kM)(t,e)}let o=t,r=e,i=new Map,s=i,a=0,c=!1;function l(){s===i&&(s=new Map,i.forEach((E,C)=>{s.set(C,E)}))}function u(){if(c)throw new Error(sr(3));return r}function p(E){if(typeof E!="function")throw new Error(sr(4));if(c)throw new Error(sr(5));let C=!0;l();let I=a++;return s.set(I,E),function(){if(C){if(c)throw new Error(sr(6));C=!1,l(),s.delete(I),i=null}}}function m(E){if(!Db(E))throw new Error(sr(7));if(typeof E.type>"u")throw new Error(sr(8));if(typeof E.type!="string")throw new Error(sr(17));if(c)throw new Error(sr(9));try{c=!0,r=o(r,E)}finally{c=!1}return(i=s).forEach(I=>{I()}),E}function f(E){if(typeof E!="function")throw new Error(sr(10));o=E,m({type:xb.REPLACE})}function g(){let E=p;return{subscribe(C){if(typeof C!="object"||C===null)throw new Error(sr(11));function I(){let P=C;P.next&&P.next(u())}return I(),{unsubscribe:E(I)}},[x5](){return this}}}return m({type:xb.INIT}),{dispatch:m,subscribe:p,getState:u,replaceReducer:f,[x5]:g}}function Oge(t){Object.keys(t).forEach(e=>{let n=t[e];if(typeof n(void 0,{type:xb.INIT})>"u")throw new Error(sr(12));if(typeof n(void 0,{type:xb.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(sr(13))})}function D5(t){let e=Object.keys(t),n={};for(let s=0;s<e.length;s++){let a=e[s];typeof t[a]=="function"&&(n[a]=t[a])}let o=Object.keys(n),r,i;try{Oge(n)}catch(s){i=s}return function(a={},c){if(i)throw i;let l=!1,u={};for(let p=0;p<o.length;p++){let m=o[p],f=n[m],g=a[m],h=f(g,c);if(typeof h>"u"){let E=c&&c.type;throw new Error(sr(14))}u[m]=h,l=l||h!==g}return l=l||o.length!==Object.keys(a).length,l?u:a}}function aS(...t){return t.length===0?e=>e:t.length===1?t[0]:t.reduce((e,n)=>(...o)=>e(n(...o)))}function $5(...t){return e=>(n,o)=>{let r=e(n,o),i=()=>{throw new Error(sr(15))},s={getState:r.getState,dispatch:(c,...l)=>i(c,...l)},a=t.map(c=>c(s));return i=aS(...a)(r.dispatch),{...r,dispatch:i}}}function w5(t){return Db(t)&&"type"in t&&typeof t.type=="string"}var B5=Symbol.for("immer-nothing"),M5=Symbol.for("immer-draftable"),Cr=Symbol.for("immer-state");function ui(t,...e){throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var _o=Object,Jp=_o.getPrototypeOf,kb="constructor",Vb="prototype",jM="configurable",Lb="enumerable",wb="writable",cS="value",Ki=t=>!!t&&!!t[Cr];function bo(t){return t?H5(t)||Hb(t)||!!t[M5]||!!t[kb]?.[M5]||Gb(t)||qb(t):!1}var xge=_o[Vb][kb].toString(),k5=new WeakMap;function H5(t){if(!t||!KM(t))return!1;let e=Jp(t);if(e===null||e===_o[Vb])return!0;let n=_o.hasOwnProperty.call(e,kb)&&e[kb];if(n===Object)return!0;if(!Kp(n))return!1;let o=k5.get(n);return o===void 0&&(o=Function.toString.call(n),k5.set(n,o)),o===xge}function Bb(t,e,n=!0){dS(t)===0?(n?Reflect.ownKeys(t):_o.keys(t)).forEach(r=>{e(r,t[r],t)}):t.forEach((o,r)=>e(r,o,t))}function dS(t){let e=t[Cr];return e?e.type_:Hb(t)?1:Gb(t)?2:qb(t)?3:0}var LM=(t,e,n=dS(t))=>n===2?t.has(e):_o[Vb].hasOwnProperty.call(t,e),FM=(t,e,n=dS(t))=>n===2?t.get(e):t[e],Ub=(t,e,n,o=dS(t))=>{o===2?t.set(e,n):o===3?t.add(n):t[e]=n};function Dge(t,e){return t===e?t!==0||1/t===1/e:t!==t&&e!==e}var Hb=Array.isArray,Gb=t=>t instanceof Map,qb=t=>t instanceof Set,KM=t=>typeof t=="object",Kp=t=>typeof t=="function",UM=t=>typeof t=="boolean";function $ge(t){let e=+t;return Number.isInteger(e)&&String(e)===t}var Hs=t=>t.copy_||t.base_;var JM=t=>t.modified_?t.copy_:t.base_;function VM(t,e){if(Gb(t))return new Map(t);if(qb(t))return new Set(t);if(Hb(t))return Array[Vb].slice.call(t);let n=H5(t);if(e===!0||e==="class_only"&&!n){let o=_o.getOwnPropertyDescriptors(t);delete o[Cr];let r=Reflect.ownKeys(o);for(let i=0;i<r.length;i++){let s=r[i],a=o[s];a[wb]===!1&&(a[wb]=!0,a[jM]=!0),(a.get||a.set)&&(o[s]={[jM]:!0,[wb]:!0,[Lb]:a[Lb],[cS]:t[s]})}return _o.create(Jp(t),o)}else{let o=Jp(t);if(o!==null&&n)return{...t};let r=_o.create(o);return _o.assign(r,t)}}function YM(t,e=!1){return Wb(t)||Ki(t)||!bo(t)||(dS(t)>1&&_o.defineProperties(t,{set:$b,add:$b,clear:$b,delete:$b}),_o.freeze(t),e&&Bb(t,(n,o)=>{YM(o,!0)},!1)),t}function wge(){ui(2)}var $b={[cS]:wge};function Wb(t){return t===null||!KM(t)?!0:_o.isFrozen(t)}var zb="MapSet",BM="Patches",L5="ArrayMethods",G5={};function Kl(t){let e=G5[t];return e||ui(0,t),e}var U5=t=>!!G5[t];var lS,q5=()=>lS,Mge=(t,e)=>({drafts_:[],parent_:t,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:U5(zb)?Kl(zb):void 0,arrayMethodsPlugin_:U5(L5)?Kl(L5):void 0});function z5(t,e){e&&(t.patchPlugin_=Kl(BM),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function HM(t){GM(t),t.drafts_.forEach(kge),t.drafts_=null}function GM(t){t===lS&&(lS=t.parent_)}var j5=t=>lS=Mge(lS,t);function kge(t){let e=t[Cr];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function F5(t,e){e.unfinalizedDrafts_=e.drafts_.length;let n=e.drafts_[0];if(t!==void 0&&t!==n){n[Cr].modified_&&(HM(e),ui(4)),bo(t)&&(t=V5(e,t));let{patchPlugin_:r}=e;r&&r.generateReplacementPatches_(n[Cr].base_,t,e)}else t=V5(e,n);return Lge(e,t,!0),HM(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==B5?t:void 0}function V5(t,e){if(Wb(e))return e;let n=e[Cr];if(!n)return jb(e,t.handledSet_,t);if(!Kb(n,t))return e;if(!n.modified_)return n.base_;if(!n.finalized_){let{callbacks_:o}=n;if(o)for(;o.length>0;)o.pop()(t);J5(n,t)}return n.copy_}function Lge(t,e,n=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&YM(e,n)}function W5(t){t.finalized_=!0,t.scope_.unfinalizedDrafts_--}var Kb=(t,e)=>t.scope_===e,Uge=[];function K5(t,e,n,o){let r=Hs(t),i=t.type_;if(o!==void 0&&FM(r,o,i)===e){Ub(r,o,n,i);return}if(!t.draftLocations_){let a=t.draftLocations_=new Map;Bb(r,(c,l)=>{if(Ki(l)){let u=a.get(l)||[];u.push(c),a.set(l,u)}})}let s=t.draftLocations_.get(e)??Uge;for(let a of s)Ub(r,a,n,i)}function zge(t,e,n){t.callbacks_.push(function(r){let i=e;if(!i||!Kb(i,r))return;r.mapSetPlugin_?.fixSetContents(i);let s=JM(i);K5(t,i.draft_??i,s,n),J5(i,r)})}function J5(t,e){if(t.modified_&&!t.finalized_&&(t.type_===3||t.type_===1&&t.allIndicesReassigned_||(t.assigned_?.size??0)>0)){let{patchPlugin_:o}=e;if(o){let r=o.getPath(t);r&&o.generatePatches_(t,r,e)}W5(t)}}function jge(t,e,n){let{scope_:o}=t;if(Ki(n)){let r=n[Cr];Kb(r,o)&&r.callbacks_.push(function(){Mb(t);let s=JM(r);K5(t,n,s,e)})}else bo(n)&&t.callbacks_.push(function(){let i=Hs(t);t.type_===3?i.has(n)&&jb(n,o.handledSet_,o):FM(i,e,t.type_)===n&&o.drafts_.length>1&&(t.assigned_.get(e)??!1)===!0&&t.copy_&&jb(FM(t.copy_,e,t.type_),o.handledSet_,o)})}function jb(t,e,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||Ki(t)||e.has(t)||!bo(t)||Wb(t)||(e.add(t),Bb(t,(o,r)=>{if(Ki(r)){let i=r[Cr];if(Kb(i,n)){let s=JM(i);Ub(t,o,s,t.type_),W5(i)}}else bo(r)&&jb(r,e,n)})),t}function Fge(t,e){let n=Hb(t),o={type_:n?1:0,scope_:e?e.scope_:q5(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:e,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},r=o,i=Fb;n&&(r=[o],i=uS);let{revoke:s,proxy:a}=Proxy.revocable(r,i);return o.draft_=a,o.revoke_=s,[a,o]}var Fb={get(t,e){if(e===Cr)return t;let n=t.scope_.arrayMethodsPlugin_,o=t.type_===1&&typeof e=="string";if(o&&n?.isArrayOperationMethod(e))return n.createMethodInterceptor(t,e);let r=Hs(t);if(!LM(r,e,t.type_))return Bge(t,r,e);let i=r[e];if(t.finalized_||!bo(i)||o&&t.operationMethod&&n?.isMutatingArrayMethod(t.operationMethod)&&$ge(e))return i;if(i===zM(t.base_,e)||Vge(t,e,i)){Mb(t);let s=t.type_===1?+e:e,a=WM(t.scope_,i,t,s);return t.copy_[s]=a}return i},has(t,e){return e in Hs(t)},ownKeys(t){return Reflect.ownKeys(Hs(t))},set(t,e,n){let o=Y5(Hs(t),e);if(o?.set)return o.set.call(t.draft_,n),!0;if(!t.modified_){let r=zM(Hs(t),e),i=r?.[Cr];if(i&&i.base_===n)return t.copy_[e]=n,t.assigned_.set(e,!1),!0;if(Dge(n,r)&&(n!==void 0||LM(t.base_,e,t.type_)))return!0;Mb(t),qM(t)}return t.copy_[e]===n&&(n!==void 0||LM(t.copy_,e,t.type_))||Number.isNaN(n)&&Number.isNaN(t.copy_[e])||(t.copy_[e]=n,t.assigned_.set(e,!0),jge(t,e,n)),!0},deleteProperty(t,e){return Mb(t),zM(t.base_,e)!==void 0||e in t.base_?(t.assigned_.set(e,!1),qM(t)):t.assigned_.delete(e),t.copy_&&delete t.copy_[e],!0},getOwnPropertyDescriptor(t,e){let n=Hs(t),o=Reflect.getOwnPropertyDescriptor(n,e);return o&&{[wb]:!0,[jM]:t.type_!==1||e!=="length",[Lb]:o[Lb],[cS]:n[e]}},defineProperty(){ui(11)},getPrototypeOf(t){return Jp(t.base_)},setPrototypeOf(){ui(12)}},uS={};for(let t in Fb){let e=Fb[t];uS[t]=function(){let n=arguments;return n[0]=n[0][0],e.apply(this,n)}}uS.deleteProperty=function(t,e){return uS.set.call(this,t,e,void 0)};uS.set=function(t,e,n){return Fb.set.call(this,t[0],e,n,t[0])};function zM(t,e){let n=t[Cr];return(n?Hs(n):t)[e]}function Vge(t,e,n){return t.type_!==1||!t.allIndicesReassigned_||t.assigned_?.get(e)||!bo(n)||n[Cr]?!1:t.baseRefs_.has(n)}function Bge(t,e,n){let o=Y5(e,n);return o?cS in o?o[cS]:o.get?.call(t.draft_):void 0}function Y5(t,e){if(!(e in t))return;let n=Jp(t);for(;n;){let o=Object.getOwnPropertyDescriptor(n,e);if(o)return o;n=Jp(n)}}function qM(t){t.modified_||(t.modified_=!0,t.parent_&&qM(t.parent_))}function Mb(t){t.copy_||(t.assigned_=new Map,t.copy_=VM(t.base_,t.scope_.immer_.useStrictShallowCopy_))}var Hge=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,n,o)=>{if(Kp(e)&&!Kp(n)){let i=n;n=e;let s=this;return function(c=i,...l){return s.produce(c,u=>n.call(this,u,...l))}}Kp(n)||ui(6),o!==void 0&&!Kp(o)&&ui(7);let r;if(bo(e)){let i=j5(this),s=WM(i,e,void 0),a=!0;try{r=n(s),a=!1}finally{a?HM(i):GM(i)}return z5(i,o),F5(r,i)}else if(!e||!KM(e)){if(r=n(e),r===void 0&&(r=e),r===B5&&(r=void 0),this.autoFreeze_&&YM(r,!0),o){let i=[],s=[];Kl(BM).generateReplacementPatches_(e,r,{patches_:i,inversePatches_:s}),o(i,s)}return r}else ui(1,e)},this.produceWithPatches=(e,n)=>{if(Kp(e))return(s,...a)=>this.produceWithPatches(s,c=>e(c,...a));let o,r;return[this.produce(e,n,(s,a)=>{o=s,r=a}),o,r]},UM(t?.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),UM(t?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),UM(t?.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){bo(t)||ui(8),Ki(t)&&(t=Z5(t));let e=j5(this),n=WM(e,t,void 0);return n[Cr].isManual_=!0,GM(e),n}finishDraft(t,e){let n=t&&t[Cr];(!n||!n.isManual_)&&ui(9);let{scope_:o}=n;return z5(o,e),F5(void 0,o)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,e){let n;for(n=e.length-1;n>=0;n--){let r=e[n];if(r.path.length===0&&r.op==="replace"){t=r.value;break}}n>-1&&(e=e.slice(n+1));let o=Kl(BM).applyPatches_;return Ki(t)?o(t,e):this.produce(t,r=>o(r,e))}};function WM(t,e,n,o){let[r,i]=Gb(e)?Kl(zb).proxyMap_(e,n):qb(e)?Kl(zb).proxySet_(e,n):Fge(e,n);return(n?.scope_??q5()).drafts_.push(r),i.callbacks_=n?.callbacks_??[],i.key_=o,n&&o!==void 0?zge(n,i,o):i.callbacks_.push(function(c){c.mapSetPlugin_?.fixSetContents(i);let{patchPlugin_:l}=c;i.modified_&&l&&l.generatePatches_(i,[],c)}),r}function Z5(t){return Ki(t)||ui(10,t),Q5(t)}function Q5(t){if(!bo(t)||Wb(t))return t;let e=t[Cr],n,o=!0;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,n=VM(t,e.scope_.immer_.useStrictShallowCopy_),o=e.scope_.immer_.shouldUseStrictIteration()}else n=VM(t,!0);return Bb(n,(r,i)=>{Ub(n,r,Q5(i))},o),e&&(e.finalized_=!1),n}var Gge=new Hge,ZM=Gge.produce;function X5(t){return({dispatch:n,getState:o})=>r=>i=>typeof i=="function"?i(n,o,t):r(i)}var eG=X5(),tG=X5;var qge=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?aS:aS.apply(null,arguments)},Snt=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}},Wge=t=>t&&typeof t.match=="function";function mc(t,e){function n(...o){if(e){let r=e(...o);if(!r)throw new Error(Jb(0));return{type:t,payload:r.payload,..."meta"in r&&{meta:r.meta},..."error"in r&&{error:r.error}}}return{type:t,payload:o[0]}}return n.toString=()=>`${t}`,n.type=t,n.match=o=>w5(o)&&o.type===t,n}var sG=class pS extends Array{constructor(...e){super(...e),Object.setPrototypeOf(this,pS.prototype)}static get[Symbol.species](){return pS}concat(...e){return super.concat.apply(this,e)}prepend(...e){return e.length===1&&Array.isArray(e[0])?new pS(...e[0].concat(this)):new pS(...e.concat(this))}};function nG(t){return bo(t)?ZM(t,()=>{}):t}function Kge(t){return typeof t=="boolean"}var Jge=()=>function(e){let{thunk:n=!0,immutableCheck:o=!0,serializableCheck:r=!0,actionCreatorCheck:i=!0}=e??{},s=new sG;return n&&(Kge(n)?s.push(eG):s.push(tG(n.extraArgument))),s},Yge="RTK_autoBatch";var rG=t=>e=>{setTimeout(e,t)},Zge=(t,e)=>n=>{let o=!1,r=()=>{o||(o=!0,cancelAnimationFrame(i),clearTimeout(s),n())},i=t(r),s=setTimeout(r,e)},Qge=(t={type:"raf"})=>e=>(...n)=>{let o=e(...n),r=!0,i=!1,s=!1,a=new Set,c=t.type==="tick"?queueMicrotask:t.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?Zge(window.requestAnimationFrame,100):rG(10):t.type==="callback"?t.queueNotification:rG(t.timeout),l=()=>{s=!1,i&&(i=!1,a.forEach(u=>u()))};return Object.assign({},o,{subscribe(u){let p=()=>r&&u(),m=o.subscribe(p);return a.add(u),()=>{m(),a.delete(u)}},dispatch(u){try{return r=!u?.meta?.[Yge],i=!r,i&&(s||(s=!0,c(l))),o.dispatch(u)}finally{r=!0}}})},Xge=t=>function(n){let{autoBatch:o=!0}=n??{},r=new sG(t);return o&&r.push(Qge(typeof o=="object"?o:void 0)),r};function aG(t){let e=Jge(),{reducer:n=void 0,middleware:o,devTools:r=!0,duplicateMiddlewareCheck:i=!0,preloadedState:s=void 0,enhancers:a=void 0}=t||{},c;if(typeof n=="function")c=n;else if(Db(n))c=D5(n);else throw new Error(Jb(1));let l;typeof o=="function"?l=o(e):l=e();let u=aS;r&&(u=qge({trace:!1,...typeof r=="object"&&r}));let p=$5(...l),m=Xge(p),f=typeof a=="function"?a(m):m(),g=u(...f);return kM(c,s,g)}function ehe(t){let e={},n=[],o,r={addCase(i,s){let a=typeof i=="string"?i:i.type;if(!a)throw new Error(Jb(28));if(a in e)throw new Error(Jb(29));return e[a]=s,r},addAsyncThunk(i,s){return s.pending&&(e[i.pending.type]=s.pending),s.rejected&&(e[i.rejected.type]=s.rejected),s.fulfilled&&(e[i.fulfilled.type]=s.fulfilled),s.settled&&n.push({matcher:i.settled,reducer:s.settled}),r},addMatcher(i,s){return n.push({matcher:i,reducer:s}),r},addDefaultCase(i){return o=i,r}};return t(r),[e,n,o]}function the(t){return typeof t=="function"}function Ji(t,e){let[n,o,r]=ehe(e),i;if(the(t))i=()=>nG(t());else{let a=nG(t);i=()=>a}function s(a=i(),c){let l=[n[c.type],...o.filter(({matcher:u})=>u(c)).map(({reducer:u})=>u)];return l.filter(u=>!!u).length===0&&(l=[r]),l.reduce((u,p)=>{if(p)if(Ki(u)){let f=p(u,c);return f===void 0?u:f}else{if(bo(u))return ZM(u,m=>p(m,c));{let m=p(u,c);if(m===void 0){if(u===null)return u;throw Error("A case reducer on a non-draftable value must not return undefined")}return m}}return u},a)}return s.getInitialState=i,s}var nhe=(t,e)=>Wge(t)?t.match(e):t(e);function rhe(...t){return e=>t.some(n=>nhe(n,e))}var ohe="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",ihe=(t=21)=>{let e="",n=t;for(;n--;)e+=ohe[Math.random()*64|0];return e},she=["name","message","stack","code"],QM=class{constructor(t,e){this.payload=t,this.meta=e}payload;meta;_type},oG=class{constructor(t,e){this.payload=t,this.meta=e}payload;meta;_type},ahe=t=>{if(typeof t=="object"&&t!==null){let e={};for(let n of she)typeof t[n]=="string"&&(e[n]=t[n]);return e}return{message:String(t)}},iG="External signal was aborted",che=(()=>{function t(e,n,o){let r=mc(e+"/fulfilled",(c,l,u,p)=>({payload:c,meta:{...p||{},arg:u,requestId:l,requestStatus:"fulfilled"}})),i=mc(e+"/pending",(c,l,u)=>({payload:void 0,meta:{...u||{},arg:l,requestId:c,requestStatus:"pending"}})),s=mc(e+"/rejected",(c,l,u,p,m)=>({payload:p,error:(o&&o.serializeError||ahe)(c||"Rejected"),meta:{...m||{},arg:u,requestId:l,rejectedWithValue:!!p,requestStatus:"rejected",aborted:c?.name==="AbortError",condition:c?.name==="ConditionError"}}));function a(c,{signal:l}={}){return(u,p,m)=>{let f=o?.idGenerator?o.idGenerator(c):ihe(),g=new AbortController,h,E;function C(_){E=_,g.abort()}l&&(l.aborted?C(iG):l.addEventListener("abort",()=>C(iG),{once:!0}));let I=(async function(){let _;try{let N=o?.condition?.(c,{getState:p,extra:m});if(uhe(N)&&(N=await N),N===!1||g.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let z=new Promise((H,ne)=>{h=()=>{ne({name:"AbortError",message:E||"Aborted"})},g.signal.addEventListener("abort",h,{once:!0})});u(i(f,c,o?.getPendingMeta?.({requestId:f,arg:c},{getState:p,extra:m}))),_=await Promise.race([z,Promise.resolve(n(c,{dispatch:u,getState:p,extra:m,requestId:f,signal:g.signal,abort:C,rejectWithValue:((H,ne)=>new QM(H,ne)),fulfillWithValue:((H,ne)=>new oG(H,ne))})).then(H=>{if(H instanceof QM)throw H;return H instanceof oG?r(H.payload,f,c,H.meta):r(H,f,c)})])}catch(N){_=N instanceof QM?s(null,f,c,N.payload,N.meta):s(N,f,c)}finally{h&&g.signal.removeEventListener("abort",h)}return o&&!o.dispatchConditionRejection&&s.match(_)&&_.meta.condition||u(_),_})();return Object.assign(I,{abort:C,requestId:f,arg:c,unwrap(){return I.then(lhe)}})}}return Object.assign(a,{pending:i,rejected:s,fulfilled:r,settled:rhe(s,r),typePrefix:e})}return t.withTypes=()=>t,t})();function lhe(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function uhe(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var dhe=Symbol.for("rtk-slice-createasyncthunk"),Ant={[dhe]:che};var cG="listener",lG="completed",uG="cancelled",Cnt=`task-${uG}`,Int=`task-${lG}`,_nt=`${cG}-${uG}`,bnt=`${cG}-${lG}`;var{assign:dG}=Object;var XM="listenerMiddleware";var phe=dG(mc(`${XM}/add`),{withTypes:()=>phe}),Tnt=mc(`${XM}/removeAll`),mhe=dG(mc(`${XM}/remove`),{withTypes:()=>mhe});function Jb(t){return`Minified Redux Toolkit error #${t}; visit https://redux-toolkit.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var e1=(t=>{let e=new Set,n=e,o=()=>{e===n&&(e=new Set(e))},r=s=>{let a=!0;return o(),e.add(s),()=>{a&&(o(),e.delete(s),a=!1)}},i=()=>{let s=Array.from(e);n=e,s.forEach(a=>a())};return(...s)=>{let a=t(...s),c=!1,l=!1,u=m=>Array.isArray(m)?m.map(u):a.dispatch(m),p=m=>{let f=l;f||(c=!1,l=!0);let g=u(m),h=c&&!f;return f||(c=!1,l=!1),h&&i(),g};return a.subscribe(()=>{l?c=!0:i()}),{...a,dispatch:p,subscribe:r}}});var pG=t=>!!t&&typeof t=="object"&&!Array.isArray(t),fhe=(t,e)=>{if(Object.keys(e).length===0)return;sn.updateDataPageStore(e),t[d.SHARED]||(t[d.SHARED]={});let n=t[d.SHARED];Object.entries(e).forEach(([o,r])=>{let i=n[o];pG(i)&&pG(r)?n[o]={...i,...r}:n[o]=r})},fc=(t,e)=>{let{data:{shared:n={}}={},context:o}=e;if(Object.keys(n).length===0){o&&y.deleteIn(t,[o,"shared"]);return}fhe(t,n),o&&y.deleteIn(t,[o,"shared"])},Jl=(t,e,n=!1)=>{let{context:o,caseViewMode:r=n?void 0:d.PERFORM_MODE,containerName:i}=e;i!==Ee.WORKAREA&&r&&y.setIn(t,[o,"context_data","caseViewMode"],r)},t1=(t,e)=>{let{context:n}=e;y.setIn(t,[n,"context_data","actionType"],e.actionType),y.setIn(t,[n,"context_data","assignmentID"],e.assignmentID)},mG=(t,e)=>{let{context:n}=e;y.deleteIn(t,[n,"context_data","blocking_action_counter"]),y.deleteIn(t,[n,"context_data","deferred_action_queue"])};var mS=t=>t!==null&&typeof t=="object",fG=(t,e=[])=>{e.forEach(n=>y.deleteIn(t,n))},n1=(t,e=[])=>{e.forEach(n=>y.deleteIn(t,n))},r1=(t,e=[])=>{e.forEach(n=>{y.deleteIn(t,n)})},Yb=(t,e,n={})=>{let{deleteAssignmentSpecificResources:o=!0,doDeleteConfirmationDetails:r=!0,skipMergeAssignmentsAndActions:i=!0}=n;y.deleteIn(t,[e,"nextAssignmentInfo"]),i&&(y.deleteIn(t,[e,d.CASE_INFO.CASE_INFO,"availableActions"]),y.deleteIn(t,[e,d.CASE_INFO.CASE_INFO,"availableProcesses"]),y.deleteIn(t,[e,d.CASE_INFO.CASE_INFO,"assignments"])),y.deleteIn(t,[e,d.CASE_INFO.CASE_INFO,"activeActionID"]),y.deleteIn(t,[e,d.CASE_INFO.CASE_INFO,"childCases"]),r&&(y.deleteIn(t,[e,d.CASE_INFO.CASE_INFO,"confirmationLinks"]),y.deleteIn(t,[e,"caseMessages"])),o&&(y.deleteIn(t,[e,d.CASE_INFO.CASE_INFO,"actionButtons"]),y.deleteIn(t,[e,d.CASE_INFO.CASE_INFO,"navigation"]))},ghe=(t,e)=>{let{containerItemID:n,context:o,deleteContext:r}=e;r&&y.deleteIn(t,[o]),y.deleteIn(t,[n])},hhe={},yhe=Ji(hhe,t=>{t.addCase(bt,(e,n)=>{if(!n.payload.data||e[n.payload.context])return;n.payload.doDeleteCaseSummary&&Yb(e,n.payload.context);let{target:o}=n.payload;o&&(o.includes(d.WORKAREA)||o.includes(d.MODAL))?e[n.payload.context]=n.payload.data:e[n.payload.containerItemID]=n.payload.data,Jl(e,n.payload),t1(e,n.payload),fc(e,n.payload),mG(e,n.payload)}).addCase(Ht,(e,n)=>{n.payload.doDeleteCaseSummary&&Yb(e,n.payload.context,{deleteAssignmentSpecificResources:n.payload.deleteAssignmentSpecificResources});let{target:o,propertiesToReplace:r=[]}=n.payload;if(o&&(o.includes(d.WORKAREA)||o.includes(d.MODAL))){let i=e[n.payload.context];mS(i)&&(e[n.payload.context]=jt(i,n.payload.data,{propertiesToReplace:[...r]}))}else{let i=e[n.payload.containerItemID];mS(i)&&(e[n.payload.containerItemID]=jt(i,n.payload.data,{propertiesToReplace:[...r]}))}(n.payload.actionType||n.payload.assignmentID)&&t1(e,n.payload),Jl(e,n.payload),fc(e,n.payload),n1(e,n.payload.suggestionContexts)}).addCase(tt,(e,n)=>{let{childContainersContexts:o=[]}=n.payload;ghe(e,n.payload),r1(e,o),fG(e,n.payload.transientItems),n1(e,n.payload.suggestionContexts)}).addCase(fi,(e,n)=>{let{containerItems:o}=n.payload;Array.isArray(o)?o.forEach(r=>{y.deleteIn(e,[r])}):y.deleteIn(e,[o])}).addCase(fa,(e,n)=>{let{context:o,contextToBeRemoved:r,data:i,childContainersContextsToBeRemoved:s}=n.payload;Yb(e,n.payload.context),Jl(e,n.payload);let a=e[o],c=e[r];if(!mS(a)||!mS(c))return;let l=jt(a,c);mS(l)&&(e[o]=jt(l,i),y.deleteIn(e,[r]),r1(e,s),fc(e,n.payload))}).addCase(st,(e,n)=>{let{context:o,pulseReplace:r=!0,childContainersContexts:i=[]}=n.payload,{data:s}=n.payload,a=y.getIn(e[o],"pulse"),c=y.getIn(e[o],"OperatorID"),l=y.getIn(e[o],"pxRequestor");y.setIn(e,o,s),l&&y.setIn(e,[o,"pxRequestor"],s.pxRequestor?y.mergeDeep(l,s.pxRequestor):l),c&&y.setIn(e,[o,"OperatorID"],s.OperatorID?y.mergeDeep(c,s.OperatorID):c),!r&&a&&y.setIn(e,[o,"pulse"],a),Jl(e,n.payload),fc(e,n.payload),r1(e,i),fG(e,n.payload.transientItems),n1(e,n.payload.suggestionContexts)}).addCase(Rr,(e,n)=>{let{context:o,doDeleteConfirmationDetails:r=!0,skipMergeAssignmentsAndActions:i=!0}=n.payload;Yb(e,o,{doDeleteConfirmationDetails:r,skipMergeAssignmentsAndActions:i})}).addCase(da,(e,n)=>{let{transientItemID:o,data:r}=n.payload;y.setIn(e,o,r)}).addCase(gi,(e,n)=>{let{transientItems:o}=n.payload;o.forEach(r=>y.deleteIn(e,r))}).addCase(hi,(e,n)=>{let{transientItems:o}=n.payload;o.forEach(r=>y.deleteIn(e,r))}).addCase(pa,(e,n)=>{let{transientItemID:o,data:r}=n.payload;jt(y.getIn(e,o),r)}).addCase(No,(e,n)=>{let{transientItemID:o,data:r}=n.payload;jt(y.getIn(e,o),r)}).addCase(ss,(e,n)=>{let{transientItemID:o,data:r}=n.payload;Object.keys(r??{}).forEach(i=>{y.deleteIn(e,[o,i])})}).addCase(ma,(e,n)=>{let{transientItemID:o,data:r}=n.payload;y.deleteIn(e,o),y.setIn(e,o,r)}).addCase(Du,(e,n)=>{let{key:o,value:r}=n.payload;y.setIn(e,`${d.SHARED}.${o}`,r)}).addCase(Mu,(e,n)=>{let{context:o,data:r}=n.payload;return y.setIn(e,o,r)})}),o1=yhe;function gG(t){if(typeof t=="object"&&t!==null&&"payload"in t&&typeof t.payload=="object"&&t.payload!==null){let e=t.payload.context;return typeof e=="string"?e:void 0}}var She=mc(zu),Ehe=Ji({},t=>{t.addCase(Pn,(e,n)=>{let{propertiesToReplace:o=[],propertiesToReArrange:r=[],uiRootReference:i="",interestPath:s}=n.payload,a=i&&typeof n.payload.context=="string"?`${n.payload.context}.${i}`:n.payload.context,c=typeof a=="string"?Io(a):[],l={isArrayDeepMerge:n.payload.isArrayDeepMerge,propertiesToReplace:[...o],propertiesToReArrange:[...r]};if(i&&c.length)y.setIn(e,c,jt(y.getIn(e,c),y.getIn(n.payload.data,Io(i)),l));else if(s){let u=y.getIn(e[n.payload.context],s),p=y.getIn(n.payload.data,s),m=jt(u,p,{isArrayDeepMerge:!0}),f=y.getIn(n.payload.data.context_data,s);Rb(e[n.payload.context],[...o],[...r]),y.setIn(e[n.payload.context],s,m),e[n.payload.context]&&f&&y.setIn(e[n.payload.context].context_data,s,jt(y.getIn(e[n.payload.context].context_data,s),f,{isArrayDeepMerge:!0}))}else e[n.payload.context]=jt(e[n.payload.context],n.payload.data,l);Jl(e,n.payload,!0),fc(e,n.payload)}).addCase(Pt,(e,n)=>{let{context:o,reference:r,value:i,isArrayDeepMerge:s}=n.payload;SM(e[o],r,i,{isArrayDeepMerge:s})}).addCase(Mc,(e,n)=>{let{context:o,reference:r,value:i}=n.payload;EM(e[o],r,i)}).addCase($u,(e,n)=>{yM(e[n.payload.context],n.payload.reference)}).addCase(ca,(e,n)=>{y.setIn(e[n.payload.context],"context_data.isLoading",!0)}).addCase(Wo,(e,n)=>{y.setIn(e[n.payload.context],"context_data.isLoading",!1)}).addCase(la,(e,n)=>{let o=gG(n);o&&(e[o]||(e[o]={}),y.setIn(e[o],"context_data.isOffline",!0))}).addCase(xu,(e,n)=>{let o=gG(n);o&&(e[o]||(e[o]={}),y.setIn(e[o],"context_data.isOffline",!1))}).addCase(yi,(e,n)=>{let{data:o}=n.payload;fc(e,{data:{shared:o}})}).addCase(Uu,(e,n)=>{let{dataPagesToBeRemoved:o=[]}=n.payload;if(!e.shared||o.length===0)return;let r=new Map;o.forEach(i=>{let{dataPageName:s,dataPageNameWithHash:a}=i,c=r.get(s);c?c.push(a):r.set(s,[a])}),r.forEach((i,s)=>{i.forEach(c=>{y.deleteIn(e.shared,[s,c])});let a=y.getIn(e.shared,[s]);a&&Object.keys(a).length===0&&y.deleteIn(e.shared,[s])})}).addCase(Uc,(e,n)=>{let o=y.getIn(e[n.payload.context].context_data,"blocking_action_counter",0);n.payload.isInitiateBlockingAction?y.setIn(e[n.payload.context].context_data,"blocking_action_counter",o+1):y.setIn(e[n.payload.context].context_data,"blocking_action_counter",o-1)}).addCase(She,(e,n)=>{e.locale=y.getIn(n.payload,"locale","")})}),hG=Ehe;var SG=/\[(\d+)\]$/gi,EG=/(\d+)/gi,Ahe=/\[\d+\]$/,AG=(t,e,n,o=[d.CONTEXT_DATA,d.CASE_INFO.CASE_INFO,d.CONTENT])=>{let r=y.getIn(e,o);if(r){let s=WA(r,[],[]);for(let a of s)y.setIn(t[n],[...o,...a],{})}},yG=(t,e,n,o)=>{let{property:r,pageReference:i,category:s,type:a,subType:c}=o.payload,l=y.getIn(t[e],n);if(l&&s===d.CASEMESSAGES)y.setIn(t[e],ho(r,i,s),"");else if(l&&l.length>0&&Array.isArray(l)){let u;c?u=l.filter(p=>!(p.type===a&&p.subType===c)):u=l.filter(p=>p.type!==a),n&&n.length>0&&y.setIn(t[e],ho(r,i,s),u)}},Che=(t,e)=>{let{property:n,pageReference:o,category:r,isListEntry:i,stateObj:s}=e.payload,{context:a}=e.payload,c=a;if(s)return AG(t,s,a),t;let l=ho(n,o,r,i);return r===d.PAGE&&a?.includes(Ee.WORKAREA)&&(c=Ye(a)),yG(t,c,l,e),yG(t,a,l,e),t},Ihe=t=>{let e=t.map(n=>{let o=n.match(SG),r=null;if(o?.length){let i=o[0].match(EG);i?.length&&(r=parseInt(i[0],10))}return{key:n,hasIndex:!!o,numericIndex:r}});return e.sort((n,o)=>!n.hasIndex&&!o.hasIndex?n.key.localeCompare(o.key):!n.hasIndex&&o.hasIndex?-1:n.numericIndex!==null&&o.numericIndex!==null?n.numericIndex-o.numericIndex:1),e.map(n=>n.key)},_he=(t,e)=>{let{property:n,pageReference:o,category:r,isListEntry:i,deletingIndex:s,stateObj:a}=e.payload,{context:c}=e.payload;if(a)return AG(t,a,c),t;let l=ho(n,o,r,i);if(Number.isInteger(s)){y.deleteIn(t[c],l);let u=l.slice(0,l.length-1),p=y.getIn(t[c],u)||{},m=Ihe(Object.keys(p));p=m.map(f=>p[f]),p.forEach((f,g)=>{let h=m[g].match(SG);if(h?.length){let E=parseInt(h[0].match(EG)[0],10);E>s&&(y.deleteIn(t[c],u.concat(m[g])),y.setIn(t[c],u.concat(m[g].replace(Ahe,`[${E-1}]`)),f))}})}else y.setIn(t[c],l,{});return t};function bhe(t){let e=null,n=t.lastIndexOf(".");return n<0?null:(e=t.substring(0,n),e&&`caseInfo.content.${e}`.replace(/\(/g,"[").replace(/\)/g,"]"))}function CG(t,e){return y.getIn(t,e)?.dataInfo?.content!==void 0}var IG=(t,e)=>{let n=y.getIn(t,e);return G.isObjectCaseType(n?.objectInfo?.objectTypeID)===!0};function _G(t,e){let n=er.FIELD_MESSAGES_PATH;return CG(t,e)?n=er.DATA_OBJECT_FIELD_MESSAGES_PATH:IG(t,e)&&(n=er.OBJECT_FIELD_MESSAGES_PATH),n}var The=(t,e,n)=>{let o=y.getIn(n,d.ERROR_FIELD_IN_PAGE).slice(1),r=y.getIn(n,d.ERROR_IN_PAGE_IDENTIFIER).slice(1);if(r){let i="caseInfo.content";CG(t,e)?i="dataInfo.content":IG(t,e)&&(i="objectInfo.content");let s=o?`${i}.${o}`:i;s=s.replace(/\(/g,"[").replace(/\)/g,"]");let a=ho(r,s,d.PROPERTY),c=y.getIn(t[e],`${s}.classID`),l=ft(r,c),u=T.getLocale()??"en-US",p=new jp(u,l?.localeReference),m={type:A.MESSAGES.MESSAGES_TYPE_ERROR,message:n.localizedValue,...l?.label&&{fieldLabel:p.getLocalizedText(l.label)}},f=y.getIn(t[e],a,[]);if(y.isContains(f,m))return;y.setIn(t[e],a,[...f,m])}},vhe=(t,e,n)=>{n.forEach(o=>{The(t,e,o)})},Rhe=t=>{let e=[];return t.forEach(n=>{let o=n.erroneousInputOutputFieldInPage?.replace(/^\./,"");e.push({type:A.MESSAGES.MESSAGES_TYPE_ERROR,message:n.localizedValue,...o&&{fieldInPage:o}})}),e};function Phe(t,e){let{err:n,formFields:o}=e.payload,{context:r}=e.payload,{fieldErrors:i,pageErrors:s}=hV(n.errorDetails,o),a=_G(t,r);if(y.setIn(t,[r,...a],{}),y.setIn(t,[r,...er.PAGE_MESSAGES_PATH],[]),i.forEach(c=>{let l=y.getIn(c,d.ERROR_FIELD_IN_PAGE);if(l){let u=l.slice(1);if(u){let p=bhe(u);if(!p)return!1;let m=u.substring(u.lastIndexOf(".")+1),f=ho(m,p,d.PROPERTY);y.setIn(t,[r,...f],[])}}}),i.length>0&&vhe(t,r,i),s.length>0){let c=Rhe(s);t[r]||(r=d.APP.APP),y.setIn(t,[r,...er.PAGE_MESSAGES_PATH],c)}else r.includes&&r.includes(Ee.WORKAREA)&&(r=Ye(r)),y.deleteIn(t,[r,...er.PAGE_MESSAGES_PATH]);return t}var Nhe=Ji({},t=>{t.addCase(ve,(e,n)=>n.payload.err.errorDetails&&(n.payload.err.errorClassification===A.VALIDATION_FAIL||n.payload.err.errorClassification===A.INVALID_INPUTS||(n.payload.err?.displayButtonsOnErrors?.length??0)>0)?Phe(e,n):e).addCase(Ht,(e,n)=>{let{context:o}=n.payload,r=[o,..._G(e,o)],i=[o,...er.PAGE_MESSAGES_PATH];if(y.setIn(e,r,{}),y.setIn(e,i,[]),o&&o.includes(Ee.WORKAREA)){let a=[Yo(o),...er.PAGE_MESSAGES_PATH];y.setIn(e,a,[])}}).addCase(lo,(e,n)=>{let{isListEntry:o,clearAll:r,context:i}=n.payload;return r?(y.deleteIn(e,[i,d.CONTEXT_DATA]),e):o?_he(e,n):Che(e,n)}).addCase(ya,(e,n)=>{let{messages:o,property:r,pageReference:i,context:s,category:a}=n.payload,c=ho(r,i,a);o&&o.length>0&&Array.isArray(o)&&c&&c.length>0&&y.setIn(e[s],ho(r,i,a),o)})}),i1=Nhe;var bG=(t,e,n,o,r)=>{y.setIn(t[e],[...n,o],r)},Ohe=(t,e,n,o,r)=>{let i=jt(y.getIn(t[e],[...n,o],{}),r);y.setIn(t[e],[...n,o],i)},xhe=(t,e,n,o,r)=>{let i=y.getIn(t[e],n,[]);typeof o=="string"?delete i[o]:i.splice(o,1),y.setIn(t[e],n,i),be.deleteListNode(e,[r],i.length)},Dhe=(t,e,n,o,r)=>{if(o===r)return;let i=y.getIn(t[e],[...n,o],{}),s=y.getIn(t[e],n,[]);s.splice(o,1),s.splice(r,0,i),y.setIn(t[e],n,s),LV(t,e,n?.join("."),o,r)},$he=(t,e,n,o)=>{let r=y.getIn(t[e],n)||[],i=!1;o.forEach(s=>{let{instruction:a,content:c,listIndex:l}=s;a===d.LIST_ACTIONS.SELECT?(r[l]=c,i=!0):delete r[l]}),i&&ba(e,n?.join(".")),y.setIn(t[e],n,r.filter(Boolean))},whe=(t,e,n)=>{y.setIn(t[e],n,[])},Mhe=(t,e,n,o)=>{y.setIn(t[e],n,o)},khe=(t,e,n)=>{y.setIn(t[e],n,{})},Lhe=Ji({},t=>{t.addCase(Oo,(e,n)=>{let{instruction:o,actions:r,context:i,referenceList:s,listIndex:a,groupIndex:c,listMoveToIndex:l,content:u={}}=n.payload,p=Io(s);switch(o){case d.LIST_ACTIONS.ADD:bG(e,i,p,c,u);break;case d.LIST_ACTIONS.INSERT:bG(e,i,p,a,u);break;case d.LIST_ACTIONS.UPDATE:Ohe(e,i,p,a??c,u);break;case d.LIST_ACTIONS.DELETE:xhe(e,i,p,a??c,s);break;case d.LIST_ACTIONS.MOVE:Dhe(e,i,p,a,l);break;case d.LIST_ACTIONS_TYPE.SELECT_DESELECT:$he(e,i,p,r);break;case d.LIST_ACTIONS_TYPE.DESELECT_ALL:whe(e,i,p);break;case d.LIST_ACTIONS.REPLACE:Mhe(e,i,p,u);break;case d.LIST_ACTIONS.DELETEPAGE:khe(e,i,p);break;default:break}})}),TG=Lhe;var vG=(t,e)=>{if(t||(t=fS().data),e.type===Sa)return fS().data;switch(e.type){case Pn:case Pt:case Mc:case $u:case ca:case Wo:case la:case xu:case yi:case Uu:case Uc:case zu:return hG(t,e);case ve:case lo:case ya:return i1(t,e);case Ht:return i1(o1(t,e),e);case bt:case tt:case fi:case fa:case st:case Rr:case da:case gi:case hi:case pa:case No:case ss:case ma:case Du:case Mu:return o1(t,e);case Oo:return TG(t,e);default:return t}};var RG={},s1=(t,e=[])=>{e.forEach(n=>{y.deleteIn(t,[n])})},Uhe=(t,e,n,o)=>{t===""&&y.deleteIn(e,[n,"items",o,"key"])},zhe=(t,e,n,o,r)=>{o||(r?y.setIn(t,[e,"items",n,"pageName"],r):y.deleteIn(t,[e,"items",n,"pageName"]))},a1=(t,e)=>{let{type:n,payload:o}=e,r=n===Ht,{target:i,context:s,semanticURL:a="",root:c,containerItemID:l,childContainers:u,flowName:p,resourceType:m="",key:f="",clearView:g=!1,pageName:h}=o;return c?y.setIn(t,[i,"items",l,"view"],c):g&&y.deleteIn(t,[i,"items",l,"view"]),s&&y.setIn(t,[i,"items",l,"context"],s),p&&y.setIn(t,[i,"items",l,"flowName"],p),(!r||r&&f)&&y.setIn(t,[i,"items",l,"key"],f.trim()),Uhe(f,t,i,l),(!r||r&&a)&&y.setIn(t,[i,"items",l,"semanticURL"],a),(!r||r&&m)&&y.setIn(t,[i,"items",l,"resourceType"],m),zhe(t,i,l,r,h),s1(t,u),t},jhe=({prevItems:t,prevAccessedOrder:e,containerItemID:n,root:o,semanticURL:r,key:i,flowName:s,readOnly:a,context:c,isInCreateStage:l,resourceType:u,actionName:p,isMinimizable:m,isBulkAction:f,showProgress:g,progressMessage:h,modalOptions:E,isTraditionalRemoteCase:C,resourceStatus:I,hideDefaultActionButtons:_,referenceList:P,subscriptName:N,subscriptFieldName:z,pageGroupName:H,isPageGroup:ne,index:j,actionID:oe,acTertiary:Ae,isMultiRecordData:he,parentContext:Oe,isDeleteConfirmation:He,workId:_e,caseTypeID:Xe,className:De,keys:Et,enableBackNavigation:an,heading:vn,pageName:cn})=>({accessedOrder:[...e,n],items:{...t,[n]:{view:o,semanticURL:r,key:i,flowName:s,readOnly:a,context:c,isInCreateStage:l,resourceType:u,actionName:p,isMinimizable:m,...f&&{isBulkAction:f},showProgress:g,progressMessage:h,modalOptions:E,isTraditionalRemoteCase:C,resourceStatus:I,..._&&{hideDefaultActionButtons:_},referenceList:P,subscriptName:N,subscriptFieldName:z,pageGroupName:H,isPageGroup:ne,index:j,...oe&&{actionID:oe},...Ae&&{acTertiary:Ae},...he&&{isMultiRecordData:he},...Oe&&{parentContext:Oe},...cn&&{pageName:cn},...He&&{isDeleteConfirmation:He,workId:_e,caseTypeID:Xe,className:De,keys:Et,enableBackNavigation:an},heading:vn}}}),Fhe=(t,e)=>{let{target:n,context:o,isInCreateStage:r,isBulkAction:i,semanticURL:s,root:a,containerItemID:c,actionMgrID:l,key:u,flowName:p,resourceType:m,actionName:f,isMinimizable:g,showProgress:h,progressMessage:E,modalOptions:C,resourceStatus:I,hideDefaultActionButtons:_,actionID:P,isMultiRecordData:N,acTertiary:z,parentContext:H,heading:ne,isTraditionalRemoteCase:j,readOnly:oe,referenceList:Ae,subscriptName:he,subscriptFieldName:Oe,pageGroupName:He,isPageGroup:_e,index:Xe,isDeleteConfirmation:De,workId:Et,caseTypeID:an,className:vn,keys:cn,enableBackNavigation:br,pageName:Ho}=e.payload,kn=t[n],oo=kn&&kn.type,cr=kn&&kn.accessedOrder||[],Ut=kn&&kn.items||{};if(t[n]&&oo==="single"&&cr.length>0){a1(t,e);return}let To=jhe({prevItems:Ut,prevAccessedOrder:cr,containerItemID:c,root:a,semanticURL:s,key:u,flowName:p,readOnly:oe,context:o,isInCreateStage:r,resourceType:m,actionName:f,isMinimizable:g,isBulkAction:i,showProgress:h,progressMessage:E,modalOptions:C,isTraditionalRemoteCase:j,resourceStatus:I,hideDefaultActionButtons:_,referenceList:Ae,subscriptName:he,subscriptFieldName:Oe,pageGroupName:He,isPageGroup:_e,index:Xe,actionID:P,acTertiary:z,isMultiRecordData:N,parentContext:H,isDeleteConfirmation:De,workId:Et,caseTypeID:an,className:vn,keys:cn,enableBackNavigation:br,heading:ne,pageName:Ho});M.resolveActionByID(l,null,!1),t[n]||(t[n]={accessedOrder:[],items:{}},oo!==void 0&&(t[n].type=oo)),y.setIn(t,[n,"accessedOrder"],To.accessedOrder),y.setIn(t,[n,"items",c],To.items[c])},Vhe=(t,e,n)=>{let o=t&&t[e]?.type,r=t&&t[e]?.accessedOrder||[];return o==="single"?r.length>0?r:[...r,n]:r.includes(n)?r:[...r,n]},Bhe=(t,e)=>{let{actionMgrID:n,data:o,target:r,containerItemID:i}=e.payload,s=t;try{let a=Vhe(t,r,i);y.setIn(t,[r,"items",i,"transientItems"],[]),y.setIn(t,[r,"accessedOrder"],a),s=a1(t,e),M.resolveActionByID(n,o,!1)}catch{M.rejectActionByID(n,!1)}return s},Hhe=Ji(RG,t=>{t.addCase(Sa,()=>RG).addCase(wu,(e,n)=>{let{context:o,name:r,type:i,actionMgrID:s}=n.payload,a=`${o}/${r}`;if(M.resolveActionByID(s,null,!1),e[a])return e;y.setIn(e,[a],{type:i,accessedOrder:[],items:{}})}).addCase(IE,(e,n)=>{let{containerName:o,childContainers:r=[]}=n.payload;y.deleteIn(e,[o]),r.forEach(i=>{y.deleteIn(e,[i])})}).addCase(fi,(e,n)=>{let{context:o,name:r,actionMgrID:i,childContainers:s}=n.payload,a=`${o}/${r}`;M.resolveActionByID(i,null,!1),y.setIn(e,[a,"accessedOrder"],[]),y.setIn(e,[a,"items"],{}),Array.isArray(s)&&s.forEach(c=>{y.deleteIn(e,[c])})}).addCase(bt,(e,n)=>{Fhe(e,n)}).addCase(Ht,(e,n)=>{let{actionMgrID:o,data:r}=n.payload;try{a1(e,n),M.resolveActionByID(o,r,!1)}catch{M.rejectActionByID(o,!1)}}).addCase(st,(e,n)=>Bhe(e,n)).addCase(mn,(e,n)=>{let{target:o,containerItemID:r,actionMgrID:i}=n.payload;try{let s=y.getIn(e,[o,"accessedOrder"]).filter(a=>a!==r);s.push(r),y.setIn(e,[o,"accessedOrder"],s),M.resolveActionByID(i,null,!1)}catch{M.rejectActionByID(i,!1)}}).addCase(fa,(e,n)=>{let{target:o,containerItemID:r,actionMgrID:i,childContainers:s}=n.payload;try{let a=y.getIn(e,[o,"accessedOrder"]).filter(c=>c!==r);y.setIn(e,[o,"accessedOrder"],a),y.deleteIn(e,[o,"items",r]),s1(e,s),M.resolveActionByID(i,null,!1)}catch{M.rejectActionByID(i,!1)}}).addCase(tt,(e,n)=>{let{target:o,containerItemID:r,actionMgrID:i,childContainers:s}=n.payload;try{let a=y.getIn(e,[o,"accessedOrder"]).filter(c=>c!==r);y.setIn(e,[o,"accessedOrder"],a),y.deleteIn(e,[o,"items",r]),s1(e,s),M.resolveActionByID(i,null,!1)}catch{M.rejectActionByID(i,!1)}}).addCase(da,(e,n)=>{let{transientItemID:o,target:r,contextName:i}=n.payload,s=y.getIn(e,[r,"items",i,"transientItems"])??[];y.setIn(e,[r,"items",i,"transientItems"],[...s,o])}).addCase(hi,(e,n)=>{let{target:o,containerItemID:r}=n.payload;y.deleteIn(e,[o,"items",r,"transientItems"])}).addCase(gi,(e,n)=>{let{target:o,transientItemID:r,containerItemID:i}=n.payload,a=(y.getIn(e,[o,"items",i,"transientItems"])??[]).filter(c=>c!==r);y.setIn(e,[o,"items",i,"transientItems"],a)})}),PG=Hhe;var NG={},fS=()=>NG,Ghe=t=>{let e=t.Data||t.data,{uiResources:n={}}=t,o=n[d.CONTEXT_DATA]||t[d.CONTEXT_DATA];NG={data:{locale:T.getLocale(),[d.APP.APP]:{...e,[d.CONTEXT_DATA]:o}},containers:{}}},OG=t=>(Ghe(t),{data:vG,containers:PG});var c1=(t,e=!1)=>t===d.ACTION?e?Kt.REFRESH_CASE_DATA:Kt.REFRESH_ASSIGNMENT_DATA:Kt.REFRESH_CASE_VIEW,l1=(t,e,n)=>{let o=[];e&&n&&o.push({page:e,actionID:n});let r=t;for(;r;){let i=Q.getPropertyValue(d.CONTEXT_DATA_MODAL_VIEW.CONTEXT_DATA_MODAL_VIEW,"",r);if(!i?.isMultiRecordData||i.editType!==d.ACTION||!i.interestPage||!i.interestPageActionID)break;i.interestPage!==e&&o.unshift({page:i.interestPage,actionID:i.interestPageActionID}),r=i.parentContext}return o},Zb=t=>{let{context:e}=t,o={...Mt(e,{skipUUID:!1}).content,contextData:!1},r=dd(e);y.isEmpty(r)||(o=ol(r,o));let i=c1(t.editType,t.isLocalAction),{restApi:s,reqType:a}=F(i,{ID:!t.isLocalAction&&t.editType===d.ACTION?t.assignmentID:t.ID,actionID:t.actionID,viewID:t.viewID}),c=s;return t.editType===d.ACTION&&(c+=`?operation=${t.operationFlag}`,o.interestPageActionID=t.interestPageActionID,T.isInfinityRuntime()&&(o.actionIdArrayToBeProcessed=l1(e,t.interestPage,t.interestPageActionID))),o.interestPage=t.interestPage,Y(k(c,{method:a,body:o,headers:t.headers},e)).pipe(x(l=>({actionInPayload:t,response:l.data,headers:ke(l.headers)})),fe(": Error occurred during ajax call : ",e))};var Qb=[d.CASE_INFO.CASE_INFO_CONTENT,d.OBJECT_INFO.OBJECT_INFO_CONTENT],qhe=(t,e)=>`${Qb.find(o=>y.hasIn(t,o))??d.CASE_INFO.CASE_INFO_CONTENT}${y.convertClipboardPageToPageRefNotation(e)}`,u1=async(t,e)=>{let{context:n,serverPrecedenceFields:o,requestType:r}=e,i=qt.getTargetViewContainerName(Vr),s=X(i,n),a={acName:s,context:n},c=ze(t,{[A.STOPMERGEACTIONS]:!0,[A.ACTIONS.DELETEAVIALACTIONS]:!0});c.directUrlUpdation=!1,r===Kt.REFRESH&&await Pe(c,e,a);let u=Me(c,{target:s,context:n});e.interestPage&&(u.interestPath=qhe(u.data,e.interestPage)),u.isArrayDeepMerge=e.options?.isArrayDeepMerge,u.preserveClientChanges=e.options?.preserveClientChanges!==void 0?e.options.preserveClientChanges:!0;let p=G.getPropertiesToReArrange(n);return{payload:u,mergeOptions:{serverPrecedenceFields:o,propertiesToReArrange:p}}},xG=async(t,e)=>{let{context:n}=e,{payload:o,mergeOptions:r}=await u1(t,e),i=B(Ne,o,r),s=i.payload?.data?.pageInstructions;return s?.length>0&&(delete i.payload?.data?.pageInstructions,Ue.mergeServerPageInstructions(n,s)),v(i),o};var Whe=()=>{let t=`${d.APP.APP}/${d.PRIMARY}`,e=se(t);return(e?Qt(`${e}/${d.WORKAREA}`):null)??Qt(t)},DG=async t=>{let e=Whe();if(!e)return;let{data:n}=Sw(t);typeof n!="object"||n===null||await xG(n,{context:e,serverPrecedenceFields:[],requestType:Kt.REFRESH})};var p1=t=>typeof t=="object"&&t!==null&&!Array.isArray(t),$G=t=>p1(t)||t===void 0||t===null,wG=t=>p1(t)?t:void 0,d1=(t,e)=>t===e||t.startsWith(`${e}.`)||t.startsWith(`${e}[`),MG=(t,e,n,o,r=[])=>{let i={stalePaths:[],conflictPaths:[]},s=(c,l,u,p)=>{r.some(m=>d1(p,m)||d1(m,p))||Ro(u,l)||(Ro(c,l)?i.stalePaths.push(p):Ro(c,u)||i.conflictPaths.push(p))},a=(c,l,u,p)=>{if(!(l===u||r.some(m=>d1(p,m)))){if(p1(c)&&$G(l)&&$G(u)){Object.keys(c).forEach(m=>{a(c[m],wG(l)?.[m],wG(u)?.[m],`${p}.${m}`)});return}Array.isArray(c)||Array.isArray(l)||Array.isArray(u)||s(c,l,u,p)}};return a(t,e,n,o),i};var Gs={},{VIEW:Khe,FIELD:Jhe}=d.CONTEXT_TREE_NODE_TYPES,Yhe=["refreshFor","propertyName","optionalPayload","resetForm","skipPayloadGeneration","isFillFormWithAI"],eT={},tT={},nT={},f1={},rT={},oT={},g1=new Set,kG=0,Zhe=(t,e)=>{let n=[];return Object.keys(t).forEach(o=>{(!Object.hasOwn(e,o)||e[o]!==t[o])&&n.push(o)}),n},LG=t=>{let e=Qy(t.context);return{changedPropertyValues:e,preserveFields:t.preRequestSnapshot?Zhe(e,t.preRequestSnapshot):[]}},Qhe=t=>{if(!t)return;let e=rT[t];return delete rT[t],e},Xhe=t=>{if(!t)return;let e=oT[t];return delete oT[t],e},eye=(t,e)=>{let n=t.mergePayload?.preserveClientChanges===!1?e.preserveFields:Object.keys(e.changedPropertyValues),{serverPrecedenceFields:o}=t.mergeOptions,r=(o??[]).flatMap(i=>Qb.map(s=>`${s}.${i}`));return[...n,...r]},tye=t=>typeof t=="object"&&t!==null?JSON.parse(JSON.stringify(t)):t,nye=(t,e)=>{let n=t.mergePayload?.data;if(t.preRequestData===void 0||!n)return!1;let o=J(t.context),r=t.mergePayload.interestPath?[t.mergePayload.interestPath]:Qb,i=eye(t,e),s=!1;return r.forEach(a=>{let c=y.getIn(n,a);if(c===void 0)return;let{stalePaths:l,conflictPaths:u}=MG(c,y.getIn(t.preRequestData,a),y.getIn(o,a),a,i);l.forEach(p=>{let m=y.getIn(o,p);m===void 0?y.deleteIn(n,p):y.setIn(n,p,tye(m))}),(l.length>0||u.length>0)&&(s=!0)}),s},rye=t=>{let e=M.getNextActionMgrId(),n={...t.options,actionMgrID:e};Yhe.forEach(o=>{delete n[o]}),g1.add(e),v(Da({...t,options:n}))},oye=t=>t.some(n=>n.isReconciliation)?void 0:[...t].reverse().find(n=>{let o={...n.actionConfig?.options};return n.actionConfig&&!o.isFillFormWithAI})?.actionConfig,UG=t=>t.actionConfig?.actionType===zc,iye=t=>{let e=0,n=()=>{},o=new Promise(r=>{n=r});return w.publish(A.PUB_SUB_EVENTS.ON_FILL_FORM_WITH_AI_COMPLETE,{context:t,registerField:()=>{e+=1},deregisterField:()=>{e-=1,e===0&&n()}}),e===0&&n(),o},zG=async t=>{UG(t)&&(await iye(t.context),t.actionMgrID&&M.resolveActionByID(t.actionMgrID,t.mergePayload)),vt.deRegisterBlockingAction(t.context).catch(()=>{})},jG=(t,e,n)=>{let o=e&&nye(t,n),{preserveFields:r}=n,i=r.length>0?{...t.mergeOptions,preserveFields:r}:t.mergeOptions,s=B(Ne,t.mergePayload,i),a=y.getIn(s,"payload.data.pageInstructions");return a&&a.length>0&&(delete s.payload?.data?.pageInstructions,Ue.mergeServerPageInstructions(t.context,a)),v(s),t.actionMgrID&&!UG(t)&&M.resolveActionByID(t.actionMgrID,t.mergePayload),o},sye=t=>{delete tT[t];let e=eT[t];if(delete eT[t],!e||e.length===0)return;e.sort((a,c)=>a.seq-c.seq);let n=e.length>1,o=!1,r=new Set;e.map(a=>({item:a,changeState:LG(a)})).forEach(({item:a,changeState:c})=>{o=jG(a,n,c)||o,r.add(a.context)}),r.forEach(a=>{w.publish(A.PUB_SUB_EVENTS.ON_REFRESH_COMPLETE,{context:a})});let s=o?oye(e):void 0;s&&rye(s),e.forEach(zG)},aye=(t,e,n)=>{if(!t)return;nT[t]=e,kG+=1,f1[t]=kG,rT[t]=Qy(n),oT[t]=J(n),(tT[e]??(tT[e]=new Set)).add(t)},cye=t=>t?f1[t]??0:0,m1=t=>{if(!t)return;let e=nT[t];if(!e)return;delete nT[t],delete f1[t],delete rT[t],delete oT[t],g1.delete(t);let n=tT[e];n&&(n.delete(t),n.size===0&&sye(e))},lye=t=>(jG(t,!1,LG(t)),w.publish(A.PUB_SUB_EVENTS.ON_REFRESH_COMPLETE,{context:t.context}),zG(t)),uye=t=>{let{ID:e,actionID:n,context:o}=t;return`${e}.${o}.${n}`},dye=(t,e,n)=>{let o=e.value.data[n]?.objectInfo?.headers,r=e.value.data[n]?.caseInfo?.headers;return!G.shouldUseUnifiedHandling()&&t&&o?o:r},pye=t=>{let{reqHeaders:e}=t;e&&(t.headers=t.headers||{},e.etag&&(t.headers["if-match"]=e.etag))},mye=t=>(it()||y8(t)>0)&&Gs[t],fye=(t,e,n)=>{let{mcpAction:o,body:r}=t;return o&&it()&&B_({body:r,responseType:t.responseType})?Ot(o.actionName,{queryPayload:o.queryPayload,body:H_(r),headers:Ti({headers:t.headers,body:r},e)},t.cancelConfig?.token):k(t.url,t,e,{cancelContext:n})},gye=(t,e)=>{let n=[];for(let o=0;o<Gs[t].length;){let r=Gs[t][o],i=tV(r,e);if(i===UR)return!1;i===!0&&(n.push(o),r.cancelConfig?.cancel()),o+=1}for(let o=n.length-1;o>=0;o-=1)Gs[t].splice(n[o],1);return!0},hye=(t,e)=>{let{context:n}=t;pye(t);let o=uye(e);if(e.interestPage&&(t.interestPage=e.interestPage),mye(o)&&!gye(o,t)){let i=Object.assign(new Error,{code:"ERR_CANCELED"});return Promise.reject(i)}let r=Qu();return t.signal=r.token,t.cancelConfig=r,Gs[o]?Gs[o].push(t):Gs[o]=[t],w.publish(A.PUB_SUB_EVENTS.ON_REFRESH_START,{context:n}),kf()&&aye(e.options?.actionMgrID,o,n),fye(t,n,o).then(i=>(delete Gs[o],i)).catch(i=>{throw i&&i.code!=="ERR_CANCELED"&&delete Gs[o],i})},Xb=(t,e)=>({routeKey:t,restAPI:F(t,e)}),yye=(t,e)=>{let{isObjectType:n,isExternalObject:o,actionID:r,context:i,isExternalCase:s,casetypeID:a}=t,c=d.getDefaultQualifiedName(d.VIEW_NAMES.OBJECT_CREATE_VIEW);if(e||n&&LR(i)){let l=o&&r===c?Kt.REFRESH_EXTERNAL_OBJECT:Kt.REFRESH_CASE_DATA,u=G.shouldUseUnifiedHandling();return o&&r===c&&u&&(l=Kt.REFRESH_EXTERNAL_CASE_DATA),Xb(l,t)}return Xb(s&&a&&r===c?Kt.REFRESH_EXTERNAL_CASE_DATA:Kt.REFRESH_ASSIGNMENT_DATA,t)},Sye=(t,e,n,o,r)=>{r={...r,calculations:{fields:e,whens:n}};let{routeKey:i,restAPI:s}=Xb(o?Kt.RECALCULATE_CASE_DATA:Kt.RECALCULATE_ASSIGNMENT_DATA,t),a=Kt.RECALCULATE;return{routeKey:i,restAPI:s,requestBody:r,requestType:a}},Eye=(t,e)=>{let{caseWideAction:n,caseViewAction:o,fieldsWithDeclarativeTargets:r,fieldsWithWhen:i,isViewsWithWhen:s,interestPage:a,options:c,isMultiRecordData:l,editType:u,isLocalAction:p,interestPageActionID:m,context:f}=t,{optionalPayload:g}=c;g&&(e.content={...g});let h,E={},C={...e},I=Kt.REFRESH;return o||l&&u===d.ACTION?(h=c1(u,p),l&&u===d.ACTION&&(C.interestPageActionID=m,T.isInfinityRuntime()&&(C.actionIdArrayToBeProcessed=l1(f))),E=F(h,t),C={...C,interestPage:a}):s||c.refreshFor?{routeKey:h,restAPI:E}=yye(t,n):(r.length>0||i.length>0)&&({routeKey:h,restAPI:E,requestBody:C,requestType:I}=Sye(t,r,i,n,C)),{routeKey:h,restAPI:E,requestBody:C,requestType:I}},Aye=(t,e,n,o,r)=>{let i=ft(t,e);if(!i||i.dataRetrievalType!=="copy")return;let s=y.getIn(n,`content.content.${t}`);if(!s||typeof s!="object")return;(o?Object.keys(s).filter(c=>c!==o):Object.keys(s)).length>0&&r.push(t)},Cye=(t,e)=>t.pipe(te(Kt.REFRESH_DATA,zc),x(n=>{let o=n.payload;return o.actionType=n.type,o}),Ai(n=>!sd(n?.options?.actionMgrID)),V(n=>{let{context:o,contextData:r,options:i,isObjectType:s}=n,{propertyName:a="",classID:c="",isObjectWideAction:l,skipPayloadGeneration:u}=i,p=u?{content:{}}:Mt(o,{skipUUID:!1,isObjectWideAction:l}),m=[],f=[],g=!1;T.getFeatureMap().granularUIRefresh?({fieldsWithDeclarativeTargets:m=[],whens:f=[]}=rV(o),g=f.some(De=>De.type===Khe)):g=!0;let E=f.filter(De=>De.type===Jhe),C=y.getPropertyName(a),I=C?C.split("."):[],_=I.pop(),P=I.join("."),N=[];P&&Aye(P,c,p,_,N),n.serverPrecedenceFields=N;let z={...p.content,contextData:r},H=dd(o);y.isEmpty(H)||(z=ol(H,z));let ne=Eye({...n,fieldsWithDeclarativeTargets:m,fieldsWithWhen:E,isViewsWithWhen:g},z);vt.registerBlockingAction(o).catch(()=>{});let{routeKey:j,restAPI:oe,requestBody:Ae,requestType:he}=ne;n={...n,requestType:he},n.requestType=he;let{reqType:Oe,restApi:He}=oe,_e={...dye(s,e,o)};_e&&!_e.etag&&n.isMultiRecordData&&n.editType===d.ACTION&&(_e.etag=y.getETag(n.context));let Xe={reqHeaders:_e,context:o,method:Oe,body:Ae,url:XF(n,He),...j&&{mcpAction:{actionName:j,queryPayload:eV(n)}}};return Y(hye(Xe,n)).pipe(x(De=>{let Et=nV(De?.data,i?.classID,s);return i?.resetForm&&be.removeContextTreeNode(o),{response:{...Et},actionConfig:n,actionMgrID:n.options.actionMgrID,headers:ke(De.headers)}}),fe(": Error occurred during fetch call at refreshData Epic : ",n.context,n?.options?.actionMgrID))}),V(async n=>{if(n&&n.type===ve)return vt.deRegisterBlockingAction(n.payload?.context).catch(()=>{}),n.payload?.err?.code==="ERR_CANCELED"?(m1(n.payload?.actionMgrID),[]):(w.publish(d.ON_REFRESH_ERROR,{context:n.payload?.context}),m1(n.payload?.actionMgrID),pe(n));let{actionConfig:o,response:r,actionMgrID:i}=n,{context:s}=o,{payload:a,mergeOptions:c}=await u1(r,o),l=i?nT[i]:void 0,u={seq:cye(i),actionMgrID:i,context:s,mergePayload:a,mergeOptions:c,preRequestSnapshot:Qhe(i),preRequestData:Xhe(i),actionConfig:o,isReconciliation:g1.has(i)};return l?(eT[l]??(eT[l]=[])).push(u):await lye(u),m1(i),[]}));H9(t=>{DG(t).catch(e=>{console.error("Failed to merge MCP tool result into the store",e)})});var Iye=[Cye],FG=Iye;var _ye=t=>t.pipe(te(RE),V(async e=>{let{context:n}=e.payload,o={},r={},i=Object.keys(e.payload.datapages).map(a=>{let c=e.payload.datapages[a];if(c.mode===d.READONLY&&c?.refreshStrategy){let{timeoutSecs:l="",type:u=""}=c?.refreshStrategy||{},p=oi()[c.name];if(p&&a in p){let m=p[a],{loadTime:f}=m;if(!fn.isTimeElapsed(f,l,u))return}}return fn.getData(c.name,{dataViewParameters:c.dataViewParameters},n).then(l=>{let u=c.mode===d.READONLY?r:o,p=O.getDefaultQualifiedName("pxResults");u[c.name]?u[c.name][a]={[p]:l.data.data,parameters:c.dataViewParameters,loadTime:l.data?.fetchDateTime}:u[c.name]={[a]:{[p]:l.data.data,parameters:c.dataViewParameters,loadTime:l.data?.fetchDateTime}}}).catch(()=>{})});await Promise.allSettled(i);let s=[];return Object.keys(o).length&&s.push(Ne({context:n,data:o})),Object.keys(r).length&&s.push(PM({data:r,context:n})),v(s),[]})),bye=[_ye],VG=bye;var Tye=t=>typeof t=="object"&&t!==null&&"ID"in t&&typeof t.ID=="string"&&"state"in t&&typeof t.state=="string",h1=class t{static EDIT_OPEN="edit_open";static EDIT_SAVE="edit_save";static EDIT_SUBMIT="edit_submit";static EDIT_CANCEL="edit_cancel";static VIEW_OPEN="view_open";static VIEW_CLOSE="view_close";static caseCollabSubIds={};static openCaseViewByCaseId=new Set;static collabConfig;static EDITING_STATE="editing";static PAGE_CATEGORY=d.PAGE;static WARNING_TYPE="warning";static INFO_TYPE="info";static ERROR_TYPE="error";static LOCALE_CATEGORY="Messages";static STALE_DATA_TYPE="error";static STALE_ASSIGNMENT_TYPE="error";static EDIT_WARNING_MESSAGE="Changes may be lost: Others are editing – only the first save or submit is kept.";static STALE_DATA_MESSAGE="The case was updated by another user. Please refresh to view the latest information.";static STALE_ASSIGNMENT_MESSAGE="This assignment is no longer available because it was completed or updated by another user.";static NO_EDITORS_INFO_MESSAGE="Changes can now be saved: No more editors active.";static NO_EDITORS_INFO_SUBTYPE="collaboration-no-editors";static caseContextById={};static collaborationBannerByContext={};static assignmentIdByContext={};static DEPARTURE_STATES=new Set(["closed"]);static ACTION_STATE_MESSAGES={saved:"Changes may be lost: Other user has saved this assignment.",submitted:"Changes may be lost: Other user has submitted this assignment."};static ASSIGNMENT_AWARE_STATES=new Set(["saved","submitted","stage_changed"]);static INTERACTION_STATE_BY_EVENT={edit_open:"editing",edit_save:"saved",edit_submit:"submitted",edit_cancel:"viewing",view_open:"viewing",view_close:"closed"};static normalizeInteractionState(e){return this.INTERACTION_STATE_BY_EVENT[e]??e}static getLocalizedMessage(e){return zn().getLocaleValue(e,this.LOCALE_CATEGORY)}static assignmentContextsByCaseId={};static caseIdByAssignmentContext={};static editorStateByCaseId={};static localInteractionStateByCaseId={};static respondedToViewOpenByCaseId={};static pendingActionStateByCaseId={};static suppressEditingWarningOnNextAssignmentLoadByCaseId={};static pendingSaveCaseIds=new Set;static cancelTransitionCaseIds=new Set;static getCollaborationState(e){let n=Object.entries(e?.message??{})[0];if(!n)return null;let[o,r]=n;if(typeof r=="string")return{userID:o,state:this.normalizeInteractionState(r),eventType:r};if(typeof r!="object"||r===null||!("state"in r)||typeof r.state!="string")return null;let i=this.normalizeInteractionState(r.state),s="assignmentId"in r&&typeof r.assignmentId=="string"&&r.assignmentId||("assignmentID"in r&&typeof r.assignmentID=="string"?r.assignmentID:void 0);return{userID:o,state:i,eventType:r.state,assignmentId:s}}static init(e){e&&(this.collabConfig=e)}static isCollaborationEnabled(){return!!(t.collabConfig?.appEnabled&&t.collabConfig?.portalEnabled)}static isLaunchpadRuntime(){return!T.isInfinityRuntime()}static dispatchCollaboratorAction=(e,n,o,r,i)=>{v({type:"LIST_ACTION",payload:{instruction:e,context:n,referenceList:r,listIndex:o,content:i,skipDirtyValidation:!0,skipRefresh:!0}})};static handleCaseCollaboratorsUpdate(e,n,o){let r=this.getCollaborationState(o);if(!r)return;let{userID:i,state:s,eventType:a,assignmentId:c}=r;if(i===T.getOperatorIdentifier())return;this.respondToCollaboratorViewOpen(e,i,a,s);let l=this.DEPARTURE_STATES.has(s),u=this.editorStateByCaseId[e]??(this.editorStateByCaseId[e]={});l?delete u[i]:u[i]=s;let p={ID:i,state:s},m=[n,this.caseContextById[e],...this.getAssignmentContextsForCase(e)].filter(g=>!!g);new Set([...m,...m.map(g=>Ye(g))]).forEach(g=>{let h=ie(d.CASE_INFO.CASE_INFO_COLLABORATORS,"",g)||[],E=h.findIndex(C=>C.ID===i);E!==-1?l?this.dispatchCollaboratorAction("DELETE",g,E,d.CASE_INFO.CASE_INFO_COLLABORATORS,null):this.dispatchCollaboratorAction("REPLACE",g,null,`${d.CASE_INFO.CASE_INFO_COLLABORATORS}[${E}]`,p):l||this.dispatchCollaboratorAction("INSERT",g,h.length,d.CASE_INFO.CASE_INFO_COLLABORATORS,p)}),this.isLaunchpadRuntime()&&this.updateLaunchpadCollaborationState(e,s,c)}static updateLaunchpadCollaborationState(e,n,o){let r=this.getAssignmentContextsForCase(e);this.ASSIGNMENT_AWARE_STATES.has(n)&&((n==="saved"||n==="submitted")&&(this.pendingActionStateByCaseId[e]={state:n,assignmentId:o}),r.forEach(a=>this.updateStaleState(a,n,o)));let i=this.getRemoteEditorCount(e),s=this.pendingActionStateByCaseId[e];r.forEach(a=>{this.refreshCollaborationBanner(a,i,s)})}static getCaseIdFromContext(e){let n=ie(d.CASE_INFO.CASE_INFO_ID,"",e);return typeof n=="string"&&n?n:void 0}static resolveCaseIdForAssignmentContext(e,n){if(n){let o=this.getCaseIdFromContext(n);if(o)return o;let r=this.caseIdByAssignmentContext[n];if(r)return r}return e}static getAssignmentContextsForCase(e){let n=this.assignmentContextsByCaseId[e]??[];if(n.length>0)return n;let o=[];return Object.entries(this.caseIdByAssignmentContext).forEach(([r,i])=>{(i===e||this.getCaseIdFromContext(r)===e)&&o.push(r)}),o}static getMessageTypeForBanner(e){return e.endsWith("-error")||e==="stale-assignment"?this.ERROR_TYPE:e==="stale-data"?this.STALE_DATA_TYPE:e}static clearCurrentBanner(e,n){ht({category:this.PAGE_CATEGORY,context:e,type:this.getMessageTypeForBanner(n)})}static getStaleBannerDetails(e){return e?{bannerType:"stale-assignment",messageType:this.STALE_ASSIGNMENT_TYPE,message:this.getLocalizedMessage(this.STALE_ASSIGNMENT_MESSAGE)}:{bannerType:"stale-data",messageType:this.STALE_DATA_TYPE,message:this.getLocalizedMessage(this.STALE_DATA_MESSAGE)}}static isLocalActionContext(e){return e.includes(d.MODAL)||ie(d.CASE_INFO.IS_LOCAL_ACTION,"",e)===!0}static isAssignmentContext(e){return e.includes(d.WORKAREA)||e.includes(d.MODAL)}static restoreCollaboratorsFromContext(e,n){if(this.editorStateByCaseId[e])return;let o=[n,Ye(n)],r;for(let a of o)if(r=ie(d.CASE_INFO.CASE_INFO_COLLABORATORS,"",a),Array.isArray(r))break;if(!Array.isArray(r))return;let i=T.getOperatorIdentifier(),s={};r.forEach(a=>{if(!Tye(a)||a.ID===i)return;let c=this.normalizeInteractionState(a.state);this.DEPARTURE_STATES.has(c)?delete s[a.ID]:s[a.ID]=c}),this.editorStateByCaseId[e]=s}static respondToCollaboratorViewOpen(e,n,o,r){if(this.DEPARTURE_STATES.has(r)){this.respondedToViewOpenByCaseId[e]?.delete(n);return}if(o!==this.VIEW_OPEN&&r!=="viewing")return;let i=this.respondedToViewOpenByCaseId[e]??new Set;if(this.respondedToViewOpenByCaseId[e]=i,i.has(n))return;let s=this.localInteractionStateByCaseId[e];if(!s)return;i.add(n);let a=s===this.EDITING_STATE?this.EDIT_OPEN:this.VIEW_OPEN;this.publishCaseEvent(a,e)}static updateStaleState(e,n,o){if(!this.isLaunchpadRuntime())return;let r=o?this.assignmentIdByContext[e]===o:!1,i=!this.isLocalActionContext(e)&&r&&(n==="submitted"||n==="stage_changed");if(hd(e)&&!i)return;let{bannerType:s,messageType:a,message:c}=this.getStaleBannerDetails(i),l=this.collaborationBannerByContext[e];l!==s&&(l&&this.clearCurrentBanner(e,l),Hr({category:this.PAGE_CATEGORY,context:e,messages:[{type:a,message:c}]}),this.collaborationBannerByContext[e]=s,i?(eP(e,!0),this.hideAssignmentActions(e)):eP(e,!1))}static hideAssignmentActions(e){if(!this.isLaunchpadRuntime()||!J(e))return;let n=ie(d.CASE_INFO.ACTION_BUTTONS,"",e),o=Array.isArray(n?.main)?n.main:[],r=Array.isArray(n?.secondary)?n.secondary:[],i=s=>{if(!s)return!1;let a=typeof s.actionID=="string"?s.actionID.toLowerCase():"",c=typeof s.jsAction=="string"?s.jsAction.toLowerCase():"";return a==="cancel"||c==="cancelassignment"};v({type:Pt,payload:{context:e,reference:d.CASE_INFO.ACTION_BUTTONS,value:{main:o.filter(s=>i(s)),secondary:r.filter(s=>i(s))}}})}static isAssignmentStale(e){return hd(e)}static isContextStale(e){return GA(e)}static getMatchingPendingAction(e,n){let o=typeof n=="string"?{state:n}:n,r=this.assignmentIdByContext[e];if(o&&(!o.assignmentId||o.assignmentId===r))return o}static refreshCollaborationBanner(e,n,o){if(!this.isLaunchpadRuntime())return;let r=this.getMatchingPendingAction(e,o);if(r){let i=this.collaborationBannerByContext[e];if(i==="stale-data"||i==="stale-assignment")return;let s=r.state==="submitted"?"submitted-error":"saved-error";if(this.collaborationBannerByContext[e]!==s){let a=this.ACTION_STATE_MESSAGES[r.state];a&&this.showActionBanner(e,this.getLocalizedMessage(a),r.state)}return}this.updateCollaborationBanner(e,n)}static getRemoteEditorCount(e){let n=this.editorStateByCaseId[e]??{};return Object.values(n).filter(o=>o===this.EDITING_STATE).length}static clearPendingActionStates(e){delete this.pendingActionStateByCaseId[e]}static isCaseStillLoaded(e){let n=this.caseContextById[e];return n?ie(d.CASE_INFO.CASE_INFO_ID,"",n)===e:!1}static updateCollaborationBanner(e,n){let o=this.collaborationBannerByContext[e];this.isAssignmentStale(e)||o==="stale-data"||(n>0?((o==="saved-error"||o==="submitted-error")&&ht({category:this.PAGE_CATEGORY,context:e,type:this.ERROR_TYPE}),o===this.INFO_TYPE&&ht({category:this.PAGE_CATEGORY,context:e,type:this.INFO_TYPE}),Hr({category:this.PAGE_CATEGORY,context:e,messages:[{type:this.WARNING_TYPE,message:this.getLocalizedMessage(this.EDIT_WARNING_MESSAGE)}]}),this.collaborationBannerByContext[e]=this.WARNING_TYPE):(o===this.WARNING_TYPE||o==="saved-error"||o==="submitted-error")&&(ht({category:this.PAGE_CATEGORY,context:e,type:o===this.WARNING_TYPE?this.WARNING_TYPE:this.ERROR_TYPE}),Hr({category:this.PAGE_CATEGORY,context:e,messages:[{type:this.INFO_TYPE,message:this.getLocalizedMessage(this.NO_EDITORS_INFO_MESSAGE),subType:this.NO_EDITORS_INFO_SUBTYPE,dismissible:!0,context:e}]}),this.collaborationBannerByContext[e]=this.INFO_TYPE))}static clearCollaborationBanner(e){let n=this.collaborationBannerByContext[e];n&&(this.clearCurrentBanner(e,n),MV(e),delete this.collaborationBannerByContext[e])}static showActionBanner(e,n,o){let r=this.collaborationBannerByContext[e];r&&this.clearCurrentBanner(e,r),Hr({category:this.PAGE_CATEGORY,context:e,messages:[{type:this.ERROR_TYPE,message:n}]}),this.collaborationBannerByContext[e]=o==="submitted"?"submitted-error":"saved-error"}static handleLocalSubmit=e=>{let n=e?.caseID;if(!n)return;this.pendingSaveCaseIds.add(n);let o=e.assignmentId||(e.context?ie(d.CASE_INFO.ASSIGNMENT_ID,"",e.context):void 0),r=e.isModalAction===!0&&e.isModalLaunchedFromPrimaryValue===!0,i=e.isLocalAction===!0||r;i||(this.suppressEditingWarningOnNextAssignmentLoadByCaseId[n]=!0),this.publishCaseEvent(i?this.EDIT_SAVE:this.EDIT_SUBMIT,n,o)};static handleLocalSave=e=>{let n=e?.caseID||(e?.context?ie(d.CASE_INFO.CASE_INFO_ID,"",e.context):"");if(!n)return;this.pendingSaveCaseIds.add(n);let o=e.assignmentID;this.publishCaseEvent(this.EDIT_SAVE,n,o)};static handleLocalCancel=e=>{e?.caseID&&(this.localInteractionStateByCaseId[e.caseID]="viewing",this.pendingSaveCaseIds.add(e.caseID),this.clearPendingActionStates(e.caseID),this.publishCancelTransition(e.caseID))};static publishCancelTransition(e){if(this.cancelTransitionCaseIds.has(e)){this.cancelTransitionCaseIds.delete(e);return}this.cancelTransitionCaseIds.add(e),setTimeout(()=>this.cancelTransitionCaseIds.delete(e),0),this.publishCaseEvent(this.EDIT_CANCEL,e)}static handleCaseEditClose=e=>{e&&(this.localInteractionStateByCaseId[e]="viewing",this.pendingSaveCaseIds.add(e),this.publishCancelTransition(e))};static handleAssignmentLoad=e=>{let{caseKey:n,actionInContext:o}=e??{};if(!o||!this.isAssignmentContext(o))return;let r=this.resolveCaseIdForAssignmentContext(n,o);if(!r)return;this.caseCollabSubIds[r]||this.subscribeToCollaborators(r,o),this.pendingSaveCaseIds.delete(r),this.restoreCollaboratorsFromContext(r,o);let i=this.getRemoteEditorCount(r);this.suppressEditingWarningOnNextAssignmentLoadByCaseId[r]&&(delete this.suppressEditingWarningOnNextAssignmentLoadByCaseId[r],i=0);let s=this.assignmentContextsByCaseId[r]??(this.assignmentContextsByCaseId[r]=[]);s.includes(o)||s.push(o),this.caseIdByAssignmentContext[o]=r;let a=e.assignmentID;a&&(this.assignmentIdByContext[o]=a),this.clearCollaborationBanner(o),this.refreshCollaborationBanner(o,i,this.pendingActionStateByCaseId[r])};static closeAssignmentContext(e){this.clearCollaborationBanner(e);let n=this.caseIdByAssignmentContext[e];if(delete this.caseIdByAssignmentContext[e],delete this.assignmentIdByContext[e],!n)return;let o=this.assignmentContextsByCaseId[n];if(!o)return;let r=o.indexOf(e);r!==-1&&o.splice(r,1),o.length===0&&delete this.assignmentContextsByCaseId[n]}static handleAssignmentUnload=e=>{let n=e?.actionInContext;n&&this.closeAssignmentContext(n)};static subscribeToCollaborators(e,n){let o=It.subscribe({matcher:"CASE_COLLABORATOR",criteria:{caseId:e}},r=>this.handleCaseCollaboratorsUpdate(e,n,r));this.caseCollabSubIds[e]=o,this.caseContextById[e]=n}static unsubscribeToCollaborators(e){It.unsubscribe(this.caseCollabSubIds[e]),delete this.caseCollabSubIds[e];let n=this.caseContextById[e];n&&(this.clearCollaborationBanner(n),delete this.caseContextById[e]);let o=this.assignmentContextsByCaseId[e];o&&o.slice().forEach(r=>this.closeAssignmentContext(r)),delete this.editorStateByCaseId[e],delete this.localInteractionStateByCaseId[e],delete this.respondedToViewOpenByCaseId[e],delete this.pendingActionStateByCaseId[e],this.pendingSaveCaseIds.delete(e),this.cancelTransitionCaseIds.delete(e),delete this.suppressEditingWarningOnNextAssignmentLoadByCaseId[e]}static publishCaseEvent(e,n,o){It.publishMessage({filter:{matcher:"CASE_COLLABORATOR",criteria:{caseId:n}},message:o?{state:e,assignmentId:o}:e})}static handleCaseLoadEvent(e){let{caseId:n,context:o}=e,r=!this.openCaseViewByCaseId.has(n);this.openCaseViewByCaseId.add(n);let i=this.caseCollabSubIds[n];r&&i&&It.unsubscribe(i),(!i||r)&&this.subscribeToCollaborators(n,o),this.restoreCollaboratorsFromContext(n,o),this.localInteractionStateByCaseId[n]??="viewing",this.publishCaseEvent(this.VIEW_OPEN,n)}static shouldKeepCaseSubscriptionOnUnload(e){return this.pendingSaveCaseIds.has(e)||(this.assignmentContextsByCaseId[e]??[]).length>0||this.isCaseStillLoaded(e)}static handleCaseUnloadEvent(e){let{caseId:n}=e;this.openCaseViewByCaseId.delete(n),!this.shouldKeepCaseSubscriptionOnUnload(n)&&this.caseCollabSubIds[n]&&(this.publishCaseEvent(this.VIEW_CLOSE,n),delete this.localInteractionStateByCaseId[n],this.unsubscribeToCollaborators(n))}static handleCaseClosedEvent(e){let{caseId:n}=e;this.openCaseViewByCaseId.delete(n),n&&this.caseCollabSubIds[n]&&(this.publishCaseEvent(this.VIEW_CLOSE,n),delete this.localInteractionStateByCaseId[n],this.unsubscribeToCollaborators(n))}static getCaseEventCallback(e,n){switch(e){case d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_EDIT_OPEN:return o=>{this.cancelTransitionCaseIds.delete(o),this.localInteractionStateByCaseId[o]=this.EDITING_STATE,this.publishCaseEvent(n,o)};case d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_LOAD:return o=>this.handleCaseLoadEvent(o);case d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_UNLOAD:return o=>this.handleCaseUnloadEvent(o);case d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_CLOSED:return o=>this.handleCaseClosedEvent(o);case d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_EDIT_CLOSE:return o=>this.handleCaseEditClose(o);default:throw new Error(`Unhandled eventKey: ${e}`)}}static subscribeToEvent(e,n,o){let r=this.getCaseEventCallback(e,n);w.subscribe(e,r,o)}static unsubscribeFromEvent(e,n){w.unsubscribe(e,n)}static subscribeToCaseEvents(){(this.isCollaborationEnabled()||this.isLaunchpadRuntime())&&(this.subscribeToEvent(d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_LOAD,this.VIEW_OPEN,"case_view_open"),this.subscribeToEvent(d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_UNLOAD,this.VIEW_CLOSE,"case_view_close"),this.subscribeToEvent(d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_CLOSED,this.VIEW_CLOSE,"case_view_closed"),this.subscribeToEvent(d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_EDIT_OPEN,this.EDIT_OPEN,"case_edit_open"),this.subscribeToEvent(d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_EDIT_CLOSE,this.EDIT_CANCEL,"case_edit_close"),w.subscribe(d.PUB_SUB_EVENTS.CASE_EVENTS.ASSIGNMENT_SUBMISSION,this.handleLocalSubmit,"case_collab_submit"),w.subscribe(d.PUB_SUB_EVENTS.CASE_EVENTS.SAVE_ASSIGNMENT_COMPLETE,this.handleLocalSave,"case_collab_save"),w.subscribe(d.PUB_SUB_EVENTS.EVENT_CANCEL,this.handleLocalCancel,"case_collab_cancel"),w.subscribe(d.PUB_SUB_EVENTS.ASSIGNMENT_EVENTS.ASSIGNMENT_LOAD,this.handleAssignmentLoad,"case_collab_assignment_load"),w.subscribe(d.PUB_SUB_EVENTS.ASSIGNMENT_EVENTS.ASSIGNMENT_UNLOAD,this.handleAssignmentUnload,"case_collab_assignment_unload"))}static unsubscribeToCaseEvents(){(this.isCollaborationEnabled()||this.isLaunchpadRuntime())&&(this.unsubscribeFromEvent(d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_LOAD,"case_view_open"),this.unsubscribeFromEvent(d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_UNLOAD,"case_view_close"),this.unsubscribeFromEvent(d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_CLOSED,"case_view_closed"),this.unsubscribeFromEvent(d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_EDIT_OPEN,"case_edit_open"),this.unsubscribeFromEvent(d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_EDIT_CLOSE,"case_edit_close"),w.unsubscribe(d.PUB_SUB_EVENTS.CASE_EVENTS.ASSIGNMENT_SUBMISSION,"case_collab_submit"),w.unsubscribe(d.PUB_SUB_EVENTS.CASE_EVENTS.SAVE_ASSIGNMENT_COMPLETE,"case_collab_save"),w.unsubscribe(d.PUB_SUB_EVENTS.EVENT_CANCEL,"case_collab_cancel"),w.unsubscribe(d.PUB_SUB_EVENTS.ASSIGNMENT_EVENTS.ASSIGNMENT_LOAD,"case_collab_assignment_load"),w.unsubscribe(d.PUB_SUB_EVENTS.ASSIGNMENT_EVENTS.ASSIGNMENT_UNLOAD,"case_collab_assignment_unload"))}},qs=h1;var y1=class t{broadcastChannel;callback;isReverseCoexistenceCase;broadcastEventToIframe;isDirtyDialogActive;onCreateCallback;openAssignmentParams;static OPEN_ASSIGNMENT_ACTION="openAssignment";static DIRTY_POPUP_C11N="displayDirtyPopupFromConstellation";static HANDLE_INFINITY_DISCARD="handleDiscardInInfinity";static OPEN_ASSIGNMENT_MODAL="openAssignmentInModal";static DISPLAY_DIRTY_POPUP="displayDirtyPopup";static LOAD_PREVIEW="loadPreview";static UPDATE_COEXISTENCE_DRILLDOWN_CASE="updateCoexistenceDrilldownCase";static OPEN_WORK_ITEM="openWorkItem";static OPEN_WORK_BY_HANDLE="openWorkByHandle";static GET_NEXT_WORK_ACTION="getNextWork";static CLOSE_CONTAINER_ACTION="closeContainer";static CANCEL_CASE="cancelCase";static CREATE_WORK="createWork";static OPEN_RULE="openRule";static OPEN_RULE_BY_CLASS_AND_NAME="openRuleByClassAndName";static OPEN_LANDING_PAGE="openLandingPage";constructor(){this.broadcastChannel=null,this.callback=null,this.isReverseCoexistenceCase=!1,this.broadcastEventToIframe=!1,this.isDirtyDialogActive=!1,this.onCreateCallback=null,this.openAssignmentParams=null}getUniqueId=()=>{let e=Reflect.get(globalThis,"uniqueId");return typeof e=="number"?e:void 0};setUniqueId=()=>{Reflect.set(globalThis,"uniqueId",new Date().getTime())};initBroadcastChannel=()=>{typeof globalThis.BroadcastChannel=="function"&&(this.setUniqueId(),this.broadcastChannel=new BroadcastChannel("coexistence"),this.broadcastChannel.onmessage=e=>{let{uniqueId:n}=e.data;if(n===this.getUniqueId())switch(e.data.action){case t.DISPLAY_DIRTY_POPUP:this.displayDirtyPopup(e);break;case t.LOAD_PREVIEW:{this.loadPreview(e);break}case t.UPDATE_COEXISTENCE_DRILLDOWN_CASE:{this.updateCoexistenceDrilldownCase(e);break}case t.OPEN_ASSIGNMENT_ACTION:{this.openAssignment(e);break}case t.GET_NEXT_WORK_ACTION:{this.getNextWork(e);break}case t.OPEN_WORK_BY_HANDLE:{this.openWorkByHandle(e);break}case t.CLOSE_CONTAINER_ACTION:{this.closeContainer(e);break}case t.CANCEL_CASE:{this.handleCaseCancel();break}case t.CREATE_WORK:{this.createWork(e);break}case t.OPEN_RULE:{this.openRule(e);break}case t.OPEN_RULE_BY_CLASS_AND_NAME:{this.openRuleByClassAndName(e);break}case t.OPEN_LANDING_PAGE:{this.openLandingPage(e);break}default:break}})};displayDirtyPopup=e=>{if(this.broadcastEventToIframe=e.data.fromInfinity??!1,!this.isDirtyDialogActive)if(e.data.isFormDirty){if(this.shouldBypassDirtyPopupForStaleAssignment()){this.callback?.call(this);return}w.publish(d.PUB_SUB_EVENTS.EVENT_SHOW_CANCEL_ALERT,{isModalAction:!0,hideDelete:!0}),this.isDirtyDialogActive=!0}else this.callback?.call(this)};shouldBypassDirtyPopupForStaleAssignment=()=>{let e=`${A.APP.APP}${d.FORWARD_SLASH_STRING}${A.PRIMARY}`,n=Qt(e),o=n?se(n):"";if(!o)return!1;let r=de(o);return[o,r].filter(s=>typeof s=="string"&&s.length>0).some(s=>qs.isAssignmentStale(s))};handleCaseCancel=()=>{let e=Ke(A.APP.APP),n=e[e.length-1],o=se(n),r=J(o)?.caseInfo?.ID;if(r&&o&&ct({}).getPConnect().getActionsApi().getDescendants(r,o),Wn(o)){let i=cc(o);i&&ct({}).getPConnect().getActionsApi().getDescendants(r,i)}};loadPreview=e=>{let{pyID:n,caseClassName:o,uniqueId:r}=e.data;r===this.getUniqueId()&&ct({}).getPConnect().getActionsApi().showCasePreview(n,{caseClassName:o})};navigateToDefaultPage=()=>{let e=O.getDefaultQualifiedName("Data-Portal"),n=O.getDefaultQualifiedName("pyHome"),o=ct({isRoot:!0}),r=PCore.getStore()?.getState().data.app?.pyPortal?.pyPrimaryNavPages,i;Array.isArray(r)&&r[0]&&(i=r[0]);let s=i?.pyClassName||e,a=i?.pyRuleName||n;o.getPConnect().getActionsApi().showPage(a,s)};closeContainer=e=>{let{uniqueId:n}=e.data;n===this.getUniqueId()&&this.navigateToDefaultPage()};updateCoexistenceDrilldownCase=e=>{let{key:n,caseClassName:o,actionApi:r,caseLabel:i,uniqueId:s}=e.data;if(s!==this.getUniqueId())return;let a=r;r===t.OPEN_WORK_ITEM&&(a=t.OPEN_WORK_BY_HANDLE),Se.updateSemanticURLAndDocumentTitle({key:n,caseClassName:o,actionName:a,name:i}),ct({}).getPConnect().getActionsApi().updateRecents(o,n.substring(n.lastIndexOf(" ")+1),i,n)};openAssignment=e=>{let{pzInsKey:n,caseClassName:o,uniqueId:r}=e.data;r===this.getUniqueId()&&(this.onCreateCallback&&this.openAssignmentParams&&(n&&this.openAssignmentParams[0]&&this.openAssignmentParams[0].payload&&this.openAssignmentParams[0].payload.data?this.openAssignmentParams[0].payload.data.caseInfo.assignments[0].ID=n:this.openAssignmentParams[0]&&this.openAssignmentParams[0].payload&&this.openAssignmentParams[0].payload.data&&(this.openAssignmentParams[0].payload.data.caseInfo.content.coexistenceAction="openWorkByHandle"),n&&o&&ct({}).getPConnect().getActionsApi().openAssignment(n,o,{containerName:A.PRIMARY,context:A.APP.APP})),this.onCreateCallback=null,this.openAssignmentParams=null)};getNextWork=e=>{let{uniqueId:n}=e.data;if(n===this.getUniqueId()){let o=`${A.APP.APP}${d.FORWARD_SLASH_STRING}${A.PRIMARY}`;ct({meta:{},options:{context:Qt(o)}}).getPConnect().getActionsApi().getNextWork()}};openWorkByHandle=e=>{let{key:n,caseClassName:o,uniqueId:r}=e.data;if(r===this.getUniqueId()){let i=`${A.APP.APP}${d.FORWARD_SLASH_STRING}${A.PRIMARY}`;ct({meta:{},options:{context:Qt(i)}}).getPConnect().getActionsApi().openWorkByHandle(n,o)}};createWork=e=>{let{strClassName:n,uniqueId:o,strFlowParams:r,caseInitProperties:i}=e.data;if(o===this.getUniqueId()){let s=`${A.APP.APP}${d.FORWARD_SLASH_STRING}${A.PRIMARY}`,a=ct({meta:{},options:{context:Qt(s)}}),c=i+r,l=new URLSearchParams(c.slice(1)),u=this.setStartingFields(l);a.getPConnect().getActionsApi().createWork(n,{startingFields:u})}};buildRuleInsKey=(e,n)=>!e||!n?null:`${String(e).toUpperCase()} ${String(n).split("!").join(" ")}`;showRuleByInsKey=e=>{let n=`${A.APP.APP}${d.FORWARD_SLASH_STRING}${A.PRIMARY}`;ct({meta:{},options:{context:Qt(n)}}).getPConnect().getActionsApi().showData(O.getDefaultQualifiedName("pyDetails"),O.getDefaultQualifiedName("D_pzRuleLookup"),{pzInsKey:e})};openRule=e=>{let{key:n,uniqueId:o}=e.data;o===this.getUniqueId()&&n&&this.showRuleByInsKey(n)};openRuleByClassAndName=e=>{let{objClass:n,insName:o,uniqueId:r}=e.data;if(r!==this.getUniqueId())return;let i=this.buildRuleInsKey(n,o);i&&this.showRuleByInsKey(i)};openLandingPage=e=>{let{className:n,harnessName:o,label:r,levelC:i,readOnly:s,model:a,uniqueId:c}=e.data;if(c!==this.getUniqueId()||!n||!o)return;let l=`${A.APP.APP}${d.FORWARD_SLASH_STRING}${A.PRIMARY}`,p=ct({meta:{},options:{context:Qt(l)}}).getPConnect().getActionsApi();if(n!=="Data-Portal"){p.showCoexistenceLandingPage({className:n,harnessName:o,label:r,levelC:i,readOnly:s,model:a});return}p.showPage(o,n)};setStartingFields=e=>{let n={};return e.forEach((o,r)=>{r&&(n[r]=o)}),n};destroyBroadcastChannel=()=>{this.getBroadCastChannel()?.close(),this.broadcastChannel=null};subscribeEvents=()=>{this.setReverseCoexistenceCaseLoaded(!0),w.subscribe(A.PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.HANDLE_DISCARD,this.handleDiscard),w.subscribe(A.PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.CHECK_IS_FORM_DIRTY,this.postDirtyPopupMessage)};unsubscribeEvents=()=>{w.unsubscribeAllWithEventType(A.PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.CHECK_IS_FORM_DIRTY),w.unsubscribeAllWithEventType(A.PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.HANDLE_DISCARD),this.setReverseCoexistenceCaseLoaded(!1),this.isDirtyDialogActive=!1};init=(e=!0)=>{this.broadcastChannel===null&&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:t.DIRTY_POPUP_C11N,uniqueId:this.getUniqueId()}),this.setCallBackFunction(e)};handleDiscard=()=>{this.broadcastEventToIframe?(this.broadcastChannel?.postMessage({action:t.HANDLE_INFINITY_DISCARD,uniqueId:this.getUniqueId()}),this.broadcastEventToIframe=!1):(this.callback?.call(this),this.callback=null),this.isDirtyDialogActive=!1};postCreateCaseMessage=(e,n,o)=>{this.broadcastChannel===null&&this.init(!1),this.broadcastChannel?.postMessage({action:t.OPEN_ASSIGNMENT_MODAL,uniqueId:this.getUniqueId(),key:e}),this.broadcastEventToIframe=!1,this.onCreateCallback=n,this.openAssignmentParams=o}},Yp=new y1;var Bo={NEXT_ASSIGNMENT_ID:"data.nextAssignmentInfo.ID",FIRST_ASSIGNMENT_ID:"data.caseInfo.assignments.0.ID",NEXT_ASSIGNMENT_INFO:"nextAssignmentInfo",NEXT_ASSIGNMENT_INFO_CONTEXT:"nextAssignmentInfo.context"},S1=t=>{let{containerName:e,isInCreateStage:n}=t;return n?d.MODAL:e||qt.getTargetViewContainerName(_E)},iT=t=>{let e=wo(t);return Dn(e,Cs(t))||Nt("createWork",{caseClassName:e}).replace(/{.+?}/,String(ln(Zt(t))))},sT=t=>t.initiatingContext||t.context,gc=async(t,e)=>Rt(t)?{continueExecution:!0,removeActionPayload:{},dirtyCheckPerformed:!1}:{...await xt(t,e),dirtyCheckPerformed:!0},E1=t=>{if(G.shouldUseUnifiedHandling())return t?.uiResources?.root?.config?.name===O.getDefaultQualifiedName("pzCreateDetails")||!1;let e=y.getIn(t,[d.DATA,d.CASE_INFO.CASE_INFO]);return on(e)&&Xu(T.getOperatorIdentifier(),e)},BG=(t,e)=>{let n=E1(t),{skipBrowserSemanticUrlUpdate:o=!1,isTraditionalUICase:r}=e,i=r&&!Ra();y.setIn(t,["directUrlUpdation"],(!n||i)&&!o)},HG=t=>t.confirmationNote?d.REVIEW_MODE:d.PERFORM_MODE,GG=(t,e,n)=>!hr(t)&&Rt(e)&&(n??!0),qG=t=>In(t)&&T.isOpenCasePageAfterCreateInMultiDocEnabled();var vye="Error occurred during ajax call at createWork Epic : ",WG=(t,e)=>{let{class:n,context:o,viewType:r=mt.PAGE}=t,{removeActionPayload:i}=e,s=t?.pageName?t?.pageName:T.getDefaultCasePage();return(t.isTraditionalUICase||!s&&t.renderInline===!0&&r!==mt.FORM)&&(s=O.getDefaultQualifiedName("pyDetails")),Y(Ui.createCase(n,{...t,pageName:s,viewType:r,context:o})).pipe(x(({response:a,headers:c})=>(qe.analyseResponse(a),{response:a,actionInPayload:t,headers:c,removeActionPayload:i})),fe(vye,o))};var hc=t=>{w.publish(d.PUB_SUB_EVENTS.DISPLAY_CASE_CREATED_TOASTER,t)},Zp=t=>{w.publish(d.PUB_SUB_EVENTS.CASE_EVENTS.CREATE_STAGE_DONE,t)},KG=t=>{w.publish(d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_VIEW_OPENED_AFTER_CREATE,t)};var Rye=(t,e)=>G.isExternalCaseType(t)&&e?e:Co(),Pye=t=>{let e=0,n=[],o={},r,i=!1,s=!1,a="",c="";return t.pipe(te(bM),bn(100),x(l=>({actionMgrID:e}=l.payload,l.payload)),V(l=>{let{context:u}=l;if(r=l.class,s=!1,a="",c="",G.isExternalCaseType(r)&&(ht({context:u,stateObj:J(u),clearContextMessages:!0}),!Fn(u))){let f={type:A.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return M.rejectActionByID(e,!0,f),Hc()}let p=S1(l),m=X(p,u);return i=Wr(r),Y(gc(m,{loadingContext:u})).pipe(V(({continueExecution:f,removeActionPayload:g,dirtyCheckPerformed:h})=>f?(s=h,l.isTraditionalUICase=i,WG(l,{removeActionPayload:g})):(M.rejectActionByID(e),Tt)))}),V(async l=>{if(l?.type===ve)return l.payload.context=Rye(r,l.payload.context),n.push(pe(l)),n;let{actionInPayload:u,response:p,headers:m,removeActionPayload:f}=l,g=sT(u),h=G.isExternalCaseType(u.class),E=E1(p);(u.renderInline||T.getDefaultCasePage()||i)&&(E=!1),y.setIn(p.data,A.CASE_INFO.IS_FIRST_ASSIGNMENT,!0);let C=S1({...u,isInCreateStage:E}),I=X(C,u.context),_=rt(I,C,u.context),{openCaseViewAfterCreate:P}=u;if(!s&&GG(C,I,P)){let{continueExecution:_e}=await xt(I,{loadingContext:u.context});if(!_e)return M.rejectActionByID(e),n}let N=u?.openCaseViewAfterCreate??!0,z=ze(p);if(!N&&!E&&!qG(I)){let _e=fR(p),{businessID:Xe,caseType:De,resolvedURL:Et,caseTypeName:an}=EA(p);return o={caseId:Xe,label:an,href:Et,createdCaseContent:p?.data?.caseInfo?.content},hc(o),Zp({caseId:Xe,assignmentId:_e,caseType:De,ID:Zt(z),initiatingContext:g}),h&&gR(u),n}let H=String(ln(Zt(z))),ne=iT(z);z.semanticURL=ne,yt.setComponentCache(H,Ge.addDebugHeaders(u.debugInfo)),BG(z,u);let j={acName:I,context:_},oe=Kr(_);await Pe(z,u,j);let Ae=HG(z),he={target:I,context:_,initiatingContext:g,containerItemID:_,headers:m,semanticURL:ne,isInCreateStage:E,isMinimizable:E,caseViewMode:Ae,currentCaseViewMode:oe,assignmentContext:y.getIn(z,Bo.NEXT_ASSIGNMENT_INFO_CONTEXT),nextAssignmentInfo:y.getIn(z,Bo.NEXT_ASSIGNMENT_INFO),resourceType:A.CASE,openCaseViewAfterCreate:u.openCaseViewAfterCreate,modalOptions:u.modalOptions,debugInfo:u.debugInfo};qr(he,z);let Oe=Me(z,he);i&&(Oe.data.caseInfo.content.coexistenceAction="openAssignment"),G.setTraditionalGadgetId(Oe.data);let He=Jt(I,Oe);return yr(He)&&bi(n,{removeActionPayload:f,target:I}),h&&gR(u),n.push(He),Cn(z,he),KG({caseId:H}),a=Ae,c=Zt(z),n}),x(()=>{let l=Ra(),u=on(y.getIn(n[0]?.payload,"data.caseInfo"));return i&&l&&u?Yp.postCreateCaseMessage(n[0]?.payload?.nextAssignmentInfo?.ID,Or,n):Or(n),a===A.CASE_VIEW_MODE.PERFORM&&As(c),St(n,e),o={},n=[],a="",c="",n}))},JG=Pye;var{RESOURCE_TYPES:ZG}=A,QG=t=>{let{isModalAction:e,viewType:n,isInCreateStage:o,isCaseWideAction:r}=t;return e&&o&&!r?mt.PAGE:n||mt.FORM},XG=t=>{let{isCaseWideAction:e,caseTypeID:n}=t;return G.shouldUseUnifiedHandling()?e||G.isObjectCaseType(n)?ev:XT:e?ev:XT},cT=(t,e)=>{let{containerItemID:n,context:o,actionMgrID:r,isInCreateStage:i,isModalAction:s}=e;if(i&&s){let a=Qn(n),c=X(a,o);t.push(B(pn,{containerItemID:n,target:c,actionMgrID:r}))}},yc=(t,e)=>{let{containerItemID:n,skipReleaseLockRequest:o,isInCreateStage:r,isProcessAction:i}=e,s=de(n),a=`${s?.includes("root")?d.APP.ROOT:d.APP.APP}/${Ee.MODAL}`;t.push(B(nt,{containerItemID:n,context:s,target:a,skipReleaseLockRequest:o,isInCreateStage:r,isProcessAction:i}))},Nye=(t,e)=>{let n=t?.assignmentID,r=(e?.data?.caseInfo?.assignments??[])[0]?.ID;return n!==r},A1=t=>ie(".openCaseViewAfterCreate",d.CONTEXT_DATA,t)??!0,Oye=(t,e)=>In(t)&&(A1(e)||T.isOpenCasePageAfterCreateInMultiDocEnabled()),xye=t=>t.initiatingContext||ie(".initiatingContext",d.CONTEXT_DATA,t?.context),Dye=(t,e)=>{let{content:n}=e?nd(t):ni(t);return{...n&&{content:n}}},$ye=async(t,{translatedDXAPIResponse:e,actionInPayload:n},o,r,i)=>{let{caseID:s}=n,a=Bj(e),c=r?fo(e):wo(e),{caseViewMode:l,headers:u,semanticURL:p,actionMgrID:m,directUrlUpdation:f,key:g,flowName:h,resourceType:E}=o,C=re(n?.context),I=Ze(C,n?.context)?.acTertiary,_=xye(n);Object.assign(i,{caseId:s,assignmentId:a,caseType:c,isSubmitFromBlendedUI:I,..._&&{initiatingContext:_},...Dye(e,r)}),yc(t,{...n,skipReleaseLockRequest:!0});let P=`${n?.containerItemID.includes("root")?d.APP.ROOT:d.APP.APP}/${Ee.PRIMARY}`,N=rt(P,Ee.PRIMARY),z=Ge.getCoreHeadersFromContext(n.context)||!1,H=Me(e,{target:P,context:N,containerItemID:N,caseViewMode:l,headers:u,semanticURL:p,key:g,flowName:h,resourceType:E,directUrlUpdation:f,debugInfo:z&&z.debugInfo&&{debugId:z.debugInfo[d.COREHEADER_APP_DEBUG_ID]},shouldUpdateCaseActionsInParentContext:!0});if(Rt(P)){let ne=J(N),oe=`You will lose unsaved changes for ${Cs({data:ne})}. Do you want to continue?`;if(A1(n.context)){let{continueExecution:Ae}=await xt(P,{dirtyMessage:oe});if(!Ae)return o.directUrlUpdation=!1,M.rejectActionByID(m),Hc();H.currentCaseViewMode=Kr(H?.context),t.push(B(Yr,H)),n.__deferCaseActionsPayload=H}else return t}else if(Oye(P,n.context))t.push(B(kt,H));else return t;return e.directUrlUpdation=f,e.semanticURL=p,await Pe(e,{...H,acName:P},{acName:P,context:N}),t},wye=(t,e,n)=>{let o=/^app\/preview_[0-9]*/g,{containerItemID:r,caseID:i}=e;if(r&&o.test(r)&&Wn(r)){let{caseClassName:s}=n,a=Ye(r),c=de(a);t.push(B(Df,{containerItemID:a,context:c,container:Ee.PREVIEW,containerName:Ee.PREVIEW,caseId:i,viewName:A.PREVIEW_VIEW_NAME,caseClassName:s,updateData:!0}))}},Mye=(t,e,n)=>{let{containerItemID:o}=e,r=de(o),{data:i,caseViewMode:s}=n;if(r&&Wn(o)){let a=Yo(r),c={data:i,caseViewMode:s,context:a};y.setIn(c.data,["context_data","caseViewMode"],s),t.push({type:Rr,payload:{context:a}});let l=G.getPropertiesToReplace(o);t.push(B(Ne,c,{propertiesToReplace:l})),e.shouldUpdateCaseActionsInParentContext=!0,e.__deferCaseActionsPayload=e}},eq=(t,e)=>{let{isCaseWideAction:n,assignmentID:o,actionID:r}=e;return{isCaseWideAction:n,caseID:Zt(t),assignmentID:n?null:o,actionID:r||null}},lT=(t,{isModalAction:e,target:n,transientItemID:o})=>{if(e){let i=t.find(({type:s})=>s===st);i?.payload&&(n=i.payload.target,o=i.payload.containerItemID)}let r=vM({target:n,containerItemID:o});r.payload.transientItems.length&&t.push(r)},kye=(t,e,n)=>{if(e.isProcessAction&&(yc(n,{...e,skipReleaseLockRequest:!0}),t)){let o=`${e?.containerItemID.includes("root")?d.APP.ROOT:d.APP.APP}/${Ee.PRIMARY}`,r=rt(o,Ee.PRIMARY),i={insKey:t.ID,className:t.content.classID,context:r,acTargetName:d.PRIMARY,isChild:!0},s={type:Po,payload:{...i}};n.push(s)}},tq=t=>/^app\/preview_[0-9]*/g.test(t),Yl=(t,e)=>{let n=/^app\/primary_[0-9]*/g,o=Ye(t);return tq(t)?!1:o===e?!0:n.test(o)},uT=(t,{showWhenCaseViewOpens:e=!1}={})=>{if(e||!A1(t.context)){let n,o=t?.caseTypeID,r=t?.caseTypeName;return t.businessID?n=t.businessID:n=t.workID,{caseID:n,caseTypeID:o,caseTypeName:r}}return{}},Lye=(t,e)=>{let n=re(t);return Vt(n,e)},Uye=(t,e=!1,n=!1)=>{let r=M.getNextActionMgrId(),i=Q.getPropertyValue(A.CASE_INFO.ASSIGNMENT_ID,"",t),s=Q.getPropertyValue(A.CASE_INFO.ASSIGNMENTACTION_ID,"",t);return{ID:i,actionID:s,context:t,caseWideAction:e,contextData:n,options:{actionMgrID:r}}},YG=(t,e,n,o)=>{let{data:r,caseViewMode:i}=e,s={data:r,caseViewMode:i,context:n};if(y.setIn(s.data,["context_data","caseViewMode"],i),t.push({type:Rr,payload:{context:n}}),o){let c={data:qe.transformObjectToCase(r),caseViewMode:i,context:n};t.push(B(Ne,c))}t.push(B(Ne,s))},zye=t=>{if(!t?.isCaseWideAction)return!1;let e=t.context;return!!((e?Ye(e):void 0)?.includes(Ee.MODAL)&&e?.includes(Ee.MODAL))},jye=async(t,e,n,o,r,i,s,a,c,l)=>{let{headers:u}=c,p=l?d.OBJECT_INFO.OBJECT_INFO:d.CASE_INFO.CASE_INFO,m=zye(o);if(t)if(m){yc(r,{...o,skipReleaseLockRequest:!0}),e.doDeleteCaseSummary=o.doDeleteCaseSummary,e.deleteAssignmentSpecificResources=!1;let f=e?.data?.[p]?.content;(f===void 0||typeof f=="object"&&f!==null&&Object.keys(f).length===0)&&(e.root=void 0,delete e.data?.caseMessages);let{data:g,caseViewMode:h}=e,E={data:g,caseViewMode:h,context:n};E?.data&&y.setIn(E.data,["context_data","caseViewMode"],h),r.push(B(Ne,E))}else{if(typeof c?.response?.uiResources?.root!="object"){let oe=(De,Et)=>{let an=De.findIndex(vn=>vn.ID===Et);if(an!==-1){let[vn]=De.splice(an,1);De.unshift(vn)}return De},Ae=J(t),he=c?.response?.data?.caseInfo?.assignments??[],Oe=Ae?.caseInfo?.assignments??[],He=Kr(t)===d.PERFORM_MODE,_e=he[0]?.ID!==Oe[0]?.ID,Xe=he.length>0&&Oe.length>0;He&&_e&&Xe&&c?.response?.data?.caseInfo?.assignments&&(c.response.data.caseInfo.assignments=oe(he,Oe[0]?.ID))}let f=Rt(re(t)),g=!1,h=re(n),E=gt(h),C=se(h);C&&E?.items?.[C]?.key===c?.actionInPayload?.caseID&&(g=!0),yc(r,{...o,skipReleaseLockRequest:!0});let I=Qn(t),_={target:re(t),containerItemID:t,context:t,containerName:I};e.doDeleteCaseSummary=o.doDeleteCaseSummary;let P=Yo(n),N=J(P),z=J(o.context),H=N[p]?.ID,ne=z[p]?.ID,j=J(t)?.caseInfo?.ID;if(f&&H===ne||!f&&(s===""||_.containerItemID.includes(d.WORKAREA)&&e.caseViewMode===d.REVIEW_MODE&&j===e.data?.caseInfo?.ID||!i&&e.root&&Object.keys(e.root).length===0&&j===e.data?.caseInfo?.ID))(e?.data[p]?.content===void 0||e.data[p].content!==void 0&&typeof e.data[p].content=="object"&&Object.keys(e.data[p].content).length===0)&&(e.root=void 0,delete e.data?.caseMessages),t.includes(d.WORKAREA)&&e.caseViewMode===d.REVIEW_MODE&&Nye(o,a)&&(e.flowName=" ",e.clearView=!0,e.root?.config?.name!==d.PY_CONFIRM&&(e.root=void 0)),t.includes(d.ACTIONAREA)?r.push(B(Ne,{...e,key:s,resourceType:"",..._})):Ze(_.target,_.containerItemID)?.resourceType!==ZG.PAGE&&j===e.data?.caseInfo?.ID&&r.push(B(dn,{...e,key:s,resourceType:"",..._}));else if(i){let oe=re(t),Ae=Vt(oe,s);if(Ae)_.target=oe,_.context=Ae,_.containerItemID=Ae,r.push(B(dn,{...e,key:s,resourceType:"",..._}));else{let he=Ke(n)[0];if(o.target=he,o.context=rt(he,d.WORKAREA,n),o?.context){o.containerItemID=o.context,r.push(B(kt,{...o,...e}));let Oe=o.containerItemID;r.push(B(pn,{parentContainerTarget:he,containerItemID:Oe}))}}}if(o.target=re(t),o.containerName=Qn(t),o.context=t,o.containerItemID=t,o.shouldUpdateCaseActionsInParentContext=!0,y.setIn(e,"acName",_.target),await Pe(a,e),o.__deferCaseActionsPayload=o,g&&(n.includes(d.WORKAREA)&&Wn(n)&&(n=Yo(n)),YG(r,e,n,l)),!i&&e.caseViewMode===d.PERFORM_MODE){let oe=Lye(t,s),Ae={data:{[p]:{headers:u}},context:oe};r.push(B(Ne,Ae)),r.push(Da(Uye(oe)))}}else{yc(r,o);let f=!1,g=re(n),h=gt(g),E=se(g);if(E&&h?.items?.[E]?.key===c?.actionInPayload?.caseID&&(f=!0),i){let C=Ke(n)[0];o.target=C,o.context=rt(C,d.WORKAREA,n),o.containerItemID=o.context,r.push(B(kt,{...o,...e}));let I=o.containerItemID;r.push(B(pn,{parentContainerTarget:C,containerItemID:I}))}f&&YG(r,e,n,l)}},nq=(t,e,n,o,r)=>{let i,s=re(e);In(s)?i=Vt(s,n.data?.caseInfo?.ID):i=se(s);let a=!0;if(t&&i){let c=Q.getPropertyValue(A.CASE_INFO.ASSIGNMENTACTION_ID,"",i),l=Q.getPropertyValue(A.CASE_INFO.ASSIGNMENT_ID,"",i);if(c){let p=n?.data?.caseInfo?.assignments?.find(m=>m.ID===l)?.actions;p&&!p.some(m=>m?.ID===c)&&(a=!1)}}return o&&t&&a&&Ss(null,d.CASE_VIEW_MODE_PROP,i)===d.PERFORM_MODE&&r},Fye=async(t,e,n,o,r,i,s)=>{let a=i?"objectInfo":"caseInfo";kye(t.data[a].parentCaseInfo,e,r);let c=t?.data[a]?.parentCaseInfo?.ID;if(c){let l=re(e?.context),u=Ze(l,e?.context)?.parentContext,p=re(u);e?.isProcessAction&&Wl(p,c)&&U0(u,t?.data[a]?.lastUpdateTime)}n.resourceType=ZG.CASE,n.directUrlUpdation=!0,e.isProcessAction||await $ye(r,{translatedDXAPIResponse:o,actionInPayload:e},n,i,s)},rq=async(t,e,n)=>{let o={assignmentID:t?.data?.caseInfo?.assignments[0]?.ID,className:t?.data?.caseInfo?.content?.classID,containerName:Ee.PRIMARY,targetContainerName:Ee.PRIMARY,viewType:mt.PAGE,isLastStepInCreateStage:!0,context:n},r={type:Jo,payload:{...o}};e.push(r)},C1=async(t,e,n,o,r)=>{t.doDeleteCaseSummary=e.doDeleteCaseSummary,t.caseViewMode===d.REVIEW_MODE&&(t.flowName=" ",t.clearView=!0);let{containerItemID:i}=e;Rt(re(i))||y.setIn(t.data,["context_data","caseViewMode"],t.caseViewMode);let s=G.getPropertiesToReplace(i);r.push(B(dn,{...t,...o,propertiesToReplace:s})),y.setIn(t,"acName",o.target),await Pe(n,t),Mye(r,e,t)},dT=async(t,e,n,o,r,i,s,a,c,l={})=>{let{isCaseWideAction:u,isInCreateStage:p,containerItemID:m}=t,f=Ye(t.context),g=TA(r,c),h=c?fo(r):wo(r),E=p&&!g&&!u,C=Ke(f)[0],I=C?se(C):f,_=Qn(m),P=de(m),N=Object.freeze({target:t.target,containerItemID:m,context:P,containerName:_});E&&!tq(t.context)?await Fye(a,t,e,r,i,c,l):Yl(t.context,I)?await jye(I,e,f,t,i,n,o,r,s,c):(u||c)&&!Yl(t.context,I)?(yc(i,t),wye(i,t,{caseClassName:h})):await C1(e,t,r,N,i)},pT=(t,e,n)=>{let{isModalAction:o,isCaseWideAction:r,caseID:i,assignmentID:s,isLocalAction:a}=e,c=Yl(e.context,n),l=t?.data?.caseInfo?.stages,u=t?.data?.caseInfo?.stageID;CA({caseID:i,context:e.context,assignmentId:s,isLocalAction:!!a,isModalAction:o,isModalLaunchedFromPrimaryValue:c,isCaseWideAction:r,stages:l,stageID:u})},oq=(t,e)=>{let{assignmentID:n}=e;return t?.data?.caseInfo?.assignments?.some(o=>o.ID===n&&o?.canPerform==="true")},mT=t=>{let e=t?.payload?.err?.errorDetails,n=t?.payload?.context;e?.forEach(o=>{o[d.ERROR_FIELD_IN_PAGE]=o[d.ERROR_FIELD_IN_PAGE].replace(/(\(\d+\))/g,a=>`[${parseInt(a.substring(1,a.length-1),10)-1}]`);let r=o[d.ERROR_FIELD_IN_PAGE].slice(1),i=o[d.ERROR_IN_PAGE_IDENTIFIER],s=i.startsWith(".")?i.slice(1):i;if(s){let a=r?`caseInfo.content.${r}`:"caseInfo.content";a=d.getProperty(a.replace(/\(/g,"[").replace(/\)/g,"]"));let c=ho(s,a,d.PROPERTY),l={type:A.MESSAGES.MESSAGES_TYPE_ERROR,message:o.localizedValue};be.mutateField(n,a,c[c.length-1],{messages:[l],type:A.MESSAGES.MESSAGES_TYPE_ERROR,fieldName:i})}})},aT=t=>{let e=J("app")?.pyPortal?.pyPrimaryNavPages,n=Array.isArray(e)?e[0]:null;return n?(Sr.clearChangedProperties(t),[{type:Un,payload:{className:n.pyClassName,containerName:d.PRIMARY,context:d.APP.APP,pageReference:"pyPortal",viewName:n.pyRuleName,skipSemanticUrl:""}}]):[]},iq=async t=>{let{target:e,containerItemID:n,context:o}=t,r=Qt("app/primary"),i=Ze(e,n)?.parentContext,s=!!e&&In(e),a=In("app/primary");if(s&&i!==d.APP.APP){if(await Oa(n,{skipDirtyCheck:!0}),Hp(e).length===0)return aT(o)}else if(r&&a&&!i)await Oa(r,{skipDirtyCheck:!0,eventName:"Dismiss case"});else return aT(o);return[]};var I1=t=>{let{containerName:e,isInCreateStage:n}=t;return n?d.MODAL:e||qt.getTargetViewContainerName(Si)},sq=t=>t?.uiResources?.root?.config?.name===O.getDefaultQualifiedName("pzCreateDetails")||!1,Qp=(t,e)=>{let n=sq(t),{skipBrowserSemanticUrlUpdate:o=!1}=e;y.setIn(t,["directUrlUpdation"],!n&&!o)},Xp=t=>t.confirmationNote?d.REVIEW_MODE:d.PERFORM_MODE,em=(t,e)=>{let n;return t.renderInline||T.getDefaultCasePage()?n=!1:n=sq(e),n},aq=(t,e)=>{G.isExternalObject(t.class)&&(t.containerItemID=t.context,yc(e,t))},cq=(t,e)=>!t&&!e,lq=(t,e,n)=>!hr(t)&&Rt(e)&&!G.isExternalObject(n),uq=(t,e,n)=>{if(yr(t)){let{removeActionPayload:o,target:r}=e;bi(n,{removeActionPayload:o,target:r})}},dq=t=>{G.isExternalObject(t.class)&&hc({content:zn().getLocaleValue("Successfully submitted!","Assignment")})},pq=t=>{G.isExternalObject(t)&&qe.setNeedsMapping(!1)};var _1=t=>{let{containerName:e,isInCreateStage:n}=t;return n?d.MODAL:e||qt.getTargetViewContainerName(Ea)};var Vye="Error occurred during ajax call at createObject Epic : ",mq=(t,e)=>{let{class:n,context:o,viewType:r=mt.PAGE}=t,{removeActionPayload:i}=e,s=t?.pageName?t?.pageName:T.getDefaultCasePage();return Y(Ui.createCase(n,{...t,pageName:s,viewType:r,context:o,retrieveActionViewForNewObject:!0})).pipe(x(({response:a,headers:c})=>(qe.analyseResponse(a),{response:a,actionInPayload:t,headers:c,removeActionPayload:i})),fe(Vye,o))};var fq="CREATE_EXTERNAL_CASE";var Bye=t=>{let e=0,n=[],o=!1;return t.pipe(te(fq),bn(100),x(i=>({actionMgrID:e}=i.payload,i.payload)),V(i=>{let{context:s}=i,a=_1(i),c=X(a,s);return o=!1,Y(gc(c,{loadingContext:s})).pipe(V(({continueExecution:l,removeActionPayload:u,dirtyCheckPerformed:p})=>l?(o=p,mq(i,{removeActionPayload:u})):(M.rejectActionByID(e),Tt)))}),V(async i=>{if(i&&i.type===ve)return i.payload.context=Co(),n.push(pe(i)),n;let{actionInPayload:s,response:a,headers:c,removeActionPayload:l}=i,u=sT(s),p=em(s,a);y.setIn(a.data,d.getProperty(d.CASE_INFO.IS_FIRST_ASSIGNMENT),!0);let m=_1({...s,isInCreateStage:p}),f=X(m,s.context),g=rt(f,m,s.context);if(!o&&!hr(m)&&Rt(f)){let{continueExecution:z}=await xt(f,{loadingContext:s.context});if(!z)return M.rejectActionByID(e),n}let h=ze(a),E=iT(h);h.semanticURL=E,Qp(h,s),await Pe(h,s,{acName:f,context:g});let I=Xp(h),_={target:f,context:g,initiatingContext:u,headers:c,semanticURL:E,caseViewMode:I,containerItemID:g,isInCreateStage:p,isMinimizable:p,assignmentContext:y.getIn(h,Bo.NEXT_ASSIGNMENT_INFO_CONTEXT),nextAssignmentInfo:y.getIn(h,Bo.NEXT_ASSIGNMENT_INFO),resourceType:A.RESOURCE_TYPES.CASE,openCaseViewAfterCreate:s.openCaseViewAfterCreate,modalOptions:s.modalOptions,debugInfo:s.debugInfo,isExternalCaseCreationFlow:!0};qr(_,h);let P=Me(h,_),N=Jt(f,P);return yr(N)&&bi(n,{removeActionPayload:l,target:f}),n.push(N),jA(n),n}),x(()=>(Or(n),St(n,e),n=[],n)))},gq=Bye;var{RESOURCE_TYPES:Hye}=A,gS=(t,e={})=>{let{viewType:n,containerName:o,targetContainerName:r,isChild:i}=t,s=ni(e);return _j(s)&&t?.stageID===s.stageID?mt.PAGE:n||((mR(o)||mR(r))&&!i?mt.FORM:mt.PAGE)},hq=(t,e)=>{let n=ni(t),o;T.getDefaultCasePage()?o=!1:o=on(n);let{isChild:r,containerName:i,isTraditionalUICase:s}=e,a=r&&o,c=o&&!e.isActionFromToDoList;return(a||c)&&!s&&!e.renderInline?d.MODAL:i||Wt(co,e)},yq=async(t,e,n)=>{let{semanticURL:o,containerItemID:r,isParallelAssignment:i,insKey:s}=e,{target:a,actionInPayload:c}=n,{skipBrowserSemanticUrlUpdate:l=!1}=c,u=de(r);await Pe({directUrlUpdation:!l,semanticURL:o},c,{acName:a,target:a,context:u}),t.push(B(pn,{containerItemID:r,target:a,isParallelAssignment:i,insKey:s,resourceType:Hye.CASE,context:u,doDeleteCaseSummary:c.doDeleteCaseSummary}))},Sq=(t,e)=>{let n=ni(t),o=Zt(t),r=on(n),{skipBrowserSemanticUrlUpdate:i=!1,viewType:s,isTraditionalUICase:a}=e,c=a&&!Ra(),l=s===mt.PAGE&&(!r||c)&&!i,{caseTypeID:u,businessID:p}=n;if(l){let m=Dn(u,p)||Nt(Gt,{caseClassName:u}).replace(/{.+?}/,String(ln(o)));t.semanticURL=m,t.directUrlUpdation=!0}},Eq=t=>{let e=t?.headers??{};return t?.isRemote&&(e=ke(e,t.remoteClassName)),e},Gye=(t,e,n,o,r)=>{gS(t,e)===mt.FORM?(n.caseViewMode=o||d.PERFORM_MODE,r.push(B(dn,n))):r.push(B(Yr,n))},qye=(t,e,n,o,r)=>{if(bi(t,{removeActionPayload:e,target:n}),gV(o.key,n))o.context=Qt(n),o.containerItemID=o.context,t.push(B(Yr,o));else if((r?.isChild||r?.isRemote)&&r?.isMultiDoc){let i=re(r.context);o.target=i,o.context=r.context,o.containerItemID=r.context,t.push(B(Yr,o))}else{let i=re(o.context),s=Vt(i,o.key);s?(o.target=i,o.context=s,o.containerItemID=s,t.push(B(Yr,o))):t.push(B(kt,o))}},Aq=(t,e,n,o,r,i,s)=>{Rt(e)&&Xn(e)?Gye(o,r,t,i,n):qye(n,s,e,t,o)},Cq=(t,e)=>{t.acTertiary&&(e.data.caseInfo.isFirstAssignment=t.acTertiary)},Iq=(t,e)=>{if(t=ce.getRemoteCaseClassBySourceClass(t)??t,ce.isRemoteCase(t)){let{RemoteClassName:n,RemoteSystemID:o,name:r}=ce.getRemoteCase(t);if(e.headers?.RemoteSystemID||M.setRemoteCaseHeaderByContext(e,o),ce.isTraditionalRemoteCase(t)||ce.getRemoteAppPlatformVersion(o)){e.assignmentID=e.assignments?.[0]?.ID;let i={className:t,name:r,action:wE,remoteClassName:n};M.setTraditionalRemoteCaseParams(e,i)}}},Wye=t=>{let{inlineViewType:e,caseTypeID:n,RedirectURL:o}=t;if(e&&e.toLowerCase().includes("remote"))return!1;let r=ce.getRemoteCaseClassBySourceClass(n)??n;return!ce.isRemoteCase(r)&&!!o},_q=(t,e,n)=>{if(!t||!e||!Wye(e)||!e.RedirectURL)return!1;try{let o=new URL(e.RedirectURL);if(o.protocol==="https:")return globalThis.open(o.href,"_blank","noopener,noreferrer"),M.resolveActionByID(n),!0}catch{}return!1},bq=(t,e,n,o)=>{if(Rt(t)&&Wn(e)){let r=n?.data?.caseInfo?.assignments;if(Array.isArray(r)&&r.length>0){let i=Ye(e);o.push(B(Ne,{context:i,data:{caseInfo:{assignments:r}}},{propertiesToReplace:[{path:d.CASE_INFO.ASSIGNMENTS,allowMultiple:!0}]}))}}},Tq=(t,e)=>{t&&(e.data.caseInfo.content.coexistenceAction="openAssignment")};var Kye="Error occurred during ajax call at openAssignment Epic : ",vq=({restUrl:t,reqType:e,requestHeaders:n,debugInfo:o,context:r,isGetNextWork:i,doNotMergeMessagesForStatusCode:s,mcpAction:a})=>{if(it())return Ot(a.actionName,{...a.payload,headers:{"if-match":n&&n.etag,...n}});let c=G.appendExcludeQueryParamToUrl(t);return k(c,{method:e,headers:{"if-match":n&&n.etag,...n,...o&&{...Ge.addDebugHeaders(o)}}},r,{doNotMergeHttpMessagesForStatusCode:i?s:""})},Rq=(t,e)=>{let n=gS(t),{headers:o,context:r,assignmentID:i,isGetNextWork:s,debugInfo:a,isOpenStage:c,stageID:l,caseID:u,jsActionQueryParams:p,isLastStepInCreateStage:m}=t,f="404",g,h;s?{restApi:g,reqType:h}=F(tv,{viewType:n}):c?{restApi:g,reqType:h}=F(QT,{caseID:u,stageID:l}):{restApi:g,reqType:h}=F(co,{assignmentID:i,viewType:n});let{removeActionPayload:E}=e,C=T.getDefaultCasePage(),I="",_=t.pageName;t.isTraditionalUICase&&(_=O.getDefaultQualifiedName("pyDetails")),C?I=`${g}?viewType=${n}&pageName=${C}`:_?I=`${g}?viewType=${n}&pageName=${_}`:I=`${g}?viewType=${n}`,p&&Object.keys(p).forEach(H=>{I+=`&${H}=${p[H]}`});let P=Eq(t),N=co;s?N=tv:c&&(N=QT);let z=H=>({actionName:N,payload:{queryPayload:{...p,assignmentID:i,caseID:u,stageID:l,viewType:n,params:{pageName:H}}}});return Y(vq({restUrl:I,reqType:h,requestHeaders:P,debugInfo:a,context:r,isGetNextWork:s,doNotMergeMessagesForStatusCode:f,mcpAction:z(C||_)})).pipe(x(H=>T.isCoexistenceAppOfType(d.APP_TYPE.UIKIT)&&!m?on(H.data.data.caseInfo)?H:(I=_?I.replaceAll(_,O.getDefaultQualifiedName("pyDetails")):I,T.setDefaultCasePage(O.getDefaultQualifiedName("pyDetails")),{isReloadWithDifferentViewTypeRequired:!0,restUrl:I}):H),V(H=>H?.isReloadWithDifferentViewTypeRequired?vq({restUrl:I,reqType:h,requestHeaders:P,debugInfo:a,context:r,isGetNextWork:s,doNotMergeMessagesForStatusCode:f,mcpAction:z(O.getDefaultQualifiedName("pyDetails"))}):ye(H)),x(H=>{let{key:ne,flowName:j}=HR(i);return qe.analyseResponse(H),{response:{...H.data,key:ne,flowName:j},actionInPayload:t,viewType:n,removeActionPayload:E,headers:ke({...o,...H.headers})}}),fe(Kye,r))};var{RESOURCE_TYPES:Jye}=A,Yye=(t,e)=>{e!==void 0&&t.push({status:Number(e)})},Zye=(t,e)=>t&&String(t.canPerform)==="false"?d.REVIEW_MODE:e??d.PERFORM_MODE,Pq=t=>{let e=T.getRuntime()==="Browser",n=0,o=[],r=[],i=!1,s=!1;return t.pipe(te(ic),x(a=>({actionMgrID:n}=a.payload,{...a.payload,...e?{insKey:a.payload.assignmentID}:{assignmentID:a.payload.assignmentID}})),V(a=>{i=a.isGetNextWork;let{context:c}=a,l;(a?.isChild||a?.isRemote)&&a?.isMultiDoc?l=mt.FORM:l=gS(a),a.viewType=l;let u=Wt(co,a),p=X(u,c),{activate:m,activateContainerActionPayload:f}=_s(Jye.ASSIGNMENT,p,a);if(m&&!a.isParallelCall)return ye({type:mn,activateContainerActionPayload:f,actionInPayload:a});let g=se(p),h;return f?.isParallelAssignment?h=Promise.resolve({continueExecution:!0,removeActionPayload:{}}):g?h=xt(p,{loadingContext:c}):h=Promise.resolve({continueExecution:!0,removeActionPayload:{}}),Y(h).pipe(V(({continueExecution:E,removeActionPayload:C})=>E?(s=Wr(a.className),a.isTraditionalUICase=s,T.isWSSPortal()&&(a.headers={...a.headers,[d.X_ORIGIN_CHANNEL]:"WSS"}),Rq(a,{removeActionPayload:C})):(M.rejectActionByID(n),Tt)))}),V(async a=>{if(a?.type===ve){if(i){let{payload:Xe}=a,{err:De}=Xe;Yye(r,De?.response?.status)}return o.push(pe(a)),o}let{type:c,actionInPayload:l,response:u,viewType:p,headers:m,removeActionPayload:f,activateContainerActionPayload:g}=a;if(u?.redirectInfo?.jsAction==="openStage"){let Xe=u?.redirectInfo?.stageID,De=ic,Et=u?.data?.caseInfo?.ID;l.isOpenStage=!0,l.stageID=Xe,l.jsActionQueryParams=u?.redirectInfo?.jsActionQueryParams;let an={type:De,payload:{...l,caseID:Et,headers:m}};return o.push(an),o}if(_q(i,u?.data?.caseInfo,n))return o;let{context:h,caseViewMode:E,debugInfo:C}=l,I=u?.data?.caseInfo?.assignments?.find(Xe=>Xe.ID===l.assignmentID);l.caseViewMode=Zye(I,E);let _=u?.data?.caseInfo?.caseTypeID;s=Wr(_),l.isTraditionalUICase=s;let P=hq(u,l);s&&(P=l.containerName??P);let N=X(P,h);if(c===mn)return await yq(o,g,{actionInPayload:l,target:N}),o;let z=u?.data?.caseInfo?.content,H=u?.data?.caseInfo?.ID,ne=u?.uiResources?.root?.config?.name,j=u?.uiResources?.root?.config?.context;z&&!z[O.getDefaultQualifiedName("pyViewName")]&&ne&&l.viewType!=="page"&&(y.setIn(z,O.getDefaultQualifiedName("pyViewName"),ne),y.setIn(z,O.getDefaultQualifiedName("pyViewContext"),j));let oe=ze(u);Sq(oe,l);let Ae=rt(N,P,h),he={...l.debugInfo,debugId:l.debugInfo?.debugId??Ge.getCoreHeadersFromContext(h)?.debugInfo?.[d.COREHEADER_APP_DEBUG_ID]};he.debugId&&yt.setComponentCache(H,Ge.addDebugHeaders(he)),await Pe(oe,l,{acName:N,target:N,context:Ae});let He={target:N,context:Ae,containerItemID:Ae,headers:m,parentContext:Ye(l?.context),isMinimizable:on(y.getIn(oe,"data.caseInfo")),doDeleteCaseSummary:l.doDeleteCaseSummary,acTertiary:l.acTertiary,resourceType:A.ASSIGNMENT,debugInfo:C,shouldUpdateCaseActionsInParentContext:!0,caseID:H};qr(He,oe,{skipFlowNameUpdate:l?.caseViewMode===d.REVIEW_MODE});let _e=Me(oe,He);return _e.data.context_data.isChildCase=!!l.isChild,l.isProcessAction&&(_e.data.isProcessAction=l.isProcessAction),Tq(s,_e),G.setTraditionalGadgetId(_e.data),Cq(l,_e),_e.caseViewMode=l.caseViewMode,Aq(_e,N,o,l,u,E,f),Iq(_,_e.data.caseInfo),bq(N,_e.containerItemID,oe,o),p===mt.FORM&&Wn(_e.containerItemID)&&(_e.skipMergeAssignmentsAndActions=!1,Lo(_e,o,j)),Cn(oe,He),kj({actionInContext:h,assignmentID:l.assignmentID,caseKey:_e.key,target:N}),As(_e.key),o}),x(()=>{let a=n,c=Ra(),l=on(y.getIn(o[0]?.payload,"data.caseInfo"));return s&&c&&l?Yp.postCreateCaseMessage(o[0]?.payload?.data?.caseInfo?.assignments?.[0]?.ID,v,o):v(o),St(o,a,r),o[0]?.payload?.isParallelAssignment&&v({type:ic,payload:{...o[0].payload,isParallelCall:!0}}),o=[],o}))};var Qye="Error occurred during ajax call at openWorkByHandle Epic : ",b1=(t,e)=>{let{insKey:n,headers:o,context:r,debugInfo:i,viewType:s}=t,{removeActionPayload:a}=e,c=t?.pageName?t?.pageName:T.getDefaultCasePage(),l=F(Gt,{caseID:n,params:{pageName:c}}),{restApi:u}=l,{reqType:p}=l;return s==="none"&&(u=`${u?.split("viewType")[0]}viewType=none`),u=G.appendExcludeQueryParamToUrl(u),Y(it()?Ot(Gt,{queryPayload:{caseID:n,params:{viewType:s==="none"?"none":"page",pageName:c}}}):k(u,{method:p,headers:{...o,...i&&{...Ge.addDebugHeaders(i)}}},r)).pipe(x(m=>(qe.analyseResponse(m),{response:m.data,actionInPayload:t,headers:ke({...o,...m.headers}),removeActionPayload:a})),fe(Qye,r,t.actionMgrID))};var Nq=async(t,e)=>{let{activateContainerActionPayload:{semanticURL:n,containerItemID:o},actionInPayload:r,actionInPayload:{context:i,skipBrowserSemanticUrlUpdate:s,doDeleteCaseSummary:a}}=e,c=Wt(Gt,r),l=X(c,i),u=de(o);await Pe({directUrlUpdation:!s,semanticURL:n},r,{acName:l,containerName:c,target:l,context:u},!1,!!s),t.push(B(pn,{containerItemID:o,target:l,context:u,doDeleteCaseSummary:a}))},Oq=(t,e)=>{let{isRemoteCase:n,remoteCaseClass:o}=e,r=Zt(t),i=n?o:wo(t),s=n?"":Dn(i,Cs(t));if(s)return s;let a={id:e?.insKey},c=Nt(Gt,{caseClassName:i},a);return c=c?.replace("{workID}",String(ln(r)))?.replace("{id}",e?.insKey),c};var xq="OPEN_WORK_BY_HANDLE";var{RESOURCE_TYPES:T1}=A,Xye=(t,e)=>{let n=Vt(t,e);if(!n)return null;let o=Ze(t,n);if(!(o?.resourceType===T1.ASSIGNMENT&&typeof o?.context=="string"&&o.context!==""))return null;let i=typeof o.semanticURL=="string"?o.semanticURL.trim():"";return i?{target:t,containerItemID:n,semanticURL:i,insKey:e}:null},eSe=async(t,e,n)=>{let o=e?.containerItemID||null,r=o&&Ke(o)[0]?se(Ke(o)[0]):o,i=r||o,s=de(i)||i,a=re(s)||re(i),c=s?Kr(s):void 0,l=r?J(r)?.caseInfo?.ID:void 0,u=t?.insKey;if(!s||!i||c!==d.REVIEW_MODE||r===o||!l||!u||l!==u)return;let p;try{p=await Cv(b1({...t,context:s,viewType:"none"},{removeActionPayload:void 0}))}catch{return}if(!p||Qe(p.type))return;let m=ze(p.response),f=[{path:d.CASE_INFO.ASSIGNMENTS,allowMultiple:!0}],g={...m?.data,caseInfo:{...m?.data?.caseInfo??{},assignments:m?.data?.caseInfo?.assignments??[]}};n.push(B(Yr,{containerItemID:i,target:a,context:s,data:g,caseViewMode:d.REVIEW_MODE,isArrayDeepMerge:!0,propertiesToReplace:f}))},tSe=async(t,e,n)=>{let{actionInPayload:o,activateContainerActionPayload:r,type:i,response:s,removeActionPayload:a,headers:c}=t,{context:l,skipBrowserSemanticUrlUpdate:u,debugInfo:p}=o,m=Wt(Gt,o),f=X(m,l);if(bA(i))await Nq(e,{activateContainerActionPayload:r,actionInPayload:o}),await eSe(o,r,e);else{let E=rt(f,m,l,{buildNew:!0}),C=ze(s),I=Oq(C,o);C.semanticURL=I,C.directUrlUpdation=!u,await Pe(C,o,{acName:f,context:E},!1,!!u);let P=Me(C,{target:f,context:E,containerItemID:E,semanticURL:I,headers:c,debugInfo:p});P.caseViewMode=d.REVIEW_MODE,P.resourceType=T1.CASE,n&&(P.data.caseInfo.content.coexistenceAction="openWorkByHandle",P.data.caseID=P.data.caseInfo.ID),G.setTraditionalGadgetId(P.data),qr(P,C,{skipFlowNameUpdate:!0}),P.currentCaseViewMode=Kr(t?.actionInPayload?.context);let N=Jt(f,P);a.containerItemID&&yr(N)&&e.push(B(nt,{containerItemID:a.containerItemID,target:f})),e.push(N),Cn(C,P)}let g=o.insKey;_A({caseKey:g,actionInContext:l,target:f});let h=s?.data?.caseInfo?.assignments?.[0]?.ID;h&&g&&Of({actionInContext:l,assignmentID:h,caseKey:g})},Dq=t=>{let e=0,n=[],o=!1;return t.pipe(te(xq),x(r=>({actionMgrID:e,isAutoRedirection:o=!1}=r.payload,r.payload)),V(r=>{let{context:i,isChild:s,viewType:a}=r,c=Wt(Gt,r),l=X(c,i),{activate:u,activateContainerActionPayload:p}=_s(T1.CASE,l,r),m=Rt(l);if(!u&&!m&&r.insKey&&l){let h=Xye(l,r.insKey);h&&(u=!0,p=h)}let f=u&&!s&&a!=="none",g=a!=="none"&&!f?xt(l,{loadingContext:i}):Promise.resolve({continueExecution:!0,removeActionPayload:void 0});return o&&yt.setComponentCache("redirectionInProgress",!0),Y(g).pipe(V(({continueExecution:h,removeActionPayload:E})=>h?f?(pd(p),ye({type:mn,activateContainerActionPayload:p,actionInPayload:r})):b1(r,{removeActionPayload:E}):(o&&yt.setComponentCache("redirectionInProgress",!1),M.rejectActionByID(e),Tt)))}),V(async r=>{if(r&&Qe(r.type))return n.push(pe(r)),n;let i=J(r?.actionInPayload?.context),s=Wr(r?.actionInPayload.className);if(r?.actionInPayload?.viewType==="none"){if(i?.context_data?.caseViewMode!=="perform"){let a=ze(r?.response),c={data:{...a?.data},context:r?.actionInPayload?.context,isArrayDeepMerge:!0};n.push({type:Rr,payload:{context:c.context,doDeleteConfirmationDetails:!1}}),s&&c.data.caseInfo?.content&&(c.data.caseInfo.content.coexistenceAction="openWorkByHandle",c.data.caseID=c.data.caseInfo.ID),G.setTraditionalGadgetId(c.data),n.push(B(Ne,c));let l=re(r?.actionInPayload?.context),u=Qn(r?.actionInPayload?.context),p=Object.freeze({target:l,containerItemID:r?.actionInPayload?.context,context:r?.actionInPayload?.context,containerName:u});if(Wn(r?.actionInPayload?.context)){let m=Me(r?.response,{...p});Lo({...m,isArrayDeepMerge:!0},n)}r.actionInPayload.shouldUpdateCaseActionsInParentContext=!0,r.actionInPayload.containerItemID=r?.actionInPayload?.context,r.actionInPayload.caseID=r?.actionInPayload?.insKey,Cn(a,r?.actionInPayload)}}else await tSe(r,n,s);return n}),x(()=>(o&&yt.setComponentCache("redirectionInProgress",!1),v(n),St(n,e),n=[],n)))};var $q="FINISH_ASSIGNMENT";var nSe="Error occurred during ajax call at finishAssignment Epic : ",wq=(t,e)=>{let{assignmentID:n,actionID:o,caseID:r,context:i,additionalHeaders:s={},outcome:a,jsActionQueryParams:c,headers:l}=t,{state$:u}=e,p=QG(t),m=XG(t),f={assignmentID:n,actionID:o,caseID:r,viewType:p},{restApi:g}=F(m,f),{reqType:h}=F(m,f);p&&!g?.includes("viewType=")&&(g=g?.includes("?")?`${g}&viewType=${p}`:`${g}?viewType=${p}`),a&&!g?.includes("outcome")&&(g=g?.includes("?")?`${g}&outcome=${a}`:`${g}?outcome=${a}`),g=ed(c,g),g=G.appendExcludeQueryParamToUrl(g),t.viewType=p;let{content:E}=Mt(i),C=u.value.data[i]?.caseInfo?.headers||{},{etag:I}=C,_={"if-match":I,...l,...s};return Y(it()?Ot(m,{queryPayload:{...c,...f,outcome:a},body:E,headers:_}):k(g,{method:h,body:E,headers:_},i)).pipe(x(P=>{let{data:N,headers:z}=P;return qe.analyseResponse(N),{response:N,actionInPayload:t,headers:ke({..._,...z})}}),fe(nSe,i))};var Mq=t=>{w.publish(d.PUB_SUB_EVENTS.CASE_EVENTS.CREATE_STAGE_DONE,t)},fT=t=>{w.publish(d.PUB_SUB_EVENTS.EVENT_EXPRESS_LOCALACTION,t)},v1=t=>{w.publish(d.PUB_SUB_EVENTS.ERROR_ON_FINISH_ASSIGNMENT,t)},kq=t=>{w.publish(d.PUB_SUB_EVENTS.EVENT_LOCALACTION_SUBMISSION,t)},Lq=t=>{w.publish(d.PUB_SUB_EVENTS.DISPLAY_CASE_SUBMITTED_TOASTER,t)},Uq=t=>{w.publish(d.PUB_SUB_EVENTS.EVENT_FINISH_ASSIGNMENT_DONE,t)};var{RESOURCE_TYPES:rSe}=A,oSe=t=>{let e=we()?.getState()?.data,n=e?Object.keys(e).find(r=>r.includes(d.WORKAREA)):void 0;return/^app\/primary(_\d+)?$/.test(t)&&!n},zq=(t,e)=>{let n=0,o=[],r={},i="",s={},a=!1,c=!1;return t.pipe(te($q),V(l=>{let u,p,m,f=T.isCoexistenceAppOfType(d.APP_TYPE.UIKIT);if({actionMgrID:n}=l.payload,i=l.payload.context,ht({context:i,stateObj:J(i),clearContextMessages:!0}),!Fn(i)||oP(i)){let g={type:A.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return M.rejectActionByID(n,!0,g),vt.handleDeferredActionCompletion(l.payload.context).then(()=>{v1({errorType:A.ERROR_TYPE.CLIENT})}),ye([])}return ye(l.payload).pipe(V(g=>{yt.setComponentCache("lastActionID",g?.actionID),cT(o,g);let h={...g};return wq(h,{state$:e})}),V(async g=>{if(g&&g.type===ve){yA(g);let Ut=pe(g);return o.push(Ut),o}Vo.clearContextedCache(i);let{headers:h,actionInPayload:E,response:C}=g,{containerItemID:I,context:_=de(I),isModalAction:P,isInCreateStage:N}=E;a=E.isCaseWideAction,c=E.isProcessAction;let z=re(I);E.target=z;let H=Qn(I),ne=Object.freeze({target:E.target,containerItemID:I,context:_,containerName:H});y.setIn(C.data,d.CASE_INFO.IS_FIRST_ASSIGNMENT,!1),y.setIn(C.data,d.CASE_INFO_IS_LOCAL_ACTION,!1),C?.uiResources?.root?.config?.name&&E.viewType!=="page"&&y.setIn(C.data,d.CASE_INFO.VIEW_NAME,C?.uiResources?.root?.config?.name),fT({submitResponse:C});let j=ze(C,{[A.STOPMERGEACTIONS]:!C.nextAssignmentInfo}),oe=wo(j),Ae=Ye(E.context),he=Ke(Ae)[0]?se(Ke(Ae)[0]):Ae,Oe=TA(j),He=N&&!Oe;P&&!N&&!Yl(E.context,he)&&(j=zA(j,J(I)));let _e=Me(j,{headers:h,actionMgrID:n,directUrlUpdation:!1,isActiveWorkAreaPrimaryAndWorkareaAbsent:oSe(he||"")});if(vA(_e.data,E),_e.caseClassName=oe,_e.resourceType=rSe.ASSIGNMENT,_e.headers=h,j?.uiResources?.root?.type==="AutoClose"){let Ut=we()?.getState()?.data?.[ne.context]?.caseInfo,{ID:To,name:Cc,content:Ic}=Ut;return o=await iq(E),Lq({ID:To,caseName:Cc,content:Ic,status:ni(j).status}),o}let De,Et,an=j?.data?.caseInfo?.assignments?.some(Ut=>Ut.ID===E.assignmentID),vn=oq(j,E),cn=nq(an,he,j,P,vn),br=E?.actionID===A.LOCAL_ACTIONS.TRANSFER_ASSIGNMENT,Ho=Rt(re(he));if(j?.data?.nextAssignmentInfo&&!br)_e.caseViewMode=d.PERFORM_MODE,De=Zt(j),Et=!0;else if(cn&&!br)j?.confirmationNote&&j?.uiResources?.root?.config?.name===d.PY_CONFIRM?_e.caseViewMode=d.REVIEW_MODE:_e.caseViewMode=d.PERFORM_MODE,De=Zt(j),Ho&&(_e.flowName=" "),_e.deleteAssignmentSpecificResources=!1,Et=!1;else{_e.caseViewMode=d.REVIEW_MODE,y.setIn(_e.data,"context_data.caseViewMode",d.REVIEW_MODE);let Ut=bj(j?.data?.caseInfo);j?.confirmationNote&&(Ut||j?.uiResources?.root?.config?.name===d.PY_CONFIRM)&&!Ho?De=Zt(j):De="",Et=!1}let kn=Zt(j),oo=!1;qr(_e,j,{skipFlowNameUpdate:_e?.caseViewMode===d.REVIEW_MODE||cn});let cr=Dn(oe,Cs(j))||Nt("createWork",{caseClassName:oe}).replace(/{.+?}/,String(ln(kn)));if(j.semanticURL=cr,_e.semanticURL=cr,P){if(await dT(E,_e,Et,De,j,o,g,C,!1,s),He){let Ut=E.isProcessAction&&!a&&T.isWSSPortal()&&ie(".isChildCase",d.CONTEXT_DATA,_)===!0;r=uT(E,{showWhenCaseViewOpens:Ut}),_e.caseViewMode===d.PERFORM_MODE&&As(kn)}}else N&&f&&!Oe?(T.setDefaultCasePage(d.PY_DETAILS),await rq(C,o,Ye(_))):(await C1(_e,E,j,ne,o),oo=Et&&_e.caseViewMode===d.PERFORM_MODE&&!a&&!c);if(he?.includes(d.ACTIONAREA)&&_===he){Sr.clearChangedProperties(_);let Ut=J(he);o=[{type:is,payload:{actionID:Ut.caseInfo.activeActionID,context:he,containerItemID:I,target:re(he),actionMgrID:M.getNextActionMgrId(),containerName:d.ACTIONAREA,localActionType:A.LOCAL_ACTION_TYPE.CASE_WIDE,caseID:Ut.caseInfo.ID}}]}if(Pa(g,o),vt.handleDeferredActionCompletion(i).catch(()=>{}),pT(_e,E,he),oo&&As(kn),!j?.data?.nextAssignmentInfo){let Ut=eq(j,E);od(kn),IA({...Ut,containerItemID:I})}return lT(o,{transientItemID:I,target:z,isModalAction:P}),p=j,m=E,u=E,o}),x(()=>{let g=o.find(h=>h.type===ve);return g?(vt.handleDeferredActionCompletion(i).then(()=>{v1({errorType:A.ERROR_TYPE.SERVER})}).catch(()=>{}),mT(g),M.rejectActionByID(n)):M.resolveActionByID(n,r),s?.caseId&&Mq(s),Or(o),Nf()&&p&&m&&Cn(p,m.__deferCaseActionsPayload??m),!g&&(a||c)&&kq({updateState:!0}),!g&&u&&Uq(u),o=[],r={},s={},o}))}))};var jq="CANCEL_ASSIGNMENT";var Sc=t=>{let e={},{routeKey:n,isModalAction:o,caseID:r,context:i,RemoteSystemID:s}=t;s&&(e.RemoteSystemID=s);let a=n||x2,c={caseID:r,viewType:mt.PAGE},l=yt.getComponentCache(r),p={...e,...l&&typeof l=="object"?l:{}};return Y((()=>{if(it())return Ot(a,{queryPayload:c,headers:p});let{restApi:f,reqType:g}=F(a,{ID:r,...c});return k(G.appendExcludeQueryParamToUrl(f),{method:g,headers:p},i,{includeRemoteSystemIdIfPresent:!!s})})()).pipe(x(f=>(yt.resetComponentCache(r),o?{actionInPayload:t}:{response:f.data,actionInPayload:t,headers:ke(f.headers)})),fe(": Error occurred during ajax call at release lock request : ",i))};var R1=(t,e)=>{let{isModalAction:n}=e;return Sc({routeKey:N2,isModalAction:n,...t})};var Fq=t=>{let{isModalAction:e,containerItemID:n}=t;return e?Ee.MODAL:Qn(n)},Vq=async(t,e)=>{let{childContainerItemID:n,caseViewMode:o,referencedUsers:r,response:i}=e,s=Ye(n),a=de(s),c=!1,l=i?.data?.caseInfo;l&&(c=Object.prototype.hasOwnProperty.call(l,"assignments"),l.assignments??=[]);let u={context:a,data:{...i.data,referencedUsers:r,context_data:{caseViewMode:o}}},p=[];c&&p.push({path:d.CASE_INFO.ASSIGNMENTS,allowMultiple:!0}),p.length>0?t.push(B(Ne,u,{propertiesToReplace:p})):t.push(B(Ne,u))};var iSe=(t,e)=>{let n=de(e);return(n&&n!==t?[t,n]:[t]).some(r=>qs.isContextStale(r))},Bq=t=>{let e=0,n=[];return t.pipe(te(jq),x(o=>({actionMgrID:e}=o.payload,o.payload)),V(o=>{let{isModalAction:r}=o;o.context||(o.context=de(o.containerItemID));let{context:i}=o,s=Fq(o),a=X(s,i);return iSe(i,o.containerItemID)?(o.RemoteSystemID=ce.getRemoteHeaderByContext(o.context)??void 0,Y(R1(o,{isModalAction:r}))):Y(xt(a,{loadingContext:i})).pipe(V(({continueExecution:c})=>c?(o.RemoteSystemID=ce.getRemoteHeaderByContext(o.context)??void 0,Y(R1(o,{isModalAction:r}))):(M.rejectActionByID(e),Tt)))}),V(o=>{if(o&&o.type===ve)return n.push(pe(o)),Y([n]);let{actionInPayload:r,response:i}=o,{containerItemID:s,isModalAction:a,isInCreateStage:c}=r,l=r.caseID??Zt(i);i?.data.caseInfo&&(i.data.caseInfo.availableProcesses=i.data.caseInfo.availableProcesses??[]);let u=re(s),p=de(s),m={target:a?`${d.APP.APP}/${d.MODAL}`:u,containerItemID:s,caseViewMode:a?d.PERFORM_MODE:d.REVIEW_MODE,context:p,actionMgrID:e,key:Zt(i),skipReleaseLockRequest:!1};return c&&n.push(B(dn,m)),!a&&Wn(s)&&Vq(n,{childContainerItemID:s,caseViewMode:d.REVIEW_MODE,referencedUsers:i?.data.referencedUsers,response:i}),l&&od(l),m.skipReleaseLockRequest=!0,o.actionInPayload.shouldUpdateCaseActionsInParentContext=!0,Cn(o?.response,o?.actionInPayload),n.push(B(nt,m)),Y([n])}),x(()=>(v(n),St(n,e),n=[],n)))};var Hq="NAVIGATE_TO_STEP";var sSe="Error occurred during ajax call at navigateToStep Epic : ",Gq=(t,e)=>{let{ID:n,stepID:o,containerItemID:r,context:i=de(r),isInCreateStage:s}=t,{state$:a}=e,c=s?mt.PAGE:mt.FORM,l={ID:n,stepID:o,viewType:c},{restApi:u,reqType:p}=F(D2,l),{content:m}=Mt(i),f=a.value.data[i].caseInfo.headers,g=G.appendExcludeQueryParamToUrl(u);return Y(k(`${g}`,{method:p,body:m,headers:{"if-match":f&&f.etag}},i)).pipe(x(h=>({response:h.data,actionInPayload:t,headers:ke({...f,...h.headers})})),fe(sSe,i))};var{RESOURCE_TYPES:aSe}=A,qq=(t,e)=>{let n=0,o=[];return t.pipe(te(Hq),Yt(r=>{({actionMgrID:n}=r.payload);let i,s;return ye(r.payload).pipe(V(a=>(Ff(a.context),Gq(a,{state$:e}))),V(async a=>{if(a&&Qe(a.type))return o.push(pe(a)),o;let{actionInPayload:c,response:l,headers:u}=a,{containerItemID:p,context:m=de(p),isModalAction:f}=c;Vo.clearContextedCache(c.context);let g=re(p),h=Qn(p),E=Object.freeze({target:g,containerItemID:p,context:m,containerName:h}),C=l?.data?.caseInfo?.content,I=l?.uiResources?.root?.config?.name,_=l?.uiResources?.root?.config?.context;C&&!C[O.getDefaultQualifiedName("pyViewName")]&&I&&c.viewType!=="page"&&(y.setIn(C,O.getDefaultQualifiedName("pyViewName"),I),y.setIn(C,O.getDefaultQualifiedName("pyViewContext"),_)),i=ze(l);let P={acName:g,...E};await Pe(i,c,P),s=Me(i,{...E,headers:u}),l?.nextAssignmentInfo||(s.caseViewMode=d.REVIEW_MODE),Pa(a,o),s.doDeleteCaseSummary=c.doDeleteCaseSummary,s.resourceType=aSe.ASSIGNMENT,s.caseID=Zt(i),qr(s,i),vA(s.data,c);let N=i.data?.caseInfo?.stages,z=i.data?.caseInfo?.stageID;if(CA({caseID:Zt(i),context:c.context,assignmentId:c.assignmentID,isLocalAction:!!c.isLocalAction,isModalAction:f,stages:N,stageID:z}),Wn(p)){let H=G.getPropertiesToReplace(p);Lo(s,o,"",{propertiesToReplace:H})}return o.push(B(dn,s)),s.shouldUpdateCaseActionsInParentContext=!0,o}),x(()=>(v(o),i&&s&&Cn(i,s),St(o,n),o=[],o)))}))};var Wq=t=>{let{caseID:e,context:n}=t;return Y((()=>{if(it())return Ot(df,{queryPayload:{caseID:e}});let{restApi:r,reqType:i}=F(df,{ID:e});return k(r,{method:i},n)})()).pipe(x(r=>(qe.analyseResponse(r.data),{response:r.data,actionInPayload:t,headers:ke(r.headers)})),fe(": Error occurred during ajax call at deleteCaseInCreateStage Epic : ",n))};var Kq=t=>{w.publish(d.PUB_SUB_EVENTS.CASE_EVENTS.CREATE_STAGE_DELETED,t)};var cSe=(t,e)=>{let{context:n,isModalAction:o,parentCaseInfo:r,parentCases:i}=e;if(o||r?.ID||i?.length||T.getRenderingMode()==="EMBED")return null;let s=se(t);if(!s||n!==s&&!n.startsWith(`${s}/`))return null;let a=aT(n);return a.length>0?{caseItem:s,showHome:a}:null},lSe=(t,e)=>{let n=0,o,r=[];return t.pipe(te(Vy),x(i=>({actionMgrID:n,caseType:o}=i.payload,i.payload)),V(i=>i.ignoreCaseDeletion?ye({actionInPayload:i}):Wq(i)),V(async i=>{if(i&&Qe(i.type)){let{payload:g}=i,h=pe({...i,...g,actionMgrID:n});return r.push(h),r}let{actionInPayload:s}=i,{context:a,isModalAction:c}=s,l=c?Ee.MODAL:Ee.PRIMARY,u=X(l,a),p=cSe(u,s);if(!c&&u&&!p){let g={acName:u,target:u,context:a},h=e.value.containers[u],{semanticURL:E}=Tj(h);await Pe({directUrlUpdation:!0,semanticURL:E},s,g)}if(s.isProcessAction&&s.parentCaseInfo){let g={insKey:s.parentCaseInfo.ID,className:s.parentCaseInfo.content.classID,context:s.parentContext,acTargetName:d.PRIMARY,isChild:!0},h={type:Po,payload:{...g}};r.push(h)}let m=p?p.caseItem:a,f={target:u,containerItemID:m,context:p?de(m)||m:a,caseDeleted:!0};return r.push(B(nt,f)),p&&r.push(...p.showHome),r}),x(()=>(v(r),St(r,n)===d.PROMISE_VALUE.RESOLVE&&Kq({caseType:o}),r=[],r)))},Jq=lSe;var Yq=(t,e)=>{let{assignmentID:n,actionID:o,context:r}=t,{restApi:i,reqType:s}=F(O2,{assignmentID:n,actionID:o}),{content:a}=Mt(r),c=e.value.data[r]?.caseInfo?.headers,l=G.appendExcludeQueryParamToUrl(i);return Y(k(l,{method:s,body:a,headers:{"if-match":c&&c.etag}},r)).pipe(x(u=>({response:u.data,actionInPayload:t,headers:ke(u.headers)})),fe(": Error occurred during ajax call at saveAndCloseAssignment Epic at save action : ",r))};var Zq=t=>{w.publish(d.PUB_SUB_EVENTS.CASE_EVENTS.SAVE_ASSIGNMENT_COMPLETE,t)};var P1=(t,e=!1)=>{let{action:n,state$:o,actionMgrID:r}=t,i=n.payload.autosave===!0,s,a={},c=[];return ye(n.payload).pipe(V(l=>{s=ie("caseInfo.ID","",l.context)||void 0;let u=ie("caseInfo.caseTypeID","",l.context),p=ie("caseInfo.businessID","",l.context);return a=Dn(u,p)?{caseTypeID:u,businessID:p}:{},Yq(l,o)}),Gc(l=>{if(l&&Qe(l.type))return ye(l);let{containerItemID:u}=l&&l.actionInPayload,p=Ye(u),m=re(p),f=gt(m),g=Ke(p)[0],h=g?se(g):p;!Rt(re(h))&&({containerItemID:h}=zp(h,l.actionInPayload.caseID,g));let C=se(m);n.payload.canUpdateAvailableActions&&rd(l.response);let I=ce.getRemoteHeaderByContext(l.actionInPayload.context),_={...l.actionInPayload,RemoteSystemID:I===null?void 0:I},P=N=>B(Ne,{context:N,data:{caseInfo:{...l.response.data?.caseInfo||{},headers:l.headers}}});if(h&&c.push(P(h)),f?.items?.[C]?.key===l?.actionInPayload?.caseID){let N={context:p,data:{...l.response.data,caseInfo:{...l.response.data?.caseInfo||{},headers:l.headers}}},z=G.getPropertiesToReplace(u);c.push(B(Ne,N,{propertiesToReplace:z}))}return i||c.push(B(dn,{context:u})),Pa(l,c),Sc(_)}),V(async l=>{if(l&&Qe(l.type)){let{payload:E}=l,C=pe({...l,...E,actionMgrID:r});c.push(C);let I=t.action.payload.modalLoadingContainer;if(I){let _=I.context,{context_data:P}=J(_)||{};P?.isLoading&&Oa(_)}return c}let{actionInPayload:u,response:p}=l,{context:m,containerName:f}=u,h={target:X(f,m),containerItemID:m,context:m};return u.shouldUpdateCaseActionsInParentContext=!0,Cn(p,u),!e&&!i&&c.push(B(nt,h)),c}),x(()=>(v(c),St(c,r),i||Zq({context:n.payload.context,caseID:s,assignmentID:n.payload.assignmentID,...a}),e||(c=[]),vt.isDeferredActionInProgress(n.payload.context)&&vt.handleDeferredActionCompletion(n.payload.context),c)))},uSe=(t,e)=>{let n=0,o;return t.pipe(te(ji),Yt(r=>{let{saveOnly:i}=r.payload;return{actionMgrID:n,caseType:o}=r.payload,P1({action:r,state$:e,actionMgrID:n,caseType:o},i)}))},Qq=uSe;var Xq=t=>{w.unsubscribe(d.PUB_SUB_EVENTS.EVENT_EXPRESS_LOCALACTION,t)},e7=(t,e)=>{w.subscribe(d.PUB_SUB_EVENTS.EVENT_EXPRESS_LOCALACTION,t,e)};var gT=t=>{let{callbacks:e}=t;e?.submit&&e7(o=>{e.submit(o),Xq("expressLocalActionSubmit")},"expressLocalActionSubmit")},t7=t=>{let e=0,n,o=[],r={value:we()?.getState()};return ye(t).pipe(te(ji),Yt(i=>{let{isFormValid:s}=i.payload;if({actionMgrID:e,caseType:n}=i.payload,!s){let c={type:A.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return M.rejectActionByID(e,!0,c),ye([])}return P1({action:i,state$:r,actionMgrID:e,caseType:n,actionsOut:o},!0)}))};var{LOCAL_ACTION_TYPE:n7}=d,{RESOURCE_TYPES:dSe}=A,pSe=t=>{let e=t.localActionType?.toLowerCase();return e===n7.CASE_WIDE||e===n7.EXPRESS||e&&t.isPromotedAction?ga:bE},tm=(t,e)=>{let{actionID:n,assignmentID:o,caseID:r,context:i,openActionType:s,modalLoadingContainer:a,headers:c}=t,{isProcessAction:l}=e,u=l?Lu:pSe(t),p=mt.FORM,{reqType:m}=F(u,{caseID:r,ID:o,actionID:n,viewType:p}),{restApi:f}=F(u,{caseID:r,ID:o,actionID:n,viewType:p});t.actionType=u===ga?d.CASE:d.ASSIGNMENT,f&&!f.includes("viewType=")&&(f=f.includes("?")?`${f}&viewType=${p}`:`${f}?viewType=${p}`),f=G.appendExcludeQueryParamToUrl(f);let g=a?.context??i;return Y(k(f,{method:m,headers:c},g)).pipe(x(h=>({response:h.data,actionInPayload:t,headers:ke(h.headers,"",t.headers)})),fe(`: Error occurred during ajax call at ${s} Epic : `,g))},hT=(t,e)=>{let{isProcessAction:n}=e,o=n?Lu:bE;t.openActionType=o;let r=Wt(o,t),i;if(r==="modal"){if(!ei.isOnline()||t.isAppOffline)return M.rejectActionByID(t.actionMgrID),Promise.resolve();i=Ke(t.contextName)[0]?Ke(t.contextName)[0]:re(t.contextName);let s=i?se(i):t.contextName,a=de(s),c=Wt(t.openActionType,t),l=X(c,t.context),u=pr(t.context,En(c,t.context));if(v(kt({target:l,context:u,containerItemID:u,key:t.caseID,caseViewMode:d.PERFORM_MODE,actionName:t.name,showProgress:!0,root:{type:"reference",config:{context:d.CASE_INFO.CASE_INFO_CONTENT,type:"view"}},data:{key:t.caseID,caseInfo:{ID:t.caseID}},headers:{...t.headers}})),v(oS({context:u})),t.modalLoadingContainer={target:l,context:u},!Ke(t.contextName)[0]||!t.continueExecution||!jn(a))return tm(t,e);t.saveActionPayload.modalLoadingContainer=t.modalLoadingContainer,t.saveActionPayload.canUpdateAvailableActions=!t.saveActionPayload.isModalAction;let p=Gl(t.saveActionPayload);return Y([p]).pipe(V(m=>t7(m)),V(m=>m.length===1&&Qe(m[0].type)?Y(xt(i,{loadingContext:t.context})).pipe(V(({continueExecution:f})=>f?tm(t,e):(M.rejectActionByID(t.actionMgrID),Tt))):tm(t,e)),x(m=>m))}return tm(t,e)},mSe=t=>t==="async"?"submitBulkActionAsync":"submitBulkAction",fSe=t=>t.containerItemID?.includes(d.ACTIONAREA)&&t.context?.includes(d.ACTIONAREA),nm=async(t,e,{headers:n,actionInPayload:o})=>{let{context:r,actionName:i,openActionType:s,doDeleteCaseSummary:a,modalLoadingContainer:c,skipMergeAssignmentsAndActions:l}=o,u=ze(t),p=Wt(s,o),m=c?.target??X(p,r),f,g,h=!1;!Xn(m)||In(m)&&!Wl(m,t.data.caseInfo.ID)?(g=En(p,r),hr(p)&&(g=pr(r,g)),f=g,h=!0):(In(m)?f=Vt(m,t.data.caseInfo.ID):f=se(m),g=de(f)),await Pe(u,o,{acName:m,target:m,containerName:p,context:g}),(u?.data?.caseInfo?.content===void 0||u.data.caseInfo.content!==void 0&&typeof u.data.caseInfo.content=="object"&&Object.keys(u.data.caseInfo.content).length===0)&&delete u.data?.caseMessages;let C=u.uiResources?.root,I;C?I=d.PERFORM_MODE:I=d.REVIEW_MODE;let _=Me(u,{target:m,context:g,containerItemID:f,caseViewMode:I,doDeleteCaseSummary:a,headers:n,actionName:i,isMinimizable:!1,isInCreateStage:hr(p),resourceType:dSe.ASSIGNMENT,isProcessAction:o.isProcessAction,showProgress:o.showProgress,progressMessage:o.progressMessage,assignmentID:o.assignmentID,actionType:o.actionType,skipMergeAssignmentsAndActions:l});C&&qr(_,u),hr(p)&&delete _.doDeleteCaseSummary,o.openActionType===Lc&&(_.isBulkAction=!0,_.data.caseInfo.actionButtons.main[0].jsAction=mSe(o.runningMode),_.data.caseInfo.actionButtons.secondary[0].jsAction="cancelBulkAction",_.data.caseInfo.cases=o.selectedList,_.data.caseInfo.isAssignment=o.isAssignment);let P;if(h?P=kt:o.isProcessAction||fSe(o)?P=Yr:P=dn,_.data.context_data.isProcessAction=o.isProcessAction,e.push(B(P,_)),h||e.push(B(Bs,_)),h){let H=Ke(o.contextName),ne=Vt(H,t.data.caseInfo.ID);if(ne){let j={data:{caseInfo:{headers:n}},context:ne};e.push(B(Ne,j))}}f!==se(m)&&e.push(B(pn,{target:m,containerItemID:f})),Wn(f)&&!c?.context&&Lo(_,e);let N=_.nextAssignmentInfo?.context==="other";return o.isProcessAction&&!Wr(_.nextAssignmentInfo?.className)&&!N&&Pa({response:u,actionInPayload:{...o,containerItemID:f}},e),_.caseViewMode===d.REVIEW_MODE&&e.push(B(nt,_)),_.shouldUpdateCaseActionsInParentContext=!0,y.getIn(t.data,["caseInfo","isLocalAction"])||Cn(u,_),e};var r7="OPEN_LOCAL_ACTION";var o7=(t,e)=>hT(t,e);var gSe=t=>{let e=0,n=[];return t.pipe(te(r7),x(o=>({actionMgrID:e}=o.payload,o.payload)),Ai(()=>!sd(e)),V(o=>o7(o,{actionMgrID:e})),V(async o=>{if(!o)return Tt;if(Qe(o.type)){let l=pe(o);n.push(l);let{context_data:u}=J(o.payload.context)||{};return u?.isLoading&&n.push(B(Bs,o.payload)),n}let{actionInPayload:r,headers:i,response:s}=o,{actionID:a}=r;y.setIn(s,"data.caseInfo.activeActionID",a);let c=y.getIn(s,"data.caseInfo.ID");return As(c),y.setIn(s.data,d.CASE_INFO_IS_LOCAL_ACTION,!0),r.refreshConditions&&y.setIn(s.data,d.CASE_INFO_REFRESH_CONDITIONS,r.refreshConditions),await nm(s,n,{headers:i,actionInPayload:r}),gT(r),n}),x(()=>(v(n),St(n,e),n=[],n)))},i7=gSe;var s7=t=>{let{actionID:e,context:n,openActionType:o,caseTypeID:r,bulkContextID:i="",bulkContextType:s=""}=t,a=Lc,{reqType:c,restApi:l}=F(a,{caseTypeID:r,actionID:e,bulkContextID:i,bulkContextType:s});return Y(k(l,{method:c},n)).pipe(x(u=>({response:u.data,actionInPayload:t,headers:ke(u.headers)})),fe(`: Error occurred during ajax call at ${o} Epic : `,n))};var a7=t=>{w.unsubscribe(d.PUB_SUB_EVENTS.EVENT_BULKACTION,t)},c7=(t,e)=>{w.subscribe(d.PUB_SUB_EVENTS.EVENT_BULKACTION,t,e)};var l7=(t,e)=>{let{context:n}=t,{actionMgrID:o}=e;t.openActionType=Lc;let r=Wt(Lc,t),i=X(r,n);return Y(xt(i,{loadingContext:n})).pipe(V(({continueExecution:s})=>s?s7(t):(M.rejectActionByID(o),Tt)))},u7=t=>{let{callbacks:e}=t;e?.submit&&c7(o=>{e.submit(o),a7("bulkActionSubmit")},"bulkActionSubmit")};var d7="OPEN_BULK_ACTION";var hSe=t=>{let e=0,n=[];return t.pipe(te(d7),x(o=>({actionMgrID:e}=o.payload,o.payload)),V(o=>l7(o,{actionMgrID:e})),V(async o=>{if(o&&Qe(o.type??"")){let c=pe(o);return n.push(c),n}let{actionInPayload:r,headers:i,response:s}=o,{actionID:a}=r;return y.setIn(s,"data.caseInfo.activeActionID",a),await nm(s,n,{headers:i,actionInPayload:r}),u7(r),n}),x(()=>(n.length===1&&Qe(n[0].type)?M.rejectActionByID(e):M.resolveActionByID(e),v(n),n=[],n)))},p7=hSe;var m7=t=>{let{actionID:e,context:n,cases:o,classID:r,isAssignment:i}=t,{content:s}=Mt(n,{nonEmptyAndChangedData:!0}),a=5;try{wn.getSharedState(O.getQualifiedNameForComplexRuleReferences("D_pySingleExecutionBulkActionsMeta.D_pySingleExecutionBulkActionsMeta.pxResults"))?.find(E=>E[O.getDefaultQualifiedName("pyClassName")]===r)?.pyList.split(",").includes(e)&&(a=1)}catch(h){console.error('Failed to fetch to "D_pySingleExecutionBulkActionsMeta" DP response',h)}let c=o.map(h=>({ID:h})),l=c.length/a,u=i?k2:TE,{reqType:p,restApi:m}=F(u,{actionID:e}),f=[],g=c.length;for(let h=0;h<g;h+=l){let E=c.slice(h,h+l);i?s.assignments=E:s.cases=E,E.length&&f.push(Y(k(m,{method:p,body:s},n)).pipe(x(C=>{let{data:I,headers:_}=C;return{response:I,actionInPayload:t,headers:ke({..._})}}),fe("Error occurred during ajax call at submitbulkaction Epic : ",n)))}return Iv(f)};var f7=t=>{w.publish(d.PUB_SUB_EVENTS.EVENT_BULKACTION,t)};var g7="SUBMIT_BULK_ACTION";var h7=t=>{let e=0,n=[],o,r="";return t.pipe(te(g7),Yt(i=>{let{isFormValid:s}=i.payload;if({actionMgrID:e}=i.payload,!s){let a={type:A.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return M.rejectActionByID(e,!0,a),ye([])}return ye(i.payload).pipe(V(a=>(o=a,m7(o))),V(a=>{let c=0,l=0,u=[],{containerItemID:p,context:m}=o;return a.forEach(f=>{let{response:g}=f;c+=Number(g.successCount),l+=Number(g.failureCount),l&&g.results.forEach(h=>{h.status!=="200"&&h.error&&h.error.errorDetails&&h.error.errorDetails.forEach(E=>{u.push({ID:h.BusinessID,message:E.localizedValue})})})}),r=`${c} record(s) updated`,f7({submitResponse:a}),o.target=T.getRenderingMode()==="HYBRID"?re(p):`${d.APP.APP}/${Ee.MODAL}`,n.push(B(nt,{containerItemID:p,context:m,target:o.target,skipReleaseLockRequest:!0})),l&&n.push(B(zf,{messages:[{type:"error",message:l===1?"1 record failed to update":`${l} records failed to update`,errorDetails:u,showHeader:!1}],context:Ye(m)||m,category:"HTTP",showHeader:!1})),n}),x(()=>(M.resolveActionByID(e,r),v(n),n=[],n)))}))};var y7=t=>{let{actionID:e,context:n,cases:o}=t,{content:r}=Mt(n,{nonEmptyAndChangedData:!0});r.cases=o.map(c=>({ID:c}));let i=TE,{reqType:s,restApi:a}=F(i,{actionID:e,runningMode:"async"});return Y(k(a,{method:s,body:r},n)).pipe(x(c=>{let{data:l,headers:u}=c;return{response:l,actionInPayload:t,headers:ke({...u})}}),fe("Error occurred during ajax call at submitbulkactionasync Epic : ",n))};var S7=t=>{w.publish(d.PUB_SUB_EVENTS.EVENT_BULKACTION,t)};var E7="SUBMIT_BULK_ACTION_ASYNC";var A7=t=>{let e=0,n=[],o,r={};return t.pipe(te(E7),Yt(i=>{let{isFormValid:s}=i.payload;if({actionMgrID:e}=i.payload,!s){let a={type:A.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return M.rejectActionByID(e,!0,a),ye([])}return ye(i.payload).pipe(Yt(a=>(o=a,y7(o))),x(a=>{let{containerItemID:c,context:l}=o,{response:u}=a;return r={caseID:u.caseID,caseTypeID:"BackgroundJob"},S7({submitResponse:u}),o.target=`${d.APP.APP}/${Ee.MODAL}`,n.push(B(nt,{containerItemID:c,context:l,target:o.target,skipReleaseLockRequest:!0})),n}),x(()=>(M.resolveActionByID(e,r),v(n),n=[],n)))}))};var C7=(t,e)=>hT(t,e);var ySe=t=>{let e=0,n=[];return t.pipe(te(W_),x(o=>({actionMgrID:e}=o.payload,o.payload)),V(o=>{let i=Wt(Lu,o),s=X(i,o.context);return Y(xt(s,{loadingContext:o.context})).pipe(V(({continueExecution:a})=>a?(Ff(o.context),C7(o,{actionMgrID:e,isProcessAction:!0})):(M.rejectActionByID(o.actionMgrID),Tt)))}),V(async o=>{if(o&&Qe(o.type)){let a=pe(o);return n.push(a),n}let{actionInPayload:r,headers:i,response:s}=o;return await nm(s,n,{headers:i,actionInPayload:r}),n}),x(()=>(Or(n),St(n,e),n=[],n)))},I7=ySe;var _7=t=>{let e=0,n=[];return t.pipe(te(tt,st),x(o=>({actionMgrID:e}=o.payload,o.payload)),V(o=>{let{containerItemID:r,caseID:i,context:s,caseDeleted:a,skipReleaseLockRequest:c,currentCaseViewMode:l,isProcessAction:u,isInCreateStage:p,deleteWork:m}=o,f=l===d.PERFORM_MODE,g=i&&f;return m?ye([]):u&&p?Sc(o):r===s&&!a&&!c&&g?Sc(o):r?.includes(d.MODAL)&&Kr(cc(r))===d.REVIEW_MODE?Sc(o):ye([])}),V(o=>(o&&Qe(o.type)&&n.push(pe(o)),n)),x(()=>(v(n),St(n,e),n=[],n)))};var SSe=t=>{let{context:e,containerItemID:n}=t.payload;if(typeof n!="string"||!n)return!1;let o=de(n);return(o&&o!==e?[e,o]:[e||n]).some(i=>typeof i=="string"&&!!i&&qs.isAssignmentStale(i))},b7=t=>t.pipe(te(ku),iA(()=>oA(100)),x(e=>{if(SSe(e))return v({type:os,payload:e.payload}),[];let{actionMgrID:n,isChildCase:o,isModalAction:r,isProcessAction:i,isDataObject:s,skipReleaseLockRequest:a,isInCreateStage:c,containerItemID:l,context:u}=e.payload;return M.resolveActionByID(n),w.publish(d.PUB_SUB_EVENTS.EVENT_SHOW_CANCEL_ALERT,{isModalAction:r,hideDelete:i?!1:o,isDataObject:s,skipReleaseLockRequest:a,isInCreateStage:c,containerItemID:u||l}),[]})),T7=t=>t.pipe(te(CE),iA(()=>oA(100)),x(e=>{let{actionMgrID:n,context:o,containerName:r,containerItemID:i}=e.payload,s=X(r,o);return M.resolveActionByID(n),v(B(pn,{containerItemID:i,target:s,doDeleteCaseSummary:!1})),[]}));var v7=t=>{let e=0,n=[],o="";return t.pipe(te(ls),x(r=>({actionMgrID:e}=r.payload,r.payload)),V(r=>Zb(r)),V(async r=>{if(r&&r.type===ve)return n.push(pe(r)),{actionsOut:n,actionInPayload:{skipPageInstructions:!0}};let{actionInPayload:i,response:s,headers:a}=r,c=i.containerName,l=X(c,i.context),u=rt(l,c,i.context);u=pr(i.context,u);let{pageReference:p,targetProperty:m,index:f,subscriptFieldName:g,pageGroupName:h,actionType:E,isPageGroup:C}=i,I=p?.startsWith(A.OBJECT_INFO.OBJECT_INFO),_=null;I?(_=qe.transformCaseData(s),_.uiResources.root.config.context=`${p}${m}[${f}]`):_=s;let P=_?.uiResources?.root?.config?.name??i.interestPageActionID,N=ze(_);N.key=i.ID,N.data?.caseInfo?(N.data.caseInfo.ID=i.ID,D8(N,f,g,E,h)):N.data?.objectInfo&&(N.data.objectInfo.ID=i.ID);let{interestPageActionID:z,editType:H,isLocalAction:ne,actionID:j}=i,oe={isMultiRecordData:!0,viewName:i.viewID,parentContext:i.context,interestPage:i.interestPage,interestPageActionID:z,editType:H,isLocalAction:ne,actionID:j};N.uiResources.context_data.modalView=oe;let Ae=J(i.context)?.context_data?.caseInfo,he=`${i.pageReference}${i.targetProperty}`,Oe=nP(Ae,he,i.index);N.uiResources.context_data.caseInfo={...N.uiResources.context_data.caseInfo,content:y.mergeDeep(N.uiResources.context_data.caseInfo?.content,Oe?.content)};let He=Q.getProperty(d.CASE_INFO.REMOTESYSTEMID,"",i.context);await Pe(N,i,{acName:l,context:u});let Xe={target:l,context:u,containerItemID:u,headers:a,index:f,subscriptFieldName:g,pageGroupName:h,isPageGroup:C};He&&(Xe.headers={...Xe.headers,RemoteSystemID:He});let De=Me(N,Xe);De.resourceStatus=i.actionType,De.isMultiRecordData=!0,De.readOnly=i.readOnly,De.parentContext=i.context,De.heading=i.heading,De.data.caseInfo&&H===d.ACTION&&(De.data.caseInfo={...De.data.caseInfo,...$8(i),isLocalAction:i.isLocalAction}),De.clearStateMachine=!1,i.viewName=P;let Et=Jt(l,De);o=u,n.push(Et);let an={changedListProperty:[],leafProperty:[]};return H===d.ACTION&&(Ue.registerForServerChanges(),an=Nn.getServerProperties(De.data,u)),{actionsOut:n,actionInPayload:i,serverProps:an}}),x(({actionInPayload:r,serverProps:i={changedListProperty:[],leafProperty:[]}})=>{if(Zc(n)?M.rejectActionByID(e):M.resolveActionByID(e),r.skipPageInstructions||x8(o,r.pageReference,r.targetProperty,r.index,r.actionType),v(n),n=[],r.editType===d.ACTION){Nn.handleServerChanges(o,i.changedListProperty,i.leafProperty),Ue.unRegisterForServerChanges();let s=d.getProperty(A.CASE_INFO.CASE_INFO_CONTENT),a=y.convertClipboardPageToPageRefNotation(r.interestPage),c=s+a;r.columns.forEach(l=>{let u=ge.trimAnnotation(l.config.value),p=u.startsWith(".")?u:`.${u}`,m=ie(p,c,o),f=ft(p.split(".").pop(),l.config.classID),g=y.getFullPropertyReference([c,p.substring(1)]);be.isFieldExists(o,g)||be.addFieldNode(o,c,r.viewName,p,m,{isDeclarativeTarget:!!f?.isDeclarativeTarget,context:o,propertyName:p,pageReference:c,value:l.config.value,isInsideList:/\[\d+\]/.test(c)||/\[\d+\]/.test(p)})})}return n}))};var ESe=(t,e=!1)=>t===d.ACTION?e?Kt.REFRESH_CASE_DATA:Kt.REFRESH_ASSIGNMENT_DATA:Kt.REFRESH_CASE_VIEW,R7=t=>{let{context:e}=t,o={...Mt(e).content,contextData:!1},r=dd(e);y.isEmpty(r)||(o=ol(r,o));let i=ESe(t.editType,t.isLocalAction),{restApi:s,reqType:a}=F(i,{ID:!t.isLocalAction&&t.editType===d.ACTION?t.assignmentID:t.ID,actionID:t.actionID,viewID:t.viewID}),c=s;return t.editType===d.ACTION&&(c+=`?operation=${t.operationFlag}`,o.interestPageActionID=t.interestPageActionID),o.interestPage=t.interestPage,Y(k(c,{method:a,body:o,headers:t.headers},e)).pipe(x(l=>({actionInPayload:t,response:l.data,headers:ke(l.headers)})),fe(": Error occurred during getEmbeddedDataView request : ",e))};var ASe=()=>({rootView:null,data:null,uiResources:null,containerContext:null}),P7=(t,e,n)=>typeof n=="string"?`${t}${e}.${n}`:`${t}${e}[${n}]`,CSe=t=>{let{containerName:e,context:n}=t;if(!e)return{context:n,containerContext:null,target:null};let o=X(e,n),r=rt(o,e,n)||e,i=pr(n,r);return{context:i,containerContext:i,target:o}},ISe=(t,e,n,o,r)=>{if(r){let i=qe.transformCaseData(t);return i.uiResources.root.config.context=P7(e,n,o),i}return t},_Se=(t,e,n)=>{let o=c=>typeof c=="object"&&c!==null,r=(c,l)=>{if(o(c))return c[l]},s=e.replace(/^\./,"").split("."),a=t;for(let c of s)a=r(a,c);return typeof n=="string"?r(a,n)??null:Array.isArray(a)?a[n]??null:null},bSe=(t,e,n,o,r)=>{let i=t.data?.caseInfo?.content;if(i){let a=_Se(i,o,r);a&&v(wa({context:e,reference:n,value:a}))}let s=t.uiResources?.context_data;s&&v(wa({context:e,reference:d.CONTEXT_DATA,value:s}))},N7=t=>{let e=0,n=[];return t.pipe(te(xE),x(o=>{let{payload:r}=o;return{actionMgrID:e}=r,r}),V(o=>R7(o)),Gc(async o=>{let r=ASe();if(o?.type===ve)return n.push(pe(o)),{actionsOut:n,actionInPayload:{skipPageInstructions:!0},responseData:r};let{actionInPayload:i,response:s,headers:a}=o,{pageReference:c,targetProperty:l,index:u,containerName:p}=i,m=c?.startsWith(A.OBJECT_INFO.OBJECT_INFO),{context:f,containerContext:g,target:h}=CSe(i),E=ISe(s,c,l,u,m),C=ze(E);C.key=i.ID;let I=P7(c,l,u);if(await Pe(C,i,p?{acName:h,context:f}:{context:f}),p&&h){let z=Me(C,{target:h,context:f,containerItemID:f,headers:a,index:u});z.resourceStatus=i.actionType,z.isMultiRecordData=!0,z.readOnly=i.readOnly,z.parentContext=i.context,z.clearStateMachine=!1;let H=Jt(h,z);n.push(H)}else bSe(C,f,I,l,u);let P=C.uiResources?.root||null;return P?.config&&(P.config.context=I),r.rootView=P,r.data=C.data,r.uiResources=C.uiResources,r.containerContext=g,{actionsOut:n,actionInPayload:i,responseData:r}}),x(({actionsOut:o,responseData:r})=>{Zc(o)?M.rejectActionByID(e):M.resolveActionByID(e,r);let i=o;return n=[],i}))};var O7=(t,e)=>{let{pageReference:n,isMultiRecordData:o}=e,r=Q.getPropertyValue(d.getProperty(A.CASE_INFO.CASE_INFO_ID),n,t.parentContext),i=Q.getPropertyValue(d.CONTEXT_DATA_MODAL_VIEW.VIEW_NAME,n,t.parentContext),s=Q.getPropertyValue(A.CASE_INFO.ASSIGNMENT_ID,n,t.parentContext),a=Q.getPropertyValue(d.CONTEXT_DATA_MODAL_VIEW.CONTEXT_DATA_MODAL_VIEW,n,t.parentContext),{interestPage:c,interestPageActionID:l,actionID:u,isLocalAction:p}=a,f=t.pageReference.substring(0,t.pageReference?.lastIndexOf(".")).replace(d.getProperty(d.CASE_INFO.CASE_INFO_CONTENT),"");a.editType==="action"?cd(r,s,u,t.parentContext,c,l,p,o,a.editType):rl(r,i,t.parentContext,f,{})};var TSe=(t,e)=>{if(t&&e.editType==="action"&&t.type!==ve){let{context:n,pageReference:o}=e,r={context:n},{response:i}=t,s=o?.startsWith(A.OBJECT_INFO.OBJECT_INFO),a=null;s?(a=qe.transformCaseData(i),a.uiResources.root.config.context=o):a=i;let c=ze(a);c.key=e.ID,c.data?.caseInfo?c.data.caseInfo.ID=e.ID:c.data?.objectInfo&&(c.data.objectInfo.ID=e.ID);let l=Me(c,r);l.skipValidation=!0;let u=B(Ne,l);Ue.registerForServerChangesSync(),v(u),Ue.unRegisterForServerChanges()}return t},x7=t=>{let e="",n=[],o;return t.pipe(te(DE),Yt(r=>{o=r.payload;let{isFormValid:i}=r.payload;if({actionMgrID:e}=r.payload,!i){let s={type:A.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return M.rejectActionByID(e,!0,s),vt.handleDeferredActionCompletion(r.payload.context),ye([])}return ye(r.payload).pipe(V(s=>(o=s,Zb(o))),V(async s=>TSe(s,o)),V(async s=>{if(s&&s.type===ve){let m=pe(s);return n.push(m),n}let{containerItemID:a,context:c,pageReference:l,interestPage:u}=o,p=u?.replace(/\(\d+\)$/,"");return Wz(c,o.parentContext,l.startsWith(A.OBJECT_INFO.OBJECT_INFO_CONTENT)?d.getProperty(A.OBJECT_INFO.OBJECT_INFO_CONTENT):d.getProperty(A.CASE_INFO.CASE_INFO_CONTENT),!1,p),n.push(B(nt,{containerItemID:a,context:c,target:o.target,skipReleaseLockRequest:!0})),n}),x(()=>{if(Zc(n))M.rejectActionByID(e),vt.handleDeferredActionCompletion(o.context);else{M.resolveActionByID(e),vt.handleDeferredActionCompletion(o.context);let{pageReference:s}=r.payload,a=Q.getPropertyValue(d.CONTEXT_DATA_MODAL_VIEW.IS_MULTI_RECORD_DATA,s,o.parentContext);a?O7(o,{isMultiRecordData:a,pageReference:s}):ld(o.parentContext,d.getProperty(d.CASE_INFO.CASE_INFO_CONTENT),{})}return v(n),n=[],n}))}))};var vSe="Error ocurred during ajax call at getDescendants Epic : ",D7=t=>{let{caseID:e,headers:n,debugInfo:o,context:r}=t,i=F(v2,{caseID:e}),{restApi:s}=i,{reqType:a}=i;return Y(k(s,{method:a,headers:{...n,...o&&{...Ge.addDebugHeaders(o)}}},r)).pipe(x(c=>({actionInPayload:t,response:c.data,headers:ke({...n,...c.headers})})),fe(vSe,r))};var $7=t=>{let e=0,n=[];return t.pipe(te(Jw),x(o=>({actionMgrID:e}=o.payload,o.payload)),V(o=>D7(o)),V(async o=>{if(o&&Qe(o.type))return n.push(pe(o)),n;let{actionInPayload:r,response:i}=o,s={};if(y.setIn(s,"caseInfo.childCases",i?.childCases??[]),i?.uiResources?.resources&&Rf(i.uiResources.resources),i?.uiResources?.components)try{await Do(i.uiResources.components)}catch(c){return n.push(pe({payload:{...r,err:c}})),n}i?.uiResources?.localeReferences&&y.setIn(s,"localeReferences",i.uiResources.localeReferences),i?.uiResources?.childCases_context_data&&y.setIn(s,"childCases_context_data",i.uiResources.childCases_context_data);let a={data:s,context:r?.context};return n.push(B(Ne,a)),n}),x(()=>(v(n),St(n,e),n=[],n)))};var w7=(t,e)=>{let n={type:A.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};M.rejectActionByID(t,!0,n),vt.handleDeferredActionCompletion(e)},M7=(t,e,n)=>{jn(e)&&t.push(B(nt,{containerItemID:n,skipReleaseLockRequest:!0}))},k7=({itemData:t,workareaContainerData:e,subscriptData:n,pageGroupName:o,activeWorkArea:r,subscriptFieldName:i,actionMgrID:s,containerItemID:a})=>{let c={referenceList:t?.referenceList,ID:e?.caseInfo?.ID,index:n[i],containerName:A.MODAL,pageReference:A.CASE_INFO.CASE_INFO_CONTENT,viewID:A.VIEW_NAMES.DATA_OBJECT_CREATE_VIEW,skipSemanticUrl:!0,actionType:A.RESOURCE_STATUS.CREATE,interestPage:`.${o}.${n[i]??""}`,targetProperty:`.${o??""}`,pageGroupName:o,context:r??"",subscriptFieldName:i};return{type:ls,payload:{isInCreateStage:!1,isModalAction:!0,parentContext:"",target:"",...c,actionMgrID:s,containerItemID:a,doDeleteCaseSummary:!1,isFormValid:!0}}};var L7=t=>{let e="",n=[],o,r={};return t.pipe(te($E),Yt(i=>{o=i.payload;let{isFormValid:s}=i.payload;return{actionMgrID:e}=i.payload,s?ye(i.payload).pipe(V(a=>(o=a,ye({}))),V(async()=>{let{containerItemID:a}=o,c=J(a),l=a,u=c?.dataInfo.content;delete u.classID;let p=Ye(l),m=Ke(p).length,f=Ke(p)[m-1]?se(Ke(p)[m-1]):p,g=re(a),h=Ze(g,a)||{},E=h?.referenceList?.replaceAll(".",""),C=h?.subscriptName,I=J(f),_={...I,caseInfo:{content:{...u}}},P={containerItemID:f,data:_};n.push(B(dn,P)),M7(n,l,a);let N=k7({itemData:h,workareaContainerData:I,subscriptData:u,pageGroupName:E,activeWorkArea:f,subscriptFieldName:C,actionMgrID:e,containerItemID:a});return n.push(N),r=u,n}),x(()=>(M.resolveActionByID(e,r),v(n),n=[],n))):(w7(e,i.payload.context),ye([]))}))};var RSe=[JG,gq,Pq,Dq,i7,p7,h7,A7,I7,zq,qq,Bq,_7,Qq,Jq,b7,T7,v7,N7,x7,$7,L7],U7=RSe;var{RESOURCE_TYPES:N1}=A,yT="pyCasePreview",PSe=(t,e,n,o,r)=>{t&&r===Ee.PREVIEW?(n.data.caseInfo.progress=!1,delete n.root,Cn(n,n),o.actionsOut=B(dn,{...n,containerName:r})):t?(o.actionsOut=[],o.actionsOut.push(B(pn,{target:e,containerItemID:t}))):o.actionsOut=B(kt,{...n,containerName:r})},NSe=(t,e)=>{let n=G.isObjectCaseType(t.caseClassName);if(t.key&&!n){let o=re(t?.context),r=Vt(o,t.key),i=t?.context;(r||t.updateData||Hj(i))&&e.actionsOut.push(B(Ne,t))}else e.actionsOut.push(B(Ne,t))},OSe=t=>{let{containerName:e,updateData:n,viewLoadingContainer:o}=t,r=e||qt.getTargetViewContainerName(Vr),i=o?.target??X(r,t.context),s=o?.context??(e===Ee.PREVIEW&&n?t.context:rt(i,r,t.context,{buildNew:!!e}));return{target:i,context:s}},xSe=(t,e)=>{let n=F("loadView",e);t.viewContext===N1.PAGE&&(n=F(Vr,{page:t.viewName,pageClass:t.pageClass}));let o=O.getDefaultQualifiedName(yT);return t.containerName===Ee.PREVIEW&&t.caseId&&t.viewContext!==N1.PAGE&&(t.viewName===o||t.viewName===yT)&&(n=F(Gt,{caseID:t.caseId,params:{pageName:o}})),n},DSe=t=>t.pipe(te(Ou),x(e=>e.payload),Ai(e=>!sd(e.actionMgrID)),V(e=>{let n={caseID:e.caseId,viewID:e.viewName,caseClassName:e.caseClassName,RemoteSystemID:e.RemoteSystemID};if(e.containerName===Ee.PREVIEW&&e.context&&e.caseId&&!e.updateData){let s=X(Ee.PREVIEW,e.context),a=rt(s,Ee.PREVIEW,e.context,{buildNew:!0}),c=decodeURI(e.caseId);v(kt({...e,context:a,target:s,containerItemID:a,key:c,caseViewMode:d.REVIEW_MODE,root:{type:"reference",config:{context:d.getProperty(d.CASE_INFO.CASE_INFO_CONTENT),name:e.viewName,type:"view"}},data:{key:c,caseInfo:{ID:c,progress:!0,error:!1,caseTypeID:e.caseClassName,content:{classID:e.caseClassName}}}})),e.viewLoadingContainer={target:s,context:a}}let o={};if(n.RemoteSystemID)o.RemoteSystemID=n.RemoteSystemID;else if(ce.isRemoteCase(n.caseClassName)){let{RemoteSystemID:s}=ce.getRemoteCase(n.caseClassName);o.RemoteSystemID=s}let{restApi:r,reqType:i}=xSe(e,n);return Y(k(G.appendExcludeQueryParamToUrl(r),{method:i,headers:o},e.context)).pipe(x(s=>{let a=decodeURI(e.caseId),c="";return typeof s.data=="string"?s.data?c=JSON.parse(s.data):(console.error("response data is empty!!"),c={}):c=s.data,{response:{...c,key:a},actionConfig:e,headers:ke(s.headers),rootView:y.getIn(c,d.ROOT)}}),fe(": Error ocurred during ajax call at loadView Epic : ",e.viewLoadingContainer?.context??e.context))}),V(async e=>{let n={};if(e?.type===ve){if(n.actionsOut=pe(e),e?.payload?.context?.includes(Ee.PREVIEW)){let a={...J(e.payload.context),caseInfo:{progress:!1,error:!0}},c=X(Ee.PREVIEW,e.payload.context);n.actionsOut=B(dn,{key:a.key,target:c,containerName:Ee.PREVIEW,context:e.payload.context,containerItemID:e.payload.context,data:a})}return n}try{n.actionMgrID=e?.actionConfig?.actionMgrID,n.rootView=e?.rootView;let{actionConfig:s,response:a,headers:c}=e;e?.actionConfig?.skipAssignmentsUpdate&&(delete a?.data?.caseInfo?.assignments,delete a?.data?.caseInfo?.availableActions,delete a?.data?.caseInfo?.availableProcesses);let{containerItemID:l,containerName:u}=s,{target:p,context:m}=OSe(s);s.context=m;let f={acName:p,context:m},g={};g=ze(a),g.directUrlUpdation=!1,await Pe(g,s,f);let h={...s,target:p,context:m,containerItemID:l||m,headers:c},E=Me(g,h);if(E.resourceType=N1.CASE,s.viewName===d.PY_CONFIRM&&(E.caseViewMode=d.REVIEW_MODE,y.setIn(E.data,["context_data","caseViewMode"],d.REVIEW_MODE)),u&&!E.updateData){E.caseViewMode=d.REVIEW_MODE,y.setIn(E.data,["context_data","caseViewMode"],E.caseViewMode);let C=re(E?.context),I=Vt(C,E.key);PSe(I,C,E,n,u)}else{E.preserveClientChanges=!0,n.actionsOut=[],u===Ee.PREVIEW&&n.actionsOut.push({type:Rr,payload:{context:m,skipMergeAssignmentsAndActions:!1}});let{viewName:C}=s;C===O.getDefaultQualifiedName(yT)&&Cn(E,E),NSe(E,n)}}catch(s){console.error(s),n.rootView={type:"error",payload:s}}let{caseId:o,context:r,viewName:i}=e.actionConfig;return i===O.getDefaultQualifiedName(yT)&&Lj({caseId:o,context:r}),n}),x(({rootView:e,actionsOut:n,actionMgrID:o=0})=>(M.resolveActionByID(o,e),qe.setNeedsMapping(!1),n))),$Se=t=>{let e=0,n=[];return t.pipe(te(Un),x(o=>({actionMgrID:e}=o.payload,o.payload)),V(o=>{w.publish(A.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_STARTED);let{debugInfo:r,context:i,viewName:s,className:a,skipSemanticUrl:c=!1,containerName:l=qt.getTargetViewContainerName(Vr)}=o,u=r&&{...Ge.addDebugHeaders(r)},p=X(l,i),m="";if(!c){let{semanticURL:h,activate:E,activateContainerActionPayload:C}=yV(s,a,p);if(m=h,E)return pd(C),ye({type:mn,activateContainerActionPayload:C,actionConfig:o})}let g=se(p)?xt(p,{loadingContext:i}):Promise.resolve({continueExecution:!0,removeActionPayload:{}});return Y(g).pipe(V(({continueExecution:h,removeActionPayload:E})=>h?Y((()=>{if(it())return Ot("openPage",{pageName:s,pageClass:a,headers:u});let{restApi:I,reqType:_}=F(Vr,{page:s,pageClass:a});return k(I,{method:_,headers:u},i)})()).pipe(x(I=>{let _={};return typeof I.data=="string"?_=JSON.parse(I.data):_=I.data,{response:{..._,key:m,semanticURL:m},actionConfig:o,headers:ke(I.headers),removeActionPayload:E,skipSemanticUrl:c}}),fe(": Error ocurred during ajax call at showPage Epic : ",o.context)):(M.rejectActionByID(e),Tt)))}),V(async o=>{let r={};if(r.actionManagerID=o?.actionConfig?.actionMgrID,o&&o.type===ve)return n.push(pe(o)),r;let{type:i}=o,{actionConfig:s,skipSemanticUrl:a}=o,c=s.containerName||qt.getTargetViewContainerName(Un),l=X(c,s.context);w.publish(A.PUB_SUB_EVENTS.EVENT_PREVIEW_DISMISS,{pageName:o.actionConfig.viewName,pageClass:o.actionConfig.className}),w.publish(A.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_INIT,{pageName:o.actionConfig.viewName,pageClass:o.actionConfig.className});let{remoteCasePayload:u,updatedType:p}=EV(i,o,s,l);if(i=p??i,s.isDeferLoaded){let{response:m,headers:f={}}=o,{isCreateDataObject:g,context:h}=s,E=ze(m,{isCreateDataObject:g});E.directUrlUpdation=!a,await Pe(E,s,{acName:l,context:h});let _=Me(E,{containerItemID:h,target:l,headers:f,context:h});r.rootView=y.getIn(E,d.ROOT),n.push(B(Ne,_))}else if(i===mn){let{activateContainerActionPayload:{semanticURL:m,containerItemID:f}}=o,g=de(f),h={acName:l,context:g};s.isTraditionalRemoteCase||await Pe({directUrlUpdation:!0,semanticURL:m},s,h,!0),n.push(B(pn,{target:l,containerItemID:f}))}else{let m=rt(l,c,s.context),{response:f,headers:g={},removeActionPayload:h}=o,E=ze(f,{isCreateDataObject:s.isCreateDataObject});E.directUrlUpdation=!a;let C={acName:l,context:m},I=Kr(m);await Pe(E,s,C);let _={target:l,context:m,containerItemID:m,headers:g,debugInfo:s.debugInfo,currentCaseViewMode:I,referenceList:s?.referenceListStr,subscriptName:s?.subscriptName,pageName:s.viewName},P=Me(E,_);P.resourceType=A.PAGE,s.isCreateDataObject&&(P.resourceType=A.RESOURCE_TYPES.DATA,P.resourceStatus=A.RESOURCE_STATUS.CREATE,delete P.data.caseInfo,P.referenceList=s.referenceListStr,P.subscriptName=s.subscriptName),AV(s,u,P),P.data??={},P.data.traditionalGadgetId=G.getUniqueGadgetId();let N=Jt(l,P);h.containerItemID&&yr(N)&&n.push(B(nt,{containerItemID:h.containerItemID,target:l})),n.push(N)}return w.publish(A.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_DONE,{target:l,pageName:o.actionConfig.viewName,pageClass:o.actionConfig.className}),r}),x(({actionManagerID:o=0,rootView:r})=>{M.resolveActionByID(o,r),v(n),n=[]}),ps())},wSe=[DSe,$Se],z7=wSe;var MSe="Error occurred during ajax call at showData Epic : ",kSe=(t,e,n)=>{let{context:o,pageName:r,dataContext:i,dataContextParameters:s,semanticURL:a,skipSemanticUrl:c,RemoteSystemID:l}=t,{removeActionPayload:u}=e,p={};return p.RemoteSystemID=l,Y((()=>{if(it())return Ot(dr,{queryPayload:{pageName:r},body:{dataContext:i,dataContextParameters:s}});let{restApi:f,reqType:g,body:h}=F(dr,{pageName:r,dataContext:i,dataContextParameters:s});return k(f,{method:g,headers:p,body:h},o)})()).pipe(x(f=>({response:{...f.data,key:a,semanticURL:a},actionConfig:t,headers:ke(f.headers),removeActionPayload:u,skipSemanticUrl:c})),fe(MSe,t.context,String(n)))},O1=kSe;var{RESOURCE_TYPES:ST}=A,LSe=(t,e)=>+(t>e)-+(t<e),USe=(t,e)=>{if(!t)return"";let n=Object.entries(e??{}).sort(([r],[i])=>LSe(r,i)),o=new URLSearchParams(n.map(([r,i])=>[r,String(i)])).toString();return o?`${t}?${o}`:t},zSe=(t,e)=>{let{context:n,pageName:o,dataContext:r,dataContextParameters:i,skipSemanticUrl:s=!1,isDeferLoaded:a=!1,parentAction:c="",resourceType:l,containerName:u,RemoteSystemID:p,forceCoexistence:m=!1}=t,f=X(u,n),g="",h=USe(r,i),E={context:n,pageName:o,dataContext:r,dataContextParameters:i,semanticURL:g,skipSemanticUrl:s,containerName:u,isDeferLoaded:a,parentAction:c,resourceType:l,RemoteSystemID:p,dataKey:h,forceCoexistence:m};if(!s){g=Nt(dr,{pageName:o,dataViewName:r},i),E.semanticURL=g;let C=g||h,{activate:I,activateContainerActionPayload:_}=_s(ST.PAGE,f,{semanticURL:C});return I?ye({type:mn,activateContainerActionPayload:_&&{..._,semanticURL:g},actionConfig:t}):Y(xt(f,{loadingContext:n})).pipe(V(({continueExecution:P,removeActionPayload:N})=>P?O1(E,{removeActionPayload:N},e):(M.rejectActionByID(e),Tt)))}return O1(E,{removeActionPayload:{}},e)},jSe=(t,e)=>t.isCoexistenceCreate?ye({isCoexistenceCreate:!0,actionConfig:t}):t.isCoexistenceLanding?ye({isCoexistenceLanding:!0,actionConfig:t}):t.isCoexistenceHarness?ye({isCoexistenceHarness:!0,actionConfig:t}):zSe(t,e),x1=async(t,e,n,o)=>{let{containerName:r,context:i}=t,s=X(r,i),a=rt(s,r,i)??"";e.directUrlUpdation=!1,await Pe(e,t,{acName:s,context:a});let c=Me(e,{target:s,context:a,containerItemID:a,headers:{}});return c.resourceType=ST.DATA,c.key=c.key||n,o.push(Jt(s,c)),o},FSe=async(t,e)=>{let{actionConfig:n}=t,{containerName:o,context:r,createClassName:i}=n,s=X(o,r),a=rt(s,o,r)??"";return x1(n,cV(i,a),`create:${i}`,e)},VSe=async(t,e)=>{let{actionConfig:n}=t,{containerName:o,context:r,className:i,harnessName:s,label:a,levelC:c,readOnly:l,model:u}=n,p=X(o,r),m=rt(p,o,r)??"",f={className:i,harnessName:s,label:a,levelC:c,readOnly:l,model:u},g=`landing:${i}:${s}:${c??""}:${u??""}`;return x1(n,lV(f,m),g,e)},BSe=async(t,e)=>{let{actionConfig:n}=t,{containerName:o,context:r,className:i,harnessName:s,label:a,readOnly:c,preActivity:l,preActivityParams:u,preActivityDynamicParams:p}=n,m=X(o,r),f=rt(m,o,r)??"",g={className:i,harnessName:s,label:a,readOnly:c,preActivity:l,preActivityParams:u,preActivityDynamicParams:p},h=`harness:${i}:${s}:${a??""}`;return x1(n,uV(g,f),h,e)},HSe=async(t,e)=>{let{actionConfig:n,headers:o,response:r,skipSemanticUrl:i}=t,s=X(n.containerName,n.context),a=ze(r??{});a.directUrlUpdation=!i,Lf(a,{dataContext:n.dataContext,dataContextParameters:n.dataContextParameters,forceCoexistence:n.forceCoexistence}),await Pe(a,n,{acName:s,context:n.context});let c=Me(a,{target:s,headers:o,context:n.context,containerItemID:t.containerItemID});return e.push(B(Ne,c)),e},GSe=async(t,e)=>{let{actionConfig:n,activateContainerActionPayload:o}=t,r=X(n.containerName,n.context),{semanticURL:i,containerItemID:s}=o??{},a=de(s??null),c=a?J(a):void 0;a&&c&&dV(a,c,{dataContext:n.dataContext,dataContextParameters:n.dataContextParameters,forceCoexistence:n.forceCoexistence}),PA(a)&&pd(o),i&&await Pe({directUrlUpdation:!0,semanticURL:i},n,{acName:r,context:a},!0),e.push(B(pn,{target:r,containerItemID:s,resourceType:ST.DATA}))},qSe=(t,e)=>{let{actionConfig:n,response:o}=t;e.push(B(Ne,{context:n.context,data:o?.data}))},WSe=async(t,e)=>{let{actionConfig:n,headers:o,response:r,skipSemanticUrl:i,removeActionPayload:s}=t,{containerName:a,context:c}=n,l=X(a,c),u=rt(l,a,c),p=c?Kr(c):void 0,m=ze(r??{});m.directUrlUpdation=!i,Lf(m,{dataContext:n.dataContext,dataContextParameters:n.dataContextParameters,forceCoexistence:n.forceCoexistence}),await Pe(m,n,{acName:l,context:u});let f=Me(m,{target:l,context:u,containerItemID:u,headers:o,currentCaseViewMode:p});f.resourceType=ST.DATA,n.dataKey&&!f.key&&_R(m.data)&&(f.key=n.dataKey);let g=Jt(l,f);s?.containerItemID&&yr(g)&&e.push(B(nt,{containerItemID:s.containerItemID,target:l})),jA(e),e.push(g)},KSe=async(t,e,n)=>{if(t?.type===ve)return e.push(pe(t)),e;if(t.isCoexistenceCreate)return FSe(t,e);if(t.isCoexistenceLanding)return VSe(t,e);if(t.isCoexistenceHarness)return BSe(t,e);let{type:o,actionConfig:r,response:i}=t,{resourceType:s,parentAction:a}=r;return n(y.getIn(i,d.ROOT)),r.isDeferLoaded?HSe(t,e):o===mn?(await GSe(t,e),e):s==="DATA"&&a===cs?(qSe(t,e),e):(await WSe(t,e),e)},JSe=t=>{let e=0,n=[],o;return t.pipe(te(aa),Gc(r=>({actionMgrID:e}=r.payload,ye(r.payload).pipe(V(i=>jSe(i,e)),V(async i=>KSe(i,n,s=>{o=s})),x(()=>(M.resolveActionByID(e,o),v(n),n=[],n))))))},j7=JSe;var YSe="Error occurred during ajax call at deleteDataObject Epic",ZSe=t=>{let{dataViewName:e,context:n,dataViewParameters:o}=t,r={data_view_ID:e,dataViewParameters:encodeURIComponent(JSON.stringify(o))},{restApi:i,reqType:s}=F(z2,r);return Y(k(i,{method:s},n)).pipe(x(a=>({response:a.data,actionInPayload:t})),fe(YSe,n))},F7=ZSe;var QSe=t=>{let e=0,n=[];return t.pipe(te(PE),bn(100),x(o=>({actionMgrID:e}=o.payload,o.payload)),V(o=>F7(o)),V(async o=>{if(o&&o.type===ve){let{payload:r}=o,i=pe({...o,...r,actionMgrID:e});return n.push(i),n}return[]}),x(()=>(n.length===1&&Qe(n[0].type)?M.rejectActionByID(e):M.resolveActionByID(e),v(n),n=[],n)))},V7=QSe;var XSe="Error occurred during ajax call at GET data object actions : ",eEe=t=>{let{dataViewID:e,dataViewParameters:n,context:o}=t,r={data_view_ID:e},{restApi:i,reqType:s}=F(U2,r);return Y(k(i,{method:s,body:{dataViewParameters:n}},o)).pipe(x(a=>({...a.data})),fe(XSe,t.context))},B7=eEe;var tEe=t=>{let e=0,n=[],o=100,r={};return t.pipe(te(EE),bn(o),x(i=>({actionMgrID:e}=i.payload,i.payload)),V(i=>B7(i)),V(async i=>i&&i.type===ve?(n.push(pe(i)),n):(r=i,[])),x(()=>(n.length===1&&Qe(n[0].type)?M.rejectActionByID(e):M.resolveActionByID(e,r),v(n),n=[],n)))},H7=tEe;var nEe=[j7,Lw,Uw,zw,V7,H7,jw,Fw],G7=nEe;var{RESOURCE_TYPES:{CASE:rEe,DATA:oEe,OBJECT:iEe,PAGE:sEe}}=A,aEe=(t,e,n)=>{e===sEe&&n&&(t.pageName=n)},Zl=[],Ql=!1,rm=!1,ET=null,hS=null,D1={},cEe=t=>t?.routeKey===as?A5(t.payload?.caseTypeID,t.payload?.businessID):"",lEe=t=>t.pipe(te(AE),yf(200),x(e=>e.payload),V(e=>{rm=!1,w.subscribe(A.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_STARTED,()=>{rm=!0});let n=en.getPreviewMode()&&Ge.addDebugHeaders({debugId:y.generateUniqueID()});D1.dataContext=e.payload.dataViewName,D1.dataContextParameters=e.payload.dataViewKeys;let{context:o,requestType:r,routeKey:i}=e,{routeEndpoint:s}=e;s&&(s.indexOf("viewType={viewType}")>0?s=s.replace("{viewType}","page"):s.indexOf('viewType=""')>0&&(s=s.replace('viewType=""','viewType="page"'))),Ql=i===Gn,Ql&&qe.setNeedsMapping(!0);let a=At.getServerURL()+s,c=e.options.context,l,u={},p=e?.payload?.caseClassName;if(ce.isRemoteCase(p)){let{RemoteSystemID:m}=ce.getRemoteCase(p);u.RemoteSystemID=m}if(T.isWSSPortal()&&(u[d.X_ORIGIN_CHANNEL]="WSS"),r==="POST"){l=e.payload,s.indexOf("viewType=")<0&&(s=`${s}?viewType=page`);let m=qR(i),f;switch(m){case rEe:case iEe:f={caseTypeID:l.caseTypeID,processID:l.processID,content:{}};break;case oEe:f=D1;break;default:f=l}return Y(k(a,{method:r,body:f,headers:{...u,...n}},o)).pipe(x(g=>({response:{...g.data},payload:e,headers:ke(g.headers,"",u)})),fe(": Error occurred during ajax call at historyEpic : ",e))}return Y(k(G.appendExcludeQueryParamToUrl(a),{method:"GET",headers:{...u,...n}},c.substring(0,c.lastIndexOf("/")))).pipe(x(m=>({response:m.data,payload:e,headers:{...ke(m.headers),...n}})),ds(m=>{if(i===ha){let f={messages:[{type:"error",message:m.response.data.errorDetails[0].localizedValue}],category:"PAGE"};yt.setComponentCache("assignments-launchAssignment-Error",f);let g=RA(gb()),h=Se.getEndPointInfo(g.split("/assignments")[0]),E=At.getServerURL()+h.routeEndpoint;return e={...e,routeKey:Gt,resetSemanticURL:!0},Y(k(E,{method:h.reqType,headers:{...u,...n}},c.substring(0,c.lastIndexOf("/")))).pipe(x(C=>({response:C.data,payload:e,headers:{...ke(C.headers),...n}})))}return ye(bs(": Error occurred during ajax call at historyEpic : ",m,o))}))}),V(async e=>{if(rm)return Zl;if(w.subscribe(A.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_STARTED,()=>{rm=!0}),e&&e.type===ve)return pe(e);let{headers:n={},response:o,payload:r}=e,i=ze(o,{[A.STOPMERGEACTIONS]:!o.nextAssignmentInfo}),s=r.options.acName,a=Rt(s)&&Xn(s)?se(s):e.payload.options.context,c=a;n.RemoteSystemID=r?.payload?.RemoteSystemID,hS={target:s,context:a,containerItemID:c,headers:n,debugInfo:{debugId:n[d.COREHEADER_APP_DEBUG_ID]}};let l=r?.payload?.pageClass,u=r?.payload?.page,p=Ql?Gn:Gt,m=Ql?r.payload.objectID:r.payload.workID,f=Ql?"{objectID}":"{workID}",g=Ql?`objects/${m}`:cEe(r);r?.payload?.caseName&&m&&(g=Nt(p,{caseName:e.payload.payload.caseName}),g=g?.replace(f,m)||"",l=r?.payload?.caseClassName),(r?.routeKey===ha||r?.resetSemanticURL)&&Gj(c,i),IV(r?.routeKey,i),bV(r?.routeKey,i,r?.payload),_V(i),w.publish(A.PUB_SUB_EVENTS.EVENT_PREVIEW_DISMISS,{pageName:u,pageClass:l}),w.publish(A.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_INIT,{pageName:u,pageClass:l});let h=y.getIn(i,d.COMPONENTS);h&&await Do(h),hs(i,r.options.actionConfig,!0),w.publish(A.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_DONE,{target:s,pageName:u,pageClass:l});let E=Me(i,hS),C=qR(e.payload.routeKey);return E=SV(C,{...o.data,semanticURL:g,caseViewMode:d.REVIEW_MODE},E),E.data.traditionalGadgetId=G.getUniqueGadgetId(),aEe(E,C,u),Zl.push(Jt(s,E)),ET=i,CV(a,Zl),Zl}),x(()=>(rm||v(Zl),ET&&hS&&Cn(ET,hS),Zl=[],Ql=!1,rm=!1,hS=null,ET=null,Zl)),fe("Error occurred")),uEe=[lEe],q7=uEe;var dEe=t=>{let e=0;return t.pipe(te(Sa),x(n=>({actionMgrID:e}=n.payload,n.payload)),x(()=>{let n=we()?.getState(),o=fS();return Ro(n,o)&&e>0?M.resolveActionByID(e,{}):M.rejectActionByID(e),[]}),ps())},pEe=[dEe],W7=pEe;var mEe=t=>{let e=0,n=[];return t.pipe(te(fE),x(o=>({actionMgrID:e}=o.payload,o.payload)),V(o=>{let{context:r,skipSemanticUrl:i=!1,insightID:s}=o,a="",c;i||(a=Nt(kc,{insightID:"{insightID}"}),a=a.replace("{insightID}",s),c=Se.getEndPointInfo(a));let{restApi:l,reqType:u}=F(kc,{...c?.payload||[],insightID:s});return Y(k(l,{method:u},r)).pipe(x(p=>{let m={};return typeof p.data=="string"?m=JSON.parse(p.data):m=p.data,{response:{...m,key:a,semanticURL:a},actionConfig:o,skipSemanticUrl:i}}),fe(": Error occurred during ajax call at showPage Epic : ",o.context))}),V(async o=>{if(o&&o.type===ve)return n.push(pe(o)),n;let{actionConfig:r,skipSemanticUrl:i}=o,s=qt.getTargetViewContainerName(Un),a=X(s,r.context),c=rt(a,s,r.context),{response:l}=o,u=ze(l);u.directUrlUpdation=!i,await Pe(u,r,{acName:a,context:c},!i,i);let h=Me(u,{target:a,context:c,containerItemID:c});h.resourceType=A.PAGE;let E=Jt(a,h);return n.push(E),n}),x(()=>{M.resolveActionByID(e),v(n),n=[]}),ps())},fEe=[mEe],K7=fEe;var gEe=t=>{let e=0,n=[];return t.pipe(te(gE),x(o=>({actionMgrID:e}=o.payload,o.payload)),V(o=>{let{context:r,skipSemanticUrl:i=!1,dashboardID:s}=o,a="";i||(a=Nt(uf,{dashboardID:s}),a=a.replace("{dashboardID}",s));let{restApi:c,reqType:l}=F(uf,{dashboardID:s});return Y(k(c,{method:l},r)).pipe(x(u=>{let p={};return typeof u.data=="string"?p=JSON.parse(u.data):p=u.data,{response:{...p,key:a,semanticURL:a},actionConfig:o,skipSemanticUrl:i}}),fe(": Error occurred during ajax call at showPage Epic : ",o.context))}),V(async o=>{if(o&&o.type===ve)return n.push(pe(o)),n;let{actionConfig:r,skipSemanticUrl:i}=o,s=qt.getTargetViewContainerName(Un),a=X(s,r.context),c=rt(a,s,r.context),{response:l}=o,u=ze(l);u.directUrlUpdation=!i,await Pe(u,r,{acName:a,context:c},!i,i);let h=Me(u,{target:a,context:c,containerItemID:c});h.resourceType=A.PAGE;let E=Jt(a,h);return n.push(E)}),x(()=>{M.resolveActionByID(e),v(n),n=[]}),ps())},hEe=[gEe],J7=hEe;var yEe="Error occurred during ajax call at createObject Epic : ",Y7=(t,e)=>{let{class:n,context:o,viewType:r=mt.PAGE}=t,{removeActionPayload:i}=e,s=t?.pageName?t?.pageName:T.getDefaultCasePage();return Y(Ui.createCase(n,{...t,pageName:s,viewType:r,context:o})).pipe(x(({response:a,headers:c})=>(qe.analyseResponse(a),{response:a,actionInPayload:t,headers:c,removeActionPayload:i})),fe(yEe,o))};var Z7="CREATE_OBJECT";var SEe=(t,e)=>G.isExternalObject(t)&&e?e:Co(),EEe=t=>{let e=0,n=[],o={},r,i=100,s=!1;return t.pipe(te(Z7),bn(i),Yt(a=>{if({actionMgrID:e}=a.payload,G.isExternalObject(a.payload.class)&&!Fn(a.payload.context)){let c={type:A.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return M.rejectActionByID(e,!0,c),ye([])}return ye(a.payload).pipe(V(c=>{let{context:l}=c;r=c.class;let u=I1(c),p=X(u,l);return s=!1,Y(gc(p,{loadingContext:l})).pipe(V(({continueExecution:m,removeActionPayload:f,dirtyCheckPerformed:g})=>m?(s=g,Y7(c,{removeActionPayload:f})):(M.rejectActionByID(e),Tt)))}),V(async c=>{if(c&&c.type===ve)return c.payload.context=SEe(r,c.payload.context),n.push(pe(c)),n;let{actionInPayload:l,response:u,headers:p,removeActionPayload:m}=c,f=em(l,u);y.setIn(u.data,d.getProperty(d.CASE_INFO.IS_FIRST_ASSIGNMENT),!0);let g=I1({...l,isInCreateStage:f}),h=X(g,l.context),E=rt(h,g,l.context);if(aq(l,n),!s&&lq(g,h,r)){let{continueExecution:Ae}=await xt(h,{loadingContext:l.context});if(!Ae)return M.rejectActionByID(e),n}let C=l?.openCaseViewAfterCreate??!0;if(cq(C,f)){let{businessID:Ae,caseType:he,resolvedURL:Oe}=EA(u);return o={id:Ae,label:he,href:Oe},hc(o),Zp({caseId:Ae,caseType:he}),n}dq(l);let I=ze(u),_=String(ln($o(I))),P=fo(I),N=Dn(P,Es(I))||Nt(Si,{caseClassName:P}).replace(/{.+?}/,_);I.semanticURL=N,yt.setComponentCache(_,Ge.addDebugHeaders(l.debugInfo)),Qp(I,l),await Pe(I,l,{acName:h,context:E});let H=Xp(I),ne={target:h,context:E,headers:p,semanticURL:N,caseViewMode:H,containerItemID:E,isInCreateStage:f,isMinimizable:f,assignmentContext:y.getIn(I,Bo.NEXT_ASSIGNMENT_INFO_CONTEXT),nextAssignmentInfo:y.getIn(I,Bo.NEXT_ASSIGNMENT_INFO),resourceType:A.RESOURCE_TYPES.OBJECT,openCaseViewAfterCreate:l.openCaseViewAfterCreate,modalOptions:l.modalOptions,debugInfo:l.debugInfo};_i(ne,I);let j=Me(I,ne),oe=Jt(h,j);return uq(oe,{removeActionPayload:m,target:h},n),n.push(oe),n}),x(()=>(Or(n),St(n,e),setTimeout(()=>pq(r)),o={},n=[],n)))}))},Q7=EEe;var AEe="Error occurred during ajax call at executeObjectWideAction Epic : ",X7=(t,e)=>{let{assignmentID:n,actionID:o,caseID:r,context:i,additionalHeaders:s={},jsActionQueryParams:a}=t,{state$:c}=e,l=mt.PAGE,u=q2,p={assignmentID:n,actionID:o,viewType:l,objectID:r},{restApi:m}=F(u,p),{reqType:f}=F(u,p);l&&!m?.includes("viewType=")&&(m=m?.includes("?")?`${m}&viewType=${l}`:`${m}?viewType=${l}`),m=ed(a,m),t.viewType=l;let{content:g}=Mt(i,{isObjectWideAction:!0}),h=c.value.data[i]?.objectInfo?.headers||{},{etag:E}=h,C={"if-match":E,...s};return Y(k(m,{method:f,body:g,headers:C},i)).pipe(x(I=>{let{data:_,headers:P}=I;return qe.analyseResponse(I.data),{actionInPayload:t,response:_,headers:ke({...C,...P})}}),fe(AEe,i))};var CEe=(t,e)=>{let{isCaseWideAction:n}=e;return{isCaseWideAction:n,caseID:$o(t)}},eW=CEe;var{RESOURCE_TYPES:IEe}=A,_Ee=(t,e)=>{let n=0,o=[],r={},i="";return t.pipe(te(Vu),Yt(s=>{if({actionMgrID:n}=s.payload,i=s.payload.context,ht({context:i,stateObj:J(i),clearContextMessages:!0}),!Fn(i)){let a={type:A.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return M.rejectActionByID(n,!0,a),vt.handleDeferredActionCompletion(s.payload.context),ye([])}return ye(s.payload).pipe(V(a=>{cT(o,a);let c={...a};return X7(c,{state$:e})}),V(async a=>{if(a?.type===ve){let oe=pe(a);return o.push(oe),o}Vo.clearContextedCache(i);let{headers:c,actionInPayload:l,response:u}=a,{containerItemID:p,isModalAction:m,isInCreateStage:f}=l,g=re(p);l.target=g,y.setIn(u.data,d.OBJECT_INFO_IS_LOCAL_ACTION,!1),fT({submitResponse:u});let h=ze(u,{[A.STOPMERGEACTIONS]:!u.nextAssignmentInfo}),E=fo(h),C=Ye(l.context),I=Ke(C)[0]?se(Ke(C)[0]):C,_=Dj(h),P=f&&!_;m&&!f&&!Yl(l.context,I)&&(h=zA(h,J(p)));let N=Me(h,{headers:c,actionMgrID:n,directUrlUpdation:!1});$j(N.data,l),N.caseClassName=E,N.resourceType=IEe.ASSIGNMENT,N.headers=c;let z=!1,H=$o(h);_i(N,h);let ne=Dn(E,Es(h))||Nt(Si,{caseClassName:E}).replace(/{.+?}/,String(ln(H)));h.semanticURL=ne,N.semanticURL=ne,await dT(l,N,z,H,h,o,a,u,!0),P&&(r=uT(l),Zp({caseId:l.caseID,caseType:l.caseTypeID,assignmentId:l.assignmentID})),wj(a,o),vt.handleDeferredActionCompletion(i),pT(N,l,I);let j=eW(h,l);return IA({...j,containerItemID:p}),lT(o,{transientItemID:p,target:g,isModalAction:m}),o}),x(()=>{let a=o.find(c=>c.type===ve);return a?(vt.handleDeferredActionCompletion(i),mT(a),M.rejectActionByID(n)):M.resolveActionByID(n,r),Or(o),qe.setNeedsMapping(!1),o=[],r={},o}))}))},tW=_Ee;var bEe="Error occurred during ajax call at getObject Epic : ",nW=(t,e)=>{let{insKey:n,headers:o,context:r,debugInfo:i,viewType:s}=t,{removeActionPayload:a}=e,c=t.pageName?t.pageName:d.VIEW_NAMES.PY_DETAILS,l=F(Gn,{objectID:n,params:{pageName:c}}),{restApi:u}=l,{reqType:p}=l;return s==="none"&&(u=`${u?.split("viewType")[0]}viewType=none`),Y(k(u,{method:p,headers:{...o,...i&&{...Ge.addDebugHeaders(i)}}},r)).pipe(x(m=>(qe.analyseResponse(m.data),{response:m.data,actionInPayload:t,headers:ke({...o,...m.headers}),removeActionPayload:a})),fe(bEe,r))};var rW=async(t,e)=>{let{activateContainerActionPayload:{semanticURL:n,containerItemID:o},actionInPayload:r,actionInPayload:{context:i,skipBrowserSemanticUrlUpdate:s,doDeleteCaseSummary:a}}=e,c=Wt(Gn,r),l=X(c,i),u=de(o);await Pe({directUrlUpdation:!s,semanticURL:n},r,{acName:l,containerName:c,target:l,context:u}),t.push(B(pn,{containerItemID:o,target:l,context:u,doDeleteCaseSummary:a}))},oW=t=>{let e=$o(t),n=fo(t),o=Dn(n,Es(t));if(o)return o;let r=Nt(Gn,{objectClassName:n});return r=r?.replace("{objectID}",String(ln(e))),r};var iW="GET_OBJECT";var{RESOURCE_TYPES:sW}=A,TEe=async(t,e)=>{let{actionInPayload:n,activateContainerActionPayload:o,type:r,response:i,removeActionPayload:s,headers:a}=t,{context:c,skipBrowserSemanticUrlUpdate:l,debugInfo:u}=n,p=Wt(Gn,n),m=X(p,c);if(bA(r))await rW(e,{activateContainerActionPayload:o,actionInPayload:n});else{let g=rt(m,p,c,{buildNew:!0}),h=ze(i),E=oW(h);h.semanticURL=E,h.directUrlUpdation=!l,await Pe(h,n,{acName:m,context:g});let I=Me(h,{target:m,context:g,containerItemID:g,semanticURL:E,headers:a,debugInfo:u});I.caseViewMode=d.REVIEW_MODE,I.resourceType=sW.OBJECT,_i(I,h);let _=Jt(m,I);s.containerItemID&&yr(_)&&e.push(B(nt,{containerItemID:s.containerItemID,target:m})),e.push(_)}let f=n.insKey;_A({caseKey:f,actionInContext:c})},vEe=t=>{let e=0,n=[];return t.pipe(te(iW),x(o=>({actionMgrID:e}=o.payload,o.payload)),V(o=>{let{context:r,isChild:i,viewType:s}=o,a=Wt(Gn,o),c=X(a,r),l=s!=="none"?xt(c,{loadingContext:r}):Promise.resolve({continueExecution:!0,removeActionPayload:void 0});return Y(l).pipe(V(({continueExecution:u,removeActionPayload:p})=>{if(!u)return M.rejectActionByID(e),Tt;let{activate:m,activateContainerActionPayload:f}=_s(sW.OBJECT,c,o);return m&&!i&&s!=="none"?ye({type:mn,activateContainerActionPayload:f,actionInPayload:o}):nW(o,{removeActionPayload:p})}))}),V(async o=>{if(o&&Qe(o.type))return n.push(pe(o)),n;if(o?.actionInPayload?.viewType==="none"){if(J(o?.actionInPayload?.context)?.context_data?.caseViewMode!==d.PERFORM_MODE){let s={data:{...ze(o?.response)?.data},context:o?.actionInPayload?.context,isArrayDeepMerge:!0};n.push({type:Rr,payload:{context:s.context,doDeleteConfirmationDetails:!1}}),n.push(B(Ne,s));let a=re(o?.actionInPayload?.context),c=Qn(o?.actionInPayload?.context),l=Object.freeze({target:a,containerItemID:o?.actionInPayload?.context,context:o?.actionInPayload?.context,containerName:c});if(SA(o?.actionInPayload?.context)){let u=Me(o?.response,{...l});Lo({...u,isArrayDeepMerge:!0},n)}}}else await TEe(o,n);return n}),x(()=>(v(n),St(n,e),n=[],n)))},aW=vEe;var cW="OPEN_OBJECT_ACTION";var REe=(t,e,n,o)=>{let r,i,s=!1,a=In(t);return!Xn(t)||a&&!Wl(t,o)?(i=En(e,n),hr(e)&&(i=pr(n,i)),r=i,s=!0):(r=a?Vt(t,o):se(t),i=de(r)),{context:i,containerItemID:r,isNewContainerItem:s}},PEe=t=>t?d.PERFORM_MODE:d.REVIEW_MODE,NEe=t=>t?kt:dn,$1=t=>{let{actionID:e,caseID:n,context:o,openActionType:r,modalLoadingContainer:i}=t,s=mt.FORM,a=F(kE,{objectID:n,actionID:e,viewType:s}),{reqType:c}=a,{restApi:l}=a;t.actionType=d.RESOURCE_TYPES.OBJECT,l&&!l.includes("viewType=")&&(l=l.includes("?")?`${l}&viewType=${s}`:`${l}?viewType=${s}`);let u=i?.context??o;return Y(k(l,{method:c,headers:{}},u)).pipe(x(p=>(qe.analyseResponse(p.data),{response:p.data,actionInPayload:t,headers:ke(p.headers)})),fe(`: Error occurred during ajax call at ${r} Epic : `,u))},lW=async(t,e,{headers:n,actionInPayload:o})=>{let{context:r,actionName:i,openActionType:s,doDeleteCaseSummary:a,modalLoadingContainer:c}=o,l=ze(t,{info:A.OBJECT_INFO.OBJECT_INFO}),u=Wt(s,o),p=c?.target??X(u,r),{context:m,containerItemID:f,isNewContainerItem:g}=REe(p,u,r,t.data.objectInfo.ID);await Pe(l,o,{acName:p,target:p,containerName:u,context:m});let E=l.uiResources?.root,C=PEe(E),I=Me(l,{target:p,context:m,containerItemID:f,caseViewMode:C,doDeleteCaseSummary:a,headers:n,actionName:i,isMinimizable:!1,isInCreateStage:hr(u),resourceType:A.RESOURCE_TYPES.OBJECT,isProcessAction:o.isProcessAction,showProgress:o.showProgress,progressMessage:o.progressMessage,actionType:o.actionType});if(E&&_i(I,l),hr(u)&&delete I.doDeleteCaseSummary,e.push(B(NEe(g),I)),g||e.push(B(Bs,I)),g){let _=Ke(o.contextName),P=Vt(_,t.data.objectInfo.ID);if(P){let N={data:{objectInfo:{headers:n}},context:P};e.push(B(Ne,N))}}return f!==se(p)&&e.push(B(pn,{target:p,containerItemID:f})),SA(f)&&!c?.context&&Lo(I,e),e};var OEe=t=>{if(t.openActionType=kE,Wt(t.openActionType,t)===d.MODAL){let n=Wt(t.openActionType,t),o=X(n,t.context),r=pr(t.context,En(n,t.context));return v(kt({target:o,context:r,containerItemID:r,key:t.caseID,caseViewMode:d.PERFORM_MODE,actionName:t.name,showProgress:!0,root:{type:"reference",config:{context:d.getProperty(d.CASE_INFO.CASE_INFO_CONTENT),type:"view"}},data:{key:t.caseID,objectInfo:{ID:t.caseID}}})),v(oS({context:r})),t.modalLoadingContainer={target:o,context:r},$1(t)}return $1(t)},uW=OEe;var xEe=t=>{let e=0,n=[];return t.pipe(te(cW),x(o=>({actionMgrID:e}=o.payload,o.payload)),V(o=>uW(o)),V(async o=>{if(Qe(o.type)){let c=pe(o);return n.push(c),J(o.payload.context)?.context_data?.isLoading&&n.push(B(Bs,o.payload)),n}let{actionInPayload:r,headers:i,response:s}=o,{actionID:a}=r;return y.setIn(s,"data.objectInfo.activeActionID",a),y.setIn(s.data,d.getProperty(d.OBJECT_INFO_IS_LOCAL_ACTION),!0),r.refreshConditions&&y.setIn(s.data,d.getProperty(d.CASE_INFO_REFRESH_CONDITIONS),r.refreshConditions),await lW(s,n,{headers:i,actionInPayload:r}),gT(r),n}),x(()=>(v(n),St(n,e),n=[],n)))},dW=xEe;var w1=t=>{let{containerName:e,isInCreateStage:n}=t;return n?d.MODAL:e||qt.getTargetViewContainerName(Ea)};var DEe="Error occurred during ajax call at createObject Epic : ",pW=(t,e)=>{let{class:n,context:o,viewType:r=mt.PAGE}=t,{removeActionPayload:i}=e,s=t?.pageName?t?.pageName:T.getDefaultCasePage();return Y(Ui.createCase(n,{...t,pageName:s,viewType:r,context:o,retrieveActionViewForNewObject:!0})).pipe(x(({response:a,headers:c})=>(qe.analyseResponse(a),{response:a,actionInPayload:t,headers:c,removeActionPayload:i})),fe(DEe,o))};var mW="CREATE_EXTERNAL_OBJECT";var $Ee=t=>{let e=0,n=[],o=!1;return t.pipe(te(mW),bn(100),x(i=>({actionMgrID:e}=i.payload,i.payload)),V(i=>{let{context:s}=i,a=w1(i),c=X(a,s);return o=!1,Y(gc(c,{loadingContext:s})).pipe(V(({continueExecution:l,removeActionPayload:u,dirtyCheckPerformed:p})=>l?(o=p,pW(i,{removeActionPayload:u})):(M.rejectActionByID(e),Tt)))}),V(async i=>{if(i&&i.type===ve)return i.payload.context=Co(),n.push(pe(i)),n;let{actionInPayload:s,response:a,headers:c,removeActionPayload:l}=i,u=em(s,a);y.setIn(a.data,d.getProperty(d.CASE_INFO.IS_FIRST_ASSIGNMENT),!0);let p=w1({...s,isInCreateStage:u}),m=X(p,s.context),f=rt(m,p,s.context);if(!o&&!hr(p)&&Rt(m)){let{continueExecution:z}=await xt(m,{loadingContext:s.context});if(!z)return M.rejectActionByID(e),n}let g=ze(a),h=fo(g),E=Dn(h,Es(g))||Nt(Ea,{caseClassName:h}).replace(/{.+?}/,String(ln($o(g))));g.semanticURL=E,Qp(g,s),await Pe(g,s,{acName:m,context:f});let I=Xp(g),_={target:m,context:f,headers:c,semanticURL:E,caseViewMode:I,containerItemID:f,isInCreateStage:u,isMinimizable:u,assignmentContext:y.getIn(g,Bo.NEXT_ASSIGNMENT_INFO_CONTEXT),nextAssignmentInfo:y.getIn(g,Bo.NEXT_ASSIGNMENT_INFO),resourceType:A.RESOURCE_TYPES.OBJECT,openCaseViewAfterCreate:s.openCaseViewAfterCreate,modalOptions:s.modalOptions,debugInfo:s.debugInfo,isExternalObjectCreationFlow:!0};_i(_,g);let P=Me(g,_),N=Jt(m,P);return yr(N)&&bi(n,{removeActionPayload:l,target:m}),n.push(N),n}),x(()=>(Or(n),St(n,e),n=[],n)))},fW=$Ee;var gW=t=>{let{workId:e,context:n,isExternalCase:o}=t,r=o?df:K2,{restApi:i,reqType:s}=F(r,{ID:e});return Y(k(i,{method:s},n)).pipe(x(a=>({response:a.data,actionInPayload:t,headers:ke(a.headers)})),fe("Error occurred during ajax call at deleteWork Epic : ",n))};var hW=t=>{w.publish(d.PUB_SUB_EVENTS.WORK_EVENTS.WORK_DELETED,t)};var wEe=t=>{let e=0,n,o=[];return t.pipe(te(bw),x(r=>({actionMgrID:e,caseTypeID:n}=r.payload,r.payload)),V(r=>{if(!r.skipDeleteConfirmation&&!r.ignoreWorkDeletion){let i=Ee.MODAL,s=X(i,r.context),a=pr(r.context,En(i,r.context));return v([B(kt,{target:s,context:a,containerItemID:a,containerName:i,isDeleteConfirmation:!0,actionName:"Delete",workId:r.workId,caseTypeID:n,className:r.className,keys:r.keys,...r.enableBackNavigation&&{enableBackNavigation:!0},data:{caseInfo:{caseTypeID:n}}})]),M.resolveActionByID(e),Tt}return r.ignoreWorkDeletion?ye({actionInPayload:r}):gW(r)}),V(async r=>{if(r&&Qe(r.type)){let{payload:a}=r;return o.push(pe({...r,...a,actionMgrID:e})),o}let{actionInPayload:i}=r,{context:s}=i;if(hc({content:zn().getLocaleValue("Deleted successfully!","Messages")}),s?.includes(d.PREVIEW)&&o.push(B(cl,al({context:d.APP.APP,name:d.PREVIEW}))),s?.includes(d.MODAL)){let a=Ee.MODAL,c=X(a,s);Ze(c,s)?.enableBackNavigation&&window?.history?.back()}return o}),x(()=>(v(o),St(o,e)===d.PROMISE_VALUE.RESOLVE&&hW({caseTypeID:n}),o=[],o)))},yW=wEe;var MEe=[Q7,aW,tW,dW,fW,yW],SW=MEe;var EW=L8(...FG,...U7,...z7,...q7,...G7,...VG,...W7,...K7,...J7,...SW);var kEe=new Set([bt,Ht,tt,st,pa,ma,gi]),LEe=()=>t=>e=>{let{type:n="",payload:o={}}=e||{},{category:r,context:i,transientItemID:s}=o;if(r==="HTTP"||!kEe.has(n)){t(e);return}FA(i||s),be.removeContextTreeNode(i||s),(n===bt||n===tt)&&o?.target?.indexOf("modal")!==-1&&w.publish(A.PUB_SUB_EVENTS.PEGA_EMBED_CUSTOM,n),t(e)},AW=LEe;var Xl={},UEe=new Set([bt,Pn,yi,st,tt]),CW=t=>(Xl[t]||(Xl[t]={}),Xl[t]),zEe=(t,e,n)=>{let o=CW(t),r=CW(d.CONTEXT),i=o[e]??[];o[e]=[...new Set([...i,n])];let s=r[n]??[];r[n]=[...new Set([...s,e])]},jEe=(t,e)=>{let n=e.lastIndexOf("_"),o=n>-1?e.slice(0,n):e,r=Xl[o],i=r?.[e];if(i){let s=i.indexOf(t);s>-1&&i.splice(s,1)}return i&&i.length>0?null:(r&&(delete r[e],Object.keys(r).length===0&&delete Xl[o]),{dataPageName:o,dataPageNameWithHash:e})},M1=t=>{if(!t)return;let e=Xl[d.CONTEXT],o=(e?.[t]??[]).map(r=>jEe(t,r)).filter(r=>!!r);e&&(delete e[t],Object.keys(e).length===0&&delete Xl[d.CONTEXT]),o.length>0&&v(NM({dataPagesToBeRemoved:o}))},IW=(t={},e)=>{e&&Object.keys(t).forEach(n=>{let o=t[n];Object.keys(o??{}).forEach(r=>{zEe(n,r,e)})})};var FEe=(t,e)=>{e&&e.length>0&&(t===st||t===tt)&&e.forEach(n=>{M1(n)})},VEe=(t,e)=>{let{data:n={},context:o=null,childContainersContexts:r=[]}=e??{};if(FEe(t,r),t===bt||t===Pn||t===yi){let i=t===yi?n:n.shared;IW(i,o);return}if(t===st){M1(o),IW(n.shared,o);return}t===tt&&M1(o)},BEe=()=>t=>e=>{(Array.isArray(e)?e:[e]).forEach(o=>{let r=o?.type;UEe.has(r)&&VEe(r,o?.payload)}),t(e)},_W=BEe;var{PUB_SUB_EVENTS:bW}=A,HEe=new Set([tt,st]),GEe=(t,e,n,o,r,i)=>{let s=t.getState(),{resourceType:a,key:c,context:l}=y.getIn(s,["containers",e,"items",n])||{},u=y.getIn(s,["data",l,d.CONTEXT_DATA,"initiatingContext"]),p={resourceType:a,key:c,context:l,containerItemID:n,...u&&{initiatingContext:u},...o!==void 0?{eventName:o}:{}};w.publish(bW.CONTAINER_EVENTS.CLOSE_CONTAINER_ITEM,p),e===`${A.APP.APP}/${d.PRIMARY}`&&i===d.CONTAINER_TYPE.MULTIPLE&&w.publish(bW.CONTAINER_EVENTS.CLOSE_MULTI_TYPE_PRIMARY_CONTAINER_ITEM,{key:c,newAccessedOrder:r})},qEe=(t,e)=>{e&&e.length>0&&(t===st||t===tt)&&e.forEach(n=>{n&&Wy.cleanCaches(n)})},WEe=t=>e=>n=>{let o=r=>{if(!HEe.has(r.type))return;let{type:i,payload:{target:s,containerItemID:a,context:c,deleteContext:l,childContainersContexts:u=[],containerInfo:{newAccessedOrder:p,containerType:m}={newAccessedOrder:new Array,containerType:""},eventName:f}={}}=r;i===tt&&GEe(t,s,a,f,p,m),qEe(i,u),c&&(i===st||i===tt&&l)&&Wy.cleanCaches(c)};Array.isArray(n)?n.forEach(o):o(n),e(n)},TW=WEe;var KEe=t=>t===`${d.APP.APP}/${d.PRIMARY}`,JEe=new Set([bt,st,tt]),k1=t=>t===`${d.APP.APP}/${d.MODAL}`,YEe=(t,e,n,o,r)=>{t&&e&&(k1(r)?Fj({caseId:t,caseClass:n,context:o||""}):zj({caseId:t,caseClass:n,context:o||""}))},ZEe=(t,e)=>{t&&(k1(e)?Vj({caseId:t,caseClass:"",context:""}):jj({caseId:t}))},QEe=()=>t=>e=>{if(!e||typeof e!="object"||!("type"in e)||typeof e.type!="string"||!JEe.has(e.type)){t(e);return}let{type:n}=e,{payload:o}=e,{target:r,key:i,context:s,data:a}=o||{};if(KEe(r)||k1(r)){let c=a?.caseInfo?.ID,l=s||"",u=ie(d.CASE_INFO.CASE_INFO_ID,"",l)||"",p=a?.caseInfo?.caseTypeID||"";if((n===st||n===tt)&&ZEe(u,r),n===bt||n===st){t(e),YEe(i,!!c,p,l,r);return}}t(e)},vW=QEe;var XEe=new Set([bt,Ht,st,tt,No]),eAe=()=>t=>e=>{if(!e||!XEe.has(e.type)){t(e);return}let{payload:{context:n=null,transientItemID:o=null,clearStateMachine:r=!0}={},type:i}=e;n&&(i===bt||i===Ht||i===st||i===tt)&&r&&(If(n),Af(n)),o&&i===No&&(If(o),Af(o)),t(e)},RW=eAe;var tAe=new Set([bt,st,tt,Ht]),om=t=>typeof t=="object"&&t!==null,nAe=t=>om(t)&&typeof t.context=="string",rAe=t=>({context:t.context,data:om(t.data)?t.data:{},resourceType:typeof t.resourceType=="string"?t.resourceType:"",caseID:typeof t.caseID=="string"?t.caseID:void 0}),oAe=t=>om(t)&&typeof t.type=="string",NW=t=>t?.toString().includes(d.MODAL)??!1,Yi=t=>y.getIn(t,d.CASE_INFO.ASSIGNMENT_ID),yS=t=>y.getIn(t,["caseInfo","ID"]),PW=t=>{if(!t)return;let e=J(t);return om(e)?e:void 0},iAe=(t,e,n,o)=>{let r=yS(e),i=Yi(e);!r||!i||r===n&&i===o||id({actionInContext:t,assignmentID:i,caseKey:r})},sAe=(t,e,n,o)=>{if(t===tt){id(o);return}(t===Ht||t===st)&&iAe(e,n,o.caseKey,o.assignmentID),Of(o)},OW=t=>{let e=Object.keys(It.subscribers);for(let n=0;n<e.length;n+=1){let o=e[n],r=It.subscribers[o],{matcher:i,criteria:s}=r.filter;i==="COACH_UPDATE"&&s?.caseId===t&&It.unsubscribe(o)}},aAe=(t,e,n)=>{if(n===d.RESOURCE_TYPES.ASSIGNMENT){let o=Yi(e),r=y.getIn(e,["caseInfo","ID"]);if(o&&r)return{actionInContext:t,assignmentID:o,caseKey:r}}else if(n===d.RESOURCE_TYPES.CASE&&t?.includes("workarea")){let o=y.getIn(e,["caseInfo","ID"]),r=Yi(e);if(o&&r)return{actionInContext:t,assignmentID:r,caseKey:o}}},cAe=(t,e,n)=>{if(n!==d.RESOURCE_TYPES.ASSIGNMENT)return;let o=J(t),r=Yi(o),i=Yi(e),s=yS(e)??yS(o);if(r&&r!==i&&s&&id({actionInContext:t,assignmentID:r,caseKey:s}),i&&s)return{actionInContext:t,assignmentID:i,caseKey:s}},lAe=(t,e)=>{if(t?.includes("workarea")){let n=Yi(J(t));n&&id({actionInContext:t,assignmentID:n,caseKey:e})}else OW(e)},uAe=(t,e,n,o)=>{if(t?.includes("workarea")){let r=Yi(J(t));r&&id({actionInContext:t,assignmentID:r,caseKey:o})}else OW(o);if(n===d.RESOURCE_TYPES.ASSIGNMENT){let r=Yi(e);if(r)return{actionInContext:t,assignmentID:r,caseKey:o}}},dAe=(t,e)=>{let n=om(t.payload)?t.payload:void 0;if(!n||!NW(n.target))return!1;let o=typeof n.context=="string"?n.context:void 0,r=om(n.data)?n.data:void 0,i=typeof n.caseID=="string"?n.caseID:void 0,s=typeof n.assignmentID=="string"?n.assignmentID:void 0,a=PW(o);e(t);let c=t.type===tt?a:PW(o),l=i??yS(r)??yS(c),u=s??Yi(r)??Yi(c);if(!o||!l||!u)return!0;let p={actionInContext:o,assignmentID:u,caseKey:l};return sAe(t.type,o,a,p),!0},pAe=(t,e)=>{if(NW(e.target))return;let{context:n,data:o,resourceType:r,caseID:i}=e;if(t===bt)return aAe(n,o,r);if(t===Ht)return cAe(n,o,r);if(t===tt&&i){lAe(n,i);return}if(t===st&&i)return uAe(n,o,r,i)},mAe=()=>t=>e=>{if(!oAe(e)||!tAe.has(e.type)){t(e);return}let{type:n,payload:o}=e;if(dAe(e,t))return;let r;nAe(o)&&(r=pAe(n,rAe(o))),t(e),r&&Of(r)},xW=mAe;var DW=new Set([Ko,os,hE,T2,is,ZT]),fAe=new Set([bt,st,Ht,tt,YT,ls,Fr,Oo,...DW]),gAe=(t,e)=>t===is?e.saveActionPayload?.containerItemID:t===ZT?e.saveContainerItemID??e.context:e.containerItemID??e.context,hAe=(t,e)=>{if(!_H(e))return!1;let n=e.containerItemID||t,o=e.target||re(n),r=Ze(o,n),i=e.resourceType||r?.resourceType,s=e.key||r?.key;return i===d.RESOURCE_TYPES.ASSIGNMENT&&!!s},yAe=(t,e,n)=>{t===bt||t===st||t===Ht&&e.data?(Vs(n)&&pb(n),t===st&&R0(n),hAe(n,e)&&TH(n,{containerName:e.containerName??""})):t===tt&&(Vs(n)&&pb(n),R0(n))},SAe=(t,e)=>{if(t!==tt||!e.includes(d.MODAL))return;let n=Yo(e),o=`${n}/`;for(let r of RH())(r===n||r.startsWith(o))&&NH(r)},EAe=(t,e)=>{if(e.context){if(t===Fr){dA(e.context,null),Bp(e.context);return}t===Oo&&!e?.isDefault&&!e?.skipDirtyValidation&&Bp(e.context)}},AAe=(t,e,n)=>{if(t===YT){e.autosave||mb(n);return}if(t===ls){PH(n);return}DW.has(t)&&mb(n)},CAe=t=>typeof t=="object"&&t!==null,IAe=()=>t=>e=>{if(e&&typeof e=="object"&&"type"in e&&"payload"in e&&typeof e.type=="string"&&fAe.has(e.type)&&CAe(e.payload)){let{type:n,payload:o}=e,r=gAe(n,o);r&&(SAe(n,r),yAe(n,o,r),Vs(r)&&(EAe(n,o),AAe(n,o,r)))}t(e)},$W=IAe;var wW=U8(),_Ae=t=>{if(we()!==null){js();return}let e=[kH.propertyChangeMiddleware,AW,_W,RW,wW,xW,$W,vW,TW],n=aG({reducer:OG(t),middleware:o=>o({serializableCheck:!1,thunk:!1}).concat(e),enhancers:o=>o().prepend(e1).concat(e1)});wW.run(EW),hM(n)},eu=_Ae;var bAe=["ar","arc","ckb","dv","fa","ha","he","khw","ks","ps","ur","yi"],L1=t=>bAe.includes(t.split("-")[0])?"rtl":"ltr";async function TAe(t){if(!t)return;let e=T.getLocale();T.setLocale(t);let n=T.getLocale();if(!(!n||n===e)){if(hb(["lang"]),typeof window<"u"){let o=new URL(window.location.href);o.searchParams.set("lang",n),window.history.replaceState(window.history.state,"",o.toString())}T.isInfinityRuntime()&&await Us.loadLocaleBundle([n]),await qp(n),typeof document<"u"&&(document.documentElement.lang=n,document.documentElement.dir=L1(n)),v({type:zu,payload:{locale:n}}),w.publish(d.PUB_SUB_EVENTS.EVENT_LOCALE_CHANGED,{locale:n,previousLocale:e})}}var MW=TAe;var vAe={"RULE-UI-VIEW":"VIEW","RULE-OBJ-PROPERTY":"FIELD","RULE-OBJ-WHEN":"WHEN"},RAe="AI_ASSISTANT",PAe=["VIEW","FIELD","WHEN"],z1="UIDesignerRuleRefresh",tu=new Map,CT=[],kW=!1,Zi=t=>t.replace(/^\./,"").replace(/\[\d+\]/g,"").toUpperCase(),im=t=>t.trim().toUpperCase(),NAe=t=>{let n=t.trim().replace(/\s+#.*$/,"").trim().split(/\s+/);if(n.length<3)return null;let[o,r,...i]=n;return{type:vAe[o]||o,className:r,name:i.join(" ")}},OAe=t=>{let e=t.ruleInsKeys??t.RuleInsKeys,n=[];if(Array.isArray(e))n=e;else if(typeof e=="string")try{let o=JSON.parse(e);n=Array.isArray(o)?o:[e]}catch{n=e.split(",")}return n.filter(o=>typeof o=="string"&&o.trim().length>0).map(NAe).filter(o=>o!==null)},AT=t=>{let e=se(t),n=Qt(t);return!e||!n?null:{containerItemID:e,context:n}},j1=()=>{let t=Co(),e=`${t}/primary`,n=AT(e),o=AT(`${t}/modal`),r=o?[o]:[],i=[],s=n?AT(`${n.containerItemID}/workarea`):null;s?i.push(s):n&&i.push(n);let a=l=>{let u=`${l}/modal`;if(!Ke(l).includes(u))return;let p=AT(u);p&&(r.push(p),a(p.containerItemID))};o&&a(o.containerItemID),n&&a(n.containerItemID),s&&a(s.containerItemID);let c=new Set;return[...i,...r].filter(({context:l})=>c.has(l)?!1:(c.add(l),!0))},UW=t=>{let e=t;for(;e instanceof uo;){if(e.type==="PAGE")return e;e=e.parent}return null},IT=(t,e)=>{let n=e.props.pageReference||UW(e)?.name;return n?Q.resolveClassID(".classID",n,t):null},LW=(t,e)=>{let n=[],o=r=>{e.includes(r.type)&&n.push(r),r.children.forEach(o)};return t.children.forEach(o),n},xAe=t=>{let e=be.getContextNode(t);if(!e)return{views:[],fields:[],whens:[]};let{FIELD:n,DECLARATIVE_TARGET:o,VIEW:r,WHEN:i}=d.CONTEXT_TREE_NODE_TYPES,{references:s}=e,a=[...s.get(n)?.values()??[],...s.get(o)?.values()??[]].filter(u=>u instanceof uo),c=[...LW(e,[n,o]),...a],l=[...s.get(i)?.values()??[]].filter(u=>u instanceof sA);return{views:LW(e,[r]),fields:[...new Set(c)],whens:l}},DAe=(t,e,n)=>{if(!e.name||Zi(e.name)!==Zi(n.name))return!1;let o=IT(t,e);return!!o&&im(o)===im(n.className)},$Ae=(t,e,n)=>{if(Zi(e.name).split(".").pop()!==Zi(n.name))return!1;let r=IT(t,e);return!!r&&im(r)===im(n.className)},wAe=(t,e,n)=>{let o=n.whens.filter(i=>Zi(i.name)===Zi(e.name)&&i.props.context===t),r=[];return o.forEach(i=>{i.subType===d.CONTEXT_TREE_NODE_TYPES.VIEW?r.push(...n.views.filter(s=>Zi(s.name)===Zi(i.referenceName)&&UW(s)?.name===i.props.pageReference)):r.push(...n.fields.filter(s=>{let a=[i.props.pageReference,i.referenceName].filter(Boolean).join(".");return Zi(s.name)===Zi(a)}))}),r.filter(i=>im(IT(t,i)||"")===im(e.className))},MAe=(t,e)=>{let n=xAe(t);return e.flatMap(o=>o.type==="VIEW"?n.views.filter(r=>DAe(t,r,o)):o.type==="FIELD"?n.fields.filter(r=>$Ae(t,r,o)):o.type==="WHEN"?wAe(t,o,n):[])},kAe=t=>{let e=t;for(;e instanceof uo;){if(e.type===d.CONTEXT_TREE_NODE_TYPES.VIEW)return e;e=e.parent}return null},LAe=t=>{let e=[],n=t;for(;n instanceof uo;)n.type===d.CONTEXT_TREE_NODE_TYPES.VIEW&&e.push(n),n=n.parent;return e},UAe=t=>{let e=new Set(t);if(e.size===0)return[];let n=Array.from(e,LAe),o=n[0].find(r=>n.every(i=>i.includes(r)));return o?[o]:n.filter(([,...r])=>!r.some(i=>e.has(i))).map(([r])=>r)},zAe=(t,e)=>{let n=e.map(kAe).filter(r=>r!==null);return UAe(n).map(r=>({context:t,viewName:r.name,className:IT(t,r)||""})).filter(({viewName:r})=>r.length>0)},zW=({context:t,className:e,viewName:n})=>`${t}|${e}|${n}`,jW=t=>{let e=new Map;return t.forEach(n=>{e.set(zW(n),n)}),[...e.values()]},FW=async t=>{let e=zW(t);if(tu.has(e)){tu.set(e,!0);return}tu.set(e,!1);try{await t0(t.viewName,t.className,t.context)}catch(n){console.error("[UI Designer rule refresh] Failed to refresh common parent view.",t,n)}finally{let n=tu.get(e);tu.delete(e),n&&en.uiDesignerEnabled&&j1().some(({context:o})=>o===t.context)&&FW(t)}},VW=t=>{jW(t).forEach(e=>{FW(e)})},jAe=t=>{if(typeof t.userId!="string")return!1;let e=T.getOperatorIdentifier();return typeof e=="string"&&t.userId.trim().toLowerCase()===e.trim().toLowerCase()},FAe=t=>{let e=jW(t);e.length!==0&&w.publish(d.PUB_SUB_EVENTS.UI_EVENTS.UI_DESIGNER_RULE_REFRESH_AVAILABLE,{targets:e})},VAe=t=>{if(!en.uiDesignerEnabled||typeof t!="object"||t===null)return;let e="targets"in t&&Array.isArray(t.targets)?t.targets:[],n=new Set(j1().map(({context:r})=>r)),o=e.filter(r=>typeof r=="object"&&r!==null&&"context"in r&&typeof r.context=="string"&&n.has(r.context)&&"className"in r&&typeof r.className=="string"&&"viewName"in r&&typeof r.viewName=="string");VW(o)},BAe=(t,e)=>{if(!en.uiDesignerEnabled)return;let n=t?.message??{},o=OAe(n).filter(({type:i})=>i===e),r=j1().flatMap(({context:i})=>zAe(i,MAe(i,o)));jAe(n)?VW(r):FAe(r)},HAe=()=>{CT.length>0||(CT=PAe.map(t=>{let e=`${z1}_${t}`;return It.subscribe({matcher:RAe,criteria:{ruleType:t}},n=>BAe(n,t),void 0,e),e}))},U1=t=>{t?HAe():(tu.forEach((e,n)=>tu.set(n,!1)),CT.forEach(e=>{It.unsubscribe(e)}),CT=[])},BW=()=>{if(kW){U1(en.uiDesignerEnabled);return}kW=!0,w.subscribe(d.PUB_SUB_EVENTS.UI_EVENTS.UI_DESIGNER,U1,z1),w.subscribe(d.PUB_SUB_EVENTS.UI_EVENTS.UI_DESIGNER_RULE_REFRESH_REQUESTED,VAe,`${z1}_RefreshRequest`),U1(en.uiDesignerEnabled)};var GAe=t=>typeof t!="object"||t===null||Array.isArray(t)?!1:Object.values(t).every(e=>typeof e=="string"),F1=class{#e(e,n,o,r,i){let s=!1;return e.IncludeInURL&&n!==void 0&&(r[e.Key]=n,e.Key==="portal"&&n!==o&&(s=!0)),Array.isArray(e.IncludeInHeaders)&&n!==void 0&&e.IncludeInHeaders.forEach(a=>{i[a.Value]||(i[a.Value]=[]),i[a.Value].push(`${e.Key}=${n}`)}),s}#t(e,n,o){let r={},i={},s=!1;return Array.isArray(e)&&e.forEach(a=>{let c=n[a.Key];this.#e(a,c,o,r,i)&&(s=!0)}),{urlParams:r,headerMap:i,isPortalChanged:s}}#n(e){let n=yt.getComponentCache("lastActionID"),o=tl.truncateNamespace(e),r=tl.truncateNamespace(typeof n=="string"?n:(n??"").toString());return o===r}#r({message:e}){let{RequestContext:n,ActionName:o}=e;if(!this.#n(o))return;let r=JSON.parse(n);if(!GAe(r))throw new TypeError("RequestContext must be a JSON object with string values.");let i=r,s=T.environmentInfoObject?.requestContext,c=(typeof globalThis.location?.href=="string"?new URL(globalThis.location.href):null)?.searchParams.get("portal")??null,{urlParams:l,headerMap:u,isPortalChanged:p}=this.#t(s,i,c);yt.setURLParams(l),w.publish(d.PUB_SUB_EVENTS.EVENT_REQUEST_CONTEXT_CHANGED,i),Object.entries(u).forEach(([m,f])=>{let h=Ge.getRegisteredHeaders()[m]?.split(";").map(C=>C.trim())||[],E=new Map;[...h,...f].forEach(C=>{let I=C.indexOf("=");I!==-1&&E.set(C.slice(0,I),C)}),Ge.registerHeader(m,[...E.values()].join("; "))}),yt.setComponentCache("lastActionID",""),p&&globalThis.location&&globalThis.location.reload()}subscribeToInfinityGlobalEvents(){BW()}subscribeToGlobalEvents(){let e=y.generateUniqueID(),o={matcher:"SWITCH_REQUEST_CONTEXT",criteria:{UserID:T.getOperatorIdentifier()||""}};It.subscribe(o,this.#r.bind(this),void 0,e)}},V1=new F1;var HW="displaySaveAssignmentBrowserNotification",B1=!1,GW=t=>{B1||(w.subscribe(d.PUB_SUB_EVENTS.CASE_EVENTS.SAVE_ASSIGNMENT_COMPLETE,e=>{t("Save Assignment",e)},HW),B1=!0)},qW=()=>{w.unsubscribe(d.PUB_SUB_EVENTS.CASE_EVENTS.SAVE_ASSIGNMENT_COMPLETE,HW),B1=!1};var SS=()=>{if(!(typeof globalThis>"u"))return globalThis.Notification},H1=()=>{let t=T?.environmentInfoObject;return t?.features?.pyEnableBrowserNotifications===!0||t?.pyFeatures?.pyEnableBrowserNotifications===!0},qAe=()=>typeof document>"u"?"visible":document.visibilityState,_T=()=>typeof window<"u"&&typeof document<"u",WW=t=>{if(!t||typeof window>"u")return!1;try{return new URL(t,window.location.origin).origin===window.location.origin}catch{return!1}},G1=!1,Ws={initialize(){!_T()||G1||!H1()||(GW(Ws.notifyFromEvent),G1=!0,SS()?.permission==="default"&&Ws.requestPermission().catch(()=>{}))},destroy(){qW(),G1=!1},async requestPermission(){if(!_T()||!H1())return"denied";let t=SS();if(!t)return"denied";if(t.permission!=="default")return t.permission;let e=t.requestPermission(),n=await Promise.resolve(e);try{Object.defineProperty(t,"permission",{configurable:!0,value:n})}catch{}return n},canShowNativeNotifications(){if(!_T()||!H1())return!1;let t=SS();return!!(t&&t.permission==="granted")},notify(t){if(!_T()||!Ws.canShowNativeNotifications()||t.notifyWhenVisible===!1&&qAe()==="visible")return null;let e=SS();if(!e)return null;let n=t.href??(t.caseTypeID&&(t.caseId||t.caseID)?td.getSemanticURLForToaster(t.caseTypeID,t.caseId??t.caseID??"",void 0,void 0,void 0,t.businessID):void 0),o=WW(n)?n:void 0,r=t.title??t.label??t.caseTypeName??"Notification",i=t.body??t.caseId??t.caseID??t.caseTypeName??"",s=t.tag??t.caseId??t.caseID??t.caseTypeID??r,a=new e(r,{body:i,tag:s,icon:t.icon,silent:t.silent,requireInteraction:t.requireInteraction,data:{...t.data,href:o}});return a.addEventListener("click",()=>{Ws.openNotificationTarget(o),a.close()}),a},async showNotification(t){let e=SS();return e?.permission==="granted"?Ws.notify(t):e?.permission==="denied"||await Ws.requestPermission()!=="granted"?null:Ws.notify(t)},openNotificationTarget(t){WW(t)&&(window.focus(),window.location.assign(t))},notifyFromEvent(t,e){let n={...e,title:e.title??t,body:e.assignmentID?`Assignment ${e.assignmentID} has been saved.`:e.body};Ws.showNotification(n).catch(()=>{})}},bT=Ws;var WAe=()=>{w.publish(d.PUB_SUB_EVENTS.BOOTSTRAP_SHELL_EVENTS.CONSTELLATION_LOADED,{})},KW={publishConstellationLoadedEvent:WAe};var q1=class{activateContainerItemOnSwitch(e){let n=`${d.APP.APP}/${d.PRIMARY}`,o=Vt(n,e),r={target:n,containerItemID:o};ct({}).getPConnect().getContainerManager().activateContainerItem(r)}removeContainerItemOnClose(e){let n=`${d.APP.APP}/${d.PRIMARY}`,o=Vt(n,e),r={target:n,containerItemID:o};ct({}).getPConnect().getContainerManager().removeContainerItem(r)}showCasePreview(e,n){let r=ct({meta:{type:"PreviewViewContainer",config:{name:d.PREVIEW}},options:{context:d.APP.APP,target:"root/hybrid_preview"}});r.getPConnect().getContainerManager().resetContainers({name:d.PRIMARY,context:d.APP.APP}),By(d.APP.APP,d.PREVIEW)||r.getPConnect().getContainerManager().initializeContainers({type:"multiple",name:d.PREVIEW}),r.getPConnect().getActionsApi().showCasePreview(e,{caseClassName:n})}closeCasePreview(){ct({}).getPConnect().getContainerManager().resetContainers({name:d.PREVIEW,context:d.APP.APP})}isFormDirty(e){let n=`${d.APP.APP}/${d.PRIMARY}`,o=z0(n,e);return Sr.isStateModified(o)}getEventUtils(){return KW}getBroadcastUtils(){return Yp}isTraditionalUICase(e){return Wr(e)}isTraditionalUIDataObject(e){return xf(e)}},ES=new q1;var W1=class{static openCase(e,n=A.APP.APP,o={}){return o.renderInline=!0,o.pageName?(T.setDefaultCasePage(O.getDefaultQualifiedName(o.pageName)),o.pageName=O.getDefaultQualifiedName(o.pageName)):(T.setDefaultCasePage(O.getDefaultQualifiedName(d.PY_DETAILS)),o.pageName=O.getDefaultQualifiedName(d.PY_DETAILS)),o?.disableAssignmentHeader?T.disableAssignmentHeader(o.disableAssignmentHeader):T.disableAssignmentHeader(!1),Nr.openCase(e,n,d.PRIMARY,o)}static createCase(e,n=A.APP.APP,o={}){return o.renderInline=!0,o.pageName?(T.setDefaultCasePage(O.getDefaultQualifiedName(o.pageName)),o.pageName=O.getDefaultQualifiedName(o.pageName)):(T.setDefaultCasePage(O.getDefaultQualifiedName(d.PY_DETAILS)),o.pageName=O.getDefaultQualifiedName(d.PY_DETAILS)),o?.disableAssignmentHeader?T.disableAssignmentHeader(o.disableAssignmentHeader):T.disableAssignmentHeader(!1),Nr.createCase(e,n,d.PRIMARY,o)}static getNextWork(e=A.APP.APP,n={}){return n.renderInline=!0,n.pageName?(T.setDefaultCasePage(O.getDefaultQualifiedName(n.pageName)),n.pageName=O.getDefaultQualifiedName(n.pageName)):(T.setDefaultCasePage(O.getDefaultQualifiedName(d.PY_DETAILS)),n.pageName=O.getDefaultQualifiedName(d.PY_DETAILS)),n?.disableAssignmentHeader?T.disableAssignmentHeader(n.disableAssignmentHeader):T.disableAssignmentHeader(!1),Nr.getNextWork(e,d.PRIMARY,n)}static openAssignment(e,n=A.APP.APP,o={}){return o.renderInline=!0,o.pageName?(T.setDefaultCasePage(O.getDefaultQualifiedName(o.pageName)),o.pageName=O.getDefaultQualifiedName(o.pageName)):(T.setDefaultCasePage(O.getDefaultQualifiedName(d.PY_DETAILS)),o.pageName=O.getDefaultQualifiedName(d.PY_DETAILS)),o?.disableAssignmentHeader?T.disableAssignmentHeader(o.disableAssignmentHeader):T.disableAssignmentHeader(!1),Nr.openAssignment(e,n,d.PRIMARY,o)}static openPage(e,n,o=A.APP.APP,r={}){let i=Un;r?.defaultCasePage?(T.setDefaultCasePage(O.getDefaultQualifiedName(r.defaultCasePage)),r.defaultCasePage=O.getDefaultQualifiedName(r.defaultCasePage)):T.setDefaultCasePage(O.getDefaultQualifiedName(d.PY_DETAILS)),r?.disableAssignmentHeader?T.disableAssignmentHeader(r.disableAssignmentHeader):T.disableAssignmentHeader(!1);let s={viewName:e,className:n,acTargetName:d.PRIMARY,actionMgrID:M.getNextActionMgrId(),context:o},{promise:a}=M.actionManagerPromise(i,s.actionMgrID);return v({type:i,payload:{...s}}),a}static getCurrentContextAPI(e,n=A.APP.APP){let o={meta:{config:{}},options:{context:n,pageReference:e,containerName:d.PRIMARY}};return ct(o).getPConnect()}},TT=W1;var RT={};tn(RT,{buildResizeMessage:()=>JW,mashup:()=>vT});function KAe(){try{let{ancestorOrigins:t}=globalThis.location;if(t&&t.length>0)return t[0]??""}catch{}return""}function K1(t){if(!t||t==="*"||t==="null")return"";try{let e=new URL(t);return e.protocol!=="https:"&&e.protocol!=="http:"||e.origin==="null"?"":e.origin}catch{return""}}function JW(t){if(t.contentRect)return{height:t.contentRect.height};let e=Array.isArray(t.contentBoxSize)?t.contentBoxSize[0]:t.contentBoxSize;return"blockSize"in e?{height:e.blockSize}:"height"in e&&typeof e.height=="number"?{height:e.height}:{height:0}}var J1=class{gadgetName="";resize=!1;parentOrigin="";boundOnMessage=this.onMessage.bind(this);init(e){if(typeof globalThis.location>"u"||typeof globalThis.document>"u")return;let{resizing:n,parentOrigin:o}=e;this.gadgetName=globalThis.window.name,this.resize=n==="stretch",this.parentOrigin="",o?this.parentOrigin=K1(o):globalThis.document.referrer?this.parentOrigin=K1(globalThis.document.referrer):this.parentOrigin=K1(KAe());let r=globalThis.document.getElementsByTagName("app-root")[0];r&&(r.classList.add("mashup"),globalThis.window.parent!==globalThis.window&&this.resize&&this._registerResizeObserver(r))}send(e){if(typeof globalThis.window>"u"||typeof globalThis.location>"u")return;let{action:n,message:o}=e,r=JSON.stringify({gadgetName:this.gadgetName,action:n,message:o});globalThis.window.parent.postMessage(r,this.parentOrigin||globalThis.location.origin)}_registerResizeObserver(e){if(typeof globalThis.ResizeObserver!="function")return;new globalThis.ResizeObserver(o=>{for(let r of o){let i=JW(r);this.send({action:"resize",message:i})}}).observe(e)}_updateUrl(e){typeof globalThis.history>"u"||(globalThis.history.pushState({},"home",e),PCore.configureForBrowserBookmark({semanticURL:"",context:d.APP.ROOT,acName:"primary"}))}onMessage(e){if(!this.parentOrigin||e.origin!==this.parentOrigin||typeof e.data!="string")return!1;let n;try{n=JSON.parse(e.data)}catch{return!1}return n.action==="UpdateUrl"&&this._updateUrl(n.message.url),!0}getMessageHandler(){return this.boundOnMessage}},vT=new J1;typeof window<"u"&&window.addEventListener("message",vT.getMessageHandler(),!1);var YW={type:"RootContainer",config:{renderingMode:"noPortal"},children:[{type:"ViewContainer",config:{routingInfo:"@ROUTING_INFO",name:"primary"}}]},QW={type:"RootContainer",config:{renderingMode:"hybrid"},children:[{type:"HybridViewContainer",config:{routingInfo:"@ROUTING_INFO",name:"primary",contextName:"app"},children:[]}]},JAe={...QW,config:{renderingMode:"MCPApp"}},YAe="app-root.mashup > .case-view, app-root.mashup > .page-view { min-height: 0px !important; }",ZW="portal-less-styles",Y1=class{createC11nEnv=e=>ct(e);getContextUtils=()=>Bu;getRoutingManager=()=>Aa;getComponentsRegistry=()=>Ca;getStateManager=()=>Ie;getActionCreators=()=>pt;getStreamObservable=()=>fA;getActionProcessor=()=>Ve;getActionHandler=()=>Pb;renderApp=(e,n)=>{let o={context:d.APP.APP},i={...y.getIn(e,d.ROOT),options:o};eu(e),hs(e,o,!0);let s=this.createC11nEnv({meta:i,isRoot:!0});w.publish(A.PUB_SUB_EVENTS.EVENT_RENDER_APP,{props:s,domContainerID:n})};updateStoreWithUiRoot=async(e,n,o)=>{let{data:r,uiResources:i={}}=e,{root:s}=i,a=y.getIn(i,d.CONTEXT_DATA),c=ze(e);await Pe(c,{},{},!1,!0);let l={...r,[d.CONTEXT_DATA]:a};$0(s,n,l,o)};fetchEndPointResource=(e,n,o)=>{k(e,{method:"GET"},d.APP.ROOT).then(r=>{r.status===200&&this.updateStoreWithUiRoot(r.data,n,o)})};loadComponent=async(e,n,o)=>{await Do(o);let r=this.createC11nEnv({meta:e,isRoot:!0});we()||eu({}),w.publish(A.PUB_SUB_EVENTS.EVENT_RENDER_APP,{props:r,domContainerID:n})};setStaticServerUrl=(e,n,o)=>{We.initServer(e,n,o)};loadView=async(e,n,o=[])=>{At.init();let r=ze(e),i=y.getIn(r,d.VIEWS),s=y.getIn(r,d.NAVIGATIONS),a=y.getIn(r,d.COMPONENTS)||[];a.push(...o);let c=y.getIn(r,d.STATIC_SERVER_URL),l=y.getIn(r,d.APPLICATION_DATA);i&&Uf(i),s&&lM(s),O5(l),c&&We.initServer(c),await Do(a,c),this.renderApp(r,n)};initAppShell=(e,n,o)=>{sS(e),qt.buildActionTargetMap(n),At.init(o)};initRoutingTable=(e,n)=>{sS(e,!0),At.init(n)};setAppAlias=e=>{We.setAppAlias(e)};getHomeRestApi=e=>{let n=At.getServerURL(),{restApi:o}=el("home",{portalName:e});return`${n}${o}`};getViewRestApi=(e,n)=>{let{restApi:o}=v5(e,n);return At.getServerURL()+o};loadRootComponent=async(e,n,o=[],r,i,s)=>{let{config:a}=n||{},c=a?.name;if(we()||eu({}),s){let g=`${d.APP.ROOT}/${c}`;M0(g),fb().deleteContainerItem(g)}(fb().getContainerItems()||[]).length>1&&!c?.startsWith("hybrid_")&&c!=="authoring-preview"&&js(),v(Ne({data:{},context:d.APP.ROOT}));let u=this.createC11nEnv({meta:n,options:{context:d.APP.ROOT,pageReference:"",target:`${d.APP.ROOT}/${c}`}}),p=u.getPConnect(),m=`${p.getContextName()}/${p.getContainerName()}`;!se(m)&&a?.renderingMode!=="noPortal"&&p.getContainerManager().initializeContainers({type:"single"});let f=["RootContainer","Region","ModalViewContainer","PreviewViewContainer","reference","URL",...o];await Do(f),w.publish(A.PUB_SUB_EVENTS.EVENT_RENDER_APP,{props:u,domContainerID:e,componentName:"RootContainer",portalTarget:r,styleSheetTarget:i})};loadViewByName=(e,n,o,r)=>{let i=this.getViewRestApi(e,o);i===At.getServerURL()&&(i=this.getHomeRestApi(n)),this.fetchEndPointResource(i,r)};loadPortalView=(e,n)=>{let r=this.getHomeRestApi(e);nu.loadRuntimeDataPages(),this.fetchEndPointResource(r,n,!0)};configureForBrowserBookmark=e=>{P5(e)};checkIfSemanticURL=()=>iS();onPCoreReady=e=>{w.subscribe(A.PUB_SUB_EVENTS.EVENT_RENDER_APP,e,"renderAppCallback")};onPCoreCleanup=e=>{w.subscribe(A.PUB_SUB_EVENTS.EVENT_UNMOUNT_APP,e,"unmountAppCallback")};setFieldsDefaultConfigs=e=>{gr.updateFieldDefaults(e)};setGoogleMapsAPIKey=e=>{At.setGoogleMapsAPIKey(e)};setFetchDefaultHeaders=e=>{mo(e)};setFetchAuthInfo=e=>{gs(e)};getCaseApi=()=>Nr;getMashupApi=()=>TT;enableAppRouting=e=>{Ob(e)};initStore=()=>eu({});getBootstrapConfig=async(e,n)=>{let o=`${n.token_type} ${n.access_token}`;return fetch(`${e}/api/application/v2/data_views/D_pxBootstrapConfig`,{method:"GET",headers:new Headers({Authorization:o})}).then(r=>r.json())};getBootstrapConfigViaSB=async(e,n,o)=>{let r=o?`?dataViewParameters=${encodeURIComponent(JSON.stringify({themeID:o}))}`:"",i=`${e}/api/application/v2/data_views/D_pxBootstrapConfig${r}`;return k(i,{method:"GET",headers:new Headers(n)}).then(s=>{if(s.data)return s.data;throw Error("D_pxBootstrapConfig load failed.",{cause:s.status})})};initCoreContainers=(e={})=>{let{containerType:n="single"}=e,o=ct({meta:YW,options:{context:"root",pageReference:"",target:"root"}});return o.getPConnect().getContainerManager().initializeContainers({type:n,name:"primary",context:"app"}),{props:{getPConnect:o.getPConnect}}};loadMashup=async(e,n=!0)=>{if(n){let r=(document.querySelector(e)??document.getElementsByTagName(e)[0])?.parentNode;if(r&&!document.getElementById(ZW)){let i=document.createElement("style");i.id=ZW,i.textContent=YAe,r.appendChild(i)}}await this.loadRootComponent(e,YW,[d.LOAD_VIEW_STRING,"ViewContainer"]),globalThis.parent!==globalThis&&vT.init({resizing:"stretch"})};bootstrapWithAuthHeader=async(e,n,o=[],r,i)=>{let{customRendering:s=!1,onPCoreReadyCallback:a,staticContentServerUrl:c,dynamicSetCookie:l=!1,renderingMode:u,locale:p,envType:m,themeID:f,customCookies:g=!1,enableRouting:h}=e,{restServerUrl:E,authInfo:C,authorizationHeader:I,appAlias:_,theme:P={}}=e,N=e.additionalHeaders?{...e.additionalHeaders}:{},z=e.extras?.defaultPortalName;z&&(N={...N,"X-Pega-Portal-Name":z});let H=null,ne=!I&&C&&!C.authType;if(C||(e.authInfo={},C=e.authInfo),(I&&Object.keys(C).length===0||g&&!ne&&!C.authType)&&(C.authType="custom"),C.customCookies=g,!I&&C.tokenInfo?.access_token){let{tokenInfo:he}=C;I=`${he.token_type} ${he.access_token}`}if(C.tokenInfo?.csrf&&(N={...N,pzCTkn:C.tokenInfo.csrf}),_&&_.indexOf("/")===-1&&(_=`app/${_}`),m==="LAUNCHPAD"){N={...N,"X-Constellation-App":"Pega"},E=E.endsWith("/dx")?E:`${E}/dx`;let he=f?`?themeID=${f}`:"";globalThis.PCore&&(H=await this.getLPConfig(`${E}/api/application/v2/environmentInfo${he}`,I,N,g)),Object.keys(P).length===0&&H?.theme?.definition&&(P=JSON.parse(H.theme.definition).Theme)}else ne?H=await this.preInitBootstrapConfig(e,_,N,f):H=await this.getBootstrapConfigExtended(_?`${E}/${_}`:`${E}`,I,N,f,g,p);let j=H?.pyConfigJSON?JSON.parse(H.pyConfigJSON):{...H};m==="LAUNCHPAD"&&await this.applyEnvironmentInfoResponse(j),j.restServerConfig=E,j.dynamicSemanticUrl=!1,j.dynamicSetCookie=l,j.enableRouting=!1,j.serviceConfig?Object.assign(j.serviceConfig,{contextPath:"",appAlias:_}):j.serviceConfig={contextPath:"",appAlias:_,staticContentServer:c,appStaticContentServer:"no-appstatic"},j.additionalHeaders={Authorization:I,...N},j.customCookies=g,j.envType=m,j.dynamicLoadComponents=!s,j.dynamicSemanticUrl=!s,j.noHistory=!0,j.theme=P??{};let oe=f&&j?.themeObject?j.themeObject:null;j.theme=oe||P,j.renderingMode=u??j.renderingMode,j.locale=p||j.locale,e.semanticUrlArgs&&(j.semanticUrlArgs=e.semanticUrlArgs);let Ae=c||j.serviceConfig.staticContentServer;if(j.isSdk?(j.enableRouting=h,j.dynamicSemanticUrl=j.enableRouting,j.environmentInfo||(j.environmentInfo={}),j.environmentInfo.pyExecutionRuntimeName=A.APP.SDK_RUNTIME,We.initServer(c,"no-appstatic")):(j.serviceConfig.staticContentServer=Ae,j.serviceConfig.appStaticContentServer=j.serviceConfig.appStaticContentServer||"no-appstatic",We.initServer(Ae,Ae)),j.renderingMode==="EMBED"&&C?.authentication_service&&C.authentication_service!=="pega"&&(j.routingInfo||(j.routingInfo={}),j.routingInfo.authServiceAlias=C.authentication_service),C&&["OAuth2.0","custom"].includes(C?.authType)&&this.setFetchAuthInfo(C),await nu.initCoreConfig(j),a&&w.subscribe(A.PUB_SUB_EVENTS.EVENT_RENDER_APP,a,"renderAppCallback"),j.envType==="LAUNCHPAD"&&j.renderingMode==="EMBED"&&T.setIsWebEmbed(!0),!s){let he=T.environmentInfoObject?.pyInfinityStaticService,Oe=null;if(he){let Xe=await sn.getDataAsync("D_pxGetComponentLibraryListAndMap","",{});Array.isArray(Xe.data)&&Xe.data.length>0&&(Oe=Xe.data)}let He=async(Xe,De)=>{try{let Et=async()=>{await this.importReactRoot(),Xe(!0)};w.subscribe("component-map-loaded",Et),"ReactRoot"in Ca.getLazyMap()&&Xe(!0)}catch(Et){De(Et)}};await new Promise(He),nu.initCoreContainers(),await this.loadRootContainerWithHybrid(n,o,r,i),Oe&&await Promise.all(Oe.map(({pyComponentMap:Xe,pxUpdateDateTime:De})=>We.importCustomComponentMap(Xe,De)))}};loadRootContainerWithHybrid=(e,n=[],o,r)=>(n.push(d.CONTAINER_TYPE?.HYBRID||"HybridViewContainer",d.LOAD_VIEW_STRING),this.loadRootComponent(e,QW,n,o,r));loadRootContainerForMcpApp=e=>{let n=[d.CONTAINER_TYPE?.HYBRID||"HybridViewContainer",d.LOAD_VIEW_STRING];return this.loadRootComponent(e,JAe,n)};getBootstrapConfigExtended=async(e,n,o,r,i,s)=>{let a={};r&&(a.themeID=r),s&&(a.locale=s);let c=r||s?`?dataViewParameters=${encodeURIComponent(JSON.stringify(a))}`:"",l=`${e}/api/application/v2/data_views/D_pxBootstrapConfig${c}`,u=n?{Authorization:n,...o}:o;return fetch(l,{method:"GET",headers:new Headers(u),credentials:n&&!i?"same-origin":"include"}).then(p=>{if(p.ok)return p.json();throw Error("D_pxBootstrapConfig load failed.",{cause:p.status})})};getLPConfig=async(e,n,o,r)=>{let i=new Headers({...o,...n&&{Authorization:n}}),s=await fetch(e,{method:"GET",headers:i,credentials:n&&!r?"same-origin":"include"});if(!s.ok)throw new Error("environmentInfo load failed.",{cause:s.status});return s.json()};applyEnvironmentInfoResponse=async e=>{let{environmentInfo:n,pyCaseTypeList:o,theme:r,keyMapping:i}=e,{pxApplication:s,features:a,pxLocale:c}=n,l={simpleTable:{pageInstructionUUIDGeneration:!1},...a},u=Intl.DateTimeFormat().resolvedOptions().timeZone.toUpperCase(),p=u==="ETC/UNKNOWN"?"America/New_York":u;e.environmentInfo={...n,pxApplication:{...s},features:l,pyCaseTypeList:o,pxLocale:{...c,pyTimeZone:p}},e.timezone=p;let m=Object.keys(e.environmentInfo);return{isEnvInfoValid:["pxOperator","pxLocale","pxApplication"].every(h=>m.includes(h)),theme:r,keyMapping:i,features:l}};importReactRoot=async()=>{let e=[];return Ca.getComponent("ReactRoot").modules.forEach(n=>{e.push(n())}),Promise.allSettled(e)};preInitBootstrapConfig=async(e,n,o,r)=>{let{restServerUrl:i,customRendering:s=!1,staticContentServerUrl:a,dynamicSetCookie:c=!1,authInfo:l,renderingMode:u,locale:p,timezone:m="America/New_York",envType:f,theme:g={}}=e,h=r??null,E={restServerUrl:i,restServerConfig:i,dynamicSetCookie:c,enableRouting:!1,serviceConfig:{contextPath:"",appAlias:n,staticContentServer:a,appStaticContentServer:"no-appstatic"},additionalHeaders:{...o},envType:f,dynamicLoadComponents:!s,dynamicSemanticUrl:!s,noHistory:!0,themeIDObj:h,theme:h||g,renderingMode:u,locale:p,timezone:m,tokens:{C11NB2S:""}};return We.initServer(a,"no-appstatic"),l&&["OAuth2.0","custom"].includes(l?.authType)&&this.setFetchAuthInfo(l),await nu.init(E),this.getBootstrapConfigViaSB(n?`${i}/${n}`:`${i}`,o,r)}},ar=new Y1;var Z1=class{appAlias;appAliasWithoutServlet;googleMapKey;staticContentServer;appStaticContentServer;contextPath;messagingService;reAuthUrl;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}},XW=Z1;var Q1=class{routingInfo;actionModel;additionalHeaders;tokens;semanticUrl;queryParams;noPortal;portalTemplate;timezone;noHistory;viewName;fieldDefaults;theme;restServerConfig;dynamicLoadComponents;dynamicSemanticUrl;enableRouting;locale;environmentInfo;isAnonymousUser;renderingMode;remoteCaseMapping;envType;serviceConfig;behaviorOverrides;initBroadcast;storePercentageAsDecimal;cookieComplianceMethod;isExtraCallRequiredForDefaultHome;enablePriorityAndUrgencyImprovements;portalType;collab;customCookies;requestContext;pzencv1zzz;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.portalTemplate=e.portalTemplate,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=e.dynamicLoadComponents??!0,this.dynamicSemanticUrl=e.dynamicSemanticUrl??!0,this.enableRouting=e.enableRouting??!0,this.locale=e.locale,this.environmentInfo=e.environmentInfo,this.isAnonymousUser=e.isAnonymousUser??!1,this.renderingMode=e.renderingMode??"FULL_PORTAL",this.remoteCaseMapping=e.remoteCaseMapping??{},this.envType=e.envType,this.serviceConfig=new XW(e.serviceConfig),this.behaviorOverrides=e.behaviorOverrides,this.initBroadcast=!!e.initBroadcast,this.cookieComplianceMethod=e.cookieComplianceMethod??"none",this.isExtraCallRequiredForDefaultHome=e.isExtraCallRequiredForDefaultHome??"false",this.enablePriorityAndUrgencyImprovements=e.enablePriorityAndUrgencyImprovements??!1,this.storePercentageAsDecimal=e.storeC11nPercentageAsDecimal??!1,this.collab=e.collab,this.customCookies=e.customCookies??!1,this.requestContext=e.requestContext,this.pzencv1zzz=e.pzencv1zzz}},eK=Q1;var X1="@P .viewConfig",ZAe="@ROUTING_INFO",tK="runtimeEnvironmentInfo",sm=0,ek=class{#e=[];async init(e){let n=new eK(e);this.#t(),Ob(n.enableRouting),eu({}),gr.updateFieldDefaults(n.fieldDefaults),gr.setFieldDefault("Percentage","storePercentageAsDecimal",n.storePercentageAsDecimal),this.#o(n.routingInfo,n.actionModel,{server:n.restServerConfig,reAuthUrl:n.serviceConfig.reAuthUrl});let{appAliasWithoutServlet:o,appAlias:r,googleMapKey:i,staticContentServer:s,appStaticContentServer:a}=n.serviceConfig;We.setAppAlias(o||r),At.setGoogleMapsAPIKey(i),We.initServer(s,a,n.tokens.C11NB2S),ce.setRemoteCaseMapping(n.remoteCaseMapping),qs.init(n.collab),qs.subscribeToCaseEvents(),tl.subscribeToCaseEvents(),It.subscribeToCaseEvents(),It.setConnectionConfig({messagingService:n.serviceConfig.messagingService}),n.initBroadcast&&ES.getBroadcastUtils().init();let c=this.#a(n.renderingMode);n.additionalHeaders=n.additionalHeaders||{},n.additionalHeaders[d.X_ORIGIN_CHANNEL]??=c,Ge.setDefaultHeaders(n.additionalHeaders),Ge.setRequestContext(n.requestContext),n.envType==="Infinity"&&await this.loadEnvironmentInfoFromDataPage(n);let l={...n.environmentInfo,isAnonymousUser:n.isAnonymousUser===!0,encCSRFToken:n.pzencv1zzz,renderingMode:n.renderingMode,...n.portalTemplate?{pyPortalTemplate:n.portalTemplate}:{}};l.pyCaseTypeList?.forEach(m=>{let f=m.pyWorkTypeImplementationClassName;f&&(m.localeReference=Gi(kr.CASE,f))}),this.#c(n,l.features?.isNamespaceEnabled),this.configureTheme(n.theme),T.setCookieComplianceMethod(n.cookieComplianceMethod),T.setIsExtraCallRequiredForDefaultHome(n.isExtraCallRequiredForDefaultHome),T.setEnablePriorityAndUrgencyImprovements(n.enablePriorityAndUrgencyImprovements),T.setEnvironmentInfo(l);let p=(new URLSearchParams(globalThis.location?.search??"").get("lang")||n.locale||globalThis.navigator?.language||"en-US").replace("_","-");T.setLocale(p),typeof document<"u"&&(document.documentElement.lang=p,document.documentElement.dir=L1(p)),zn().setTimezone(n.timezone),yt.init(),n.envType==="Infinity"?V1.subscribeToInfinityGlobalEvents():V1.subscribeToGlobalEvents(),bT.initialize(),n.initBroadcast&&ES.getBroadcastUtils().init(),await qp(T.getLocale(),{withCredentials:!Ge.getDefaultHeaders().Authorization||n.customCookies})}configureTheme=e=>{if(e){let n=e.light,o=e.dark;n!==void 0&&o!==void 0?(this.#i(n),this.#i(o,{type:"dark"})):T.setTheme(e)}};getBootstrapConfig=async(e,n)=>{let o=`${n.token_type} ${n.access_token}`,r=`${e}/api/application/v2/data_views/${O.getDefaultQualifiedName("D_pxBootstrapConfig")}`;return(await fetch(r,{method:"GET",headers:new Headers({Authorization:o})})).json()};initCoreContainers=(e={})=>{let{containerType:n="single"}=e,r=ct({meta:{type:"RootContainer",config:{renderingMode:"noPortal"},children:[{type:"ViewContainer",config:{routingInfo:"@ROUTING_INFO",name:"primary"}}]},options:{context:"root",pageReference:"",target:"root"}});return r.getPConnect().getContainerManager().initializeContainers({type:n,name:"primary",context:"app"}),{props:{getPConnect:r.getPConnect}}};importReactRoot=async()=>{let e=[];return ar.getComponentsRegistry().getComponent("ReactRoot")?.modules?.forEach(n=>{e.push(n())}),Promise.allSettled(e)};importDesignSystemComponentMap=async(e,n,o)=>{try{E8(e)}catch(i){console.error("Design system load blocked: untrusted or malformed URL",i);return}let r=(i,s="true")=>new Promise((a,c)=>{if(typeof document>"u"){c(new Error("document is not available in this environment"));return}let l=document.createElement("script");l.type="text/javascript",l.src=i,l.async=s==="true",l.onload=()=>a(void 0),l.onerror=()=>c(new Error("Failed to load resource from Design System")),document.body.appendChild(l)});try{await r(`${e}component/project/${n}/designsystems/${o}/componentsmap.js?v=${Date.now()}`)}catch(i){console.log(i)}};buildSemanticUrl=(e,n,o,r,i)=>{let s=new URLSearchParams(n),a=o==="true"&&!!e,c=new URLSearchParams(globalThis.location?.search??"").get("lang");c&&!s.has("lang")&&s.set("lang",c);let l=null,u=null,p=null;if(e){let h=(e.startsWith("/")?e.substring(1):e).split("/");l=h[0]||null,u=h[1]||null,h[2]==="assignments"&&h[3]&&(p=h[3])}let m=[r];l&&m.push(l),u&&m.push(u),p&&m.push("assignments",p),a&&(s.has("noPortal")||s.append("noPortal","true"),u&&i&&s.append("view",i));let f=s.toString();return m.join("/")+(f?`?${f}`:"")};initCoreConfig=async e=>{let{routingInfo:n,serviceConfig:o,semanticUrl:r,queryParams:i,noPortal:s,noHistory:a,viewName:c,theme:l,restServerConfig:u,dynamicLoadComponents:p=!0,dynamicSemanticUrl:m=!0,renderingMode:f="FULL_PORTAL",envType:g,extras:h}=e,{appAlias:E,contextPath:C}=o,I=globalThis.location,_=I?.origin??"",P=u??_,N={};if(C&&(P+=C),E&&g!=="LAUNCHPAD"&&(P+=`/${E}`),e.restServerConfig=P,this.#s(),m===!0){let oe=this.buildSemanticUrl(r,i,s,P,c);!a&&oe&&typeof globalThis.history<"u"&&globalThis.history.replaceState({},"home",oe)}else if(f!=="HYBRID"){let oe=I?.href??"",Ae=oe.indexOf("?");Ae>0&&typeof globalThis.history<"u"&&globalThis.history.pushState({},"home",oe.substring(0,Ae)),N.dynamicSemanticUrl=!1}else console.log(`renderingMode :${f}`);p!==!0&&(N.dynamicLoadComponents=!1);let z=null;if(E){let oe=E.indexOf("/app/");z=oe>=0?E.substring(oe+1):E}if((N.dynamicSemanticUrl===!1||N.dynamicLoadComponents===!1)&&PCore.setBehaviorOverrides(N),e.appAlias=z,l)if(typeof l=="object")e.theme=l;else try{e.theme=JSON.parse(l)}catch{e.theme={}}let ne=I?`${I.protocol}//${I.host}`:n.domain;if(f==="EMBED")try{ne=new URL(e.restServerConfig).origin}catch{}let j={...n,domain:ne,searchParams:I?I.search:"",embedQueryParams:e.semanticUrlArgs};e.routingInfo=j,e.initBroadcast=T.environmentInfoObject?.pxMashupDetails?.pyIsTraditionalCoexistence==="true",e.noPortal&&(e.noPortal==="true"||e.noPortal===!0)&&(e.renderingMode="EMBED"),h?.cspNonce&&Reflect.set(globalThis,"__webpack_nonce__",h.cspNonce),T.setCaseLabelFirstInTitle(e.extras?.useDefaultBrowserTabTitle??!0),await this.init(e)};launchViewByName=async(e,n,o,r,i,s,a,c,l=[])=>{sm+=1;let u=c||`mashup${sm}`,p={type:"RootContainer",config:{viewConfig:X1,renderingMode:"view",name:u}};await ar.loadRootComponent(e,p,i,s,a),await this.loadCustomComponentLibrariesIfEnabled(l),ar.loadViewByName(n,o,r,u)};launchView=(e,n,o=[],r,i,s,a)=>{sm+=1;let c;a==="hybrid"?c=`hybrid_${sm}`:a?c=a:c=`mashup${sm}`;let l={type:"RootContainer",config:{viewConfig:X1,renderingMode:"portal",name:c}};a===d.HYBRID&&sc.setRuntimeParam(d.HYRBID_ROOT_CONTAINERNAME,c),sc.setRuntimeParams(r),ar.loadRootComponent(e,l,o,i,s).then(()=>ar.updateStoreWithUiRoot(n,c,!1))};launchPortal=async(e,n,o=`portal${sm+=1}`,r=[],i=[])=>{let s="LoadingComponent",a={type:"RootContainer",config:{viewConfig:X1,renderingMode:"portal",skeleton:s,name:o}},c=[...r,s];T.isPortalLoaded=!0;try{return await ar.loadRootComponent(e,a,c),await this.loadCustomComponentLibrariesIfEnabled(i),ar.loadPortalView(n,o)}catch(l){throw console.error(`Failed to launch portal ${n}:`,l),l}};launchMashup=(e,n=!0,o=[])=>{let r={type:"RootContainer",config:{renderingMode:"noPortal"},children:[{type:"ViewContainer",config:{routingInfoAnnotation:ZAe,name:"primary"}}]};if(n&&!document.getElementById("portal-less-styles")){let l=document.getElementsByTagName(e)[0]?.parentNode;if(l){let u=document.createElement("style");u.id="portal-less-styles",u.textContent="app-root.mashup > .case-view, app-root.mashup > .page-view { min-height: 0px !important; }",l.appendChild(u)}}(async()=>(await ar.loadRootComponent(e,r,[d.LOAD_VIEW_STRING,"ViewContainer"]),await this.loadCustomComponentLibrariesIfEnabled(o)))();let s=Reflect.get(globalThis,"parent"),a=Reflect.get(globalThis,"window");s&&s!==a&&import(`${We.getStaticServerUrl()}constellation-mashup-bridge.js`).then(l=>{l.mashup.init({resizing:"stretch"})})};loadEnvironmentInfoFromDataPage=async e=>{if(this.#t(),e.portalType==="wss"&&(e.environmentInfo={...e.environmentInfo,features:{case:{createInModal:!1}}}),e.environmentInfo?.pyDataPages&&Array.isArray(e.environmentInfo.pyDataPages)){let n=e.environmentInfo.pyDataPages,o=({pyLoadOnlyInRuntime:r})=>r===!0||r==="true";this.#e=n.filter(o),this.#n(n.filter(r=>!o(r))),this.#e.length>0&&w.subscribe(d.PUB_SUB_EVENTS.EVENT_POST_ACTION,({actionType:r})=>{(r===ua||r===Po||r===Jo)&&this.loadRuntimeDataPages()},tK)}};loadRuntimeDataPages=()=>{if(T.getRenderingMode()==="PREVIEW")return;let e=this.#e;this.#t(),this.#n(e)};#t(){this.#e=[],w.unsubscribe(d.PUB_SUB_EVENTS.EVENT_POST_ACTION,tK)}#n(e){e.length!==0&&setTimeout(()=>{this.loadDataPagesIntoEnvironmentInfo(e).catch(n=>{console.error("Error loading data pages into environment info:",n)})},d.PRIORITY.TRIVIAL)}loadDataPagesIntoEnvironmentInfo=async e=>{if(!e?.length)return;let n=T.environmentInfoObject;if(!n)return;let o=e.filter(({pyName:a,pyPath:c})=>!a||!c?(console.warn("Invalid data page configuration: missing pyName or pyPath"),!1):!0);if(o.length===0)return;let r=await Promise.allSettled(o.map(async({pyName:a,pyPath:c})=>{try{let l=await sn.getPageDataAsync(a,"",{});return{pyPath:c,response:l}}catch(l){return console.error(`Failed to load data page ${a}:`,l),null}})),i=r.length,s=!1;for(let a=0;a<i;a+=1){let c=r[a];if(c.status==="fulfilled"&&c.value){let{pyPath:l,response:u}=c.value;this.setNestedProperty(n,l,u),s=!0}}s&&T.setEnvironmentInfo(n)};#r(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)&&Object.getPrototypeOf(e)===Object.prototype}setNestedProperty(e,n,o){let r=n.startsWith(".")?n.slice(1):n;if(!r){typeof o=="object"&&o!==null&&Object.assign(e,o);return}let i=r.split("."),s=i.length,a=e;for(let c=0;c<s-1;c+=1){let l=i[c],u=a[l];if(this.#r(u))a=u;else{let p={};a[l]=p,a=p}}a[i[s-1]]=o}start=async(e,n)=>{let o=e.extras?.defaultPortalName;o&&(e.additionalHeaders={...e.additionalHeaders||{},"X-Pega-Portal-Name":o});let{serviceConfig:{appStaticContentServer:r},ccV2LibId:i,environmentId:s,isAlternateDesignSystemEnabled:a,alternateDesignSystemName:c}=e;await this.initCoreConfig(e);let l=T.environmentInfoObject?.pyC11nDXCBDevURL,u=a==="true"&&c!=="other",p=async()=>{await this.importReactRoot();let h=[];l?h.push(We.importCustomComponentMap("")):i&&h.push(We.importCustomComponentMap(i)),u&&h.push(this.importDesignSystemComponentMap(r,s,c)),h.length&&await Promise.all(h),n?.()},m=ar.getComponentsRegistry();return"ReactRoot"in m.getLazyMap()?!0:m.getComponent("ReactRoot")?(await p(),!0):new Promise(h=>{let E=async()=>{await p(),w.unsubscribe("component-map-loaded","component-map-loaded-id"),h(!0)};w.subscribeOnce("component-map-loaded",E,"component-map-loaded-id")})};registerForDebugInfo=e=>{if(T.setPreviewMode(),!e)return;let n=({debugInfo:o})=>{let r=o?.["X-Pega-App-Debug-ID"];r&&e.postMessage({appDebugID:r})};w.subscribe("fetchSuccess",n,"fetchSuccess"),w.subscribe("fetchFailure",n,"fetchFailure")};toggleTracerHeaders=e=>{e.addEventListener("message",n=>{n?.data?.enableTracer?en.enableTracer():en.disableTracer()})};loadEnvironmentInfo=async e=>{let n=Reflect.get(globalThis,"pms"),o=typeof n=="object"&&n!==null?Reflect.get(n,"device"):void 0,r=typeof o=="object"&&o!==null&&Reflect.get(o,"systemName")==="Android";if(e.theme&&!r)try{let i=JSON.parse(e.theme.definition),s=i.Branding,a=i.Theme;T.setBrandingInfo(s),T.setTheme(a)}catch{T.setBrandingInfo({}),T.setTheme({})}if(e.darkTheme&&!r){let i={type:"dark"};try{let s=JSON.parse(e.darkTheme.definition);T.setBrandingInfo(s.Branding,i),T.setTheme(s.Theme,i)}catch{T.setBrandingInfo({},i),T.setTheme(void 0,i)}}e.keyMapping&&T.setKeyMapping(e.keyMapping),T.setCookieComplianceMethod(e.cookieComplianceMethod??"none")};async loadCustomComponentLibrariesIfEnabled(e){e?.length>0&&(T.environmentInfoObject?.pyInfinityStaticService||it())&&await this.loadCustomComponentLibraries(e)}async loadCustomComponentLibraries(e){let n=e.map(o=>this.importSingleCustomComponent(o));await Promise.all(n)}importSingleCustomComponent(e){return typeof e=="object"&&"pyComponentMap"in e?We.importCustomComponentMap(e.pyComponentMap,e.pxUpdateDateTime):We.importCustomComponentMap(e)}#o(e,n,o){sS(e),qt.buildActionTargetMap(n),At.init(o)}#s(){document.querySelectorAll('head link[rel~="icon"], head link[rel~="apple-touch-icon"]').forEach(n=>{n.setAttribute("href",n.href)})}#i(e,n){if(e===null)return;if(typeof e=="object"){T.setTheme(e,n);return}let o;try{o=JSON.parse(e)}catch{T.setTheme(n?.type==="dark"?void 0:{},n);return}T.setTheme(o,n)}#a(e){return e===d.EMBED?d.X_ORIGIN_CHANNEL_EMBEDDED_BROWSER:d.X_ORIGIN_CHANNEL_BROWSER}#c(e,n){n&&(e.additionalHeaders.Prefer="namespaced",Ge.setDefaultHeaders(e.additionalHeaders))}},QAe=new ek,nu=QAe;var XAe="createViewRuleByID",eCe="getViewRuleByID",tCe="updateViewRuleByID",nCe="deleteViewRuleByID",rCe="getCalculatedFieldsInViewByID",oCe=(t,e)=>{let{restApi:n,reqType:o}=F(XAe);return k(n,{method:o,body:t},e).then(r=>r.data)},iCe=(t,e,n)=>{let{restApi:o,reqType:r}=F(eCe,{ID:t,includeMetadata:n?.includeMetadata??!1,caseClass:n?.caseClass??""});return k(o,{method:r},e).then(i=>i.data)},sCe=(t,e,n)=>{let{restApi:o,reqType:r}=F(tCe,{ID:t});return k(o,{method:r,body:e},n).then(i=>i.data)},aCe=(t,e)=>{let{restApi:n,reqType:o}=F(nCe,{ID:t});return k(n,{method:o},e).then(r=>r.data)},cCe=(t,e,n)=>{let{restApi:o,reqType:r}=F(rCe,{caseID:t,viewID:e});return k(o,{method:r,body:{calculations:{fields:n}}}).then(i=>i.data)},nK={createViewRule:oCe,getViewRule:iCe,updateViewRule:sCe,deleteViewRule:aCe,getCalculatedFields:cCe};var lCe="addCaseFollower",uCe="deleteCaseFollower",dCe="getCaseFollowers",pCe={"Content-Type":"application/json"},mCe=(t,e,n)=>{let o={caseID:t},r=JSON.stringify({users:e.map(i=>({ID:i}))});return Re(lCe,{body:r,queryPayload:o,headers:pCe},n)},fCe=(t,e,n)=>Re(uCe,{queryPayload:{caseID:t,followerID:e}},n),gCe=(t,e)=>Re(dCe,{queryPayload:{caseID:t}},e).then(o=>o.data.followers),rK={addCaseFollower:mCe,deleteCaseFollower:fCe,getCaseFollowers:gCe};var hCe="addRelatedCases",yCe="removeRelatedCase",SCe="getRelatedCases",ECe=(t,e,n)=>{let o={caseID:t},r=JSON.stringify({cases:e});return Re(hCe,{body:r,queryPayload:o},n)},ACe=(t,e,n)=>Re(yCe,{queryPayload:{caseID:t,relatedCaseID:e}},n),CCe=(t,e)=>Re(SCe,{queryPayload:{caseID:t}},e).then(o=>o.data.relatedCases),oK={addRelatedCases:ECe,removeRelatedCase:ACe,getRelatedCases:CCe};var tk="operatorDetails",ICe="operatorDetailsByBusinessID",_Ce=(t,e=!1)=>{let{reqType:n}=F(tk,{});if(n==="GET"){let o={encodedOperatorId:encodeURIComponent(`{"opname":"${t}"}`)};return Re(tk,{queryPayload:o})}return e?Re(ICe,{body:{dataViewParameters:{BusinessID:t}}}):Re(tk,{body:{dataViewParameters:{ID:t}}})},iK={getOperatorDetails:_Ce};var sK="postCustomFeedMessages",bCe="postFeedMessages",TCe="deleteFeedMessage",vCe="getFeedMessages",RCe="likeFeedMessages",PCe="unlikeFeedMessages",NCe="getMentionSuggestions",OCe="getTagSuggestions",xCe="getFeedMessageLikes",DCe="editFeedMessage",$Ce="getMentionTypes",wCe="getViewRuleByMessageType",MCe="refreshCustomPostTypeView",am={"Content-Type":"application/json"},nk=class{mentionsTagsCancelTokenSource;mentions;constructor(){this.mentionsTagsCancelTokenSource=[],this.mentions=[]}getFeeds=(e,n,o,r,i,s,a)=>{let c=s.getLocalizationService();a||(this.mentions=[]);let l="";r&&Array.isArray(r)&&r?.length>0&&(r.forEach(f=>{f.on&&(l=`${l}${f.id},`)}),l===""&&(l="ClearFilters"));let u="";a&&(u=s.getValue("pulse.pageLastEntry"));let p={filterForContext:n==="pyDataFeed"?encodeURIComponent(e):e,feedID:n,feedClass:o,filterBy:l,pageSize:10,olderThan:u};for(let f=0;f<i.length;f+=1)i[f].cancel();let m=zi();return i.push(m),Re(vCe,{queryPayload:p,cancelTokenSource:m},s.getContextName()).then(async f=>{if(f.status===200&&f.data){i.pop();let g=[],h={},E=!1,C=[];if(f?.data){if(C=Array.isArray(f.data.data.MessageTypes)&&f.data.data.MessageTypes.length?f.data.data.MessageTypes:[],f?.data?.data?.FeedList){let I=f.data.data.FeedList?.pxResults;Array.isArray(I)&&I?.length>0&&I.forEach((_,P)=>{_.ID=_.pzInsKey!==""?_.pzInsKey:`message${P}`,g.push(_.ID),h[_.ID]=_,_?.mentions&&Array.isArray(_?.mentions)&&_.mentions?.length>0&&this.mentions.push(_.mentions),_?.pxResults&&Array.isArray(_?.pxResults)&&_.pxResults?.length>0&&_.pxResults.forEach(N=>{N?.mentions&&Array.isArray(N?.mentions)&&N.mentions?.length>0&&this.mentions.push(...N.mentions)}),!E&&!["pzPostDetails","pzPrivatePostDetails"].includes(_.pyMessageViewReference)&&(E=!0)})}if(E&&await tb({uiResources:f.data.uiResources}),!r&&(r=[{id:"All",label:c.getLocalizedText("All"),on:!0,disabled:!1}],f?.data?.data?.FeedFilters)){let I=f.data.data.FeedFilters?.pxResults,_=!0;if(I&&Array.isArray(I)&&I?.length>0){I.forEach(N=>{let z={id:N.pyFeedSourceReference,label:c.getLocalizedText(N.pyLabel),disabled:!1,on:N.pySelected==="true"};z.on||(_=!1),r.push(z)});let P=r.find(N=>N.id==="All");P&&(P.on=_)}}}if(a&&s.getValue("pulse.messageIDs")){let I=s.getValue("pulse.messages");I={...I,...h},Object.values(I).forEach(_=>{_?.mentions&&Array.isArray(_?.mentions)&&_.mentions?.length>0&&this.mentions.push(_.mentions),_?.pxResults&&Array.isArray(_?.pxResults)&&_.pxResults?.length>0&&_.pxResults.forEach(P=>{P?.mentions&&Array.isArray(P?.mentions)&&P.mentions?.length>0&&this.mentions.push(...P.mentions)})})}if(D0(s.getContextName())){s.updateState({pulse:{messages:a&&s.getValue("pulse.messageIDs")?{...s.getValue("pulse.messages"),...h}:h,messageIDs:a&&s.getValue("pulse.messageIDs")?[...s.getValue("pulse.messageIDs"),...g]:g,nextPageFirstEntry:f?.data?.nextPageFirstEntry||"",pageLastEntry:f?.data?.pageLastEntry||"",postTypes:C,pulseContext:e}});let I=[...new Map(this.mentions.flat()?.map(_=>[_.mentionsID,_])).values()].filter(_=>Object.hasOwn(_,"mentionsType")).filter(_=>!_?.mentionsType?.toLowerCase().includes("user"));return{feedFilters:r,caseMentions:I}}}else return s.reportError(`getFeeds call failed ${f.status}`,f.data),f}).catch(f=>{if(!jy(f))return s.reportError(": Error occurred during ajax call at getFeeds API : ",f.response),f.response})};postMessage=(e,n,o,r=[],i=!1,s=[],a=!1)=>{let c={message:n,context:e,parentMessageId:i?e:"",attachments:r,pyRecipients:s.length?s:void 0},l=s.length===0?{body:JSON.stringify(c),queryPayload:{fromWidget:a},headers:am}:{body:JSON.stringify(c),queryPayload:{type:"PegaSocial-Post-Private",fromWidget:a},headers:am};return Re(s.length?sK:bCe,l,o.getContextName()).then(u=>{if((u.status===201||u.status===200)&&u.data){let p=u?.data;if(i){p.parentMessageID=e;let{pxResults:h,caseMentions:E}=this.buildMessageObject(p,i,o,r.length>0);return o.updateState({pulse:{messages:{[e]:{pxResults:h}}}}),E}let{messages:m,messageIDs:f,caseMentions:g}=this.buildMessageObject(p,i,o,r.length>0);return o.updateState({pulse:{messages:m,messageIDs:f}}),g}return o.reportError(`postMessage call failed with status ${u.status}`,u),""}).catch(u=>{throw o.reportError(": Error occurred during ajax call at postMessage API : ",u.response),u.response})};postCustomMessage=(e,n,o,r=!1)=>Re(sK,{body:n,queryPayload:{type:e,fromWidget:r},headers:am},o.getContextName()).then(async s=>{if(s.status===201&&s.data)await this.addCustomMessage(s.data,n.context,o);else return o.reportError(`postCustomMessage call failed with status ${s.status}`,s),""}).catch(s=>{throw o.reportError(": Error occurred during ajax call at postCustomMessage API : ",s.response),s.response});addCustomMessage=async({data:e,uiResources:n},o,r)=>{let i={ID:e.ID,pzInsKey:e.ID,classID:e.classID,pyPostType:e.pyPostType,postedByUser:e.postedByUser,pyIsDeleteEnabled:e.pyIsDeleteEnabled,pyMessageViewReference:e.messageViewReference,pyFeed:{pyIconType:"user",pyCommentContext:e.pyCommentContext,pyPostedOn:e.postedTime,pyFeedTitle:e.postedByUser.name,pyIconReference:e.postedByUser.ID},...e.PostMessage};Ky(e.messageViewReference,r,o)||await tb({uiResources:n});let s=r.getValue("pulse.messages")||{},a=r.getValue("pulse.messageIDs"),c=Array.isArray(a)?a:[],l=c.includes(i.ID);r.updateState({pulse:{messages:{...s,[i.ID]:{...s[i.ID],...i}},messageIDs:l?c:[i.ID,...c]}})};editMessage=({messageID:e,parentMessageID:n,message:o,pConnectObj:r,isReply:i=!1,recipients:s=[]})=>{let a=JSON.stringify({message:o,...s.length&&{pyRecipients:s}});return Re(DCe,{queryPayload:{messageID:e},body:a,headers:am},r.getContextName()).then(l=>{if(l?.status===200&&l?.data){let u=l?.data;if(i){u.parentMessageID=n;let{pxResults:f,caseMentions:g}=this.buildMessageObject(u,i,r,!1);return r.updateState({pulse:{messages:{[n]:{pxResults:f}}}}),g}let{messages:p,caseMentions:m}=this.buildMessageObject(u,i,r,!1);return r.updateState({pulse:{messages:p}}),m}return r.reportError(`editMessage call failed with status ${l.status}`,l),""}).catch(l=>{throw r.reportError(": Error occurred during ajax call at editMessage API : ",l.response),l.response})};buildMessageObject=(e,n,o,r=!1)=>{let i={ID:e?.ID||"",classID:e?.classID||"PegaSocial-Message",tags:e?.tags||[],pyHasAttachment:r,pzInsKey:e?.ID||"",pyMessage:e?.message||"",mentions:e?.mentions||[],postedByUser:e?.postedByUser,pxCreateDateTime:e?.postedTime||"",pxUpdateDateTime:e?.updatedTime||"",parentMessageID:e?.parentMessageID||"",pyIsDeleteEnabled:e?.pyIsDeleteEnabled||!1,pyIsEdited:typeof e?.isEdited=="string"?e?.isEdited==="true":e?.isEdited||!1,pyFeed:{pyPostedOn:e?.postedTime||"",pyFeedTitle:e?.postedByUser?.name||"",pyIconType:"user",pyCommentContext:e?.pyCommentContext||".pzInsKey",pyIconReference:"pi pi-case"},pyContext:"",pxIcon:"globe",pyMessageViewReference:e?.messageViewReference||"pzPostDetails",pyPostType:e?.pyPostType,pyRecipients:e?.pyRecipients?.length?e.pyRecipients:void 0},s=o.getValue("pulse.messages");if(n){let{pxResults:c=[]}=Object.values(s)?.find(u=>u?.ID===i?.parentMessageID)||{},l=c?.findIndex(u=>u?.pzInsKey===i?.ID);if(l!==-1){let u=[...c];u[l]={...u[l],...i},c=u}else c=[...c,i];return{pxResults:c,messages:{},messageIDs:[],caseMentions:this.getCaseMentions(c)}}let a=o.getValue("pulse.messageIDs");if(a){let c=a.includes(i.ID)?{...s[i.ID],...i}:i,l={...s,[i.ID]:c},u=a.includes(i.ID)?a:[i.ID,...a];return{messages:l,messageIDs:u,caseMentions:this.getCaseMentions(Object.values(l))}}};getCaseMentions=e=>{let n=e?.filter(o=>o?.mentions&&Array.isArray(o?.mentions)&&o.mentions?.length>0)?.map(o=>o.mentions)?.concat(this.mentions);return[...new Map(n.flat()?.map(o=>[o.mentionsID,o])).values()].filter(o=>Object.hasOwn(o,"mentionsType")).filter(o=>!o?.mentionsType?.toLowerCase().includes("user"))};likeMessage=({pulseContext:e,likedBy:n,messageID:o,isReply:r,pConnectObj:i})=>{let s=n?PCe:RCe,a=JSON.stringify({ContextClass:e});Re(s,{body:a,queryPayload:{pulseContext:e},headers:am},i.getContextName()).then(l=>{if(l.status===200)if(r){let u=i.getValue(`pulse.messages.${o}`),p=u?.pxResults&&Array.isArray(u?.pxResults)&&u.pxResults?.length>0&&u.pxResults?.map(m=>{if(m={...m},m.pzInsKey===e){let f=0,g=!1,h=m.pyLikes?m?.pyLikes?.pxLikeCount:0;n?(f=h-1,g=!1):(f=h+1,g=!0),m.pyLikes={pxLikeCount:f,pxIsLiked:g}}return m});i.updateState({pulse:{messages:{[o]:{pxResults:p}}}})}else{let u={...i.getValue(`pulse.messages.${o}`)},p=u.pyLikes?u.pyLikes.pxLikeCount:0,m=0,f=!1;n?(m=p-1,f=!1):(m=p+1,f=!0),u.pyLikes={pxLikeCount:m,pxIsLiked:f},i.updateState({pulse:{messages:{[e]:u}}})}else i.reportError(`likeMessage call failed with status ${l.status}`,l)}).catch(l=>{i.reportError(": Error occurred during ajax call at likeMessage API : ",l.response.data)})};deleteMessage=(e,n,o,r)=>{let i=e;n&&(i=o),Re(TCe,{queryPayload:{messageID:i}},r.getContextName()).then(a=>{if(a.status===200)if(n){let c=r.getValue(`pulse.messages.${e}`),l=c?.pxResults&&Array.isArray(c?.pxResults)&&c.pxResults?.length>0&&c.pxResults?.filter(u=>u.pzInsKey!==o);r.updateState({pulse:{messages:{[e]:{pxResults:l}}}})}else{let c=r.getValue("pulse.messageIDs"),l=c&&Array.isArray(c)&&c?.length>0&&c?.filter(p=>p!==e),u={...r.getValue("pulse.messages")};delete u[e],r.updateState({pulse:{messageIDs:l,messages:u}})}else r.reportError(`deleteMessage call failed with status ${a.status}`,a)}).catch(a=>{r.reportError(": Error occurred during ajax call at deleteMessage API : ",a.response)})};getLikedUsers=(e,n)=>Re(xCe,{queryPayload:{messageID:e}},n.getContextName());getMentionSuggestions=(e,n)=>{let{pulseContext:o,searchFor:r,mentionsType:i,listSize:s=5}=e,a={pulseContext:o,searchFor:r,mentionsType:i,listSize:s};for(let l=0;l<this.mentionsTagsCancelTokenSource.length;l+=1)this.mentionsTagsCancelTokenSource[l].cancel();let c=zi();return this.mentionsTagsCancelTokenSource.push(c),Re(NCe,{queryPayload:a,cancelTokenSource:c},n.getContextName()).then(l=>(this.mentionsTagsCancelTokenSource=[],l.status===200&&l.data?l?.data:(n.reportError(`Get mention suggestions call failed ${l.status}`,l.data),[]))).catch(l=>{jy(l)||n.reportError(": Error occurred during ajax call at getMentionSuggestions API : ",l.response.data)})};getMentionTypes=e=>Re($Ce,{},e.getContextName());getPostTypeView=(e,n,o)=>Re(wCe,{queryPayload:{type:e,contextID:o??""}},n.getContextName());refreshCustomPostTypeView=(e,n,o,r)=>Re(MCe,{body:n,queryPayload:{type:e,contextID:r??""},headers:am},o.getContextName());getTagSuggestions=(e,n)=>{let{searchFor:o,listSize:r=5}=e,i={searchFor:o,listSize:r};for(let a=0;a<this.mentionsTagsCancelTokenSource.length;a+=1)this.mentionsTagsCancelTokenSource[a].cancel();let s=zi();return this.mentionsTagsCancelTokenSource.push(s),Re(OCe,{queryPayload:i,cancelTokenSource:s},n.getContextName()).then(a=>{this.mentionsTagsCancelTokenSource=[];let c=[];return a.status===200&&a?.data?c=a?.data?.tags&&Array.isArray(a?.data?.tags)&&a.data.tags.length>0&&a.data.tags?.map(l=>`#${l}`):n.reportError(`Get tag suggestions call failed ${a.status}`,a.data),c}).catch(a=>{jy(a)||n.reportError(": Error occurred during ajax call at getTagSuggestions API : ",a.response.data)})}},aK=new nk;var kCe="addTagsToCase",LCe="deleteCaseTag",UCe="getCaseTags",zCe=(t,e)=>{let n={caseID:t,viewID:O.getDefaultQualifiedName("pyTaggedCases")};return Re("loadView",{queryPayload:n},e.getContextName()).then(o=>o?.data).catch(o=>{e.reportError(": Error occurred during ajax call at fetchTaggedcases API : ",o.response)})},jCe=(t,e)=>Re(UCe,{queryPayload:{caseID:t}},e.getContextName()).then(o=>o?.data?.tagsList).catch(o=>{e.reportError(": Error occurred during ajax call at fetchTags API : ",o.response)}),FCe=(t,e,n)=>{let o={caseID:t},r=JSON.stringify({tags:e});return Re(kCe,{body:r,queryPayload:o},n.getContextName()).then(i=>i?.data?.results).catch(i=>{n.reportError(": Error occurred during ajax call at postTags API : ",i.response)})},VCe=(t,e,n)=>Re(LCe,{queryPayload:{caseID:t,tagID:e}},n.getContextName()).catch(r=>{n.reportError(": Error occurred during ajax call at removeTag API : ",r.response)}),BCe=t=>{let e=O.getDefaultQualifiedName("D_pxGetTagsLandingPageURL");return sn.getPageDataAsync(e,t.getContextName(),{},{invalidateCache:!0}).catch(n=>{t.reportError(": Error occurred during ajax call getTagsLandingPageURL API : ",n.response)})},cK={getTaggedCases:zCe,getTags:jCe,postTags:FCe,removeTag:VCe,getTagsLandingPageURL:BCe};var PT=(t,e)=>{k0(e.getContextName(),t.etag),L0(e.getContextName(),t.etag)};var HCe="getAllParticipants",GCe="getParticipantRoles",qCe="getParticipantRoleView",WCe="getParticipant",KCe="createParticipant",JCe="updateParticipant",YCe="deleteParticipant",ZCe=(t,e)=>Re(HCe,{queryPayload:{caseID:t}},e.getContextName()).then(o=>o?.data?.data.content.pyParticipants).catch(o=>{e.reportError(": Error occurred during ajax call at getParticipants API : ",o.response)}),QCe=(t,e)=>Re(GCe,{queryPayload:{caseID:t}},e.getContextName()).then(o=>o?.data?.participant_roles).catch(o=>{e.reportError(": Error occurred during ajax call at getParticipantRoles API : ",o.response)}),XCe=(t,e,n)=>Re(WCe,{queryPayload:{caseID:t,participantID:e}},n.getContextName()).then(r=>r?.data).catch(r=>{n.reportError(": Error occurred during ajax call at getParticipant API : ",r.response)}),eIe=async(t,e,n,o,r)=>{let i={caseID:t},s={...n,participantRoleID:e},a={"if-match":o.getCaseSummary().headers.etag};return new Promise((c,l)=>{Re(KCe,{body:s,queryPayload:i,headers:a},o.getContextName()).then(u=>{PT(u.headers,o),c()}).catch(u=>{u.response.data.errorDetails?.forEach(m=>{m.erroneousInputOutputFieldInPage=m.erroneousInputOutputFieldInPage.replace(/\.pyWorkParty\([^)]*\)/,"")});let p=il(r||o.getContextName());o.reportError(": Error occurred during ajax call at createParticipant API : ",{...u.response.data,formFields:p},r),l(u.response)})})},tIe=async(t,e,n,o,r)=>{let i={caseID:t,participantID:e},s={"if-match":o.getCaseSummary().headers.etag};return new Promise((a,c)=>{Re(JCe,{body:n,queryPayload:i,headers:s},o.getContextName()).then(l=>{PT(l.headers,o),a()}).catch(l=>{l.response.data.errorDetails?.forEach(p=>{p.erroneousInputOutputFieldInPage=p.erroneousInputOutputFieldInPage.replace(/\.pyWorkParty\([^)]*\)/,"")});let u=il(r||o.getContextName());o.reportError(": Error occurred during ajax call at updateParticipant API : ",{...l.response.data,formFields:u},r),c(l.response)})})},nIe=(t,e,n)=>{let o={caseID:t,participantID:e},r={"if-match":n.getCaseSummary().headers.etag};return new Promise((i,s)=>{Re(YCe,{queryPayload:o,headers:r},n.getContextName()).then(a=>{PT(a.headers,n),i()}).catch(a=>{n.reportError(": Error occurred during ajax call at deleteParticipant API : ",a.response),s(a.response)})})},rIe=(t,e,n)=>Re(qCe,{queryPayload:{caseID:t,participant_roleID:e}},n.getContextName()).then(r=>r?.data).catch(r=>{n.reportError(": Error occurred during ajax call at fetchTaggedcases API : ",r.response)}),lK={getParticipants:ZCe,getRoleView:rIe,getParticipantRoles:QCe,getParticipant:XCe,createParticipant:eIe,updateParticipant:tIe,deleteParticipant:nIe};var oIe="createListPersonalization",iIe="deleteListPersonalization",sIe="updateListPersonalization",aIe="getUIListPersonalizations",NT=()=>va("getDataFromSRS");function rk(t=[]){return t.reduce((e,n)=>(e[n.personalizationID]={name:n.name,personalizationState:JSON.parse(n.personalizationState||"{}")},e),{})}var ok="create",ik="update",dK="delete";function AS(t,e,n,o){let r=vb(e);if(r){switch(t){case ok:case ik:{let{markAsDefault:i,...s}=o;Object.entries(s).length>0&&(r.allPersonalizations[n]=s),i&&(r.defaultPersonalization=n);break}case dK:{delete r.allPersonalizations[n],r.defaultPersonalization===n&&(r.defaultPersonalization="");break}default:return null}return r}return null}function uK(t){return typeof t=="object"&&t!==null}function cIe(t){if(!uK(t))return null;let e=t[O.getDefaultQualifiedName("ID")];if(typeof e!="string"||!e)return null;let n=t[O.getDefaultQualifiedName("PersonalizationState")],o=typeof n=="string"?n:JSON.stringify(n);try{let i=JSON.parse(o);if(!uK(i)||Array.isArray(i))return null}catch{return null}let r=t[O.getDefaultQualifiedName("Name")];return{personalization:{personalizationID:e,name:typeof r=="string"?r:"",personalizationState:o},isDefault:!!t[O.getDefaultQualifiedName("MarkAsDefault")]}}async function pK(t){let e=T.getOperatorIdentifier(),o=(await sn.getDataAsync(O.getDefaultQualifiedName("InsightPersonalizationListByOperatorAndInsight"),void 0,{InsightID:t,UserID:e})).data;return(Array.isArray(o)?o:[]).reduce((i,s)=>{let a=cIe(s);return a&&i.push(a),i},[])}async function lIe(t){let e=await pK(t),n="",o=[];for(let r of e)r.isDefault&&(n=r.personalization.personalizationID),o.push(r.personalization);return{defaultPersonalization:n,allPersonalizations:o}}var Ec={};async function uIe(t,e,n){let o=O.getDefaultQualifiedName("InsightPersonalization"),i=(await Re("createWork",{body:{caseTypeID:o,content:{[O.getDefaultQualifiedName("InsightID")]:t,[O.getDefaultQualifiedName("Name")]:n.name??"",[O.getDefaultQualifiedName("MarkAsDefault")]:n.markAsDefault??!1,[O.getDefaultQualifiedName("PersonalizationState")]:JSON.stringify(n.personalizationState)},processID:O.getDefaultQualifiedName("pyStartCase")},queryPayload:{viewType:"none",caseClassName:o}})).data?.ID??e;return Ec[e]=i,i}async function mK(t,e){let n=O.getDefaultQualifiedName("Edit"),{restApi:o,reqType:r}=F("caseWideActions",{caseID:t,actionID:n}),s=(await k(`${o}?viewType=form`,{method:r}))?.headers?.etag;if(!s)throw new Error(`Missing etag for personalization case ${t}`);let a={};e.markAsDefault!==void 0&&(a[O.getDefaultQualifiedName("MarkAsDefault")]=e.markAsDefault),e.name!==void 0&&(a[O.getDefaultQualifiedName("Name")]=e.name),e.personalizationState!==void 0&&(a[O.getDefaultQualifiedName("PersonalizationState")]=JSON.stringify(e.personalizationState));let{restApi:c,reqType:l}=F("executeCaseWideActions",{caseID:t,actionID:n});await k(`${c}?viewType=form`,{method:l,headers:{"if-match":s},body:{content:a,pageInstructions:[]}})}async function fK(t,e){await(await pK(t)).filter(({isDefault:r,personalization:i})=>r&&i.personalizationID!==e).reduce((r,{personalization:i})=>r.then(()=>mK(i.personalizationID,{markAsDefault:!1})),Promise.resolve())}async function dIe(t){let e=O.getDefaultQualifiedName("MarkAsInactive"),{restApi:n,reqType:o}=F("caseWideActions",{caseID:t,actionID:e}),i=(await k(`${n}?viewType=form`,{method:o}))?.headers?.etag;if(!i)throw new Error(`Missing etag for personalization case ${t}`);let{restApi:s,reqType:a}=F("executeCaseWideActions",{caseID:t,actionID:e});await k(`${s}?viewType=form`,{method:a,headers:{"if-match":i},body:{content:{[O.getDefaultQualifiedName("ReasonForStatusUpdate")]:zn().getLocaleValue("Insight Personalization delete")},pageInstructions:[]}})}var pIe=async t=>{if(NT()){let r=await lIe(t);return Array.isArray(r.allPersonalizations)&&(r.allPersonalizations=rk(r.allPersonalizations)),r}let e=vb(t);if(e)return Array.isArray(e.allPersonalizations)&&(e.allPersonalizations=rk(e.allPersonalizations)),Promise.resolve(e);let{restApi:n,reqType:o}=F(aIe,{listID:t});return k(n,{method:o,body:{}}).then(r=>{let{data:i}=r;return{allPersonalizations:rk(i.allPersonalizations),defaultPersonalization:i.defaultPersonalization}})},mIe=async(t,e,n)=>{if(NT()){let i=await uIe(t,e,n);return AS(ok,t,e,n),n.markAsDefault&&await fK(t,i),{data:i}}let{restApi:o,reqType:r}=F(oIe,{listID:t});return AS(ok,t,e,n),k(o,{method:r,body:{...n,personalizationState:JSON.stringify(n.personalizationState)}}).then(i=>{let s=i.data;return Ec[e]=s,i})},fIe=async(t,e,n)=>{let o=Ec[e]||e;if(NT()){await mK(o,n),AS(ik,t,e,n),n.markAsDefault&&await fK(t,o);return}AS(ik,t,e,n);let{restApi:r,reqType:i}=F(sIe,{listID:t,personalizationID:o})||{};return k(r,{method:i,body:{...n,personalizationState:JSON.stringify(n.personalizationState)}})},gIe=async(t,e)=>{let n=Ec[e]||e;if(AS(dK,t,e),NT()){await dIe(n),Ec[e]&&delete Ec[e];return}let{restApi:o,reqType:r}=F(iIe,{listID:t,personalizationID:n});return k(o,{method:r,body:{}}).then(i=>(Ec[e]&&delete Ec[e],i))};function hIe(t){return t?{createPersonalization:mIe.bind(null,t),updatePersonalization:fIe.bind(null,t),deletePersonalization:gIe.bind(null,t),fetchPersonalizations:pIe.bind(null,t)}:{createPersonalization:()=>Promise.resolve(""),updatePersonalization:()=>Promise.resolve(),deletePersonalization:()=>Promise.resolve(),fetchPersonalizations:()=>Promise.resolve({})}}var gK=hIe;var Hn=typeof window<"u"?window.sessionStorage:{getItem:()=>null,setItem:()=>{}},sk="getDataObjects",yIe="getDataPageObjects",hK="getDataPages",SIe="getListData",EIe="getInsightIDs",EK="getInsightByID",AIe="getClassResources",CIe="createInsight",IIe="deleteInsight",_Ie="exportToExcel",bIe="exportToCSV",TIe="scheduleInsight",vIe="updateScheduledInsight",RIe="deleteScheduledInsight",PIe="translateStrings",NIe="updateInsight",OIe=["LocalList","RemoteList","PromptList","DataPage"],AK=async(t,e,n)=>{let o=await Ot(t,{queryPayload:n}),r=o.data?.outputs?.[e];if(!r)throw new Error(`MCP action ${t} returned no ${e}`);return{...o,data:r}},ru=null;function xIe(t=!0){if(ru)return ru;let e=fn.getAppCacheKey(yIe);if(t&&Hn.getItem(e))return Promise.resolve(JSON.parse(`${Hn.getItem(e)}`));let n={datapageRequestType:"explorable"};if(it())ru=AK(hK,"dataPages",n);else{let{restApi:o,reqType:r}=F(hK,n);ru=k(o,{method:r,datapageRequestType:"explorable"})}return ru.then(o=>{ru=null,Hn.setItem(e,JSON.stringify(o))}),ru}function DIe(){let t=fn.getAppCacheKey(sk);if(Hn.getItem(t))return Promise.resolve(JSON.parse(`${Hn.getItem(t)}`));let e;if(it())e=AK(sk,"dataObjects",{});else{let{restApi:n,reqType:o}=F(sk,{});e=k(n,{method:o})}return e.then(n=>{Hn.setItem(t,JSON.stringify(n))}),e}var yK=[],$Ie=async t=>{let e=t.filter(i=>!yK.includes(i));if(e.length===0)return;let n={classIDs:t.join(",")},{restApi:o,reqType:r}=F(AIe,n);return k(o,{method:r}).then(i=>{i.data.resources&&(yK.push(...e),mA(i.data.resources))})};function wIe(t){let e=fn.getAppCacheKey(`DefaultColumns_${Object.values(t).join("_")}`);if(Hn.getItem(e))return Promise.resolve(JSON.parse(`${Hn.getItem(e)}`));let n={dataViewName:O.getDefaultQualifiedName("D_pzGetDefaultColumns")},{restApi:o,reqType:r}=F(SIe,n),i=k(o,{method:r,body:{dataViewParameters:t}});return i.then(s=>{Hn.setItem(e,JSON.stringify(s))}),i}function MIe(t){return"type"in t&&"classID"in t}function kIe(t){let e=$n(t);if(e&&e.classID){let n=pM(e.classID),o=e.rdFields,r=(o&&!Array.isArray(o)?o.fields:void 0)?.filter(i=>i.indexOf(".")>0);if(r&&!y.isEmpty(r)){let i=r.reduce((s,a)=>{let c=Tb(a,e.classID);return c&&MIe(c)&&(s[a]=c),s},{});n={...n,...i}}if(n&&Object.keys(n).length>0){for(let i of Object.keys(n))n[i].type.startsWith("Page")?delete n[i]:n[i]?.datasource&&OIe.includes(n[i].datasource.tableType)&&(n[i].fieldType="Picklist");return{sourceFields:n,sourceMetadata:e}}}return{}}function LIe(t,e,n){if(!e){let i=$n(t),s=Array.isArray(i?.rdFields)?i?.rdFields:i?.rdFields?.fields;return s?Promise.resolve({data:{data:s.map(a=>({pyFieldName:a}))}}):Promise.resolve({data:{data:[]}})}let o=fn.getAppCacheKey(`RDColumns-${t}`);if(Hn.getItem(o))return Promise.resolve(JSON.parse(`${Hn.getItem(o)}`));let r=fn.getData(O.getDefaultQualifiedName("D_pxFieldsForDataSource"),{dataViewParameters:{DataPageName:t}},n);return r.then(i=>{Hn.setItem(o,JSON.stringify(i))}),r}function UIe(t="",e=""){let n=fn.getAppCacheKey(`PFColumns-${t}${e}`);if(Hn.getItem(n))return Promise.resolve(JSON.parse(`${Hn.getItem(n)}`));let o=fn.getData(O.getDefaultQualifiedName("D_pxGetInitialFieldsForDataSource"),{dataViewParameters:{DataPageName:t,ClassName:e}});return o.then(r=>{Hn.setItem(n,JSON.stringify(r))}),o}var ak={},ck=t=>fn.getAppCacheKey(`PrimaryFields-${t}`),zIe=async(t,e,n,o,r)=>{let i=fn.getData(O.getDefaultQualifiedName("D_pxGetPrimaryFieldsForInsights"),{dataViewParameters:{...e&&{topLevelClassID:e},...o&&{joinedClassIDs:o.join(",")},...n&&{topLevelDataPageID:n}}},r).then(s=>{let a=s.data?.data||[],c={};t.forEach(l=>{c[l]=[]}),a.forEach(l=>{let u=l.classID,p=l[O.getDefaultQualifiedName("pyFieldName")];c[u].push(p)}),Object.entries(c).forEach(([l,u])=>{let p=ck(l);Hn.setItem(p,JSON.stringify(u))})}).finally(()=>{t.forEach(s=>{delete ak[s]})});return t.forEach(s=>{ak[s]=i}),i};function jIe(t,e){let n=[],o=[],r=!1,i=[],s=[];return t&&s.push(t),e&&e.length>0&&s.push(...e),s.forEach(a=>{let c=ck(a);if(Hn.getItem(c))return;let l=ak[a];if(l){o.push(l);return}n.push(a),a===t?r=!0:i.push(a)}),{allClasses:s,promisesToAwait:o,classesToFetch:n,isTopLevelClassPresent:r,joinedClassesToFetch:i}}async function FIe(t,e,n,o){let{allClasses:r,promisesToAwait:i,classesToFetch:s,isTopLevelClassPresent:a,joinedClassesToFetch:c}=jIe(t,n);return s.length&&i.push(zIe(s,a?t:void 0,a?e:void 0,c.length>0?c:void 0,o)),Promise.allSettled(i).then(()=>{let l={};return r.forEach(u=>{let p=ck(u);if(Hn.getItem(p))try{l[u]=JSON.parse(`${Hn.getItem(p)}`)}catch{}}),{data:l}})}function VIe(t){let e;return t[1].category?e=t[1].category:t[0].indexOf(":")>0&&(e=t[0].substring(0,t[0].indexOf(":"))),e}function CK(t){return typeof t=="object"&&t!==null}function BIe(t){return CK(t)&&typeof t.classID=="string"&&Array.isArray(t.fields)}function HIe(t){return{...t[1],fieldID:t[0],fieldType:t[1].fieldType||(t[1].isUserReference?"User reference":void 0),category:VIe(t),classID:t[1].associationClassID?t[1].associationClassID:t[1].classID}}function SK({data:t}){let e=(i,s)=>Gi("FIELD",i,s),n=typeof t.classID=="string"?t.classID:"",o=Gi("CASE",n);t.classNameLocaleReference=o;let r=Array.isArray(t.fields)?t.fields:[];for(let i=0;i<r.length;i+=1){let s=r[i];if(CK(s)){let a={nameLocaleReference:"INSIGHTS",categoryLocaleReference:"INSIGHTS",parentCategoryLocaleReference:"INSIGHTS"},c=s.definedOnClassIDs;if(typeof c=="string"){let l=c.split(":").reverse(),p=(typeof s.fieldID=="string"?s.fieldID:"").split("!").pop()?.split(":").reverse()||[];l[0]&&p[0]&&(a.nameLocaleReference=e(p[0],l[0])),l[1]&&p[1]&&(a.categoryLocaleReference=e(p[1],l[1])),l[2]&&p[2]?a.parentCategoryLocaleReference=e(p[2],l[2]):s.parentCategory&&(a.parentCategoryLocaleReference=o)}Object.assign(s,a)}}return{data:t}}function GIe(t,e,n){if(!e){let{sourceMetadata:r,sourceFields:i}=kIe(t);if(r&&i&&Object.keys(i).length>0){let s={...r,fields:Object.entries(i).map(HIe)};if(BIe(s)){let a=SK({data:s});return Promise.resolve(a)}}}let o={dataSource:t,columns:[],parameters:{},associationFilter:n,matchPosition:"",ignoreCase:!1};return Vo.init(o).then(({dataSourceMetaData:r})=>r?SK({data:r}):{data:{classID:"",className:"",isQueryable:!1,fields:[]}})}function qIe(){let{restApi:t,reqType:e}=F(EIe);return k(t,{method:e})}function WIe(t){let e=dM(t);if(e)return Promise.resolve({data:{pyInsights:[e]}});let n={insightID:t},{restApi:o,reqType:r}=F(EK,n);return k(o,{method:r})}function KIe(t){let e={insightID:t.join(",")},{restApi:n,reqType:o}=F(EK,e);return k(n,{method:o})}function JIe(t){let{restApi:e,reqType:n}=F(CIe);return k(e,{method:n,body:JSON.stringify(t),headers:{"Content-Type":"application/json"}})}function YIe(t,e){let n={insightID:t},{restApi:o,reqType:r}=F(NIe,n),i;return"UpdateDateTime"in e&&(i=e.UpdateDateTime),k(o,{method:r,body:JSON.stringify(e),headers:{"if-match":i,"Content-Type":"application/json"}})}function ZIe(t){let e={insightID:t},{restApi:n,reqType:o}=F(IIe,e);return k(n,{method:o})}function QIe(t){let{restApi:e,reqType:n}=F(_Ie);return k(e,{method:n,body:JSON.stringify(t)})}function XIe(t){let{restApi:e,reqType:n}=F(bIe);return k(e,{method:n,body:JSON.stringify(t)})}var e_e=(t,e)=>{let n={insightID:t},{restApi:o,reqType:r}=F(TIe,n);return k(o,{method:r,body:JSON.stringify(e)})},t_e=(t,e,n)=>{let o={insightID:t,scheduleID:e},{restApi:r,reqType:i}=F(vIe,o);return k(r,{method:i,body:JSON.stringify(n)})},n_e=(t,e)=>{let n={insightID:t,scheduleID:e},{restApi:o,reqType:r}=F(RIe,n);return k(o,{method:r})};function r_e(t){let{restApi:e,reqType:n}=F(PIe);return k(e,{method:n,body:JSON.stringify(t)})}var IK={getDataObjects:DIe,getDataPageObjects:xIe,getDataViewMetadata:GIe,getDefaultColumns:wIe,getFieldsForDataSource:LIe,getPrimaryFieldsForDataSource:UIe,getPrimaryFieldsForInsights:FIe,getInsightIDs:qIe,getInsightByID:WIe,getInsightsByID:KIe,loadClassResources:$Ie,createInsight:JIe,updateInsight:YIe,deleteInsight:ZIe,exportToExcel:QIe,exportToCSV:XIe,scheduleInsight:e_e,updateScheduledInsight:t_e,deleteScheduledInsight:n_e,translateStrings:r_e};var lk=class{addRoutes=e=>N5(e)},_K=new lk;var uk=class{static registerModule(e,n,o){Object.assign(o,{[e]:()=>n})}},bK=uk;var dk=class{static getPostActionEvent=()=>A.PUB_SUB_EVENTS.EVENT_POST_ACTION;static getCaseEvent=()=>Object.freeze(A.PUB_SUB_EVENTS.CASE_EVENTS);static getDataEvent=()=>Object.freeze(A.PUB_SUB_EVENTS.DATA_EVENTS);static getTransientEvent=()=>Object.freeze(A.PUB_SUB_EVENTS.EVENT_TRANSIENT_ITEMS);static getBootstrapShellEvent=()=>Object.freeze(A.PUB_SUB_EVENTS.BOOTSTRAP_SHELL_EVENTS);static getBulkProcessEvent=()=>Object.freeze(A.PUB_SUB_EVENTS.EVENT_BULKACTION);static getLocalActionProcessEvent=()=>Object.freeze(A.PUB_SUB_EVENTS.EVENT_LOCALACTION_SUBMISSION)},TK=dk;var pk=class{genericFailedMessage;constructor(){this.genericFailedMessage="Failed to display content. Contact the application administrator."}getGenericFailedMessage(){return this.genericFailedMessage}setGenericFailedMessage(e){this.genericFailedMessage=e}},vK=new pk;var o_e=t=>{gs({tokenInfo:t}),t?.csrf&&!t?.access_token?mo({pzCTkn:t?.csrf}):mo({Authorization:`${t?.token_type} ${t?.access_token}`}),setTimeout(()=>w.publish("updateSession",{updateStatus:"success"}),0)},i_e=t=>aA.init(t),s_e=async()=>nj(),a_e=t=>{mo({Authorization:t}),setTimeout(()=>w.publish("updateSession",{updateStatus:"success"}),0)},RK={setTokens:o_e,revokeTokens:s_e,getAuthInstance:i_e,setAuthorizationHeader:a_e};var Ik={};tn(Ik,{SDK_VERSION:()=>Ck,compareSdkPCoreVersions:()=>B_e,createCustomEvent:()=>ibe,dateFormatInfoDefault:()=>MK,filterForFieldValueList:()=>Z_e,getAllFields:()=>Y_e,getAutoFlexClass:()=>nbe,getBooleanValue:()=>U_e,getCurrentTimezone:()=>j_e,getDateFormatInfo:()=>F_e,getFilteredStages:()=>ebe,getInitials:()=>z_e,getInstructions:()=>Q_e,getIsAssignmentView:()=>LK,getLocale:()=>kK,getOptionList:()=>K_e,getReferenceList:()=>V_e,getSDKAssignmentUtils:()=>sbe,getSDKCaseUtils:()=>abe,getSDKContainerUtils:()=>cbe,getSDKDashboardUtils:()=>lbe,getSdkVersion:()=>H_e,getUniqueControlID:()=>k_e,getVBodyClass:()=>tbe,handleEvent:()=>J_e,initPConnectField:()=>X_e,isLastStep:()=>rbe,resetControlID:()=>L_e,resolveContext:()=>obe,setVisibilityForList:()=>Ak});var mk={};tn(mk,{findCurrentIndices:()=>NK,flattenSteps:()=>PK,getAssignmentValidationMessages:()=>p_e,getRefreshProps:()=>OK,handleAssignmentButtonPress:()=>m_e,handleSaveActionSuccess:()=>xK,hasNavigation:()=>c_e,isVerticalNavigation:()=>l_e,parseActionButtons:()=>d_e,registerRefresh:()=>u_e});function PK(t,e=[]){for(let n of t)n.steps?PK(n.steps,e):e.push(n);return e}function NK(t,e,n){let o=0;for(let r of t)r.visited_status==="current"?(e[n]=o,r.step_status=""):r.visited_status==="success"?(o+=1,r.step_status="completed"):(o+=1,r.step_status=""),r.steps&&NK(r.steps,e,n+1);return e}function c_e(t){if(!t)return!1;let e=t.template?.toLowerCase()==="standard",n=t.steps?.length===1;return!e&&!n}function l_e(t){return t?.template?.toLowerCase()==="vertical"}function OK(t){return t?t.filter(e=>e.event==="Changes"&&e.field).map(e=>[e.field,e.field?.substring(1)??""]):[]}function u_e(t){let e=t.getCaseInfo().getActionRefreshConditions?.(),n=t.getContextName(),o=t.getPageReference();PCore.getRefreshManager().deRegisterForRefresh(n);let r=OK(e);if(r.length===0)return;let i=t.getCaseInfo().getKey(),s={autoDetectRefresh:!0,preserveClientChanges:!1},a=PCore.getRefreshManager();for(let c of r)a.registerForRefresh("PROP_CHANGE",t.getActionsApi().refreshCaseView.bind(t.getActionsApi(),i,"",o,{...s,refreshFor:c[0]}),`${o}.${c[1]}`,`${n}/${o}`,n)}function d_e(t){return{main:t?.main??[],secondary:t?.secondary??[]}}function p_e(t,e){try{return PCore.getMessageManager().getValidationErrorMessages(t,e)??[]}catch{return[]}}function xK(t,e,n){t.cancelAssignment(e,!1).then(()=>{PCore.getPubSubUtils().publish(PCore.getConstants().PUB_SUB_EVENTS.CASE_EVENTS.CREATE_STAGE_SAVED,n)})}function m_e(t){let{sAction:e,sButtonType:n,itemKey:o,isInModal:r,getPConnect:i,actionsApi:s,localizedVal:a,localeCategory:c,showToast:l}=t;if(n==="secondary")switch(e){case"navigateToStep":{s.navigateToStep("previous",o).then(()=>{}).catch(()=>{l(a("Navigation failed!",c))});break}case"saveAssignment":{let u=i(),p=u.getCaseInfo().getKey(),m=u.getCaseInfo().getAssignmentID();s.saveAssignment?.(o)?.then(()=>{let f=u.getCaseInfo().c11nEnv.getValue(PCore.getConstants().CASE_INFO.CASE_TYPE_ID);xK(s,o,{caseType:f,caseID:p,assignmentID:m})})?.catch(()=>{l(a("Save failed",c))});break}case"cancelAssignment":{let{PUB_SUB_EVENTS:u}=PCore.getConstants(),{publish:p}=PCore.getPubSubUtils(),m=i(),f=m.getCaseInfo().isAssignmentInCreateStage(),g=m.getCaseInfo().isLocalAction()||!!(PCore.getConstants().CASE_INFO.IS_LOCAL_ACTION&&m.getValue(PCore.getConstants().CASE_INFO.IS_LOCAL_ACTION));f&&r&&!g?s.cancelCreateStageAssignment(o).then(h=>{p(u.EVENT_CANCEL,h)}).catch(()=>{l(a("Cancel failed!",c))}):s.cancelAssignment(o,!1).then(h=>{p(u.EVENT_CANCEL,h)}).catch(()=>{l(a("Cancel failed!",c))});break}case"rejectCase":{s.rejectCase?.(o)?.then(()=>{})?.catch(()=>{l(a("Rejection failed!",c))});break}default:break}else if(n==="primary")switch(e){case"finishAssignment":{s.finishAssignment(o).then(()=>{}).catch(()=>{l(a("Submit failed!",c))});break}case"approveCase":{s.approveCase?.(o)?.then(()=>{})?.catch(()=>{l(a("Approve failed!",c))});break}default:break}}var fk={};tn(fk,{extractTabsInfo:()=>h_e,filterSummaryFields:()=>f_e,getChildRegionByName:()=>g_e,openCaseEditAction:()=>S_e,resolveCaseTypeIcon:()=>y_e});function f_e(t){let e=t().getRawMetadata(),n=e.children?.[0],o=e.children?.[1],r=n?.children??[],i=o?.children??[],s=r.filter(c=>t().resolveConfigProps(c.config).visibility!==!1&&c.type!=="TextContent"),a=i.filter(c=>t().resolveConfigProps(c.config).visibility!==!1&&c.type!=="TextContent");return[s,a]}function g_e(t,e){for(let n of t){let o=n.props?.getPConnect?.();if(o){let r=o.getRawMetadata?.();if(r?.type?.toLowerCase()==="region"&&r?.name?.toLowerCase()===e.toLowerCase())return n}}return null}function h_e(t){let e=[],n=[],o=t?.props?.getPConnect?.()?.getChildren?.();return o?(o.forEach((r,i)=>{let s=r.getPConnect().getConfigProps(),{label:a}=s,{inheritedProps:c,visibility:l}=s;if(!a&&c){let u=c.find(p=>p.prop==="label");u&&(a=u.value)}(l===void 0||l===!0)&&(e.push({name:a??"",id:i}),n.push({type:"DeferLoad",config:s}))}),{vertTabInfo:e,deferLoadInfo:n}):{vertTabInfo:e,deferLoadInfo:n}}function y_e(t,e){let n=t?t.replace("pi pi-",""):e;return!n||n.includes(".")?"polaris-solid":n}function S_e(t,e){let n=t.getActionsApi();n.openLocalAction.bind(n)(e.ID,{...e,containerName:"modal",type:"express"})}var yk={};tn(yk,{addContainerItem:()=>C_e,addFlowContainerItem:()=>__e,configureBrowserBookmark:()=>I_e,getActiveCaseActionName:()=>DK,getFirstCaseActionName:()=>N_e,getToDoAssignments:()=>P_e,getTodoVisibility:()=>hk,hasContainerItems:()=>b_e,isCaseWideLocalAction:()=>gk,isContainerInitialized:()=>E_e,isRenderWithToDoWrapper:()=>O_e,setContainerLimit:()=>A_e,showBanner:()=>R_e});function E_e(t){let e=t.getContextName(),n=t.getContainerName();return PCore.getContainerUtils().isContainerInitialized(e,n)??!1}function A_e(t,e,n,o){let{CONTAINER_TYPE:r}=PCore.getConstants();if(n===r.MULTIPLE&&o){let i=t.getContextName();PCore.getContainerUtils().setContainerLimit(`${i}/${e}`,o)}}function C_e(t){let e=t.getContainerManager(),n=t.getContextName();e.addContainerItem({context:n,semanticURL:""})}function I_e(t){let e=p=>p,n=t.getContextName(),o=t.getContainerName(),r=PCore.getEnvironmentInfo(),{APP:i}=PCore.getConstants(),s=t.getValue(`pyPortal.${e("pyPrimaryNavPages")}`),a="",c="",l="",u=r?.environmentInfoObject?.pyExecutionRuntimeName===i.INFINITY_RUNTIME;if(Array.isArray(s)&&s.length>0){let p=s[0],m=p.NavigationPages?.[0];u?m?.[e("pyRuleName")]?(a=m[e("pyRuleName")],c=m[e("pyClassName")]??""):p?.[e("pyRuleName")]?(a=p[e("pyRuleName")],c=p[e("pyClassName")]??""):m?.[e("pyLabel")]?l=m[e("pyLabel")]:p?.[e("pyLabel")]&&(l=p[e("pyLabel")]):m?.[e("pyLabel")]?l=m[e("pyLabel")]:p?.[e("pyLabel")]&&(l=p[e("pyLabel")])}try{PCore.configureForBrowserBookmark({context:n,containerName:o,acName:o,semanticURL:"",defaultViewLabel:l,ruleName:a,className:c})}catch{}}function __e(t){let e=t.getContainerManager(),n=t.getContextName(),o=t.getValue("context_data.caseViewMode"),r,i;if(o!=="review"){let s=n.substring(0,n.lastIndexOf("_")),a=PCore.getContainerUtils().getActiveContainerItemName(s),c=PCore.getContainerUtils().getContainerItemData(s,a);c&&({key:r,flowName:i}=c)}e.addContainerItem({semanticURL:"",key:r,flowName:i,caseViewMode:"perform",resourceType:"ASSIGNMENT",data:t.getDataObject(n)})}function b_e(t){let e=t.getContextName(),n=t.getContainerName();return!!PCore.getContainerUtils().hasContainerItems(`${e}/${n}`)}function cm(){return PCore.getConstants().CASE_INFO}function DK(t){let e=cm(),n=t.getValue(e.CASE_INFO_ACTIONS),o=t.getValue(e.ACTIVE_ACTION_ID);return n?.find(i=>i.ID===o)?.name??""}function gk(t){let e=cm(),n=t.getValue(e.ACTIVE_ACTION_ID),o=t.getValue(e.CASE_INFO_ACTIONS);return o&&n?o.find(i=>i.ID===n)?.type==="Case":!1}function $K(t){let e=cm(),n=t.getValue(e.CHILD_ASSIGNMENTS),o=[];if(n&&n.length>0){for(let{assignments:r,Name:i}of n)if(r)for(let s of r)o.push({...s,caseName:i})}return o}function T_e(t){return!!t.getValue("caseMessages")}function v_e(t){let e=cm(),n=t.getValue(e.D_CASE_ASSIGNMENTS_RESULTS),o=$K(t);return!!(n||o.length>0||gk(t))}function R_e(t){let e=t();return T_e(e)||!v_e(e)}function hk(t){return t.getValue("context_data.caseViewMode")!=="perform"}function P_e(t){let e=cm(),n=t.getValue(e.CASE_INFO_ACTIONS),o=t.getValue(e.ASSIGNMENT_LABEL),r=t.getValue(e.D_CASE_ASSIGNMENTS_RESULTS)??[],s=$K(t).map(c=>({...c,isChild:!0})),a=[...r,...s];if(n&&!hk(t)){let c=DK(t);return a.map(l=>({...l,name:c||o}))}return a}function N_e(t){let e=cm();return t.getValue(e.CASE_INFO_ACTIONS)?.[0]?.name??""}function O_e(t,e){let n=t(),{showWithToDo:o}=e;return!!(o&&(!gk(n)||hk(n)))}var Sk={};tn(Sk,{combineFilters:()=>x_e,convertDateToGMT:()=>D_e,createFilter:()=>wK,getFilterExpression:()=>w_e,getFormattedDate:()=>$_e,getLayoutDataFromRegion:()=>M_e});function wK(t,e,n="EQ"){return{condition:{lhs:{field:e},comparator:n,rhs:{value:t}}}}function x_e(t,e){return t&&t.length?e?{AND:[e,...t]}:t.length>1?{AND:[...t]}:t[0]:e}function D_e(t){let{valueAsISOString:e}=t;return e?e.substring(0,e.indexOf("T")):void 0}function $_e(t){if(t)return`${t.getFullYear()}-${`0${t.getMonth()+1}`.slice(-2)}-${`0${t.getDate()}`.slice(-2)}`}function w_e(t,e,n){if(t==="")return null;let o="EQ";return n.type==="TextInput"&&!n.isNumber&&(o="CONTAINS"),n.config.filterType==="RelativeDates"?"":wK(t,e,o)}function M_e(t){let e={width:"full",fillAvailable:!0,minWidth:[300,"px"]};return t.props?.getPConnect()?.getChildren()?.map((n,o)=>{let r=n?.getPConnect();return{id:r?.getComponentName()?`${r.getComponentName()}--${o}`:`item--${o}`,content:r?.getComponent(),layoutConfig:{...e,...r?.getConfigProps().layoutConfig}}})}var Ck="0.1.0",MK={dateFormatString:"MM/DD/YYYY",dateFormatStringLong:"MMM DD, YYYY",dateFormatStringLC:"mm/dd/yyyy",dateFormatMask:"__/__/____"},Ek=0;function k_e(){return Ek+=1,`control-${Ek}`}function L_e(){Ek=0}function U_e(t){if(typeof t=="string"){let e=t.toLowerCase();return e==="true"||e==="on"||e===""}return!!t}function z_e(t){if(!t)return"";let e=t.charAt(0),n=t.lastIndexOf(" "),o=t.lastIndexOf(".");return n>0?e+=t.substring(n+1).charAt(0):o>0&&(e+=t.substring(o+1).charAt(0)),e.toUpperCase()}function kK(t=""){if(t)return t;let e=PCore.getEnvironmentInfo().getLocale?.();return e||(typeof document<"u"&&document.documentElement?.lang?document.documentElement.lang:Intl.DateTimeFormat().resolvedOptions().locale)}function j_e(t){if(t)return t;let e=PCore.getLocaleUtils().getTimeZoneInUse?.();return e||Intl.DateTimeFormat().resolvedOptions().timeZone}function F_e(){let t=PCore.getLocaleUtils(),e={...MK},n=kK(),o=new Date(Date.parse("30 November 2023 12:00:00 GMT")),r=new Intl.DateTimeFormat(n).format(o),i=r.indexOf("11"),s=r.indexOf("30"),a=r.indexOf("2023"),c=t.getLocaleValue("month_placeholder","CosmosFields")!=="month_placeholder"||t.getLocaleValue("day_placeholder","CosmosFields")!=="day_placeholder"||t.getLocaleValue("year_placeholder","CosmosFields")!=="year_placeholder",l=[{loc:i,format:"MM",longFormat:"MMM",placeholder:c?t.getLocaleValue("month_placeholder","CosmosFields"):"mm",mask:"__",separator:r[i+2]},{loc:s,format:"DD",longFormat:"DD",placeholder:c?t.getLocaleValue("day_placeholder","CosmosFields"):"dd",mask:"__",separator:r[s+2]},{loc:a,format:"YYYY",longFormat:"YYYY",placeholder:c?t.getLocaleValue("year_placeholder","CosmosFields"):"yyyy",mask:"____",separator:r[a+4]}];return l.sort((u,p)=>u.loc-p.loc),e.dateFormatString=`${l[0].format}${l[0].separator}${l[1].format}${l[1].separator}${l[2].format}`,e.dateFormatStringLong=`${l[0].longFormat} ${l[1].longFormat}, ${l[2].longFormat}`,e.dateFormatStringLC=`${l[0].placeholder}${l[0].separator}${l[1].placeholder}${l[1].separator}${l[2].placeholder}`,e.dateFormatMask=`${l[0].mask}${l[0].separator}${l[1].mask}${l[1].separator}${l[2].mask}`,e}function V_e(t){let e=t.getComponentConfig(),n=String(e.referenceList??"").replace("@P ","");if(n.includes("D_")){let o=t.resolveDatasourceReference?.(n);o!=null&&(typeof o=="object"&&"pxResults"in o?n=o.pxResults:typeof o=="string"&&o.startsWith("D_")&&!o.endsWith(".pxResults")&&(n=`${o}.pxResults`))}return n}function B_e(){console.warn(`Using Constellation version ${PCore.getPCoreVersion()}. SDK version: ${Ck}. Ensure the Constellation version matches your Infinity server.`)}function H_e(){return Ck}function G_e(t){if(typeof t=="string")return t;if(t)return String(t)}function q_e(t){return typeof t.datasource=="object"&&Array.isArray(t.datasource)?t.datasource:[]}function W_e(t,e){let n=t.datasource;if(typeof n=="string"&&e[n])return[];let o=t.listOutput;if(typeof n=="object"&&!Array.isArray(o)){let r=n.source;o=Array.isArray(r)?r:[]}return(o??[]).forEach(r=>{r.value=r.text??r.value}),o??[]}function K_e(t,e={}){let n=t.listType;return n?n.toLowerCase()==="associated"?q_e(t):n.toLowerCase()==="datapage"?W_e(t,e):[]:[]}function J_e(t,e,n,o){switch(e){case"change":t.updateFieldValue(n,o);break;case"blur":t.triggerFieldChange(n,o);break;case"changeNblur":t.updateFieldValue(n,o),t.triggerFieldChange(n,o);break;default:break}}function Y_e(t){let e=t.getRawMetadata()?.children;return Array.isArray(e)?e.map(n=>(Array.isArray(n.children)?n.children:[]).map(r=>r.config??{})):[]}function Z_e(t){return t.filter(({visibility:e})=>e!==!1).map(({value:e,label:n})=>({id:(n??"").toLowerCase(),name:n??"",value:e}))}function LK(t){let e=String(t.getValue(A.CASE_INFO.CASE_INFO_CLASSID)??""),o=`${String(t.getValue(A.CASE_INFO.ASSIGNMENTACTION_ID)??"")}!${e}`,r=`${t.getCurrentView()}!${t.getCurrentClassID()}`;return o===r}function Q_e(t,e="casestep"){let n=G_e(t.getValue(A.CASE_INFO.INSTRUCTIONS)),o=LK(t);switch(e){case"casestep":return o&&n?.length?n:void 0;case"none":return;default:return e.startsWith("@PARAGRAPH")?void 0:e}}function Ak(t,e){let{selectionMode:n,selectionList:o,renderMode:r,referenceList:i}=t.getComponentConfig(),s=A.LIST_SELECTION_MODE;(n===s.MULTI&&o||r==="Editable"&&i)&&t.getListActions()?.setVisibility(e)}function X_e(t){if(t.isEditable()){let e=t.getActionsApi();e&&(t.setAction?.("onChange",n=>{e.changeHandler?.(t,n)}),t.setAction?.("onBlur",n=>{e.eventHandler?.(t,n)}))}return t.addFormField(),Ak(t,!0),()=>{t.removeFormField?.(),Ak(t,!1),t.removeNode()}}function ebe(t){return Array.isArray(t)?t.filter(e=>e.type!=="Alternate"||e.type==="Alternate"&&e.visited_status==="active"):[]}function tbe(t,e){let n="psdk-vertical-step-body";return t<e-1?`${n} psdk-vertical-step-line`:n}function nbe(t,e){let n=e.length,o=e[n-1],r=e.findIndex(a=>a.ID===t?.ID),i=t.visited_status==="current",s=r===n-2&&o?.visited_status==="current";return i||s?"flex-auto":""}function rbe(t,e){return t===e-1}function obe(t){return t?t.replace(/\((\d+)\)/g,(e,n)=>`[${parseInt(n,10)-1}]`):null}function ibe(t,e){return typeof window<"u"?new CustomEvent(t,{detail:{additionalData:e}}):null}function sbe(){return mk}function abe(){return fk}function cbe(){return yk}function lbe(){return Sk}var _k=class{getDebouncedSubject(e){return new _a().pipe(yf(e))}},UK=new _k;var ube=(()=>{let t="[!#-'*+/0-9=?A-Z\\^_`a-z{|}~\\-]+",e="\\\\[\\x00-\\x7f]",n=`"(?:[^\\r"\\\\\\x80-\\xff]|${e})*"`,o=`\\[(?:[^\\r\\[\\]\\\\\\x80-\\xff]|${e})*\\]`,r=`(?:${t}|${n})`,i=`(?:${t}|${o})`,s=`${r}(?:\\.${r})*`,a=`${i}(?:\\.${i})*`;return new RegExp(`^${s}@${a}$`)})();function dbe(t){return ube.test(t)}var pbe=(()=>{let e="[A-Za-z0-9!#$%&'*+/=?^_`{|}~-]+",u=`${`(?:${`${e}(?:\\.${e})*`}|"(?:[^\\x0d\\x22\\x5c]|\\\\[\\x00-\\x7f])+")`}@(?:[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?\\.)+[A-Za-z]{2,63}`;return new RegExp(`^${u}$`)})();function mbe(t){return pbe.test(t)}Ft.register("email",(t,{useRFC822Validation:e})=>{let n=null,o=e?dbe(t):mbe(t);return t&&!o&&(n="Enter a valid email address"),n});Ft.register("integer",t=>{let e=null;return t&&!/^(-)?\d+$/.test(t)&&(e="Invalid number"),e});Ft.register("required",t=>Array.isArray(t)&&t.length===0||t==null||t===""?"Cannot be blank":null);function fbe(t){if(We.isStaticContentReference(t))return!0;try{let e=new URL(t);return e.protocol==="http:"||e.protocol==="https:"||e.protocol==="ftp:"}catch{return!1}}Ft.register("url",t=>{let e=null;return t&&!fbe(t)&&(e="Enter a valid url"),e});var OT={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|[2-467])\\d{4}",[5,6]],AD:["376","00","(?:1|6\\d)\\d{7}|[135-9]\\d{5}",[6,8,9],[["(\\d{3})(\\d{3})","$1 $2",["[135-9]"]],["(\\d{4})(\\d{4})","$1 $2",["1"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]]],AE:["971","00","(?:[4-7]\\d|9[0-689])\\d{7}|800\\d{2,9}|[2-4679]\\d{7}",[5,6,7,8,9,10,11,12],[["(\\d{3})(\\d{2,9})","$1 $2",["60|8"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[236]|[479][2-8]"],"0$1"],["(\\d{3})(\\d)(\\d{5})","$1 $2 $3",["[479]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"]],"0"],AF:["93","00","[2-7]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"]],"0"],AG:["1","011","(?:268|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([457]\\d{6})$|1","268$1",0,"268"],AI:["1","011","(?:264|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2457]\\d{6})$|1","264$1",0,"264"],AL:["355","00","(?:700\\d\\d|900)\\d{3}|8\\d{5,7}|(?:[2-5]|6\\d)\\d{7}",[6,7,8,9],[["(\\d{3})(\\d{3,4})","$1 $2",["80|9"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["4[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2358][2-5]|4"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["[23578]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["6"],"0$1"]],"0"],AM:["374","00","(?:[1-489]\\d|55|60|77)\\d{6}",[8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[89]0"],"0 $1"],["(\\d{3})(\\d{5})","$1 $2",["2|3[12]"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["1|47"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[3-9]"],"0$1"]],"0"],AO:["244","00","[29]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[29]"]]]],AR:["54","00","(?:11|[89]\\d\\d)\\d{8}|[2368]\\d{9}",[10,11],[["(\\d{4})(\\d{2})(\\d{4})","$1 $2-$3",["2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9])","2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8]))|2(?:2[24-9]|3[1-59]|47)","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5[56][46]|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|58|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|54(?:4|5[13-7]|6[89])|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:454|85[56])[46]|3(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["1"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[68]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2-$3",["[23]"],"0$1",1],["(\\d)(\\d{4})(\\d{2})(\\d{4})","$2 15-$3-$4",["9(?:2[2-469]|3[3-578])","9(?:2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9]))","9(?:2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8])))|92(?:2[24-9]|3[1-59]|47)","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5(?:[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|5(?:4(?:4|5[13-7]|6[89])|[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",0,"$1 $2 $3-$4"],["(\\d)(\\d{2})(\\d{4})(\\d{4})","$2 15-$3-$4",["91"],"0$1",0,"$1 $2 $3-$4"],["(\\d{3})(\\d{3})(\\d{5})","$1-$2-$3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{4})","$2 15-$3-$4",["9"],"0$1",0,"$1 $2 $3-$4"]],"0",0,"0?(?:(11|2(?:2(?:02?|[13]|2[13-79]|4[1-6]|5[2457]|6[124-8]|7[1-4]|8[13-6]|9[1267])|3(?:02?|1[467]|2[03-6]|3[13-8]|[49][2-6]|5[2-8]|[67])|4(?:7[3-578]|9)|6(?:[0136]|2[24-6]|4[6-8]?|5[15-8])|80|9(?:0[1-3]|[19]|2\\d|3[1-6]|4[02568]?|5[2-4]|6[2-46]|72?|8[23]?))|3(?:3(?:2[79]|6|8[2578])|4(?:0[0-24-9]|[12]|3[5-8]?|4[24-7]|5[4-68]?|6[02-9]|7[126]|8[2379]?|9[1-36-8])|5(?:1|2[1245]|3[237]?|4[1-46-9]|6[2-4]|7[1-6]|8[2-5]?)|6[24]|7(?:[069]|1[1568]|2[15]|3[145]|4[13]|5[14-8]|7[2-57]|8[126])|8(?:[01]|2[15-7]|3[2578]?|4[13-6]|5[4-8]?|6[1-357-9]|7[36-8]?|8[5-8]?|9[124])))15)?","9$1"],AS:["1","011","(?:[58]\\d\\d|684|900)\\d{7}",[10],0,"1",0,"([267]\\d{6})$|1","684$1",0,"684"],AT:["43","00","1\\d{3,12}|2\\d{6,12}|43(?:(?:0\\d|5[02-9])\\d{3,9}|2\\d{4,5}|[3467]\\d{4}|8\\d{4,6}|9\\d{4,7})|5\\d{4,12}|8\\d{7,12}|9\\d{8,12}|(?:[367]\\d|4[0-24-9])\\d{4,11}",[4,5,6,7,8,9,10,11,12,13],[["(\\d)(\\d{3,12})","$1 $2",["1(?:11|[2-9])"],"0$1"],["(\\d{3})(\\d{2})","$1 $2",["517"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["5[079]"],"0$1"],["(\\d{3})(\\d{3,10})","$1 $2",["(?:31|4)6|51|6(?:48|5[0-3579]|[6-9])|7(?:20|32|8)|[89]","(?:31|4)6|51|6(?:485|5[0-3579]|[6-9])|7(?:20|32|8)|[89]"],"0$1"],["(\\d{4})(\\d{3,9})","$1 $2",["[2-467]|5[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["5"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,7})","$1 $2 $3",["5"],"0$1"]],"0"],AU:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{7}(?:\\d(?:\\d{2})?)?|8[0-24-9]\\d{7})|[2-478]\\d{8}|1\\d{4,7}",[5,6,7,8,9,10,12],[["(\\d{2})(\\d{3,4})","$1 $2",["16"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,4})","$1 $2 $3",["16"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["14|4"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[2378]"],"(0$1)"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:30|[89])"]]],"0",0,"(183[12])|0",0,0,0,[["(?:(?:241|349)0\\d\\d|8(?:51(?:0(?:0[03-9]|[12479]\\d|3[2-9]|5[0-8]|6[1-9]|8[0-7])|1(?:[0235689]\\d|1[0-69]|4[0-589]|7[0-47-9])|2(?:0[0-79]|[18][13579]|2[14-9]|3[0-46-9]|[4-6]\\d|7[89]|9[0-4])|[34]\\d\\d)|91(?:(?:[0-58]\\d|6[0135-9])\\d|7(?:0[0-24-9]|[1-9]\\d)|9(?:[0-46-9]\\d|5[0-79]))))\\d{3}|(?:2(?:[0-26-9]\\d|3[0-8]|4[02-9]|5[0135-9])|3(?:[0-3589]\\d|4[0-578]|6[1-9]|7[0-35-9])|7(?:[013-57-9]\\d|2[0-8])|8(?:55|6[0-8]|[78]\\d|9[02-9]))\\d{6}",[9]],["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,["163\\d{2,6}",[5,6,7,8,9]],["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],AW:["297","00","(?:[25-79]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[25-9]"]]]],AX:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","2\\d{4,9}|35\\d{4,5}|(?:60\\d\\d|800)\\d{4,6}|7\\d{5,11}|(?:[14]\\d|3[0-46-9]|50)\\d{4,8}",[5,6,7,8,9,10,11,12],0,"0",0,0,0,0,"18",0,"00"],AZ:["994","00","365\\d{6}|(?:[124579]\\d|60|88)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[28]|2|365|46","1[28]|2|365[45]|46","1[28]|2|365(?:4|5[02])|46"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[13-9]"],"0$1"]],"0"],BA:["387","00","6\\d{8}|(?:[35689]\\d|49|70)\\d{6}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["6[1-3]|[7-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2-$3",["[3-5]|6[56]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["6"],"0$1"]],"0"],BB:["1","011","(?:246|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","246$1",0,"246"],BD:["880","00","[1-469]\\d{9}|8[0-79]\\d{7,8}|[2-79]\\d{8}|[2-9]\\d{7}|[3-9]\\d{6}|[57-9]\\d{5}",[6,7,8,9,10],[["(\\d{2})(\\d{4,6})","$1-$2",["31[5-8]|[459]1"],"0$1"],["(\\d{3})(\\d{3,7})","$1-$2",["3(?:[67]|8[013-9])|4(?:6[168]|7|[89][18])|5(?:6[128]|9)|6(?:[15]|28|4[14])|7[2-589]|8(?:0[014-9]|[12])|9[358]|(?:3[2-5]|4[235]|5[2-578]|6[0389]|76|8[3-7]|9[24])1|(?:44|66)[01346-9]"],"0$1"],["(\\d{4})(\\d{3,6})","$1-$2",["[13-9]|2[23]"],"0$1"],["(\\d)(\\d{7,8})","$1-$2",["2"],"0$1"]],"0"],BE:["32","00","4\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:80|9)0"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[239]|4[23]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[15-8]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4"],"0$1"]],"0"],BF:["226","00","[024-7]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[024-7]"]]]],BG:["359","00","00800\\d{7}|[2-7]\\d{6,7}|[89]\\d{6,8}|2\\d{5}",[6,7,8,9,12],[["(\\d)(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["43[1-6]|70[1-9]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[356]|4[124-7]|7[1-9]|8[1-6]|9[1-7]"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:70|8)0"],"0$1"],["(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3",["43[1-7]|7"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[48]|9[08]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"]],"0"],BH:["973","00","[136-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[13679]|8[02-4679]"]]]],BI:["257","00","(?:[267]\\d|31)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2367]"]]]],BJ:["229","00","(?:01\\d|8)\\d{7}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["0"]]]],BL:["590","00","7090\\d{5}|(?:[56]9|[89]\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["(?:59(?:0(?:2[7-9]|3[3-7]|5[12]|87)|87\\d)|80[6-9]\\d\\d)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5]))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],["8[129]\\d{7}"],0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],BM:["1","011","(?:441|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","441$1",0,"441"],BN:["673","00","[2-578]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-578]"]]]],BO:["591","00(?:1\\d)?","(?:[2-7]\\d\\d|8001)\\d{5}",[8,9],[["(\\d)(\\d{7})","$1 $2",["[23]|4[46]|50"]],["(\\d{8})","$1",["[5-7]"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["8"]]],"0",0,"0(1\\d)?"],BQ:["599","00","(?:[34]1|7\\d)\\d{5}",[7],0,0,0,0,0,0,"[347]"],BR:["55","00(?:1[245]|2[1-35]|31|4[13]|[56]5|99)","[1-467]\\d{9,10}|55[0-46-9]\\d{8}|[34]\\d{7}|55\\d{7,8}|(?:5[0-46-9]|[89]\\d)\\d{7,9}",[8,9,10,11],[["(\\d{4})(\\d{4})","$1-$2",["300|4(?:0[02]|37|86)","300|4(?:0(?:0|20)|370|864)"]],["(\\d{3})(\\d{2,3})(\\d{4})","$1 $2 $3",["(?:[358]|90)0"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-57]"],"($1)"],["(\\d{2})(\\d{5})(\\d{4})","$1 $2-$3",["[16][1-9]|[2-57-9]"],"($1)"]],"0",0,"(?:0|90)(?:(1[245]|2[1-35]|31|4[13]|[56]5|99)(\\d{10,11}))?","$2"],BS:["1","011","(?:242|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([3-8]\\d{6})$|1","242$1",0,"242"],BT:["975","00","[178]\\d{7}|[2-8]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[2-6]|7[246]|8[2-4]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[67]|[78]"]]]],BW:["267","00","(?:0800|(?:[37]|800)\\d)\\d{6}|(?:[2-6]\\d|90)\\d{5}",[7,8,10],[["(\\d{2})(\\d{5})","$1 $2",["90"]],["(\\d{3})(\\d{4})","$1 $2",["[24-6]|3[15-9]"]],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37]"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["8"]]]],BY:["375","810","(?:[12]\\d|33|44|902)\\d{7}|8(?:0[0-79]\\d{5,7}|[1-7]\\d{9})|8(?:1[0-489]|[5-79]\\d)\\d{7}|8[1-79]\\d{6,7}|8[0-79]\\d{5}|8\\d{5}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3})","$1 $2",["800"],"8 $1"],["(\\d{3})(\\d{2})(\\d{2,4})","$1 $2 $3",["800"],"8 $1"],["(\\d{4})(\\d{2})(\\d{3})","$1 $2-$3",["1(?:5[169]|6[3-5]|7[179])|2(?:1[35]|2[34]|3[3-5])","1(?:5[169]|6(?:3[1-3]|4|5[125])|7(?:1[3-9]|7[0-24-6]|9[2-7]))|2(?:1[35]|2[34]|3[3-5])"],"8 0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["1(?:[56]|7[467])|2[1-3]"],"8 0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-4]"],"8 0$1"],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["[89]"],"8 $1"]],"8",0,"0|80?",0,0,0,0,"8~10"],BZ:["501","00","(?:0800\\d|[2-8])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1-$2",["[2-8]"]],["(\\d)(\\d{3})(\\d{4})(\\d{3})","$1-$2-$3-$4",["0"]]]],CA:["1","011","[2-9]\\d{9}|3\\d{6}",[7,10],0,"1",0,0,0,0,0,[["(?:2(?:04|[23]6|[48]9|5[07]|63)|3(?:06|43|54|6[578]|82)|4(?:03|1[68]|[26]8|3[178]|50|74)|5(?:06|1[49]|48|79|8[147])|6(?:04|[18]3|39|47|72)|7(?:0[59]|42|53|78|8[02])|8(?:[06]7|19|25|7[39])|9(?:0[25]|42))[2-9]\\d{6}",[10]],["",[10]],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",[10]],["900[2-9]\\d{6}",[10]],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|(?:5(?:2[125-9]|3[23]|44|66|77|88)|6(?:22|33))[2-9]\\d{6}",[10]],0,["310\\d{4}",[7]],0,["600[2-9]\\d{6}",[10]]]],CC:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:02|31|60|89)|1(?:18|76)|223)|91(?:0(?:1[0-2]|29)|1(?:[28]2|50|79)|2(?:10|64)|3(?:[06]8|22)|4[29]8|62\\d|70[23]|959))\\d{3}",[9]],["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CD:["243","00","(?:(?:[189]|5\\d)\\d|2)\\d{7}|[1-68]\\d{6}",[7,8,9,10],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["[1-6]"],"0$1"],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["5"],"0$1"]],"0"],CF:["236","00","8776\\d{4}|(?:[27]\\d|61)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[26-8]"]]]],CG:["242","00","222\\d{6}|(?:0\\d|80)\\d{7}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[02]"]]]],CH:["41","00","8\\d{11}|[2-9]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8[047]|90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]|81"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["8"],"0$1"]],"0"],CI:["225","00","[02]\\d{9}",[10],[["(\\d{2})(\\d{2})(\\d)(\\d{5})","$1 $2 $3 $4",["2"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3 $4",["0"]]]],CK:["682","00","[2-578]\\d{4}",[5],[["(\\d{2})(\\d{3})","$1 $2",["[2-578]"]]]],CL:["56","(?:0|1(?:1[0-69]|2[02-5]|5[13-58]|69|7[0167]|8[018]))0","12300\\d{6}|6\\d{9,10}|[2-9]\\d{8}",[9,10,11],[["(\\d{5})(\\d{4})","$1 $2",["219","2196"],"($1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["60|809"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["44"]],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2[1-36]"],"($1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["9(?:10|[2-9])"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["3[2-5]|[47]|5[1-3578]|6[13-57]|8(?:0[1-8]|[1-9])"],"($1)"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["60|8"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{3})(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3 $4",["60"]]]],CM:["237","00","[26]\\d{8}|88\\d{6,7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["88"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[26]|88"]]]],CN:["86","00|1(?:[12]\\d|79)\\d\\d00","(?:(?:1[03-689]|2\\d)\\d\\d|6)\\d{8}|1\\d{10}|[126]\\d{6}(?:\\d(?:\\d{2})?)?|86\\d{5,6}|(?:[3-579]\\d|8[0-57-9])\\d{5,9}",[7,8,9,10,11,12],[["(\\d{2})(\\d{5,6})","$1 $2",["(?:10|2[0-57-9])[19]|3(?:[157]|35|49|9[1-68])|4(?:1[124-9]|2[179]|6[47-9]|7|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:07|1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3|4[13]|5[1-5]|7[0-79]|9[0-35-9])|(?:4[35]|59|85)[1-9]","(?:10|2[0-57-9])(?:1[02]|9[56])|8078|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))1","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|80781|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))12","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|807812|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:078|1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123"],"0$1"],["(\\d{3})(\\d{5,6})","$1 $2",["3(?:[157]|35|49|9[1-68])|4(?:[17]|2[179]|6[47-9]|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])|(?:4[35]|59|85)[1-9]","(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))[19]","85[23](?:10|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:10|9[56])","85[23](?:100|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:100|9[56])"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["(?:4|80)0"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|2(?:[02-57-9]|1[1-9])","10|2(?:[02-57-9]|1[1-9])","10[0-79]|2(?:[02-57-9]|1[1-79])|(?:10|21)8(?:0[1-9]|[1-9])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["3(?:[3-59]|7[02-68])|4(?:[26-8]|3[3-9]|5[2-9])|5(?:3[03-9]|[468]|7[028]|9[2-46-9])|6|7(?:[0-247]|3[04-9]|5[0-4689]|6[2368])|8(?:[1-358]|9[1-7])|9(?:[013479]|5[1-5])|(?:[34]1|55|79|87)[02-9]"],"0$1",1],["(\\d{3})(\\d{7,8})","$1 $2",["9"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["80"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[3-578]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["1[3-9]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3 $4",["[12]"],"0$1",1]],"0",0,"(1(?:[12]\\d|79)\\d\\d)|0",0,0,0,0,"00"],CO:["57","00(?:4(?:[14]4|56)|[579])","(?:46|60\\d\\d)\\d{6}|(?:1\\d|[39])\\d{9}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["46"]],["(\\d{3})(\\d{7})","$1 $2",["6|90"],"($1)"],["(\\d{3})(\\d{7})","$1 $2",["3[0-357]|9[14]"]],["(\\d)(\\d{3})(\\d{7})","$1-$2-$3",["1"],"0$1",0,"$1 $2 $3"]],"0",0,"0([3579]|4(?:[14]4|56))?"],CR:["506","00","(?:8\\d|90)\\d{8}|(?:[24-8]\\d{3}|3005)\\d{4}",[8,10],[["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[3-9]"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[89]"]]],0,0,"(19(?:0[0-2468]|1[09]|20|66|77|99))"],CU:["53","119","(?:[2-7]|8\\d\\d)\\d{7}|[2-47]\\d{6}|[34]\\d{5}",[6,7,8,10],[["(\\d{2})(\\d{4,6})","$1 $2",["2[1-4]|[34]"],"(0$1)"],["(\\d)(\\d{6,7})","$1 $2",["7"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["[56]"],"0$1"],["(\\d{3})(\\d{7})","$1 $2",["8"],"0$1"]],"0"],CV:["238","0","(?:[2-59]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2-589]"]]]],CW:["599","00","(?:[34]1|60|(?:7|9\\d)\\d)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[3467]"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["9[4-8]"]]],0,0,0,0,0,"[69]"],CX:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:01|30|59|88)|1(?:17|46|75)|2(?:22|35))|91(?:00[6-9]|1(?:[28]1|49|78)|2(?:09|63)|3(?:12|26|75)|4(?:56|97)|64\\d|7(?:0[01]|1[0-2])|958))\\d{3}",[9]],["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CY:["357","00","(?:[279]\\d|[58]0)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[257-9]"]]]],CZ:["420","00","(?:[2-578]\\d|60)\\d{7}|9\\d{8,11}",[9,10,11,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]|9[015-7]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3 $4",["96"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]]],DE:["49","00","[2579]\\d{5,14}|49(?:[34]0|69|8\\d)\\d\\d?|49(?:37|49|60|7[089]|9\\d)\\d{1,3}|49(?:2[024-9]|3[2-689]|7[1-7])\\d{1,8}|(?:1|[368]\\d|4[0-8])\\d{3,13}|49(?:[015]\\d|2[13]|31|[46][1-8])\\d{1,9}",[4,5,6,7,8,9,10,11,12,13,14,15],[["(\\d{2})(\\d{3,13})","$1 $2",["3[02]|40|[68]9"],"0$1"],["(\\d{3})(\\d{3,12})","$1 $2",["2(?:0[1-389]|1[124]|2[18]|3[14])|3(?:[35-9][15]|4[015])|906|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1","2(?:0[1-389]|12[0-8])|3(?:[35-9][15]|4[015])|906|2(?:[13][14]|2[18])|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1"],"0$1"],["(\\d{4})(\\d{2,11})","$1 $2",["[24-6]|3(?:[3569][02-46-9]|4[2-4679]|7[2-467]|8[2-46-8])|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]","[24-6]|3(?:3(?:0[1-467]|2[127-9]|3[124578]|7[1257-9]|8[1256]|9[145])|4(?:2[135]|4[13578]|9[1346])|5(?:0[14]|2[1-3589]|6[1-4]|7[13468]|8[13568])|6(?:2[1-489]|3[124-6]|6[13]|7[12579]|8[1-356]|9[135])|7(?:2[1-7]|4[145]|6[1-5]|7[1-4])|8(?:21|3[1468]|6|7[1467]|8[136])|9(?:0[12479]|2[1358]|4[134679]|6[1-9]|7[136]|8[147]|9[1468]))|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]|3[68]4[1347]|3(?:47|60)[1356]|3(?:3[46]|46|5[49])[1246]|3[4579]3[1357]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["138"],"0$1"],["(\\d{5})(\\d{2,10})","$1 $2",["3"],"0$1"],["(\\d{3})(\\d{5,11})","$1 $2",["181"],"0$1"],["(\\d{3})(\\d)(\\d{4,10})","$1 $2 $3",["1(?:3|80)|9"],"0$1"],["(\\d{3})(\\d{7,8})","$1 $2",["1[67]"],"0$1"],["(\\d{3})(\\d{7,12})","$1 $2",["8"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["185","1850","18500"],"0$1"],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["18[68]"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["15[1279]"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["15[03568]","15(?:[0568]|3[13])"],"0$1"],["(\\d{3})(\\d{8})","$1 $2",["18"],"0$1"],["(\\d{3})(\\d{2})(\\d{7,8})","$1 $2 $3",["1(?:6[023]|7)"],"0$1"],["(\\d{4})(\\d{2})(\\d{7})","$1 $2 $3",["15[279]"],"0$1"],["(\\d{3})(\\d{2})(\\d{8})","$1 $2 $3",["15"],"0$1"]],"0"],DJ:["253","00","(?:2\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[27]"]]]],DK:["45","00","[2-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-9]"]]]],DM:["1","011","(?:[58]\\d\\d|767|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","767$1",0,"767"],DO:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,0,0,0,"8001|8[024]9"],DZ:["213","00","(?:[1-4]|[5-79]\\d|80)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["9"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-8]"],"0$1"]],"0"],EC:["593","00","1\\d{9,10}|(?:[2-7]|9\\d)\\d{7}",[8,9,10,11],[["(\\d)(\\d{3})(\\d{4})","$1 $2-$3",["[2-7]"],"(0$1)",0,"$1-$2-$3"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{3})(\\d{3,4})","$1 $2 $3",["1"]]],"0"],EE:["372","00","8\\d{9}|[4578]\\d{7}|(?:[3-8]\\d|90)\\d{5}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[369]|4[3-8]|5(?:[0-2]|5[0-478]|6[45])|7[1-9]|88","[369]|4[3-8]|5(?:[02]|1(?:[0-8]|95)|5[0-478]|6(?:4[0-4]|5[1-589]))|7[1-9]|88"]],["(\\d{4})(\\d{3,4})","$1 $2",["[45]|8(?:00|[1-49])","[45]|8(?:00[1-9]|[1-49])"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],EG:["20","00","[189]\\d{8,9}|[24-6]\\d{8}|[135]\\d{7}",[8,9,10],[["(\\d)(\\d{7,8})","$1 $2",["[23]"],"0$1"],["(\\d{2})(\\d{6,7})","$1 $2",["1[35]|[4-6]|8[2468]|9[235-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{8})","$1 $2",["1"],"0$1"]],"0"],EH:["212","00","[5-8]\\d{8}",[9],0,"0",0,0,0,0,0,[["528[89]\\d{5}"],["(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[016-8]\\d|2[0-8]|3[01]|5[0-5]))\\d{6}"],["80[0-7]\\d{6}"],["89\\d{7}"],0,0,0,0,["(?:592(?:4[0-2]|93)|80[89]\\d\\d)\\d{4}"]]],ER:["291","00","[178]\\d{6}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[178]"],"0$1"]],"0"],ES:["34","00","(?:400|[5-9]\\d\\d)\\d{6}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]00"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[4-9]"]]]],ET:["251","00","(?:11|[2-57-9]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-57-9]"],"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{2})(\\d{2})(\\d{2})","$1 $2 $3",["[2-9]"]]],0,0,"(10(?:01|[12]0|88))"],FR:["33","00","[1-9]\\d{8}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0 $1"],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[1-79]"],"0$1"]],"0"],GA:["241","00","(?:[067]\\d|11)\\d{6}|[2-7]\\d{6}",[7,8],[["(\\d)(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-7]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["11|[67]"],"0$1"]],0,0,"0(11\\d{6}|60\\d{6}|61\\d{6}|6[256]\\d{6}|7[467]\\d{6})","$1"],GB:["44","00","[1-357-9]\\d{9}|[18]\\d{8}|8\\d{6}",[7,9,10],[["(\\d{3})(\\d{4})","$1 $2",["800","8001","80011","800111","8001111"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["845","8454","84546","845464"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["800"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["1(?:38|5[23]|69|76|94)","1(?:(?:38|69)7|5(?:24|39)|768|946)","1(?:3873|5(?:242|39[4-6])|(?:697|768)[347]|9467)"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["1(?:[2-69][02-9]|[78])"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[25]|7(?:0|6[02-9])","[25]|7(?:0|6(?:[03-9]|2[356]))"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[1389]"],"0$1"]],"0",0,"0|180020",0,0,0,[["(?:1(?:1(?:3(?:[0-58]\\d\\d|73[0-5])|4(?:(?:[0-5]\\d|70)\\d|69[7-9])|(?:(?:5[0-26-9]|[78][0-49])\\d|6(?:[0-4]\\d|5[01]))\\d)|(?:2(?:(?:0[024-9]|2[3-9]|3[3-79]|4[1-689]|[58][02-9]|6[0-47-9]|7[013-9]|9\\d)\\d|1(?:[0-7]\\d|8[0-3]))|(?:3(?:0\\d|1[0-8]|[25][02-9]|3[02-579]|[468][0-46-9]|7[1-35-79]|9[2-578])|4(?:0[03-9]|[137]\\d|[28][02-57-9]|4[02-69]|5[0-8]|[69][0-79])|5(?:0[1-35-9]|[16]\\d|2[024-9]|3[015689]|4[02-9]|5[03-9]|7[0-35-9]|8[0-468]|9[0-57-9])|6(?:0[034689]|1\\d|2[0-35689]|[38][013-9]|4[1-467]|5[0-69]|6[13-9]|7[0-8]|9[0-24578])|7(?:0[0246-9]|2\\d|3[0236-8]|4[03-9]|5[0-46-9]|6[013-9]|7[0-35-9]|8[024-9]|9[02-9])|8(?:0[35-9]|2[1-57-9]|3[02-578]|4[0-578]|5[124-9]|6[2-69]|7\\d|8[02-9]|9[02569])|9(?:0[02-589]|[18]\\d|2[02-689]|3[1-57-9]|4[2-9]|5[0-579]|6[2-47-9]|7[0-24578]|9[2-57]))\\d)\\d)|2(?:0[013478]|3[0189]|4[017]|8[0-46-9]|9[0-2])\\d{3})\\d{4}|1(?:2(?:0(?:46[1-4]|87[2-9])|545[1-79]|76(?:2\\d|3[1-8]|6[1-6])|9(?:7(?:2[0-4]|3[2-5])|8(?:2[2-8]|7[0-47-9]|8[3-5])))|3(?:6(?:38[2-5]|47[23])|8(?:47[04-9]|64[0157-9]))|4(?:044[1-7]|20(?:2[23]|8\\d)|6(?:0(?:30|5[2-57]|6[1-8]|7[2-8])|140)|8(?:052|87[1-3]))|5(?:2(?:4(?:3[2-79]|6\\d)|76\\d)|6(?:26[06-9]|686))|6(?:06(?:4\\d|7[4-79])|295[5-7]|35[34]\\d|47(?:24|61)|59(?:5[08]|6[67]|74)|9(?:55[0-4]|77[23]))|7(?:26(?:6[13-9]|7[0-7])|(?:442|688)\\d|50(?:2[0-3]|[3-68]2|76))|8(?:27[56]\\d|37(?:5[2-5]|8[239])|843[2-58])|9(?:0(?:0(?:6[1-8]|85)|52\\d)|3583|4(?:66[1-8]|9(?:2[01]|81))|63(?:23|3[1-4])|9561))\\d{3}",[9,10]],["7(?:457[0-57-9]|700[01]|911[028])\\d{5}|7(?:[1-3]\\d\\d|4(?:[0-46-9]\\d|5[0-689])|5(?:0[0-8]|[13-9]\\d|2[0-35-9])|7(?:0[1-9]|[1-7]\\d|8[02-9]|9[0-689])|8(?:[014-9]\\d|[23][0-8])|9(?:[024-9]\\d|1[02-9]|3[0-689]))\\d{6}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[2-49]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]],0," x"],GD:["1","011","(?:473|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","473$1",0,"473"],GE:["995","00","(?:[3-57]\\d\\d|800)\\d{6}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["32"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[57]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[348]"],"0$1"]],"0"],GF:["594","00","(?:694\\d|7093)\\d{5}|(?:59|[89]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]|80[6-9]|9[47]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[89]"],"0$1"]],"0"],GG:["44","00","(?:1481|[357-9]\\d{3})\\d{6}|8\\d{6}(?:\\d{2})?",[7,9,10],0,"0",0,"([25-9]\\d{5})$|0|180020","1481$1",0,0,[["1481[25-9]\\d{5}",[10]],["7(?:(?:781|839)\\d|911[17])\\d{5}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[0-3]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]]],GH:["233","00","[235]\\d{8}|800\\d{5,6}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2358]"],"0$1"]],"0"],GI:["350","00","(?:[25]\\d|60)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["2"]]]],GL:["299","00","(?:19|[2-689]\\d|70)\\d{4}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["19|[2-9]"]]]],GM:["220","00","[2-9]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],GN:["224","00","722\\d{6}|(?:3|6\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["3"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[67]"]]]],GP:["590","00","7090\\d{5}|(?:[56]9|[89]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-79]|80[6-9]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0",0,0,0,0,0,[["(?:59(?:0(?:0[1-68]|[14][0-24-9]|2[0-68]|3[1-9]|5[3-579]|[68][0-689]|7[08]|9\\d)|87\\d)|80[6-9]\\d\\d)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5]))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],["8[129]\\d{7}"],0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],GQ:["240","00","222\\d{6}|(?:3\\d|55|[89]0)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235]"]],["(\\d{3})(\\d{6})","$1 $2",["[89]"]]]],GR:["30","00","5005000\\d{3}|8\\d{9,11}|(?:[269]\\d|70)\\d{8}",[10,11,12],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["21|7"]],["(\\d{4})(\\d{6})","$1 $2",["2(?:2|3[2-57-9]|4[2-469]|5[2-59]|6[2-9]|7[2-69]|8[2-49])|5"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2689]"]],["(\\d{3})(\\d{3,4})(\\d{5})","$1 $2 $3",["8"]]]],GT:["502","00","80\\d{6}|(?:1\\d{3}|[2-7])\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1 $2",["[2-8]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],GU:["1","011","(?:[58]\\d\\d|671|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","671$1",0,"671"],GW:["245","00","[49]\\d{8}|4\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["40"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"]]]],GY:["592","001","(?:[2-8]\\d{3}|9008)\\d{3}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],HK:["852","00(?:30|5[09]|[126-9]?)","8[0-46-9]\\d{6,7}|9\\d{4,7}|(?:[2-7]|9\\d{3})\\d{7}",[5,6,7,8,9,11],[["(\\d{3})(\\d{2,5})","$1 $2",["900","9003"]],["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[1-4]|9(?:0[1-9]|[1-8])"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{3})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]],0,0,0,0,0,0,0,"00"],HN:["504","00","8\\d{10}|[237-9]\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1-$2",["[237-9]"]]]],HR:["385","00","[2-69]\\d{8}|80\\d{5,7}|[1-79]\\d{7}|6\\d{6}",[7,8,9],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["6[01]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{4})(\\d{3})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6|7[245]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-57]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"]],"0"],HT:["509","00","[2-589]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[2-589]"]]]],HU:["36","00","[235-7]\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27][2-9]|3[2-7]|4[24-9]|5[2-79]|6|8[2-57-9]|9[2-69]"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"06 $1"]],"06"],ID:["62","00[89]","00[1-9]\\d{9,14}|(?:[1-36]|8\\d{5})\\d{6}|00\\d{9}|[1-9]\\d{8,10}|[2-9]\\d{7}",[7,8,9,10,11,12,13,14,15,16,17],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["15"]],["(\\d{2})(\\d{5,9})","$1 $2",["2[124]|[36]1"],"(0$1)"],["(\\d{3})(\\d{5,7})","$1 $2",["800"],"0$1"],["(\\d{3})(\\d{5,8})","$1 $2",["[2-79]"],"(0$1)"],["(\\d{3})(\\d{3,4})(\\d{3})","$1-$2-$3",["8[1-35-9]"],"0$1"],["(\\d{3})(\\d{6,8})","$1 $2",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["804"],"0$1"],["(\\d{3})(\\d)(\\d{3})(\\d{3})","$1 $2 $3 $4",["80"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1-$2-$3",["8"],"0$1"]],"0"],IE:["353","00","(?:1\\d|[2569])\\d{6,8}|4\\d{6,9}|7\\d{8}|8\\d{8,9}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["2[24-9]|47|58|6[237-9]|9[35-9]"],"(0$1)"],["(\\d{3})(\\d{5})","$1 $2",["[45]0"],"(0$1)"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["1"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2569]|4[1-69]|7[14]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["81"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[78]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["4"],"(0$1)"],["(\\d{2})(\\d)(\\d{3})(\\d{4})","$1 $2 $3 $4",["8"],"0$1"]],"0"],IL:["972","0(?:0|1[2-9])","1\\d{6}(?:\\d{3,5})?|[57]\\d{8}|[1-489]\\d{7}",[7,8,9,10,11,12],[["(\\d{4})(\\d{3})","$1-$2",["125"]],["(\\d{4})(\\d{2})(\\d{2})","$1-$2-$3",["121"]],["(\\d)(\\d{3})(\\d{4})","$1-$2-$3",["[2-489]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1-$2-$3",["12"]],["(\\d{4})(\\d{6})","$1-$2",["159"]],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3-$4",["1[7-9]"]],["(\\d{3})(\\d{1,2})(\\d{3})(\\d{4})","$1-$2 $3-$4",["15"]]],"0"],IM:["44","00","1624\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([25-8]\\d{5})$|0|180020","1624$1",0,"74576|(?:16|7[56])24"],IN:["91","00","(?:000800|[2-9]\\d\\d)\\d{7}|1\\d{7,12}",[8,9,10,11,12,13],[["(\\d{8})","$1",["5(?:0|2[23]|3[03]|[67]1|88)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|888)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|8888)"],0,1],["(\\d{4})(\\d{4,5})","$1 $2",["180","1800"],0,1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["140"],0,1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["11|2[02]|33|4[04]|79[1-7]|80[2-46]","11|2[02]|33|4[04]|79(?:[1-6]|7[19])|80(?:[2-4]|6[0-589])","11|2[02]|33|4[04]|79(?:[124-6]|3(?:[02-9]|1[0-24-9])|7(?:1|9[1-6]))|80(?:[2-4]|6[0-589])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1(?:2[0-249]|3[0-25]|4[145]|[68]|7[1257])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|5[12]|[78]1)|6(?:12|[2-4]1|5[17]|6[13]|80)|7(?:12|3[134]|61|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)|(?:43|59|75)[15]|(?:1[59]|29|67)[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(?:(?: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)|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(?:3171|5[15][2-6]|61[346]|88(?:[2-7]|82))|8(?:70[2-6]|84(?:[2356]|7[19])|91(?:[3-6]|7[19]))|73[134][2-6]|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]|3[129]|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(?:[23569]|8[0-57-9])|8[1-6])|7(?:1(?:[013-8]|9[6-9])|3(?:17|2[0-49]|9[2-57])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4|5[0-367])|70[13-7])|807[19]","1(?:[2-479]|5(?:[0236-9]|5[013-9]))|[2-5]|6(?:2(?:84|95)|355|8(?:28[235-7]|3))|73179|807(?:1|9[1-3])|(?:1552|6(?:(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578])\\d|7(?:[23569]\\d|8[0-57-9])|8(?:[14-6]\\d|2[0-79]))|7(?:1(?:[013-8]\\d|9[6-9])|3(?:2[0-49]|9[2-57])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\d|5[0-367])|70[13-7]))[2-7]"],"0$1",1],["(\\d{5})(\\d{5})","$1 $2",["16|[6-9]"],"0$1",1],["(\\d{4})(\\d{2,4})(\\d{4})","$1 $2 $3",["18[06]","18[06]0"],0,1],["(\\d{4})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["18"],0,1]],"0"],IO:["246","00","3\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["3"]]]],IQ:["964","00","(?:1|7\\d\\d)\\d{7}|[2-6]\\d{7,8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-6]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"]],"0"],IR:["98","00","[1-9]\\d{9}|(?:[1-8]\\d\\d|9)\\d{3,4}",[4,5,6,7,10],[["(\\d{4,5})","$1",["96"],"0$1"],["(\\d{2})(\\d{4,5})","$1 $2",["(?:1[137]|2[13-68]|3[1458]|4[145]|5[1468]|6[16]|7[1467]|8[13467])[12689]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[1-8]"],"0$1"]],"0"],IS:["354","00|1(?:0(?:01|[12]0)|100)","(?:38\\d|[4-9])\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["[4-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["3"]]],0,0,0,0,0,0,0,"00"],IT:["39","00","0\\d{5,11}|1\\d{8,10}|3(?:[0-8]\\d{7,10}|9\\d{7,8})|(?:43|55|70)\\d{8}|8\\d{5}(?:\\d{2,4})?",[6,7,8,9,10,11,12],[["(\\d{2})(\\d{4,6})","$1 $2",["0[26]"]],["(\\d{3})(\\d{3,6})","$1 $2",["0[13-57-9][0159]|8(?:03|4[17]|9[2-5])","0[13-57-9][0159]|8(?:03|4[17]|9(?:2|3[04]|[45][0-4]))"]],["(\\d{4})(\\d{2,6})","$1 $2",["0(?:[13-579][2-46-8]|8[236-8])"]],["(\\d{4})(\\d{4})","$1 $2",["894"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[26]|5"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["1(?:44|[679])|[378]|43"]],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[13-57-9][0159]|14"]],["(\\d{2})(\\d{4})(\\d{5})","$1 $2 $3",["0[26]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[03]"]]],0,0,0,0,0,0,[["0(?:669[0-79]\\d{1,6}|831\\d{2,8})|0(?:1(?:[0159]\\d|[27][1-5]|31|4[1-4]|6[1356]|8[2-57])|2\\d\\d|3(?:[0159]\\d|2[1-4]|3[12]|[48][1-6]|6[2-59]|7[1-7])|4(?:[0159]\\d|[23][1-9]|4[245]|6[1-5]|7[1-4]|81)|5(?:[0159]\\d|2[1-5]|3[2-6]|4[1-79]|6[4-6]|7[1-578]|8[3-8])|6(?:[0-57-9]\\d|6[0-8])|7(?:[0159]\\d|2[12]|3[1-7]|4[2-46]|6[13569]|7[13-6]|8[1-59])|8(?:[0159]\\d|2[3-578]|3[2356]|[6-8][1-5])|9(?:[0159]\\d|[238][1-5]|4[12]|6[1-8]|7[1-6]))\\d{2,7}"],["3[2-9]\\d{7,8}|(?:31|43)\\d{8}",[9,10]],["80(?:0\\d{3}|3)\\d{3}",[6,9]],["(?:0878\\d{3}|89(?:2\\d|3[04]|4(?:[0-4]|[5-9]\\d\\d)|5[0-4]))\\d\\d|(?:1(?:44|6[346])|89(?:38|5[5-9]|9))\\d{6}",[6,8,9,10]],["1(?:78\\d|99)\\d{6}",[9,10]],["3[2-8]\\d{9,10}",[11,12]],0,0,["55\\d{8}",[10]],["84(?:[08]\\d{3}|[17])\\d{3}",[6,9]]]],JE:["44","00","1534\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([0-24-8]\\d{5})$|0|180020","1534$1",0,0,[["1534[0-24-8]\\d{5}"],["7(?:(?:(?:50|82)9|937)\\d|7(?:00[378]|97\\d))\\d{5}"],["80(?:07(?:35|81)|8901)\\d{4}"],["(?:8(?:4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|90(?:066[59]|1810|71(?:07|55)))\\d{4}"],["701511\\d{4}"],0,["(?:3(?:0(?:07(?:35|81)|8901)|3\\d{4}|4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|55\\d{4})\\d{4}"],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}"],["56\\d{8}"]]],JM:["1","011","(?:[58]\\d\\d|658|900)\\d{7}",[10],0,"1",0,0,0,0,"658|876"],JO:["962","00","(?:(?:[2689]|7\\d)\\d|32|427|53)\\d{6}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2356]|87"],"(0$1)"],["(\\d{3})(\\d{5,6})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["70"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[47]"],"0$1"]],"0"],JP:["81","010","00[1-9]\\d{6,14}|[25-9]\\d{9}|(?:00|[1-9]\\d\\d)\\d{6}",[8,9,10,11,12,13,14,15,16,17],[["(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3",["(?:12|57|99)0"],"0$1"],["(\\d{4})(\\d)(\\d{4})","$1-$2-$3",["1(?:26|3[79]|4[56]|5[4-68]|6[3-5])|499|5(?:76|97)|746|8(?:3[89]|47|51)|9(?:80|9[16])","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:76|97)9|7468|8(?:3(?:8[7-9]|96)|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:769|979[2-69])|7468|8(?:3(?:8[7-9]|96[2457-9])|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["60"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2-$3",["3|4(?:2[09]|7[01])|6[1-9]","3|4(?:2(?:0|9[02-69])|7(?:0[019]|1))|6[1-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["1(?:1|5[45]|77|88|9[69])|2(?:2[1-37]|3[0-269]|4[59]|5|6[24]|7[1-358]|8[1369]|9[0-38])|4(?:[28][1-9]|3[0-57]|[45]|6[248]|7[2-579]|9[29])|5(?:2|3[0459]|4[0-369]|5[29]|8[02389]|9[0-389])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9[2-6])|8(?:2[124589]|3[26-9]|49|51|6|7[0-468]|8[68]|9[019])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9[1-489])","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2(?:[127]|3[014-9])|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9[19])|62|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|8[1-9]|9[29])|5(?:2|3(?:[045]|9[0-8])|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0-2469])|3(?:[29]|60)|49|51|6(?:[0-24]|36|5[0-3589]|7[23]|9[01459])|7[0-468]|8[68])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9(?:[1289]|3[34]|4[0178]))|(?:264|837)[016-9]|2(?:57|93)[015-9]|(?:25[0468]|422|838)[01]|(?:47[59]|59[89]|8(?:6[68]|9))[019]","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2[127]|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9(?:17|99))|6(?:2|4[016-9])|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|9[29])|5(?:2|3(?:[045]|9(?:[0-58]|6[4-9]|7[0-35689]))|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0169])|3(?:[29]|60|7(?:[017-9]|6[6-8]))|49|51|6(?:[0-24]|36[2-57-9]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|7(?:2[2-468]|3[78])|9[0145])|7[0-468]|8[68])|9(?:4[15]|5[138]|7[156]|8[189]|9(?:[1289]|3(?:31|4[357])|4[0178]))|(?:8294|96)[1-3]|2(?:57|93)[015-9]|(?:223|8699)[014-9]|(?:25[0468]|422|838)[01]|(?:48|8292|9[23])[1-9]|(?:47[59]|59[89]|8(?:68|9))[019]"],"0$1"],["(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3",["[14]|[289][2-9]|5[3-9]|7[2-4679]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["800"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[25-9]"],"0$1"]],"0",0,"(000[2569]\\d{4,6})$|(?:(?:003768)0?)|0","$1"],KE:["254","000","(?:[17]\\d\\d|900)\\d{6}|(?:2|80)0\\d{6,7}|[4-6]\\d{6,8}",[7,8,9,10],[["(\\d{2})(\\d{5,7})","$1 $2",["[24-6]"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[17]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0"],KG:["996","00","8\\d{9}|[235-9]\\d{8}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["3(?:1[346]|[24-79])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-79]|88"],"0$1"],["(\\d{3})(\\d{3})(\\d)(\\d{2,3})","$1 $2 $3 $4",["8"],"0$1"]],"0"],KH:["855","00[14-9]","1\\d{9}|[1-9]\\d{7,8}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],KI:["686","00","(?:[37]\\d|6[0-79])\\d{6}|(?:[2-48]\\d|50)\\d{3}",[5,8],0,"0"],KM:["269","00","[3478]\\d{6}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[3478]"]]]],KN:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","869$1",0,"869"],KP:["850","00|99","85\\d{6}|(?:19\\d|[2-7])\\d{7}",[8,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"]],"0"],KR:["82","00(?:[125689]|3(?:[46]5|91)|7(?:00|27|3|55|6[126]))","00[1-9]\\d{8,11}|(?:[12]|5\\d{3})\\d{7}|[13-6]\\d{9}|(?:[1-6]\\d|80)\\d{7}|[3-6]\\d{4,5}|(?:00|7)0\\d{8}",[5,6,8,9,10,11,12,13,14],[["(\\d{2})(\\d{3,4})","$1-$2",["(?:3[1-3]|[46][1-4]|5[1-5])1"],"0$1"],["(\\d{4})(\\d{4})","$1-$2",["1"]],["(\\d)(\\d{3,4})(\\d{4})","$1-$2-$3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[36]0|8"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1-$2-$3",["[1346]|5[1-5]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{2})(\\d{5})(\\d{4})","$1-$2-$3",["5"],"0$1"]],"0",0,"0(8(?:[1-46-8]|5\\d\\d))?"],KW:["965","00","18\\d{5}|(?:[2569]\\d|41)\\d{6}",[7,8],[["(\\d{4})(\\d{3,4})","$1 $2",["[169]|2(?:[235]|4[1-35-9])|52"]],["(\\d{3})(\\d{5})","$1 $2",["[245]"]]]],KY:["1","011","(?:345|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","345$1",0,"345"],KZ:["7","810","8\\d{13}|[78]\\d{9}",[10,14],0,"8",0,0,0,0,"7",0,"8~10"],LA:["856","00","[23]\\d{9}|3\\d{8}|(?:[235-8]\\d|41)\\d{6}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2[13]|3[14]|[4-8]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["3"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[23]"],"0$1"]],"0"],LB:["961","00","[27-9]\\d{7}|[13-9]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[13-69]|7(?:[2-57]|62|8[0-6]|9[04-9])|8[02-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27-9]"]]],"0"],LC:["1","011","(?:[58]\\d\\d|758|900)\\d{7}",[10],0,"1",0,"([2-8]\\d{6})$|1","758$1",0,"758"],LI:["423","00","[68]\\d{8}|(?:[2378]\\d|90)\\d{5}",[7,9],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2379]|8(?:0[09]|7)","[2379]|8(?:0(?:02|9)|7)"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["69"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]],"0",0,"(1001)|0"],LK:["94","00","[1-9]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[1-689]"],"0$1"]],"0"],LR:["231","00","(?:[2457]\\d|33|88)\\d{7}|(?:2\\d|[4-6])\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["4[67]|[56]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-578]"],"0$1"]],"0"],LS:["266","00","(?:[256]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2568]"]]]],LT:["370","00","(?:[3469]\\d|52|[78]0)\\d{6}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["52[0-7]"],"(0-$1)",1],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[7-9]"],"0 $1",1],["(\\d{2})(\\d{6})","$1 $2",["37|4(?:[15]|6[1-8])"],"(0-$1)",1],["(\\d{3})(\\d{5})","$1 $2",["[3-6]"],"(0-$1)",1]],"0",0,"[08]"],LU:["352","00","35[013-9]\\d{4,8}|6\\d{8}|35\\d{2,4}|(?:[2457-9]\\d|3[0-46-9])\\d{2,9}",[4,5,6,7,8,9,10,11],[["(\\d{2})(\\d{3})","$1 $2",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["20[2-689]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4",["20"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,5})","$1 $2 $3 $4",["[3-57]|8[13-9]|9(?:0[89]|[2-579])|(?:2|80)[2-9]"]],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["80[01]|90[015]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["20"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4 $5",["20"]]],0,0,"(15(?:0[06]|1[12]|[35]5|4[04]|6[26]|77|88|99)\\d)"],LV:["371","00","(?:[268]\\d|78|90)\\d{6}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2679]|8[01]"]]]],LY:["218","00","[2-9]\\d{8}",[9],[["(\\d{2})(\\d{7})","$1-$2",["[2-9]"],"0$1"]],"0"],MA:["212","00","[5-8]\\d{8}",[9],[["(\\d{4})(\\d{5})","$1-$2",["892"],"0$1"],["(\\d{2})(\\d{7})","$1-$2",["8(?:0[0-7]|9)"],"0$1"],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[5-8]"],"0$1"]],"0",0,0,0,0,"[5-8]"],MC:["377","00","(?:[3489]|[67]\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["4"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[389]"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[67]"],"0$1"]],"0"],MD:["373","00","(?:[235-7]\\d|[89]0)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["22|3"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[25-7]"],"0$1"]],"0"],ME:["382","00","(?:20|[3-79]\\d)\\d{6}|80\\d{6,7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"0$1"]],"0"],MF:["590","00","7090\\d{5}|(?:[56]9|[89]\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["(?:59(?:0(?:0[079]|[14]3|[27][79]|3[03-7]|5[0-268]|87)|87\\d)|80[6-9]\\d\\d)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5]))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],["8[129]\\d{7}"],0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],MG:["261","00","[23]\\d{8}",[9],[["(\\d{2})(\\d{2})(\\d{3})(\\d{2})","$1 $2 $3 $4",["[23]"],"0$1"]],"0",0,"([24-9]\\d{6})$|0","20$1"],MH:["692","011","329\\d{4}|(?:[256]\\d|45)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1-$2",["[2-6]"]]],"1"],MK:["389","00","[2-578]\\d{7}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2|34[47]|4(?:[37]7|5[47]|64)"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[347]"],"0$1"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["[58]"],"0$1"]],"0"],ML:["223","00","[24-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-9]"]]]],MM:["95","00","1\\d{5,7}|95\\d{6}|(?:[4-7]|9[0-46-9])\\d{6,8}|(?:2|8\\d)\\d{5,8}",[6,7,8,9,10],[["(\\d)(\\d{2})(\\d{3})","$1 $2 $3",["16|2"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["4(?:[2-46]|5[3-5])|5|6(?:[1-689]|7[235-7])|7(?:[0-4]|5[2-7])|8[1-5]|(?:60|86)[23]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[12]|452|678|86","[12]|452|6788|86"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[4-7]|8[1-35]"],"0$1"],["(\\d)(\\d{3})(\\d{4,6})","$1 $2 $3",["9(?:2[0-4]|[35-9]|4[137-9])"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["92"],"0$1"],["(\\d)(\\d{5})(\\d{4})","$1 $2 $3",["9"],"0$1"]],"0"],MN:["976","001","[12]\\d{7,9}|[5-9]\\d{7}",[8,9,10],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["11|2[16]"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[5-9]"]],["(\\d{3})(\\d{5,6})","$1 $2",["[12]2[1-3]"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["[12](?:27|3[2-8]|4[2-68]|5[1-4689])","[12](?:27|3[2-8]|4[2-68]|5[1-4689])[0-3]"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["[12]"],"0$1"]],"0"],MO:["853","00","0800\\d{3}|(?:28|[68]\\d)\\d{6}",[7,8],[["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{4})(\\d{4})","$1 $2",["[268]"]]]],MP:["1","011","[58]\\d{9}|(?:67|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","670$1",0,"670"],MQ:["596","00","7091\\d{5}|(?:[56]9|[89]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-79]|8(?:0[6-9]|[36])"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],MR:["222","00","(?:[2-4]\\d\\d|800)\\d{5}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-48]"]]]],MS:["1","011","(?:[58]\\d\\d|664|900)\\d{7}",[10],0,"1",0,"([34]\\d{6})$|1","664$1",0,"664"],MT:["356","00","3550\\d{4}|(?:[2579]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2357-9]"]]]],MU:["230","0(?:0|[24-7]0|3[03])","(?:[57]|8\\d\\d)\\d{7}|[2-468]\\d{6}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[2-46]|8[013]"]],["(\\d{4})(\\d{4})","$1 $2",["[57]"]],["(\\d{5})(\\d{5})","$1 $2",["8"]]],0,0,0,0,0,0,0,"020"],MV:["960","0(?:0|19)","(?:800|9[0-57-9]\\d)\\d{7}|[34679]\\d{6}",[7,10],[["(\\d{3})(\\d{4})","$1-$2",["[34679]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"]]],0,0,0,0,0,0,0,"00"],MW:["265","00","(?:[1289]\\d|31|77)\\d{7}|1\\d{6}",[7,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["1[2-9]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-37-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-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],NA:["264","00","[68]\\d{7,8}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["87"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],NC:["687","00","(?:050|[2-57-9]\\d\\d)\\d{3}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1.$2.$3",["[02-57-9]"]]]],NE:["227","00","[027-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["08"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[089]|2[013]|7[0467]"]]]],NF:["672","00","[13]\\d{5}",[6],[["(\\d{2})(\\d{4})","$1 $2",["1[0-3]"]],["(\\d)(\\d{5})","$1 $2",["[13]"]]],0,0,"([0-258]\\d{4})$","3$1"],NG:["234","009","(?:20|9\\d)\\d{8}|[78]\\d{9,13}",[10,11,12,13,14],[["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[7-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["20[129]"],"0$1"],["(\\d{4})(\\d{2})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[78]"],"0$1"],["(\\d{3})(\\d{5})(\\d{5,6})","$1 $2 $3",["[78]"],"0$1"]],"0"],NI:["505","00","(?:1800|[25-8]\\d{3})\\d{4}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[125-8]"]]]],NL:["31","00","(?:[124-7]\\d\\d|3(?:[02-9]\\d|1[0-8]))\\d{6}|8\\d{6,9}|9\\d{6,10}|1\\d{4,5}",[5,6,7,8,9,10,11],[["(\\d{3})(\\d{4,7})","$1 $2",["[89]0"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["66"],"0$1"],["(\\d)(\\d{8})","$1 $2",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["1[16-8]|2[259]|3[124]|4[17-9]|5[124679]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-578]|91"],"0$1"],["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3",["9"],"0$1"]],"0"],NO:["47","00","(?:0|[2-9]\\d{3})\\d{4}",[5,8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]"]]],0,0,0,0,0,"[02-689]|7[0-8]"],NP:["977","00","(?:1\\d|9)\\d{9}|[1-9]\\d{7}",[8,10,11],[["(\\d)(\\d{7})","$1-$2",["1[2-6]"],"0$1"],["(\\d{2})(\\d{6})","$1-$2",["1[01]|[2-8]|9(?:[1-59]|[67][2-6])"],"0$1"],["(\\d{3})(\\d{7})","$1-$2",["9"]]],"0"],NR:["674","00","(?:222|444|(?:55|8\\d)\\d|666|777|999)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[24-9]"]]]],NU:["683","00","(?:[4-7]|888\\d)\\d{3}",[4,7],[["(\\d{3})(\\d{4})","$1 $2",["8"]]]],NZ:["64","0(?:0|161)","[1289]\\d{9}|50\\d{5}(?:\\d{2,3})?|[27-9]\\d{7,8}|(?:[34]\\d|6[0-35-9])\\d{6}|8\\d{4,6}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,8})","$1 $2",["8[1-79]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["50[036-8]|8|90","50(?:[0367]|88)|8|90"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["24|[346]|7[2-57-9]|9[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:10|74)|[589]"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["1|2[028]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,5})","$1 $2 $3",["2(?:[169]|7[0-35-9])|7"],"0$1"]],"0",0,0,0,0,0,0,"00"],OM:["968","00","(?:1505|[279]\\d{3}|500)\\d{4}|800\\d{5,6}",[7,8,9],[["(\\d{3})(\\d{4,6})","$1 $2",["[58]"]],["(\\d{2})(\\d{6})","$1 $2",["2"]],["(\\d{4})(\\d{4})","$1 $2",["[179]"]]]],PA:["507","00","(?:00800|8\\d{3})\\d{6}|[68]\\d{7}|[1-57-9]\\d{6}",[7,8,10,11],[["(\\d{3})(\\d{4})","$1-$2",["[1-57-9]"]],["(\\d{4})(\\d{4})","$1-$2",["[68]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]]],PE:["51","00|19(?:1[124]|77|90)00","(?:[14-8]|9\\d)\\d{7}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["80"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["1"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[4-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"]]],"0",0,0,0,0,0,0,"00"," Anexo "],PF:["689","00","4\\d{5}(?:\\d{2})?|8\\d{7,8}",[6,8,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["44"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4|8[7-9]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],PG:["675","00|140[1-3]","(?:180|[78]\\d{3})\\d{4}|(?:[2-589]\\d|64)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["18|[2-69]|85"]],["(\\d{4})(\\d{4})","$1 $2",["[78]"]]],0,0,0,0,0,0,0,"00"],PH:["63","00","(?:[2-7]|9\\d)\\d{8}|2\\d{5}|(?:1800|8)\\d{7,9}",[6,8,9,10,11,12,13],[["(\\d)(\\d{5})","$1 $2",["2"],"(0$1)"],["(\\d{4})(\\d{4,6})","$1 $2",["3(?:23|39|46)|4(?:2[3-6]|[35]9|4[26]|76)|544|88[245]|(?:52|64|86)2","3(?:230|397|461)|4(?:2(?:35|[46]4|51)|396|4(?:22|63)|59[347]|76[15])|5(?:221|446)|642[23]|8(?:622|8(?:[24]2|5[13]))"],"(0$1)"],["(\\d{5})(\\d{4})","$1 $2",["346|4(?:27|9[35])|883","3469|4(?:279|9(?:30|56))|8834"],"(0$1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|8[2-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{4})(\\d{1,2})(\\d{3})(\\d{4})","$1 $2 $3 $4",["1"]]],"0"],PK:["92","00","122\\d{6}|[24-8]\\d{10,11}|9(?:[013-9]\\d{8,10}|2(?:[01]\\d\\d|2(?:[06-8]\\d|1[01]))\\d{7})|(?:[2-8]\\d{3}|92(?:[0-7]\\d|8[1-9]))\\d{6}|[24-9]\\d{8}|[89]\\d{7}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,7})","$1 $2 $3",["[89]0"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["1"]],["(\\d{3})(\\d{6,7})","$1 $2",["2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:2[2-8]|3[27-9]|4[2-6]|6[3569]|9[25-8])","9(?:2[3-8]|98)|(?:2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:22|3[27-9]|4[2-6]|6[3569]|9[25-7]))[2-9]"],"(0$1)"],["(\\d{2})(\\d{7,8})","$1 $2",["(?:2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)[2-9]"],"(0$1)"],["(\\d{5})(\\d{5})","$1 $2",["58"],"(0$1)"],["(\\d{3})(\\d{7})","$1 $2",["3"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[24-9]"],"(0$1)"]],"0"],PL:["48","00","(?:6|8\\d\\d)\\d{7}|[1-9]\\d{6}(?:\\d{2})?|[26]\\d{5}",[6,7,8,9,10],[["(\\d{5})","$1",["19"]],["(\\d{3})(\\d{3})","$1 $2",["11|20|64"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["30|(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])1","30|(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])19"]],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["64"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["21|39|45|5[0137]|6[0469]|7[02389]|8(?:0[14]|8)"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[2-8]|[2-7]|8[1-79]|9[145]"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["8"]]]],PM:["508","00","[78]\\d{8}|[2-9]\\d{5}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],PR:["1","011","(?:[589]\\d\\d|787)\\d{7}",[10],0,"1",0,0,0,0,"787|939"],PS:["970","00","[2489]2\\d{6}|(?:1\\d|5)\\d{8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2489]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["5"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],PT:["351","00","1693\\d{5}|(?:[26-9]\\d|30)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["2[12]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["16|[236-9]"]]]],PW:["680","01[12]","(?:[24-8]\\d\\d|345|900)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],PY:["595","00","[36-8]\\d{5,8}|4\\d{6,8}|59\\d{6}|9\\d{5,10}|(?:2\\d|5[0-8])\\d{6,7}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3,6})","$1 $2",["[2-9]0"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["3[289]|4[246-8]|61|7[1-3]|8[1-36]"],"(0$1)"],["(\\d{3})(\\d{4,5})","$1 $2",["2[279]|3[13-5]|4[359]|5|6(?:[34]|7[1-46-8])|7[46-8]|85"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2[14-68]|3[26-9]|4[1246-8]|6(?:1|75)|7[1-35]|8[1-36]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["87"]],["(\\d{3})(\\d{6})","$1 $2",["9(?:[5-79]|8[1-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["9"]]],"0"],QA:["974","00","800\\d{4}|(?:2|800)\\d{6}|(?:0080|[3-7])\\d{7}",[7,8,9,11],[["(\\d{3})(\\d{4})","$1 $2",["2[136]|8"]],["(\\d{4})(\\d{4})","$1 $2",["[3-7]"]]]],RE:["262","00","709\\d{6}|(?:26|[689]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[26-9]"],"0$1"]],"0",0,0,0,0,0,[["2631[0-6]\\d{4}|26(?:2\\d|30|88)\\d{5}"],["(?:69(?:2\\d\\d|3(?:[06][0-6]|1[0-3]|2[0-2]|3[0-39]|4\\d|5[0-5]|7[0-37]|8[0-8]|9[0-479]))|7092[0-3])\\d{4}"],["80\\d{7}"],["89[1-37-9]\\d{6}"],0,0,0,0,["9(?:399[0-3]|479[0-6]|76(?:2[278]|3[0-37]))\\d{4}"],["8(?:1[019]|2[0156]|84|90)\\d{6}"]]],RO:["40","00","(?:[236-8]\\d|90)\\d{7}|[23]\\d{5}",[6,9],[["(\\d{3})(\\d{3})","$1 $2",["2[3-6]","2[3-6]\\d9"],"0$1"],["(\\d{2})(\\d{4})","$1 $2",["219|31"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[23]1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[236-9]"],"0$1"]],"0",0,0,0,0,0,0,0," int "],RS:["381","00","38[02-9]\\d{6,9}|6\\d{7,9}|90\\d{4,8}|38\\d{5,6}|(?:7\\d\\d|800)\\d{3,9}|(?:[12]\\d|3[0-79])\\d{5,10}",[6,7,8,9,10,11,12],[["(\\d{3})(\\d{3,9})","$1 $2",["(?:2[389]|39)0|[7-9]"],"0$1"],["(\\d{2})(\\d{5,10})","$1 $2",["[1-36]"],"0$1"]],"0"],RU:["7","810","8\\d{13}|[347-9]\\d{9}",[10,14],[["(\\d{4})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-8]|2[1-9])","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:1[23]|[2-9]2))","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:13[03-69]|62[013-9]))|72[1-57-9]2"],"8 ($1)",1],["(\\d{5})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-68]|2[1-9])","7(?:1(?:[06][3-6]|[18]|2[35]|[3-5][3-5])|2(?:[13][3-5]|[24-689]|7[457]))","7(?:1(?:0(?:[356]|4[023])|[18]|2(?:3[013-9]|5)|3[45]|43[013-79]|5(?:3[1-8]|4[1-7]|5)|6(?:3[0-35-9]|[4-6]))|2(?:1(?:3[178]|[45])|[24-689]|3[35]|7[457]))|7(?:14|23)4[0-8]|71(?:33|45)[1-79]"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[349]|8(?:[02-7]|1[1-8])"],"8 ($1)",1],["(\\d{4})(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3 $4",["8"],"8 ($1)"]],"8",0,0,0,0,"[3489]",0,"8~10"],RW:["250","00","(?:06|[27]\\d\\d|[89]00)\\d{6}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[7-9]"],"0$1"]],"0"],SA:["966","00","(?:[15]\\d|800|92)\\d{7}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["9"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]],"0"],SB:["677","0[01]","[6-9]\\d{6}|[1-6]\\d{4}",[5,7],[["(\\d{2})(\\d{5})","$1 $2",["6[89]|7|8[4-9]|9(?:[1-8]|9[0-8])"]]]],SC:["248","010|0[0-2]","(?:[2489]\\d|64)\\d{5}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[246]|9[57]"]]],0,0,0,0,0,0,0,"00"],SD:["249","00","[19]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[19]"],"0$1"]],"0"],SE:["46","00","(?:[26]\\d\\d|9)\\d{9}|[1-9]\\d{8}|[1-689]\\d{7}|[1-4689]\\d{6}|2\\d{5}",[6,7,8,9,10,12],[["(\\d{2})(\\d{2,3})(\\d{2})","$1-$2 $3",["20"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{4})","$1-$2",["9(?:00|39|44|9)"],"0$1",0,"$1 $2"],["(\\d{2})(\\d{3})(\\d{2})","$1-$2 $3",["[12][136]|3[356]|4[0246]|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3"],["(\\d)(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2,3})(\\d{2})","$1-$2 $3",["1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[125689]|4[02-57]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{2,3})(\\d{3})","$1-$2 $3",["9(?:00|39|44)"],"0$1",0,"$1 $2 $3"],["(\\d{2})(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["1[13689]|2[0136]|3[1356]|4[0246]|54|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3 $4"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["10|7"],"0$1",0,"$1 $2 $3 $4"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1-$2 $3 $4",["[13-5]|2(?:[247-9]|5[0138])|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{3})","$1-$2 $3 $4",["9"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4 $5",["[26]"],"0$1",0,"$1 $2 $3 $4 $5"]],"0"],SG:["65","0[0-3]\\d","(?:(?:1\\d|8)\\d\\d|7000)\\d{7}|[3689]\\d{7}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["[369]|8(?:0[1-9]|[1-9])"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]],["(\\d{4})(\\d{4})(\\d{3})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],SH:["290","00","(?:[256]\\d|8)\\d{3}",[4,5],0,0,0,0,0,0,"[256]"],SI:["386","00|10(?:22|66|88|99)","[1-7]\\d{7}|8\\d{4,7}|90\\d{4,6}",[5,6,7,8],[["(\\d{2})(\\d{3,6})","$1 $2",["8[09]|9"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["59|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37][01]|4[013]|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{2})(\\d{5,7})","$1 $2",["1|28|9[2-9]"]],["(\\d)(\\d{7})","$1 $2",["[267]|904"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[346-9]"]]],"0"],SR:["597","00","(?:[2-5]|[6-9]\\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-9]"]]]],SS:["211","00","[19]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[19]"],"0$1"]],"0"],ST:["239","00","(?:22|9\\d)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[29]"]]]],SV:["503","00","[25-7]\\d{7}|(?:80\\d|900)\\d{4}(?:\\d{4})?",[7,8,11],[["(\\d{3})(\\d{4})","$1 $2",["[89]"]],["(\\d{4})(\\d{4})","$1 $2",["[25-7]"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[89]"]]]],SX:["1","011","7215\\d{6}|(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"(5\\d{6})$|1","721$1",0,"721"],SY:["963","00","[1-359]\\d{8}|[1-5]\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-4]|5[1-3]"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[59]"],"0$1",1]],"0"],SZ:["268","00","0800\\d{4}|(?:[237]\\d|900)\\d{6}",[8,9],[["(\\d{4})(\\d{4})","$1 $2",["[0237]"]],["(\\d{5})(\\d{4})","$1 $2",["9"]]]],TA:["290","00","8\\d{3}",[4],0,0,0,0,0,0,"8"],TC:["1","011","(?:[58]\\d\\d|649|900)\\d{7}",[10],0,"1",0,"([2-479]\\d{6})$|1","649$1",0,"649"],TD:["235","00|16","(?:22|[3689]\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[236-9]"]]],0,0,0,0,0,0,0,"00"],TG:["228","00","[279]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[279]"]]]],TH:["66","00[1-9]","(?:001800|[2-57]|[689]\\d)\\d{7}|1\\d{7,9}",[8,9,10,13],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[13-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],TJ:["992","810","(?:[0-57-9]\\d|66)\\d{7}",[9],[["(\\d{6})(\\d)(\\d{2})","$1 $2 $3",["331","3317"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["44[02-479]|[34]7"]],["(\\d{4})(\\d)(\\d{4})","$1 $2 $3",["3(?:[1245]|3[12])"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["\\d"]]],0,0,0,0,0,0,0,"8~10"],TK:["690","00","[2-47]\\d{3,6}",[4,5,6,7]],TL:["670","00","7\\d{7}|(?:[2-47]\\d|[89]0)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[2-489]|70"]],["(\\d{4})(\\d{4})","$1 $2",["7"]]]],TM:["993","810","[1-7]\\d{7}",[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-79]"],"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{3})(\\d{5})","$1 $2",["826"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["83"],"0$1"],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["82"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[25]0|37|49|8[09]"],"0$1"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["[23568]|4(?:0[02-48]|[1-478])|7[1-9]","[23568]|4(?:0[2-48]|[1-478])|(?: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,[["(?:472[2-47-9]|983[2-57-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[02469]|8[13])|3(?:0[1-57-9]|1[02-9]|2[013-79]|3[0-24679]|4[167]|5[0-3]|6[01349]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-57-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|3[016]|4[0156]|5[01679]|6[0-279]|78|8[0-269])|7(?:0[1-46-8]|1[2-9]|2[04-8]|3[0-2478]|4[0378]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[0168]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-3589]|8[04-69]))[2-9]\\d{6}"],[""],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|3[23]|44|66|77|88)[2-9]\\d{6}"]]],UY:["598","0(?:0|1[3-9]\\d)","0004\\d{2,9}|[1249]\\d{7}|2\\d{3,4}|(?:[49]\\d|80)\\d{5}",[4,5,6,7,8,9,10,11,12,13],[["(\\d{4,5})","$1",["21"]],["(\\d{3})(\\d{3,4})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[49]0|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[124]"]],["(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3 $4",["0"]]],"0",0,0,0,0,0,0,"00"," int. "],UZ:["998","00","(?:20|33|[5-9]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[235-9]"]]]],VA:["39","00","0\\d{5,10}|3[0-8]\\d{7,10}|55\\d{8}|8\\d{5}(?:\\d{2,4})?|(?:1\\d|39)\\d{7,8}",[6,7,8,9,10,11,12],0,0,0,0,0,0,"06698"],VC:["1","011","(?:[58]\\d\\d|784|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","784$1",0,"784"],VE:["58","00","[68]00\\d{7}|(?:[24]\\d|[59]0)\\d{8}",[10],[["(\\d{3})(\\d{7})","$1-$2",["[24-689]"],"0$1"]],"0"],VG:["1","011","(?:284|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-578]\\d{6})$|1","284$1",0,"284"],VI:["1","011","[58]\\d{9}|(?:34|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","340$1",0,"340"],VN:["84","00","[12]\\d{9}|[135-9]\\d{8}|[16]\\d{6,7}|7\\d{6}",[7,8,9,10],[["(\\d{4})(\\d{4,6})","$1 $2",["1(?:2[02]|[89])"],0,1],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[26]|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","(?:639\\d|7093)\\d{5}|(?:26|80|9\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["26(?:89\\d|9(?:0[0-467]|15|5[0-4]|6\\d|[78]0))\\d{4}"],["(?:639(?:0[0-79]|1[019]|[267]\\d|3[09]|40|5[05-9]|9[04-79])|7093[5-7])\\d{4}"],["80\\d{7}"],0,0,0,0,0,["9(?:(?:39|47)8[01]|769\\d)\\d{4}"]]],ZA:["27","00","[1-79]\\d{8}|8\\d{4,9}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,4})","$1 $2",["8[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["8[1-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["860"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],ZM:["260","00","800\\d{6}|(?:21|[579]\\d|63)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[28]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[579]"],"0$1"]],"0"],ZW:["263","00","2(?:[0-57-9]\\d{6,8}|6[0-24-9]\\d{6,7})|[38]\\d{9}|[35-8]\\d{8}|[3-6]\\d{7}|[1-689]\\d{6}|[1-3569]\\d{5}|[1356]\\d{4}",[5,6,7,8,9,10],[["(\\d{3})(\\d{3,5})","$1 $2",["2(?:0[45]|2[278]|[49]8)|3(?:[09]8|17)|6(?:[29]8|37|75)|[23][78]|(?:33|5[15]|6[68])[78]"],"0$1"],["(\\d)(\\d{3})(\\d{2,4})","$1 $2 $3",["[49]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["80"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["24|8[13-59]|(?:2[05-79]|39|5[45]|6[15-8])2","2(?:02[014]|4|[56]20|[79]2)|392|5(?:42|525)|6(?:[16-8]21|52[013])|8[13-59]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:1[39]|2[0157]|[378]|[56][14])|3(?:12|29)","2(?:1[39]|2[0157]|[378]|[56][14])|3(?:123|29)"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["1|2(?:0[0-36-9]|12|29|[56])|3(?:1[0-689]|[24-6])|5(?:[0236-9]|1[2-4])|6(?:[013-59]|7[0-46-9])|(?:33|55|6[68])[0-69]|(?:29|3[09]|62)[0-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["29[013-9]|39|54"],"0$1"],["(\\d{4})(\\d{3,5})","$1 $2",["(?:25|54)8","258|5483"],"0$1"]],"0"]},nonGeographic:{800:["800",0,"(?:00|[1-9]\\d)\\d{6}",[8],[["(\\d{4})(\\d{4})","$1 $2",["\\d"]]],0,0,0,0,0,0,[0,0,["(?:00|[1-9]\\d)\\d{6}"]]],808:["808",0,"[1-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[1-9]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,0,["[1-9]\\d{7}"]]],870:["870",0,"7\\d{11}|[235-7]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-7]"]]],0,0,0,0,0,0,[0,["(?:[356]|774[45])\\d{8}|7[6-8]\\d{7}"],0,0,0,0,0,0,["2\\d{8}",[9]]]],878:["878",0,"10\\d{10}",[12],[["(\\d{2})(\\d{5})(\\d{5})","$1 $2 $3",["1"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["10\\d{10}"]]],881:["881",0,"6\\d{9}|[0-36-9]\\d{8}",[9,10],[["(\\d)(\\d{3})(\\d{5})","$1 $2 $3",["[0-37-9]"]],["(\\d)(\\d{3})(\\d{5,6})","$1 $2 $3",["6"]]],0,0,0,0,0,0,[0,["6\\d{9}|[0-36-9]\\d{8}"]]],882:["882",0,"[13]\\d{6}(?:\\d{2,5})?|[19]\\d{7}|(?:[25]\\d\\d|4)\\d{7}(?:\\d{2})?",[7,8,9,10,11,12],[["(\\d{2})(\\d{5})","$1 $2",["16|342"]],["(\\d{2})(\\d{6})","$1 $2",["49"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["1[36]|9"]],["(\\d{2})(\\d{4})(\\d{3})","$1 $2 $3",["3[23]"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["16"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|23|3(?:[15]|4[57])|4|5[12]"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["34"]],["(\\d{2})(\\d{4,5})(\\d{5})","$1 $2 $3",["[1-35]"]]],0,0,0,0,0,0,[0,["342\\d{4}|(?:337|49)\\d{6}|(?:3(?:2|47|7\\d{3})|5(?:0\\d{3}|2[0-2]))\\d{7}",[7,8,9,10,12]],0,0,0,["348[57]\\d{7}",[11]],0,0,["1(?:3(?:0[0347]|[13][0139]|2[035]|4[013568]|6[0459]|7[06]|8[15-8]|9[0689])\\d{4}|6\\d{5,10})|(?:345\\d|9[89])\\d{6}|(?:10|2(?:3|85\\d)|3(?:[15]|[69]\\d\\d)|4[15-8]|51)\\d{8}"]]],883:["883",0,"(?:[1-4]\\d|51)\\d{6,10}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,8})","$1 $2 $3",["[14]|2[24-689]|3[02-689]|51[24-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["510"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["21"]],["(\\d{4})(\\d{4})(\\d{4})","$1 $2 $3",["51[13]"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[235]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["(?:2(?:00\\d\\d|10)|(?:370[1-9]|51\\d0)\\d)\\d{7}|51(?:00\\d{5}|[24-9]0\\d{4,7})|(?:1[0-79]|2[24-689]|3[02-689]|4[0-4])0\\d{5,9}"]]],888:["888",0,"\\d{11}",[11],[["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3"]],0,0,0,0,0,0,[0,0,0,0,0,0,["\\d{11}"]]],979:["979",0,"[1359]\\d{8}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[1359]"]]],0,0,0,0,0,0,[0,0,0,["[1359]\\d{8}"]]]}};function bk(t,e,n){var o=Array.prototype.slice.call(e);o.push(OT);var r=t.apply(this,o);return n&&r&&Object.setPrototypeOf(r,n),r}function Tk(t,e){t=t.split("-"),e=e.split("-");for(var n=t[0].split("."),o=e[0].split("."),r=0;r<3;r++){var i=Number(n[r]),s=Number(o[r]);if(i>s)return 1;if(s>i)return-1;if(!isNaN(i)&&isNaN(s))return 1;if(isNaN(i)&&!isNaN(s))return-1}return t[1]&&e[1]?t[1]>e[1]?1:t[1]<e[1]?-1:0:!t[1]&&e[1]?1:t[1]&&!e[1]?-1:0}var gbe={}.constructor;function Qi(t){return t!=null&&t.constructor===gbe}var hbe=/^\d+$/;function vk(t){return hbe.test(t)}var ybe="1.2.0",Sbe="1.7.35",zK=" ext. ",_t=class{constructor(e){Nk(e),this.metadata=e,VK.call(this,e)}getCountries(){return Object.keys(this.metadata.countries).filter(e=>e!=="001")}getCountryMetadata(e){return this.metadata.countries[e]}nonGeographic(){if(!(this.v1||this.v2||this.v3))return this.metadata.nonGeographic||this.metadata.nonGeographical}hasCountry(e){return this.getCountryMetadata(e)!==void 0}hasCallingCode(e){if(this.getCountryCodesForCallingCode(e))return!0;if(this.nonGeographic()){if(this.nonGeographic()[e])return!0}else{let n=this.countryCallingCodes()[e];if(n&&n.length===1&&n[0]==="001")return!0}}isNonGeographicCallingCode(e){return this.nonGeographic()?!!this.nonGeographic()[e]:!this.getCountryCodesForCallingCode(e)}country(e){return this.selectNumberingPlan(e)}selectNumberingPlan(e,n){let o,r;if(e&&(vk(e)?r=e:o=e),n&&(r=n),o&&o!=="001"){let i=this.getCountryMetadata(o);if(!i)throw new Error(`Unknown country: ${o}`);this.numberingPlan=new xT(i,this)}else if(r){if(!this.hasCallingCode(r))throw new Error(`Unknown calling code: ${r}`);this.numberingPlan=new xT(this.getNumberingPlanMetadata(r),this)}else this.numberingPlan=void 0;return this}getCountryCodesForCallingCode(e){let n=this.countryCallingCodes()[e];if(n)return n.length===1&&n[0].length===3?void 0:n}getCountryCodeForCallingCode(e){let n=this.getCountryCodesForCallingCode(e);if(n)return n[0]}getNumberingPlanMetadata(e){let n=this.getCountryCodeForCallingCode(e);if(n)return this.getCountryMetadata(n);if(this.nonGeographic()){let o=this.nonGeographic()[e];if(o)return o}else{let o=this.countryCallingCodes()[e];if(o&&o.length===1&&o[0]==="001")return this.metadata.countries["001"]}}countryCallingCode(){return this.numberingPlan.callingCode()}IDDPrefix(){return this.numberingPlan.IDDPrefix()}defaultIDDPrefix(){return this.numberingPlan.defaultIDDPrefix()}nationalNumberPattern(){return this.numberingPlan.nationalNumberPattern()}possibleLengths(){return this.numberingPlan.possibleLengths()}formats(){return this.numberingPlan.formats()}nationalPrefixForParsing(){return this.numberingPlan.nationalPrefixForParsing()}nationalPrefixTransformRule(){return this.numberingPlan.nationalPrefixTransformRule()}leadingDigits(){return this.numberingPlan.leadingDigits()}hasTypes(){return this.numberingPlan.hasTypes()}type(e){return this.numberingPlan.type(e)}ext(){return this.numberingPlan.ext()}countryCallingCodes(){return this.v1?this.metadata.country_phone_code_to_countries:this.metadata.country_calling_codes}chooseCountryByCountryCallingCode(e){return this.selectNumberingPlan(e)}hasSelectedNumberingPlan(){return this.numberingPlan!==void 0}},xT=class{constructor(e,n){this.globalMetadataObject=n,this.metadata=e,VK.call(this,n.metadata)}callingCode(){return this.metadata[0]}_getDefaultCountryMetadataForThisCallingCode(){return this.globalMetadataObject.getNumberingPlanMetadata(this.callingCode())}getDefaultCountryMetadataForRegion(){return this._getDefaultCountryMetadataForThisCallingCode()}IDDPrefix(){if(!(this.v1||this.v2))return this.metadata[1]}defaultIDDPrefix(){if(!(this.v1||this.v2))return this.metadata[12]}nationalNumberPattern(){return this.v1||this.v2?this.metadata[1]:this.metadata[2]}possibleLengths(){if(!this.v1)return this.metadata[this.v2?2:3]}_getFormats(e){return e[this.v1?2:this.v2?3:4]}formats(){return(this._getFormats(this.metadata)||this._getFormats(this._getDefaultCountryMetadataForThisCallingCode())||[]).map(n=>new Rk(n,this))}nationalPrefix(){return this.metadata[this.v1?3:this.v2?4:5]}_getNationalPrefixFormattingRule(e){return e[this.v1?4:this.v2?5:6]}nationalPrefixFormattingRule(){return this._getNationalPrefixFormattingRule(this.metadata)||this._getNationalPrefixFormattingRule(this._getDefaultCountryMetadataForThisCallingCode())}_nationalPrefixForParsing(){return this.metadata[this.v1?5:this.v2?6:7]}nationalPrefixForParsing(){return this._nationalPrefixForParsing()||this.nationalPrefix()}nationalPrefixTransformRule(){return this.metadata[this.v1?6:this.v2?7:8]}_getNationalPrefixIsOptionalWhenFormatting(){return!!this.metadata[this.v1?7:this.v2?8:9]}nationalPrefixIsOptionalWhenFormattingInNationalFormat(){return this._getNationalPrefixIsOptionalWhenFormatting(this.metadata)||this._getNationalPrefixIsOptionalWhenFormatting(this._getDefaultCountryMetadataForThisCallingCode())}leadingDigits(){return this.metadata[this.v1?8:this.v2?9:10]}types(){return this.metadata[this.v1?9:this.v2?10:11]}hasTypes(){return this.types()&&this.types().length===0?!1:!!this.types()}type(e){if(this.hasTypes()&&jK(this.types(),e))return new Pk(jK(this.types(),e),this)}ext(){return this.v1||this.v2?zK:this.metadata[13]||zK}},Rk=class{constructor(e,n){this._format=e,this.metadata=n}pattern(){return this._format[0]}format(){return this._format[1]}leadingDigitsPatterns(){return this._format[2]||[]}nationalPrefixFormattingRule(){return this._format[3]||this.metadata.nationalPrefixFormattingRule()}nationalPrefixIsOptionalWhenFormattingInNationalFormat(){return!!this._format[4]||this.metadata.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}nationalPrefixIsMandatoryWhenFormattingInNationalFormat(){return this.usesNationalPrefix()&&!this.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}usesNationalPrefix(){return!!(this.nationalPrefixFormattingRule()&&!Ebe.test(this.nationalPrefixFormattingRule()))}internationalFormat(){return this._format[5]||this.format()}},Ebe=/^\(?\$1\)?$/,Pk=class{constructor(e,n){this.type=e,this.metadata=n}pattern(){return this.metadata.v1?this.type:this.type[0]}possibleLengths(){if(!this.metadata.v1)return this.type[1]||this.metadata.possibleLengths()}};function jK(t,e){switch(e){case"FIXED_LINE":return t[0];case"MOBILE":return t[1];case"TOLL_FREE":return t[2];case"PREMIUM_RATE":return t[3];case"PERSONAL_NUMBER":return t[4];case"VOICEMAIL":return t[5];case"UAN":return t[6];case"PAGER":return t[7];case"VOIP":return t[8];case"SHARED_COST":return t[9]}}function Nk(t){if(!t)throw new Error("[libphonenumber-js] `metadata` argument not passed. Check your arguments.");if(!Qi(t)||!Qi(t.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 ${Qi(t)?"an object of shape: { "+Object.keys(t).join(", ")+" }":"a "+Abe(t)+": "+t}.`)}var Abe=t=>typeof t;function CS(t,e){let n=new _t(e);if(n.hasCountry(t))return n.selectNumberingPlan(t).countryCallingCode();throw new Error(`Unknown country: ${t}`)}function FK(t,e){return e.countries.hasOwnProperty(t)}function VK(t){let{version:e}=t;typeof e=="number"?(this.v1=e===1,this.v2=e===2,this.v3=e===3,this.v4=e===4):e?Tk(e,ybe)===-1?this.v2=!0:Tk(e,Sbe)===-1?this.v3=!0:this.v4=!0:this.v1=!0}function Ok(t,e){let n=t.slice();for(let o of e)t.indexOf(o)<0&&n.push(o);return n.sort((o,r)=>o-r)}function ou(t,e,n){return BK(t,void 0,e,n)}function BK(t,e,n,o){n&&(o=new _t(o.metadata),o.selectNumberingPlan(n));let r=o.type(e),i=r&&r.possibleLengths()||o.possibleLengths();if(!i)return"IS_POSSIBLE";if(e==="FIXED_LINE_OR_MOBILE"){if(!o.type("FIXED_LINE"))return BK(t,"MOBILE",n,o);let c=o.type("MOBILE");c&&(i=Ok(i,c.possibleLengths()))}else if(e&&!r)return"INVALID_LENGTH";let s=t.length,a=i[0];return a===s?"IS_POSSIBLE":a>s?"TOO_SHORT":i[i.length-1]<s?"TOO_LONG":i.indexOf(s,1)>=0?"IS_POSSIBLE":"INVALID_LENGTH"}function xk(t,e,n){e===void 0&&(e={});let o=new _t(n);if(e.v2){if(!t.countryCallingCode)throw new Error("Invalid phone number object passed");o.selectNumberingPlan(t.country||t.countryCallingCode)}else{if(!t.phone)return!1;if(t.country){if(!o.hasCountry(t.country))throw new Error(`Unknown country: ${t.country}`);o.selectNumberingPlan(t.country)}else{if(!t.countryCallingCode)throw new Error("Invalid phone number object passed");o.selectNumberingPlan(t.countryCallingCode)}}if(o.possibleLengths())return Dk(t.phone||t.nationalNumber,o);if(t.countryCallingCode&&o.isNonGeographicCallingCode(t.countryCallingCode))return!0;throw new Error('Missing "possibleLengths" in metadata. Perhaps the metadata has been generated before v1.0.18.')}function Dk(t,e){return ou(t,void 0,e)==="IS_POSSIBLE"}function Ir(t,e){return t=t||"",new RegExp("^(?:"+e+")$").test(t)}var Cbe=["MOBILE","PREMIUM_RATE","TOLL_FREE","SHARED_COST","VOIP","PERSONAL_NUMBER","PAGER","UAN","VOICEMAIL"];function iu(t,e,n){if(e=e||{},!t.country&&!t.countryCallingCode)return;let o=new _t(n);o.selectNumberingPlan(t.country||t.countryCallingCode);let r=e.v2?t.nationalNumber:t.phone;if(Ir(r,o.nationalNumberPattern())){if($k(r,"FIXED_LINE",o))return o.type("MOBILE")&&o.type("MOBILE").pattern()===""||!o.type("MOBILE")||$k(r,"MOBILE",o)?"FIXED_LINE_OR_MOBILE":"FIXED_LINE";for(let i of Cbe)if($k(r,i,o))return i}}function $k(t,e,n){let o=n.type(e);return!o||!o.pattern()||o.possibleLengths()&&o.possibleLengths().indexOf(t.length)<0?!1:Ir(t,o.pattern())}function wk(t,e,n){e=e||{};let o=new _t(n);if(o.selectNumberingPlan(t.country||t.countryCallingCode),o.hasTypes())return iu(t,e,o.metadata)!==void 0;let r=e.v2?t.nationalNumber:t.phone;return Ir(r,o.nationalNumberPattern())}var Ibe=/^[A-Z]{2}$/;function Mk(t){return Ibe.test(t)}var _be=!1;function kk(t,e){let n,o,r=new _t(e);return Mk(t)?(n=t,r.selectNumberingPlan(n),o=r.countryCallingCode()):(o=t,_be&&r.isNonGeographicCallingCode(o)&&(n="001")),{country:n,callingCode:o}}function Lk(t,e,n){let r=new _t(n).getCountryCodesForCallingCode(t);return r?r.filter(i=>bbe(e,i,n)):[]}function bbe(t,e,n){let o=new _t(n);return o.selectNumberingPlan(e),o.numberingPlan.possibleLengths().indexOf(t.length)>=0}var _r="0-90-9٠-٩۰-۹",Tbe="-‐-―−ー-";var vbe=" ",Rbe="()()[]\\[\\]",Pbe="~⁓∼~",lm=`${Tbe}//..${vbe}${Rbe}${Pbe}`,IS="++";var Nbe=new RegExp("(["+_r+"])");function Uk(t,e,n,o){if(!e)return;let r=new _t(o);r.selectNumberingPlan(e||n);let i=new RegExp(r.IDDPrefix());if(t.search(i)!==0)return;t=t.slice(t.match(i)[0].length);let s=t.match(Nbe);if(!(s&&s[1]!=null&&s[1].length>0&&s[1]==="0"))return t}function zk(t,e){if(t&&e.numberingPlan.nationalPrefixForParsing()){let n=new RegExp("^(?:"+e.numberingPlan.nationalPrefixForParsing()+")"),o=n.exec(t);if(o){let r,i,s=o.length-1,a=s>0&&o[s];if(e.nationalPrefixTransformRule()&&a)r=t.replace(n,e.nationalPrefixTransformRule()),s>1&&(i=o[1]);else{let l=o[0];r=t.slice(l.length),a&&(i=o[1])}let c;if(a){let l=t.indexOf(o[1]);t.slice(0,l)===e.numberingPlan.nationalPrefix()&&(c=e.numberingPlan.nationalPrefix())}else c=o[0];return{nationalNumber:r,nationalPrefix:c,carrierCode:i}}}return{nationalNumber:t}}function jk(t,e,n){let o=new _t(n);for(let r of e)if(o.selectNumberingPlan(r),o.leadingDigits()){if(t&&t.search(o.leadingDigits())===0)return r}else if(iu({phone:t,country:r},void 0,o.metadata))return r}var Obe=!1;function _S(t,{nationalNumber:e,metadata:n}){if(Obe&&n.isNonGeographicCallingCode(t))return"001";let o=n.getCountryCodesForCallingCode(t);if(o)return o.length===1?o[0]:jk(e,o,n.metadata)}function um(t,e,n){let{carrierCode:o,nationalNumber:r}=zk(t,n);if(r!==t){if(!xbe(t,r,n))return{nationalNumber:t};if(n.numberingPlan.possibleLengths()&&(e||(e=_S(n.numberingPlan.callingCode(),{nationalNumber:r,metadata:n})),!Dbe(r,e,n)))return{nationalNumber:t}}return{nationalNumber:r,carrierCode:o}}function xbe(t,e,n){return!(Ir(t,n.nationalNumberPattern())&&!Ir(e,n.nationalNumberPattern()))}function Dbe(t,e,n){switch(ou(t,e,n)){case"TOO_SHORT":case"INVALID_LENGTH":return!1;default:return!0}}function Fk(t,e,n,o,r){if(!(e||n||o))return{number:t};let i=e||n?CS(e||n,r):o;if(t.indexOf(i)===0){let s=new _t(r);s.selectNumberingPlan(e||n||o);let a=t.slice(i.length),{nationalNumber:c}=um(a,void 0,s),{nationalNumber:l}=um(t,void 0,s);if(!Ir(l,s.nationalNumberPattern())&&Ir(c,s.nationalNumberPattern())||ou(l,void 0,s)==="TOO_LONG")return{countryCallingCode:i,number:a}}return{number:t}}function bS(t,e,n,o,r){if(!t)return{};let i;if(t[0]!=="+"){let c=Uk(t,e||n,o,r);if(c&&c!==t)i=!0,t="+"+c;else{if(e||n||o){let{countryCallingCode:l,number:u}=Fk(t,e,n,o,r);if(l)return{countryCallingCodeSource:"FROM_NUMBER_WITHOUT_PLUS_SIGN",countryCallingCode:l,number:u}}return{number:t}}}if(t[1]==="0")return{};let s=new _t(r),a=2;for(;a-1<=3&&a<=t.length;){let c=t.slice(1,a);if(s.hasCallingCode(c))return s.selectNumberingPlan(c),{countryCallingCodeSource:i?"FROM_NUMBER_WITH_IDD":"FROM_NUMBER_WITH_PLUS_SIGN",countryCallingCode:c,number:t.slice(a)};a++}return{}}function Vk(t){return t.replace(new RegExp(`[${lm}]+`,"g")," ").trim()}var $be=/(\$\d)/;function Bk(t,e,{useInternationalFormat:n,withNationalPrefix:o,carrierCode:r,metadata:i}){let s=t.replace(new RegExp(e.pattern()),n?e.internationalFormat():o&&e.nationalPrefixFormattingRule()?e.format().replace($be,e.nationalPrefixFormattingRule()):e.format());return n?Vk(s):s}var wbe=/^[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?$/;function Hk(t,e,n){let o=new _t(n);if(o.selectNumberingPlan(t||e),o.defaultIDDPrefix())return o.defaultIDDPrefix();if(wbe.test(o.IDDPrefix()))return o.IDDPrefix()}var Mbe=";ext=",dm=t=>`([${_r}]{1,${t}})`;function TS(t){var e="20",n="15",o="9",r="6",i="[ \\t,]*",s="[:\\..]?[ \\t,-]*",a="#?",c="(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)",l="(?:[xx##~~]|int|int)",u="[- ]+",p="[ \\t]*",m="(?:,{2}|;)",f=Mbe+dm(e),g=i+c+s+dm(e)+a,h=i+l+s+dm(o)+a,E=u+dm(r)+"#",C=p+m+s+dm(n)+a,I=p+"(?:,)+"+s+dm(o)+a;return f+"|"+g+"|"+h+"|"+E+"|"+C+"|"+I}var kbe="["+_r+"]{"+2+"}",Lbe="["+IS+"]{0,1}(?:["+lm+"]*["+_r+"]){3,}["+lm+_r+"]*",Ube=new RegExp("^["+IS+"]{0,1}(?:["+lm+"]*["+_r+"]){1,2}$","i"),zbe=Lbe+"(?:"+TS()+")?",jbe=new RegExp("^"+kbe+"$|^"+zbe+"$","i");function Gk(t){return t.length>=2&&jbe.test(t)}function HK(t){return Ube.test(t)}function GK({number:t,ext:e}){if(!t)return"";if(t[0]!=="+")throw new Error('"formatRFC3966()" expects "number" to be in E.164 format.');return`tel:${t}${e?";ext="+e:""}`}var qK={formatExtension:(t,e,n)=>`${t}${n.ext()}${e}`};function Wk(t,e,n,o){n?n=Bbe({},qK,n):n=qK;let r=new _t(o);if(t.country&&t.country!=="001"){if(!r.hasCountry(t.country))throw new Error(`Unknown country: ${t.country}`);r.selectNumberingPlan(t.country)}else if(t.countryCallingCode)r.selectNumberingPlan(t.countryCallingCode);else return t.phone||"";let i=r.countryCallingCode(),s=n.v2?t.nationalNumber:t.phone,a;switch(e){case"NATIONAL":return s?(a=$T(s,t.carrierCode,"NATIONAL",r,n),qk(a,t.ext,r,n.formatExtension)):"";case"INTERNATIONAL":return s?(a=$T(s,null,"INTERNATIONAL",r,n),a=`+${i} ${a}`,qk(a,t.ext,r,n.formatExtension)):`+${i}`;case"E.164":return`+${i}${s}`;case"RFC3966":return GK({number:`+${i}${s}`,ext:t.ext});case"IDD":if(!n.fromCountry)return;let c=Vbe(s,t.carrierCode,i,n.fromCountry,r);return c?qk(c,t.ext,r,n.formatExtension):void 0;default:throw new Error(`Unknown "format" argument passed to "formatNumber()": "${e}"`)}}function $T(t,e,n,o,r){let i=Fbe(o.formats(),t);return i?Bk(t,i,{useInternationalFormat:n==="INTERNATIONAL",withNationalPrefix:!(i.nationalPrefixIsOptionalWhenFormattingInNationalFormat()&&r&&r.nationalPrefix===!1),carrierCode:e,metadata:o}):t}function Fbe(t,e){return Hbe(t,n=>{if(n.leadingDigitsPatterns().length>0){let o=n.leadingDigitsPatterns()[n.leadingDigitsPatterns().length-1];if(e.search(o)!==0)return!1}return Ir(e,n.pattern())})}function qk(t,e,n,o){return e?o(t,e,n):t}function Vbe(t,e,n,o,r){if(CS(o,r.metadata)===n){let a=$T(t,e,"NATIONAL",r);return n==="1"?n+" "+a:a}let s=Hk(o,void 0,r.metadata);if(s)return`${s} ${n} ${$T(t,null,"INTERNATIONAL",r)}`}function Bbe(...t){let e=1;for(;e<t.length;){if(t[e])for(let n in t[e])t[0][n]=t[e][n];e++}return t[0]}function Hbe(t,e){let n=0;for(;n<t.length;){if(e(t[n]))return t[n];n++}}function Kk(){return Kk=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)({}).hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Kk.apply(null,arguments)}var Ac=class{constructor(e,n,o){if(!e)throw new TypeError("First argument is required");if(typeof e!="string")throw new TypeError("First argument must be a string");if(e[0]==="+"&&!n)throw new TypeError("`metadata` argument not passed");if(Qi(n)&&Qi(n.countries)){o=n;let s=e;if(!Gbe.test(s))throw new Error('Invalid `number` argument passed: must consist of a "+" followed by digits');let{countryCallingCode:a,number:c}=bS(s,void 0,void 0,void 0,o);if(n=c,e=a,!n)throw new Error("Invalid `number` argument passed: too short")}if(!n)throw new TypeError("`nationalNumber` argument is required");if(typeof n!="string")throw new TypeError("`nationalNumber` argument must be a string");Nk(o);let{country:r,callingCode:i}=kk(e,o);this.country=r,this.countryCallingCode=i,this.nationalNumber=n,this.number="+"+this.countryCallingCode+this.nationalNumber,this.getMetadata=()=>o}setExt(e){this.ext=e}getPossibleCountries(){return this.country?[this.country]:Lk(this.countryCallingCode,this.nationalNumber,this.getMetadata())}isPossible(){return xk(this,{v2:!0},this.getMetadata())}isValid(){return wk(this,{v2:!0},this.getMetadata())}isNonGeographic(){return new _t(this.getMetadata()).isNonGeographicCallingCode(this.countryCallingCode)}isEqual(e){return this.number===e.number&&this.ext===e.ext}getType(){return iu(this,{v2:!0},this.getMetadata())}format(e,n){return Wk(this,e,n?Kk({},n,{v2:!0}):{v2:!0},this.getMetadata())}formatNational(e){return this.format("NATIONAL",e)}formatInternational(e){return this.format("INTERNATIONAL",e)}getURI(e){return this.format("RFC3966",e)}},Gbe=/^\+\d+$/;var Lr=class t extends Error{constructor(e){super(e),Object.setPrototypeOf(this,t.prototype),this.name=this.constructor.name}};var WK=new RegExp("(?:"+TS()+")$","i");function Jk(t){let e=t.search(WK);if(e<0)return{};let n=t.slice(0,e),o=t.match(WK),r=1;for(;r<o.length;){if(o[r])return{number:n,ext:o[r]};r++}}var qbe={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 KK(t){return qbe[t]}function wT(t){let e="";for(let n of t.split(""))e+=Wbe(n,e)||"";return e}function Wbe(t,e,n){if(t==="+"){if(e){typeof n=="function"&&n("end");return}return"+"}return KK(t)}var Zk="+",Kbe="[\\-\\.\\(\\)]?",JK="(["+_r+"]|"+Kbe+")",Jbe="^\\"+Zk+JK+"*["+_r+"]"+JK+"*$",Ybe=new RegExp(Jbe,"g"),Yk=_r,Zbe="["+Yk+"]+((\\-)*["+Yk+"])*",Qbe="a-zA-Z",Xbe="["+Qbe+"]+((\\-)*["+Yk+"])*",eTe="^("+Zbe+"\\.)*"+Xbe+"\\.?$",tTe=new RegExp(eTe,"g"),Qk="tel:",MT=";phone-context=",YK=";isub=";function Xk(t){let e=t.indexOf(MT);if(e<0)return null;let n=e+MT.length;if(n>=t.length)return"";let o=t.indexOf(";",n);return o>=0?t.substring(n,o):t.substring(n)}function ZK(t){return t===null?!0:t.length===0?!1:Ybe.test(t)||tTe.test(t)}function eL(t,{extractFormattedPhoneNumber:e}){let n=Xk(t);if(!ZK(n))throw new Lr("NOT_A_NUMBER");let o;if(n===null)o=e(t)||"";else{o="",n.charAt(0)===Zk&&(o+=n);let i=t.indexOf(Qk),s;i>=0?s=i+Qk.length:s=0;let a=t.indexOf(MT);o+=t.substring(s,a)}let r=o.indexOf(YK);if(r>0&&(o=o.substring(0,r)),o!=="")return o}var rTe=250,oTe=new RegExp("["+IS+_r+"]"),iTe=new RegExp("[^"+_r+"#]+$"),sTe=!1;function tL(t,e,n){e=e||{};let o=new _t(n);if(e.defaultCountry&&!o.hasCountry(e.defaultCountry))throw e.v2?new Lr("INVALID_COUNTRY"):new Error(`Unknown country: ${e.defaultCountry}`);let{number:r,ext:i,error:s}=cTe(t,e.v2,e.extract);if(!r){if(e.v2)throw s==="TOO_SHORT"?new Lr("TOO_SHORT"):new Lr("NOT_A_NUMBER");return{}}let{country:a,nationalNumber:c,countryCallingCode:l,countryCallingCodeSource:u,carrierCode:p}=uTe(r,e.defaultCountry,e.defaultCallingCode,o);if(!o.hasSelectedNumberingPlan()){if(e.v2)throw new Lr("INVALID_COUNTRY");return{}}if(!c||c.length<2){if(e.v2)throw new Lr("TOO_SHORT");return{}}if(c.length>17){if(e.v2)throw new Lr("TOO_LONG");return{}}if(e.v2){let f=new Ac(l,c,o.metadata);return a&&(f.country=a),p&&(f.carrierCode=p),i&&(f.ext=i),f.__countryCallingCodeSource=u,f}let m=(e.extended?o.hasSelectedNumberingPlan():a)?Ir(c,o.nationalNumberPattern()):!1;return e.extended?{country:a,countryCallingCode:l,carrierCode:p,valid:m,possible:m?!0:!!(e.extended===!0&&o.possibleLengths()&&Dk(c,o)),phone:c,ext:i}:m?lTe(a,c,i):{}}function aTe(t,e,n){if(!t)return;if(t.length>rTe){if(n)throw new Lr("TOO_LONG");return}if(e===!1)return t;let o=t.search(oTe);if(!(o<0))return t.slice(o).replace(iTe,"")}function cTe(t,e,n){let o=eL(t,{extractFormattedPhoneNumber:i=>aTe(i,n,e)});if(!o)return{};if(!Gk(o))return HK(o)?{error:"TOO_SHORT"}:{};let r=Jk(o);return r.ext?r:{number:o}}function lTe(t,e,n){let o={country:t,phone:e};return n&&(o.ext=n),o}function uTe(t,e,n,o){let{countryCallingCodeSource:r,countryCallingCode:i,number:s}=bS(wT(t),void 0,e,n,o.metadata),a;if(i)o.selectNumberingPlan(i);else if(s&&(e||n))e?(a=e,o.selectNumberingPlan(e),i=o.numberingPlan.callingCode()):(o.selectNumberingPlan(n),i=n,sTe&&o.isNonGeographicCallingCode(i)&&(a="001"));else return{};if(!s)return{countryCallingCodeSource:r,countryCallingCode:i};let{nationalNumber:c,carrierCode:l}=um(wT(s),void 0,o),u=_S(i,{nationalNumber:c,metadata:o});return u&&(a=u,u==="001"||o.selectNumberingPlan(a)),{country:a,countryCallingCode:i,countryCallingCodeSource:r,nationalNumber:c,carrierCode:l}}function nL(){return nL=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)({}).hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},nL.apply(null,arguments)}function rL(t,e,n){return tL(t,nL({},e,{v2:!0}),n)}function oL(){return oL=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)({}).hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},oL.apply(null,arguments)}function iL(t){let[e,n,o,r]=Array.prototype.slice.call(t),i,s,a;if(typeof e=="string")i=e;else throw new TypeError("A text for parsing must be a string.");if(!n||typeof n=="string")r?(s=o,a=r):(s=void 0,a=o),n&&(s=oL({defaultCountry:n},s));else if(Qi(n))o?(s=n,a=o):a=n;else throw new Error(`Invalid second argument: ${n}`);return{text:i,options:s,metadata:a}}function sL(){return sL=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)({}).hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},sL.apply(null,arguments)}function aL(t,e,n){e&&e.defaultCountry&&!FK(e.defaultCountry,n)&&(e=sL({},e,{defaultCountry:void 0}));try{return rL(t,e,n)}catch(o){if(!(o instanceof Lr))throw o}}function vS(){let{text:t,options:e,metadata:n}=iL(arguments);return aL(t,e,n)}var kT=class extends Ac{constructor(e){super(e,OT)}};function LT(){return bk(vS,arguments,kT.prototype)}var QK="Enter a valid phone number";Ft.register("phone",t=>{let e=null;t&&!/^\+?\d+$/.test(t)&&(e=QK);let o=t?.startsWith("+");if(t&&o){let r=LT(t);(!r||!r.isPossible()||t!==r.number)&&(e=QK)}return e});var XK="",eJ="",dTe=t=>{if(t&&t.startsWith(XK)&&t.endsWith(XK))return"invalid";if(t&&t.startsWith(eJ)&&t.endsWith(eJ))return"incomplete"},cL=(t,e)=>{switch(dTe(e)??e){case"invalid":return`Incorrect ${t}`;case"incomplete":return`Incomplete ${t}`;default:return null}};Ft.register("datetime",t=>cL("date and time",t));Ft.register("date",t=>cL("date",t));Ft.register("time",t=>cL("time",t));var tJ=t=>{let e="Error with one or more files";for(let n of t)if(n?.error)return e;return null};Ft.register("attachment",t=>{let e=null,n="Error with one or more files";return t&&("pyCount"in t&&Array.isArray(t.pxResults)?e=tJ(t.pxResults):Array.isArray(t)?e=tJ(t):"error"in t&&t.error&&(e=n)),e});var su=()=>{let t={},e=typeof Intl<"u"?Intl.DateTimeFormat().resolvedOptions().timeZone:void 0;e&&(t["user-timezone"]=e);let n=typeof navigator<"u"?navigator.language:void 0;return n&&(t["user-locale"]=n),t},rJ="createConversation",UT="sendMessage",oJ="getConversations",iJ="getMessages",sJ="createConversationForAgent",nJ="sendMessageForAgent",pTe="getConversationsForAgent",mTe="getMessagesForAgent",fTe="likeAgentMessage",gTe="dislikeAgentMessage",hTe="getAgent",aJ="getCoach",cJ=(t,e,n,o,r,i,s)=>{for(let c of s)c?.cancel&&typeof c.cancel=="function"&&c.cancel();let a=zi();return s.push(a),Re(t,{queryPayload:oJ===t?{assistantID:e,contextID:n,pageSize:o,pageIndex:r}:{agentID:e,contextID:n,pageSize:o,pageIndex:r},cancelTokenSource:a,headers:su()},i).finally(()=>{let c=s.indexOf(a);c!==-1&&s.splice(c,1)})},lJ=(t,e,n,o,r)=>{for(let s of r)s?.cancel&&typeof s.cancel=="function"&&s.cancel();let i=zi();return r.push(i),Re(t,{queryPayload:iJ===t?{assistantID:e,conversationID:n}:{agentID:e,conversationID:n},cancelTokenSource:i,headers:su()},o).then(s=>(r.pop(),s))},uJ=(t,e,n,o,r,i,s=!1)=>{for(let c of r)c?.cancel&&typeof c.cancel=="function"&&c.cancel();let a=zi();return r.push(a),Re(t,{body:JSON.stringify({contextID:e,executeStarterQuestion:!1,...i&&i.isManualConfirmationSupported&&{capabilities:{tools:{isManualConfirmationSupported:!0}}},...t===sJ&&s&&{showAgentRecommendations:s}}),cancelTokenSource:a,queryPayload:t===rJ?{assistantID:n}:{agentID:n},headers:su()},o).then(c=>(r.pop(),c))},dJ=(t,e,n,o,r,i,s)=>{let a={...o&&{request:o},...s&&s.additionalInstruction&&{additionalInstruction:s.additionalInstruction},...s&&s.isManualConfirmationSupported&&{capabilities:{tools:{isManualConfirmationSupported:!0}}},...s&&s.toolsReviewed&&s.toolsReviewed.length>0&&{toolsReviewed:s.toolsReviewed},...i&&i?.length>0&&{attachments:i}};return Re(t,{body:JSON.stringify(a),queryPayload:t===UT?{assistantID:e,conversationID:n}:{agentID:e,conversationID:n},headers:su()},r)},pJ=(t,e,n,o,r,i,s,a)=>{let c={...o&&{request:o},...s&&s.additionalInstruction&&{additionalInstruction:s.additionalInstruction},...i&&i.length>0&&{attachments:i},...s&&s.toolsReviewed&&s.toolsReviewed.length>0&&{toolsReviewed:s.toolsReviewed},capabilities:{stream:{isEnabled:!0},...s&&s.isManualConfirmationSupported&&{tools:{isManualConfirmationSupported:!0}}},...s&&s.questionnaire&&{questionnaire:s.questionnaire}},l=t===UT?{assistantID:e,conversationID:n}:{agentID:e,conversationID:n},{restApi:u,reqType:p}=F(t,l),m={method:p,headers:{Accept:"text/event-stream",...su()},body:JSON.stringify(c),responseType:"stream",adapter:"fetch",...a&&{signal:a.token}};return k(u,m,r)},mJ=(t,e,n,o,r)=>{for(let s of o)s?.cancel&&typeof s.cancel=="function"&&s.cancel();let i=zi();return o.push(i),Re(t,{queryPayload:t===aJ?{assistantID:e,...r&&{contextID:r}}:{agentID:e,...r&&{contextID:r}},cancelTokenSource:i},n).then(s=>(o.pop(),s)).catch(s=>{throw o.pop(),s})},yTe=(t,e,n,o,r,i=[])=>cJ(oJ,t,e,n,o,r,i),STe=(t,e,n,o,r,i=[])=>cJ(pTe,t,e,n,o,r,i),ETe=(t,e,n,o=[])=>lJ(iJ,t,e,n,o),ATe=(t,e,n,o=[])=>lJ(mTe,t,e,n,o),CTe=(t,e,n,o=[])=>uJ(rJ,t,e,n,o),ITe=(t,e,n,o=[],r,i)=>uJ(sJ,t,e,n,o,r,i),_Te=(t,e,n,o,r)=>r?.enableStreaming?pJ(UT,t,e,n,o,void 0,r):dJ(UT,t,e,n,o),bTe=(t,e,n,o,r,i)=>i?.enableStreaming?pJ(nJ,t,e,n,o,r,i,i.cancelTokenSource):dJ(nJ,t,e,n,o,r,i),TTe=(t,e,n,o=[])=>mJ(hTe,t,e,o,n),vTe=(t,e,n,o=[])=>mJ(aJ,t,e,o,n),RTe=(t,e,n,o)=>{let r={queryPayload:{agentID:t,conversationID:e,messageID:n},headers:su()};return Re(fTe,r,o)},PTe=(t,e,n,o,r="")=>{let i={queryPayload:{agentID:t,conversationID:e,messageID:n},body:JSON.stringify({feedbackText:r}),headers:su()};return Re(gTe,i,o)},fJ={createConversation:CTe,sendMessage:_Te,createConversationForAgent:ITe,sendMessageForAgent:bTe,getAgent:TTe,getCoach:vTe,likeAgentMessage:RTe,unLikeAgentMessage:PTe,getConversations:yTe,getConversationsForAgent:STe,getMessages:ETe,getMessagesForAgent:ATe};var lL=class{async rewriteText(e){let{originalText:n,rewriteAction:o,additionalInstructions:r,context:i}=e,s=T.isInfinityRuntime(),a=T.getRewriteGenAIDP()??O.getDefaultQualifiedName("D_RewriteWithAI"),c={OriginalText:n,RewriteAction:o,AdditionalInstructions:r||""};try{let l,u;if(s){let p=await sn.getPageDataAsync(a,i,c),f=Object.fromEntries(Object.entries(p)).pyResponseData;l=typeof f=="string"?f:void 0}else{let m=(await sn.getDataAsync(a,i,c)).data[0],f=m[O.getDefaultQualifiedName("Content")];l=typeof f=="string"?f:void 0;let g=m[O.getDefaultQualifiedName("ErrorMessage")];u=typeof g=="string"?g:void 0}return l?{success:!0,rewrittenText:l}:{success:!1,errorMessage:u||"AI rewrite failed: No rewritten text returned"}}catch(l){return{success:!1,errorMessage:l instanceof Error?l.message:"An unexpected error occurred during AI rewrite"}}}},gJ=new lL;var uL=class{classAccessMap=new Map;static instance;constructor(){let e=T.getClassesAccessList();e.length!==0?this.classAccessMap=e.reduce((n,o)=>(n.set(o.pyClassName,o.pyHasCreateAccess),n),new Map):this.classAccessMap=T.getCaseTypeList().reduce((n,o)=>(n.set(o.pyWorkTypeImplementationClassName,o.hasCreateAccess??!0),n),new Map)}hasCreateAccess(e){return this.classAccessMap.get(e)}static getInstance(){return this.instance||(this.instance=new this),this.instance}},hJ=uL;var dL=class{static AUTOSAVE_SAVE_STATUS=Fp;static isAutosaveEnabledForContext(e){return Vs(e)}static subscribeAutosaveStatus(e,n){return vH(e,n)}static notifyChange(e,n,o){Vs(e)&&(bH(e,n,o),Bp(e))}},yJ=dL;var pL=class t{static behaviorOverrides={};getPersonalizationUtils=gK;constructor(){t.behaviorOverrides={}}getPCoreVersion=()=>"27.1.0";onPCoreReady=e=>ar.onPCoreReady(e);onPCoreCleanup=e=>ar.onPCoreCleanup(e);getComponentsRegistry=()=>ar.getComponentsRegistry();checkIfSemanticURL=()=>ar.checkIfSemanticURL();isValidSemanticURL=()=>R5();getRoutingUtils=()=>_K;getViewResources=()=>n0;configureForBrowserBookmark=e=>ar.configureForBrowserBookmark(e);getStore=()=>we();resetStore=()=>js();getMessageManager=()=>yd;getCoexistenceManager=()=>ES;getStoreValue=(e,n,o)=>ie(e,n,o);getContainerUtils=()=>xa;getAnnotationUtils=()=>On;getFieldUtils=()=>Ii;getFieldDefaultUtils=()=>gr;getAssetLoader=()=>We;getAttachmentUtils=()=>Zu;getViewRuleApi=()=>nK;getFeedUtils=()=>aK;getTagUtils=()=>cK;getGenAIAssistantUtils=()=>fJ;getGenAIUtils=()=>gJ;getStakeholderUtils=()=>lK;getUserApi=()=>iK;getCaseFollowerApi=()=>rK;getCaseUtils=()=>G;getStateUtils=()=>wn;getRelatedCasesApi=()=>oK;getDataApi=()=>Vo;getDataApiUtils=()=>fn;getAnalyticsUtils=()=>IK;getLocaleUtils=e=>{let n=e??T.getLocale()??"en-US";return Hi(n)};registerLocaleManager=e=>{let n=this.getLocaleUtils();Object.keys(e).forEach(o=>{n[o]=e[o]})};setBehaviorOverrides=e=>{t.behaviorOverrides=e};setBehaviorOverride=(e,n)=>{t.behaviorOverrides[e]=n};getBehaviorOverrides=()=>t.behaviorOverrides;getBehaviorOverride=e=>t.behaviorOverrides[e];getAsynchronousUtils=()=>UK;createPConnect=e=>ct(e);getPubSubUtils=()=>w;registerComponentCreator=e=>{lH(e)};getConstants=()=>Object.freeze(A);getResolvedConstantValue=e=>d.getProperty(e);getEvents=()=>TK;getRestClient=()=>G_;getMashupApi=()=>TT;getEnvironmentInfo=()=>T;switchLocale=e=>MW(e);getRuntimeParamsAPI=()=>sc;getSemanticUrlUtils=()=>td;getRemoteCaseUtils=()=>ce;getNavigationUtils=()=>yt;getSDKUtils=()=>Ik;registerModule=(e,n)=>bK.registerModule(e,n,this);getErrorHandler=()=>vK;getFormUtils=()=>Sr;getAutosaveUtils=()=>yJ;getMessagingServiceManager=()=>It;getMetadataUtils=()=>go;getDataPageUtils=()=>sn;getDataTypeUtils=()=>Fi;getCascadeManager=()=>Nn;isDeepEqual=(e,n)=>Ro(e,n);getAuthUtils=()=>RK;getDebugger=()=>en;getDeferLoadManager=()=>Lp;getExpressionEngine=()=>_0;getActionsSequencer=()=>vt;getRefreshManager=()=>Bi;getInitialiser=()=>nu;getBootstrapUtils=()=>ar;getContextTreeManager=()=>be;getAccessPrivilege=()=>hJ.getInstance();getObjectTransformer=()=>qe;getAllStateMachines=(e,n,o)=>!n||!o?Ue.getAllStateMachinesByContext(e):Ue.getAllStateMachines(e,n,o);isNamespaceEnabled=()=>O.isNamespaceEnabled();getQualifiedName=(e,n)=>O.getQualifiedName(e,n);getDefaultQualifiedName=e=>this.getQualifiedName(e,"PegaPlatform");getNameSpaceUtils=()=>O;getNetworkUtils=()=>ei;getMashupBridge=()=>RT;getConfirmDialogService=()=>vi;getBrowserNotificationService=()=>bT;getMCPClient=()=>ky},SJ=new pL;globalThis.PCore=SJ;var b$t=SJ;export{b$t as default};
|
|
103
103
|
/*! Bundled license information:
|
|
104
104
|
|
|
105
105
|
@modelcontextprotocol/client/dist/src-DDAAhLnO.mjs:
|