@pega/constellation-corejs 10.0.0-build.16.0 → 10.0.0-build.16.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/constellation-corejs.esm.js +1 -1
- package/dist/constellation-corejs.global.js +1 -1
- package/lib/case/create-work/events.d.ts +2 -2
- package/lib/case/create-work/events.d.ts.map +1 -1
- package/lib/case/create-work/events.js.map +1 -1
- package/lib/case/create-work/index.d.ts.map +1 -1
- package/lib/case/create-work/index.js +2 -1
- package/lib/case/create-work/index.js.map +1 -1
- package/lib/environment-info/types.d.ts +1 -0
- package/lib/environment-info/types.d.ts.map +1 -1
- package/lib/environment-info/types.js.map +1 -1
- package/lib/initialiser/index.js +1 -1
- package/lib/initialiser/index.js.map +1 -1
- package/package.json +1 -1
- package/src/case/create-work/events.ts +1 -1
- package/src/case/create-work/index.ts +2 -1
- package/src/environment-info/types.ts +1 -0
- package/src/initialiser/index.ts +1 -1
|
@@ -60,7 +60,7 @@ Boolean requesting whether a visible border and background is provided by the ho
|
|
|
60
60
|
- omitted: host decides border`)}),Mze=b.object({method:b.literal("ui/request-display-mode"),params:b.object({mode:Sh.describe("The display mode being requested.")})}),Qoe=b.object({mode:Sh.describe("The display mode that was actually set. May differ from requested if not supported.")}).passthrough(),Xoe=b.union([b.literal("model"),b.literal("app")]).describe("Tool visibility scope - who can access the tool."),kze=b.object({resourceUri:b.string().optional(),visibility:b.array(Xoe).optional().describe(`Who can access this tool. Default: ["model", "app"]
|
|
61
61
|
- "model": Tool visible to and callable by the agent
|
|
62
62
|
- "app": Tool callable by the app from this server only`),csp:b.never().optional(),permissions:b.never().optional()}),Lze=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.')}),Uze=b.object({method:b.literal("ui/download-file"),params:b.object({contents:b.array(b.union([rl,nl])).describe("Resource contents to download — embedded (inline data) or linked (host fetches). Uses standard MCP resource types.")})}),jze=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(yi).describe("Message content blocks (text, image, etc.).")})}),zze=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:hx.optional().describe("CSP configuration from resource metadata."),permissions:yx.optional().describe("Sandbox permissions from resource metadata.")})}),eie=b.object({method:b.literal("ui/notifications/tool-result"),params:Oa.describe("Standard MCP tool execution result.")}),T4=b.object({toolInfo:b.object({id:Bo.optional().describe("JSON-RPC id of the tools/call request."),tool:Na.describe("Tool definition including name, inputSchema, etc.")}).optional().describe("Metadata of the tool call that instantiated this App."),theme:Loe.optional().describe("Current color theme preference."),styles:Woe.optional().describe("Style configuration for theming the app."),displayMode:Sh.optional().describe("How the UI is currently displayed."),availableDisplayModes:b.array(Sh).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
|
|
63
|
-
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(),tie=b.object({method:b.literal("ui/notifications/host-context-changed"),params:T4.describe("Partial context update containing only changed fields.")}),Fze=b.object({method:b.literal("ui/update-model-context"),params:b.object({content:b.array(yi).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.")})}),Vze=b.object({method:b.literal("ui/initialize"),params:b.object({appInfo:gi.describe("App identification (name and version)."),appCapabilities:Zoe.describe("Features and capabilities this app provides."),protocolVersion:b.string().describe("Protocol version this app supports.")})}),rie=b.object({protocolVersion:b.string().describe('Negotiated protocol version string (e.g., "2025-11-21").'),hostInfo:gi.describe("Host application identification and version."),hostCapabilities:Yoe.describe("Features and capabilities provided by the host."),hostContext:T4.describe("Rich context about the host environment.")}).passthrough(),nie={target:"draft-2020-12"};async function _4(t,e){let r=t["~standard"];if(r.jsonSchema)return r.jsonSchema[e](nie);throw Error(`Schema (vendor: ${r.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 b4(t,e,r=""){let n=await t["~standard"].validate(e);if(n.issues){let o=n.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(r+o)}return n.value}function oie(t,e){let r={...t,...e};return e.experimental!==void 0&&(r.experimental={...t.experimental,...e.experimental}),e.tools!==void 0&&(r.tools={...t.tools,...e.tools}),r}var VC=class t extends mx{_appInfo;_appCapabilities;options;_hostCapabilities;_hostInfo;_hostContext;_registeredTools={};_initializedSent=!1;_registeredEvents=new Set;_events=new fx;_methods=new gx;setRequestHandler=(...e)=>{let[r,...n]=C4("request",e)??e;this._methods.claim(r,"setRequestHandler"),super.setRequestHandler.call(this,r,...n)};setNotificationHandler=(...e)=>{let[r,...n]=C4("notification",e)??e;this._methods.claim(r,"setNotificationHandler"),super.setNotificationHandler.call(this,r,...n)};removeRequestHandler=e=>{this._methods.release(e),super.removeRequestHandler(e)};removeNotificationHandler=e=>{this._methods.release(e),super.removeNotificationHandler(e)};replaceRequestHandler=(e,...r)=>{this._methods.replace(e),super.setRequestHandler.call(this,e,...r)};_assertInitialized(e){if(this._initializedSent)return;let r=`[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(r);console.warn(`${r}. This will throw in a future release.`)}eventSchemas={toolinput:Boe,toolinputpartial:Hoe,toolresult:eie,toolcancelled:Goe,hostcontextchanged:tie};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 r=`[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(r);console.warn(r)}setEventHandler(e,r){r&&this._assertHandlerTiming(e),this._ensureEventSlot(e),this._events.setHandler(e,r)}addEventListener(e,r){this._assertHandlerTiming(e),this._ensureEventSlot(e),this._events.addEventListener(e,r)}removeEventListener(e,r){this._events.removeEventListener(e,r)}_ensureEventSlot(e){if(this._registeredEvents.has(e))return;let r=this.eventSchemas[e];if(!r)throw Error(`Unknown event: ${String(e)}`);this.setNotificationHandler(r.shape.method.value,{params:r.shape.params},n=>{let o=n;e==="hostcontextchanged"&&(this._hostContext={...this._hostContext,...o}),this._events.dispatch(e,o)}),this._registeredEvents.add(e)}getEventHandler(e){return this._events.getHandler(e)}warnIfRequestHandlerReplaced(e,r,n){r&&n&&console.warn(`[MCP Apps] ${e} handler replaced. Previous handler will no longer be called.`)}constructor(e,r={},n={autoResize:!0}){super(n),this._appInfo=e,this._appCapabilities=r,this.options=n,this._methods.replace("notifications/cancelled"),this._methods.replace("notifications/progress"),!n.allowUnsafeEval&&b.config({jitless:!0}),this.replaceRequestHandler("ping",o=>(console.log("Received ping:",o.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=oie(this._appCapabilities,e)}registerTool(e,r,n){if(this._registeredTools[e])throw Error(`Tool ${e} is already registered`);let o=this,i=()=>{o._initializedSent&&o._appCapabilities.tools?.listChanged&&o.sendToolListChanged()},s=r.inputSchema!==void 0,a={title:r.title,description:r.description,inputSchema:r.inputSchema,outputSchema:r.outputSchema,annotations:r.annotations,_meta:r._meta,enabled:!0,enable(){this.enabled=!0,i()},disable(){this.enabled=!1,i()},update(c){Object.assign(this,c),i()},remove(){o._registeredTools[e]===a&&(delete o._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 b4(p,c??{},`Invalid input for tool ${e}: `):c??{};u=await n(m,l)}else u=await n(l);return a.outputSchema&&!u.isError&&(u.structuredContent=await b4(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,r)=>{let n=this._registeredTools[e.name];if(!n)throw Error(`Tool ${e.name} not found`);return n.handler(e.arguments,r)},this.onlisttools=async(e,r)=>({tools:await Promise.all(Object.entries(this._registeredTools).filter(([n,o])=>o.enabled).map(async([n,o])=>{let i={name:n,title:o.title,description:o.description,inputSchema:o.inputSchema?await _4(o.inputSchema,"input"):{type:"object",properties:{}}};return o.outputSchema&&(i.outputSchema=await _4(o.outputSchema,"output")),o.annotations&&(i.annotations=o.annotations),o._meta&&(i._meta=o._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:Koe.shape.params,result:Joe},(r,n)=>{if(!this._onteardown)throw Error("No onteardown handler set");return this._onteardown(r,n)})}_oncalltool;get oncalltool(){return this._oncalltool}set oncalltool(e){this.warnIfRequestHandlerReplaced("oncalltool",this._oncalltool,e),this._oncalltool=e,this.replaceRequestHandler("tools/call",(r,n)=>{if(!this._oncalltool)throw Error("No oncalltool handler set");return this._oncalltool(r.params,n)})}_onlisttools;get onlisttools(){return this._onlisttools}set onlisttools(e){this.warnIfRequestHandlerReplaced("onlisttools",this._onlisttools,e),this._onlisttools=e,this.replaceRequestHandler("tools/list",(r,n)=>{if(!this._onlisttools)throw Error("No onlisttools handler set");return this._onlisttools(r.params,n)})}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,r){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,...r})}async readServerResource(e,r){return this._assertInitialized("readServerResource"),await this.request({method:"resources/read",params:e},r)}async listServerResources(e,r){return this._assertInitialized("listServerResources"),await this.request({method:"resources/list",params:e},r)}async createSamplingMessage(e,r){return this._assertInitialized("createSamplingMessage"),await this.request({method:"sampling/createMessage",params:e},r)}sendMessage(e,r){return this._assertInitialized("sendMessage"),this.request({method:"ui/message",params:e},Voe,r)}sendLog(e){return this.notification({method:"notifications/message",params:e})}updateModelContext(e,r){return this._assertInitialized("updateModelContext"),this.request({method:"ui/update-model-context",params:e},Pa,r)}openLink(e,r){return this._assertInitialized("openLink"),this.request({method:"ui/open-link",params:e},zoe,r)}sendOpenLink=this.openLink;downloadFile(e,r){return this._assertInitialized("downloadFile"),this.request({method:"ui/download-file",params:e},Foe,r)}requestTeardown(e={}){return this.notification({method:"ui/notifications/request-teardown",params:e})}requestDisplayMode(e,r){return this._assertInitialized("requestDisplayMode"),this.request({method:"ui/request-display-mode",params:e},Qoe,r)}sendSizeChanged(e){return this.notification({method:"ui/notifications/size-changed",params:e})}setupSizeChangedNotifications(){let e=!1,r=0,n=0,o=()=>{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!==r||c!==n)&&(r=l,n=c,this.sendSizeChanged({width:l,height:c}))}))};o();let i=new ResizeObserver(o);return i.observe(document.documentElement),i.observe(document.body),()=>i.disconnect()}async connect(e=new yh(window.parent,window.parent),r){if(this.transport)throw Error("App is already connected. Call close() before connecting again.");this._initializedSent=!1;try{await super.connect(e);let n=await this.request({method:"ui/initialize",params:{appCapabilities:this._appCapabilities,appInfo:this._appInfo,protocolVersion:Moe}},rie,r);if(n===void 0)throw Error(`Server sent invalid initialize result: ${n}`);this._hostCapabilities=n.hostCapabilities,this._hostInfo=n.hostInfo,this._hostContext=n.hostContext,await this.notification({method:"ui/notifications/initialized"}),this._initializedSent=!0,this.options?.autoResize&&this.setupSizeChangedNotifications()}catch(n){throw this.close(),n}}};var iie=["inline","fullscreen"],R4="pxC11nAction",Ho,P4=new WeakMap,fs,BC=Promise.resolve(),Ud=0,N4,Sx=!1,Ex,O4=!1,Eh=(...t)=>{O4&&console.log("[MCP]",...t)},x4=t=>{N4=t},D4=R4,w4=()=>D4,v4=()=>new DOMException("MCP initialization was superseded by a newer initialize or disconnect call","AbortError"),Ax=class extends yh{initializeRequestSent;resolveInitializeRequestSent=()=>{};constructor(...e){super(...e),this.initializeRequestSent=new Promise(r=>{this.resolveInitializeRequestSent=r})}async send(...e){await super.send(...e);let[r]=e;"method"in r&&r.method==="ui/initialize"&&this.resolveInitializeRequestSent()}},sie=(t,e,r,n)=>{let o=new Ax(e,r),i=t.connect(o);return P4.set(t,i),n?i:(i.catch(s=>{Ho===t&&(Ho=void 0,console.error("MCP host did not complete the initialize handshake",s))}),Promise.race([o.initializeRequestSent,i]))},jd=()=>{if(!Ho)throw new Error("MCP client is not initialized");return Ho},aie=(t,e)=>{Ho!==t&&fs!==t||(Sx=!0,Ex=e,Eh("host tool result",e),N4?.(e))},cie={async initialize(t){Ud+=1;let e=Ud;Sx=!1,Ex=void 0,D4=t.c11nToolName||R4;let r=new Set([Ho,fs].filter(i=>i!==void 0));Ho=void 0,fs=void 0;let n=Promise.all(Array.from(r,i=>i.close())),o=BC.catch(()=>{}).then(async()=>{if(await n,e!==Ud)throw v4();let i=t.eventTarget;if(!i)try{i=window.parent}catch(l){throw new Error("MCP client cannot access window.parent",{cause:l})}let s=t.eventSource??i,a=t.waitForHandshake??!0,c=new VC({name:t.name,version:t.version},{availableDisplayModes:iie},{autoResize:t.autoResize??!1,strict:t.strict??a});fs=c,c.ontoolresult=l=>aie(c,l);try{await sie(c,i,s,a)}catch(l){throw fs===c&&(fs=void 0),e===Ud&&await c.close(),l}if(e!==Ud)throw v4();fs=void 0,Ho=c});BC=o.catch(()=>{}),await o},callTool(t,e){return Eh("tool call",t.name,t.arguments),jd().callServerTool(t,e).then(r=>(Eh("tool result",t.name,r),r),r=>{throw Eh("tool call failed",t.name,r),r})},listResources(t,e){return jd().listServerResources(t,e)},readResource(t,e){return jd().readServerResource(t,e)},listPrompts(t,e){return jd().request({method:"prompts/list",params:t},e)},getPrompt(t,e){return jd().request({method:"prompts/get",params:t},e)},async disconnect(){Ud+=1;let t=new Set([Ho,fs].filter(r=>r!==void 0));Ho=void 0,fs=void 0;let e=Promise.all(Array.from(t,r=>r.close()));BC=BC.catch(()=>{}).then(()=>e).then(()=>{}),await e},isConnected(){return Ho!==void 0},hasReceivedToolResult(){return Sx},getToolResult(){return Ex},setDebug(t){O4=t},async requestDisplayMode(t){let e=jd();await P4.get(e);let r=e.getHostContext();if(r?.displayMode===t||!r?.availableDisplayModes?.includes(t))return r?.displayMode;let n=await e.requestDisplayMode({mode:t});return Eh("display mode",n.mode),n.mode}},Ah=cie;var lie=(t,e)=>e[E.TRACE_ID]?{type:"error",message:t.localizedValue||t.message,correlationID:e[E.TRACE_ID]}:{type:"error",message:t.localizedValue||t.message},uie=new Set(["resource is stale","resource is locked","resource in the wrong state","resource not found"]),die=t=>t?uie.has(t.toLowerCase()):!1,pie=(t,e)=>{if(!die(e))return t;if(t&&t.includes("/workarea")&&!t.includes("/modal")){let r=t.lastIndexOf("/workarea");if(r!==-1)return t.slice(0,r)}return t},$4=t=>typeof t=="object"&&t!==null,mie=t=>{if(t instanceof ArrayBuffer)try{let r=new TextDecoder().decode(t),n=JSON.parse(r);return $4(n)?n:{}}catch{return{}}return $4(t)?t:{}},fie=(t,e,r,n)=>{if(t.config&&ra(t.config.url,r))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($.unsubscribeAllWithEventType(zd),e.setUpdateSessionStatus(!0),r?.authType==="custom"){$.publish(E.PUB_SUB_EVENTS.EVENT_CUSTOM_REAUTH);let{url:i,config:s,context:a}=Wb(t);return Nm(i,s,a,e)}return AU(t,e,r)}if(t.response&&t.response.status&&t.response.status===401&&!t.config.isExternalUrl&&e.getUpdateSessionStatus()&&!WS(t.config.url)){let{url:i,config:s,context:a}=Wb(t);return M(i,s,a)}let o=mie(t.response?.data);if(t.response&&t.response.status&&t.response.status!==422&&t.response.status!==424&&!(t.response.status===400&&o.errorClassification===E.INVALID_INPUTS)&&t.config.headers.context&&t.response.data&&!n){let i=o.errorDetails&&o.errorDetails.map(a=>lie(a,t.response.headers)),s=pie(t.config.headers.context,o.errorClassification);return Nn({messages:i,category:"HTTP",context:s}),Promise.reject(t)}return Promise.reject(t)},M4=fie;var Cx=class{languagePacks;constructor(){this.languagePacks=[]}getLocalizationBundles(e=v.getLocale()){return(this.languagePacks.find(n=>n.pyLangCode===e)?.pyBundles??this.languagePacks.find(n=>n.pyLangCode===d.DEFAULT.toUpperCase())?.pyBundles??[]).sort((n,o)=>n.pyOrder-o.pyOrder)}hasLocalizationBundles(e=v.getLocale()){let r=this.languagePacks.find(n=>n.pyLangCode===e)?.pyBundles;return!!r&&r.length>0}async loadLocaleBundle(e){let r=e.map(i=>Zt.getPageDataAsync("D_pzBundlesForLocalization","",{locale:i,onlyApp:"false"},{invalidateCache:!0})),o=(await Promise.allSettled(r)).filter(i=>i.status==="fulfilled").flatMap(i=>i.value.pyLanguagePacks);this.setLanguagePack(o)}setLanguagePack(e){e.forEach(r=>{let n=this.languagePacks.findIndex(o=>o.pyLangCode===r.pyLangCode);n!==-1?this.languagePacks[n]=r:this.languagePacks.push(r)})}},gs=new Cx;var Ix="Accept-Language",k4=(t,e)=>Object.keys(t).some(r=>r.toLowerCase()===e.toLowerCase()),_x=class{externalHeaders;defaultHeaders;SPECIAL_CHARS;constructor(){this.externalHeaders={},this.defaultHeaders={},this.SPECIAL_CHARS={SLASH:"/"}}registerHeader(e,r){return this.defaultHeaders[e]?!1:(this.externalHeaders[e]=r,!0)}unRegisterHeader(e){this.externalHeaders[e]&&delete this.externalHeaders[e]}getRegisteredHeaders(){return{...this.getLocaleHeaders(),...this.externalHeaders}}getLocaleHeaders(){let e=v.getLocale()??v.getUseLocale();return!e||!gs.hasLocalizationBundles(e)||k4(this.defaultHeaders,Ix)||k4(this.externalHeaders,Ix)?{}:{[Ix]: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 r=new URLSearchParams(globalThis.location?.search??""),n=this.buildHeaderMapFromRequestContext(e,r);this.registerHeadersFromMap(n)}buildHeaderMapFromRequestContext(e,r){let n={};return e?.forEach(o=>{Array.isArray(o.IncludeInHeaders)&&o.IncludeInHeaders.forEach(i=>{let s=i.Value,a=r.get(o.Key)??i.defaultValue;a&&(n[s]||(n[s]=[]),n[s].push(`${o.Key}=${a}`))})}),n}registerHeadersFromMap(e){Object.entries(e).forEach(([r,n])=>{n.length>0&&this.registerHeader(r,n.join("; "))})}getDefaultHeaders(){return this.defaultHeaders}addDebugHeaders(e={}){return{[d.COREHEADER_APP_DEBUG_ID]:e.debugId,[d.COREHEADER_APP_DEBUG_LEVELS]:Tr.getDebugLevels()}}getCoreHeadersFromContext(e){if(["root","app"].includes(e)||!e)return;let r=J.getProperty(d.COREHEADERS,"",e);return r?{...r,debugInfo:Tr.getPreviewMode()&&{...r.debugInfo,[d.COREHEADER_APP_DEBUG_LEVELS]:Tr.getDebugLevels()}}:(e=e.substr(0,e.lastIndexOf(this.SPECIAL_CHARS.SLASH)),this.getCoreHeadersFromContext(e))}processCoreHeaders(e,r,n){let o=this.getCoreHeadersFromContext(n);if(o){let i=Object.keys(e);if(i.includes(d.SKIPCOREHEADERS)){delete e[d.SKIPCOREHEADERS];return}let s=Object.assign({},...Object.values(o));Object.keys({...s}).forEach(a=>{i.includes(a)||(e[a]=s[a])})}}injectCoreAdditionalHeaders(e,r,n,o){if(o?.includeRemoteSystemIdIfPresent){let i=r?.caseTypeID?{caseTypeID:r.caseTypeID}:void 0;ae.injectRemoteCaseHeader(e,i,n)}this.processCoreHeaders(e,r,n)}},gie=new _x,Ge=gie;var Ch=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 r=globalThis.PCore?.getEnvironmentInfo().getInactivityTimeout();if(this.timeoutWarned&&($.unsubscribeAllWithEventType(E.PUB_SUB_EVENTS.RESET_TIMER),this.timeoutWarned=!1,this.onWarnedReset?.()),!!r)return e&&clearTimeout(e),this.startInactivityTimeout(r>60?r:60)};startInactivityTimeout=e=>{let r=setTimeout(()=>{$.publish(E.PUB_SUB_EVENTS.TIMEOUT_REMINDER,{timeRemaining:this.expiryBuffer}),clearTimeout(r),$.subscribe(E.PUB_SUB_EVENTS.RESET_TIMER,this.resetInactiveTimeout,"resetCallback"),this.timeoutWarned=!0},(e-this.expiryBuffer)*1e3);return this.setTimerID(r),r}};var bx=class{handlers=[];use(e,r){return this.handlers.push({fulfilled:e,rejected:r}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}forEach(e){for(let r of this.handlers)r!==null&&e(r)}get size(){return this.handlers.filter(e=>e!==null).length}},Tx=bx;var no={ERR_NETWORK:"ERR_NETWORK",ECONNABORTED:"ECONNABORTED",ERR_CANCELED:"ERR_CANCELED",ERR_BAD_REQUEST:"ERR_BAD_REQUEST",ERR_BAD_RESPONSE:"ERR_BAD_RESPONSE"},HC="GET",GC="content-type",vx="accept";var hie=async t=>{let e=await t.text();if(!e||e.trim().length===0)return e;try{return JSON.parse(e)}catch{return e}},yie=async t=>{let e=await t.text();if(!e||e.trim().length===0)return e;try{return JSON.parse(e)}catch{return e}},L4=async(t,e)=>{switch(e){case"json":return hie(t);case"text":return t.text();case"arraybuffer":return t.arrayBuffer();case"blob":return t.blob();case"stream":return t.body;default:return yie(t)}},U4=t=>{let e={};return t.forEach((r,n)=>{e[n]=r}),e};var qC=()=>{let t=new AbortController;return{token:t.signal,cancel(e){t.abort(e)}}},WC=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===no.ERR_CANCELED),j4=(t,e)=>{let r=t!==void 0,n=e!==void 0&&e>0;if(!r&&!n)return;if(!n&&r)return t;let o=n?e:void 0;if(o===void 0)return t;let i=AbortSignal.timeout(o);if(!r)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)},z4=t=>t?.reason==="TimeoutError"||t?.reason instanceof DOMException&&t.reason.name==="TimeoutError"?no.ECONNABORTED:no.ERR_CANCELED;var xa=(t,e,r,n)=>{let o=new Error(t);return o.name="HttpError",o.config=e,o.code=r,o.response=n,o.isAxiosError=!0,o},Rx=(t,e)=>typeof t=="object"&&t!==null&&"name"in t&&t.name===e,Px=t=>typeof t=="object"&&t!==null&&"message"in t&&typeof t.message=="string",F4=t=>t.timeout?`timeout of ${t.timeout}ms exceeded`:"timeout exceeded",Ih=(t={})=>{let e=xa("canceled",t,no.ERR_CANCELED);return e.name="AbortError",e},Da=(t,e)=>{if(e.signal?.aborted){let r=z4(e.signal),n=xa(r===no.ECONNABORTED?F4(e):"canceled",e,r);return n.name=r===no.ECONNABORTED?"TimeoutError":"AbortError",n}if(Rx(t,"TimeoutError")){let r=xa(F4(e),e,no.ECONNABORTED);return r.name="TimeoutError",r}if(Rx(t,"AbortError"))return Ih(e);if(Rx(t,"TypeError")&&Px(t)){let r=xa(t.message||"Network Error",e,no.ERR_NETWORK);return r.isOffline=!navigator.onLine,r}if(Px(t)&&t.message==="Network Offline"){let r=xa("Network Offline",e,no.ERR_NETWORK);return r.isOffline=!0,r}if(Px(t)){let r=xa(t.message,e);return r.cause=t.cause,r}return xa(String(t),e)},V4=(t,e)=>{let r;t.status>=400&&t.status<500?r=no.ERR_BAD_REQUEST:t.status>=500&&t.status<600&&(r=no.ERR_BAD_RESPONSE);let n=xa(`Request failed with status code ${t.status}`,e,r,t);return n.status=t.status,n};var Sie="application/json, text/plain, */*",Eie="application/x-www-form-urlencoded",Aie=["POST","PUT","PATCH"],Cie=/[^\t\x20-\x7e\x80-\xff]+/g,B4=t=>t===" "||t===" ",Iie=t=>{let e=t.replace(Cie,""),r=0,n=e.length;for(;r<n&&B4(e[r]);)r+=1;for(;n>r&&B4(e[n-1]);)n-=1;return e.slice(r,n)},_ie=t=>{let e={};if(!t)return e;let r=new Map;for(let[n,o]of Object.entries(t))if(o!=null){let i=n.toLowerCase(),s=r.get(i)??n;r.set(i,s),e[s]=Iie(String(o))}return e},G4=t=>(typeof t[Symbol.iterator]!="function"&&Object.defineProperty(t,Symbol.iterator,{value(){return Object.entries(this)[Symbol.iterator]()},enumerable:!1,configurable:!0}),t),q4=t=>t instanceof FormData||t instanceof Blob||t instanceof ArrayBuffer||ArrayBuffer.isView(t)||t instanceof URLSearchParams||typeof ReadableStream<"u"&&t instanceof ReadableStream,W4=t=>typeof t=="object"&&t!==null&&!q4(t),H4=(t,e)=>Object.keys(t).find(r=>r.toLowerCase()===e),Nx=(t,e)=>{let r=_ie(t.headers),{body:n}=t;H4(r,vx)||(r[vx]=Sie);let o=H4(r,GC);return n===void 0||n instanceof FormData?o&&delete r[o]:!o&&!(n instanceof URLSearchParams)&&(W4(n)?r[GC]="application/json":Aie.includes(e)&&(r[GC]=Eie)),r},K4=t=>q4(t)||typeof t=="string"?t:JSON.stringify(t),bie=t=>{let e=(t.method??HC).toUpperCase(),r={method:e,headers:Nx(t,e),credentials:t.credentials};t.body!==void 0&&t.body!==null&&e!=="GET"&&e!=="HEAD"&&(r.body=K4(t.body));let n=j4(t.signal,t.timeout);return n&&(r.signal=n),r},J4=async t=>{let e=t.url??"",r=bie(t),n;try{n=await globalThis.fetch(e,r)}catch(s){throw Da(s,t)}let o=U4(n.headers),i;try{i=await L4(n,t.responseType)}catch(s){throw Da(s,t)}return t.headers&&G4(t.headers),{data:i,status:n.status,statusText:n.statusText,headers:o,config:t}},Tie=t=>{let e={};if(!t)return e;let r=t.trim().split(/[\r\n]+/);for(let n of r){let o=n.indexOf(":");if(o>0){let i=n.substring(0,o).trim().toLowerCase(),s=n.substring(o+1).trim();e[i]=s}}return e},Y4=t=>new Promise((e,r)=>{let n=new XMLHttpRequest,o=t.url??"",i=(t.method??HC).toUpperCase();if(n.open(i,o,!0),Object.entries(Nx(t,i)).forEach(([a,c])=>{n.setRequestHeader(a,c)}),t.credentials==="include"&&(n.withCredentials=!0),t.responseType==="arraybuffer"?n.responseType="arraybuffer":t.responseType==="blob"?n.responseType="blob":n.responseType="text",t.onUploadProgress&&n.upload&&n.upload.addEventListener("progress",t.onUploadProgress),t.onDownloadProgress&&n.addEventListener("progress",t.onDownloadProgress),t.signal){if(t.signal.aborted){n.abort(),r(Da(new DOMException("The operation was aborted.","AbortError"),t));return}t.signal.addEventListener("abort",()=>{n.abort(),r(Da(new DOMException("The operation was aborted.","AbortError"),t))},{once:!0})}t.timeout&&t.timeout>0&&(n.timeout=t.timeout),n.ontimeout=()=>{r(Da(new DOMException("The operation timed out.","TimeoutError"),t))},n.onload=()=>{t.headers&&G4(t.headers);let a=Tie(n.getAllResponseHeaders()),c;if(n.responseType==="arraybuffer"||n.responseType==="blob")c=n.response;else{let u=n.responseText;try{c=JSON.parse(u)}catch{c=u}}let l={data:c,status:n.status,statusText:n.statusText,headers:a,config:t};e(l)},n.onerror=()=>{r(Da(new TypeError("Network Error"),t))},n.onabort=()=>{r(Da(new DOMException("The operation was aborted.","AbortError"),t))};let s=t.body!==void 0&&t.body!==null?K4(t.body):null;n.send(s)}),Z4=t=>{let e=(t.method??HC).toUpperCase(),r=Nx(t,e),{body:n}=t,o=t.headers??{},i=Object.keys(o).map(s=>s.toLowerCase());Object.entries(r).forEach(([s,a])=>{i.includes(s.toLowerCase())||(o[s]=a)}),t.headers=o,W4(n)?t.data=JSON.stringify(n):n instanceof URLSearchParams&&(t.data=n.toString())};var Ox=t=>(Object.defineProperty(t,"data",{get:()=>t.body,set:e=>{t.body=e},enumerable:!1,configurable:!0}),t),Q4=t=>{let e=Object.getOwnPropertyDescriptor(t,"data");return e&&"value"in e&&e.value!==void 0&&e.value!==t.body&&(t.body=e.value),Ox(t)};var vie=t=>{if(typeof t!="object"||t===null)return!1;let e=Object.getPrototypeOf(t);return e===null||Object.getPrototypeOf(e)===null},xx=t=>{if(Array.isArray(t))return t.map(xx);if(vie(t)){let e={};return Object.keys(t).forEach(r=>{e[r]=xx(t[r])}),e}return t},Dx=class{interceptors;constructor(){this.interceptors={request:new Tx,response:new Tx}}async request(e){let r=Ox({...e,...e.body!==void 0&&{body:xx(e.body)}}),n=[s=>this.dispatchRequest(s),void 0];this.interceptors.request.forEach(s=>{n=[s.fulfilled,s.rejected,...n]}),this.interceptors.response.forEach(s=>{n=[...n,s.fulfilled,s.rejected]});let o=Promise.resolve(r),i=0;for(;i<n.length;)o=o.then(n[i],n[i+1]),i+=2;return await o}async dispatchRequest(e){let r=Q4(e);if(typeof r.adapter=="function")return Z4(r),r.adapter(r);let n;if(r.onUploadProgress||r.onDownloadProgress?n=await Y4(r):n=await J4(r),n.status>=200&&n.status<300)return n;throw V4(n,r)}get(e,r){return this.request({...r,url:e,method:"GET"})}post(e,r,n){return this.request({...n,url:e,method:"POST",body:r})}put(e,r,n){return this.request({...n,url:e,method:"PUT",body:r})}patch(e,r,n){return this.request({...n,url:e,method:"PATCH",body:r})}delete(e,r){return this.request({...r,url:e,method:"DELETE"})}static createCancelSource(){return qC()}static isCanceled(e){return WC(e)}},Rie=new Dx,KC=Rie;var zd="updateSession",Pie=t=>typeof t!="object"||t===null||!("caseTypeID"in t)?!1:typeof t.caseTypeID=="string",_h=t=>typeof t=="object"&&t!==null,eV=t=>Pie(t)?{caseTypeID:t.caseTypeID}:void 0,Nie=t=>{if(!_h(t))return!1;let{caseInfo:e}=t;return _h(e)?"errorMessage"in e:!1},hs={},Vd=new mU,ll={},Ei={},$x={},Mx="",wx=new Ch(()=>hU(Ei,Vd)),tV=t=>{ll=t},Oie=t=>!t||typeof t!="object"?!1:"continueWithDefaultErrorHandler"in t||"error"in t,rV=t=>{let{context:e}=t??{};if(typeof e=="string")return e},xie=t=>_h(t)&&"config"in t,Die=t=>_h(t),wie=t=>t.code==="ERR_NETWORK"||t.code==="ECONNABORTED"||t.message==="Network Offline"||t.isOffline===!0,$ie=t=>t.message!=="Network Offline"&&!!W(d.APP.APP)?.context_data?.isOffline,Mie=t=>!!(t.response&&t.response.status===401&&!t.config?.isExternalUrl&&(!t.config||!ra(t.config.url,Ei))),kie=t=>t.response&&t.response.status&&t.response.status===Number(Mx)?Mx:null,JC=t=>{let e=rV(t.config?.headers);return wie(t)?(W(e)?.isLoading&&T({type:Ro,payload:{context:e}}),sU(),Promise.reject(new Error("Network Offline"))):($ie(t)&&aU(),!t.response&&t.cause?.response&&(t.response=t.cause.response),Mie(t)&&$.subscribe(zd,r=>{Vd.setUpdateSessionStatus(!r.updateStatus)},zd),M4(t,Vd,Ei,kie(t)))},Lie=(t,e)=>{if(typeof e=="boolean")return e?JC(t):Promise.reject(t);if(Oie(e)){let r=e.error??t;return e.continueWithDefaultErrorHandler??!0?JC(xie(r)?r:t):Promise.reject(r)}return JC(t)},Uie=t=>typeof t=="function",jie=t=>typeof t=="function",zie=t=>{$.publish(d.PUB_SUB_EVENTS.FETCH_SUCCESS,t)},Fie=t=>{$.publish(d.PUB_SUB_EVENTS.FETCH_FAILURE,t)},Vie=t=>{if(t?.authType==="OAuth2.0"&&t.secureCookie||t.customCookies)return!0},yt=()=>v.environmentInfoObject?.["protocol-jsonrpc"]===!0,Fd=t=>typeof t=="object"&&t!==null,Bie=t=>Fd(t)?Object.entries(t).filter(e=>e[0].toLowerCase()==="etag"&&typeof e[1]=="string").map(([,e])=>e)[0]:void 0,kx=t=>{let e=t.content?.find(c=>c.type==="text")?.text;if(t.isError)throw new Error(e||"MCP tool call failed");let r;if(e)try{r=JSON.parse(e)}catch(c){if(!(c instanceof SyntaxError))throw c;r=e}let n=Fd(r)&&"Response"in r?r.Response:r,o=Fd(n)&&Fd(n.outputs)?n.outputs:void 0,i=[o,n].map(Bie).find(c=>c!==void 0),s=Fd(n)?n.ViewResponse:void 0;return{data:[o?.ViewResponse,o?.ShowPageResponse,o?.PageResponse,o?.Component,o?.responseData,s].find(c=>Fd(c)||typeof c=="string")??n,etag:i}},Hie=(t,e)=>{let r=()=>e.abort();return t.aborted?(r(),()=>{}):(t.addEventListener("abort",r),()=>t.removeEventListener("abort",r))},Gie=new Set(["openAssignment","createWork","openWorkByHandle","caseWideActions","getNextWork","finishAssignment","save","navigateToStep","refreshAssignmentData","recalculateAssignmentData","openStage","executeCaseWideActions","refreshCaseData","recalculateCaseData"]),qie=new Set(["context","authorization","pzctkn"]),Wie=(t,{headers:e,...r})=>{if(!Gie.has(t)||typeof e!="object"||e===null)return r;let n=Object.fromEntries(Object.entries(e).filter(([o,i])=>!qie.has(o.toLowerCase())&&typeof i=="string"&&i!==""));return Object.keys(n).length>0?{...r,headers:n}:r},tr=async(t,e,r,n)=>{let o=new AbortController,i=r?Hie(r,o):void 0;try{if(o.signal.aborted)throw Ih();let s={name:w4(),arguments:{ActionName:t,Payload:JSON.stringify(Wie(t,e))}},a={...r&&{signal:o.signal},...n!==void 0&&{timeout:n}},c=await(Object.keys(a).length>0?Ah.callTool(s,a):Ah.callTool(s)),{data:l,etag:u}=kx(c);return{data:l,status:200,statusText:"OK",headers:u?{etag:u}:{},config:{url:t}}}catch(s){throw o.signal.aborted?Ih():s}finally{i?.()}},Kie=t=>{if(typeof t!="object"||t===null||Array.isArray(t))return!1;let e=Object.getPrototypeOf(t);return e!==Object.prototype&&e!==null},YC=({body:t,responseType:e,adapter:r})=>(e===void 0||e==="json")&&r===void 0&&!Kie(t),ZC=t=>{if(typeof t!="string")return t;try{return JSON.parse(t)}catch{return t}},ai=(t,e="root",r={})=>{let{Authorization:n,pzCTkn:o,...i}=t.headers||{};if(t.withoutDefaultHeaders)return i;Ge.injectCoreAdditionalHeaders(i,eV(t.body),e,{includeRemoteSystemIdIfPresent:r.includeRemoteSystemIdIfPresent??!0});let s={...Ge.getDefaultHeaders(),...Ge.getRegisteredHeaders(),...i,context:e};return delete s.Authorization,delete s.pzCTkn,s},M=(t,e,r="root",n={})=>{let{doNotMergeHttpMessagesForStatusCode:o=null,cancelContext:i=r,includeRemoteSystemIdIfPresent:s=!0}=n;Mx=o,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,...m}=e,{Authorization:f,pzCTkn:h,...S}=e.headers||{};if(!p){let I=eV(e.body);Ge.injectCoreAdditionalHeaders(S,I,r,{includeRemoteSystemIdIfPresent:s})}i&&hs[i]>=0?hs[i]+=1:i&&hs[i]===void 0&&(hs[i]=1);let A=p?{...S}:{...Ge.getDefaultHeaders(),...Ge.getRegisteredHeaders(),...S,context:r};m.isExternalUrl=dU(t||""),m.fetchTimeStamp=Date.now();let C=ye.doesRestApiExist("Logout")?ye.getRestEndPoint("Logout")?.restApi:void 0,_=WS(t,C);return t&&ra(t,Ei)&&Vd.getUpdateSessionStatus()||!Vd.getUpdateSessionStatus()||m.isExternalUrl||_?(ra(t,Ei)&&Ei?.authType==="OAuth2.0"&&(A={...S}),(!C||t&&!_)&&wx.setTimerID(wx.resetInactiveTimeout(wx.getTimerID())),Eb(q(KC.request({context:r,...m,url:t??void 0,body:a,...c&&{signal:c},responseType:l,adapter:u,headers:A,credentials:Vie(Ei)?"include":void 0})).pipe(Ib(()=>{let I=Ge.getCoreHeadersFromContext(A.context);I&&zie({...I})}),Gi(I=>{let N=A,H=!!N?.[d.COREHEADER_APP_DEBUG_ID]?{debugInfo:{[d.COREHEADER_APP_DEBUG_ID]:N?.[d.COREHEADER_APP_DEBUG_ID],[d.COREHEADER_APP_DEBUG_LEVELS]:Tr.getDebugLevels()}}:Ge.getCoreHeadersFromContext(A.context);throw H&&Fie({...H,error:I}),I})))):Nm(t,e,r,Vd)},Nm=(t,e,r,n)=>new Promise((o,i)=>{$.subscribe(zd,s=>{if(n.setUpdateSessionStatus(!s.updateStatus),s.updateStatus==="success")M(t,e,r).then(o).catch(i);else{let{updateStatus:a}=s;i(_h(a)?a.error:void 0)}},zd)}),X4=t=>{hs[t]>0&&(hs[t]-=1,hs[t]===0&&delete hs[t])};KC.interceptors.request.use(t=>{if(!Mo.isOnline())return W(t.context)?.isLoading&&T({type:Ro,payload:{context:t.context}}),T({type:js,payload:{context:"app"}}),Promise.reject(new Error("Network Offline"));if(ll?.request){let e=ll.request;Uie(e)&&(t=e(t))}return t},t=>Promise.reject(t));KC.interceptors.response.use(t=>{if(t.status===202&&t.config.headers?.context&&Nie(t.data)){let e=[{type:"error",message:String(t.data.caseInfo.errorMessage)}],r=t.config.headers.context;return r&&r.includes("/workarea")&&(r=r.substring(0,r.lastIndexOf("/workarea"))),Nn({messages:e,category:"HTTP",context:r}),Promise.reject(t)}if(t.config.headers&&t.config.headers.context){let e=t.config.headers.context;t.config.skipClearErrorMessages||(qt({type:"error",category:"HTTP",context:e}).length>0&&dt({type:"error",category:"HTTP",context:e}),qt({type:"error",category:e===d.APP.APP?"PAGE":"",context:e}).length>0&&dt({type:"error",category:"PAGE",context:e}),e.slice(e.lastIndexOf("/")+1).startsWith("primary")&&(qt({type:"error",category:"HTTP",context:d.APP.APP}).length>0&&dt({type:"error",category:"HTTP",context:d.APP.APP}),qt({type:"error",category:"PAGE",context:d.APP.APP}).length>0&&dt({type:"error",category:"PAGE",context:d.APP.APP}))),X4(e)}if(ll?.response){let e=ll.response;jie(e)&&(t=e(t))}return t},t=>{if(!Die(t))return Promise.reject(t);let e=rV(t.config?.headers);return e&&X4(e),ll?.error?Promise.resolve(ll.error(t)).then(r=>Lie(t,r)):JC(t)});var nV=t=>hs[t],hu=()=>qC(),KS=t=>WC(t),Jn=t=>{Ge.setDefaultHeaders(t)},Ji=t=>{Ei={...Ei,...t}},cU=t=>{$x={...$x,...t}},lU=()=>({...$x}),Pm=()=>({...Ei});var Lx=class t{static createCase(e,r){let{caseInfo:n,startingFields:o,flowType:i,viewType:s=it.PAGE,pageName:a,context:c=d.APP.APP,debugInfo:l,headers:u,theType:p,retrieveActionViewForNewObject:m=!1,scope:f}=r,h={};n&&n.content&&(h=n.content);let{content:S={},pageInstructions:A}=t.getExternalCaseOrObjectContent(e,m,c),C={[t.getKeyBasedOnWorkType(e)]:e,content:{...h,...o,...S}};if(C={...C,...A&&{pageInstructions:A},...!B.isObjectCaseType(e)&&{processID:i}},p==="CREATE_EXTERNAL_CASE"){let I=W(c)?.caseInfo?.content;if(I&&Object.keys(I).length>0){let N=f?.Namespace&&f?.RuleResolutionID?{...I,[d.getDefaultQualifiedName("Scope")]:{[d.getDefaultQualifiedName("Namespace")]:f.Namespace,[d.getDefaultQualifiedName("RuleResolutionID")]:f.RuleResolutionID}}:I,x=g.pruneKeys(N,new Set(["pxObjClass",P.getDefaultQualifiedName("pxObjClass"),"EmbedListUUID__",P.getDefaultQualifiedName("EmbedListUUID__")]),!1);C.content[d.getDefaultQualifiedName("pyAddCaseContextPage")]=x}}let _=t.getObjectTypeViewPayload(m,e);return ve(B.getRouteKeyForCreateWork(e,m),{body:C,queryPayload:{..._,...B.isExternalCaseType(e)?{casetypeID:e}:{caseClassName:e},viewType:s,params:{pageName:a}},headers:{...u,...l&&{...Ge.addDebugHeaders(l)}}},c).then(I=>({response:I.data,requestPayload:C,headers:$e(I.headers,e,u)}))}static getObjectTypeViewPayload=(e,r)=>e?B.shouldUseUnifiedHandling()?{casetypeID:r,actionID:d.getDefaultQualifiedName(d.VIEW_NAMES.OBJECT_CREATE_VIEW)}:{objectTypeID:r,actionID:d.getDefaultQualifiedName(d.VIEW_NAMES.OBJECT_CREATE_VIEW)}:{};static getExternalCaseOrObjectContent=(e,r,n)=>{let o=B.isExternalObject(e),i=B.isExternalCaseType(e);if((i||o)&&!r){let s=Rt(n,{isExternalObject:!!(!i&&o)}),{content:a,pageInstructions:c}=s.content;return{content:a,pageInstructions:c}}return{}};static getKeyBasedOnWorkType=e=>B.shouldUseUnifiedHandling()?"caseTypeID":B.isObjectCaseType(e)?"objectTypeID":"caseTypeID"},Ai=Lx;var Jie=()=>({registerHeader:(...t)=>Ge.registerHeader(...t),unRegisterHeader:(...t)=>Ge.unRegisterHeader(...t),getRegisteredHeaders:()=>Ge.getRegisteredHeaders()}),ve=(t,{body:e={},queryPayload:r={},cancelTokenSource:n,headers:o={},responseType:i},s,a)=>{if(yt()&&YC({body:e,responseType:i}))return tr(t,{queryPayload:r,body:ZC(e),headers:o},n?.token);let{restApi:c,reqType:l}=U(t,r),u={method:l,headers:o,body:e,...i&&{responseType:i}};n&&(u.signal=n.token);let p=t==="createWork"?B.appendExcludeQueryParamToUrl(c):c;return M(p,u,s,a??{})},vT=(t,{method:e="GET",body:r={},headers:n={},withoutDefaultHeaders:o=!1,responseType:i,adapter:s,signal:a},c)=>{t.startsWith("http:")||t.startsWith("https:")||(t=gt.getServerURL()+t);let l={method:e,headers:n,body:r,withoutDefaultHeaders:o,...i&&{responseType:i},...s&&{adapter:s},...a&&{signal:a}};return M(t,l,c)},na=t=>ye.doesRestApiExist(t),Ci=()=>hu(),bh=t=>KS(t),Yie=t=>{tV(t)},Zie=()=>Ai;var Ux=new Set;function oV(){Ux.clear()}function Th(t){try{let e=new URL(t);(e.protocol==="https:"||e.protocol==="http:")&&Ux.add(e.origin)}catch{}}function iV(t){let e;try{let n=globalThis.location;e=n?new URL(t,n.href).origin:new URL(t).origin}catch{throw new Error("Blocked: malformed URL")}let r;try{let n=globalThis.location;r=n?.origin??(n?new URL(n.href).origin:"")}catch{r=""}if(e!==r&&!Ux.has(e))throw new Error(`Blocked: untrusted script origin "${e}"`)}var sV="getCustomComponent",Qie="getBinaryFile",Xie="getOperatorImage",XC="text/javascript",ese=100,aV=3e4,cV=t=>{let e=document.createElement("script");e.type=XC,e.textContent=t,document.head.appendChild(e)},mV=t=>{let e=atob(t),r=new Uint8Array(e.length);for(let n=0;n<e.length;n+=1)r[n]=e.charCodeAt(n);return r},tse=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(mV(t))},rse=12e4,lV=Promise.resolve(),nse=t=>{let e=lV.then(t);return lV=e.catch(()=>{}),e},uV=async(t,e)=>{let r=Object.entries(e).filter(([,i])=>i);if(yt()){let i=await nse(()=>tr(sV,{queryPayload:{componentName:t,...Object.fromEntries(r)},body:{},headers:{}},void 0,rse));return tse(i.data)}let n=r.map(([i,s])=>`${i}=${s}`).join("&");return(await ve(sV,{queryPayload:{componentName:n?`${t}?${n}`:t}})).data},fV=new Set(["jpg","jpeg","png","gif","webp","bmp","tif","tiff","svg","ico","heic","heif","avif"]),ose=/^DATA-CONTENT-IMAGE\s+[^!]+!([^!]+)!\/OPERATORIMAGES\/$/i,dV=/url\(\s*(?:(['"])([^'"\r\n]+)\1|([^'"\s)][^'"\r\n]*?))\s*\)/gi;function gV(t){return t.toLowerCase().split("!").pop()||""}function jx(t){return t.includes("?")||t.includes("#")?!1:fV.has(gV(t))}function ise(t){let e=t.match(ose);return e?fV.has(e[1].toLowerCase()):jx(t)}function pV(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 zx=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(r=>r.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,r={}){let n="",o=0;return e.forEach(i=>{n+=`${o===0?"?":"&"}field${o}=${i.field}&value${o}=${i.value}`,o+=1}),this.pegaOnlyUrl?this.getSvcComponentsConfigSeparatedUrls(e,n,r):this.getSvcComponentsConfigCombinedUrl(e,n,r)}async getSvcComponentsConfigSeparatedUrls(e,r,n){let o=v.getBuiltOnAppNames(),i=this.loadAndFilterPegaComponentsConfig(e,o),s=Promise.resolve([]);n.skipLoadCustomerComponents!==!0&&(s=this.loadAndCustomerComponentsConfig(r,e));let a=[];if(v.environmentInfoObject?.pyInfinityStaticService){let l=[],u=await Promise.all([i,s]),[p,m]=u,f=[];for(let S of m)S.isSdkOverridden===!0?l.push(S.componentDefinition):f.push(S.componentDefinition);let h=this.mergeComponentList([p,f,l]);a.push(...h)}else{let l=this.fetchSDKComponent(r);await Promise.all([i,s,l]).then(u=>{let p=this.mergeComponentList(u);a.push(...p)})}if(n.alternateDesignSystemURL&&a.length===1){let l=await this.getSvcComponentsConfigADS(e,r,n);a[0].alternateDesignSystemConfig=l}return{data:{components:a}}}mergeComponentList=e=>{let[r=[],n=[],o=[]]=e,i="alternateDesignSystemConfig",s=[...r,...n];return this.appStaticUrl?s.map(a=>{let{name:c,type:l,subtype:u}=a,p=o.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 r=`${this.appStaticUrl}v102/${this.appAlias}/componentslist-ext${e}`;return fetch(r,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then(n=>n.json()).then(n=>n.components).catch(()=>[])}return Promise.resolve([])}async loadAndFilterPegaComponentsConfig(e,r){return this.loadPegaComponentsConfig().then(()=>{let n=[];return this.componentsConfig&&this.componentsConfig.forEach(o=>{let i=!0;e.forEach(s=>{Array.isArray(o[s.field])?o[s.field].includes(s.value)||(i=!1):o[s.field]!==s.value&&(i=!1)}),i&&this.checkForBuiltOnSupport(r,o.allowedApplications)&&n.push(o)}),n})}async loadPegaComponentsConfig(){let e=null;if(this.componentsConfig===null){let r=`${this.staticServerURL}components/componentsconfig.json?v=${new Date().getTime()}`;e=fetch(r,{method:"GET"}).then(n=>n.json()).then(async n=>{this.componentsConfig=n,this.ccV2LibId&&await this.loadLibraryComponentsConfig(this.ccV2LibId).then(o=>{o&&o.length>0&&(this.componentsConfig=(this.componentsConfig||[]).concat(o))}).catch(o=>{console.error(`Exception while appending custom component config from library ${this.ccV2LibId} : ${o}`)})}).catch()}else e=Promise.resolve();return e}async loadLibraryComponentsConfig(e){let r=null;return r=fetch(`${this.appStaticUrl}v100/componentlib/componentsconfig/${e}?v=${Date.now()}`,{headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then(n=>{if(!n.ok)throw console.error("Error while fetching custom component config/library component config"),new Error(n.statusText);return n}).then(n=>n.json()).then(n=>Promise.resolve(n)).catch(n=>(console.error(`Exception while fetching custom component config from library ${e} : ${n}`),{error:n.message})),r}async loadAndCustomerComponentsConfig(e,r){let n=null;if(v.environmentInfoObject?.pyInfinityStaticService){let i={};r.forEach((s,a)=>{i[`field${a}`]=s.field,i[`value${a}`]=s.value}),n=PCore.getDataPageUtils().getDataAsync(P.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}`;n=fetch(i,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then(s=>s.json()).then(s=>s.components).catch(()=>[])}else n=Promise.resolve([]);return n}checkForBuiltOnSupport(e,r){if(!e||!r||e.length===0||r.length===0)return!0;let n=e.split(",");return n.length===0?!0:n.some(o=>r.includes(o))}async getSvcComponentsConfigCombinedUrl(e,r,n){let o=`${this.staticServerURL}v102/${this.appAlias}/componentslist${r}`,i=await fetch(o,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then(s=>s.json()).then(s=>({data:s}));if(n.skipLoadCustomerComponents===!0&&i?.data?.components?.length>0&&(i.data.components=i.data.components.filter(s=>s.componentKey===void 0)),n.alternateDesignSystemURL&&i?.data?.components?.length===1){let s=await this.getSvcComponentsConfigADS(e,r,n);i.data.components[0].alternateDesignSystemConfig=s}return i}getSvcComponentsConfigADS(e,r,n){let o=`${n.alternateDesignSystemURL}${n.alternateDesignSystemURL?.endsWith("/")?"":"/"}components/${e[0].value}/config-ext.json`;return fetch(o,{method:"GET"}).then(i=>{if(i.ok)return i.json();throw new Error(i.statusText)}).catch(i=>({error:i.message}))}getSvcImage(e){let r=`${this.appStaticUrl}v102/${this.appAlias}/image/${e}`;return fetch(r,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then(n=>n.blob()).catch()}getSvcImageUrl(e){try{let r=v.environmentInfoObject?.pyInfinityStaticService,{callUrlKey:n,queryPayload:o,callUrl:i}=this.buildImageRequest(e,r);return ise(e)?(this.imageBlobUrlCache[i]||(this.imageBlobUrlCache[i]=this.fetchImage(n,o,i,r)),this.imageBlobUrlCache[i]):Promise.resolve("")}catch{return Promise.resolve(null)}}buildImageRequest(e,r){let n=Qie,o,i=`${this.appStaticUrl}v102/${this.appAlias}/image/${e}`;if(r){let s=/DATA-CONTENT-IMAGE\s([^!]*)!.*\/OPERATORIMAGES\//i,a=e.match(s);if(a){let c=a[1]?.trim();if(c)n=Xie,o={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 o={fileID:e};i=U(n,o)?.restApi||i}return{callUrlKey:n,queryPayload:o,callUrl:i}}fetchImage(e,r,n,o){return o?ve(e,{queryPayload:r}).then(i=>{let s=this.decodeBase64ToByteArray(i.data),a=this.getMimeTypeFromKey(r?.fileID||r?.user_ID||""),c=new Blob([s],{type:a});return window.URL.createObjectURL(c)}).catch(i=>{throw console.error("Error fetching image:",i),i}):fetch(n,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then(i=>i.blob()).then(i=>window.URL.createObjectURL(i)).catch()}decodeBase64ToByteArray(e){return mV(e)}getMimeTypeFromKey(e){let r={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"},n=gV(e);return r[n]?r[n]:"application/octet-stream"}isStaticContentReference(e){let r=e.trim();return!r||/^[a-z][a-z\d+.-]*:/i.test(r)||r.startsWith("//")?!1:g.isWebFilePath(r)}async resolveImageSource(e){if(!this.isStaticContentReference(e))return typeof e=="string"?e:"";let r=g.normalizeStaticContentKey(e);if(!jx(r))return"";let n=await this.getSvcImageUrl(r);return typeof n=="string"&&n?n:""}async resolveBackgroundImage(e){let r=await Promise.all([...e.matchAll(dV)].map(async([n,,o,i])=>{let s=o??i;if(!s||!this.isStaticContentReference(s))return n;if(!jx(g.normalizeStaticContentKey(s)))return"none";let a=await this.resolveImageSource(s);return a?n.replace(s,a):"none"}));return e.replace(dV,n=>r.shift()??n)}async resolveThemeBackgroundImages(e){if(!this.themeHasBackgroundImage(e))return e;if(Array.isArray(e))return Promise.all(e.map(r=>this.resolveThemeBackgroundImages(r)));if(e&&typeof e=="object"){let r=await Promise.all(Object.entries(e).map(async([n,o])=>[n,await this.resolveThemeBackgroundImages(o)]));return Object.fromEntries(r)}return typeof e=="string"&&e.includes("url(")?this.resolveBackgroundImage(e):e}themeHasBackgroundImage(e){return Array.isArray(e)?e.some(r=>this.themeHasBackgroundImage(r)):e&&typeof e=="object"?Object.values(e).some(r=>this.themeHasBackgroundImage(r)):typeof e=="string"&&e.includes("url(")}getSvcLocale(e,r){let n=`${this.appStaticUrl}v102/${this.appAlias}/locales/${e}/${r}`;return fetch(n,{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(r=>r.json()).catch(()=>[])}async getSvcComponent(e){try{let r=v.environmentInfoObject?.pyC11nDXCBDevURL;if(r){let i=r.replace(/\/+$/,"");pV(i);let s=await fetch(`${i}/index.js`);if(!s.ok)throw new Error(s.statusText);return await s.text()}if(v.environmentInfoObject?.pyInfinityStaticService||yt()){let i=v.environmentInfoObject?.pxApplication?.pxUpdateDateTime,s=i?g.parsePegaDateTimeToTimestamp(i):null;return await uV(e,{v:s})}let o=await fetch(`${this.appStaticUrl}v102/${this.appAlias}/component/${e}`,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}});if(!o.ok)throw new Error(o.statusText);return await o.text()}catch(r){throw console.error("Error fetching service component:",r),r}}async importCustomComponentMap(e,r){try{let n=v.environmentInfoObject?.pyInfinityStaticService||yt(),o=v.environmentInfoObject?.pyC11nDXCBDevURL,i=`${this.appStaticUrl}v100/componentlib/componentsmap/${e}`;if(o&&(pV(o),i=`${o.replace(/\/+$/,"")}/index.js`),n&&!o){let c=v.environmentInfoObject?.pxApplication?.pxUpdateDateTime,l=await uV(e,{v:g.parsePegaDateTimeToTimestamp(c),libV:g.parsePegaDateTimeToTimestamp(r)});await this.appendCustomScriptToHead(l);return}if(n||o){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}`))},aV);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(n){console.error("Exception while appending custom component map (or load blocked):",n)}}async appendCustomScriptToHead(e){if(!(typeof document>"u"))try{if(yt()){cV(e);return}await new Promise((r,n)=>{let o=document.createElement("script");o.src=window.URL.createObjectURL(new Blob([e],{type:XC}));let i=setTimeout(()=>{n(new Error("Timed out waiting for custom component script to load"))},aV);o.onload=()=>{clearTimeout(i),r()},o.onerror=()=>{clearTimeout(i),n(new Error("Error while appending custom component map"))},document.head.appendChild(o)})}catch(r){console.error("Exception appendCustomScriptToHead:",r)}}loadSvcComponent(e){return new Promise((r,n)=>{this.getSvcComponent(e).then(o=>{if(typeof document>"u"){n(e);return}if(yt()){cV(o),r(e);return}let i=document.createElement("script");i.src=window.URL.createObjectURL(new Blob([o],{type:XC})),i.onload=()=>r(e),i.onerror=()=>n(e),document.head.appendChild(i)}).catch(o=>{console.error(`Failed to load service component ${e}:`,o),n(e)})})}initServer(e,r,n){console.log(`asset-loader.initServer(${e}, ${r})`),this.appStaticUrl=null,this.staticServerURL=null,this.pegaOnlyUrl=!1,this.componentsConfig=null,this.isolationID=null,this.isolationAssetBlobCache=new Map,oV(),e&&r&&r!=="no-appstatic"&&r!=="no-cdn"?(this.appStaticUrl=r.endsWith("/")?r:`${r}/`,this.staticServerURL=e.endsWith("/")?e:`${e}/`,this.pegaOnlyUrl=!0,Th(this.staticServerURL),Th(this.appStaticUrl)):e&&r&&r==="no-appstatic"?(this.staticServerURL=e.endsWith("/")?e:`${e}/`,this.appStaticUrl=this.staticServerURL,this.pegaOnlyUrl=!0,Th(this.staticServerURL)):e&&r&&r==="no-cdn"&&(this.staticServerURL=e.endsWith("/")?e:`${e}/`,this.appStaticUrl=this.staticServerURL,Th(this.staticServerURL)),console.log(`asset-loader.initServer() staticServerURL=${this.staticServerURL}, appStaticUrl=${this.appStaticUrl}, pegaOnlyUrl=${this.pegaOnlyUrl})`),this.b2sJWT=n}register(e,r){this.loaderObj[e]=r}getLoader(e){let r;return e?r=this.loaderObj[e]:r=(o,i)=>new Promise((s,a)=>{if(typeof document>"u"){a(o);return}let c=document.createElement(i);if(i==="script"){let l=c;l.onload=()=>{s(o)},l.onerror=()=>{a(o)},l.type=XC,l.charset="UTF-8",l.async=!1,l.src=o}else{let l=c;l.type="text/css",l.rel="stylesheet",l.href=o}document.head.appendChild(c)}).catch(s=>{console.log(s)}),r}loadAssets(e,r){let{isDevServerMode:n}=r;if(!e)return Promise.resolve();let o=[];return e.forEach(i=>{let s=Object.keys(i)[0],a=n?Object.values(i)[0]:this.getStaticServerUrl();a=a.endsWith("/")?a:`${a}/`,!this.loadedAssets[s]&&(s.includes(".js")?o.push(this.getLoader()(a+s,this.getTypes.SCRIPT)):s.includes(".css")&&this.getLoader()(a+s,this.getTypes.STYLE),this.loadedAssets[s]=!0)}),Promise.all(o)}getAssetsFromIsolations(e){let r=this.getIsolationID(),{restApi:n,reqType:o}=Nc("getAssetsFromIsolations",{isolationID:r,assetPath:e})||{},i=`${this.appStaticUrl}${n}`,s=this.isolationAssetBlobCache.get(i);if(s)return this.isolationAssetBlobCache.delete(i),this.isolationAssetBlobCache.set(i,s),s;let a=fetch(i,{method:o,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>ese;){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,"/")||"",r=decodeURIComponent(globalThis.atob(e).split("").map(o=>`%${`00${o.charCodeAt(0).toString(16)}`.slice(-2)}`).join("")),n=JSON.parse(r);this.isolationID=n?.tenant_id}return this.isolationID}},Be=new zx;var Fx=class{c11nEnv;constructor(e){this.c11nEnv=e}validate(e,r){let{value:n}=this.c11nEnv.getStateProps();if(!r&&(r=n,!r)){let s=this.c11nEnv.getComponentConfig(),a=this.c11nEnv.getStateProps();s.selectionMode==="multi"?r=a.selectionList:s.renderMode==="Editable"?r=a.referenceList:s.selectionMode==="single"?r=a.selectionKey:r=a.value}let o=wj(this.c11nEnv.getContextName(),this.c11nEnv.getPageReference(),r),{message:i}=Dt.validate(this.c11nEnv.getComponentName()?.toLowerCase(),r,e,o);return i?{status:!1,message:i}:{status:!0}}validateEmail(e,r={}){let n=Dt.getValidator("email");if(!n)return{status:"success"};let o=n(e,r);return o?{status:"failure",message:o}:{status:"success"}}},hV=Fx;var yV=(t,e,r,n,o)=>{if(o!==d.RESOURCE_STATUS.CREATE)return;ke.isStateMachineExist(t,e,r)||ke.setStateMachine(t,r,e,new Cc(r,e,t)),ke.getStateMachine(t,e,r).insert({},typeof n=="string"?n:n+1,!0,{isDefault:!0})},SV=(t,e,r,n,o)=>{typeof e=="string"&&t.data?.caseInfo?.content&&r&&(n==="CREATE"||n==="UPDATE")&&(t.data.caseInfo.content[o][e][r]=e)},EV=t=>{let e=!t.isLocalAction&&t.editType===d.ACTION;return{...e?{}:{activeActionID:t.actionID},assignments:[{ID:t.assignmentID,...e?{actions:[{ID:t.actionID}]}:{}}]}},AV=t=>{let{CASE_INFO:e}=E,r=(o,i)=>J.getPropertyValue(o,"",i),n=r(d.CONTEXT_DATA_MODAL_VIEW.PARENT_CONTEXT,t);for(;n;){let o=r(e.ASSIGNMENT_ID,n),i=r(e.ACTIVE_ACTION_ID,n),s=r(e.ASSIGNMENTACTION_ID,n);if(o||i||s)return{assignmentID:o,activeActionID:i,assignmentActionID:s,isLocalAction:r(e.IS_LOCAL_ACTION,n)};n=r(d.CONTEXT_DATA_MODAL_VIEW.PARENT_CONTEXT,n)}};var eI="OPEN_PROCESS_ACTION";var wa="OPEN_ASSIGNMENT";var vh="DELETE_CASE_IN_CREATE_STAGE",CV=t=>({type:vh,payload:t});var Ii="SAVE_AND_CLOSE",ul=t=>({type:Ii,payload:t});var sse="DELETE_DATA_OBJECT",IV=t=>({type:sse,payload:t});var Vx="DELETE_WORK",Bx=t=>({type:Vx,payload:t});var Hx=class{static getSavableDataPage(e){return Gx(e)}static getLookUpDataPage(e){return Wx(e)}static getLookUpDataPageInfo(e){return Kx(e)}static getDataPageKeys(e){return qx(e)}},_i=Hx;var Jx=class{static getPropertyName(e){return fe.getPropertyName(e)}static isProperty(e){return fe.isProperty(e)}static getLeafPropertyName(e){return fe.getLeafPropertyName(e)}static isPropertyInternal(e){return e.startsWith("px")||e.startsWith("pz")}},Ir=Jx;var Yx=class t{static createContainerPConnect(e,r,n,o=!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,r);if(!m)return null;let h={meta:u,options:{context:p,pageReference:f||r,containerName:n,containerItemID:a,parentPageReference:r,hasForm:o||n===ge.WORKAREA||n===ge.MODAL||m===d.CREATE_DETAILS_VIEW_NAME,target:l}};return ct(h).getPConnect}}return null}static processRootViewDetails(e,r,n){let{config:{context:o,name:i}={}}=e,{context:s}=r,a=i,c=o,l=Ir.isProperty(i),u=Ir.isProperty(o);if(u){let p=Ir.getPropertyName(o);c=re(`.${p}`,p.startsWith(".")?n:"",s)}if(c||(c=n),l){let p=Ir.getPropertyName(i);a=re(`.${p}`,c,s)}return l&&u&&a!==""&&(a=i,c=o),{viewName:a,viewContext:c}}static addFlowContainerItem(e){let r=e.getContainerManager(),n=e.getContextName(),o=e.getValue("context_data.caseViewMode"),i,s;if(o!=="review"){let a=n.substring(0,n.lastIndexOf("_")),c=se(a),l=We(a,c);l&&({key:i,flowName:s}=l)}r.addContainerItem({semanticURL:"",key:i,flowName:s,caseViewMode:"perform",resourceType:"ASSIGNMENT",data:e.getDataObject(n)})}static hasContainerItems=e=>{let r=e.getContextName(),n=e.getContainerName();return PCore.getContainerUtils().hasContainerItems(`${r}/${n}`)};static hasGetNextWorkLinks=e=>e.getValue(d.CASE_INFO.GETNEXTWORK);static getActiveCaseActionName=e=>{let r=e.getValue(d.CASE_INFO.CASE_INFO_ACTIONS),n=e.getValue(d.CASE_INFO.ACTIVE_ACTION_ID);return r.find(i=>i.ID===n)?.name||""};static getFirstCaseActionName=e=>e.getValue(d.CASE_INFO.CASE_INFO_ACTIONS)[0]?.name||"";static hasNotificationMessages=e=>!!e.getValue("caseMessages");static isCaseWideLocalAction=e=>{let r=e.getValue(d.CASE_INFO.ACTIVE_ACTION_ID),n=e.getValue(d.CASE_INFO.CASE_INFO_ACTIONS);return n&&r?n.find(i=>i.ID===r)?.type==="Case":!1};static getChildCaseAssignments=e=>{let r=e.getValue(d.CASE_INFO.CHILD_ASSIGNMENTS),n=[];return r&&r.length>0&&r.forEach(({assignments:o=[],Name:i,caseTypeID:s})=>{let a=o.map(c=>({...c,caseName:i,caseTypeID:s}));n=n.concat(a)}),n};static hasAssignments=e=>{let r=e.getValue(d.CASE_INFO.D_CASE_ASSIGNMENTS_RESULTS),n=t.getChildCaseAssignments(e);return!!(Array.isArray(n)&&n.length>0||Array.isArray(r)&&r.length>0||t.isCaseWideLocalAction(e))};static showBanner=e=>{let r=e();return t.hasNotificationMessages(r)||!t.hasAssignments(r)};static showTodo=e=>e.getValue("context_data.caseViewMode")!=="perform";static isRenderWithToDoWrapper=(e,r)=>{let n=e(),{showWithToDo:o}=r;return o&&(!t.isCaseWideLocalAction(n)||t.showTodo(n))};static getToDoAssignments=e=>{let r=e.getValue(d.CASE_INFO.CASE_INFO_ACTIONS),n=e.getValue(d.CASE_INFO.ASSIGNMENT_LABEL),o=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=[...o,...s],c=JSON.parse(JSON.stringify(a));return r&&!t.showTodo(e)&&(c=c.map(l=>(l.name=t.getActiveCaseActionName(e)||l?.name||n,l))),c}},tI=Yx;var Zx=class{c11nEnv;constructor(e){this.c11nEnv=e}containerManagerPromise=e=>{let r=w.getNextActionMgrId(),n,o,i=new Promise((s,a)=>{n=s,o=a});if(n&&o)w.register(r,i,n,o,e);else throw new Error("resolveFn or rejectFn is not defined.");return{actionMgrID:r,promise:i}};initializeContainers(e){let r=Ql,n=this.c11nEnv,o=n.getContextName(),i=n.getContainerName(),s={context:o,name:i,type:d.CONTAINER_TYPE.SINGLE},{actionMgrID:a,promise:c}=this.containerManagerPromise(r),l={...s,...e,actionMgrID:a};return T(Qx(l)),c}addContainerItem(e){let r=Et,n=this.c11nEnv,o=n.getMetadata(),{children:i}=o||{},s;Array.isArray(i)&&i.length>0&&([s]=i);let a=n.getContextName(),c=n.getContainerName(),l=ur(c,a,e?.containerType===d.CONTAINER_TYPE.SINGLE),u=Z(c,a),p={root:{...s,config:{...s?.config,context:s?.config?.context||n.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(r),h={...p,...e,actionMgrID:m};return T(Pt(h)),f}updateContainerItem(e){if(!e?.containerItemID)return Promise.reject(new Error("updateContainerItem : containerItemID is required in containerInfo object"));let r=kt,n=pe(e.containerItemID),o=te(e.containerItemID),i={context:n,target:o},{actionMgrID:s,promise:a}=this.containerManagerPromise(r),c={...i,...e,actionMgrID:s};return T(rr(c)),a}activateContainerItem(e){if(!e?.containerItemID)return Promise.reject(new Error("activateContainerItem : containerItemID is required in containerInfo object"));let r=or,o={target:te(e.containerItemID)},{actionMgrID:i,promise:s}=this.containerManagerPromise(r),a={...o,...e,actionMgrID:i};return T(nr(a)),s}removeContainerItem(e){if(!e?.containerItemID)return Promise.reject(new Error("removeContainerItem : containerItemID is required in containerInfo object"));let r=Ze,n=pe(e.containerItemID),o=te(e.containerItemID),i={context:n,target:o},{actionMgrID:s,promise:a}=this.containerManagerPromise(r),c={...i,...e,actionMgrID:s};return T(Qe(c)),a}resetContainers(e){if(!e?.context||!e?.name)return Promise.reject(new Error("resetContainers : context and name are required in containerInfo object"));let r=Yo,n=kc(e),{actionMgrID:o,promise:i}=this.containerManagerPromise(r),s={...n,...e,actionMgrID:o};return T(Lc(s)),i}addTransientItem(e){let{id:r,data:n,sourceContainerItemId:o}=e,i=this.c11nEnv.getContextName(),s=sb(r,i),a=bi(i);if(s&&a.includes(s))return s;let c=n;if(o){let l=W(o);if(!l)throw new Error(`addTransientItem: source container item "${o}" not found in store`);c=g.deepClone(l)}return T(Xx({transientItemID:s,contextName:i,target:te(i),data:c})),s}updateTransientData(e){let{transientItemID:r,data:n}=e,o=this.c11nEnv.getContextName();if(r){if(!bi(o).includes(r))return}else return;T(Ph({transientItemID:r,data:n}))}removeTransientItem(e){let r=this.c11nEnv.getContextName(),{target:n=this.c11nEnv.getTarget(),containerItemID:o,transientItemID:i}=e;if(i&&o){if(!bi(r).includes(i))return}else return;T(Nh({target:n,containerItemID:o,transientItemID:i}))}createContainerPConnect(e,r,n,o=!1){tI.createContainerPConnect(e,r,n,o)}hasContainerItems(){let e=this.c11nEnv.getContextName(),r=this.c11nEnv.getContainerName();return Fr(`${e}/${r}`)}isContainerInitialized(){let e=this.c11nEnv.getContextName(),r=this.c11nEnv.getContainerName();return Rh(e,r)}},Bd=Zx;var eD=class extends hb{constructor(e,r){super(r)}},ee=(...t)=>ri(e=>t.includes(e.type)),_V=(...t)=>(e,r)=>new Ot(n=>{let o=t.map(i=>i(e,r).subscribe(n));return()=>{o.forEach(i=>i.unsubscribe())}}),ase=t=>typeof t!="object"||t===null||!("type"in t)?!1:typeof t.type=="string",bV=()=>{let t=new Xs,e=null,r=null,n=o=>(r=o,e=new eD(t.asObservable(),o.getState()),i=>s=>{let a=i(s);return e?.next(o.getState()),ase(s)&&t.next(s),a});return n.run=o=>{if(!e||!r)throw new Error("Epic middleware must be added to the store before calling run().");return o(t.asObservable(),e).subscribe(i=>{r?.dispatch(i)})},n};var me=(t,e,r)=>Gi(n=>(n?.code!=="ERR_CANCELED"&&console.error(t,n),Se(os(t,n,e,null,r))));var gr=(t,e)=>r=>new Ot(n=>{let o={},i=0;return r.pipe(z(s=>{let a=Date.now(),c;return e?c=e:c=lo,c&&c(s,o)&&a-i<t?Ec():(o=s,i=a,Se(s))})).subscribe(n)});var cse="Error occurred during ajax call at createDataObject Epic",lse=t=>{let{dataPageID:e,context:r,headers:n,containerItemID:o}=t,i={data_view_ID:e},{restApi:s,reqType:a}=U(qk,i),{content:c}=Rt(o);return q(M(s,{method:a,headers:n,body:{data:c.content,pageInstructions:c?.pageInstructions}},o)).pipe(O(l=>({response:l.data,actionInPayload:t})),me(cse,r))},TV=lse;var use="CREATE_DATA_OBJECT",rI=t=>({type:use,payload:t});var tD=t=>{let e=0,r=[];return t.pipe(ee(ou),gr(100),Vt(n=>{let{isFormValid:o}=n.payload;if({actionMgrID:e}=n.payload,!o){let i={type:E.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return w.rejectActionByID(e,!0,i),Se([])}return Se(n.payload).pipe(z(i=>TV(i)),z(async i=>{if(i&&i.type===Te){let{payload:m}=i,f=ue({...i,...m,actionMgrID:e});return r.push(f),{actionsOut:r,data:void 0}}let{actionInPayload:s}=i,{containerItemID:a,isModalAction:c}=s,l=c?ge.MODAL:ge.PRIMARY,p={target:Z(l,a),containerItemID:a,context:a};return r.push(V(Qe,p)),{actionsOut:r,data:i?.response}}),O(({data:i})=>(r.length===1&&Je(r[0].type)?w.rejectActionByID(e):w.resolveActionByID(e,i),T(r),r=[],r)))}))};var dse="Error occurred during ajax call at getDataObjectView Epic",pse=t=>{let{dataLookUp:e,context:r,headers:n,viewName:o,requestPayload:i}=t,s={data_view_ID:e,view_ID:o},{restApi:a,reqType:c}=U(Jk,s);return q(M(a,{method:c,headers:n,body:{dataViewParameters:i}},r)).pipe(O(l=>({response:l.data,headers:$e(l.headers),actionInPayload:t})),me(dse,r))},vV=pse;var mse="VIEW_DATA_OBJECT",nI=t=>({type:mse,payload:t});var rD=t=>{let e=0,r=[];return t.pipe(ee(fS),gr(100),O(n=>({actionMgrID:e}=n.payload,n.payload)),z(n=>vV(n)),z(async n=>{if(n&&n.type===Te){let{payload:S}=n,A=ue({...n,...S,actionMgrID:e});return r.push(A),r}let{actionInPayload:o,response:i,headers:s={}}=n,{containerName:a,readOnly:c,actionName:l}=o,u=Z(a,o.context),p=st(u,a,o.context),m={acName:u,context:p};if(i?.data?.dataInfo){let{dataInfo:S}=i.data;S.dataContext||=o.dataLookUp,S.dataContextParameters||=o.requestPayload}await Pe(i,o,m);let h=Me(i,{target:u,context:p,containerItemID:p,headers:s});return h.resourceType=E.RESOURCE_TYPES.DATA,h.resourceStatus=E.RESOURCE_STATUS.UPDATE,h.readOnly=c,h.actionName=l,h.key=JSON.stringify(o.requestPayload),r.push(V(Pt,h)),r}),O(()=>(r.length===1&&Je(r[0].type)?w.rejectActionByID(e):w.resolveActionByID(e),T(r),r=[],r)))};var fse="Error occurred during ajax call at updateDataObject Epic",gse=t=>{let{dataPageID:e,context:r,headers:n,containerItemID:o,key:i}=t,s={data_view_ID:e},{restApi:a,reqType:c}=U(dS,s),{content:l}=Rt(o);return q(M(a,{method:c,headers:{...n,"if-match":t?.etag},body:{data:{...l.content,...i},pageInstructions:l.pageInstructions||[]}},o)).pipe(O(u=>({response:u.data,actionInPayload:t})),me(fse,r))},RV=gse;var hse="UPDATE_DATA_OBJECT",oI=t=>({type:hse,payload:t});var nD=t=>{let e=0,r=[];return t.pipe(ee(iu),gr(100),Vt(n=>{let{isFormValid:o}=n.payload;if({actionMgrID:e}=n.payload,!o){let i={type:E.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return w.rejectActionByID(e,!0,i),Se([])}return Se(n.payload).pipe(z(i=>RV(i)),z(async i=>{if(i&&i.type===Te){let{payload:m}=i,f=ue({...i,...m,actionMgrID:e});return r.push(f),r}let{actionInPayload:s}=i,{containerItemID:a,isModalAction:c}=s,l=c?ge.MODAL:ge.PRIMARY,p={target:Z(l,a),containerItemID:a,context:a};return r.push(V(Qe,p)),r}),O(()=>(r.length===1&&Je(r[0].type)?w.rejectActionByID(e):w.resolveActionByID(e),T(r),r=[],r)))}))};var yse="Error occurred during ajax call at getDataObjectView Epic",Sse=t=>{let{lookupDatapage:e,context:r,headers:n,actionID:o,dataViewParameters:i}=t,s={data_view_ID:e,action_ID:o},{restApi:a,reqType:c}=U("openDataObjectAction",s);return q(M(a,{method:c,headers:n,body:{dataViewParameters:i}},r)).pipe(O(l=>({response:l.data,headers:$e(l.headers),actionInPayload:t})),me(yse,r))},PV=Sse;var oD=t=>{let e=0,r=[];return t.pipe(ee(gS),gr(100),O(o=>({actionMgrID:e}=o.payload,o.payload)),z(o=>PV(o)),z(async o=>{if(o&&o.type===Te){let{payload:C}=o,_=ue({...o,...C,actionMgrID:e});return r.push(_),r}let{actionInPayload:i,response:s,headers:a={}}=o,{containerName:c,actionID:l,context:u,actionName:p}=i,m=Z(c,i.context),f=ur(c,u);f=Zr(u,f);let h={target:m,context:f,containerItemID:f,headers:a,resourceType:E.RESOURCE_TYPES.DATA,resourceStatus:E.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 A=Me(s,h);return r.push(V(Pt,A)),r}),O(()=>(r.length===1&&Je(r[0].type)?w.rejectActionByID(e):w.resolveActionByID(e),T(r),r=[],r)))};var Ese="Error occurred during ajax call at getDataObjectView Epic",Ase=t=>{let{savableDatapage:e,context:r,headers:n,actionID:o,keys:i,containerItemID:s,jsActionQueryParams:a}=t,c={data_view_ID:e,action_ID:o},{restApi:l}=U("submitDataObjectAction",c),{reqType:u}=U("submitDataObjectAction",c),{content:p}=Rt(s);return l=Su(a,l),q(M(l,{method:u,headers:{...n,"if-match":t?.etag},body:{data:{...p?.content,...i},pageInstructions:p?.pageInstructions||[]}},r)).pipe(O(m=>({response:m.data,actionInPayload:t})),me(Ese,r))},NV=Ase;var Cse=(t,e,r,n)=>{let{resourceType:o,key:i,containerItemID:s}=n,a=Me(r,e);a.resourceType=o||E.RESOURCE_TYPES.DATA;let c=xo(s);t.push(V(Qe,a));let l=re(".dataContext","dataInfo",c),u=re(".dataContextParameters","dataInfo",c),p={context:c,skipSemanticUrl:!0,resourceType:o,parentAction:Vi,dataContext:l,dataContextParameters:u},m=l&&u&&bt(Oo,{pageName:d.PY_DETAILS,dataViewName:l},u)||"";if(s?.includes(d.PREVIEW)){let f={type:uc,payload:{pageName:d.VIEW_NAMES.PY_DATA_PREVIEW,container:d.PREVIEW,containerName:d.PREVIEW,...p}};t.push(f)}else if(o!==d.PAGE&&i===m&&s?.includes(d.PRIMARY)){let f={type:uc,payload:{pageName:d.VIEW_NAMES.PY_DETAILS,containerName:"",...p}};t.push(f)}return t},iD=t=>{let e=0,r=[];return t.pipe(ee(Vi),gr(100),Vt(o=>{let{isFormValid:i}=o.payload;({actionMgrID:e}=o.payload);let s=o.payload.context;if(!i){let a={type:E.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return w.rejectActionByID(e,!0,a),Se([])}return dt({context:s,stateObj:W(s),clearContextMessages:!0}),Se(o.payload).pipe(z(a=>NV(a)),z(async a=>{if(a&&a.type===Te){tE(a,"dataObject");let{payload:_}=a,I=ue({...a,..._,actionMgrID:e});return r.push(I),r}let{actionInPayload:c,response:l,headers:u={}}=a,{containerName:p,containerItemID:m,resourceType:f,key:h}=c,S=Z(p,c.context),A={acName:S,context:c.context};await Pe(l,c,A);let C={key:h,target:S,resourceType:f,containerItemID:m,headers:u,context:c.context};return r=Cse(r,C,l,{key:h,resourceType:f,containerItemID:m}),r}),O(()=>(r.length===1&&Je(r[0].type)?w.rejectActionByID(e):w.resolveActionByID(e),T(r),r=[],r)))}))};var sD=class{components;constructor(){this.components={}}_checkComponent(e,r){return!!this.components[r]?.[e]}start(e,r,n,o,i){let s={viewName:e,pageReference:n,contextName:o,isInProgress:!0,active:!0,caseKey:r};this.components[o]=this.components[o]||{},this.components[o][i]=s}stop(e,r){this._checkComponent(e,r)&&(this.components[r][e].isInProgress=!1)}remove(e,r){this._checkComponent(e,r)&&delete this.components[r][e]}removeContext(e){delete this.components[e]}enableCascade(e){this.components[e]&&Object.values(this.components[e]).forEach(r=>{r.isInProgress&&(r.cascade=!0)})}activate(e,r){this._checkComponent(e,r)&&(this.components[r][e].active=!0)}deactivate(e,r){this._checkComponent(e,r)&&(this.components[r][e].active=!1)}refreshActiveComponents(e){e&&this.components[e]&&Object.keys(this.components[e]).forEach(r=>{this.refreshComponent(r,e)})}refreshComponent(e,r){if(!this._checkComponent(e,r))return;let n=this.components[r][e];if(n.active&&n.cascade){let{caseKey:o,viewName:i,pageReference:s}=n;Dc(o,i,r,s,{})}}},Hd=new sD;var aD=class{constructor(e,r,n,o,i=100,s=500){this.finalDataViewCall=e;this.combiner=r;this.comparator=n;this.separator=o;this.maxtime=i;this.maxsize=s;this.groupedDataViewArray=[]}finalDataViewCall;combiner;comparator;separator;maxtime;maxsize;groupedDataViewArray;timeoutId;findCombinableDataViewCall(e){return this.groupedDataViewArray.find(r=>this.comparator(r,e))}dequeueAllDataViewCalls(){for(this.groupedDataViewArray.reverse();this.groupedDataViewArray.length>0;){let e=this.groupedDataViewArray.pop();this.finalDataViewCall(e).then(r=>{this.separator(e,r)})}clearTimeout(this.timeoutId)}dequeueDataViewCallOnSizeExceed(e){let r=this.groupedDataViewArray.findIndex(n=>this.comparator(n,e));this.groupedDataViewArray[r]&&(this.groupedDataViewArray.splice(r,1),this.finalDataViewCall(e).then(n=>{this.separator(e,n)}))}queueDataViewCall(e,r){let n=this.findCombinableDataViewCall(e),o,i;return o=new Promise(s=>{i=s}),n&&!n.dataViewCallMap[r]?(this.combiner(n,e),n.dataViewCallMap[r]={promise:o,resolve:i}):n?o=n.dataViewCallMap[r].promise:(n={...e,dataViewCallMap:{[r]:{promise:o,resolve:i}}},this.groupedDataViewArray.push({...e,dataViewCallMap:{[r]:{promise:o,resolve:i}}})),Object.keys(n.dataViewCallMap).length===this.maxsize?this.dequeueDataViewCallOnSizeExceed(n):(clearTimeout(this.timeoutId),this.timeoutId=setTimeout(()=>this.dequeueAllDataViewCalls(),this.maxtime)),o}},OV=aD;var cD=class{bufferedDataQueues;constructor(){this.bufferedDataQueues={}}getBufferedDataQueueForDataPage(e){return this.bufferedDataQueues[e]}addBufferedDataQueueForDataPage(e,r,n,o,i,s,a){return this.getBufferedDataQueueForDataPage(e)||(this.bufferedDataQueues[e]=new OV(r,n,i,o,s,a)),this.bufferedDataQueues[e]}},xV=cD;var Ise=t=>{let e=t?.F0.rhs?.value;t.F0.rhs={values:[e]},t.F0.comparator="IN"},_se=(t,e)=>Object.keys(t).length===1&&Object.keys(t).length===Object.keys(e).length,bse=(t,e)=>e.F0.comparator==="EQ"&&(t.F0.comparator===e.F0.comparator||t.F0.comparator==="IN"),Tse=(t,e)=>_se(t,e)&&bse(t,e)&&t.F0.ignoreCase===e.F0.ignoreCase,DV=t=>t.map(e=>e.field),vse=(t,e)=>{let r=(t.query?.filter).filterConditions,n=(e.query?.filter).filterConditions,o=(e.query?.filter).logic,i=Object.keys(r).length;Tse(r,n)?(r.F0.comparator==="EQ"&&Ise(r),(r.F0.rhs?.values).push(n.F0.rhs?.value)):(Object.keys(n).forEach((c,l)=>{let u=`F${i+l}`;r[u]=n[c],o=o.replace(c,u)}),(t.query?.filter).logic+=` OR ${o}`);let s=DV(t.query?.select);DV(e.query?.select).forEach(c=>{s.includes(c)||(t.query?.select).push({field:c})})},Rse=(t,e)=>t.dataViewParameters&&e.dataViewParameters&&Object.keys(e.dataViewParameters).length===Object.keys(t.dataViewParameters).length&&!Object.keys(t.dataViewParameters).some(r=>typeof e.dataViewParameters?.[r]=="string"?t.dataViewParameters?.[r]!==e.dataViewParameters?.[r]:!g.isEqual(t.dataViewParameters?.[r],e.dataViewParameters?.[r])),Pse=(t,e)=>!t.dataViewParameters&&!e.dataViewParameters,Nse=(t,e)=>Object.keys(t.filterConditions).length%Object.keys(e.filterConditions).length===0?!Object.keys(e.filterConditions).some(r=>t.filterConditions[r].lhs.field!==e.filterConditions[r]?.lhs.field):!1,Ose=(t,e)=>Nse(t.query?.filter,e.query?.filter)&&(Rse(t,e)||Pse(t,e)),xse=(t,e)=>{let{data:r}=e,{dataViewCallMap:n,filterDataOnClient:o}=t;Object.keys(n).forEach(i=>{n[i].resolve({data:o(i,r)})})},Dse=t=>({combiner:vse,comparator:Ose,separator:xse,...t}),wV=Dse;var lD=(t,e)=>{if(!(typeof window>"u"))try{window.sessionStorage.setItem(t,e)}catch{}},$V=(t,e="",r="IS_NULL")=>({comparator:r,lhs:{field:t},...e&&{rhs:{value:e}}}),Oh=t=>t!=null&&typeof t=="object"&&!("then"in t),wse=(t=[],e={},r="")=>{if(!(t.length&&Object.keys(e)))return;let n={};return t.forEach((i,s)=>{let a=e[i],c;a?c=$V(i,a,"EQ"):c=$V(i);let l=`T${s+1}`;n[l]=c}),{logic:Object.keys(n).join(` ${r} `),filterConditions:n}},uD=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,r){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=r)}static searchResultsCache={};static init(e,r){return new Promise((n,o)=>{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=g.getHashedString(a),l=`${e.dataSource}_${c}`,u=`__dataviewmetadata__${e.dataSource}`,p=ir.getAppCacheKey(u);if(typeof window<"u"&&window.sessionStorage.getItem(p)){let m=JSON.parse(`${window.sessionStorage.getItem(p)}`);if(r&&t.searchResultsCache?.[r]?.[l])n(t.searchResultsCache[r][l]);else if(e.cacheLifeSpan!=="form"&&t.searchResultsCache?.persisted?.[l])n(t.searchResultsCache.persisted[l]);else{let f=new t(e,r);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(r,e,l,f),n(f)):(f.associationFilter=e.associationFilter,f.propertyFilter=e.propertyFilter,f.fetchMetaData(r).then(h=>{lD(p,JSON.stringify({isQueryable:h.data.isQueryable,dataSourceMetaData:h.data,isInitialised:!0,associationFilter:e.associationFilter})),f.isQueryable=h.data.isQueryable,f.dataSourceMetaData=h.data,f.isInitialised=!0,t.initializeCache(r,e,l,f),n(f)}).catch(h=>{f.isInitialised=!1,o(h)}))}}else if(e.deferDatasource&&zr(e.dataSource)){let m=new t(e,r),f=zr(e.dataSource);m.isQueryable=!!f?.isQueryable,m.isInitialised=!0,m.dataSourceMetaData=f,lD(p,JSON.stringify({isQueryable:f?.isQueryable,dataSourceMetaData:f,isInitialised:!0})),m.context=r,t.initializeCache(r,e,l,m),n(m)}else{let m=new t(e,r);m.associationFilter=e.associationFilter,m.propertyFilter=e.propertyFilter,m.fetchMetaData(r).then(f=>{lD(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(r,e,l,m),n(m)}).catch(f=>{m.isInitialised=!1,o(f)})}})}static bufferedDataView=new xV;registerForBufferedCall(e){return this.isQueryable&&(this.initializeBufferCallsForDataPage(wV(e)),this.bufferInitialized=!0),this}static clearContextedCache(e){delete t.searchResultsCache[e]}static initializeCache(e,r,n,o){e&&r.cacheLifeSpan?.toLowerCase()==="form"?(t.searchResultsCache[e]===void 0&&(t.searchResultsCache[e]={}),t.searchResultsCache[e][n]=o):(t.searchResultsCache.persisted===void 0&&(t.searchResultsCache.persisted={}),t.searchResultsCache.persisted[n]=o)}fetchMetaData(e){return ir.getDataViewMetadata(this.dataSource,e,this.associationFilter,this.propertyFilter)}initializeBufferCallsForDataPage(e){let r=n=>Zt.getDataAsync(this.dataSource,this.context,n.dataViewParameters,n.paging,n.query);t.bufferedDataView.addBufferedDataQueueForDataPage(this.dataSource,r,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,r,n)=>{let o=this.buildSelect(n),i=wse(e,r,"AND");return{select:o,...i&&{filter:i},...ir.isDistinctResultsOnly(o)&&{distinctResultsOnly:"true"}}};buildSchemaForQueryableDPWithKeys=(e,r,n)=>({dataViewParameters:this.parameters,query:this.buildQueryWithKeys(e,r,n),paging:this.buildPageOptions()});getRowDataByKeys=async(e,r,n)=>this.memoizedGetRowDataByKeys(e,r,n);buildKeyCacheKey(e,r,n){let o=e.map(s=>[s,r[s]??""]),i=n?.columns?.map(s=>s.value);return JSON.stringify({filterEntries:o,columns:i,pageNumber:this.pageNumber})}memoizedGetRowDataByKeys(e,r,n){let o=this.buildKeyCacheKey(e,r,n);(n?.invalidateCache||n?.purgeDataPageCache)&&this.keyCache.delete(o);let i=this.keyCache.get(o);if(i)return i;let s=this.isQueryable?this.buildSchemaForQueryableDPWithKeys(e,r,n):this.buildSchemaForNonQueryableDP(),c=Zt.getDataAsync(this.dataSource,this.context,s.dataViewParameters,this.isQueryable?s.paging:void 0,this.isQueryable?s.query:void 0,{...n}).catch(l=>(this.keyCache.delete(o),Promise.reject(l)));return this.keyCache.set(o,c),c}getData(e,r){if(this.isQueryable){if(this.bufferInitialized)try{let o=this.buildSchemaForQueryableBufferDP(e);return t.bufferedDataView.getBufferedDataQueueForDataPage(this.dataSource).queueDataViewCall(o,e)}catch{let o=this.buildSchemaForQueryableDP(e,r);return Zt.getDataAsync(this.dataSource,this.context,o.dataViewParameters,o.paging,o.query)}let n=this.buildSchemaForQueryableDP(e,r);return Zt.getDataAsync(this.dataSource,this.context,n.dataViewParameters,n.paging,n.query,{...r})}return this.fetchNonQueryableResults(e,r)}getCachedResult(e,r){if(this.enablePagination&&Oh(r)&&r.has(this.pageNumber))return r.get(this.pageNumber);let n=this.cache.get(e);if(!this.enablePagination&&n&&!Oh(n))return n}handleCacheError(e,r){if(this.enablePagination){let n=this.cache.get(e);n&&Oh(n)&&n.delete(this.pageNumber)}else this.cache.delete(e);return Promise.reject(r)}storeCacheResult(e,r){if(this.enablePagination){let n=this.cache.get(e);(!n||!Oh(n))&&(n=new Map,this.cache.set(e,n)),n.set(this.pageNumber,r)}else this.cache.set(e,r)}isResultCached(e){if(!this.isInitialised||!this.isValidDatasource()||this.context&&!Gd(this.context))return!1;let r=e.toLowerCase(),n=this.cache.get(r);return n?this.enablePagination?Oh(n)&&n.has(this.pageNumber):!0:!1}memoizedGetData(e,r){let n=e?.toLowerCase(),o=this.cache.get(n);if(this.isResultCached(e)&&o){let c=this.getCachedResult(n,o);if(c)return c}let a=this.getData(e,r).catch(c=>this.handleCacheError(n,c));return this.storeCacheResult(n,a),a}fetchData(e,r=!1,n){return this.isValidDatasource()?this.context&&!Gd(this.context)?Promise.resolve({data:[]}):this.isInitialised?(this.pageNumber=r?this.pageNumber:1,this.memoizedGetData(e??"",n)):Promise.reject(new Error):Promise.reject(new Error)}fetchPaginatedData(e){return this.pageNumber+=1,this.fetchData(e,!0)}fetchNonQueryableResults(e,r){if(e===void 0)return Promise.resolve({data:[]});if(this.fetchedNQData)return Promise.resolve({data:this.filterDataOnClient(e,this.nonQueryableData,r)});if(this.isNQDataFetchInProgress&&this.fetchNQDataPromise)return this.fetchNQDataPromise.then(()=>({data:this.filterDataOnClient(e,this.nonQueryableData,r)})).catch(n=>Promise.reject(n));if(this.dataSourceMetaData&&"structure"in this.dataSourceMetaData&&this.dataSourceMetaData.structure?.toLowerCase()==="list"){let n=this.buildSchemaForNonQueryableDP();return this.fetchNQDataPromise=Zt.getDataAsync(this.dataSource,this.context,n.dataViewParameters,void 0,void 0,r),this.isNQDataFetchInProgress=!0,new Promise((o,i)=>{this.fetchNQDataPromise?.then(s=>(this.nonQueryableData=[...s.data],this.fetchedNQData=!0,o({data:this.filterDataOnClient(e,this.nonQueryableData,r)}))).catch(s=>i(s)).finally(()=>{this.isNQDataFetchInProgress=!1,this.fetchNQDataPromise=null})})}return Promise.resolve(null)}filterDataOnClient(e,r,n){let o=(n?.columns??this.columns)?.filter(i=>i.useForSearch).map(i=>i.value);return r.reduce((i,s)=>(o?.some(c=>{let l=t.resolveEmbeddedPath(c),u=g.getIn(s,l);return u!=null&&this.positionMatches(`${u}`,e,n)})&&i.push({...s}),i),[])}static resolveEmbeddedPath(e){return e.startsWith("!P!")||e.startsWith("!PL!")?e.substring(e.lastIndexOf("!")+1).replace(/:/g,"."):e}positionMatches(e,r,n){let o=n?.ignoreCase??this.ignoreCase,i=o?e.toLowerCase():e,s=o?r.toLowerCase():r;switch(n?.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 r=[],n=[];return(e?.columns??this.columns)?.forEach(o=>{if(!n.includes(o.value)){n.push(o.value);let i={field:o.value};r.push(i)}}),r}buildFilters(e,r){let n=r?.matchPosition??this.matchPosition,o=r?.ignoreCase??this.ignoreCase,i={},s=0;(r?.columns??this.columns)?.forEach(c=>{if(c.useForSearch){let l=`F${s}`;s+=1;let u={field:c.value},p={value:e},m="CONTAINS";n==="start"?m="STARTS_WITH":n==="equals"&&(m="EQ");let f={...`${parseFloat(e)}`!==e&&{ignoreCase:o?"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,r){let n=this.buildSelect(r);return e?{select:n,filter:this.buildFilters(e,r),...ir.isDistinctResultsOnly(n)&&{distinctResultsOnly:"true"}}:{select:n,...ir.isDistinctResultsOnly(n)&&{distinctResultsOnly:"true"}}}buildPageOptions(){return this.enablePagination?{pageNumber:this.pageNumber,pageSize:this.pageSize}:{maxResultsToFetch:this.maxResultsDisplay}}buildSchemaForQueryableDP(e,r){return{dataViewParameters:this.parameters,query:this.buildQuery(e,r),paging:this.buildPageOptions()}}buildSchemaForNonQueryableDP(){return{dataViewParameters:this.parameters}}isValidDatasource(){return!!this.dataSource}},Io=uD;var dD=class t{refreshMap;propChangeRefreshMap;constructor(){this.refreshMap={},this.propChangeRefreshMap={}}static initializeRefreshCache(e,r,n,o,i){typeof e[r]>"u"&&(e[r]={}),e[r][n]=[{uniqueHash:o,callback:i}]}registerForRefresh(e,r,n,o,i){n=g.convertClipboardPageToPageRefNotation(n);let s=o.split("/").join(d.HASH_DELIMITER),a=g.getHashedString(s);e==="PROP_CHANGE"?this.propChangeRefreshMap?.[i]?.[n]?this.propChangeRefreshMap[i][n].some(l=>l.uniqueHash===a)||this.propChangeRefreshMap[i][n].push({uniqueHash:a,callback:r}):t.initializeRefreshCache(this.propChangeRefreshMap,i,n,a,r):this.refreshMap?.[i]?.[`${e}-${n}`]?this.refreshMap[i][`${e}-${n}`].some(l=>l.uniqueHash===a)||this.refreshMap[i][`${e}-${n}`].push({uniqueHash:a,callback:r}):t.initializeRefreshCache(this.refreshMap,i,`${e}-${n}`,a,r)}triggerPropChangeRefresh(e,r){let n=this.propChangeRefreshMap?.[r];if(!n)return!1;let o=J.getPropertyValue(d.CONTEXT_DATA_MODAL_VIEW.CONTEXT_DATA_MODAL_VIEW,e,r),{interestPage:i=""}=o||{},s=u=>g.convertPageRefToClipboardPageNotation(u).replace(`${d.CASE_INFO?.CASE_INFO_CONTENT}${i}`,"");if(n[e]){let u=s(e);return n[e].forEach(p=>p.callback(u)),!0}let a=be.getContextReferences(r)?.get(e),c=a&&J.resolveContextTreeNodeProps(a.props)||{},{contextPageRef:l}=c;if(l&&n[l]){let u=s(l);return n[l].forEach(p=>p.callback(u)),!0}for(let u of Object.keys(n)){let p;if(g.segmentsMatch(u,e)?p=e:l&&g.segmentsMatch(u,l)&&(p=l),p){let m=s(p);return n[u].forEach(f=>f.callback(m)),!0}}return!1}triggerRefreshForType(e,r,n){return e==="PROP_CHANGE"?this.triggerPropChangeRefresh(r,n):this.refreshMap?.[n]?.[`${e}-${r}`]?(this.refreshMap[n][`${e}-${r}`].forEach(o=>o.callback()),!0):!1}deRegisterForRefresh(e){delete this.propChangeRefreshMap[e],delete this.refreshMap[e]}},Ti=new dD;var pD=class{static cleanCaches(e){Cr.purgeCascadeFields(e),Hd.removeContext(e),Io.clearContextedCache(e),$.cleanContextSubscribers(e),AE(e),be.removeContextTreeNode(e),Tt.clearContext(e),Ti.deRegisterForRefresh(e)}},xh=pD;var mD="GET_DESCENDANTS",MV=t=>({type:mD,payload:t});var fD=class{runtimeParams;runtimeParamsMap;constructor(){this.runtimeParams={},this.runtimeParamsMap={}}setRuntimeParams(e){this.runtimeParams=e}getRuntimeParams(){return this.runtimeParams}setRuntimeParam(e,r){this.runtimeParamsMap[e]=r}getRuntimeParam(e){return this.runtimeParamsMap[e]}},dl=new fD;var gD=class{MISSING_CONTEXT_PARAM="context is required parameter";INVALID_CONTEXT_DETAILS="Invalid Context";INVALID_CONTEXT_OPERATION="Invalid Operation on Given Context";schedulePendingActionOnCompletion(e,r){let n=[],o=r.context_data?.blocking_action_counter??0,i=r.context_data?.deferred_action_queue?[...r.context_data.deferred_action_queue]:[],s=r.context_data?.is_deferred_action_in_progress??!1;if(o<=0){if(s)n.push({type:Er,payload:{context:e,data:{context_data:{is_deferred_action_in_progress:!1}}}});else if(i.length>0){let a=i.shift();s=!s,n.push({type:Er,payload:{context:e,data:{context_data:{deferred_action_queue:i,blocking_action_counter:o,is_deferred_action_in_progress:s}}}}),a&&n.push(a)}else return;T(n)}}executeOrQueueDeferredAction(e){if(!e?.payload?.context)return Promise.reject(new Error("Action Context is Mandatory Field."));let r=W(e?.payload?.context);if(r){let n=[],o=r.context_data?.blocking_action_counter??0,i=r.context_data?.deferred_action_queue?[...r.context_data.deferred_action_queue]:[],s=r.context_data?.is_deferred_action_in_progress??!1;return i.length<=0&&!s&&(o<=0?(n.push(e),s=!s):i.push(e),n.unshift({type:Er,payload:{context:e.payload.context,data:{context_data:{deferred_action_queue:i,blocking_action_counter:o,is_deferred_action_in_progress:s}}}}),T(n)),Promise.resolve()}return Promise.reject(new Error(this.INVALID_CONTEXT_DETAILS))}handleDeferredActionCompletion(e){if(!e)return Promise.reject(new Error(this.MISSING_CONTEXT_PARAM));let r=W(e);return r&&r.context_data?.is_deferred_action_in_progress===!0?(T({type:Er,payload:{context:e,data:{context_data:{is_deferred_action_in_progress:!1}}}}),this.schedulePendingActionOnCompletion(e,r),Promise.resolve()):Promise.reject(new Error(this.INVALID_CONTEXT_DETAILS))}registerBlockingAction(e){return e?W(e)?(T({type:mc,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 r={...W(e)};return r.context_data={...r.context_data},r&&r.context_data?.blocking_action_counter>0?(T({type:mc,payload:{context:e,isInitiateBlockingAction:!1}}),r.context_data.blocking_action_counter-=1,this.schedulePendingActionOnCompletion(e,r),Promise.resolve()):Promise.reject(new Error(this.INVALID_CONTEXT_OPERATION))}cancelDeferredActionsOnError(e){if(!e)return;let r=W(e);if(r){let n={...r};n.context_data={...n.context_data},n.context_data?.deferred_action_queue&&g.rejectPendingActions(n.context_data.deferred_action_queue)&&(n.context_data.deferred_action_queue=[]),n.context_data?.blocking_action_counter&&(n.context_data.blocking_action_counter=0),n.context_data?.is_deferred_action_in_progress&&(n.context_data.is_deferred_action_in_progress=!1),T({type:Er,payload:{context:e,data:{...n}}}),On.disableLoadingIndicator({context:e})}}isDeferredActionInProgress(e){if(!e)return Promise.reject(new Error(this.MISSING_CONTEXT_PARAM));let r=W(e);return!!(r&&r.context_data?.is_deferred_action_in_progress===!0)}},$se=new gD,Ct=$se;var kV=(t,e)=>{let r={},n=_i.getLookUpDataPage(t),o=_i.getDataPageKeys(n);if(o)for(let i of o)r[i.keyName]=i.isAlternateKeyStorage?e[i.linkedField]:e[i.keyName];return{dataViewParameters:r,dataPageID:n,dataPageKeys:o}},LV=(t,e)=>{let r=_i.getSavableDataPage(t),n=_i.getDataPageKeys(r);return n?.forEach(o=>{o.isAlternateKeyStorage&&(o.keyName===o.linkedField||Object.keys(e).includes(o.linkedField))?o.keyName=e[o.linkedField]:o.isAlternateKeyStorage&&Object.keys(e).includes(o.keyName)&&o.keyName!==o.linkedField?(e[o.linkedField]=e[o.keyName],delete e[o.keyName]):o.keyName=e[o.keyName]}),{keys:e,dataPageID:r,dataPageKeys:n}},iI=t=>{$.publish(E.PUB_SUB_EVENTS.EVENT_CANCEL,t)},Mse=t=>{if(t.includes(d.ACTIONAREA))return!0;let e=Ma(t);return!!se(`${e}/${d.ACTIONAREA}`)?.includes(d.ACTIONAREA)},kse=(t,e,r)=>B.shouldUseUnifiedHandling()||Mse(t)?Po:jU(e,r??!1),UV=(t,e,r)=>{let{callbacks:n}=r;return r.callbacks=null,t(e,r).then(o=>{o==="cancel"?n?.cancel?.():n?.submit?.()})},Lse=t=>{let e=B.shouldUseUnifiedHandling();return B.isExternalCaseType(t)?tb:B.isExternalObject(t)?e?tb:eL:e?zs:B.isObjectCaseType(t)?Zk:zs},Use=t=>!B.shouldUseUnifiedHandling()&&(t.type==="Object"||B.isObjectCaseType(t?.caseClassName||"")||globalThis.location?.href?.includes("/objects/"))?Xk:ji,jV=(t,e,r)=>!r&&e===d.ACTION?t.getValue(E.CASE_INFO.ASSIGNMENTACTION_ID):t.getValue(E.CASE_INFO.ACTIVE_ACTION_ID),jse=(t,e)=>{let r=t.getValue(E.CASE_INFO.IS_LOCAL_ACTION),n=t.getValue(E.CASE_INFO.ASSIGNMENT_ID),o=jV(t,e,r);if(e===d.ACTION&&(!o||!r&&!n)){let i=AV(t.getContextName());i&&(!n&&!o&&(r=i.isLocalAction),n=n||i.assignmentID,o=o||(r?i.activeActionID:i.assignmentActionID))}return{localAction:r,assignmentID:n,actionID:o}},hD=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,r,n)=>!e&&r||n;getCaseID=e=>e.caseID||this.c11nEnv.getValue(d.getProperty(E.CASE_INFO.CASE_INFO_ID))||e?.links?.open?.href?.split("/")?.[2];getSaveActionPayload=(e,r=!1,n=!1)=>{let o=e,i=o&&o.includes(d.MODAL),s=this.c11nEnv.getValue(E.CASE_INFO.CASE_INFO_ID),a=this.c11nEnv.getValue(E.CASE_INFO.ASSIGNMENT_ID),c=this.c11nEnv.getValue(E.CASE_INFO.ACTIVE_ACTION_ID)?this.c11nEnv.getValue(E.CASE_INFO.ACTIVE_ACTION_ID):this.c11nEnv.getValue(E.CASE_INFO.ASSIGNMENTACTION_ID),l=this.c11nEnv.getContainerName(),u=this.c11nEnv.getValue(E.CASE_INFO.CASE_TYPE_ID),p=r?void 0:Dr(this.c11nEnv.getContextName()),m=this.c11nEnv.getValue("isProcessAction","isProcessAction");return ze.buildActionObject({context:o,containerItemID:e,assignmentID:a,actionID:c,caseID:s,containerName:l,caseType:u,isModalAction:i,isFormValid:p,isProcessAction:m,saveOnly:r,autosave:n},this.c11nEnv)};actionsApiPromise=(e,r,n=!0)=>{let o="";r&&r.actionMgrID!==null?o=r.actionMgrID||"":o=w.getNextActionMgrId();let i,s,a=new Promise((c,l)=>{i=c,s=l});if(i&&s)w.register(o,a,i,s,e,r,n);else throw new Error("resolveFn or rejectFn is not defined.");return{actionMgrID:o,promise:a}};showDataObjectCreateView(e,r=E.VIEW_NAMES.DATA_OBJECT_CREATE_VIEW){let n=ze.buildActionObject({viewName:r,className:e},this.c11nEnv),o=Nr,{promise:i}=this.actionsApiPromise(o,n);return T({type:o,payload:{...n,containerName:E.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 r=e,n=xr(r),o=re(d.CASE_INFO.CASE_INFO_ID,"",r),i=re(d.CASE_INFO.ASSIGNMENT_ID,"",r);if(!n)return new Bd(this.c11nEnv).removeContainerItem({containerItemID:e,skipReleaseLockRequest:!0});let s=eu,a=ze.buildActionObject({containerItemID:e,context:r},this.c11nEnv),c=r&&r.includes(d.MODAL);T({type:s,payload:{...a,isModalAction:c,isDataObject:!0,skipReleaseLockRequest:!0}});let{promise:l}=this.actionsApiPromise(s,a);return l.then(()=>{iI({caseID:o,assignmentID:i,context:r})})}createDataObject(e){if(!e)return Promise.reject(new Error("containerItemID is required parameter"));let{data:r}=we()?.getState()||{},n=r[e]?.dataInfo?.content?.classID;if(!n)return Promise.reject(new Error(d.DATA_CLASS_NOT_FOUND));if($a(E.VIEW_NAMES.SUBSCRIPT_CREATE_VIEW)){let u=this.handleSubscript.call(this,e,this.c11nEnv);if(u)return u}let i=_i.getSavableDataPage(n),s=ou,a=!!e&&e.includes(d.MODAL),c=ze.buildActionObject({containerItemID:e,dataPageID:i},this.c11nEnv),{promise:l}=this.actionsApiPromise(s,c);return T(rI({...c,isModalAction:a,isFormValid:Dr(e)})),l}deleteDataObject(e,r){if(!e)return Promise.reject(new Error("className is required parameter"));if(!r)return Promise.reject(new Error("keys is required parameter"));let n=mS,o=_i.getSavableDataPage(e),i=_i.getDataPageKeys(o),s={};if(i)for(let l of i)s[l.keyName]=l.isAlternateKeyStorage?r[l.linkedField]:r[l.keyName];let a=ze.buildActionObject({dataViewName:o,dataViewParameters:s},this.c11nEnv),{promise:c}=this.actionsApiPromise(n,a);return T(IV({...a})),c}getDataObjectView(e,r,n={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(!r)return Promise.reject(new TypeError(this.MSG_KEY_PROPERTIES_REQUIRED));if(typeof r!="object")return Promise.reject(new TypeError("keyProperties must be a object"));let o=fS,{dataPageID:i,dataViewParameters:s}=kV(e,r),a=ze.buildActionObject({dataLookUp:i,keyProperties:r,requestPayload:s,viewName:n.viewName||E.VIEW_NAMES.DATA_OBJECT_EDIT_VIEW,containerName:d.MODAL,readOnly:n.readOnly,actionName:n.actionName},this.c11nEnv),{promise:c}=this.actionsApiPromise(o,a);return T(nI({...a})),c}updateDataObject(e,r){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if(!r)return Promise.reject(new Error("keys 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));let{dataPageID:i,keys:s}=LV(o,r),a=iu,c=e&&e.includes(d.MODAL),l=ze.buildActionObject({containerItemID:e,dataPageID:i,key:s},this.c11nEnv),u=n[e]?.caseInfo?.headers?.etag,{promise:p}=this.actionsApiPromise(a,l);return T(oI({...l,isModalAction:c,isFormValid:Dr(e),etag:u})),p}updateDataObjectFields(e,r,n,o={}){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(!r||Object.keys(r).length===0)return Promise.reject(new Error(this.MSG_KEY_PROPERTIES_REQUIRED));let{etag:i,context:s=this.c11nEnv.getContextName()}=o,{restApi:a,reqType:c}=U(dS,{data_view_ID:e});return M(a,{method:c,headers:i?{"if-match":i}:{},body:{data:{...n,...r},pageInstructions:[]}},s)}openDataObjectAction(e,r,n,o){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(!r)return Promise.reject(new TypeError(this.MSG_KEY_PROPERTIES_REQUIRED));if(typeof r!="object")return Promise.reject(new TypeError("keyProperties must be a object"));if(!n)return Promise.reject(new Error(this.MSG_ACTION_ID_REQUIRED));if(!o)return Promise.reject(new Error(this.MSG_ACTION_NAME_REQUIRED));let i=gS,{dataViewParameters:s,dataPageID:a,dataPageKeys:c}=kV(e,r),l=ze.buildActionObject({actionID:n,actionName:o,dataViewParameters:s,lookupDatapage:a,containerName:d.MODAL,dataViewPayload:c,context:this.c11nEnv.getContextName()},this.c11nEnv),{promise:u}=this.actionsApiPromise(i,l);return T({type:i,payload:{...l}}),u}submitDataObjectAction(e,r,n,o){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(!r)return Promise.reject(new Error(this.MSG_KEY_PROPERTIES_REQUIRED));if(!n)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=o?.jsActionQueryParams,c=Ma(e),l=te(c),u=We(l,c)||{},{resourceType:p="",key:m=""}=u,f=Vi,{dataPageID:h,keys:S}=LV(s,r),A=ze.buildActionObject({containerItemID:e,actionID:n,resourceType:p,key:m,keys:S,savableDatapage:h,containerName:d.MODAL,context:e,jsActionQueryParams:a},this.c11nEnv);A.context=e;let C=i[e]?.caseInfo?.headers?.etag,{promise:_}=this.actionsApiPromise(f,A);return T({type:f,payload:{...A,isFormValid:Dr(e),etag:C}}),_}createWork(e,r={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=ae.getRemoteCaseClassBySourceClass(e)??e,window.pms?.plugins?.c11n?.createWork)return window.pms.plugins.c11n.createWork(e,P.getDefaultQualifiedName("pyStartCase"),r);let{dockable:n=!1}=r?.modalOptions||{},o=r.theType?r.theType:Lse(e),i=ze.buildActionObject({class:e,flowType:P.getDefaultQualifiedName("pyStartCase"),containerName:d.PRIMARY,openCaseViewAfterCreate:!0,...r,theType:o,modalOptions:{isDockable:n}},this.c11nEnv),{promise:s}=this.actionsApiPromise(o,i);if(i.headers={...i.headers},r.channelName?i.headers[d.X_ORIGIN_CHANNEL]=r.channelName:v.isWSSPortal()&&(i.headers[d.X_ORIGIN_CHANNEL]="WSS"),o=this.handleRemoteCaseForCreateWork(e,i,o),Tr.getPreviewMode()){i.debugInfo={debugId:g.generateUniqueID()};let a=Ge.getCoreHeadersFromContext(i?.context||""),c=String(a?.debugInfo?.[d.COREHEADER_APP_DEBUG_ID]||"");c&&o!==zs&&(i.debugInfo={debugId:c})}return T({type:o,payload:{...i}}),s}handleRemoteCaseForCreateWork(e,r,n){if(ae.isRemoteCase(e)){let{RemoteClassName:o,RemoteSystemID:i,name:s}=ae.getRemoteCase(e);if(r.className=e,r.class=o,w.setRemoteCaseHeaderByContext(r,i),ae.isTraditionalRemoteCase(e)||ae.isRemoteCaseVersionDifferent(e)){let a={className:e,name:s,action:hm,remoteClassName:o};return w.setTraditionalRemoteCaseParams(r,a)}}return n}createCase(e,r={}){return this.createWork(e,{...r,theType:"CREATE_WORK"})}getDataObjectActions(e,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));let n=nS,o=ze.buildActionObject({dataViewID:e,dataViewParameters:r},this.c11nEnv),{promise:i}=this.actionsApiPromise(n,o);return T({type:n,payload:{...o}}),i}getDescendants(e,r){if(!e)return Promise.reject(new Error(this.MSG_CASE_ID_REQUIRED));if(typeof r!="string")return Promise.reject(new TypeError(this.MSG_CONTEXT_STRING));let n=r||this.c11nEnv.getContextName(),o=Dk,i=ze.buildActionObject({caseID:e,currentContext:n},this.c11nEnv),{promise:s}=this.actionsApiPromise(o,i),a=MV({...i,context:n});return T(a),s}openWorkByHandle(e,r,n={}){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(!r)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if(typeof r!="string")return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(r=ae.getRemoteCaseClassBySourceClass(r)??r,window.pms?.plugins?.c11n?.openWorkByHandle)return window.pms.plugins.c11n.openWorkByHandle(e,r);let o={insKey:e,acTargetName:n.targetContainer||d.PRIMARY,containerName:n.targetContainer||d.PRIMARY},i=B.shouldUseUnifiedHandling()||!B.isObjectCaseType(r)?uo:Qk,s=ze.buildActionObject(o,this.c11nEnv),{promise:a}=this.actionsApiPromise(i,s);return s.headers={...s.headers},n.channelName?s.headers[d.X_ORIGIN_CHANNEL]=n.channelName:v.isWSSPortal()&&(s.headers[d.X_ORIGIN_CHANNEL]="WSS"),s.className=r,ae.isRemoteCase(r)&&(i=this.setRemoteCaseParamsForOpenCase(s,r,i,n.remoteCaseMeta)),Tr.getPreviewMode()&&n.targetContainer!==d.WORKAREA&&(s.debugInfo={debugId:g.generateUniqueID()}),T({type:i,payload:{...n,...s}}),a}setRemoteCaseParamsForOpenCase(e,r,n,o={}){let{RemoteSystemID:i,RemoteClassName:s,name:a}=ae.getRemoteCase(r);if(w.setRemoteCaseHeaderByContext(e,i),e.isRemoteCase=!0,e.remoteCaseClass=r,e.remoteCaseMeta=o,ae.isTraditionalRemoteCase(r)||ae.getRemoteAppPlatformVersion(i??"")){let c={className:r,name:a,action:AS,remoteClassName:s};return w.setTraditionalRemoteCaseParams(e,c)}return n}openAssignment(e,r,n={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(!r)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if(typeof r!="string")return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(r=ae.getRemoteCaseClassBySourceClass(r)??r,window.pms?.plugins?.c11n?.openAssignment)return window.pms.plugins.c11n.openAssignment(e,r);let o={assignmentID:e,doDeleteCaseSummary:!0,containerName:n.containerName,isActionFromToDoList:n.isActionFromToDoList,isChild:!1,...n.renderInline!==void 0&&{renderInline:n.renderInline},...n.pageName!==void 0&&{pageName:n.pageName}};n.isChild&&(o.containerName=d.PRIMARY,o.isChild=n.isChild);let i=wa,s=ze.buildActionObject(o,this.c11nEnv),{promise:a}=this.actionsApiPromise(i,s);if(s.headers=s.headers||{},n.channelName?s.headers[d.X_ORIGIN_CHANNEL]=n.channelName:v.isWSSPortal()&&(s.headers[d.X_ORIGIN_CHANNEL]="WSS"),ae.isRemoteCase(r)){let{RemoteClassName:l,RemoteSystemID:u,name:p}=ae.getRemoteCase(r);if(w.setRemoteCaseHeaderByContext(s,u),s.remoteCaseMeta=n.remoteCaseMeta,ae.isTraditionalRemoteCase(r)||ae.getRemoteAppPlatformVersion(u??"")){let m={className:r,name:p,action:ES,remoteClassName:l};i=w.setTraditionalRemoteCaseParams(s,m)}}s.className=r,s.activeItemCaseViewMode=this.c11nEnv.getValue("context_data.caseViewMode"),Tr.getPreviewMode()&&![d.WORKAREA].includes(n.containerName)&&(s.debugInfo={debugId:g.generateUniqueID()});let c={context:s.context||n.context,containerName:s.containerName||n.containerName,targetContainerName:s.containerName||n.containerName,viewType:s.viewType||n.viewType,skipBrowserSemanticUrlUpdate:n.skipBrowserSemanticUrlUpdate};return T({type:i,payload:{...s,...c}}),a}finishAssignment(e,r={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 n=pe(e),o=n;if(n?.includes(`/${d.WORKAREA}`)&&(o=n.substring(0,o?.lastIndexOf(`/${d.WORKAREA}`))),$j(n)){let oe=[{type:"error",message:this.c11nEnv.getLocalizationService().getLocalizedMessage(this.MSG_ACTIVE_SUGGESTION_UNATTENDED)}];return Nn({messages:oe,context:o,category:E.PAGE}),Promise.reject({type:E.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR})}let i=r?.isTriggeredFromDifferentContext,{caseID:s,assignments:a,localActionID:c,caseActions:l,caseInfo:u,businessID:p,caseTypeID:m,caseTypeName:f}=cT(e,this.c11nEnv,{isTriggeredFromDifferentContext:i}),h=Yt(u),S=!1,A,C=l?.find(oe=>oe.ID===c);C?S=C?.type==="Case":A=W(n);let{assignmentID:_}=cT(e,this.c11nEnv,{isTriggeredFromDifferentContext:i});A?.context_data?.actionType&&(S=A.context_data.actionType===d.CASE,_=_||A.context_data.assignmentID);let I=UU(a,_,c,u?.activeActionID),[N,x]=s.split(" "),H={class:N,actionID:I,assignmentID:_,caseID:s,workID:x,containerName:this.c11nEnv.getContainerName(),containerItemID:e,isCaseWideAction:S,doDeleteCaseSummary:!0,isInCreateStage:h,businessID:p,caseTypeID:m,caseTypeName:f};e?.includes(d.MODAL)&&(H.containerName=d.MODAL,H.isModalAction=!0),H.outcome=r.outcomeID,H.jsActionQueryParams=r.jsActionQueryParams,u?.isLocalAction&&(H.viewType=it.FORM);let G=kse(e,m,u?.isObjectWideAction),ne=ze.buildActionObject(H,this.c11nEnv);ne.context=n;let{promise:j}=this.actionsApiPromise(G,ne);return ne.isProcessAction=this.c11nEnv.getValue("isProcessAction","isProcessAction")||W(n).context_data.isProcessAction,ne.headers??={},v.isWSSPortal()&&(ne.headers[d.X_ORIGIN_CHANNEL]="WSS"),Ct.executeOrQueueDeferredAction({type:G,payload:{...ne,context:n}}),j}getNextWork(e={}){if(v.getRenderingMode()==="HYBRID")return $.publish(E.PUB_SUB_EVENTS.CASE_EVENTS.GET_NEXT_WORK,{userIdentifier:v.getOperatorIdentifier()}),Promise.resolve();let r=wa,n=ze.buildActionObject({...e,containerName:d.PRIMARY,isGetNextWork:!0},this.c11nEnv),{promise:o}=this.actionsApiPromise(r,n);return T({type:r,payload:{...n}}),o}openStage(e){if(!e)return Promise.reject(new Error("stageID is required parameter for openStage"));let r=wa,n=this.c11nEnv.getValue(E.CASE_INFO.CASE_INFO_ID),o=this.c11nEnv.getCaseSummary().headers,i=ze.buildActionObject({containerName:this.c11nEnv.getContainerName(),isOpenStage:!0,stageID:e},this.c11nEnv),{promise:s}=this.actionsApiPromise(r,i),a={type:r,payload:{...i,caseID:n,headers:o}};return T(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 r=tS,n=this.c11nEnv.getValue(E.CASE_INFO.CASES),o=this.c11nEnv.getValue(E.CASE_INFO.ACTIVE_ACTION_ID),i=this.c11nEnv.getValue(E.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=ze.buildActionObject(s,this.c11nEnv),c=pe(e);a.context=c;let{promise:l}=this.actionsApiPromise(r,a);return T({type:r,payload:{...a,context:c,cases:n,actionID:o,isAssignment:i,isFormValid:Dr(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 r=rS,n=this.c11nEnv.getValue(E.CASE_INFO.CASES),o=this.c11nEnv.getValue(E.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=ze.buildActionObject(s,this.c11nEnv),c=pe(e);a.context=c;let{promise:l}=this.actionsApiPromise(r,a);return T({type:r,payload:{...a,context:c,cases:n,actionID:o,isFormValid:Dr(c),classID:this.c11nEnv.getCurrentClassID()}}),l}openBulkAction(e,r){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}=r;return r.callbacks=null,window.pms.plugins.c11n.openBulkAction(e,r).then(p=>{p==="cancel"?u?.cancel?.():u?.submit?.()})}let{selectedList:n,runningMode:o}=r,i=r.type,s={selectedList:n,vcName:r.target,actionName:r?.name,actionID:e,doDeleteCaseSummary:!0,localActionType:i,runningMode:o,...r},a=wk,c=ze.buildActionObject(s,this.c11nEnv),{promise:l}=this.actionsApiPromise(a,c);return T({type:a,payload:{...c}}),l}cancelBulkAction(e){return e?typeof e!="string"?Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING)):new Bd(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)):(T({type:_t,payload:{reference:E.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)):(T({type:_t,payload:{reference:E.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[,r]=this.c11nEnv.getValue(E.CASE_INFO.DUPLICATECASEINSKEY).split(" "),n={type:_t,payload:{reference:E.CASE_INFO.DUPLICATECASEFLAG,value:d.DUPLICATE,context:e}},o={type:_t,payload:{reference:E.CASE_INFO.DUPLICATECASEID,value:r,context:e}};return T([n,o]),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 r={type:_t,payload:{reference:E.CASE_INFO.DUPLICATECASEFLAG,value:d.IGNORE,context:e}},n={type:_t,payload:{reference:E.CASE_INFO.DUPLICATECASEID,value:"",context:e}},o={type:_t,payload:{reference:E.CASE_INFO.DUPLICATECASEINSKEY,value:"",context:e}};return T([r,n,o]),this.finishAssignment(e)}openLocalAction(e,r){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 n=this.getCaseID(r);if(window.pms?.plugins?.c11n?.openLocalAction)return r.caseID=n,UV(window.pms.plugins.c11n.openLocalAction,e,r);let o=r.assignKey||this.c11nEnv.getValue(E.CASE_INFO.ASSIGNMENT_ID),i=r.type,s={caseID:n,assignmentID:o,vcName:r.target,actionName:r?.name,assignKey:o,actionID:e,doDeleteCaseSummary:!0,localActionType:i,...r},a=r.containerName===d.ACTIONAREA?ji:Use(r),c=ze.buildActionObject(s,this.c11nEnv);(r.containerName===d.ACTIONAREA||r.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===ji)return T({type:a,payload:{...c}}),l;if(r.type==="Object")return T({type:a,payload:{...c}}),l;let f=se(p),h=this.c11nEnv.getValue(d.getProperty(E.CASE_INFO.CASE_INFO_ID)),A=n!==h&&f?ae.getRemoteHeaderByContext(f)||ae.getRemoteHeaderByContext(u):ae.getRemoteHeaderByContext(u);if(w.setRemoteCaseHeaderByContext(c,A),!p)return m=u,T({type:a,payload:{...c,contextName:u,continueExecution:!1}}),l;let{continueExecution:C,containerItemID:_}=qd(u,n,p);if(m=_,!C||m&&we()?.getState()?.data[m]?.context_data?.caseViewMode==="review")return T({type:a,payload:{...c,contextName:u,continueExecution:C}}),l;let I=m,N=I&&I.includes(d.MODAL),x=r.assignKey||this.c11nEnv.getValue(E.CASE_INFO.ASSIGNMENT_ID),H=W(m),G=H?.caseInfo?.assignments?H.caseInfo.assignments[0]?.actions[0]?.ID:void 0,ne=n,j=se(p),oe=mr(te(j)),Ie=W(j),he=oe&&Ie;he&&(ne=Ie?.caseInfo?.ID,x=Ie?.caseInfo?.assignments[0]?.ID,G=Ie?.caseInfo?.assignments[0]?.actions[0]?.ID);let De=this.c11nEnv.getContainerName(),Fe=this.c11nEnv.getValue(E.CASE_INFO.CASE_TYPE_ID),_e=!0,Ye=this.c11nEnv.getValue("isProcessAction","isProcessAction"),Oe=ze.buildActionObject({context:I,containerItemID:he?j:m,assignmentID:x,actionID:G,caseID:he?ne:n,containerName:De,caseType:Fe,isModalAction:N,isFormValid:_e,isProcessAction:Ye},this.c11nEnv);Oe.context=he?j:m;let ft=pe(m),Qt=this.c11nEnv.getCaseSummary(),yr=Yt(Qt),Xt=ze.buildActionObject({caseID:n,containerItemID:m,cancelContext:ft},this.c11nEnv),un={};return N?(Xt.acTargetName=d.MODAL,Xt.isInCreateStage=yr,Xt.isModalAction=N,un={...Xt}):un={...Xt,acName:Z(this.c11nEnv.getContainerName(),Xt.context)},T({type:a,payload:{...c,contextName:u,saveActionPayload:Oe,cancelActionPayload:un,continueExecution:C}}),l}openProcessAction(e,r){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 n=this.c11nEnv.getValue(E.CASE_INFO.CASE_INFO_ID)||r.caseID;if(window.pms?.plugins?.c11n?.openProcessAction)return r.caseID=n,UV(window.pms.plugins.c11n.openProcessAction,e,r);let o=this.c11nEnv.getValue(E.CASE_INFO.ASSIGNMENT_ID)||r.assignKey,i=r.type,s={caseID:n,assignmentID:o,vcName:r.target,actionName:r?.name,assignKey:o,actionID:e,doDeleteCaseSummary:!0,processActionType:i,isProcessAction:!0,...r},a=eI,c=ze.buildActionObject(s,this.c11nEnv),l=this.c11nEnv.getContextName(),u=Ke(l)[0],p=ae.getRemoteHeaderByContext(l);if(!p&&u){let h=ut(u);h?.accessedOrder.forEach(S=>{(r.caseID||n)===h.items[S].key&&(p=ae.getRemoteHeaderByContext(h.items[S].context))})}w.setRemoteCaseHeaderByContext(c,p);let{promise:m}=this.actionsApiPromise(a,c),{containerItemID:f}=qd(l,n,u);return T({type:a,payload:{...c,saveContainerItemID:f}}),m}navigateToStep(e,r){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(!r)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if(typeof r!="string")return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));let n=eS,o=this.c11nEnv.getValue(E.NEXT_ASSIGNMENT_INFO_ID)?this.c11nEnv.getValue(E.NEXT_ASSIGNMENT_INFO_ID):this.c11nEnv.getValue(E.CASE_INFO.ASSIGNMENT_ID),i=Yt(this.c11nEnv.getCaseSummary()),s=this.c11nEnv.getValue(E.CASE_INFO.CASE_INFO_ID),a={ID:o,stepID:e,acTargetName:this.c11nEnv.getContainerName(),targetContainerName:this.c11nEnv.getContainerName(),containerItemID:r,doDeleteCaseSummary:!0,isInCreateStage:i,caseID:s};r&&r.includes(d.MODAL)&&(a.acTargetName=d.MODAL);let c=ze.buildActionObject(a,this.c11nEnv),{promise:l}=this.actionsApiPromise(n,c),u=pe(r);return T({type:n,payload:{...c,containerItemID:r,context:u}}),l}cancelAssignment(e,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));let{CASE_INFO:n}=E,o=Ui,i=pe(e),s=e&&e.includes(d.MODAL),a=this.c11nEnv.getCaseSummary(),c=Yt(a),l=this.c11nEnv.getValue(d.getProperty(n.CASE_INFO_ID)),u=this.c11nEnv.getValue(n.ASSIGNMENT_ID),p=ze.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:Z(this.c11nEnv.getContainerName(),p.context)};let{promise:f}=this.actionsApiPromise(o,p);return T({type:o,payload:m}),f.then(()=>{r||iI({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:r}=E,n=e,o=eu,i=e&&e.includes(d.MODAL),s=this.c11nEnv.getValue(r.CASE_INFO_ID),a=ze.buildActionObject({caseID:s,containerItemID:e,context:n},this.c11nEnv);if(!xr(n))return new Bd(this.c11nEnv).removeContainerItem({containerItemID:e}).then(()=>{Iu(s),iI({caseID:s,context:this.c11nEnv.getContextName()})});T({type:o,payload:{...a,isModalAction:i}});let{promise:l}=this.actionsApiPromise(o,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:r}=E,n=eu,o=e,i=o&&o.includes(d.MODAL),s=this.c11nEnv.getCaseSummary(),a=this.c11nEnv.getValue(d.getProperty(d.CASE_INFO.CASE_TYPE_ID)),c=Yt(s),l=this.c11nEnv.getValue(d.getProperty(r.CASE_INFO_ID)),u=ze.buildActionObject({caseID:l,containerItemID:e,context:o},this.c11nEnv),p=this.c11nEnv.getValue("isProcessAction","isProcessAction"),m=v.isCoexistenceAppOfType(d.APP_TYPE.UIKIT);u.isProcessAction=p;let f=v.getRenderingMode();if(c&&(i||m||f==="EMBED")&&!_c(s)){let S=this.c11nEnv.getValue(d.getProperty(d.CASE_INFO.IS_FIRST_ASSIGNMENT)),A=xr(o);if(this.shouldDeleteCaseInCreateStage(A,S,m)){let C=!!B.isExternalObject(a);return this.deleteCaseInCreateStage(e,C)}T({type:n,payload:{...u,isModalAction:i,isChildCase:LU(s),isInCreateStage:c}})}let{promise:h}=this.actionsApiPromise(n,u);return h.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 r=Ii,n=this.getSaveActionPayload(e,!0),{promise:o}=this.actionsApiPromise(r,n);return Ct.executeOrQueueDeferredAction(ul(n)),o}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 r=Ii,n=this.getSaveActionPayload(e),{promise:o}=this.actionsApiPromise(r,n);return T(ul(n)),o}deleteCaseInCreateStage(e,r=!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 n=vh,o=e,i=o&&o.includes(d.MODAL),s=this.c11nEnv.getValue(d.getProperty(E.CASE_INFO.CASE_INFO_ID)),a=this.c11nEnv.getValue(d.getProperty(E.CASE_INFO.CASE_TYPE_ID)),c=ze.buildActionObject({caseID:s,caseType:a,containerItemID:e,context:o,ignoreCaseDeletion:r},this.c11nEnv),l=this.c11nEnv.getValue("isProcessAction","isProcessAction"),u=this.c11nEnv.getValue(d.getProperty(E.CASE_INFO.PARENTCASEINFO));c.isProcessAction=l,c.parentCaseInfo=u;let p=`${d.APP.APP}/${ge.PRIMARY}`,m=st(p,ge.PRIMARY);c.parentContext=m,i&&(c.targetName=d.MODAL,c.containerName=ge.MODAL,c.isModalAction=i),T(CV(c));let{promise:f}=this.actionsApiPromise(n,c);return f.then(()=>{iI({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:r}=ye.getRestEndPoint("getRecents")||{};r=`${r}?maxResultsToFetch=${e}`;let n=gt.getServerURL()+r;return M(n,{method:"GET",headers:{}})}updateRecents(e,r,n,o){let{restApi:i}=ye.getRestEndPoint("updateRecents")||{},s=`${gt.getServerURL()}${i}`;return M(s,{method:"PATCH",headers:{"Content-Type":"application/json"},body:{pyLabel:n,pyID:r,classID:e,ID:o}})}logout(){let{restApi:e}=ye.getRestEndPoint("Logout")||{},r=`${gt.getServerURL()}${e}`;return M(r,{method:"GET",headers:{}}).then(n=>(Object.keys(be.rootNodes).forEach(o=>{xh.cleanCaches(o)}),be.rootNodes={},sessionStorage.clear(),ys(),Promise.resolve(n)))}invoke(e,r={}){let n={method:r.method||"GET",body:r.body};return M(e,n,this.c11nEnv.getContextName())}showCasePreview(e,r={}){this.loadView(e,P.getDefaultQualifiedName("pyCasePreview"),{container:ge.PREVIEW,containerName:ge.PREVIEW,context:E.APP.APP,...r})}showDataPreview(e,r,n){return e?typeof e!="string"?Promise.reject(new TypeError("dataContext must be string")):r?typeof r!="object"?Promise.reject(new TypeError("dataContextParameters must be an object")):this.showData(P.getDefaultQualifiedName("pyDataPreview"),e,r,{container:ge.PREVIEW,containerName:ge.PREVIEW,context:E.APP.APP,...n||{},skipSemanticUrl:!0}):Promise.reject(new Error("dataContextParameters is required parameter")):Promise.reject(new Error("dataContext is required parameter"))}loadView(e,r,n){let o=ze.buildActionObject({caseId:e,viewName:r,caseClassName:this.c11nEnv.getValue(d.getProperty(E.CASE_INFO.CASE_TYPE_ID)),RemoteSystemID:ae.getRemoteHeaderByContext(this.c11nEnv.getContextName())},this.c11nEnv);n||(n={containerName:this.c11nEnv.getContainerName(),updateData:!1}),n&&typeof n=="object"?(Object.hasOwn(n,"container")&&!Object.hasOwn(n,"containerName")&&(n.containerName=n.container),o={...o,...n}):o={...o,containerName:this.c11nEnv.getContainerName()};let i=Kl,{promise:s}=this.actionsApiPromise(i,o,!1);return T({type:i,payload:{...o}}),s}showPage(e,r,n={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(!r)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if(typeof r!="string")return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(window.pms?.plugins?.c11n?.showPage)return window.pms.plugins.c11n.showPage(e,r,n);let o=ze.buildActionObject({viewName:e,className:r},this.c11nEnv),i=Nr,{promise:s}=this.actionsApiPromise(i,o);return Tr.getPreviewMode()&&(o.debugInfo={debugId:g.generateUniqueID()}),T({type:i,payload:{...o,...n,containerName:n.containerName||this.c11nEnv.getContainerName(),skipSemanticUrl:n.skipSemanticUrl}}),s}showInsight(e,r={}){if(!e)return Promise.reject(new Error(this.MSG_INSIGHTID_REQUIRED));let n=ze.buildActionObject({},this.c11nEnv),o=Qy,{promise:i}=this.actionsApiPromise(o,n);return T({type:o,payload:{...n,containerName:this.c11nEnv.getContainerName(),skipSemanticUrl:r.skipSemanticUrl||!1,insightID:e}}),i}showDashboard(e,r={}){if(!e)return Promise.reject(new Error(this.MSG_DASHBOARDID_REQUIRED));let n=ze.buildActionObject({},this.c11nEnv),o=Xy,{promise:i}=this.actionsApiPromise(o,n);return T({type:o,payload:{...n,containerName:this.c11nEnv.getContainerName(),skipSemanticUrl:r.skipSemanticUrl||!1,dashboardID:e}}),i}showData(e,r,n,o={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(!r)return Promise.reject(new Error("dataContext is required parameter"));if(typeof r!="string")return Promise.reject(new TypeError("dataContext must be string"));let i=ze.buildActionObject({pageName:e,dataContext:r,dataContextParameters:n,RemoteSystemID:ae.getRemoteHeaderByContext(this.c11nEnv.getContextName())},this.c11nEnv),s=uc;o?.containerName||(o.containerName=v.getRenderingMode()==="HYBRID"?dl.getRuntimeParam(d.HYRBID_ROOT_CONTAINERNAME):Bt.getTargetViewContainerName(s));let{promise:a}=this.actionsApiPromise(s,i);return T({type:s,payload:{...i,...o,skipSemanticUrl:!!o.skipSemanticUrl}}),a}changeHandler(e,r){ze.changeHandler(e,r)}eventHandler(e,r){ze.eventHandler(e,r)}triggerFieldChange(e,r,n=!1,o={skipDirtyValidation:!1,skipPageInstructionGeneration:!1}){let i=this.c11nEnv.getContextName(),s=this.c11nEnv.getPageReference(),a=J.getContextPath(s,e);n||this.c11nEnv.getValidationApi().validate(r),this.c11nEnv.isInsideList()&&!o.skipPageInstructionGeneration&&this.c11nEnv.getListActions().updateProperty(e,r,o);let c=this.c11nEnv.getValue(d.CLASS_ID),l=e?e.split(".").filter(u=>!!u):[];l.length>1&&(l.pop(),c=re(`.${l.join(".")}.classID`,s,i)),e=g.trimDotForProperty(e),T({type:vn,payload:{reference:a,value:r,context:i,pageReference:this.c11nEnv.getPageReference(),propertyName:e||this.c11nEnv.getComponentConfig().value,classID:c}})}updateFieldValue(e,r,n={}){let{removePropertyFromChangedList:o=!1,isArrayDeepMerge:i=!0,contextPageReference:s="",isListEntry:a=!1,skipDirtyValidation:c=!1,associatedProperty:l,skipPageInstructionGeneration:u=!1}=n,p=this.c11nEnv.getContextName(),m=this.c11nEnv.getPageReference(),f=s?.startsWith(m)?s.replace(m,""):s;m=s||m;let h=J.getContextPath(m,e),S=!1;this.c11nEnv.isInsideList()&&!u&&this.c11nEnv.getListActions().updateProperty(f?`${f}${e}`:e,r,{isArrayDeepMerge:i,skipDirtyValidation:c}),this.c11nEnv.isBulkAction()&&(S=!0),e||(e=this.c11nEnv.getStateProps().value),dt({type:E.MESSAGES.MESSAGES_TYPE_ERROR,property:e,pageReference:m,context:p,isListEntry:a}),T({type:_t,payload:{reference:h,value:r,context:p,isArrayDeepMerge:i,skipDirtyValidation:c,...S&&{isStrictTracking:S},...o&&{removePropertyFromChangedList:o},...l&&{associatedProperty:`${m}${l}`}}})}activateModalContainerItem(e){let r=iS,{context:n}=e,o=n&&n.includes(d.MODAL),i=ze.buildActionObject({...e,containerName:this.c11nEnv.getContainerName(),containerItemID:n},this.c11nEnv);o&&(i.containerName=d.MODAL,i.isModalAction=o),T({type:r,payload:i});let{promise:s}=this.actionsApiPromise(r,i);return s}refreshCaseView(e,r,n,o={}){let{promise:i,actionMgrID:s}=this.actionsApiPromise("REFRESH_DATA"),{autoDetectRefresh:a,propertyName:c,preserveClientChanges:l,classID:u,context:p,optionalPayload:m,isArrayDeepMerge:f}=o,h={actionMgrID:s,caseViewAction:!0,preserveClientChanges:l,propertyName:c,classID:u,isArrayDeepMerge:f,optionalPayload:m};o.refreshFor&&(h.refreshFor=o?.refreshFor),o.resetForm&&(h.resetForm=o?.resetForm),o.skipPayloadGeneration&&(h.skipPayloadGeneration=o?.skipPayloadGeneration);let S=p||this.c11nEnv.getContextName(),A=this.c11nEnv.getPageReference(),C=this.c11nEnv.getValue(d.CONTEXT_DATA_MODAL_VIEW.CONTEXT_DATA_MODAL_VIEW),{isMultiRecordData:_,editType:I}=C||{};if(a&&_&&I===d.ACTION){let N=this.c11nEnv.getValue(E.CASE_INFO.ASSIGNMENT_ID),{actionID:x,interestPage:H,interestPageActionID:G,isLocalAction:ne}=C;vu(e,N,x,S,H,G,ne,_,I,h)}else!_&&a&&(kU(S,A)||bc(S,A))?Ru(S,n,h):Dc(e,r,S,n,h);return i}refreshEmbeddedDataWithAction(e,r,n,o,i,s,a,c,l={}){let{promise:u}=this.actionsApiPromise(jt.REFRESH_DATA),p=this.c11nEnv.getContextName();return vu(e,r,n,p,o||this.c11nEnv.getPageReference(),i,s,a,c,l),u}openEmbeddedDataModal(e,r,n,o,i,s,a,c,l=!1,u=E.MODAL){let p=Bi,m=r.getCaseInfo().getKey(),{localAction:f,assignmentID:h,actionID:S}=jse(r,a),A=r.getPageReference(),C=typeof o=="string"?`${r.getPageReference().replace(d.getProperty(E.CASE_INFO.CASE_INFO_CONTENT),"")}${n}.${o}`:`${r.getPageReference().replace(d.getProperty(E.CASE_INFO.CASE_INFO_CONTENT),"")}${n}[${o}]`;A.startsWith(E.OBJECT_INFO.OBJECT_INFO)&&!m&&(m=r.getCaseInfo().getObjectKey(),C=`${r.getPageReference().replace(E.OBJECT_INFO.OBJECT_INFO_CONTENT,"")}${n}[${o}]`);let _=r.getMetadata(),I=Array.isArray(_?.config?.children)?_.config.children[0]?.children||[]:[],N={readOnly:l,targetProperty:n,index:o,viewID:e,ID:m,actionType:i,interestPage:g.convertPageRefToClipboardPageNotation(C),heading:s,editType:a,interestPageActionID:a===d.ACTION?c:void 0,actionID:S,isLocalAction:f,operationFlag:d.EMBEDDED_DATA_MODAL.SHOW_ROW,isPageGroup:typeof o=="string",assignmentID:!f&&a===d.ACTION?h:void 0,columns:I},x=ze.buildActionObject(N,this.c11nEnv);if(a===d.ACTION){let ne=g.getETag(x.context);x.headers={"If-Match":ne}}let{promise:H}=this.actionsApiPromise(p,x);return v.getFeatureMap().granularUIRefresh&&I.forEach(ne=>{let j=fe.trimAnnotation(ne.config.value),oe=lt(j.startsWith(".")?j.replace(".",""):j,ne.config.classID);oe&&!Array.isArray(oe)&&oe.isDeclarativeTarget&&be.addFieldNode(r.getContextName(),A+C,r.viewName??"",j,"",{isDeclarativeTarget:!0,propertyName:j,pageReference:A+C})}),T({type:p,payload:{...x,containerName:u,skipSemanticUrl:!0}}),H}getEmbeddedDataView(e,r,n,o,i,s="",a="",c=!1,l=""){let u=hS,p=r.getCaseInfo().getKey(),m=r.getValue(E.CASE_INFO.IS_LOCAL_ACTION),f=r.getValue(E.CASE_INFO.ASSIGNMENT_ID),h=jV(r,s,m),S=r.getPageReference(),A=typeof o=="string"?`${r.getPageReference().replace(d.getProperty(E.CASE_INFO.CASE_INFO_CONTENT),"")}${n}.${o}`:`${r.getPageReference().replace(d.getProperty(E.CASE_INFO.CASE_INFO_CONTENT),"")}${n}[${o}]`;S.startsWith(E.OBJECT_INFO.OBJECT_INFO)&&!p&&(p=r.getCaseInfo().getObjectKey(),A=`${r.getPageReference().replace(E.OBJECT_INFO.OBJECT_INFO_CONTENT,"")}${n}[${o}]`);let C={readOnly:c,targetProperty:n,index:o,viewID:e,ID:p,actionType:i,interestPage:g.convertPageRefToClipboardPageNotation(A),editType:s,interestPageActionID:s===d.ACTION?a:void 0,actionID:h,isLocalAction:m,operationFlag:d.EMBEDDED_DATA_MODAL.SHOW_ROW,isPageGroup:typeof o=="string",assignmentID:!m&&s===d.ACTION?f:void 0,containerName:l},_=ze.buildActionObject(C,this.c11nEnv);if(s===d.ACTION){let N=g.getETag(_.context);_.headers={"If-Match":N}}let{promise:I}=this.actionsApiPromise(u,_);return T({type:u,payload:{..._,skipSemanticUrl:!0}}),I}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 r=yS,n=this.c11nEnv.getValue(d.getProperty(E.CASE_INFO.CASE_INFO_ID)),o=this.c11nEnv.getValue(d.getProperty(E.CASE_INFO.ASSIGNMENT_ID)),i=this.c11nEnv.getPageReference().replace(d.getProperty(E.CASE_INFO.CASE_INFO_CONTENT),""),s=pe(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(E.OBJECT_INFO.OBJECT_INFO)&&!n&&(n=this.c11nEnv.getValue(E.OBJECT_INFO.OBJECT_INFO_ID),i=this.c11nEnv.getPageReference().replace(E.OBJECT_INFO.OBJECT_INFO_CONTENT,"")),dt({context:s,stateObj:W(s),clearContextMessages:!0});let h={containerItemID:e,containerName:this.c11nEnv.getContainerName(),doDeleteCaseSummary:!0,isInCreateStage:!1,ID:n,viewID:m,isFormValid:Dr(s),interestPage:g.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:o};e&&e.includes(d.MODAL)&&(h.containerName=d.MODAL,h.isModalAction=!0);let S=ze.buildActionObject(h,this.c11nEnv);if(l===d.ACTION){let C=g.getETag(S.context);S.headers={"If-Match":C}}let{promise:A}=this.actionsApiPromise(r,S);if(xr(s)){let[C,_,I]=Wi.getPageListNameAndIndexFromPageName(this.c11nEnv.getPageReference());be.mutatePageList(f,C,_,{type:Wn,rowIndex:I}),T({type:Wn,payload:{pageReference:this.c11nEnv.getPageReference(),context:f,isListEntry:!0}})}return Ct.executeOrQueueDeferredAction({type:r,payload:{...S,context:s}}),A}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 r=pe(e),n=this.c11nEnv.getPageReference(),{promise:o,actionMgrID:i}=this.actionsApiPromise(fc);return Ru(r,n,{actionMgrID:i,isFillFormWithAI:!0,preserveClientChanges:!1}),o}handleSubscript(e,r){if(!$a(E.VIEW_NAMES.SUBSCRIPT_CREATE_VIEW))return Promise.reject(new Error(this.MSG_SUBSCRIPT_VIEW_REQUIRED));let o=SS,i=ze.buildActionObject({containerItemID:e},r);T({type:o,payload:{...i,isDataObject:!0,skipReleaseLockRequest:!0,isFormValid:Dr(e),context:e}});let{promise:s}=this.actionsApiPromise(o,i);return s}showSubscriptCreateView(e,r,n,o=E.VIEW_NAMES.SUBSCRIPT_CREATE_VIEW){let i=ze.buildActionObject({viewName:o,className:e,referenceListStr:r,subscriptName:n},this.c11nEnv),s=Nr,{promise:a}=this.actionsApiPromise(s,i);return T({type:s,payload:{...i,containerName:E.MODAL,skipSemanticUrl:!0,isCreateDataObject:!0}}),a}deleteWork(e,r,n){if(!e)return Promise.reject(new Error("workId is required parameter"));let o=rb,i=B.isExternalCaseType(r),s=ze.buildActionObject({workId:e,caseTypeID:r,isExternalCase:i,...n?.skipDeleteConfirmation&&{skipDeleteConfirmation:!0},...n?.enableBackNavigation&&{enableBackNavigation:!0}},this.c11nEnv),{promise:a}=this.actionsApiPromise(o,s);return T(Bx({...s})),a}deleteDataRecord(e,r){if(!e)return Promise.reject(new Error("className is required parameter"));if(!r)return Promise.reject(new Error("keys is required parameter"));let n=rb,o=ze.buildActionObject({className:e,keys:r},this.c11nEnv),{promise:i}=this.actionsApiPromise(n,o);return T(Bx({...o})),i}},zV=hD;var yD=class{c11nEnv;constructor(e){this.c11nEnv=e}getContextKey(){return this.c11nEnv.getValue(d.getProperty(d.DATA_INFO.DATA_INFO_CONTEXT_KEY))}},FV=yD;var sI=class{fieldType;constructor(e){this.fieldType=e}applyFallback(e){let r=en.getDefaultsforType(this.fieldType);e.currencyISOCode=e.currencyISOCode||r?.currencyISOCode||"USD"}};var aI=class{static getStrategy(e){switch(e){case"Currency":case"Decimal":case"Integer":case"Percentage":return new sI(e);default:return}}};var Cn={DATAPAGE:"DATAPAGE",VIEW:"VIEW",FIELD:"FIELD",CASE:"CASE",PARAGRAPH:"PARAGRAPH",PORTAL:"PORTAL"};var VV=/[\\^$.*+?()[\]{}|]/g,zse=RegExp(VV.source);function Fse(t){return t=Gy(t),t&&zse.test(t)?t.replace(VV,"\\$&"):t}var BV=Fse;var Vse=/\{(\d+)\}/,Bse=t=>{let e=t.split(Vse),r=[],n=new Map,o="",i=0;return e.forEach((s,a)=>{if(a%2===0){o+=BV(s),i+=s.length;return}let c=Number(s),l=n.get(c);if(l!==void 0){o+=`\\${l}`;return}r.push(c),n.set(c,r.length),o+="(.+?)"}),{key:t,pattern:new RegExp(`^${o}$`),groupToPlaceholder:r,literalLength:i}},HV=(t,e)=>{if(!t)return;let r;for(let s of Object.keys(e)){let a=Bse(s),c=a.pattern.exec(t);c&&(!r||a.literalLength>r.template.literalLength)&&(r={template:a,captures:c.slice(1)})}if(!r)return;let{template:n,captures:o}=r,i=[];return n.groupToPlaceholder.forEach((s,a)=>{i[s]=o[a]}),{message:e[n.key],args:i}};var Ri=(t,e,r,n)=>{let o=[Cn.VIEW,Cn.FIELD,Cn.PARAGRAPH],s=[Cn.DATAPAGE,Cn.PARAGRAPH].includes(t)&&n?`#${n}`:"",a=t===Cn.DATAPAGE?"@BASECLASS":r;return t===Cn.DATAPAGE||o.includes(t)?`${a}!${t}!${e}${s}`.toUpperCase():`${t}!${e}${s}`.toUpperCase()},Wd=class t{locale;localeReference;static COMMON_LABELS="COMMONLABELS";static MESSAGES="MESSAGES";static COMPONENT_FIELDS="COMPONENTFIELDS";static CASE_HISTORY="CASEHISTORY";lookupList=[];constructor(e,r){this.localeReference=r,this.locale=e}getLocalizedText(e,r){let n=[...this.localeReference?[this.localeReference.toUpperCase()]:[],...this.lookupList,t.COMPONENT_FIELDS,t.COMMON_LABELS],o=this.#t(e,n)||e;return(r?this.#e(o,r):o)||e}getLocalizedMessage(e,r){let n=this.#t(e,[t.MESSAGES,t.COMMON_LABELS])??e;return(r?this.#e(n,r):n)||e}getLocalizedDataPage(e,r,n,o){if(!r||!n||!e)return e;let s=[Ri(Cn.DATAPAGE,r,void 0,n),t.COMMON_LABELS,...this.lookupList],a=this.#t(e,s)??e;return(o?this.#e(a,o):a)||e}getLocalizedCaseHistory(e){if(!e)return e;let r=vi(this.locale).localeStore[t.CASE_HISTORY];if(!r||Object.keys(r).length===0)return e;let n=HV(e,r);if(!n?.message)return e;let o=n.args.map(i=>this.getLocalizedText(i));return this.#e(n.message,o,!0)}#e(e,r,n=!1){if(r.length===0)return e;let o=n?0:1;return e.replace(/\{(\d+)\}/g,(i,s)=>r[`${Number(s)-o}`]??i)}#t(e,r=this.lookupList){if(r.length===0)return;let n=vi(this.locale);for(let o of r){let i=this.#r(e,n.localeStore[o]);if(i)return i}}#r(e,r={}){let n=r[e];if(typeof n=="string")return n}setLookupList(e){Array.isArray(e)&&(this.lookupList=e)}};var SD=class{_dataSourceMap;constructor(){this._dataSourceMap={}}hasContextName(e){return e in this._dataSourceMap}addContextName(e,r){r&&Object.keys(r).length>0?this._dataSourceMap[e]=r: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,r,n){if(this.hasContextName(e)){let o=this.getContextObjectByName(e);if(o)if(Array.isArray(n))o[r]=n;else{let i=o[r];o[r]=[...new Set([...i,n])]}}else{let o={};Array.isArray(n)?o[r]=n:o[r]=[n],this.addContextName(e,o)}}deletePropertyInContext(e,r){if(this.hasContextName(e)){let n=this.getContextObjectByName(e);n&&r in n&&delete n[r]}}getPropertyFromContext(e,r){if(this.hasContextName(e)){let n=this.getContextObjectByName(e);if(n&&r in n)return n[r]}return[]}getDependencies(e,r){let n=this.getPropertyFromContext(e,r),o=new Set(n);return n.forEach(i=>{o.add(i)}),[...o]}},ka=new SD;var ED={};Wt(ED,{fetchViewResources:()=>Dh,refreshViewByName:()=>Gse,updateViewResources:()=>cI});var cI=async t=>{let e=Le(t),r=g.getIn(e,d.COMPONENTS);Yi(e,{},!0),await go(r)},Dh=(t,e,r)=>J.resolveView(t,e,r),GV=(t,e,r,n)=>{let o=t[e];if(!o)return!1;let i=g.getIn(o,E.CASE_INFO.CASE_INFO_CLASSID);return g.getIn(o,d.CASE_INFO.VIEW_NAME)===r&&(!n||i===n)},qV=t=>{let{accessedOrder:e,items:r}=t;if(!e||!r)return null;let n=e[e.length-1];return n?r[n]?.context??null:null},Hse=(t,e)=>{let r=we();if(!r)return null;let n=r.getState(),{data:o,containers:i}=n;if(!i||!o)return null;let s=`${E.APP.APP}/primary`;if(i[s]){let a=qV(i[s]);if(a&&GV(o,a,t,e))return a}for(let a of Object.keys(i)){if(a===s)continue;let c=qV(i[a]);if(c&&GV(o,c,t,e))return c}return null},Gse=(t,e="",r="")=>{let n=r||null;if(!n){let a=`${E.APP.APP}/primary`;n=Hse(t,e),n||(n=Ar(a))}if(!n)return Promise.reject(new Error(`Unable to find an active context for view "${t}".`));let o=W(n);if(!o)return Promise.reject(new Error(`No data found for context "${n}".`));let i=g.getIn(o,E.CASE_INFO.CASE_INFO_ID)||"",s=ct({options:{context:n,pageReference:E.CASE_INFO.CASE_INFO_CONTENT}});return AD(),s.getPConnect().getActionsApi().refreshCaseView(i,t,"",{autoDetectRefresh:!0,preserveClientChanges:!1}).finally(()=>{CD()})};var ID=class{meta;datasource;options;index;datasourceObj;constructor(e,r,n){this.meta=e,this.datasource=r,this.index=0,this.options=n,this.datasourceObj=J.getPropertyValue(r,n.pageReference,n.context)}hasNext(){return this.index<this.datasourceObj.length}next(){if(!this.hasNext())throw new Error("No Children");let e=J.getContextPath(this.datasource,this.index);return this.index+=1,ct({meta:this.meta,options:{...this.options,pageReference:e}})}resetIndex(){this.index=0}},_D=ID;var bD=class{children;options;index;constructor(e,r){this.children=e,this.index=0,this.options=r}hasNext(){return this.index<this.children.length}next(){if(!this.hasNext())throw new Error("No Children");let e=this.index,r=this.children[e];this.index+=1;let n=r?._relativePath??`${this.options?.relativePath??""}.children[${e}]`;return ct({meta:r,index:this.index,options:{...this.options,relativePath:n}})}resetIndex(){this.index=0}},qse=(t,e)=>{let r=!!t?.repeat;if(!!t?.["repeat-self"])return new _D(t,t.context||"",e);if(r){let o=La(`${e.context}.${d.SUMMARY_OF_LISTS}`,t.pageReference,e.context);return new _D(t.children[0],o||t.context,e)}if(t?.children)return new bD(t.children,e)},WV=qse;var pl=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,r){let n=[];if(e&&["portal","view"].includes(r)){let{accessedOrder:o,items:i}=e;if(o&&i){let s=o[o.length-1];i[s]&&i[s].view&&Object.keys(i[s].view).length>0&&n.push(i[s])}}return n}static getDependentProperties=e=>{let r=[];return e._rawConfig?.config?.parameters?r=Object.values(e._rawConfig?.config?.parameters||{}):e.getFieldMetadata(e.getStateProps()?.value)?.datasource?.parameters&&(r=(e.getFieldMetadata(e.getStateProps()?.value)?.datasource?.parameters||[]).map(n=>n?.value)),r.filter(n=>Ir.isProperty(n)).map(n=>Ir.getPropertyName(n))}},Wse=new pl;Object.freeze(Wse);var TD,lI=(t,e,r)=>{t&&(Object.keys(t).forEach(n=>{if(n!=="children"){let o=t[n],i=fe.trimAnnotation(o);if((typeof i=="string"||typeof o=="string")&&(g.isValidAnnotation(o)&&g.isPropertyRef(i)||o.startsWith("@W ")||o.startsWith("@DW ")||o.startsWith("@E ")||o.startsWith("@PARAGRAPH ")||o.startsWith("@ATTACHMENT ")))r&&r.parentKey&&(r.isObjHasValue=!0),o.startsWith("@PARAGRAPH ")?e[n]=o:e[n]=i;else if(Array.isArray(i))i.forEach((s,a)=>{let c={parentStateObj:e,parentKey:n,isObjHasValue:!!e[n]};e[n]=e[n]||[],e[n][a]=Object.create({}),lI(s,e[n][a],c)});else if(i&&typeof i=="object"&&i.type!=="exp"){let s={parentStateObj:e,parentKey:n,isObjHasValue:!!e[n]};e[n]=e[n]||{},lI(i,e[n],s)}}}),r&&!r.isObjHasValue&&delete r.parentStateObj[r.parentKey])},KV=(t,e)=>{t._inheritedProps=t._inheritedProps||[],t.inheritedProps=[...t._inheritedProps,...g.deepClone(e.inheritedProps)]},sa=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:r,isRoot:n,options:o={},useCustomContext:i}=e;this.meta=r,this._isRoot=n,this.options=o,this.useCustomContext=i,this._rawConfig=r?.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=o.viewName,this.parentViewName=o.viewName??"",this._referenceList=o.referenceList||"",this._isInsideList=o.isInsideList||!1,this._inheritedConfig={},this._localeRuleName=o.localeReference,this._containerTarget=o.target,this._readOnly=r?.config?.readOnly||o.readOnly,this._hasSuggestions=!1,this._actionsApi=null,this._classID=null,this.index=e.index,this.categoryName=o.categoryName||"",this._relativePath=o.relativePath??"",o.inheritedConfig&&Object.keys(o.inheritedConfig).length>0&&(this._inheritedConfig=g.deepClone(o.inheritedConfig)),r?.config?.inheritedProps&&KV(this._inheritedConfig,r?.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=oi.formatePageReferenceToArrayIndex(this.meta.config.value)),lI(this._rawConfig,this._stateProps),this._isState=!g.isObjectEmpty(this._stateProps),this._rawConfig&&this._rawConfig.config&&(this._isExpressionExist=g.isExpressionExist(this._rawConfig.config),this._isWhenExist=g.isWhenExist(this._rawConfig.config),this._isValidatorExist=Dt.isValidatorExist(this._rawConfig.config)),this._isRoot?this._contextName=E.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=fe.handleAnnotation(this.options.pageReference,this)),this._pageReference=J.getContextPath(s||this.options.parentPageReference,this._pageReference),this._pageReference||(this._pageReference=""),this._type==="reference"&&(this._rawConfig=r);let a=this._type==="reference"&&g.isWhenExist({visibility:this.meta?.config?.visibility}),c=this._checkAndSetDecisionParagraph("instructions",this._rawConfig?.instructions),l=!1;if(this._type!=="reference"&&r&&(this._rawConfig=J.resolveReference(r,this)),this._rawConfig){let u=this.getRawConfigProps();u&&(this._localeRuleName=fe.trimAnnotation(u.localeReference)||o.localeReference,this._isExpressionExist=g.isExpressionExist(u),this._isWhenExist=g.isWhenExist(u),this._isValidatorExist=Dt.isValidatorExist(u),l=this._checkAndSetDecisionParagraph("label",u?.label)),this._children=this._rawConfig.children,this._rawConfig?.type?.toLowerCase()===d.VIEW&&this._rawConfig.name&&(this.viewName=fe.handleAnnotation(this._rawConfig.name,this)),this.options.hasForm&&sj(this)}(a||c||l)&&gE(this.viewName,this._contextName,this._pageReference)}_checkAndSetDecisionParagraph(e,r,n){let o=!1;if(r&&r.startsWith(d.PARAGRAPH_ANNOTATION)){let i=fe.trimAnnotation(r);o=So.isDecisionParagraph(i,n??this.getCurrentClassID()),o&&this.setStateProps({[e]:r})}return o}isDeclarativeTarget(){let e=!1;if(this.getValue(this._pageReference)||this._pageReference===""){let r=fe.trimAnnotation(this.getPropertyName());e=this.getFieldMetadata(r)?.isDeclarativeTarget||!1}return e}_getPropertyName(){let e=fe.trimAnnotation(this.getPropertyName());return this._pageReference===""&&e.startsWith(".")?e.substring(1,e.length):e}addFieldNode(){let e=this._getPropertyName(),{value:r,contextPage:n,label:o,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 h=this._type==="Address"&&this._rawConfig?.config?.associatedView?fe.trimAnnotation(this._rawConfig.config.associatedView):"",S=o||u,A=this._rawConfig?.type,C={target:this._containerTarget,context:this._contextName,pageReference:this._pageReference,propertyName:fe.trimAnnotation(r),label:S?.startsWith("@")?fe.handleAnnotation(S,this,void 0):S,required:i,readOnly:s,disabled:a,visibility:c||this.options?.visibility,skipRequiredValidation:this.options?.isBulkAction,inheritedProps:this.getInheritedProps(),useCustomContext:this.useCustomContext,value:r,validationType:l,...n&&{contextPageRef:`${this._pageReference}${fe.trimAnnotation(n)}`},componentName:A,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,(h||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||"",fe.trimAnnotation(this.getPropertyName()),this.index);else if(this._type==="Address"&&this._rawConfig?.config?.associatedView)be.removeViewNode(this._contextName,this._pageReference,fe.trimAnnotation(this._rawConfig.config.associatedView),this.index);else{let e=this._rawConfig?.config?.context?`${this._pageReference}${this._rawConfig?.config.context}`:this._pageReference,n={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,n)}}addViewNode(){if(!this.isReadOnly()){if(this._rawConfig?.type?.toLowerCase()===d.VIEW&&this._rawConfig.name&&this.viewName){let r={visibility:this.options?.visibility??this._rawConfig.config?.visibility??this._rawConfig.config?.referenceVisibility};be.addViewNode(this._contextName,this._pageReference,this.viewName,this.parentViewName,r)}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,fe.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="",r="",n=g.getWhenNames(this._rawConfig?.config),o=this.getRawConfigProps();if(o?.type&&o?.type?.toLowerCase()===d.VIEW)r=d.CONTEXT_TREE_NODE_TYPES.VIEW,e=this.getCurrentView();else{r=d.CONTEXT_TREE_NODE_TYPES.FIELD;let i=this.getPropertyName();e=fe.isProperty(i)?fe.trimAnnotation(i):""}e&&n.forEach(i=>{be.addWhenNode(this.getContextName(),this.getPageReference(),r,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:r,required:n,contextPage:o,readOnly:i,disabled:s,visibility:a,validationType:c,selectionMode:l,selectionList:u,selectionKey:p,referenceList:m,renderMode:f,caption:h,uniqueField:S}=this.getRawConfigProps(),A=r||h,C=[];["Multiselect","Checkbox"].includes(this._rawConfig.type)&&(C=this.getSelfReferencingDatapageKeys()),be.addPageListNode(this._contextName,this._pageReference,this.viewName??"",fe.trimAnnotation(this.getPropertyName()),{target:this._containerTarget,context:this._contextName,pageReference:this._pageReference,propertyName:fe.trimAnnotation(this.getPropertyName()),label:A?.startsWith("@")?fe.handleAnnotation(A,this,void 0):A,required:n,readOnly:i,disabled:s,...o&&{contextPageRef:`${this._pageReference}${fe.trimAnnotation(o)}`},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:S,selfReferencingDatapageKeys:["Multiselect","Checkbox"].includes(this._rawConfig.type)?C:void 0});let _=this.getValue(fe.trimAnnotation(this.getPropertyName()),this._pageReference)||[];be.updatePageListNode(this._contextName,this._pageReference,fe.trimAnnotation(this.getPropertyName()),_.length)}this.isWhenExist()&&this.addWhenNode(),this.isVisible()||this.removeNode()}getStateProps(){return this._stateProps}setStateProps(e){g.mergeDeep(e,this._stateProps)}getMetadata(){return this._rawConfig}getSharedDataPageForReferenceList(){let e=this.getCaseInfo().getClassName(),r=this.getCurrentView();if(!r||!e)return;let n=Dh(r,this,e);if(!n)return;let o=this.getRawMetadata()?.config?.referenceList;if(!o)return;let i={};typeof n.config?.parameters=="object"&&n.config.parameters!==null&&(i=n.config.parameters);let s=g.generateDataPageHashWithParameters(i,o,this),a=jo(),c=a?a[o]?.[s]:{};return Array.isArray(c?.[P.getDefaultQualifiedName("pxResults")])?c[P.getDefaultQualifiedName("pxResults")]:void 0}getParameterizedDataPageFieldValue(e,r){return this._dpResolver??=new fE(this),this._dpResolver.resolve(e,r)}getCaseInfo(){return this._caseInfo||(this._caseInfo=new oE(this)),this._caseInfo}getDataInfo(){return this._dataInfo||(this._dataInfo=new FV(this)),this._dataInfo}getCaseLocaleReference(e){let r=this.getRawConfigProps(),n=e||this.getValue(d.getProperty(d.CASE_INFO.CASE_TYPE_ID))||this.getValue(d.CLASS_ID,d.getProperty(d.DATA_INFO.DATA_INFO_CONTENT))||r?.referenceClass||r?.className;return n?Ri(Cn.CASE,n):null}getListActions(){return oU(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(),r;return e.selectionMode==="multi"?r="selectionList":e.selectionMode==="single"&&e.selectionKey?r="selectionKey":e.renderMode==="Editable"?r="referenceList":this._type==="Address"?r="addressProp":r="value",this.getComponentConfig()[r]}getFullReference(){let e=this.getPageReference(),r=this.getPropertyName();return J.getContextPath(e,r)}getContextName(){return this._contextName}getContainerName(){let{type:e}=this.getMetadata()||{},r=[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:n=ge.PRIMARY,name:o,routingInfo:i}=this.getComponentConfig();return(e&&r.includes(e)||i==="@ROUTING_INFO")&&o?o:this.options.containerName||n}getTarget(){return this._containerTarget}getCurrentView(){return this.viewName}populateSuggestionProps(e){if(this._rawConfig?.config&&Object.hasOwn(this._rawConfig.config,"value")&&this.getStateProps()?.value&&this.options.hasForm){let r=Ee?.getStore()?.getState()?.data[`${this.getContextName()}/${d.SUGGESTION}`],n=this.getStateProps()?.value,o=J.getContextPath(this.getPageReference(),n),i=r?$n.getSuggestionsContext(this.getContextName()).getField(o):void 0;this._hasSuggestions=!!i,e.hasSuggestions=this._hasSuggestions,this._stateProps.hasSuggestions=this._hasSuggestions}}getConfigProps(e={}){let r={...en.getDefaultsforType(this._type),readOnly:this._readOnly,...this._rawConfig?.config,...this._additionalRegisteredProps,...this._inheritedConfig};return aI.getStrategy(this._type)?.applyFallback(r),this.populateSuggestionProps(r),this.resolveConfigProps(r,e),g.resolveStringBooleans(e)}getLocalizationService(e){let r=this.getComponentName(),n=e||(r==="View"?this._rawConfig?.config?.template:r),o=v.getLocale()??"en-US",i=new Wd(o,n),s=this.getCaseLocaleReference();return i.setLookupList(["APP!APPLICATION"]),s&&i.setLookupList([s]),i}getRawConfigProps(){let{_deepProps:e,...r}={...en.getDefaultsforType(this._type),...this._rawConfig?.config,...this._additionalRegisteredProps,...this._inheritedConfig};return this.populateSuggestionProps(r),r}resolveConfigProps(e,r={}){return e&&(J.resolveProps(e,r,this),fe.handleComponentMapping(r,{type:this.getComponentName()||"",config:e},this)),r}registerAdditionalProps(e={}){return Object.assign(this._additionalRegisteredProps,e),lI(e,this._stateProps),this.resolveConfigProps(this._additionalRegisteredProps)}deRegisterAdditionalProps(e=[]){return e.forEach(r=>{delete this._additionalRegisteredProps[r]}),!0}populateAdditionalProps(e){let r=a=>a?.map(c=>({...c,message:this.getLocalizationService()?.getLocalizedMessage(c.message)??c.message})),n=this.getComponentName(),o=this.getComponentConfig(),i=n===d.ROOT_CONTAINER&&e.renderingMode!=="portal";if(n===d.MODAL_VIEW_CONTAINER||n===d.CASE_CREATE_STAGE||n===d.OBJECTACTIONCONTAINER){let a=se(`${d.APP.APP}/${this.getContainerName()}`),c=qt({context:a,category:E.PAGE});e.pageMessages=r(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||fe.trimAnnotation(this.getRawConfigProps().selectionList):!a&&this.getComponentConfig()?.renderMode==="Editable"&&this.getStateProps().referenceList&&(a=this.getStateProps().referenceList);let c=qt({property:a,pageReference:this.getPageReference(),context:this.getContextName(),type:E.MESSAGES.MESSAGES_TYPE_ERROR}),l=qt({property:a,pageReference:this.getPageReference(),context:this.getContextName(),type:E.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(n===d.ROOT_CONTAINER){let a=XT(i,se(`${d.APP.APP}/${this.getContainerName()}`));e.httpMessages=Array.isArray(a)?r(a):a,this._stateProps.httpMessages=e.httpMessages;let c=$n.getSharedState("isLoggedOut");e.isLoggedOut=c,this._stateProps.isLoggedOut=c;let l=qt({context:d.APP.ROOT,category:"PAGE"});e.pageMessages=r(l),this._stateProps.pageMessages=e.pageMessages}if(n===d.HYBRID_VIEW_CONTAINER){let a=qt({context:d.APP.APP,category:d.HTTP});e.httpMessages=r(a),this._stateProps.httpMessages=a}if(n===d.APP_SHELL&&e.portalDocMode===d.CONTAINER_TYPE.MULTIPLE&&(e.activeCases=gn.getOpenedCaseItems(`${E.APP.APP}/${d.PRIMARY}`),this._stateProps.activeCases=e.activeCases),n===d.APP_SHELL){let a=d.APP.APP,c=se(`${a}/${this.getContainerName()}`),l=[...qt({context:a,category:"PAGE"})||[],...qt({context:c,category:"PAGE"})||[]],u=l.length>0?l:void 0;e.pageMessages=u&&r(u),this._stateProps.pageMessages=e.pageMessages}if(e.value&&n===d.SCALARLIST&&(this._stateProps.value=e.value),n===d.APP_SHELL||n===d.MODAL_VIEW_CONTAINER||n===d.CASE_CREATE_STAGE||o.template===d.CASE_PREVIEW||o.template===d.RULE_PREVIEW){let a=qt({context:d.APP.APP,category:"HTTP"}),c=v.getRenderingMode()==="HYBRID"?`${this.getContextName()}/${this.getContainerName()}`:`${d.APP.APP}/${this.getContainerName()}`,l=qt({context:se(c),category:"HTTP"});a?l&&(a=a.concat(qt({context:se(c),category:"HTTP"}))):a=qt({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(n===d.VIEW_CONTAINER||n===d.FLOW_CONTAINER||n===d.MODAL_VIEW_CONTAINER||n===d.PREVIEW_VIEW_CONTAINER||n===d.ROOT_CONTAINER||n===d.OBJECTACTIONCONTAINER){if(e.routingInfo=ym(this.getContainerName(),this._contextName),n===d.ROOT_CONTAINER&&(e.rootConfig=pl.getItemView(e.routingInfo,e.renderingMode),this._stateProps.rootConfig=e.rootConfig),this._stateProps.routingInfo=e.routingInfo,n===d.FLOW_CONTAINER||n===d.OBJECTACTIONCONTAINER){let a=qt({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=Ee?.getStore()?.getState()?.data;p&&u&&(e.lastUpdateTime=p[u]?.caseInfo?.lastUpdateTime,this._stateProps.lastUpdateTime=p[u]?.caseInfo?.lastUpdateTime);let m=qt({context:u,category:E.PAGE}),f=qt({context:u,category:"HTTP"});e.httpMessages=r(f),e.pageMessages=r(m),this._stateProps.pageMessages=e.pageMessages,this._stateProps.httpMessages=e.httpMessages,f?.forEach(h=>{h.errorDetails&&(e.errorDetails=e.errorDetails?e.errorDetails.push(...h.errorDetails):h.errorDetails,this._stateProps.errorDetails=e.errorDetails),h.correlationID&&(e.correlationID=h.correlationID)})}}if(e.loadingInfo=this.getLoadingStatus(this.getContextName()),e.isAppOffline=W(d.APP.APP).context_data?.isOffline,e.assignmentNames=this.getCaseInfo().getAssignments()?.map(a=>a.name),e.childAssignmentNames=this.getCaseInfo().getChildAssignments()?.map(a=>a.name),n===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 o.template===d.CASE_VIEW||o.template===d.RULE_VIEW||o.template===d.SELF_SERVICE_CASE_VIEW||o.template===d.CASE_PREVIEW||o.template===d.RULE_PREVIEW||o.template===d.OBJECT_PAGE?(e.caseInfo=this.getCaseSummary(),this._stateProps.caseInfo=e.caseInfo):n===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:r,datasource:n,listType:o}=this.getComponentConfig(),{propertyValue:i,propertyAnnotation:s}=this.getPropertyDetails(o,n,r);if(i&&typeof i=="string"&&(i.includes(s)||i.includes(d.ATTACHMENT_ANNOTATION))){let a=fe.getPropertyName(i),c=this.getFieldMetadata(a);c&&this.updateConfigData(e,c,a)}}resolvePropertyMetadata(e,r){if(!e)return e;let n=vD(`${this._pageReference}.${r}`,this._contextName);if(!Array.isArray(e)){let{additionalInformation:o,classID:i}=e;this._checkAndSetDecisionParagraph("additionalInformation",o??void 0,i)?this._additionalRegisteredProps.additionalInformation=o:o&&this.setStateProps({additionalInformation:n}),e.additionalInformation=n;let{inputFormat:a}=e;if(typeof a=="string"&&a.startsWith("@")){let c=fe.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 r=e.split(".");if(r.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(lt(e,s),e)}let n=r.pop(),o=r.join(".")?".":"",i=this.getValue(`${o}${r.join(".")}${d.CLASS_ID}`);return i||(i=g.resolvePageClass(e,this.getCurrentClassID())),this.resolvePropertyMetadata(lt(n,i),e)}getCurrentPageFieldMetadata(e=null){let r=this.getPageReference().split(".");e!==null&&(r=e.split("."));let n=r.pop();return this.resolvePropertyMetadata(lt(n,this.getValue(`${r.join(".")}${d.CLASS_ID}`)))}getCurrentClassID(){return this._classID??this.getValue(d.CLASS_ID)}getCaseSummary(){let e={...this.getDataObject()[d.getProperty(E.CASE_INFO.CASE_INFO)]};return e.CaseID=e.CaseID||this.getValue(d.getProperty(E.CASE_INFO.CASE_INFO_PZINSKEY)),{...e,isCaseWideAction:()=>bc(this.getContextName(),this.getPageReference())}}getReferencedUser(e){let r=this.getValue("referencedUsers");if(Array.isArray(r)){let n=r.find(o=>o.UserID===e);if(n)return{userId:n.UserID,UserName:n.UserName}}return r&&r[e]?r[e]:null}getCaseStages(){return this.getDataObject()[E.CASE_INFO.CASE_INFO].stages}getStageID(){return this.getDataObject()[E.CASE_INFO.CASE_INFO].stageID}getActions(){return this._actions}isRoot(){return this._isRoot}getRelativePath(){return this._relativePath}resolveContextProps(e){let{value:r}=this.getStateProps();r&&(e.error=this.getContextDataValue(`${this.getPageReference()+r}.error`),e.validatemessage=this.getContextDataValue(`${this.getPageReference()+r}.validatemessage`))}isValidatorExist(){return!!this._isValidatorExist}getValidationApi(){return new hV(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"?fe.handleAnnotation(this._rawConfig?.config?.visibility,this):typeof this.options?.visibility=="string"?fe.handleAnnotation(this.options?.visibility,this):!0}isReadOnly(){return this._readOnly===void 0?!1:this._readOnly==="true"||this._readOnly===!0?!0:typeof this._readOnly=="string"?fe.handleAnnotation(this._readOnly,this)===!0:!1}hasChildren(){return!!this._children}getComputedVisibility(e=[]){let r=this._type==="reference"&&!!this.getReferencedView(),n=r?this.getReferencedViewPConnect().getPConnect():this,o=e;if(r){let u=`${this.getRawMetadata()?.config?.name}!${this._ruleClass}`;if(e.includes(u))return!1;o=[...e,u]}if(this.getConfigProps().visibility===!1)return!1;if(n.getConfigProps().requiresVisibleChildren===!1||this.getConfigProps().requiresVisibleChildren===!1)return!0;let i=n.getConfigProps(),s={includeTypes:["Group","Region","View"],excludeTemplates:["ListView","SimpleTable","StudioTable"]},a=n._type&&s.includeTypes.includes(n._type)&&!s.excludeTemplates.includes(i.template);if(i.highlightedData&&i.highlightedData.length&&i.showHighlightedData&&(a=!1),!a)return!0;let l=n.getChildren();return l?l.some(u=>u.getPConnect().getComputedVisibility(o)):!1}getChildrenIterator(){return this._children.setContext(this.getPageReference()),this._children}setAction(e,r){this._actions[e]=r}getComponentName(){return this._rawConfig&&this._rawConfig.type}isComponentRefreshable(){return!!(this._rawConfig&&this._rawConfig.isRefreshable)}getDataObject(e){return W(e||this.getContextName())}getImagePath(e){return`${Be.getConstellationServiceUrl()}/v860/${Be.getAppAlias()}/image/${e}?org=${ye.getOrganizationName()}`}skipRequiredValidation(){return this.options.isBulkAction}isBulkAction(){return this.options.isBulkAction}getChildren(){if(this._children&&this._children.length){let e=this.options?.inheritedProps?.find(o=>o?.prop==="shouldAutoRefresh");e&&(this._inheritedConfig._inheritedProps=[...this._inheritedConfig._inheritedProps||[],e]);let r=WV(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}),n=[];for(;r?.hasNext();){let o=r.next();(!this.isBulkAction()||!this.#r(o))&&n.push(o)}return r?.resetIndex(),n}return[]}setInheritedProp(e,r,n=!1){this._inheritedConfig[e]=r;let o=Object.hasOwn(this._inheritedConfig._deepProps??{},e);(n||o)&&(this._inheritedConfig._deepProps={...this._inheritedConfig._deepProps,[e]:r})}getDeepInheritedProps(){return{...this._inheritedConfig?._deepProps}}getDeepInheritedConfig(){let e=this.getDeepInheritedProps();return Object.keys(e).length>0?{...e,_deepProps:e}:void 0}#e(e){let r=this.getDeepInheritedConfig();return r?{...e,inheritedConfig:{...e.inheritedConfig,...r}}:e}getLocaleRuleName(){return this._localeRuleName}getLocalizedValue(e,r,n){let o=n||this.getLocaleRuleName(),i=o&&r?`${o}#${r}`:o,s=this.getLocalizationService(i).getLocalizedText(e);return s===e?this.getLocalizationService().getLocalizedText(e):s}getLocaleRuleNameFromKeys(e,r,n){return`${e}!${r}!${n}`}getValue(e,r){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 n=r||this.getPageReference(),o=e?.match(/^(Parent(?:\.Parent)*)(?:\.(.*))?$/);if(o){let i=o[1].split(".").length,s=o[2]||"",a=n?.split(".")||[];n=a.slice(0,Math.max(a.length-i,0)).join("."),s?e=`.${s}`:(e=n,n="")}return this._hasSuggestions&&this.getStateProps()?.value===e?J.getPropertyValue(e,n,`${this._contextName}/${d.SUGGESTION}`):J.getPropertyValue(e,n,this._contextName)}setInheritedConfig(e){if(!e)return;let{readOnly:r,displayMode:n,referenceType:o,hideLabel:i}=e;i&&(this._inheritedConfig.hideLabel=i),o&&(this._inheritedConfig.referenceType=o),n&&(this._inheritedConfig.displayMode=n),(this._inheritedConfig.readOnly||r)&&(this._inheritedConfig.readOnly=r),e.inheritedProps&&(e.inheritedProps?.forEach(s=>{s.prop==="required"&&(this._inheritedConfig[s.prop]=s.value)}),KV(this._inheritedConfig,e))}getInheritedProps(){let e={},r={};return this._inheritedConfig.inheritedProps?.forEach(n=>{r[n.prop]=n.value}),J.resolveProps(r,e,this),e}setValue(e,r,n,o=!1,i={}){if(!g.isValidPropertyReference(e))return;let s,a,{isArrayDeepMerge:c}=i;this.isInsideList()&&this.getListActions().updateProperty(e,r),this.isBulkAction()&&(s=!0,r||(a=!0)),T({type:"SET_PROPERTY",payload:{reference:J.getContextPath(this.getPageReference(),e),value:r,initialValue:n,isImplicit:o,context:this.getContextName(),...c!==void 0&&{isArrayDeepMerge:c},...s&&{isStrictTracking:s},...a&&{removePropertyFromChangedList:a}}})}updateDirtyCheckChangeList(e,r){let n={reference:`${this.getPageReference()}${e}`,value:r,context:this.getContextName()};YV(n)}getContextDataValue(e,r){return Qi(r||this.getPageReference(),e,this._contextName)}updateState(e){let r=this._pageReference.indexOf(d.CASE_INFO.CASE_INFO_CONTENT),n=this._pageReference.indexOf("."),o=d.CASE_INFO.CASE_INFO_CONTENT;r!==0&&(o=n>0?this._pageReference.substring(n):this._pageReference),T(Re({context:this._contextName,data:e,rootPageReference:o}))}replaceState(e,r,n={}){if(!g.isValidPropertyReference(e))return;let{skipDirtyValidation:o=!1}=n;T({type:"REPLACE_PROPERTY",payload:{reference:J.getContextPath(this.getPageReference(),e),value:r,context:this.getContextName(),skipDirtyValidation:o}})}reportError(e,r,n){T(os(e,r||{},n,r?.formFields))}getComponent(){return TD({getPConnect:()=>this})}createComponent(e,r,n,o){let i=this._pageReference;if(r){let s=La(`${this.getPageReference()}.${d.SUMMARY_OF_LISTS}`,r,this._contextName);i=J.getContextPath(s||r,n)||r}else if(o&&o.pageReference){let s=o.pageReference;s=fe.handleAnnotation(s,this),i=J.getContextPath(this._pageReference,s)||""}return TD(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}),o)}getReferencedView(){if(this.meta)return J.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 r={...this.getComponentConfig()},n=this.options?.inheritedConfig?._inheritedProps?.find(o=>o.prop==="shouldAutoRefresh");return n&&!r?.inheritedProps?.some(o=>o.prop==="shouldAutoRefresh")&&r?.inheritedProps?.push(n),delete r?.name,delete r?.type,ct({meta:this.getReferencedView(),options:this.#e({...e?this.options:void 0,...r,context:this.getContextName(),pageReference:r.context?this._resolvePageRef(r.context):this.getPageReference(),viewName:this.viewName})})}getContainerManager(){return new Bd(this)}getActionsApi(){return this._actionsApi||(this._actionsApi=new zV(this)),this._actionsApi}getActionManager(){return w}doesContextExist(e){return Gd(e??this.getContextName())}getGoogleMapsAPIKey(){return gt.getGoogleMapsAPIKey()}getServerURL(){return gt.getServerURL()}getLoadingStatus(e){let r=null;return e?(r=W(e),r=r?r.context_data:null):r=this.getDataObject().context_data,r&&r.isLoading?r.isLoading:!1}clearErrorMessages(e){e?.property?dt({type:"error",property:e.property,pageReference:this.getPageReference(),context:this.getContextName(),...e.subType&&{subType:e.subType}}):e?.context?dt({type:"error",...e}):(dt({type:"error",...e,context:d.APP.APP}),dt({type:"error",...e,context:se(`${d.APP.APP}/${this.getContainerName()}`)}))}resolveDatasourceReference(e){return La(`${this.getPageReference()}.${d.SUMMARY_OF_LISTS}`,e,this.getContextName())||e}removeFormField(){}addFormField(){}setPageValue(e,r,n){delete e?.classID,this.replaceState(r,e),n?rU(e,r,this):Oj(this.getContextName(),`${this.getPageReference()}${r}`,this.getStateProps()?.value??"")}acceptSuggestion(e){if(this.getStateProps()?.value&&this.options.hasForm&&this._hasSuggestions){let r=$n.getSuggestionsContext(this.getContextName()),n=this.getStateProps()?.value||e,o=J.getContextPath(this.getPageReference(),n),i=r.getField(o);this._hasSuggestions=!1,this.getActionsApi().updateFieldValue(n,i),this.getActionsApi().triggerFieldChange(n,i),r.removeField(o,{actionPerformed:"accepted"})}}ignoreSuggestion(e){if(this.getStateProps()?.value&&this.options.hasForm&&this._hasSuggestions){let r=this.getStateProps()?.value||e,n=J.getContextPath(this.getPageReference(),r);this._hasSuggestions=!1,$n.getSuggestionsContext(this.getContextName()).removeField(n,{actionPerformed:"ignored"}),ka.getDependencies(this._contextName,n)?.forEach(i=>{$n.getSuggestionsContext(this.getContextName()).removeField(i,{actionPerformed:"ignored"})})}}getSelfReferencingDatapageKeys(){let e=[],r=this.getPropertyName(),n=this.getFieldMetadata(r),{datasource:{parameters:o={}}={}}=n||{};return Object.values(o).forEach(i=>{let[,s]=i.split("."),a=r?.split(".").pop();s===a&&e.push(i.substring(i.lastIndexOf(".")+1))}),e}isReadOnlyField(){let{value:e,datasource:r,listType:n}=this.getComponentConfig(),{propertyValue:o,propertyAnnotation:i}=this.getPropertyDetails(n,r,e);if(!o||typeof o!="string"||!(o.includes(i)||o.includes(d.ATTACHMENT_ANNOTATION)))return!1;let s=fe.getPropertyName(o),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,r){let n=Ir.isPropertyInternal(r),o=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||n||!o&&(s&&!l||a)&&u)}getPropertyDetails(e,r,n){return e===d.ASSOCIATED?{propertyValue:r,propertyAnnotation:d.ASSOCIATED_PROPERTY_ANNOTATION}:{propertyValue:n,propertyAnnotation:d.PROPERTY_ANNOTATION}}updateConfigData(e,r,n){e.fieldMetadata=r,r.additionalInformation&&(e.additionalInformation=r?.additionalInformation),r.inputFormat&&typeof r.inputFormat!="string"&&(e.inputFormat=r.inputFormat),this.#t(e,n)&&(e.readOnly=!0,this._stateProps.readOnly=e.readOnly,e.fieldMetadata.isDeclarativeTarget&&this.registerAdditionalProps({readOnly:!0})),e.fieldMetadata?.isReadOnly&&(e.readOnly=!0,this.registerAdditionalProps({readOnly:!0}))}#r(e){let r=e.getPConnect().getComponentName(),n=e.getPConnect().getConfigProps().template;return!(pl.allowedComponetsForBulkProcessing[r]===!0||pl.allowedComponetsForBulkProcessing[r]?.[n]===!0)}};function ct(t){let e=new sa(t);return{getPConnect:()=>e}}function JV(t){TD=t}var RD=class t{_grammar;_state;_tree;_exprStr;_endState;_subParser;_position;constructor(e,r,n){this._grammar=e,this._state="expectOperand",this._exprStr=r||"",this._endState=n||{},this._subParser=null}static _setParent(e,r){Object.defineProperty(e,"_parent",{value:r,writable:!0})}_addToken(e){let r=uI[this._state],n=this._exprStr;if(this._exprStr+=e.element,r.subHandler){this._subParser||this._startSubExpression(n);let o=this._subParser?._addToken(e);o&&(this._endSubExpression(),this._state=o)}else if(r.operatorTypes?.[e.tokenType]){let o=r.operatorTypes[e.tokenType],i=PD[e.tokenType];i&&i.call(this,e),o.toState&&(this._state=o.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:r}=uI[this._state];this._subParser=new t(this._grammar,e,r)}_endSubExpression(){uI[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}},dI=RD;var Kse="literal",xD="identifier",Jse=t=>typeof t=="object"&&t!==null&&"operationType"in t,ND={operatorType:"binaryOperator",precedence:1,evaluate:(t,e)=>typeof t=="object"||typeof e=="object"?!1:t&&e},OD={operatorType:"binaryOperator",precedence:1,evaluate:(t,e)=>typeof t=="object"||typeof e=="object"?!1:t||e},ZV=(t,e,r)=>{let n=t==="",o=e===""||e===null||e===void 0;if(n&&o)return r;if(typeof e=="boolean"){let s=!n&&t!=="false"&&t!=="0"?!!t:!1;return r?s===e:s!==e}return n!==o?!r:r?t===e:t!==e},QV={">":{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:ZV(t,e,!0)},"!=":{operatorType:"binaryOperator",precedence:2,evaluate:(t,e)=>typeof t=="object"||typeof e=="object"?!0:ZV(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"},"&&":ND,AND:ND,and:ND,"||":OD,OR:OD,or:OD,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))}},Yse=(t,e,r)=>{if(typeof t.value!="string")return"";let n=t.value.substring(1),o=e?.getFieldMetadata(n)?.type??"";if(o)return o;let{pageReference:i,context:s}=r??{};if(!i||!s)return"";let a=J.resolveClassID(t.value,i,s),c=lt(n,a);return c&&!Array.isArray(c)?c.type??"":""},DD={BinaryExpression:function(e){let r=[],n=e.right,o=e.operator??"",i=e.left;if(!i)return!1;let s=typeof i.value=="boolean"?"True-False":"";r[0]=this.evaluateAST(i),!s&&i.operationType===xD&&(s=Yse(i,this._context,this._contextTreeNodeContext)),r[1]=n?this.evaluateAST(n,s):"";let a=this._grammar[o];return a?.evaluate?a.evaluate(r[0],r[1]):!1},identifier:function(e){let r=typeof e.value=="string"?e.value:"";if(this._localDataObject)return g.getIn(this._localDataObject,r?r.substring(1).split("."):[])??"";if(this._contextTreeNodeContext)return J.getLitePropertyValue(this._contextTreeNodeContext,r)??"";if(!this._context)return"";let n=this._context.getFieldMetadata(r)?.type??"",o=this._context.getValue(r)??"";if(n==="Decimal"&&typeof o=="string"){let i=parseFloat(o);return Number.isNaN(i)?"":i}return o},literal:function(e,r){return(r===void 0||r===""||r==="True-False")&&(e.value==="true"||e.value==="false")?e.value==="true":e.value??""},UnaryExpression:function(e){let r=e.operator,n=e.right;if(!r||!n)return!1;let o=this._grammar[r];return o?.evaluate?o.evaluate(n):!1}},PD={unaryOperator:function(e){this.setPositionInAST({operationType:"UnaryExpression",operator:String(e.value)})},binaryOperator:function(e){let r=String(e.value),{precedence:n}=this._grammar[r],o=this._position._parent,i=o?o.operator:null,s=i?this._grammar[i]:null,a=s?s.precedence:null;if(a&&n)for(;o?.operator&&a>=n;)this._position=o,o=o._parent;let c={operationType:"BinaryExpression",operator:r,left:this._position};dI._setParent(this._position,c),o?(this._position=o,this.setPositionInAST(c)):(this._tree=c,this._position=c)},identifier:function(e){let r={operationType:xD,value:e.value};this.setPositionInAST(r)},literal:function(e){this.setPositionInAST({operationType:Kse,value:e.value})},subExpression:function(e){Jse(e)&&this.setPositionInAST(e)}},uI={expectOperand:{operatorTypes:{literal:{toState:"expectBinOp"},identifier:{toState:xD},unaryOperator:{},openParenthesis:{toState:"subExpression"}}},expectBinOp:{operatorTypes:{binaryOperator:{toState:"expectOperand"}}},identifier:{operatorTypes:{binaryOperator:{toState:"expectOperand"}}},subExpression:{subHandler:PD.subExpression,endStates:{closeParenthesis:"expectBinOp"}}};var Zse=["binaryOperator","unaryOperator","openParenthesis"],Qse=/^\s*$/,XV=/^[a-zA-Z_.$][(0-9)a-zA-Z0-9_.$]*$/,Xse="literal",eae="identifier",tae=/\\\\/,rae=["'(?:(?:\\\\')|[^'])*'",'"(?:(?:\\\\")|[^"])*"',"\\s+","\\btrue\\b","\\bfalse\\b"],nae=["[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]+)"],oae=/^-?(?:(?:[0-9]*\.[0-9]+)|[0-9]+)$/,wD=class t{_grammar;_splitRegex;constructor(e){this._grammar=e}static _isNegative(e){return Zse.some(r=>r===e[e.length-1].tokenType)}static _isWhitespace(e){return!!e.match(Qse)}static _createWordboundary(e){return e=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),e.match(XV)&&(e=`\\b${e}\\b`),e}static _unquote(e){let[r]=e,n=new RegExp(`\\\\${r}`,"g");return e.substr(1,e.length-2).replace(n,r).replace(tae,"\\")}_getSplitRegex(){if(!this._splitRegex){let e=Object.keys(this._grammar).sort((r,n)=>n.length-r.length).map(r=>t._createWordboundary(r),this);this._splitRegex=new RegExp(`(${[rae.join("|"),e.join("|"),nae.join("|")].join("|")})`)}return this._splitRegex}_splitExpression(e){let r=this._getSplitRegex();return e.split(r).filter(n=>n.trim())}_createToken(e){let r={tokenType:Xse,value:e,element:e};return e.startsWith('"')||e.startsWith("'")?r.value=t._unquote(e):e.match(oae)?r.value=parseFloat(e):e==="true"||e==="false"?r.value=e==="true":this._grammar[e]?r.tokenType=this._grammar[e].operatorType:e.match(XV)&&(r.tokenType=eae),r}_getTokens(e){let r=[],n=!1;for(let o=0;o<e.length;o+=1)t._isWhitespace(e[o])?r.length&&(r[r.length-1].element+=e[o]):e[o]==="-"&&t._isNegative(r)?n=!0:(n&&(e[o]=`-${e[o]}`,n=!1),r.push(this._createToken(e[o])));return r}tokenize(e){let r=this._splitExpression(e);return this._getTokens(r)}},e6=wD;var $D=class{_grammar;_expression;_ast;_context;_contextTreeNodeContext;_localDataObject;constructor(e,r){this._grammar={...QV},this._expression=e,this._ast=null,this._contextTreeNodeContext=null,this._localDataObject=r}buildAST(){let r=new e6(this._grammar).tokenize(this._expression),n=new dI(this._grammar);return n.addTokens(r),this._ast=n.buildAst(),this}evaluate(e,r){return this._context=e,this._contextTreeNodeContext=r,this.evaluateAST(this._ast)}evaluateAST(e,r){return r6(e.operationType,DD)&&DD[e.operationType].call(this,e,r)}},t6=$D;var MD=(t,e)=>{let r=/[a-zA-Z0-9_)"'\s]=[a-zA-Z0-9_("'\s]/,n=t.replace(r,o=>o.replace("=","=="));return new t6(n,e)},kD=t=>t?t.buildAST():!0,LD=(t,e,r)=>t?t.evaluate(e,r):!0,pI=(t,e,r)=>{let n=MD(t,e),o=kD(n);return LD(o,r)},r6=(t,e)=>t in e;var UD=class{static handleExpression(e,r,n,o){let i=this.getContext(e,o),a={actionObject:{action:"decexp",params:{source:e,value:r,targets:n},context:i}};gt.fetchData(a).then(c=>c.json()).then(c=>{this.updateState(c,o)}).catch(c=>console.log(c))}static getContext(e,r){let n=e.substring(0,e.indexOf(".")),o=J.getPropertyValue(`${n}.${P.getDefaultQualifiedName("pxObjClass")}`,null,r)||J.getPropertyValue(`${n}.${P.getDefaultQualifiedName("pyClassName")}`,null,r);return{name:n,class:o}}static updateState(e,r){Object.keys(e).forEach(n=>T({type:_t,payload:{context:r,reference:n,value:e[n]}}))}},n6=UD;var mI={},o6=(t,e)=>mI[e]&&Object.hasOwn(mI[e],t),jD=t=>{let{context:e}=t;o6(t.reference,e)&&n6.handleExpression(t.reference,t.value,mI[e][t.reference],e)},tT=(t={})=>{g.copy(t,mI)},iae=(t,e,r)=>pI(t,e,r?.pConnect.getPConnect());var FD=class{static isPageInstruction(e){return e&&e.includes("[")&&e.includes("]")}},fI=FD;var Kd={IDLE:"idle",SAVING:"saving",SKIPPED:"skipped",ERROR:"error"},sae=5e3,aae=()=>{let t=Number(v.getFeatureMap()?.pyAutoSaveDurationInMS);return t>0?t:sae},VD='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])',cae=`${VD}, textarea, [contenteditable="true"]`,Pi=new Map,Ss=new Map,hI=new Set,wh=new Map,$h=new Map,Jd=new Set,gI=(t,e)=>{wh.get(t)?.forEach(r=>r(e))},lae=t=>{let e=$h.get(t);if(!(!e||e.size===0)){for(let[r,n]of e)ke.executeStateMachine(t,r,n,!0,{skipStateUpdate:!1,skipDirtyValidation:!1})||T(da({reference:r,value:n,context:t,isImplicit:!1,skipDirtyValidation:!1}));$h.delete(t)}},uae=(t,e)=>{let r=t,n=r.includes(d.MODAL),o=re(E.CASE_INFO.CASE_INFO_ID,null,r),i=re(E.CASE_INFO.ASSIGNMENT_ID,null,r),a=re(E.CASE_INFO.ACTIVE_ACTION_ID,null,r)||re(E.CASE_INFO.ASSIGNMENTACTION_ID,null,r),c=re(E.CASE_INFO.CASE_TYPE_ID,null,r),l=re("isProcessAction","isProcessAction",r),u=w.getNextActionMgrId(),p={context:r,containerItemID:t,assignmentID:i,actionID:a,caseID:o,containerName:e,caseType:c,isModalAction:n,isFormValid:void 0,isProcessAction:l,saveOnly:!0,autosave:!0,actionMgrID:u},m,f,h=new Promise((S,A)=>{m=S,f=A});if(m&&f)w.register(u,h,m,f,Ii,p,!0);else throw new Error("Promise executor did not synchronously assign resolveFn/rejectFn.");return Ct.executeOrQueueDeferredAction(ul(p)),h},yI=(t,e)=>{let r=Ss.get(t);r!==void 0&&clearTimeout(r),Ss.set(t,setTimeout(()=>{Ss.delete(t),e()},aae()))},BD=t=>{let e=qe(t),r=te(e);return!r||!mr(r)?!0:se(r)===e},SI=async t=>{if(hI.has(t)||Jd.has(t))return;let e=Pi.get(t);if(!e||!BD(t))return;let r=typeof document<"u"?document.activeElement:null;if(r&&r===vU(t)&&r.matches(VD)){yI(t,()=>SI(t).catch(()=>{}));return}lae(t);let n=!1;Qb(!0);try{if(!nn.hasUnsavedChanges(t))return;n=nn.isFormValid(t)}finally{Qb(!1)}if(!n){gI(t,Kd.SKIPPED);return}hI.add(t),gI(t,Kd.SAVING);try{await uae(t,e.containerName),nn.clearChangedProperties(t),gI(t,Kd.IDLE)}catch{gI(t,Kd.ERROR)}finally{hI.delete(t)}},i6=()=>{if(!(typeof document>"u"||!document.activeElement?.matches(cae)))for(let e of Pi.keys())Ss.has(e)&&BD(e)&&yI(e,()=>SI(e).catch(()=>{}))},s6=i6,a6=t=>{t.key==="Tab"&&i6()},c6=t=>{let{target:e}=t;if(!(typeof Element>"u"||!(e instanceof Element)||!e.matches(VD)))for(let r of Pi.keys())Ss.has(r)&&BD(r)&&(JS(r,e),yI(r,()=>SI(r).catch(()=>{})))},l6=t=>{let e=t?.data?.caseInfo?.settings?.autoSave;if(e!=null)return!!e;let r=t?.containerItemID??t?.context;if(r){let n=re("caseInfo.settings.autoSave",null,r);if(n!=null)return!!n}return!1},Es=t=>Pi.has(t),u6=(t,e,r)=>{let n=$h.get(t);n||(n=new Map,$h.set(t,n)),n.set(e,r)},d6=(t,e)=>{Pi.size===0&&typeof document<"u"&&(document.addEventListener("pointerdown",s6,{passive:!0}),document.addEventListener("keydown",a6,{passive:!0}),document.addEventListener("input",c6,{capture:!0,passive:!0})),Pi.set(t,e)},EI=t=>{let e=Ss.get(t);e!==void 0&&clearTimeout(e),Ss.delete(t),hI.delete(t),Pi.delete(t),Jd.delete(t),$h.delete(t),YS(t),Pi.size===0&&typeof document<"u"&&(document.removeEventListener("pointerdown",s6),document.removeEventListener("keydown",a6),document.removeEventListener("input",c6,{capture:!0}))},HD=t=>{let e=`${t}/`;for(let r of[...Pi.keys()])r.startsWith(e)&&EI(r)},p6=(t,e)=>{let r=wh.get(t);return r||(r=new Set,wh.set(t,r)),r.add(e),()=>{let n=wh.get(t);n&&(n.delete(e),n.size===0&&wh.delete(t))}},AI=t=>{let e=Ss.get(t);e!==void 0&&(clearTimeout(e),Ss.delete(t))},Yd=t=>{Pi.has(t)&&(Jd.has(t)||yI(t,()=>SI(t).catch(()=>{})))},m6=()=>Jd,f6=t=>{AI(t),Jd.add(t)},g6=t=>{Jd.delete(t),nn.hasUnsavedChanges(t)&&Yd(t)};var{APP:dae}=d,hr={},Ua={},ja={},y6=new Set([kt,Ze,et,Qo]),pae=new Set([vn,mo,_t,lc,po,zi,...y6]),Ou="You will lose unsaved changes. Do you want to continue?",Rj="You have reached maximum limit of pending changes. Please commit/cancel one or more changes to continue.",mae=(t,e,r)=>{let n=Ua[e]||{};return Object.keys(n).forEach(o=>{let i=n[o].associatedProperty;Object.hasOwn(n,o)&&(i===void 0||r.has(i))&&g.buildObject(o,t,n[o].value)}),t},Mc=(t=dae.APP,e,r)=>{let n=hr[t]||{},o=Ua[t]||{};if(Object.keys(n).length===0&&Object.keys(o).length===0)return{};let i=[],s=null;e||(i=$c(t,!0)),r||(s=new Set(Mj(t)));let a=new Set(i),c={};return mae(c,t,a),Object.keys(n).forEach(l=>{let u=!e&&a.has(l)||e;Object.hasOwn(n,l)&&u&&!s?.has(l)&&g.buildObject(l,c,n[l].value)}),c};var Mh=t=>{let{context:e}=t,r=t.reference.startsWith(".")?t.reference.substr(1):t.reference;delete hr[e]?.[r],delete Ua[e]?.[r]};zL((t,e)=>{Mh({context:t,reference:e});let r=e.lastIndexOf(".");r<1||r===e.length-1||dt({type:d.MESSAGES.MESSAGES_TYPE_ERROR,context:t,pageReference:e.slice(0,r),property:e.slice(r)})});var S6=t=>t&&ja[t],WT=t=>{t&&ja[t]&&(ja[t]=!1)},h6=(t,e)=>{let{context:r,initialValue:n="",isStrictTracking:o,associatedProperty:i}=e,s=e.reference.startsWith(".")?e.reference.substr(1):e.reference;t[s]?t[s].previousValue=re(e.reference,null,r):(t[s]={initialValue:n||re(e.reference,null,r)},t[s].previousValue=t[s].initialValue),t[s].value=e.value,i&&(t[s].associatedProperty=i),o&&t[s].value===t[s].initialValue&&Mh(e)},E6=t=>{let{payload:e}=t,{context:r}=e,n=e.reference.startsWith(".")?e.reference.substr(1):e.reference;be.isFieldExists(r,n)||(Ua[r]=Ua[r]||{},h6(Ua[r],e)),hr[r]=hr[r]||{},h6(hr[r],e)},A6=(t,e,r)=>{let n=hr[t]||{},o;r instanceof Set?o=r:r&&r.length>0&&(o=new Set(r)),Object.keys(n).forEach(i=>{o?.has(i)||g.hasIn(e,i)&&(n[i].value=g.getIn(e,i))})},kh=t=>{let e=hr[t];if(!e)return{};let r={};return Object.keys(e).forEach(n=>{r[n]=e[n].value}),r},YV=({value:t,context:e,reference:r})=>{let n=te(e),o=We(n,e)||{};if(fI.isPageInstruction(r)||o?.subscriptFieldName)return;let i=r?.startsWith(".")?r?.substr(1):r;hr[e]=hr[e]||{},hr[e][i]||(hr[e][i]={initialValue:re(i,null,e)}),hr[e][i].value=t},xr=t=>t&&hr[t]&&Object.keys(hr[t]).some(e=>hr[t][e].initialValue!==hr[t][e].value)||!!S6(t),GD=(t,e)=>{if(!(t&&e))return!1;let r=hr[t]&&hr[t][e];return r?r.previousValue!==r.value:!1},fae=()=>Object.keys(hr).some(t=>xr(t)),xu=t=>{t&&hr[t]?(hr[t]={},Ua[t]={}):t==="all"&&(hr={},Ua={},ja={}),ja[t]&&(ja[t]=!1),YS(t)},C6=(t,e,r=new Set)=>{if(r.has(e))return;r.add(e);let n=ka.getDependencies(t,e),o=Cr.getResetDependencies(t,e);[...n,...o].forEach(i=>{let s=g.getPropertyNameFromDependency(i);if(typeof i=="object"&&i.mode==="multiRecord"){let a=s.split("."),c=`.${a.pop()}`,l=a.join(".");ke.isStateMachineExist(t,l,c)?ke.getStateMachine(t,l,c).deleteAll():Es(t)&&(ke.setStateMachine(t,c,l,new Cc(c,l,t)),ke.getStateMachine(t,l,c)?.deleteAll(!1))}else fI.isPageInstruction(s)&&ke.executeStateMachine(t,s,""),T({type:_t,payload:{reference:s,value:"",context:t,isArrayDeepMerge:!0,isImplicit:!0}});C6(t,s,r)})},gae=t=>{let{context:e,pageReference:r,value:n,reference:o}=t;Cr.triggerCascade(e,o,n);let i=ka.getDependencies(e,o),s={context:e,datapages:{}};C6(e,o),i.forEach(a=>{let c=r;a.startsWith(r)||(c="");let l=a.replace(`${c}`,"").split(".").filter(I=>!!I);l.pop();let u=l.join("."),p=re(`.${u}`,c,e)?.classID||t.classID,m=lt(a.split(".").pop(),p),{datasource:f}=m,h={},S=[];f.parameters.forEach(I=>{I?.value?(h[I.name]=Ir.isProperty(I.value)?re(`.${g.getFullPropertyReference([u,g.getPropertyName(I.value)])}`,c,e):I.value,h[I.name]===void 0||h[I.name]===null||h[I.name]===""?(h[I.name]="",S.push(d.NULL_STRING)):S.push(h[I.name])):(h[I.name]="",S.push(d.NULL_STRING))});let A=f.name.concat(d.UNDERSCORE_STRING,g.getHashedString(S.join(d.HASH_DELIMITER))),{name:C}=f,_=zr(C);s.datapages[A]={mode:f.mode,propertyName:a,name:f.name,dataViewParameters:h,refreshStrategy:_?.refreshStrategy}}),i.length&&T({type:pS,payload:s})},hae=()=>t=>e=>{let{type:r,payload:n={}}=e||{};if(!r||!pae.has(r)){t(e);return}if(r===vn&&(jD(n),gae(n),Ct.registerBlockingAction(n.context).catch(()=>{}),setTimeout(()=>{jm()?!Ti.triggerRefreshForType("PROP_CHANGE",n.reference,n.context)&&(GD(n.context,n.reference)||Rm(n.context))&&Pu(n):((GD(n.context,n.reference)||Rm(n.context))&&Pu(n),Ti.triggerRefreshForType("PROP_CHANGE",n.reference,n.context)),Ct.deRegisterBlockingAction(n.context).catch(()=>{})},0)),r===mo&&!n?.isDefault){let{context:o,referenceList:i,c11nEnv:s,listIndex:a,instruction:c,skipDirtyValidation:l=!1,skipRefresh:u=!1}=n;a===0&&c==="INSERT"&&s&&aj(s),u||setTimeout(()=>{Ti.triggerRefreshForType("PROP_CHANGE",i,o)||Pu({context:o,pageReference:i})},0),l||(ja[`${o}`]=!0)}if(r===_t||r===lc){let{reference:o,isImplicit:i,context:s,skipDirtyValidation:a=!1}=n;be.updateFieldNodeValue(s,o,n.value),!fI.isPageInstruction(o)&&!a?E6(e):a||(ja[`${s}`]=!0),(n.removePropertyFromChangedList||i)&&Mh(n)}if(r===po||r===zi){let{transientItemID:o,data:i}=n;g.iterateLeafNodes(i,s=>{Mh({context:o,reference:s.join(".")})})}r&&y6.has(r)&&(xu(n.context),Cr.purgeResetDependencies(n.context),oj(n.context),(n.childContainersContexts||[]).forEach(s=>{xu(s)}),(n.transientItems||[]).forEach(s=>{xu(s)})),t(e)},I6={propertyChangeMiddleware:hae,getChanges:Mc,recordChange:E6,isDirty:fae,isPropertyDirty:GD,isContextDirty:xr,resetChangedProperties:xu,deleteRecordedChange:Mh,isComplexObjectMerged:S6,resetComplexObjectDirtyStatus:WT};var qD=class{getCoreheaders(e){let r=`${E.APP.APP}${d.FORWARD_SLASH_STRING}${d.PRIMARY}`,n=se(r),o=pe(n),i=J.getProperty(d.COREHEADERS,"",o);if(i&&e in i)return i[e]}},_6=new qD;var Lh={defaultLimit:16},KD={SINGLE:"single",MULTIPLE:"multiple"},ge={PRIMARY:"primary",WORKAREA:"workarea",MODAL:"modal",PREVIEW:"preview"},zn=()=>we()?.getState()?.containers;function ot(t){return typeof t=="string"&&t.trim()!==""}var ut=t=>ot(t)?we()?.getState().containers[t]:null,qd=(t,e,r)=>{if(!r)return{continueExecution:!1,containerItemID:t};let n=ut(r),o=!1,i=t;return n?.accessedOrder.forEach(s=>{e===n.items[s].key&&(o=!0,i=n.items[s].context)}),{continueExecution:o,containerItemID:i}},We=(t,e)=>{if(!ot(t)||!ot(e))return null;let n=zn()?.[t];return n&&n.items&&n.items[e]||null},BT=t=>ot(t)?we()?.getState().containers[t]?.items:null,Zd=t=>ot(t)?we()?.getState().containers[t]?.accessedOrder||[]:[],yae=t=>ot(t)&&Zd(t)?.length>0||!1,ml=(t,e,r)=>{if(!ot(t)||!ot(e))return!1;let o=zn()?.[t],i=o&&o.items||null,s=r||((a,c)=>a===c);if(e&&i){for(let a of Object.keys(i))if(s(e,i[a].key))return!0}return!1},JD=t=>{let{containers:e}=we()?.getState()||{};return!e||!ot(t)?!1:Object.keys(e).some(r=>e[r]?.accessedOrder?.includes(t))},wt=(t,e,r)=>{if(!ot(t)||!ot(e))return null;let o=zn()?.[t],i=o&&o.items||null,s=r||((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},Sae=(t,e)=>{let r=(n,o)=>n?.toLowerCase()===o?.toLowerCase();if(t&&e){for(let n of Object.keys(e))if(r(t,e[n].key))return e[n]}return null},Eae=t=>{if(!ot(t))return null;let e=zn()??{};for(let r of Object.keys(e))if(e[r]){let o=e[r].items??null,i=Sae(t,o);if(i)return i}return null},Rh=(t,e)=>{if(!ot(t)||!ot(e))return!1;let r=zn();return r&&Object.hasOwn(r,`${t}/${e}`)},Aae=(t,e)=>{if(!ot(t)||!ot(e))return null;let n=zn()?.[`${t}/${e}`];return n&&n.type},se=t=>{if(!ot(t))return null;let e=null,r=zn();if(r&&r[t]){let n=r[t],{accessedOrder:o}=n;e=o&&o.length>0?o[o.length-1]:null}return e},Cae=(t,e,r)=>{if(!ot(t)||!ot(e))return!1;let n=wt(t,e,r);return n?n===se(t):!1},b6=(t,e)=>{let r=null,n=zn();if(!n)return null;for(let o of Object.keys(n))if(n[o].items){let i=n[o].items[t];if(i?r=i[e]:r=null,r)break}return r},pe=t=>ot(t)?b6(t,"context"):null,Ar=t=>{if(!ot(t))return null;let e=null,r=zn();if(r&&r[t]){let n=r[t],{accessedOrder:o}=n,i=o&&o.length>0?o[o.length-1]:null;e=pe(i)}return e},Tu=t=>{if(!ot(t))return[];let e=t.endsWith("/")?t:`${t}/`,r=[],n=!1,o=zn();if(!o)return[];let i=s=>{let a=[];return Object.keys(s).forEach(l=>{l.startsWith(e)&&l!==e&&a.push(l),l===t&&(n=!0)}),a};for(let s of Object.keys(o))if(o[s].items){let a=i(o[s].items);a&&a.length>0&&(r=r.concat(a)),r=r.sort()}return n?r:[]},Ke=t=>{if(!ot(t))return[];let e=[],r=zn();if(!r)return[];let n=`${t}${d.FORWARD_SLASH_STRING}`;for(let o of Object.keys(r))o.startsWith(n)&&e.push(o);return e},ko=t=>{if(!ot(t))return[];let e=[],r=zn();if(!r)return[];let n=`${t}${d.FORWARD_SLASH_STRING}`;for(let o of Object.keys(r))o.startsWith(n)&&(Zd(o)||[]).forEach(s=>{pe(s)!==t&&e.push(pe(s))});return e},Uh=t=>{let e=[...ko(t),t],r=[],n=we()?.getState().data||{};return e.forEach(o=>{Object.hasOwn(n,`${o}/${d.SUGGESTION}`)&&r.push(`${o}/${d.SUGGESTION}`)}),r},It=t=>ot(t)?t&&ut(t)&&ut(t).type===KD.SINGLE:null,mr=t=>ot(t)?t&&ut(t)&&ut(t).type===KD.MULTIPLE:null,Fr=t=>ot(t)&&ut(t)&&ut(t).items&&Object.keys(ut(t)?.items).length>0||!1,T6=t=>t&&Lh[t]?Lh[t]:Lh.defaultLimit,Iae=(t,e=Lh.defaultLimit)=>{ot(t)&&(Lh[t]=e)},HT=t=>{if(!ot(t))return!1;let e=!1,r=ut(t),{items:n={}}=r,o=Object.keys(n),i=T6(t);return o&&o.length>0&&o.length>=i&&(e=!0),e},kc=t=>{if(!t||!ot(t.name)||!ot(t.context))return null;let e=t?.name,r=`${t?.context}/${e}`,n=ut(r),o=Array.isArray(n?.accessedOrder)&&n?.accessedOrder.map(a=>n?.items[`${a}`]?.context)||[],i=Ke(`${d.APP.APP}/${d.PREVIEW}`),s=ko(`${d.APP.APP}/${d.PREVIEW}`);return{context:t?.context,name:e,containerItems:[...o,...s],childContainers:i}},jh=t=>{if(!ot(t))return!1;let e=pe(t);return xr(e)||FT(t)},GT=t=>{if(!ot(t))return null;let e,r=ut(t),{accessedOrder:n=[]}=r;for(let o=0;o<n.length;o+=1){let i=n[o];if(!jh(i)){e=i;break}}return e},te=t=>{if(!ot(t))return null;let{containers:e}=we()?.getState()||{};if(e){for(let n of Object.keys(e))if(e[n]?.accessedOrder?.includes(t))return n}let r=t.lastIndexOf(d.UNDERSCORE_STRING);return t.slice(0,r)},aa=async(t,e={})=>{if(!ot(t))return Promise.reject(new Error("closeContainerItem: containerItemID is the required parameter"));let r=te(t),n=pe(t),{skipDirtyCheck:o}=e,i=!0,s=[];if(jh(t)&&!o&&(On.disableLoadingIndicator({context:n}),i=await li.confirm(Or().getLocaleValue(Ou,"Messages")),On.enableLoadingIndicator({context:n})),i){let{accessedOrder:a=[],items:c={},type:l}=ut(r);s=a.filter(S=>S!==t);let u=s[s.length-1],p=c[u]||{},{semanticURL:m=d.FORWARD_SLASH_STRING,context:f}=p;r?.includes(ge.MODAL)||(s.length>0&&m&&m!==d.FORWARD_SLASH_STRING?Zi({directUrlUpdation:!0,semanticURL:m,options:{containerItemID:u,context:f}}):Zi({directUrlUpdation:!0,semanticURL:d.FORWARD_SLASH_STRING,options:{}})),T(Qe({containerItemID:t,context:n,target:r,containerInfo:{newAccessedOrder:s,containerType:l},...e.eventName!==void 0?{eventName:e.eventName}:{}}))}return{newAccessedOrder:s,removeItem:i}},YD=(t,e,r,n)=>{let o="root",i=ur(e,o,!0),s=Z(e,o),a={root:t,containerItemID:i,context:n?"app":i,target:s,containerName:e},c={data:r,context:n?"app":i},l=[Pt(a)];l.push(Re(c)),T(l)},_ae=(t,e,r)=>{let n=Zd(t);n=n.filter(i=>i!==e);let o=!1;for(let i=0;i<n.length;i+=1)if(pe(n[i])===r){o=!0;break}return o},ZD=t=>{if(!ot(t))return!1;let e=zn(),r=pe(t),n=e?Object.keys(e):[],o=!1;for(let i=0;i<n.length&&(o=_ae(n[i],t,r),!o);i+=1);return o},bi=t=>{Array.isArray(t)||(t=[t]);let e=zn()||{};return t.map(r=>{let n=te(r);return g.getIn(e,[n,"items",r,"transientItems"])||[]}).flat()},bae=t=>{let{transientItemID:e,data:r,options:n}=t,o=g.deepClone(we()?.getState().data[e]);n?.reset&&g.iterateLeafNodes(o,i=>{i[i.length-1]!=="classID"&&g.setIn(o,i,"")}),T(Ph({transientItemID:e,data:g.mergeDeep(r,o)}))},Tae=t=>{let{transientItemID:e,data:r}=t;T(ow({transientItemID:e,data:r}))},vae=t=>{let e=g.deepClone(we()?.getState().data[t]);g.iterateLeafNodes(e,r=>{r[r.length-1]!=="classID"&&g.setIn(e,r,"")}),T(nw({transientItemID:t,data:e}))},v6=t=>{let e=g.deepClone(we()?.getState().data[t]);g.iterateLeafNodes(e,r=>g.setIn(e,r,"")),T(iw({transientItemID:t,data:e}))},Rae=t=>{we()?.getState().data[t]&&v6(t);let e=t.lastIndexOf("/"),r=e>0?t.substring(0,e):t,n=te(r);T(Nh({transientItemID:t,containerItemID:r,target:n}))},WD=class{static items;static addContainerItems(e){this.items=e}static getContainerItems(){return this.items}static deleteContainerItem(e){let r=this?.items?.indexOf(e);r!==void 0&&r!==-1&&this.items.splice(r,1)}},Pae=(t,e={})=>{if(!ot(t))return;let r=ut(t),n=Array.isArray(r?.accessedOrder)?r.accessedOrder:[];if(n.length===0)return;let{remove:o,keep:i}=e,s;if(i!==void 0){let a=new Set(i);s=n.filter(c=>!a.has(c))}else if(o!==void 0){let a=new Set(o);s=n.filter(c=>a.has(c))}else s=[...n];for(let a of s){let c=pe(a),l=bi(a);T(Qe({containerItemID:a,context:c,target:t,...l.length>0&&{transientItems:l}}))}},CI=()=>WD,QD=t=>{let e={containerName:t};e.childContainers=Ke(t),T({type:sS,payload:e})},XD=(t,e)=>{let r=Tu(t),{key:n}=We(te(t),t),o=[];r.forEach(i=>{let{key:s}=We(te(i),i);if(s===n){let a={data:{caseInfo:{headers:{etag:e}}},target:te(i),context:i};o.push({type:Er,payload:a})}}),o.length&&T(o)},ew=(t,e)=>{let r=[],n={data:{caseInfo:{headers:{etag:e}}},target:te(t),context:t};r.push({type:Er,payload:n}),r.length&&T(r)},Go=()=>v.isPortalLoaded?"app":"root",Nae=()=>_6,tw=(t,e)=>{let r={data:{caseInfo:{lastUpdateTime:e}},target:te(t),context:t};T({type:Er,payload:r})},rw=(t,e)=>{let r=wt(t,e),n=wt(`${r}/workarea`,e);return pe(n)},hE=t=>ot(t)?b6(t,"parentContext"):null,Oae=t=>{let{accessedOrder:e}=t;return e&&e.length>0?e[e.length-1]:""},Ma=t=>{if(t&&typeof t=="string"){let e=t.split("/");return e.pop(),e.join("/")}return null},xae=()=>tI;var R6=t=>{typeof window>"u"||(window.document.title=t)},P6=(t,e)=>(t!==void 0&&(t.options=e),{stateObj:t}),N6=(t,e,r)=>{if(!(typeof window>"u"))try{window.history.pushState(t,e,r),window.scrollTo(0,0)}catch{throw new Error("Error- Unable to Add to Browser History")}},O6=(t,e,r)=>{if(!(typeof window>"u"))try{window.history.replaceState(t,e,r)}catch{throw new Error("Error- Unable to Replace Browser History")}},x6=t=>t.state?.type==="ui-navigation"?($.publish(E.PUB_SUB_EVENTS.URL_NAVIGATION,t.state),null):t.state?t.state.stateObj:null,D6=t=>{typeof window>"u"||window.addEventListener("popstate",e=>t(e))},w6=()=>{typeof window>"u"||(window.onbeforeunload=()=>null)},Qd=()=>typeof window>"u"?"":ci(window.location.pathname),II=()=>typeof window>"u"?"":ci(window.location.pathname+window.location.search);var $6=()=>typeof window>"u"?"":window.location.search,zh=(t,e,r)=>{switch(r){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 Dae=/^(?!\.+$)[\w.~-]+$/,wae=/^[^/?#{}]+\/\{businessID\}$/,$ae=/^[A-Za-z0-9]+__/,Mae={reqType:"GET",endPoint:"/api/application/v2/cases/[{caseTypeID}][businessID={businessID}]?viewType={viewType}",body:{},urlPattern:"cases/[{caseTypeID}][businessID={businessID}]",params:{caseTypeID:"",businessID:"",viewType:"page"}},sw=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,r)=>{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=r,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(n=>{Uo(n)?this.dynamicRoutesList?.push(n):this.staticRoutesList?.push({[n]:e[n]})})};_getDynamicKeyName=e=>{let r=e.indexOf("{")+1,n=e.lastIndexOf("}");return e.slice(r,n)};isDefaultPortal=()=>`${this.bDefaultPortal}`!="false";getPortalName=()=>this.portalName;getApplicationPath=()=>ci(`${this.getReqContextName()}/${this.getReqServletNameReal()}`);getReqServletNameReal=()=>`${this.reqServletNameReal}`;getAppDelimeter=()=>`${this.appDelimeter}`;getApplicationName=()=>`${this.appName}`;getApplicationAlias=()=>`${this.appAlias}`;getServletPath=()=>`${this.reqServletPath}`;getOrganizationName=()=>`${this.orgName}`;getReqContextName=()=>ci(this.reqContextName);getRoutingInfo=()=>this.routingInfo;processUrl=(e,r)=>{r&&(e=e.toLowerCase()),e&&(e=decodeURIComponent(e));let n=new RegExp(this.getApplicationPath(),"i");return e=e.replace(n,""),e.startsWith("/")&&rs()&&v.getRenderingMode()!=="PREVIEW"&&this.setDefaultClassName(""),ci(e)};stripIgnoredParams(e){return this.ignoreFromEndPoint?.forEach(r=>{e.includes(r)&&(e=e.substring(0,e.indexOf(r)))}),e}getRouteDetails=(e,r)=>{if(!r)return this.appRoutes[e];let n="",o={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&&(n=s.routeKey,o={...s.payload})}),!n&&this.appRoutes&&this.appRoutes[e]&&(n=this.appRoutes[e].routeKey,o={...this.appRoutes[e].payload}),{routeKey:n,payload:o}};transformRemoteCasePayload(e){let{caseClassName:r,caseID:n}=e;if(!ae.isRemoteCase(r))return e;let{RemoteClassGroup:o,RemoteSystemID:i}=ae.getRemoteCase(r??"");return{...e,caseID:n?.replace(r??"",o?.toUpperCase()),RemoteSystemID:i}}getEndPointInfo=e=>{e=this.stripIgnoredParams(e);let r=rs(),n=this.processUrl(e,!0),o=this._getMatchedRouteInRoutingTable(n,r?this.defaultClassName:void 0);o||(n=this.processUrl(this.defaultViewUrlPath,!r),o=this._getMatchedRouteInRoutingTable(n,r?this.defaultClassName:void 0)||"");let{routeKey:i,payload:s}=this.getRouteDetails(o,r),a=this.appRoutesMeta?.[i]?.restApi??(i===Fi?Mae: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),o)};getSemanticURL(e,r,n){return this.buildSemanticURL(e,r,n)}findBusinessIDRoute(e){let r=[];Object.entries(this.appRoutes??{}).forEach(([s,a])=>{let c=a?.payload?.caseTypeID;a?.routeKey===Fi&&typeof c=="string"&&c&&wae.test(s)&&r.push({pattern:s,typeID:c})});let n=r.find(({typeID:s})=>s===e);if(n)return n.pattern;let o=s=>s.replace($ae,""),i=r.filter(({typeID:s})=>o(s)===o(e));return i.length===1?i[0].pattern:void 0}getBusinessIDURLPath(e,r){return!this.appRoutesMeta||!(Fi in this.appRoutesMeta)?"":this.getBusinessIDRoutePath(e,r)}getBusinessIDRoutePath(e,r){return!e||!r||!Dae.test(r)||ae.isRemoteCase(e)?"":this.findBusinessIDRoute(e)?.replace("{businessID}",r)??""}getResolvedSemanticURL(e,r,n={},o){let i=e===Lt||e===$r,s=n?.businessID,a=i&&typeof s=="string"?this.getBusinessIDURLPath(r?.caseClassName,s):"";if(!a){let p=this.getSemanticURL(e,r,n);a=p,Uo(p)&&p.match(Rc)?.forEach(f=>{let h=this._getDynamicKeyName(f);n[h]&&(a=a.replace(f,String(n[h])))})}let c=L6(a,o),l=new URL(c),u=this.getPortalName();return this.isDefaultPortal()?l.searchParams.delete("portal"):u&&!d2(l.searchParams)&&l.searchParams.append("portal",u),o&&!l.searchParams.has("lang")&&l.searchParams.append("lang",o),Pc(l.toString())}buildDocumentTitle(e,r,n){let o=n??"";return v.getCaseLabelFirstInTitle()?e&&r?`${e} (${r}) - ${o}`:o:e&&r?`${r}: ${e} - ${o}`:o}updateSemanticURLAndDocumentTitle(e,r){let n=/{.+?}/,{key:o,actionName:i,caseClassName:s,isRemoteCase:a,name:c}=e;if(a&&!s)return;let l=this.getSemanticURL(i,{caseClassName:s}).replace(n,String(er(o))),u=`${E.APP.APP}${d.FORWARD_SLASH_STRING}${E.PRIMARY}`,p={semanticURL:l,directUrlUpdation:!0,options:{acName:u,context:Ar(u)}},m=Qd();l&&!m.includes(l)&&k6(p,r);let f=o.substring(o.lastIndexOf(" ")+1),h=v.environmentInfoObject?.pxApplication?.pyLabel,S=this.buildDocumentTitle(c,f,h);U6(S)}buildSemanticURL(e,r,n){let{urlPattern:o}=this.appRoutesMeta?.[e]||{},i=o?.split("/").length,s=o?.split("/");this.setDefaultClassName(r?.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],n);if(Object.keys(r).length===0)return"";let c=a.find(l=>{let u=this.appRoutes[l].payload,p={...n};delete p.dataViewName,delete p.dataContext;let m=u.dataViewKeys||u.dataContextParameters||{},f=Object.keys(r).every(h=>r[h]===u[h]);return f?!g.isEmpty(m)&&!g.isEmpty(p)?Object.keys(p).every(h=>Object.hasOwn(m,h)):f:!1});return c?this._getQueryParamsResolvedURL(c,n):a.includes("cases/{id}")&&n?.id?"cases/{id}":""}_getQueryParamsResolvedURL(e,r,n=!1){let[o,i]=e.includes("?")?e.split("?"):[e];if(i&&r&&Object.keys(r).length>0){let s={};for(let[u,p]of Object.entries(r))s[u.toLowerCase()]=p;let a=new URLSearchParams(i),c={};for(let[u,p]of a.entries())if(typeof p=="string"&&Uo(p)){let m=this._getDynamicKeyName(p),f=m.toLowerCase(),h=n?s:r,S=n?r[m]??h[f]:h[m];S!=null&&(c[u]=S)}else typeof p=="string"&&(c[u]=p);let l=new URLSearchParams(Object.entries(c).map(([u,p])=>[u,String(p??"")]));return`${o}?${Pc(l.toString())}`}return o}_getQueryParamsObject(e){let r={};if(!e)return r;for(let n of e.split("&")){let o=n.indexOf("=");if(o!==-1){let i=n.slice(0,o),s=n.slice(o+1);try{r[decodeURIComponent(i)]=decodeURIComponent(s)}catch{r[i]=s}}}return r}getRestEndPoint(e,r){try{return this._buildRestApi(e,r)}catch(n){return console.error(n),null}}_buildRestApi(e,r){if(e&&this.appRoutesMeta?.[e]){let{reqType:n,body:o,params:i}=this.appRoutesMeta[e].restApi,{endPoint:s}=this.appRoutesMeta[e].restApi;r?.params&&r.params.pageName&&(s=`${s}&pageName=${r.params.pageName}`);let a=s.match(Rc);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,()=>r?.[l]??i?.[l])}if(o){let c={};return Object.keys(o).forEach(u=>{if(r&&this._isSpecialInstruction(u)){let p=o[u];Array.isArray(p)&&p.every(m=>typeof m=="string")&&(c={...c,...this._processInstruction(u,p,r)})}}),{restApi:s,reqType:n,body:c}}return{restApi:s,reqType:n}}throw new Error(`Cannot find route metadata for the routeKey: ${e}.`)}_isSpecialInstruction(e){return e&&e.startsWith("@")}_processInstruction(e,r,n){let o={};return e==="@COPY"&&r.forEach(i=>{o[i]=n?.[i]}),o}doesRestApiExist(e){return!!(this.appRoutesMeta&&this.appRoutesMeta[e])}_resolveMatchedRouteQueryParams=(e,r,n,o)=>{if(!e)return;let i=r.indexOf("?"),s=i!==-1?r.substring(i+1):void 0;if(s){let a=`${n.join("/")}?${s}`;return this._getQueryParamsResolvedURL(a,o,!0)}};_resolveRoute=(e,r,n)=>{let o=[],[i,s]=r.includes("?")?r.split("?"):[r],[a,c]=n.includes("?")?n.split("?"):[n],l=i.split("/"),u=a.split("/"),p={};for(let C=0;C<u.length;C+=1)if(o[C]=u[C],Uo(u[C])){let _=this._getDynamicKeyName(u[C]);p[_]=l[C],o[C]=l[C]}let m=this._getQueryParamsObject(c),f=this._getQueryParamsObject(s),h={};for(let[C,_]of Object.entries(f))h[C.toLowerCase()]=_;for(let C of Object.keys(m))Uo(m[C])?p[C]=f[C]||h[C.toLowerCase()]:p[C]=m[C];let S=this._resolveMatchedRouteQueryParams(s,n,o,f),A=this._resolvePayload(e,p,n);return{...this._resolveRouteEndPoint(A,n),urlPath:S||o.join("/")}};_resolveRouteEndPoint=(e,r)=>{let{routeEndpoint:n}=e;if(!Uo(n))return e;let o={};if(o[r]=e,e.payload!==void 0){let i=n.match(Rc);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===Fi&&c==="businessID"?encodeURIComponent(e.payload[c]):e.payload[c];n=n.replace(a,u)}else this._sendWarningAndErrorMessages(`Unable to resolve dynamic token {${c}} in routeEndpoint- ${c} is missing in payload`,o)}}else this._sendWarningAndErrorMessages("Unable to resolve dynamic token(s) in routeEndpoint- payload is missing in routing table for-",o);return{...e,routeEndpoint:n}};_resolvePayload=(e,r,n)=>{if(typeof e.payload>"u")return e;let o={};o[n]=e;let i={...e.payload,...this._resolvePayloadRecursive(e.payload,r)};return{...e,payload:i}};_resolvePayloadRecursive(e,r){if(Array.isArray(e))return e.map(o=>this._resolvePayloadRecursive(o,r)).flat();let n={};for(let o of Object.keys(e)){let i=e[o];if(typeof i=="string"&&Uo(i)){let s=i.match(Rc)??[];for(let a of s){let c=this._getDynamicKeyName(a);r[c]!==void 0?i=i.replace(a,r[c]):this._sendWarningAndErrorMessages(`Unable to resolve dynamic token {${c}} in payload - {${c}} is missing in semantic url construct`)}n[o]=i}else i&&typeof i=="object"?n[o]=this._resolvePayloadRecursive(i,r):n[o]=i}return n}_getMatchedRouteInRoutingTable=(e,r)=>{let[n]=e.includes("?")?e.split("?"):[e],o=this._findMatchedRouteInStaticList(n,r);if(o!==void 0||(o=this._findMatchedRouteInDynamicList(e),o!==void 0))return o};_findMatchedRouteInStaticList=(e,r)=>{if(!this.staticRoutesList||!e)return;let n=e.toLowerCase(),o=r?.toLowerCase();if(rs()){let i=this._findMatchingRouteByClass(n,o);if(!i)return;let a=Object.values(i)[0]?.payload?.page||"";return this.setStaticRoutePage(a),Object.keys(i)[0]}return this._findInStaticList(n)};_findMatchingRouteByClass=(e,r)=>{if(this.staticRoutesList)return this.staticRoutesList.find(n=>Object.entries(n).some(([o,i])=>{if(!i)return!1;let s=i.payload?.page?.toLowerCase(),a=i.payload?.pageClass?.toLowerCase(),c=s===e||o.toLowerCase()===e;return r?c&&a===r:c}))};_findInStaticList=e=>{if(!this.staticRoutesList)return;let r=this.staticRoutesList.find(n=>Object.keys(n)[0].toLowerCase()===e);return r?Object.keys(r)[0]:void 0};_findMatchedRouteInDynamicList=e=>{let[r,n]=e.includes("?")?e.split("?"):[e],o=r.split("/");return this.dynamicRoutesList?.find(i=>{let[s,a]=i.includes("?")?i.split("?"):[i],c=s.split("/");if(c.length!==o.length)return!1;let l=0;for(l=0;l<c.length;l+=1){let u=c[l].toLowerCase();if(!Uo(u)&&u!==o[l]&&c2(u)!==o[l])return!1}if(a){let u=new URLSearchParams(n.toLowerCase()),p=new URLSearchParams(a.toLowerCase()),m=new Set,f=new Set,h=/\{[a-zA-Z]+\}/;for(let S of u.keys())m.add(S);for(let S of p.keys())f.add(S);if(f.size!==m.size)return!1;for(let S of m){if(!f.has(S))return!1;let A=p.get(S);if(u.get(S)!==A&&!h.test(A??""))return!1}}return!0})};_sendWarningAndErrorMessages=(e,r)=>{zh(e,r,"warning"),zh("Error in Generated Routing Table",null,"error"),zh("Back | Forward for this page may NOT work as intended",null,"warning"),zh("Bookmark | Refresh for this page may NOT work as intended",null,"warning")}},kae=new sw,ye=kae;var aw=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 r=e?.pxOperator?.pyUserName,n=r?g.decodeHtmlEntities(r):void 0,o={...e,pxOperator:e.pxOperator?{...e.pxOperator,...n?{pyUserName:n}:{}}:e.pxOperator};this.environmentInfoObject=o;let i=this.environmentInfoObject?.features||g.convertObjectWithStringToBoolean(this.environmentInfoObject?.pyFeatures)||{granularUIRefresh:!1};this.environmentInfoObject.features={...i,granularUIRefresh:i.granularUIRefresh||i.pyEnableGranularUIRefresh||!1},this.environmentInfoObject.pyGenAIEnabled=!!this.environmentInfoObject.pyGenAIEnabled,P.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&&_I(a)}gs.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 ye.getPortalName()}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,r){return r?.type==="dark"?this.darkThemeOverrides=e:this.themeOverrides=e,$.publish(d.PUB_SUB_EVENTS.UI_EVENTS.THEME_CHANGE,e),r?.type==="dark"?this.darkThemeOverrides:this.themeOverrides}getNavOrientation(){return this.nav?.orientation??this.environmentInfoObject?.pyNavOrientation}setNavOrientation(e){return this.nav={...this.nav,orientation:e},$.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,r){return r?.type==="dark"?this.brandingInfoDark=e:this.brandingInfo=e,this.brandingInfo}getCookieComplianceMethod(){return this.cookieComplianceMethod}setCookieComplianceMethod(e){this.cookieComplianceMethod=e}setLocale(e){let n=e.replaceAll("-","_").split("_").slice(0,2);this.locale=n.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 r=Reflect.get(e,"plugins");return typeof r=="object"&&r!==null&&(!!Reflect.get(r,"c11n_spa")||!!Reflect.get(r,"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(){Tr.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 r=this.environmentInfoObject?.features;return this.environmentInfoObject&&e&&(this.environmentInfoObject?.features?this.environmentInfoObject.features={...r,...e}:this.environmentInfoObject.features={...e}),this.getFeatureMap()}getFeatureMap(){return this.environmentInfoObject?.features||{}}getFeature(...e){if(e.length!==0)return g.getIn(this.getFeatureMap(),e)}setKeyMapping(e){return this.KeyMapping=e,this.KeyMapping}getKeyMapping(e){let r=this.KeyMapping[e];return r!==void 0?r: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||[]:[]}getClassesAccessList(){return this.environmentInfoObject?.pyClassesAccessList?.pxResults??[]}getUserSettings(){return this.environmentInfoObject?.pyUserSettings||null}getLocalizationVersion(){let e=this.getFeatureMap().pyLocalizationVersion,r=this.getFeatureMap().localizationVersion;return r!==void 0?r:e!==void 0?parseInt(e,10):1}getLocalizationBundles(e=this.locale){return gs.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(r=>r.pyClassName===e).map(r=>r.pyActionName)??[]}getInlineEditActionViews(e){return this.environmentInfoObject?.pyInlineEditActions?.filter(r=>r.pyClassName===e).map(r=>r.pyViewName)??[]}getFullObjectDisplayTemplate(){return this.environmentInfoObject?.pyFullObjectDisplayTemplate??void 0}setFullObjectDisplayTemplate(e){this.environmentInfoObject&&(this.environmentInfoObject.pyFullObjectDisplayTemplate=e),$.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),$.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),$.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),$.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),$.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),$.publish(d.PUB_SUB_EVENTS.UI_EVENTS.PORTAL_CONTENT_WIDTH_CHANGE,e)}},v=new aw;var Lae=t=>t.status==="fulfilled",Uae=async t=>{let e=v.getAvailableLocalePacks(),r=v.getLocalizationBundles(t),n;if(t&&e&&e.includes(t)?n=[ve("getLocalizationPack",{queryPayload:{locale:t}})]:r.length>0&&(n=r.map(c=>ve("getLocalizationPack",{queryPayload:{version:c.pyBundleVersion,bundle:c.pyBundleName}}))),!n||n.length===0)return;let o=200,i=201,s=await Promise.allSettled(n),a=vi(t??"en-US");s.filter(Lae).forEach(({value:c})=>{if([o,i].includes(c.status)&&c.data){let l=c.data;Object.keys(l).forEach(u=>{a.setLocaleForRule(l[u],u)})}})},jae=async(t=v.getLocale())=>{try{await Uae(t)}catch(e){console.warn(e)}},Xd=jae;var cw=class{static regex=/\{@P[^}]*\s*:\s*[^}]*\}/g;static subRegex=/:'[a-zA-Z0-9!@#$&()\\-`.+,/\s"]*'/;static keyMap={};static formatLocaleKey(e){let r=0,n="";for(;r<=e.length;){let o=e.indexOf("{@P ",r);if(o===-1){n+=e.substring(r,e.length);break}n+=e.substring(r,o);let i=e.indexOf("}",r),s=e.substring(o,i+1),[a,c]=this.getKeyAndValue(s);this.addKeyToMap(a,c),n+=`${s.split(":")[0]}}`,r=i+1}return n}static getKeyAndValue(e){let r=e.indexOf(":"),n=e.indexOf("}");return[`${e.substring(0,r)}}`,e.substring(r+1,n)]}static addKeyToMap(e,r){this.keyMap[e]=r}static replaceWithValue(e){let r=0,n="";for(;r<=e.length;){let o=e.indexOf("{@P ",r);if(o===-1){n+=e.substring(r,e.length);break}n+=e.substring(r,o);let i=e.indexOf("}",r),s=e.substring(o,i+1);n+=this.keyMap[s],r=i+1}return n}},lw=cw;var bI=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,r)=>{let n=e.LocaleContent,o=r.toUpperCase();o.startsWith("@BASECLASS!DATAPAGE!")&&o.split(/[!#]/).length<4?Object.entries(n).forEach(([i,s])=>{s!==null&&typeof s=="object"&&"fields"in s&&this.updateLocaleStore(s,`${o}#${i}`.toUpperCase())}):o==="GENERIC!GENERICFIELDS"?Object.entries(n).forEach(([i,s])=>{s!==null&&typeof s=="object"&&this.sanitizeLocaleField(s,i.toUpperCase())}):this.sanitizeLocaleField(n,o)};updateLocaleStore=(e,r)=>{let n=e.fields||e,o=this.localeStore[r];o?g.mergeDeep(n,o):n&&typeof n=="object"&&(this.localeStore[r]=n)};sanitizeLocaleField=(e,r)=>{["DASHBOARDSMANAGER","DATAEXPLORER","INSIGHT"].includes(r.toUpperCase())&&Object.entries(e).forEach(([,o])=>{o!==null&&typeof o=="object"&&"fields"in o&&this.updateLocaleStore(o,r)}),this.updateLocaleStore(e,r)};getLocaleForRule(e){return this.localeStore[e]}resetLocaleStore=()=>{this.localeStore={}};getLocaleValue(e,r,n,o){let i=this.#e(n,r),s=this.#t(e);s&&(e=lw.formatLocaleKey(e));let a=i?this.localeStore[i.toUpperCase()]??{}:{},c=o?this.localeStore[o.toUpperCase()]??{}:{};return n?.toUpperCase()==="MESSAGES"&&typeof e=="string"?this.getLocalizedErrorMessage(a,e)||e:s?lw.replaceWithValue(a[e]||c[e]||e):a[e]||c[e]||e}#e(e,r){return e?.toUpperCase().startsWith("@BASECLASS!DATAPAGE!")?r?`${e}#${r}`:e:e||r}getParagraphLocaleValue(e,r){let n=`${e}!${d.PARAGRAPH}!${r}`,o=this.localeStore[n.toUpperCase()];if(o){let i=typeof globalThis.atob=="function"?decodeURIComponent(globalThis.atob(o.content).split("").map(s=>`%${`00${s.charCodeAt(0).toString(16)}`.slice(-2)}`).join("")):o.content;return{category:o.category,content:i}}return null}getPortalLocaleReference(e){return v.getLocalizationVersion()!==2?"":e?`PORTAL!${e}`.toUpperCase():`PORTAL!${v.getPortalName()}`.toUpperCase()}getCaseLocaleReference(e){return e?`CASE!${e}`.toUpperCase():null}getLocalizationVersion(){return 2}async getLocaleJsons(e){if(!await this.isCurrentLocalePackAvailable())return[];let r=v.getUseLocale(),n=[],o=PCore.getLocaleUtils().localeStore;if(e=e.filter(i=>!o[i]),e=e.map(i=>i.toUpperCase()),e.length>0){let i=e.map(a=>({localeRuleKey:a,promise:Be.getSvcLocale(r,`${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&&n.push({localeRuleKey:l.localeRuleKey,jsonData:u})}}))}return n}async loadLocaleResources(e){await gs.loadLocaleBundle(e),await Promise.all(e.map(r=>Xd(r)))}setTimezone(e){this.timezone=e}getTimeZoneInUse(){let e=Intl.DateTimeFormat().resolvedOptions().timeZone;return this.timezone||e}matchPatternWithText(e,r){let n=r,o=[];for(let i=0;i<e.length;){let s=e[i];if(s.length!==0){let a=n.indexOf(s);if(a===-1)return null;if(i>0){let c=n.slice(0,a);o.push(c)}n=n.slice(a+s.length)}i+=1}return n&&o.push(n),o}getLocalizedErrorMessage(e,r){let n="";if(e[r])return e[r];for(let o of Object.keys(e)){let i=o.split(/\{\d+\}/),s=this.matchPatternWithText(i,r);if(s){let a=e[o];if(n=this.replacePlaceHolders(s,a),n)return n}}return n}replacePlaceHolders(e,r){for(let n=0;n<e.length;){if(!r.includes(`{${n+1}}`))return"";r=r.replace(`{${n+1}}`,e[n]),n+=1}return r}async isCurrentLocalePackAvailable(){let e=v.getLocale();return this.availableLangPacks||(this.availableLangPacks=await Be.getSvcAvailableLocales()),e&&this.availableLangPacks.includes(e)}getBaseComponentLabels=()=>this.getLocaleForRule("COSMOSFIELDS");#t(e){let r=!1;return e&&typeof e=="string"&&(r=e.includes("@P ")),r}},Or=t=>{let e=t??v.getLocale()??"en-US";return vi(e)};xe.registerHandler("@L",(t,e)=>e?e.getLocalizationService(e.getLocaleRuleName()).getLocalizedText(t):t);xe.registerHandler("@P",(t,e,r)=>r?J.getLitePropertyValue(r):e.getValue(t));xe.registerHandler("@E",(t,e,r)=>{try{let n=MD(t),o=kD(n);return LD(o,e,r)}catch{}return!0});xe.registerHandler("@W",(t,e,r)=>{let n;if(r){let{pageReference:o,context:i}=r;n=Qi(o,`.${d.SUMMARY_OF_WHEN_CONDITIONS}.${t}`,i)}else n=e.getContextDataValue(`.${d.SUMMARY_OF_WHEN_CONDITIONS}.${t}`);return n===!0||n==="true"});function zae(t,e,r,n){let o="",i=r;if(e.join(d.HASH_DELIMITER)&&(o=g.getHashedString(e.join(d.HASH_DELIMITER)),i=r+d.UNDERSCORE_STRING+o),n){let l=jo(),u=l?l[r]?.[i]:{};return Array.isArray(u?.[P.getDefaultQualifiedName("pxResults")])?u[P.getDefaultQualifiedName("pxResults")]:[]}let c=(t.getDataObject()?.[r]||{})?.[i]||{};return Array.isArray(c?.[P.getDefaultQualifiedName("pxResults")])?c[P.getDefaultQualifiedName("pxResults")]:[]}function Fae(t,e,r){let n=fe.getPropertyName(t?.propertyForDisplayText??""),o=fe.getPropertyName(t?.propertyForValue??""),i=r?.lastIndexOf(".")??-1,s=i>0?r?.substring(0,i):"",a=r?.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[o]||p[`.${o}`],value:p[n]||p[`.${n}`]}))}xe.registerHandler("@ASSOCIATED",(t,e)=>{let r={},n=[],o="",i="",s=e.getPageReference();if(t.startsWith(".")){o=`${s}.${t.substring(1)}`;let I=t.split(".").filter(N=>!!N);I.length>1&&(I.pop(),i=I.join(".")),r=e.getFieldMetadata(t.substring(1))}else r=e.getFieldMetadata(t),o=t;let a=r?.datasource?.tableType,c=r?.datasource?.mode===d.READONLY,l=r?.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 Fae(r?.datasource,e,t.substring(1));if(a!==d.DATA_PAGE){let I=e.getLocalizationService(r?.localeReference);return r?.datasource?.records?.map(N=>({key:N.key,value:I.getLocalizedText(N.value)}))}let p=fe.getPropertyName(r?.datasource?.propertyForDisplayText),m=fe.getPropertyName(r?.datasource?.propertyForValue),f=Array.isArray(r?.datasource?.parameters)?r?.datasource?.parameters:[],h=e.getContextName(),S=[];if(f.forEach(I=>{if(fe.isProperty(I?.value)){let N=re(`.${g.getFullPropertyReference([i,fe.getPropertyName(I.value)])}`,s,h);S.push(g.getFullPropertyReference([s,i,fe.getPropertyName(I?.value)])),(N==null||N==="")&&(N=d.NULL_STRING),n.push(N)}else n.push(I?.value||d.NULL_STRING)}),h){let I=ka.getContextObjectByName(h)||{};S.forEach(N=>{if(N in I){let x=I[N];I[N]=[...new Set([...x,o])]}else I[N]=[o]}),ka.addContextName(h,I)}let A=zae(e,n,l,c),C=e.getLocalizationService(),_=I=>C.getLocalizedDataPage(I,l,p);return A.map(I=>{let N=I[p]||I[`.${p}`];return typeof N=="string"&&(N=_(N)),{key:I[m]||I[`.${m}`],value:N}})});xe.registerHandler("@ROUTING_INFO",(t,e)=>ym(e.getContainerName(),e.getContextName()));xe.registerHandler("@ENV",(t,e)=>{let r=mE(t);return r?r(e):t});xe.registerHandler("@DATASOURCE",(t,e)=>{let r=e.getSharedDataPageForReferenceList()||e.getValue(t)||[],n=e.getComponentConfig(),o=Object.keys(n).find(i=>n[i]?.source?.includes(t));if(o){let{fields:i,copyAll:s,filterDownloadedFields:a}=n[o],c=[];return r.forEach(l=>{let u={};s||a?Object.keys(l).forEach(p=>{let m=fe.getPropertyName(p);u[m]=l[m]}):Object.keys(i).forEach(p=>{let m=fe.getPropertyName(i[p]);u[p]=l[m]}),c.push(u)}),c}return[]});xe.registerHandler("@FIELD_META",(t,e)=>{let r={};t.startsWith(".")?r=e.getFieldMetadata(t.substring(1)):r=e.getFieldMetadata(t);let n;if(r&&r.datasource&&r.datasource.parameters){let o="",i=t.split(".").filter(s=>!!s);if(i.length>1&&(i.pop(),o=`.${i.join(".")}`),Array.isArray(r.datasource.parameters)){let s=[];r.datasource.parameters.forEach(a=>{let c={},{name:l,value:u}=a;c.name=l,typeof u=="string"&&u.startsWith("@P")?c.value=`@P ${o}${u.substring(3)}`:c.value=u,s.push(e.resolveConfigProps(c))}),n=s}else n=e.resolveConfigProps(r.datasource.parameters);r={...r,datasource:{...r.datasource,parameters:n}}}return r});xe.registerHandler("@USER",(t,e,r)=>{let n=r?J.getLitePropertyValue(r,t):e.getValue(t),o=r?J.getReferencedUser(n,r):e.getReferencedUser(n);return{userId:n,userName:o?o.UserName:null}});xe.registerHandler("@ACTIVE_CASES",(t,e)=>gn.getOpenedCaseItems(`${e.getContextName()}/${e.getContainerName()}`));xe.registerHandler("@LR",t=>t);xe.registerHandler("@CASE",(t,e)=>t===d.ID?e.getCaseInfo().getKey():t);xe.registerHandler("@SHARED",t=>$n.getSharedState(t));xe.registerHandler("@PARAGRAPH",(t,e)=>{let{useDecision:r,isBanner:n,messageType:o,dismissBanner:i}=So.getParagraphProperties(t,e),s=So.hasDecisionBannerContent(t,e);return r&&s?So.processBannerDecisionParagraph(t,e):n?{htmlContent:So.processParagraph(t,e),messageType:o,dismissBanner:i}:So.processParagraph(t,e)});xe.registerHandler("@FORMAT",(t,e)=>{let r=e.getCurrentClassID(),n=uw(t,r);if(!n?.dynamicContents?.length)return null;let{dynamicContents:o}=n;for(let i=0;i<o.length-1;i+=1)if(J.resolveWhen(o[i].when,e))return{pattern:o[i].content};return{pattern:o[o.length-1].content}});xe.registerHandler("@FILTERED_LIST",(t,e)=>{let r=t.substring(1,t.indexOf("[")),n=t.substring(t.indexOf("]")+2),o=t.substring(t.indexOf("[")+1,t.indexOf("]"));if(!e)return null;let{useCustomContext:i}=e,s;return g.isEmpty(i)?s=e.getValue(`.${r}`):(s=i,s=g.getIn(s,r)),s&&n.length>0?(o&&(s=s.filter(a=>pI(o,a))),s.map(a=>g.getIn(a,n))):null});xe.registerHandler("@ADDRESS",(t,e)=>{let r=e.getValue(t)?.[P.getDefaultQualifiedName("pyCountry")];return r?`${PCore.getDefaultQualifiedName("pyAddressForm")}_${r}`:PCore.getDefaultQualifiedName("pyAddressForm")});xe.registerHandler("@DATATYPE",(t,e)=>e.getValue(t));xe.registerHandler("@ATTACHMENT",(t,e,r)=>{let n;return r?n=J.getLitePropertyValue(r):n=e.getValue(t),gu.prepareAttachmentData(n)});var Vae=t=>t.startsWith(".")?t.slice(1):t,j6=t=>{let e=t.lastIndexOf(".");return e<0?t:t.slice(e+1)};xe.registerHandler("@FL",(t,e)=>{let r=Vae(t),n=e.getFieldMetadata(r);return!n||!n.label?j6(r):e.getLocalizationService(n.localeReference).getLocalizedText(n.label)});xe.registerHandler("@DEFERRED",(t,e)=>e.getFieldMetadata(t)?.isDeclarativeTarget?{isDeferred:!0,propertyName:t}:e.getValue(t));xe.registerHandler("@GENAICOACH",(t,e)=>dw(t,e.getCurrentClassID()));xe.registerHandler("@AIAGENT",(t,e)=>{let r=pw(t,e.getCurrentClassID());if(r)return r;let n=e.getComponentConfig();if(n){let o=n?.coaches?.find(i=>i?.config?.coach?.substring(9)===t&&i?.config?.ruleNamespace)?.config;if(o?.label){let i={label:o.label};e.resolveConfigProps({label:o.label},i);let s=i.label;return{insName:v.getFeatureMap()?.isNamespaceEnabled&&t.includes(d.DOUBLE_UNDERSCORE_STRING)?t:`${o.ruleNamespace}${d.DOUBLE_UNDERSCORE_STRING}${t}`,label:e.getLocalizedValue(s),type:"agent"}}}return null});xe.registerHandler("@REFRESH",(t,e)=>{let r=e.getCaseInfo().getKey(),n=e.getContextName(),o=e.getPageReference(),i={autoDetectRefresh:!0,preserveClientChanges:!1};Ti.registerForRefresh("PROP_CHANGE",e.getActionsApi().refreshCaseView.bind(e.getActionsApi(),r,"",o,{...i,refreshFor:`${o.replace("caseInfo.content","")}${t}`,resetForm:!0}),`${o}${t}`,`${n}/${o}`,n)});xe.registerHandler("@DW",(t,e,r)=>{let n,o=`${d.CONTEXT_DATA}.${d.SUMMARY_OF_DYNAMIC_WHENS}.${t}`;if(r){let{context:i}=r??{};n=re(o,null,i)}else n=e.getValue(o);return n===!0||n==="true"});xe.registerHandler("@CA",(t,e,r)=>r?J.getLitePropertyValue(r):e.getValue(t));function TI(t){return t&&t.startsWith("@")?t.replace(/^@\w+\s+\./,""):t}function Bae(t,e){let r=t.value&&typeof t.value=="string"&&TI(t.value);return r?r===e:!1}function z6(t,e){let r=t.authorContext;return typeof r!="string"||!r?!1:(r.startsWith(".")?r.substring(1):r)===e}function fw(t,e,r){let n=t.config;if(!n?.name||typeof n.name!="string")return null;let o=e(n.name);return o?Array.isArray(o)?o.length===1?o[0]:o.find(i=>i.classID===n.ruleClass)??o.find(i=>i.classID===r)??null:o:null}function V6(t,e,r,n,o=[]){if(t.config&&Bae(t.config,e)&&o.push({type:t?.type,config:t.config}),!t.children)return o;for(let i=0;i<t.children.length;i+=1){let s=t.children[i],a=s.type==="reference"?fw(s,r,n):s;a&&V6(a,e,r,n,o)}return o}var Hae=new Set(["autocomplete","dropdown","combobox"]);function B6(t){let e=t.config;return e?e.template==="DataReference"&&typeof e.displayAs=="string"&&Hae.has(e.displayAs.toLowerCase())&&e.selectionMode!=="multi":!1}function Gae(t){let e=t?.children;return Array.isArray(e)&&e.length>0?e[0]:null}function qae(t){let e=t.config??{},r={};return(e.contextClass!==void 0||e.targetObjectClass!==void 0)&&(r.contextClass=e.contextClass??e.targetObjectClass),e.referenceList!==void 0&&(r.referenceList=e.referenceList),r.parameters=e.parameters,r.name=e.name,r}function Wae(t){let r=(Array.isArray(t?.inheritedProps)?t.inheritedProps:[]).reduce((o,i)=>(typeof i!="object"||i===null||Array.isArray(i)||"prop"in i&&typeof i.prop=="string"&&"value"in i&&(o[i.prop]=i.value),o),{}),n={};return n.referenceType=t.referenceType,n.ruleClass=t.ruleClass,n.authorContext=t.authorContext,t.visibility!==void 0&&(n.visibility=t.visibility),t.readOnly!==void 0&&(n.readOnly=t.readOnly),t.disabled!==void 0&&(n.disabled=t.disabled),t.required!==void 0&&(n.required=t.required),t.isManyToMany!==void 0&&(n.isManyToMany=t.isManyToMany),{...n,...r}}function H6(t,e,r){let n=qae(t),o=Gae(t),i=Wae(e),s={...o?.config,...n,...i};return Array.isArray(r)&&r.length>0&&(s.descriptors=r),s.dataRelationshipContext=s.contextClass&&s.name?s.name:null,{type:o?.type,config:s}}function Kae(t,e,r,n,o){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||!B6(a))return null;let c=[];if(o){let l=typeof t.ruleClass=="string"&&t.ruleClass?t.ruleClass:n,u=o(r,l);u&&typeof u=="object"&&"descriptors"in u&&u.descriptors&&Array.isArray(u.descriptors)&&u.descriptors.length>0&&(c=u.descriptors)}return H6(a,t,c)}catch{return null}}function G6(t,e,r,n=[],o="",i){if(t.config&&z6(t.config,e)){let s=Kae(t.config,r,e,o,i);s&&n.push(s)}if(!t.children)return n;for(let s=0;s<t.children.length;s+=1){let a=t.children[s],c=a.type==="reference"&&!(a.config&&z6(a.config,e))?fw(a,r,o):a;c&&G6(c,e,r,n,o,i)}return n}function Jae(t,e){return!t||typeof t!="object"?null:Array.isArray(t)?t.find(n=>n.classID===e)??null:t}function Yae(t){let e=v.getInlineEditActionViews(t);return e&&e.length>0?e[0]:P.getDefaultQualifiedName("pyEdit")}function q6(t,e){let r=Yae(t),n=e(r);return Jae(n,t)}function gw(t,e,r,n){let o=q6(e,r);if(!o)return[];let i=V6(o,t,r,e);return i.length>0?i:G6(o,t,r,[],e,n)}function F6(t,e){let r=t.parameters;return!r||typeof r!="object"||Array.isArray(r)?!1:Object.values(r).some(n=>{let o=TI(n);return e.some(i=>o===i||o.startsWith(`${i}.`))})}function mw(t,e,r,n,o=[]){if(t.config&&F6(t.config,e)&&t.type!=="View"&&o.push({type:t.type,config:t.config,children:t.children}),!t.children)return o;for(let i=0;i<t.children.length;i+=1){let s=t.children[i];if(s&&s.type==="reference"&&s.config){let a=fw(s,r,n);a&&a.config&&(B6(a)&&F6(a.config,e)?o.push(H6(a,s.config)):mw(a,e,r,n,o))}else mw(s,e,r,n,o)}return o}function W6(t,e,r,n){let o=q6(e,r);if(!o)return[];let i=gw(t,e,r);if(!i||i.length===0)return[];let s=[],a=TI(i[0].config.value);if(a&&s.push(a),n){let c=n(t,e);c&&!Array.isArray(c)&&(c?.descriptors||[]).forEach(u=>{let p=TI(u);p&&!s.includes(p)&&s.push(p)})}return mw(o,s,r,e)}var K6={},J6={},RI={},Cw=0,PI=!1,Iw={},vI={},Sw={},Ew={},Aw={},za={},Y6={},Z6={},Q6={},hw={},yw={},Zae=(t,e,r,n)=>{let o=Array.isArray(r)?r:[r];(Array.isArray(n)?n:[n]).forEach(s=>{let a=o.findIndex(c=>c.classID===s.classID);if(a===-1)o.push(s);else{let c={isDeclarativeTarget:!1},l={...o[a],...c,...s};o[a]=l}}),e[t]=o.length===1?o[0]:o},Fn=(t={},e={})=>{if(Object.keys(e).length===0){g.copy(t,e);return}Object.keys(t).forEach(r=>{let n=t[r],o=e[r];o?Zae(r,e,o,n):e[r]=n})},lt=(t,e="")=>{if(!t)return null;let r=vI[t];if(!r)return null;if(!e)return g.deepClone(r);let n;return Array.isArray(r)?n=r.find(o=>o.classID.toLowerCase()===e.toLowerCase()||o.associationClassID?.toLowerCase()===e.toLowerCase())||null:n=r.classID.toLowerCase()===e.toLowerCase()||r.associationClassID?.toLowerCase()===e.toLowerCase()||(r.type==="Page"||r.type==="Page List")&&r?.pageClass?.toLowerCase()===e.toLowerCase()?r:null,n?g.deepClone(n):null},vi=t=>(hw[t]||(hw[t]=new bI),hw[t]),Qae=(t,e)=>(yw[t]||(yw[t]=e()),yw[t]),NI=(t,e,r,n=[])=>{if(!e||!t)return null;if(!t.includes(".")){let a,c=lt(t,e);return n.length&&(a=n.join(".")),{...c,embeddedType:r,category:a}}let[o,...i]=t.split("."),s=lt(o,e);return s&&n.push(s.label),NI(i.join("."),s?.pageClass,s?.type,n)},_w=t=>{Object.keys(t).length!==0&&(Fn(t,RI),PI&&(Cw+=1))},Xae=()=>Cw,AD=()=>{PI=!0},CD=()=>{PI=!1},bw=t=>{Fn(t,Iw)},ece=t=>{t.views&&Object.keys(t.views).length>0&&(Fn(t.views,RI),PI&&(Cw+=1)),t.navigations&&Fn(t.navigations,Iw),t.personalizations&&Fn(t.personalizations,Ew),t.insights&&Fn(t.insights,Aw),t.paragraphs&&Fn(t.paragraphs,K6),t.formats&&Fn(t.formats,J6),t.dataTypes&&Fn(t.dataTypes,za),t.datapages&&Fn(t.datapages,Y6),t.genAICoaches&&Fn(t.genAICoaches,Z6),t.AIAgents&&Fn(t.AIAgents,Q6)},tce=t=>{let e=t.fields||{};Object.keys(e).forEach(r=>{let n=e[r];if(Array.isArray(n)){if(n.forEach(o=>{t.datapages&&o.datasource&&o.datasource.tableType==="DataPage"&&(o.datasource.mode=t.datapages?.[o.datasource.name].mode);let i=Ri(Cn.FIELD,r,o.definedOnClassID??o.classID);o.localeReference=i}),n.length===1){let[o]=n;e[r]=o}}else t.datapages&&n?.datasource&&n.datasource.tableType==="DataPage"&&(n.datasource.mode=t.datapages[n.datasource.name].mode)})},xm=t=>{ece(t),tce(t);let{datapages:e={}}=t;Object.keys(e).forEach(r=>{Sw[r]=e[r]}),Fn(t.fields,vI)},$a=t=>RI[t],uT=(t,e)=>{let r=RI[t];return Array.isArray(r)?r.some(n=>n.classID===e):r?.classID===e},Tw=t=>Iw[t],zr=t=>t in Sw?Sw[t]:null,OI=t=>t in Ew?Ew[t]:null,vw=t=>t in Aw?Aw[t]:null,Rw=t=>{let e={};return Object.keys(vI).forEach(r=>{let n=vI[r],o;Array.isArray(n)?o=n.find(i=>t===i.classID):t===n.classID&&(o=n),o&&(e[r]=g.deepClone(o))}),e},rce=(t,e)=>{let n=lt(t,e)?.datasource?.parameters;return n?g.deepClone(n):null},xc=(t,e)=>{let r=null,n=K6[t];return n&&(Array.isArray(n)?r=n.find(o=>o.classID===e):n.classID===e&&(r=n)),r?g.deepClone(r):null},uw=(t,e)=>{let r=null,n=J6[t];return n&&(Array.isArray(n)?r=n.find(o=>o.classID===e):n.classID===e&&(r=n)),r?g.deepClone(r):null},dw=(t,e)=>{let r=null,n=Z6[t];return n&&(Array.isArray(n)?r=n.find(o=>o.classID===e):n.classID===e&&(r=n)),r?g.deepClone(r):null},pw=(t,e)=>{let r=null,n=Q6[t];return n&&(Array.isArray(n)?r=n.find(o=>o.classID===e):n.classID===e&&(r=n)),r?g.deepClone(r):null},Gx=t=>{if(t in za){let{savableDataPage:e}=za[t];return e}return null},qx=t=>{let e=Y6[t];if(!e)return null;let{classID:r,isAlternateKeyStorage:n,parameters:o}=e;if(n)return o.map(s=>({keyName:s.name,isAlternateKeyStorage:n,linkedField:s.linkedField}));let i=za[r];return i?i.classKeys.map(s=>({keyName:s,isAlternateKeyStorage:n})):[]},Wx=t=>{if(t in za){let{lookupDataPage:e}=za[t];return e}return null},Kx=t=>{if(Object.hasOwn(za,t)){let{lookupDataPageInfo:e}=za[t];return e}return null},vD=(t,e)=>{let r=t.split("."),n=r.pop(),o=new sa({options:{pageReference:`${r.join(".")}`,context:e}}),i=lt(n,o.getCurrentClassID())?.additionalInformation;if(!i?.includes("@PARAGRAPH"))return i;let s=fe.trimAnnotation(i);return So.processParagraph(s,o)},nce=(t,e)=>{let r=t.split("."),n=r.pop(),o=new sa({options:{pageReference:`${r.join(".")}`,context:e}}),i=lt(n,o.getCurrentClassID()),s={};return o._classID=o.getCurrentClassID(),o.resolveConfigProps(i,s),s},oce=(t,e)=>gw(t,e,$a,lt),ice=(t,e)=>W6(t,e,$a,lt);var Pw=class t{name;cascadeSubscribers;cascadeResetSubscribers;listChangeSubscribers;constructor(){this.name="CascadeManager",this.cascadeSubscribers={},this.cascadeResetSubscribers={},this.listChangeSubscribers=[]}registerResetDependencies(e,r,n,o,i,s="singleRecord"){if(!e||!n||!o?.length)return;let a=n.startsWith(".")?`${r}.${n.substring(1)}`:n,c=this.cascadeResetSubscribers[e]||{},l=this._handlePageReference(r,n,i);o.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(h=>h.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,r,n,o,i){if(!e||!n||!o?.length)return;let s=n.startsWith(".")?`${r}.${n.substring(1)}`:n,a=this.cascadeResetSubscribers[e]||{},c=this._handlePageReference(r,n,i);o.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];g.removeExistingDependentProperty(p,s)}}}),Object.keys(a).length>0&&(this.cascadeResetSubscribers[e]=a)}getResetDependencies(e,r){return this.cascadeResetSubscribers[e]?.[r]||[]}purgeResetDependencies(e){e&&this.cascadeResetSubscribers[e]&&delete this.cascadeResetSubscribers[e]}registerFields(e,r,n,o,i){this.cascadeSubscribers[e]=this.cascadeSubscribers[e]||{},n?.forEach(s=>{this.cascadeSubscribers[e][`${r}${s}`]=this.cascadeSubscribers[e][`${r}${s}`]||{};let a=this.cascadeSubscribers[e][`${r}${s}`];if(!a[i]){a[i]=o;let c=re(s,r,e);a.previousValue=typeof c=="object"?null:c}})}registerListField(e,r,n,o,i){let s=t._getFieldsForList(e,r,n);s.length>0&&(this.registerFields(e,r,s,o,i),Hd.enableCascade(e))}unRegisterListField(e,r,n,o){let i=t._getFieldsForList(e,r,n);i.length>0&&this.unRegisterFields(e,r,i,o)}static _getFieldsForList(e,r,n){let o=[],i=lt(n,re("classID",r,e));return i&&!Array.isArray(i)&&i.datasource&&i.datasource.parameters&&Object.values(i.datasource.parameters).forEach(s=>{if(fe.isProperty(s)){let a=fe.trimAnnotation(s);o.push(a)}}),o}unRegisterFields(e,r,n,o){this.cascadeSubscribers[e]&&n?.forEach(i=>{if(!this.cascadeSubscribers[e][`${r}${i}`])return;let s=this.cascadeSubscribers[e][`${r}${i}`];s[o]&&delete s[o]})}triggerCascade(e,r,n,o){let i=!1;this.cascadeSubscribers[e]&&this.cascadeSubscribers[e][r]&&(Object.keys(this.cascadeSubscribers[e][r]).forEach(s=>{let a=this.cascadeSubscribers[e][r];s!=="previousValue"&&a.previousValue!==n&&(i=!0,o?o.add(a[s]):a[s](r,n))}),i&&(this.cascadeSubscribers[e][r].previousValue=n))}purgeCascadeFields(e){delete this.cascadeSubscribers[e]}handleServerChanges(e,r=[],n=[]){if(!e)return;let o=new Set;n.forEach(i=>{let s=re(i,"",e);this.triggerCascade(e,i,s,o)}),o.forEach(i=>{i()}),!(this.listChangeSubscribers.length===0||r.length===0)&&r.forEach(i=>{this.listChangeSubscribers.forEach(s=>{let a=re(i,"",e);s(e,i,a)})})}_updateChangedProperties(e,r,n,o,i,s,a,c){let l=n&&c.some(u=>o.startsWith(u));if(e!==r||l){let u=o.lastIndexOf("."),p=o.substring(0,u),m=o.substring(u);if($u.getMessages({type:"error",property:m,context:i,pageReference:p})?.length>0&&a.push(o),!n)return;s.push(o)}}isChangedListPropertyExist(e){let r=!0;return(this.listChangeSubscribers.length===0||!g.isValidPageListProperty(e))&&(r=!1),r}_getServerProperties(e,r,n,o,i,s,a){if(typeof e!="object"){i.push(n.replace(/\.(\d+)/g,"[$1]"));let l=this.isChangedListPropertyExist(n);n=n.replace(/\.(\d+)/g,"[$1]");let u=re(n,"",r);if(u===void 0&&!e&&e!==0)return;this._updateChangedProperties(u,e,l,n,r,o,s,a);return}let c=Object.keys(e??{});for(let l=0,u=c.length;l<u;l+=1){let p=c[l],m=`${n}.${p}`;if(Array.isArray(e[p])){let f=re(m,"",r);(!f||f?.length!==e[p].length)&&a.push(m.replace(/\.(\d+)/g,"[$1]"))}this._getServerProperties(e[p],r,m,o,i,s,a)}}getServerProperties(e,r,n=d.CASE_INFO.CASE_INFO_CONTENT){let o=[],i=[],s=[],a=[],c=g.getIn(e,n);return!c||!r?{changedListProperty:o,leafProperty:s,changedPropertyWithError:i}:(this._getServerProperties(c,r,n,o,s,i,a),{changedListProperty:o,leafProperty:s,changedPropertyWithError:i})}_handlePageReference(e,r,n){let o=e;if(n==="Page"&&r.startsWith(".")&&r.slice(1).includes(".")){let i=r.substring(0,r.lastIndexOf("."));o=`${e}${i}`}return o}_resolveDependentPropertyReference(e,r){let n=r.match(/^(Parent(?:\.Parent)*)(?:\.(.*))?$/);if(!n)return g.getFullPropertyReference([e,r]);let o=n[1].split(".").length,i=n[2]||"",s=e.split("."),a=s.slice(0,Math.max(s.length-o,0)).join(".");return i?a?`${a}.${i}`:i:a}registerForListChanges(e=()=>{}){this.listChangeSubscribers.push(e)}unRegisterForListChanges(){this.listChangeSubscribers=[]}},Cr=new Pw;var sce=/\.(?![^[]+\])|\[|\]/g,ace=new Set(["createWork","showHarness","openAssignment","openWorkByHandle","initRouting"]),Ow=null,oo=t=>t?.split(sce).filter(Boolean),xw=t=>{Ow=t},we=()=>Ow,T=t=>{if(!t)return;let e=[],r=[],n=[];!Array.isArray(t)&&t.type==="MERGE_DATA"&&({changedListProperty:e,leafProperty:r,changedPropertyWithError:n}=Cr.getServerProperties(t.payload.data,t.payload.context,t.payload.rootPageReference)),Ow?.dispatch(t),!Array.isArray(t)&&t.type==="MERGE_DATA"&&(n.length&&!t.payload.skipValidation&&n.map(i=>{let s=i.lastIndexOf(".");return{property:i.substring(s),pageReference:i.substring(0,s)}}).forEach(({property:i,pageReference:s})=>{$u.clearMessages({type:"error",property:i,pageReference:s,context:t.payload.context});let a=be.getFieldReferenceForProperty(t.payload.context,`${s}${i}`);if(a){let c=J.resolveContextTreeNodeProps(a.props);Dt.validate(c.componentName?.toLowerCase(),c.propertyName,J.getLitePropertyValue(c,c.propertyName),c)}}),Cr.handleServerChanges(t.payload.context,e,r))},W=t=>we()?.getState().data?.[t],jo=()=>we()?.getState().data[d.SHARED],cce=t=>!!(t&&!t.startsWith('"')&&!t.startsWith("'")),lce=t=>t&&t.trim().substring(1,t.length-1),Nw=(t,e,r)=>{if(!cce(t))return lce(t);let n=t?.startsWith(".")?e+t:t,o=oo(n);return g.getIn(r,o)},re=(t,e,r)=>Nw(t,e,W(r)),Qi=(t,e,r)=>t?Nw(e,`${d.CONTEXT_DATA}.${t}`,W(r)):Nw(e,`${d.CONTEXT_DATA}`,W(r)),uce=(t,e,r)=>{let n=oo(`${e}.${r}`);return g.getIn(t,n)},La=(t,e,r)=>uce(W(r),`${d.CONTEXT_DATA}.${t}`,e),dce=t=>{let{context:e}=t;if(we()?.getState().data[e])return K_;let{action:n}=t;return ace.has(n)?Et:K_},Dw=(t,e)=>{let r=oo(e);return g.deleteIn(t,r)},X6=t=>!Array.isArray(t)&&typeof t=="object",xI=(t,e=[],r=[])=>{let n=new Set(r);Array.isArray(e)&&e.length>0&&e.forEach(o=>{o.allowMultiple?o.allowMultiple&&!n.has(o.path)&&g.setIn(t,o.path,[]):g.setIn(t,o.path,{})}),r.length>0&&g.rearrangeProperties(r,t)},xt=(t,e,r={})=>{let{isArrayDeepMerge:n,propertiesToReplace:o=[],propertiesToReArrange:i=[]}=r;Array.isArray(t)&&!e&&(e=[]),(o.length>0||i.length>0)&&xI(t,o,i);let s=(a,c)=>{if(X6(a)&&c!==null&&typeof c!="string"&&typeof c!="number"&&typeof c!="boolean")return Array.isArray(c)?c:Li(a,c,s);if(Array.isArray(a)&&c!==null&&Array.isArray(c)){if(n)return Li(a,c,s);{let l=c.length;if(typeof n>"u"&&l===a.length)return Li(a,c,s)}}return c===""&&a&&typeof a=="object"?a:c};return s(t,e)},ww=(t,e,r,n={isArrayDeepMerge:!0})=>{let{isArrayDeepMerge:o}=n,i=oo(e),s=g.getIn(t,i);if(typeof r=="object"&&r!==null){if(s===r)return t;let a=xt(s,r,{isArrayDeepMerge:o});return g.setIn(t,i,a)}return g.setIn(t,i,r)},$w=(t,e,r)=>{let n=oo(e);return g.setIn(t,n,r)},ys=()=>{let t=Ks,{promise:e,actionMgrID:r}=w.actionManagerPromise(t);return T({type:t,payload:{actionMgrID:r}}),e},Gd=t=>!!we()?.getState()?.data?.[t];var pce=" @#$%=!<>/\\",mce=/^[^/]+\/[^/]+\.[^/.]+$/,fce=typeof structuredClone=="function",Mw=class t{static mergeDeep(e,r){return Li(r,e)}static hasIn(e,r){return Y1(e,r)}static getIn(e,r,n){return dm(e,r,n)}static setIn(e,r,n){return Q1(e,r,n)}static deleteIn(e,r){return W1(e,r)}static isObjectEmpty(e){return!e||Object.entries(e).length===0}static isEmpty(e){return Nk(e)}static deepClone(e={}){if(e===null||typeof e!="object")return e;if(fce)try{return structuredClone(e)}catch{}return JSON.parse(JSON.stringify(e))}static copy(e,r){Object.keys(e).forEach(n=>{r[n]=e[n]})}static isPropertyRef(e){if(!e||!e.includes("."))return!1;for(let r=0;r<e.length;r+=1)if(pce.includes(e[r]))return!1;return!0}static isValidPropertyReference(e){return typeof e!="string"?!1:e===""||e.trim()!==""}static isWhenExist(e){let r=["visibility","disabled","readOnly","required"],n=!1;for(let o of Object.keys(e)){let i=e[o];i&&typeof i=="object"&&!Array.isArray(i)?n=n||t.isWhenExist(i):r.includes(o)&&typeof i=="string"&&i?.startsWith("@W ")&&(n=!0)}return!n&&e?.type==="multirecordlist"&&e?.renderMode==="Editable"&&(n=Object.keys(e?.allowActions??{}).some(o=>typeof e?.allowActions?.[o]=="string"&&e.allowActions[o]?.startsWith("@W "))),n}static getWhenNames(e){let r=["visibility","disabled","readOnly","required"],n="",o=new Set;if(e&&Object.keys(e).forEach(i=>{let s=e[i];r.includes(i)&&typeof s=="string"&&s.startsWith("@W ")&&(n=fe.trimAnnotation(s),o.add(n))}),e?.type==="multirecordlist"&&e?.renderMode==="Editable"){let i=e?.allowActions??{};Object.keys(i).forEach(s=>{typeof i[s]=="string"&&i[s]?.startsWith("@W ")&&(n=fe.trimAnnotation(i[s]),o.add(n))})}return[...o]}static isExpressionExist(e){let r=["disabled","visibility","readOnly","required"],n=!1;for(let o of Object.keys(e))r.includes(o)&&typeof e[o]=="string"&&e[o]?.startsWith("@E ")&&(n=!0);return n}static buildDataObject(e,r){let n={},o=n;return r.indexOf(".")>0?r.split(".").forEach(s=>{if(s.includes("[")){let[a]=s.split("[");n[a]=[],n=n[a],s=s.substring(s.indexOf("[")+1,s.lastIndexOf("]"))}n[s]={},n=n[s]}):(n[r]={},n=n[r]),Object.keys(e).forEach(i=>{let s=i;i.startsWith(".")&&(s=i.substring(1)),n[s]=e[i]}),o}static buildObject=(e,r,n)=>{if(n===void 0)return;let o=e.split("."),i=0;for(;i<o.length-1;i+=1){let s=o[i];s?.toString().length&&!r[s]&&(r[s]={}),r[s]&&(r=r[s])}typeof n=="object"?(r[o[i]]||(r[o[i]]=Array.isArray(n)?[]:{}),xt(r[o[i]],n,{isArrayDeepMerge:!0})):r[o[i]]=n};static crc32(e){let r=-1,n=t.getUtf8Bytes(e);for(let o of n)r=r>>>8^t.CRC32_TABLE[(r^o)&255];return(r^-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 r=[];for(let n=0;n<e.length;n+=1){let o=t.getCodePoint(e,n);r.push(...t.encodeCodePoint(o.value)),n=o.nextIndex}return r}static getCodePoint(e,r){let n=e.charCodeAt(r),o=e.charCodeAt(r+1);return n>=55296&&n<=56319&&o>=56320&&o<=57343?{value:65536+(n-55296<<10)+(o-56320),nextIndex:r+1}:n>=55296&&n<=57343?{value:65533,nextIndex:r}:{value:n,nextIndex:r}}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 r=0;r<256;r+=1){let n=r;for(let o=0;o<8;o+=1)n=n&1?3988292384^n>>>1:n>>>1;e[r]=n>>>0}return e})();static utf8Encoder=null;static getHashedString(e){return t.crc32(e).toString(16)}static getPropertyName(e){if(e){let r=e.startsWith("@P"),n=r?e.indexOf(" "):-1;return r?e.substring(n+2):e}return e}static getPropertyNameFromDependency(e){return typeof e=="string"?e:e.propertyName}static isValidJson(e){try{return JSON.parse(e)}catch(r){return console.error("not a Valid JSON",r),!1}}static isEqual(e,r){return lo(e,r)}static isContains(e,r){let n=Object.keys(e);for(let o=0;o<n.length;o+=1)if(e[n[o]]&&t.isEqual(e[n[o]],r))return!0;return!1}static removeExistingDependentProperty(e,r){let n=e.findIndex(o=>o.propertyName===r);n>=0&&e.splice(n,1)}static getFullPropertyReference(e){return Array.isArray(e)?e.filter(r=>!!r).join("."):""}static iterateLeafNodes(e,r){let n=(o,i=[])=>{Object.entries(o).forEach(([s,a])=>{i.push(Array.isArray(o)?Number(s):s),Array.isArray(a)?a.forEach((c,l)=>{i.push(l),n(c,i),i.pop()}):a!==null&&typeof a=="object"?n(a,i):r(i.slice(),a),i.pop()})};n(e)}static resolveStringBooleans(e){let r=["required","readOnly","visibility"],n=o=>o==="true";return Object.keys(e).forEach(o=>{r.includes(o)&&typeof e[o]=="string"&&(e[o]=n(e[o]))}),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 r={};return Object.entries(e).forEach(([n,o])=>{let i=n.split("."),s;i.reduce((a,c,l)=>(a[c]?s=a[c]:Number.isNaN(Number(i[l+1]))?i.length-1===l?s=o:s={}:s=[],a[c]=s,a[c]),r)}),r}static flatten(e,r,n){r||(r=""),Array.isArray(e)?e.forEach((o,i)=>{t.flatten(o,`${r}[${i}]`,n)}):typeof e=="object"&&e!==null?Object.keys(e).forEach(o=>{let i=r?`${r}.${o}`:o;t.flatten(e[o],i,n)}):n[r]=e}static buildInstructionPageReference(e,r){let o=e.startsWith(d.OBJECT_INFO.OBJECT_INFO)?`${e}${r}`.replace(d.OBJECT_INFO.OBJECT_INFO_CONTENT,""):`${e}${r}`.replace(d.CASE_INFO.CASE_INFO_CONTENT,"").replace(d.DATA_INFO.DATA_INFO_CONTENT,"");return oi.formatPageReference(o)}static convertPageRefToClipboardPageNotation(e){let r=/\[\d+\]/g;return e.replace(r,n=>n.replace(/\d+/g,o=>`${parseInt(o,10)+1}`).replace("[","(").replace("]",")"))}static convertClipboardPageToPageRefNotation(e){let r=/\(\d+\)/g;return e.replace(r,n=>n.replace(/\d+/g,o=>`${parseInt(o,10)-1}`).replace("(","[").replace(")","]"))}static segmentsMatch=(e,r)=>{let n=e.split("."),o=r.split(".");return n.length!==o.length?!1:n.every((i,s)=>{if(i===o[s])return!0;if(i.endsWith("()")){let a=i.slice(0,-2),c=o[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(r=>r.payload.actionMgrID&&w.rejectActionByID(r.payload.actionMgrID)),!0}static isValidAnnotation(e){let r=new Set(["@DATASOURCE","@ACTIVE_CASES","@ADDRESS","@ASSOCIATED","@ATTACHMENT","@CASE","@FILTERED_LIST","@PARAGRAPH","@P","@ROUTING_INFO","@USER","@W","@E","@SHARED","@CA"]),n=e.indexOf(" "),o=e.substring(0,n);return r.has(o)}static trimDotForProperty(e){return typeof e=="string"&&e.startsWith(".")?e.substring(1):e}static decodeHtmlEntities(e){if(typeof document<"u"){let o=document.createElement("textarea");return o.innerHTML=e,o.value}let r={"&":"&","<":"<",">":">",""":'"',"'":"'","'":"'","/":"/","/":"/"},n=e;return Object.entries(r).forEach(([o,i])=>{n=n.split(o).join(i)}),n=n.replace(/&#(\d+);/g,(o,i)=>String.fromCharCode(parseInt(i,10))),n=n.replace(/&#x([a-f\d]+);/gi,(o,i)=>String.fromCharCode(parseInt(i,16))),n}static convertObjectWithStringToBoolean(e){if(e&&!(Array.isArray(e)||typeof e!="object"))return Object.keys(e).forEach(r=>{let n,o=e[r];typeof o=="string"?o==="true"?n=!0:o==="false"?n=!1:n=o:typeof o=="object"?(n=o,t.convertObjectWithStringToBoolean(o)):n=o,e[r]=n}),e}static rearrangeProperties(e,r){e.forEach(n=>{let o=t.getIn(r,n);if(!o)return;let i=Object.hasOwn(o,P.getDefaultQualifiedName("pyCount"));if(i&&(o=o.pxResults),!o)return;let s=o.filter(c=>!c.error),a=o.filter(c=>c.error);t.setIn(r,i?`${n}.pxResults`:n,[...s,...a])})}static getETag(e){if(!e)return;let r=e,n=r?.split("/")||[],o=["workarea","modal","actionarea"],i=n.findIndex(s=>o.some(a=>s.startsWith(a)));return i!==-1&&(r=n.slice(0,i+1).join("/")),we()?.getState()?.data[r]?.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,r,n){let o=[],i="",s=n.getPageReference(),a=n.getContextName();Object.keys(e).forEach(u=>{let p=e[u],m=fe.isProperty(p)?re(`.${fe.getPropertyName(p)}`,s,a):p;(m==null||m==="")&&(m=d.NULL_STRING),o.push(m)});let c=r,l=o.join(d.HASH_DELIMITER);return l&&(i=t.getHashedString(l),c=r+d.UNDERSCORE_STRING+i),c}static parsePegaDateTimeToTimestamp(e){if(!e)return null;let r=e.replace(" GMT","").match(/^(\d{4})(\d{2})(\d{2})T(\d{2})(\d{2})(\d{2})\.(\d{3})$/);if(!r){let p=new Date(e).getTime();return Number.isNaN(p)?null:p}let[,n,o,i,s,a,c,l]=r.map(Number);return new Date(n,o-1,i,s,a,c,l).getTime()}static formatToUTCDate(e,r){if(!e)return e;let n=new Date(e);if(Number.isNaN(n.getTime()))return e;let o=(m,f=2)=>String(m).padStart(f,"0"),i=n.getUTCFullYear(),s=o(n.getUTCMonth()+1),a=o(n.getUTCDate());if(r==="Date")return`${i}${s}${a}`;let c=o(n.getUTCHours()),l=o(n.getUTCMinutes()),u=o(n.getUTCSeconds()),p=o(n.getUTCMilliseconds(),3);return`${i}${s}${a}T${c}${l}${u}.${p} GMT`}static isLeafProperty(e){return!!e&&!e.includes(".")}static getMetadataType(e,r,n){let o=t.isLeafProperty(e)?lt(e,r):n.getFieldMetadata(e);return Array.isArray(o)?o[0]?.type:o?.type}static toStringParameterValue(e){return typeof e=="string"?e:e instanceof Date?e.toISOString():null}static resolveParameterValue(e,r,n,o,i){if(n&&Object.hasOwn(n,e))return n[e];if(!Ir.isProperty(r))return r;let a=i!==null?Ir.getPropertyName(r):Ir.getLeafPropertyName(r);return o.getValue(`.${a}`)}static formatParameterValue(e,r,n,o,i){if(!Ir.isProperty(r))return e;let a=o!==null?Ir.getPropertyName(r):Ir.getLeafPropertyName(r);if(!a)return e;let c=t.getMetadataType(a,i,n);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,r,n,o,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,r,n);s[a]=t.formatParameterValue(l,c,r,n,o)}}return s}static normalizePropertyRef(e){let r=e.replace(/\[\d+\]/g,"");return r.startsWith(".")?r.substring(1):r}static resolvePageClass(e,r){if(!r)return;e=this.normalizePropertyRef(e);let n=e.split("."),o;n.length>1?o=n.slice(0,-1):o=n;let i=r;for(let s of o){let a=lt(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 Ls(e)&&!Array.isArray(e)}static pruneKeys=(e,r,n=!1)=>{if(!Pr(e))return e;let o=r instanceof Set?r:new Set(r);return n?(t.isNestedObject(e)?Object.keys(e).forEach(i=>{let s=e[i];if(o.has(i)){let a=Object.getOwnPropertyDescriptor(e,i);a&&a.configurable?delete e[i]:Reflect.set(e,i,void 0)}else s&&(Ls(s)||Array.isArray(s))&&t.pruneKeys(s,o,!0)}):Array.isArray(e)&&e.forEach(i=>{(Ls(i)||Array.isArray(i))&&t.pruneKeys(i,o,!0)}),e):Array.isArray(e)?e.map(i=>Ls(i)||Array.isArray(i)?t.pruneKeys(i,o,!1):i):t.isNestedObject(e)?Object.keys(e).reduce((i,s)=>{if(!o.has(s)){let a=e[s];i[s]=Ls(a)||Array.isArray(a)?t.pruneKeys(a,o,!1):a}return i},{}):e};static normalizeStaticContentKey(e){let r=this.getWebFilePath(e);if(!r)return e.trim();let n=r.decodedFileName.lastIndexOf(".");if(n<1||n===r.decodedFileName.length-1)return e.trim();let o=r.decodedFileName.slice(0,n),i=r.decodedFileName.slice(n+1);return`${r.marker.toUpperCase()}!${o.toUpperCase()}!${i.toUpperCase()}`}static isWebFilePath(e){return this.getWebFilePath(e)!==void 0}static getWebFilePath(e){let r=e.trim();if(!mce.test(r))return;let n=r.indexOf("/"),o=r.slice(0,n),s=r.slice(n+1).split(/[?#]/)[0];try{let a=decodeURIComponent(s);return a.includes("/")||a.includes("\\")?void 0:{marker:o,decodedFileName:a}}catch{return}}},g=Mw;var gce=d.SUMMARY_OF_LISTS,hce=d.SUMMARY_OF_WHEN_CONDITIONS,kw=class t{static updateData(e){Object.keys(e).forEach(r=>{T(Re({context:r,data:e[r]}))})}static updateContextData(e){Object.keys(e).forEach(r=>{T(Re({context:r,data:e[r]}))})}static resolveWhen(e,r){return!!r.getContextDataValue(`.${hce}.${e}`)}static resolveFieldValue(e,r){return r.getLocalizedValue(e)}static resolveNavigation(e,r){let n=this.resolveName(e,r);return Tw(typeof n=="string"?n:"")}static resolveView(e,r,n=""){let o=$a(this.resolveName(e,r)),i=[];if(Array.isArray(o)&&o.length>0){if(r&&o.length>1){if(n||(n=r.getValue(d.CLASS_ID)||""),!n)return;i=o.filter(s=>s[d.CLASSID]===n)}return i.length===0?o[0]:i[0]}return o}static resolveName(e,r){return e&&typeof e=="string"&&e.startsWith("param.")?(e=e.substring(6),r.getContextDataValue(`.$parameters.${e}`)):(e&&typeof e=="string"&&e.startsWith("@")&&(e=fe.handleAnnotation(e,r)),e)}static getContextPath(e,r){return typeof r!="number"&&!r?e:(r=fe.trimAnnotation(r),typeof r=="number"||typeof r=="string"?typeof r=="number"&&Number.isInteger(r)?`${e}[${r}]`:typeof r=="string"&&r.startsWith(".")?e+r:r:e)}static getRuleClass(e,r,n){let o;if(r)o=r.startsWith(d.CLASS_ANNOTATION)?r.split(d.CLASS_ANNOTATION)[1].trim():this.resolveClassID(r,e.getPageReference(),e.getContextName(),e.getValue(d.CASE_INFO.CASE_INFO_CLASSID));else if(n?.authorContext){let i=e.getFieldMetadata(n.authorContext);if(i){let s=["refer","copy"].includes(i.dataRetrievalType),a=i.type==="Page List";o=s&&a?i.pageClass:i.classID}o||(o=n.ruleClass)}return o}static resolveReference(e,r){let{type:n}=e,o;if(n==="reference"){let{config:i}=e,s=i?.type,{ref:a,name:c,context:l}=i||{},u=this.getRuleClass(r,l,i);return r&&(r._ruleClass=u),s==="navigation"?o=this.resolveNavigation(a||c,r):s==="view"?o=this.resolveView(a||c,r,u||""):s==="widget"&&(o={type:"Widget",config:{name:c,ruleClass:u}}),o}return e}static resolvePropertyReference(e,r,n){return re(r,e,n)}static getProperty(e,r,n){let o=this.resolvePropertyReference(r,e,n);if(o==null||o.length===0){let i=La(`${r}.${gce}`,e,n);i&&(o=this.resolvePropertyReference(r,i,n))}return o}static getPropertyValue(e,r,n){return e=fe.trimAnnotation(e),this.getProperty(e,r,n)}static getReferencedUser(e,r){let n=t.getLitePropertyValue(r,"referencedUsers");if(Array.isArray(n)){let o=n.find(i=>i.UserID===e);if(o)return{userId:o.UserID,UserName:o.UserName}}return n?.[e]}static getLitePropertyValue(e,r){if(!e)return;let{useCustomContext:n,propertyName:o,hasSuggestions:i,pageReference:s,context:a}=e,c=r||o||"";return n?(c=c.startsWith(".")?c.substring(1):c,c.split(".").reduce((l,u)=>l?.[u]??void 0,n)):i&&c===o?t.getPropertyValue(c,s,a?`${a}/${d.SUGGESTION}`:void 0):t.getPropertyValue(c,s,a||void 0)}static _handlePropString(e,r,n,o,i){n.startsWith("@")?e[r]=fe.handleAnnotation(n,o,i):e[r]=n}static _resolveProps(e,r,n){e&&Object.keys(e).forEach(o=>{let i=e[o];typeof i=="string"?this._handlePropString(e,o,i,r,n):Array.isArray(i)?i.forEach(s=>{this._resolveProps(typeof s=="object"?s:e[s],r,n)}):typeof i=="object"&&this._resolveProps(e[o],r,n)})}static resolveProps(e,r,n){return!e||!r||(g.mergeDeep(e,r),this._resolveProps(r,n,void 0)),r}static resolveContextTreeNodeProps(e){let r={};return e?(g.mergeDeep(e,r),this._resolveProps(r,void 0,e),g.resolveStringBooleans(r)):r}static resolvePropertyPageClass(e,r){let n=g.resolvePageClass(e,r),o=e.substring(e.lastIndexOf(".")+1),i=lt(o,n),s;if(i)return Array.isArray(i)?s=i[0]?.pageClass:s=i.pageClass,s}static resolveClassID(e,r,n,o){let i=fe.trimAnnotation(e),s=i.startsWith(".")?`${r}${i}`:i;for(;s;){let a=re(d.CLASS_ID,s,n);if(a)return a;if(o){let l=this.resolvePropertyPageClass(i,o);if(l)return l}let c=s.lastIndexOf(".");if(c===-1)break;s=s.substring(0,c)}return null}},J=kw;var Lw=class{actionHandlers;constructor(){this.actionHandlers={}}getHandler(e){return this.actionHandlers[e]}registerHandler(e,r){this.actionHandlers[e]=r}},yce=new Lw,DI=yce;function Sce(t){return typeof t=="object"&&t!==null}var Uw=class{static#e=[];static#t=!1;static getActionHandlers=(e,r,n)=>{let o=[];return{mouseenter:"hover",change:"onChange",blur:"onBlur"}[n]!==r||e.forEach(s=>{let a=DI.getHandler(s.action),{config:c}=s;o.push({handler:a,config:c})}),o};static isEditable=e=>{let{tagName:r}=e;return r==="INPUT"||r==="TEXTAREA"||r==="SELECT"||r==="DATETIME"};static isNonKeyInput=e=>{let{tagName:r,type:n}=e;return r==="SELECT"||n==="checkbox"||n==="radio"};static#r=(e,r,n)=>{for(let o=0;o<e.length;o+=1){let i=e[o],s={actionHandler:i.handler,component:r,eventType:n,config:i.config};this.#e.push(s)}};static buildActionObject=(e,r)=>{let n={...e};return n.context=v.getRuntime()==="Browser"?r.getContextName():n.context,n.pageReference=r.getPageReference(),n.actionMgrID=w.getNextActionMgrId(),n};static#n=e=>{let r=e.actionHandler,n=e.component,{config:o}=e,i={};J.resolveProps(o,i,n),r&&(r(e.eventType,i,n),this.#o())};static#o=()=>{if(!this.#t){if(this.#e.length===0)return;let e=this.#e.shift();if(!e)return;this.#n(e),e.config&&e.config.parallel==="true"&&this.#e.length>0&&this.#o()}};static#s=()=>{this.#o()};static#i=(e,r,n)=>{this.#r(e,r,n),this.#s()};static getFullRef=e=>{let r=e.getPageReference(),n=e.getComponentConfig().value;return J.getContextPath(r,n)};static#a(e,r){let o=e.getComponentConfig().behaviours||[];for(let i=0;i<o.length;i+=1){let{behaviour:s,actions:a}=o[i];if(a){let c=this.getActionHandlers(a,s,r);c&&c.length>0&&this.#i(c,e,r)}}}static changeHandler=(e,r)=>{let n=e.getStateProps().value,o=e.getContextName();if(dt({type:E.MESSAGES.MESSAGES_TYPE_ERROR,property:n,pageReference:e.getPageReference(),context:o}),(v.getRuntime()==="Browser"?"nativeEvent"in r&&r.nativeEvent instanceof Event||r instanceof Event:"nativeEvent"in r&&!!r.nativeEvent||r instanceof Event)||!("value"in r)||r.value!==null&&(!("prop"in r)||r.prop===void 0)){let{target:s}=r;s===null&&r&&"auxiliaryTarget"in r&&r.auxiliaryTarget&&(s=r.auxiliaryTarget);let a;s===void 0?a="value"in r?r.value:void 0:"value"in s?a=s.value:a=s.innerText;let c=this.getFullRef(e);T({type:_t,payload:{reference:c,value:a,context:o}}),(s===void 0||!this.isEditable(s)||this.isNonKeyInput(s))&&T({type:vn,payload:{reference:c,pageReference:e.getPageReference(),value:a,context:o,propertyName:e.getComponentConfig().value,classID:e.getValue(d.CLASS_ID)}})}else if(Sce(r)){let s=e.getPageReference(),a=e.getStateProps();for(let c of Object.keys(r)){let l=a[c],u=r[c];T({type:_t,payload:{reference:J.getContextPath(s,l),value:u,context:o}}),T({type:vn,payload:{reference:J.getContextPath(s,l),value:u,context:o}})}}};static blurHandler=(e,r)=>{let{target:n}=r;n===null&&r&&"auxiliaryTarget"in r&&(n=r.auxiliaryTarget);let{value:o,validationValue:i}=n,s=this.getFullRef(e),a=e.getContextName();n.clearMessages&&dt({type:E.MESSAGES.MESSAGES_TYPE_ERROR,property:e.getStateProps().value,pageReference:e.getPageReference(),context:a}),this.isEditable(n)&&(e.getValidationApi().validate("validationValue"in n?i:o),e.isInsideList()&&e.getListActions().updateProperty(e.getStateProps().value,o),this.isNonKeyInput(n)||T({type:vn,payload:{reference:s,pageReference:e.getPageReference(),value:o,context:a,propertyName:e.getComponentConfig().value,classID:e.getValue(d.CLASS_ID)}}))};static eventHandler=(e,r)=>{let{type:n}=r;switch(n){case"change":this.changeHandler(e,r);break;case"blur":this.blurHandler(e,r);break;default:break}n&&this.#a(e,n)};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"}},ze=Uw;var jw="CREATE_WORK",e9=t=>({type:jw,payload:t});var zw=(t,e)=>{let r=e.UserID;if(r==null)return;let n=String(r);if(t.has(n)){let o=t.get(n);t.set(n,{...o,...e})}else t.set(n,e)},Ece=t=>{if(t.length<2)return;let e=new Map;for(let r of t)zw(e,r);t.length=0;for(let r of e.values())t.push(r)};function Ace(t,e,r){let n;if(!Array.isArray(t)&&typeof t=="object"){n=g.getIn(r,d.REFERENCED_USERS,{}),g.setIn(e,d.REFERENCED_USERS,{...n,...t});return}if(n=g.getIn(r,d.REFERENCED_USERS,[]),n.length===0){Ece(t);return}let o=new Map;for(let i of n)zw(o,i);for(let i of t)zw(o,i);t.length=0;for(let i of o.values())t.push(i)}function Cce(t,e,r,n,o,i,s){let a=n.substring(0,n.indexOf("[")),c=n.substring(n.indexOf("[")+1,n.indexOf("]")),l=e[a],u=`${g.trimDotForProperty(o)}.${a}`;s.includes(u)&&Object.hasOwn(l,P.getDefaultQualifiedName("pyCount"))&&(l=l.pxResults),Array.isArray(l)&&(l?.splice(+c,1,t[n]),i.push(a),r.add(`${o}.${n}`))}function Ice(t,e,r){let n=new Set(r);Object.keys(t).forEach(o=>{(Array.isArray(t[o])&&!n.has(o)||!Array.isArray(t[o])&&!Object.hasOwn(e,o))&&delete t[o]})}var t9=(t,e,r,n,o="")=>{let i=[];Object.keys(t).forEach(s=>{typeof t[s]=="object"&&s.includes("[")?Cce(t,e,r,s,o,i,n):t[s]&&typeof t[s]=="object"?(e[s]||(e[s]=Array.isArray(t[s])?[]:{}),t9(t[s],e[s],r,n,`${o}.${s}`)):e[s]=t[s]}),Ice(e,t,i)},_ce=(t,e,r)=>{let n=new Set;t.forEach(o=>{o=g.trimDotForProperty(o);let[i,s,a]=Wi.getPageListNameAndIndexFromPageName(o);if(i&&s&&a&&!n.has(`${i}.${s}`)){let c=g.getIn(r,`${i}.${s}`)||[];Array.isArray(c)&&c.forEach((l,u)=>{u!==+a&&g.setIn(e,`${i}.${s}[${u}]`,l)}),n.add(`${i}.${s}`)}})},bce=(t,e,r)=>{if(!r||r.length===0)return e;let n=kh(t),o={},i=!1;return r.forEach(s=>{Object.hasOwn(n,s)&&g.hasIn(e,oo(s).slice(0,-1))&&(g.setIn(o,s,n[s]),i=!0)}),i?xt(e,o,{isArrayDeepMerge:!0}):e},Re=(t,e={})=>{let{serverPrecedenceFields:r=[],propertiesToReplace:n=[],propertiesToReArrange:o=[],preserveFields:i}=e,{context:s,data:a,isArrayDeepMerge:c,preserveClientChanges:l=!1}=t,u=Mc(s,!0),p=W(s),m={};if(l&&p&&a){m=g.deepClone(p);let S=g.deepClone(a);o.length>0&&g.rearrangeProperties(o,m);let A=new Set;t9(u,m,A,o),_ce(A,m,S)}let f=a?g.getIn(a,d.REFERENCED_USERS):void 0;f!==void 0&&Ace(f,a,p);let h=a;if(l){let S=g.getIn(t?.data,d.OBJECT_INFO.OBJECT_INFO_CONTENT_CLASS_ID),A=B.isExternalObject(S),C=A?{[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]}}},_=A?d.OBJECT_INFO.OBJECT_INFO_CONTENT:d.CASE_INFO.CASE_INFO_CONTENT;r.forEach(I=>{let N=`${_}.${I}`;g.deleteIn(C,N)}),h=xt(a,C,{isArrayDeepMerge:c??!0})}else A6(s,a,i),h=bce(s,a,i);return{type:Er,payload:{...t,data:h,...n.length>0?{propertiesToReplace:n}:null,...o.length>0?{propertiesToReArrange:o}:null}}},Tce=t=>({type:Ok,payload:t}),Mm=t=>({type:Kl,payload:t}),vce=t=>({type:Nr,payload:t}),Rce=t=>({type:xk,payload:t}),Pce=t=>({type:uo,payload:t}),Qx=t=>({type:Ql,payload:t}),Lc=t=>({type:Yo,payload:t}),Pt=t=>({type:Et,payload:t}),Xx=t=>({type:Fs,payload:t}),Ph=t=>({type:Vs,payload:t}),nw=t=>({type:po,payload:t}),ow=t=>({type:Bs,payload:t}),iw=t=>({type:zi,payload:t}),rr=t=>{let{containerItemID:e}=t;t.suggestionContexts=Uh(e);let r=t?.data?.caseInfo?.content,n=Object.keys(r||{}).length>0;return t.propertiesToReplace||(t.propertiesToReplace=n?B.getPropertiesToReplace(e):[]),{type:kt,payload:t}},Fh=t=>{let{context:e}=t;return{type:Us,payload:{context:e}}},As=t=>{let{context:e}=t;return{type:Ro,payload:{context:e}}},Nce=t=>({type:Hs,payload:t}),nr=t=>({type:or,payload:t}),zm=t=>({type:Ws,payload:t}),Qe=t=>{let{context:e,containerItemID:r}=t,n=e;return n||(n=pe(r)),t.context=n,t.deleteContext=!ZD(r),t.childContainers=Ke(r),t.childContainersContexts=ko(r),t.transientItems=bi([...t.childContainersContexts,r]),t.suggestionContexts=Uh(r),r===e&&(t.caseID=re(d.CASE_INFO.CASE_INFO_ID,"",e)||re(d.OBJECT_INFO.OBJECT_INFO_ID,"",e),t.RemoteSystemID=re(d.CASE_INFO.REMOTESYSTEMID,"",e)),{type:Ze,payload:t}},Fw=t=>{let{containerItemID:e}=t;return t.transientItems=bi([...ko(e),e]),{type:Qo,payload:t}},Nh=t=>{let{transientItemID:e}=t;return t.transientItems=[e],{type:Zo,payload:t}},kn=t=>{let{context:e,containerItemID:r}=t,n=e;if(n||(n=pe(r)),t.context=n,t.childContainers=Ke(r),t.childContainersContexts=ko(r),t.transientItems=bi([...t.childContainersContexts,r]),t.suggestionContexts=Uh(r),r===e){t.caseID=re(d.CASE_INFO.CASE_INFO_ID,"",e),t.RemoteSystemID=re(d.CASE_INFO.REMOTESYSTEMID,"",e);let o=re(d.CASE_INFO.CASE_INFO_CLASSNAME,"",e);ae.isTraditionalRemoteCase(o)&&(t.skipReleaseLockRequest=!0)}return{type:et,payload:t}},Oce=t=>({type:Po,payload:t}),xce=t=>({type:No,payload:t}),Dce=t=>({type:oS,payload:t}),V=(t,...e)=>(ze.resume(),t(...e)),os=(t,e,r,n,o)=>({type:Te,payload:{msg:t,err:e,context:r,formFields:n,actionMgrID:o}}),Vw=t=>({type:Xo,payload:t}),Bw=t=>({type:ru,payload:t}),Kn=t=>({type:mo,payload:t}),wce=t=>({type:Yk,payload:t}),UT=t=>({type:Yl,payload:t}),da=t=>({type:_t,payload:t});var $ce="VIEW",Mce="PAGE",Kw="add",n9="replace",Gw=["portal","noPortal","preview","debug","devtool","activeTab","contextParam","lang"],wI="",Vh="Home",o9="",qw=!0,$I=t=>(qw=t,qw),i9=()=>qw,bt=(t,e,r)=>ye.getSemanticURL(t,e,r),br=(t,e)=>ye.getBusinessIDURLPath(t,e),s9=(t,e)=>ye.getBusinessIDRoutePath(t,e),Nc=(t,e)=>ye.getRestEndPoint(t,e),U=(t,e)=>{let r=gt.getServerURL(),n=Nc(t,e);return n?(n.restApi?.startsWith("/")||(n.restApi=`/${n.restApi}`),r?.endsWith("/")&&(r=r.substring(0,r.length-1)),n.restApi=r+n.restApi,n):{}},kce=t=>{if(t&&t.root){let{root:e}=t,{resources:r}=t,{views:n}=r,i=e.config,s=i.type,a=i.name;if(s.toUpperCase()===$ce){let c=n[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()===Mce)}}return!1}return!1},r9=(t,e,r)=>{let{root:n,resources:o}=t,{views:i}=o,{config:s}=n,a=Kw,c="";if(r)c=r;else{let u=i[s.name],p=u;Array.isArray(u)&&u.length>0&&([p]=u),c=p.config.urlPath}let l=c.match(Rc);if(l){let u=g.getIn(e,s.context);c=c.replace(l[0],u.pyID)}return c.startsWith("/")&&(c=c.substring(1,c.length)),{pxURLPath:c,historyAction:a}},Lce=(t,e,r)=>{for(let[o,i]of e.entries())!t.has(o)&&Gw.includes(o)&&t.append(o,i);r&&!t.has("lang")&&t.append("lang",r);let n=ye.getRoutingInfo()?.embedQueryParams;if(n)for(let[o,i]of Object.entries(n))t.has(o)||t.append(o,String(i));return ye.isDefaultPortal()&&t.delete("portal"),t},Ww=(t,e)=>{let r=`${t}/${e}`;if(!(v.getRenderingMode()==="EMBED"))return r;let o=ye.getRoutingInfo()?.authServiceAlias;if(!o)return r;let i=encodeURIComponent(o),s;try{s=new URL(r)}catch{return r}let a=s.pathname.split("/").filter(Boolean),c=a.findIndex(p=>p.toLowerCase()==="app");if(c<0)return r;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(/\/$/,"")},Uce=(t,e,r,n,o)=>{let i=ye.getStaticRoutePage(),s=Vh?.toLowerCase();return(i?.toLowerCase()===s||n.toLowerCase()===s)&&!o.has("noPortal")?Ww(e,r):t},a9=(t,e,r,n)=>{let o,i;ci(e)?o=Ww(t,e):o=t;let s=ci(r?.pxURLPath||"");s&&(o=`${o}/${s}`);try{i=new URL(o).searchParams,o=o.includes("?")?o.split("?")[0]:o}catch(l){return console.log("Invalid url",l),""}let a=new URLSearchParams($6());if(rs()?(o=Uce(o,t,e,s,a),ye.setStaticRoutePage("")):s.toLowerCase()===Vh.toLowerCase()&&!a.has("noPortal")&&(o=Ww(t,e)),!ye.isDefaultPortal()){let l=ye.getPortalName();a.has("portal")?a.set("portal",l):a.append("portal",l)}i=Lce(i,a,n);let c=Pc(i.toString());return c&&(o+=`?${c}`),o},jce=(t,e,r)=>{if(t=t&&t!==""?t:ye.getApplicationName(),t=u2(t),r===`${wI}/${e}/`)return{title:t};let o=new URL(r).pathname.replace(`${e}/`,""),i=o.split("/");return l2(o)?{title:`${t} - ${i[i.length-1]}`}:{title:`${t} - ${i[0]}`}},c9=(t,{urlPathObjParam:e,infoParam:r,optionsParam:n,queryParam:o},i=!1,s)=>{let a,c,l;if(window.PCore.getBehaviorOverride("dynamicSemanticUrl")===!1)return;if(i)a=e,c=r,l=n;else{let{uiResources:f,data:h}=t;({options:l}=t),e&&e.pxURLPath&&Uo(e.pxURLPath)?a=r9(f,h,e.pxURLPath):a=e||r9(f,h),c=ye.getEndPointInfo(a.pxURLPath),a.pxURLPath=c.urlPath}let u=a9(wI,ye.getApplicationPath(),a,s),{title:p}=jce(o9,ye.getApplicationPath(),u),m=P6(c,{...l,title:p});a?.historyAction===Kw?N6(m,p,u):a?.historyAction===n9&&(o&&(u+=`?${o}`),O6(m,p,u))},l9=(t,e)=>{let r=null;t.directUrlUpdation&&(r={historyAction:Kw,pxURLPath:""},r.pxURLPath=t.semanticURL),c9(t,{urlPathObjParam:r,infoParam:null,optionsParam:null},!1,e)},k6=(t,e)=>{l9(t,e)},L6=(t,e)=>{let r={pxURLPath:t};return a9(wI,ye.getApplicationPath(),r,e)},Zi=t=>{let{uiResources:e}=t;i9()&&(t.directUrlUpdation||kce(e))&&l9(t)},u9=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},zce=t=>t?ae.isRemoteCase(t)&&(ae.isTraditionalRemoteCase(t)||ae.isRemoteCaseVersionDifferent(t)):!1,d9=(t,e,r)=>{let{caseClassName:n,workID:o}=t.payload,{containerName:i,context:s}=e,{RemoteClassGroup:a,RemoteSystemID:c,name:l}=ae.getRemoteCase(n),u={...t,headers:{RemoteSystemID:c},className:n,isTraditionalRemoteCase:ae.isTraditionalRemoteCase(n),isRemoteCase:ae.isRemoteCase(n),action:AS,viewName:IS,gadgetId:B.getUniqueGadgetId(),context:r??s,skipSemanticUrl:!0,insKey:`${a?.toUpperCase()} ${o}`,containerName:i,name:l};T(rt["showPage"](u))},Hw=!1,Fce=async t=>{if(Hw){Hw=!1;return}let e="showHistory",r=x6(t);if(r){let n=Go(),o=se(`${n}/primary`);if(o&&jh(o)){let i=Or().getLocaleValue(Ou,"Messages");if(!await li.confirm(i)){Hw=!0,window.history.go(1);return}}ae.isRemoteCase(r.payload?.caseClassName)?d9({...r},r.options):T(rt[e](u9(r)))}},Bh=()=>{let t=ye.getApplicationPath(),e=Qd();return t!==e},p9=(t,e)=>{let r={restApi:""};try{if(Bh()&&!e){let n=Qd(),o=ye.processUrl(n,!0),i=ye._getMatchedRouteInRoutingTable(o)||"",s=ye.getRoutingInfo(),a=ye.processUrl(n,!1).split("/"),c=a[a.length-1],l=s?.routes?.[i]?.payload?.caseID?.replace("{workID}",c).replace("{id}",c);r=ye.getRestEndPoint("loadView",{caseID:l,viewID:t})||{}}else r=ye.getRestEndPoint("showView",{page:t,pageClass:e})||{}}catch{}return r},m9=()=>{if(Bh()){let t=ye.processUrl(Qd(),!0);return!!ye._getMatchedRouteInRoutingTable(t)}return!1},Vce=(t,e)=>{let r=ye.getRoutingInfo();if(rs()&&Object.values(r?.routes??{}).find(c=>c?.payload?.pageClass===e&&c?.payload?.page===t))return t;let n=t.split(" ").join(""),o=t.split(" ").join("-").toLowerCase(),i=p2(t);return r?.routes?.[n]?n:r?.routes?.[o]?o:r?.routes?.[i]?i:t},Bce=t=>{Vh=t};var Hce=()=>{let t=v.getIsExtraCallRequiredForDefaultHome();return t===!0||t==="true"},f9=t=>{let{acName:e,context:r,defaultViewLabel:n,ruleName:o,className:i}=t,s=Vce(o||n,i);Bce(s),ye.setDefaultRoute(s),ye.setDefaultClassName(i);let a=ur(e,r),c=Z(e,r),l=Hce(),u={historyAction:n9,pxURLPath:""},p,m=null,f={acName:c,context:a,actionConfig:{context:a}};if(l||!l&&Bh()){let h=dE(II());v.shouldUseURLParams()&&(m=h.includes("?")?h.split("?")[1]:null),p=m2(h,f),u.pxURLPath=p.urlPath,typeof p.payload?.pageClass<"u"&&(p.payload.pageClass=we()?.getState()?.data?.app?.pyPortal?.classID);let S="showHistory",A={routeEndpoint:p.routeEndpoint,requestType:p.requestType,payload:p.payload,options:f,routeKey:p.routeKey};zce(p?.payload?.caseClassName)?d9(A,t,f.context):T(rt[S](u9(A)))}else p=ye.getEndPointInfo(Vh),u.pxURLPath="";c9(null,{urlPathObjParam:u,infoParam:p,optionsParam:f,queryParam:m},!0)},Hh=(t,e=!1)=>{wI=t.domain,e===!1&&i9()&&(D6(Fce),w6()),ye.init(t,Vh)},g9=t=>{ye.addRoutes(t)},h9=t=>{t&&(o9=t.pyLabel)},U6=t=>{R6(t)},_I=t=>{for(let e of t)Gw.includes(e)||Gw.push(e)};function qr(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 qce=typeof Symbol=="function"&&Symbol.observable||"@@observable",y9=qce,Jw=()=>Math.random().toString(36).substring(7).split("").join("."),Wce={INIT:`@@redux/INIT${Jw()}`,REPLACE:`@@redux/REPLACE${Jw()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Jw()}`},MI=Wce;function kI(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 Yw(t,e,r){if(typeof t!="function")throw new Error(qr(2));if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(qr(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(qr(1));return r(Yw)(t,e)}let n=t,o=e,i=new Map,s=i,a=0,c=!1;function l(){s===i&&(s=new Map,i.forEach((A,C)=>{s.set(C,A)}))}function u(){if(c)throw new Error(qr(3));return o}function p(A){if(typeof A!="function")throw new Error(qr(4));if(c)throw new Error(qr(5));let C=!0;l();let _=a++;return s.set(_,A),function(){if(C){if(c)throw new Error(qr(6));C=!1,l(),s.delete(_),i=null}}}function m(A){if(!kI(A))throw new Error(qr(7));if(typeof A.type>"u")throw new Error(qr(8));if(typeof A.type!="string")throw new Error(qr(17));if(c)throw new Error(qr(9));try{c=!0,o=n(o,A)}finally{c=!1}return(i=s).forEach(_=>{_()}),A}function f(A){if(typeof A!="function")throw new Error(qr(10));n=A,m({type:MI.REPLACE})}function h(){let A=p;return{subscribe(C){if(typeof C!="object"||C===null)throw new Error(qr(11));function _(){let N=C;N.next&&N.next(u())}return _(),{unsubscribe:A(_)}},[y9](){return this}}}return m({type:MI.INIT}),{dispatch:m,subscribe:p,getState:u,replaceReducer:f,[y9]:h}}function Kce(t){Object.keys(t).forEach(e=>{let r=t[e];if(typeof r(void 0,{type:MI.INIT})>"u")throw new Error(qr(12));if(typeof r(void 0,{type:MI.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(qr(13))})}function S9(t){let e=Object.keys(t),r={};for(let s=0;s<e.length;s++){let a=e[s];typeof t[a]=="function"&&(r[a]=t[a])}let n=Object.keys(r),o,i;try{Kce(r)}catch(s){i=s}return function(a={},c){if(i)throw i;let l=!1,u={};for(let p=0;p<n.length;p++){let m=n[p],f=r[m],h=a[m],S=f(h,c);if(typeof S>"u"){let A=c&&c.type;throw new Error(qr(14))}u[m]=S,l=l||S!==h}return l=l||n.length!==Object.keys(a).length,l?u:a}}function Gh(...t){return t.length===0?e=>e:t.length===1?t[0]:t.reduce((e,r)=>(...n)=>e(r(...n)))}function E9(...t){return e=>(r,n)=>{let o=e(r,n),i=()=>{throw new Error(qr(15))},s={getState:o.getState,dispatch:(c,...l)=>i(c,...l)},a=t.map(c=>c(s));return i=Gh(...a)(o.dispatch),{...o,dispatch:i}}}function A9(t){return kI(t)&&"type"in t&&typeof t.type=="string"}var N9=Symbol.for("immer-nothing"),C9=Symbol.for("immer-draftable"),an=Symbol.for("immer-state");function qo(t,...e){throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var io=Object,tp=io.getPrototypeOf,zI="constructor",qI="prototype",e0="configurable",FI="enumerable",UI="writable",qh="value",Ni=t=>!!t&&!!t[an];function so(t){return t?O9(t)||KI(t)||!!t[C9]||!!t[zI]?.[C9]||JI(t)||YI(t):!1}var Jce=io[qI][zI].toString(),I9=new WeakMap;function O9(t){if(!t||!c0(t))return!1;let e=tp(t);if(e===null||e===io[qI])return!0;let r=io.hasOwnProperty.call(e,zI)&&e[zI];if(r===Object)return!0;if(!ep(r))return!1;let n=I9.get(r);return n===void 0&&(n=Function.toString.call(r),I9.set(r,n)),n===Jce}function WI(t,e,r=!0){Jh(t)===0?(r?Reflect.ownKeys(t):io.keys(t)).forEach(o=>{e(o,t[o],t)}):t.forEach((n,o)=>e(o,n,t))}function Jh(t){let e=t[an];return e?e.type_:KI(t)?1:JI(t)?2:YI(t)?3:0}var Zw=(t,e,r=Jh(t))=>r===2?t.has(e):io[qI].hasOwnProperty.call(t,e),t0=(t,e,r=Jh(t))=>r===2?t.get(e):t[e],VI=(t,e,r,n=Jh(t))=>{n===2?t.set(e,r):n===3?t.add(r):t[e]=r};function Yce(t,e){return t===e?t!==0||1/t===1/e:t!==t&&e!==e}var KI=Array.isArray,JI=t=>t instanceof Map,YI=t=>t instanceof Set,c0=t=>typeof t=="object",ep=t=>typeof t=="function",Qw=t=>typeof t=="boolean";function Zce(t){let e=+t;return Number.isInteger(e)&&String(e)===t}var Cs=t=>t.copy_||t.base_;var l0=t=>t.modified_?t.copy_:t.base_;function r0(t,e){if(JI(t))return new Map(t);if(YI(t))return new Set(t);if(KI(t))return Array[qI].slice.call(t);let r=O9(t);if(e===!0||e==="class_only"&&!r){let n=io.getOwnPropertyDescriptors(t);delete n[an];let o=Reflect.ownKeys(n);for(let i=0;i<o.length;i++){let s=o[i],a=n[s];a[UI]===!1&&(a[UI]=!0,a[e0]=!0),(a.get||a.set)&&(n[s]={[e0]:!0,[UI]:!0,[FI]:a[FI],[qh]:t[s]})}return io.create(tp(t),n)}else{let n=tp(t);if(n!==null&&r)return{...t};let o=io.create(n);return io.assign(o,t)}}function u0(t,e=!1){return ZI(t)||Ni(t)||!so(t)||(Jh(t)>1&&io.defineProperties(t,{set:LI,add:LI,clear:LI,delete:LI}),io.freeze(t),e&&WI(t,(r,n)=>{u0(n,!0)},!1)),t}function Qce(){qo(2)}var LI={[qh]:Qce};function ZI(t){return t===null||!c0(t)?!0:io.isFrozen(t)}var BI="MapSet",n0="Patches",_9="ArrayMethods",x9={};function fl(t){let e=x9[t];return e||qo(0,t),e}var b9=t=>!!x9[t];var Wh,D9=()=>Wh,Xce=(t,e)=>({drafts_:[],parent_:t,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:b9(BI)?fl(BI):void 0,arrayMethodsPlugin_:b9(_9)?fl(_9):void 0});function T9(t,e){e&&(t.patchPlugin_=fl(n0),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function o0(t){i0(t),t.drafts_.forEach(ele),t.drafts_=null}function i0(t){t===Wh&&(Wh=t.parent_)}var v9=t=>Wh=Xce(Wh,t);function ele(t){let e=t[an];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function R9(t,e){e.unfinalizedDrafts_=e.drafts_.length;let r=e.drafts_[0];if(t!==void 0&&t!==r){r[an].modified_&&(o0(e),qo(4)),so(t)&&(t=P9(e,t));let{patchPlugin_:o}=e;o&&o.generateReplacementPatches_(r[an].base_,t,e)}else t=P9(e,r);return tle(e,t,!0),o0(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==N9?t:void 0}function P9(t,e){if(ZI(e))return e;let r=e[an];if(!r)return HI(e,t.handledSet_,t);if(!QI(r,t))return e;if(!r.modified_)return r.base_;if(!r.finalized_){let{callbacks_:n}=r;if(n)for(;n.length>0;)n.pop()(t);M9(r,t)}return r.copy_}function tle(t,e,r=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&u0(e,r)}function w9(t){t.finalized_=!0,t.scope_.unfinalizedDrafts_--}var QI=(t,e)=>t.scope_===e,rle=[];function $9(t,e,r,n){let o=Cs(t),i=t.type_;if(n!==void 0&&t0(o,n,i)===e){VI(o,n,r,i);return}if(!t.draftLocations_){let a=t.draftLocations_=new Map;WI(o,(c,l)=>{if(Ni(l)){let u=a.get(l)||[];u.push(c),a.set(l,u)}})}let s=t.draftLocations_.get(e)??rle;for(let a of s)VI(o,a,r,i)}function nle(t,e,r){t.callbacks_.push(function(o){let i=e;if(!i||!QI(i,o))return;o.mapSetPlugin_?.fixSetContents(i);let s=l0(i);$9(t,i.draft_??i,s,r),M9(i,o)})}function M9(t,e){if(t.modified_&&!t.finalized_&&(t.type_===3||t.type_===1&&t.allIndicesReassigned_||(t.assigned_?.size??0)>0)){let{patchPlugin_:n}=e;if(n){let o=n.getPath(t);o&&n.generatePatches_(t,o,e)}w9(t)}}function ole(t,e,r){let{scope_:n}=t;if(Ni(r)){let o=r[an];QI(o,n)&&o.callbacks_.push(function(){jI(t);let s=l0(o);$9(t,r,s,e)})}else so(r)&&t.callbacks_.push(function(){let i=Cs(t);t.type_===3?i.has(r)&&HI(r,n.handledSet_,n):t0(i,e,t.type_)===r&&n.drafts_.length>1&&(t.assigned_.get(e)??!1)===!0&&t.copy_&&HI(t0(t.copy_,e,t.type_),n.handledSet_,n)})}function HI(t,e,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||Ni(t)||e.has(t)||!so(t)||ZI(t)||(e.add(t),WI(t,(n,o)=>{if(Ni(o)){let i=o[an];if(QI(i,r)){let s=l0(i);VI(t,n,s,t.type_),w9(i)}}else so(o)&&HI(o,e,r)})),t}function ile(t,e){let r=KI(t),n={type_:r?1:0,scope_:e?e.scope_:D9(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:e,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},o=n,i=GI;r&&(o=[n],i=Kh);let{revoke:s,proxy:a}=Proxy.revocable(o,i);return n.draft_=a,n.revoke_=s,[a,n]}var GI={get(t,e){if(e===an)return t;let r=t.scope_.arrayMethodsPlugin_,n=t.type_===1&&typeof e=="string";if(n&&r?.isArrayOperationMethod(e))return r.createMethodInterceptor(t,e);let o=Cs(t);if(!Zw(o,e,t.type_))return ale(t,o,e);let i=o[e];if(t.finalized_||!so(i)||n&&t.operationMethod&&r?.isMutatingArrayMethod(t.operationMethod)&&Zce(e))return i;if(i===Xw(t.base_,e)||sle(t,e,i)){jI(t);let s=t.type_===1?+e:e,a=a0(t.scope_,i,t,s);return t.copy_[s]=a}return i},has(t,e){return e in Cs(t)},ownKeys(t){return Reflect.ownKeys(Cs(t))},set(t,e,r){let n=k9(Cs(t),e);if(n?.set)return n.set.call(t.draft_,r),!0;if(!t.modified_){let o=Xw(Cs(t),e),i=o?.[an];if(i&&i.base_===r)return t.copy_[e]=r,t.assigned_.set(e,!1),!0;if(Yce(r,o)&&(r!==void 0||Zw(t.base_,e,t.type_)))return!0;jI(t),s0(t)}return t.copy_[e]===r&&(r!==void 0||Zw(t.copy_,e,t.type_))||Number.isNaN(r)&&Number.isNaN(t.copy_[e])||(t.copy_[e]=r,t.assigned_.set(e,!0),ole(t,e,r)),!0},deleteProperty(t,e){return jI(t),Xw(t.base_,e)!==void 0||e in t.base_?(t.assigned_.set(e,!1),s0(t)):t.assigned_.delete(e),t.copy_&&delete t.copy_[e],!0},getOwnPropertyDescriptor(t,e){let r=Cs(t),n=Reflect.getOwnPropertyDescriptor(r,e);return n&&{[UI]:!0,[e0]:t.type_!==1||e!=="length",[FI]:n[FI],[qh]:r[e]}},defineProperty(){qo(11)},getPrototypeOf(t){return tp(t.base_)},setPrototypeOf(){qo(12)}},Kh={};for(let t in GI){let e=GI[t];Kh[t]=function(){let r=arguments;return r[0]=r[0][0],e.apply(this,r)}}Kh.deleteProperty=function(t,e){return Kh.set.call(this,t,e,void 0)};Kh.set=function(t,e,r){return GI.set.call(this,t[0],e,r,t[0])};function Xw(t,e){let r=t[an];return(r?Cs(r):t)[e]}function sle(t,e,r){return t.type_!==1||!t.allIndicesReassigned_||t.assigned_?.get(e)||!so(r)||r[an]?!1:t.baseRefs_.has(r)}function ale(t,e,r){let n=k9(e,r);return n?qh in n?n[qh]:n.get?.call(t.draft_):void 0}function k9(t,e){if(!(e in t))return;let r=tp(t);for(;r;){let n=Object.getOwnPropertyDescriptor(r,e);if(n)return n;r=tp(r)}}function s0(t){t.modified_||(t.modified_=!0,t.parent_&&s0(t.parent_))}function jI(t){t.copy_||(t.assigned_=new Map,t.copy_=r0(t.base_,t.scope_.immer_.useStrictShallowCopy_))}var cle=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,r,n)=>{if(ep(e)&&!ep(r)){let i=r;r=e;let s=this;return function(c=i,...l){return s.produce(c,u=>r.call(this,u,...l))}}ep(r)||qo(6),n!==void 0&&!ep(n)&&qo(7);let o;if(so(e)){let i=v9(this),s=a0(i,e,void 0),a=!0;try{o=r(s),a=!1}finally{a?o0(i):i0(i)}return T9(i,n),R9(o,i)}else if(!e||!c0(e)){if(o=r(e),o===void 0&&(o=e),o===N9&&(o=void 0),this.autoFreeze_&&u0(o,!0),n){let i=[],s=[];fl(n0).generateReplacementPatches_(e,o,{patches_:i,inversePatches_:s}),n(i,s)}return o}else qo(1,e)},this.produceWithPatches=(e,r)=>{if(ep(e))return(s,...a)=>this.produceWithPatches(s,c=>e(c,...a));let n,o;return[this.produce(e,r,(s,a)=>{n=s,o=a}),n,o]},Qw(t?.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),Qw(t?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),Qw(t?.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){so(t)||qo(8),Ni(t)&&(t=L9(t));let e=v9(this),r=a0(e,t,void 0);return r[an].isManual_=!0,i0(e),r}finishDraft(t,e){let r=t&&t[an];(!r||!r.isManual_)&&qo(9);let{scope_:n}=r;return T9(n,e),R9(void 0,n)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,e){let r;for(r=e.length-1;r>=0;r--){let o=e[r];if(o.path.length===0&&o.op==="replace"){t=o.value;break}}r>-1&&(e=e.slice(r+1));let n=fl(n0).applyPatches_;return Ni(t)?n(t,e):this.produce(t,o=>n(o,e))}};function a0(t,e,r,n){let[o,i]=JI(e)?fl(BI).proxyMap_(e,r):YI(e)?fl(BI).proxySet_(e,r):ile(e,r);return(r?.scope_??D9()).drafts_.push(o),i.callbacks_=r?.callbacks_??[],i.key_=n,r&&n!==void 0?nle(r,i,n):i.callbacks_.push(function(c){c.mapSetPlugin_?.fixSetContents(i);let{patchPlugin_:l}=c;i.modified_&&l&&l.generatePatches_(i,[],c)}),o}function L9(t){return Ni(t)||qo(10,t),U9(t)}function U9(t){if(!so(t)||ZI(t))return t;let e=t[an],r,n=!0;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,r=r0(t,e.scope_.immer_.useStrictShallowCopy_),n=e.scope_.immer_.shouldUseStrictIteration()}else r=r0(t,!0);return WI(r,(o,i)=>{VI(r,o,U9(i))},n),e&&(e.finalized_=!1),r}var lle=new cle,d0=lle.produce;function j9(t){return({dispatch:r,getState:n})=>o=>i=>typeof i=="function"?i(r,n,t):o(i)}var z9=j9(),F9=j9;var ule=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Gh:Gh.apply(null,arguments)},GWe=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}},dle=t=>t&&typeof t.match=="function";function Fa(t,e){function r(...n){if(e){let o=e(...n);if(!o)throw new Error(XI(0));return{type:t,payload:o.payload,..."meta"in o&&{meta:o.meta},..."error"in o&&{error:o.error}}}return{type:t,payload:n[0]}}return r.toString=()=>`${t}`,r.type=t,r.match=n=>A9(n)&&n.type===t,r}var q9=class Yh extends Array{constructor(...e){super(...e),Object.setPrototypeOf(this,Yh.prototype)}static get[Symbol.species](){return Yh}concat(...e){return super.concat.apply(this,e)}prepend(...e){return e.length===1&&Array.isArray(e[0])?new Yh(...e[0].concat(this)):new Yh(...e.concat(this))}};function V9(t){return so(t)?d0(t,()=>{}):t}function ple(t){return typeof t=="boolean"}var mle=()=>function(e){let{thunk:r=!0,immutableCheck:n=!0,serializableCheck:o=!0,actionCreatorCheck:i=!0}=e??{},s=new q9;return r&&(ple(r)?s.push(z9):s.push(F9(r.extraArgument))),s},fle="RTK_autoBatch";var B9=t=>e=>{setTimeout(e,t)},gle=(t,e)=>r=>{let n=!1,o=()=>{n||(n=!0,cancelAnimationFrame(i),clearTimeout(s),r())},i=t(o),s=setTimeout(o,e)},hle=(t={type:"raf"})=>e=>(...r)=>{let n=e(...r),o=!0,i=!1,s=!1,a=new Set,c=t.type==="tick"?queueMicrotask:t.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?gle(window.requestAnimationFrame,100):B9(10):t.type==="callback"?t.queueNotification:B9(t.timeout),l=()=>{s=!1,i&&(i=!1,a.forEach(u=>u()))};return Object.assign({},n,{subscribe(u){let p=()=>o&&u(),m=n.subscribe(p);return a.add(u),()=>{m(),a.delete(u)}},dispatch(u){try{return o=!u?.meta?.[fle],i=!o,i&&(s||(s=!0,c(l))),n.dispatch(u)}finally{o=!0}}})},yle=t=>function(r){let{autoBatch:n=!0}=r??{},o=new q9(t);return n&&o.push(hle(typeof n=="object"?n:void 0)),o};function W9(t){let e=mle(),{reducer:r=void 0,middleware:n,devTools:o=!0,duplicateMiddlewareCheck:i=!0,preloadedState:s=void 0,enhancers:a=void 0}=t||{},c;if(typeof r=="function")c=r;else if(kI(r))c=S9(r);else throw new Error(XI(1));let l;typeof n=="function"?l=n(e):l=e();let u=Gh;o&&(u=ule({trace:!1,...typeof o=="object"&&o}));let p=E9(...l),m=yle(p),f=typeof a=="function"?a(m):m(),h=u(...f);return Yw(c,s,h)}function Sle(t){let e={},r=[],n,o={addCase(i,s){let a=typeof i=="string"?i:i.type;if(!a)throw new Error(XI(28));if(a in e)throw new Error(XI(29));return e[a]=s,o},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&&r.push({matcher:i.settled,reducer:s.settled}),o},addMatcher(i,s){return r.push({matcher:i,reducer:s}),o},addDefaultCase(i){return n=i,o}};return t(o),[e,r,n]}function Ele(t){return typeof t=="function"}function Oi(t,e){let[r,n,o]=Sle(e),i;if(Ele(t))i=()=>V9(t());else{let a=V9(t);i=()=>a}function s(a=i(),c){let l=[r[c.type],...n.filter(({matcher:u})=>u(c)).map(({reducer:u})=>u)];return l.filter(u=>!!u).length===0&&(l=[o]),l.reduce((u,p)=>{if(p)if(Ni(u)){let f=p(u,c);return f===void 0?u:f}else{if(so(u))return d0(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 Ale=(t,e)=>dle(t)?t.match(e):t(e);function Cle(...t){return e=>t.some(r=>Ale(r,e))}var Ile="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",_le=(t=21)=>{let e="",r=t;for(;r--;)e+=Ile[Math.random()*64|0];return e},ble=["name","message","stack","code"],p0=class{constructor(t,e){this.payload=t,this.meta=e}payload;meta;_type},H9=class{constructor(t,e){this.payload=t,this.meta=e}payload;meta;_type},Tle=t=>{if(typeof t=="object"&&t!==null){let e={};for(let r of ble)typeof t[r]=="string"&&(e[r]=t[r]);return e}return{message:String(t)}},G9="External signal was aborted",vle=(()=>{function t(e,r,n){let o=Fa(e+"/fulfilled",(c,l,u,p)=>({payload:c,meta:{...p||{},arg:u,requestId:l,requestStatus:"fulfilled"}})),i=Fa(e+"/pending",(c,l,u)=>({payload:void 0,meta:{...u||{},arg:l,requestId:c,requestStatus:"pending"}})),s=Fa(e+"/rejected",(c,l,u,p,m)=>({payload:p,error:(n&&n.serializeError||Tle)(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=n?.idGenerator?n.idGenerator(c):_le(),h=new AbortController,S,A;function C(I){A=I,h.abort()}l&&(l.aborted?C(G9):l.addEventListener("abort",()=>C(G9),{once:!0}));let _=(async function(){let I;try{let x=n?.condition?.(c,{getState:p,extra:m});if(Ple(x)&&(x=await x),x===!1||h.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let H=new Promise((G,ne)=>{S=()=>{ne({name:"AbortError",message:A||"Aborted"})},h.signal.addEventListener("abort",S,{once:!0})});u(i(f,c,n?.getPendingMeta?.({requestId:f,arg:c},{getState:p,extra:m}))),I=await Promise.race([H,Promise.resolve(r(c,{dispatch:u,getState:p,extra:m,requestId:f,signal:h.signal,abort:C,rejectWithValue:((G,ne)=>new p0(G,ne)),fulfillWithValue:((G,ne)=>new H9(G,ne))})).then(G=>{if(G instanceof p0)throw G;return G instanceof H9?o(G.payload,f,c,G.meta):o(G,f,c)})])}catch(x){I=x instanceof p0?s(null,f,c,x.payload,x.meta):s(x,f,c)}finally{S&&h.signal.removeEventListener("abort",S)}return n&&!n.dispatchConditionRejection&&s.match(I)&&I.meta.condition||u(I),I})();return Object.assign(_,{abort:C,requestId:f,arg:c,unwrap(){return _.then(Rle)}})}}return Object.assign(a,{pending:i,rejected:s,fulfilled:o,settled:Cle(s,o),typePrefix:e})}return t.withTypes=()=>t,t})();function Rle(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function Ple(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var Nle=Symbol.for("rtk-slice-createasyncthunk"),WWe={[Nle]:vle};var K9="listener",J9="completed",Y9="cancelled",KWe=`task-${Y9}`,JWe=`task-${J9}`,YWe=`${K9}-${Y9}`,ZWe=`${K9}-${J9}`;var{assign:Z9}=Object;var m0="listenerMiddleware";var Ole=Z9(Fa(`${m0}/add`),{withTypes:()=>Ole}),QWe=Fa(`${m0}/removeAll`),xle=Z9(Fa(`${m0}/remove`),{withTypes:()=>xle});function XI(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 f0=(t=>{let e=new Set,r=e,n=()=>{e===r&&(e=new Set(e))},o=s=>{let a=!0;return n(),e.add(s),()=>{a&&(n(),e.delete(s),a=!1)}},i=()=>{let s=Array.from(e);r=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 h=u(m),S=c&&!f;return f||(c=!1,l=!1),S&&i(),h};return a.subscribe(()=>{l?c=!0:i()}),{...a,dispatch:p,subscribe:o}}});var Q9=t=>!!t&&typeof t=="object"&&!Array.isArray(t),Dle=(t,e)=>{if(Object.keys(e).length===0)return;Zt.updateDataPageStore(e),t[d.SHARED]||(t[d.SHARED]={});let r=t[d.SHARED];Object.entries(e).forEach(([n,o])=>{let i=r[n];Q9(i)&&Q9(o)?r[n]={...i,...o}:r[n]=o})},Va=(t,e)=>{let{data:{shared:r={}}={},context:n}=e;if(Object.keys(r).length===0){n&&g.deleteIn(t,[n,"shared"]);return}Dle(t,r),n&&g.deleteIn(t,[n,"shared"])},gl=(t,e,r=!1)=>{let{context:n,caseViewMode:o=r?void 0:d.PERFORM_MODE,containerName:i}=e;i!==ge.WORKAREA&&o&&g.setIn(t,[n,"context_data","caseViewMode"],o)},g0=(t,e)=>{let{context:r}=e;g.setIn(t,[r,"context_data","actionType"],e.actionType),g.setIn(t,[r,"context_data","assignmentID"],e.assignmentID)},X9=(t,e)=>{let{context:r}=e;g.deleteIn(t,[r,"context_data","blocking_action_counter"]),g.deleteIn(t,[r,"context_data","deferred_action_queue"])};var Zh=t=>t!==null&&typeof t=="object",eB=(t,e=[])=>{e.forEach(r=>g.deleteIn(t,r))},h0=(t,e=[])=>{e.forEach(r=>g.deleteIn(t,r))},y0=(t,e=[])=>{e.forEach(r=>{g.deleteIn(t,r)})},e_=(t,e,r={})=>{let{deleteAssignmentSpecificResources:n=!0,doDeleteConfirmationDetails:o=!0,skipMergeAssignmentsAndActions:i=!0}=r;g.deleteIn(t,[e,"nextAssignmentInfo"]),i&&(g.deleteIn(t,[e,d.CASE_INFO.CASE_INFO,"availableActions"]),g.deleteIn(t,[e,d.CASE_INFO.CASE_INFO,"availableProcesses"]),g.deleteIn(t,[e,d.CASE_INFO.CASE_INFO,"assignments"])),g.deleteIn(t,[e,d.CASE_INFO.CASE_INFO,"activeActionID"]),g.deleteIn(t,[e,d.CASE_INFO.CASE_INFO,"childCases"]),o&&(g.deleteIn(t,[e,d.CASE_INFO.CASE_INFO,"confirmationLinks"]),g.deleteIn(t,[e,"caseMessages"])),n&&(g.deleteIn(t,[e,d.CASE_INFO.CASE_INFO,"actionButtons"]),g.deleteIn(t,[e,d.CASE_INFO.CASE_INFO,"navigation"]))},wle=(t,e)=>{let{containerItemID:r,context:n,deleteContext:o}=e;o&&g.deleteIn(t,[n]),g.deleteIn(t,[r])},$le={},Mle=Oi($le,t=>{t.addCase(Et,(e,r)=>{if(!r.payload.data||e[r.payload.context])return;r.payload.doDeleteCaseSummary&&e_(e,r.payload.context);let{target:n}=r.payload;n&&(n.includes(d.WORKAREA)||n.includes(d.MODAL))?e[r.payload.context]=r.payload.data:e[r.payload.containerItemID]=r.payload.data,gl(e,r.payload),g0(e,r.payload),Va(e,r.payload),X9(e,r.payload)}).addCase(kt,(e,r)=>{r.payload.doDeleteCaseSummary&&e_(e,r.payload.context,{deleteAssignmentSpecificResources:r.payload.deleteAssignmentSpecificResources});let{target:n,propertiesToReplace:o=[]}=r.payload;if(n&&(n.includes(d.WORKAREA)||n.includes(d.MODAL))){let i=e[r.payload.context];Zh(i)&&(e[r.payload.context]=xt(i,r.payload.data,{propertiesToReplace:[...o]}))}else{let i=e[r.payload.containerItemID];Zh(i)&&(e[r.payload.containerItemID]=xt(i,r.payload.data,{propertiesToReplace:[...o]}))}(r.payload.actionType||r.payload.assignmentID)&&g0(e,r.payload),gl(e,r.payload),Va(e,r.payload),h0(e,r.payload.suggestionContexts)}).addCase(Ze,(e,r)=>{let{childContainersContexts:n=[]}=r.payload;wle(e,r.payload),y0(e,n),eB(e,r.payload.transientItems),h0(e,r.payload.suggestionContexts)}).addCase(Yo,(e,r)=>{let{containerItems:n}=r.payload;Array.isArray(n)?n.forEach(o=>{g.deleteIn(e,[o])}):g.deleteIn(e,[n])}).addCase(Hs,(e,r)=>{let{context:n,contextToBeRemoved:o,data:i,childContainersContextsToBeRemoved:s}=r.payload;e_(e,r.payload.context),gl(e,r.payload);let a=e[n],c=e[o];if(!Zh(a)||!Zh(c))return;let l=xt(a,c);Zh(l)&&(e[n]=xt(l,i),g.deleteIn(e,[o]),y0(e,s),Va(e,r.payload))}).addCase(et,(e,r)=>{let{context:n,pulseReplace:o=!0,childContainersContexts:i=[]}=r.payload,{data:s}=r.payload,a=g.getIn(e[n],"pulse"),c=g.getIn(e[n],"OperatorID"),l=g.getIn(e[n],"pxRequestor");g.setIn(e,n,s),l&&g.setIn(e,[n,"pxRequestor"],s.pxRequestor?g.mergeDeep(l,s.pxRequestor):l),c&&g.setIn(e,[n,"OperatorID"],s.OperatorID?g.mergeDeep(c,s.OperatorID):c),!o&&a&&g.setIn(e,[n,"pulse"],a),gl(e,r.payload),Va(e,r.payload),y0(e,i),eB(e,r.payload.transientItems),h0(e,r.payload.suggestionContexts)}).addCase(mn,(e,r)=>{let{context:n,doDeleteConfirmationDetails:o=!0,skipMergeAssignmentsAndActions:i=!0}=r.payload;e_(e,n,{doDeleteConfirmationDetails:o,skipMergeAssignmentsAndActions:i})}).addCase(Fs,(e,r)=>{let{transientItemID:n,data:o}=r.payload;g.setIn(e,n,o)}).addCase(Zo,(e,r)=>{let{transientItems:n}=r.payload;n.forEach(o=>g.deleteIn(e,o))}).addCase(Qo,(e,r)=>{let{transientItems:n}=r.payload;n.forEach(o=>g.deleteIn(e,o))}).addCase(Vs,(e,r)=>{let{transientItemID:n,data:o}=r.payload;xt(g.getIn(e,n),o)}).addCase(po,(e,r)=>{let{transientItemID:n,data:o}=r.payload;xt(g.getIn(e,n),o)}).addCase(zi,(e,r)=>{let{transientItemID:n,data:o}=r.payload;Object.keys(o??{}).forEach(i=>{g.deleteIn(e,[n,i])})}).addCase(Bs,(e,r)=>{let{transientItemID:n,data:o}=r.payload;g.deleteIn(e,n),g.setIn(e,n,o)}).addCase(Yl,(e,r)=>{let{key:n,value:o}=r.payload;g.setIn(e,`${d.SHARED}.${n}`,o)}).addCase(Xl,(e,r)=>{let{context:n,data:o}=r.payload;return g.setIn(e,n,o)})}),S0=Mle;function tB(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 kle=Fa(nu),Lle=Oi({},t=>{t.addCase(Er,(e,r)=>{let{propertiesToReplace:n=[],propertiesToReArrange:o=[],uiRootReference:i="",interestPath:s}=r.payload,a=i&&typeof r.payload.context=="string"?`${r.payload.context}.${i}`:r.payload.context,c=typeof a=="string"?oo(a):[],l={isArrayDeepMerge:r.payload.isArrayDeepMerge,propertiesToReplace:[...n],propertiesToReArrange:[...o]};if(i&&c.length)g.setIn(e,c,xt(g.getIn(e,c),g.getIn(r.payload.data,oo(i)),l));else if(s){let u=g.getIn(e[r.payload.context],s),p=g.getIn(r.payload.data,s),m=xt(u,p,{isArrayDeepMerge:!0}),f=g.getIn(r.payload.data.context_data,s);xI(e[r.payload.context],[...n],[...o]),g.setIn(e[r.payload.context],s,m),e[r.payload.context]&&f&&g.setIn(e[r.payload.context].context_data,s,xt(g.getIn(e[r.payload.context].context_data,s),f,{isArrayDeepMerge:!0}))}else e[r.payload.context]=xt(e[r.payload.context],r.payload.data,l);gl(e,r.payload,!0),Va(e,r.payload)}).addCase(_t,(e,r)=>{let{context:n,reference:o,value:i,isArrayDeepMerge:s}=r.payload;ww(e[n],o,i,{isArrayDeepMerge:s})}).addCase(lc,(e,r)=>{let{context:n,reference:o,value:i}=r.payload;$w(e[n],o,i)}).addCase(Zl,(e,r)=>{Dw(e[r.payload.context],r.payload.reference)}).addCase(Us,(e,r)=>{g.setIn(e[r.payload.context],"context_data.isLoading",!0)}).addCase(Ro,(e,r)=>{g.setIn(e[r.payload.context],"context_data.isLoading",!1)}).addCase(js,(e,r)=>{let n=tB(r);n&&(e[n]||(e[n]={}),g.setIn(e[n],"context_data.isOffline",!0))}).addCase(Jl,(e,r)=>{let n=tB(r);n&&(e[n]||(e[n]={}),g.setIn(e[n],"context_data.isOffline",!1))}).addCase(Xo,(e,r)=>{let{data:n}=r.payload;Va(e,{data:{shared:n}})}).addCase(ru,(e,r)=>{let{dataPagesToBeRemoved:n=[]}=r.payload;if(!e.shared||n.length===0)return;let o=new Map;n.forEach(i=>{let{dataPageName:s,dataPageNameWithHash:a}=i,c=o.get(s);c?c.push(a):o.set(s,[a])}),o.forEach((i,s)=>{i.forEach(c=>{g.deleteIn(e.shared,[s,c])});let a=g.getIn(e.shared,[s]);a&&Object.keys(a).length===0&&g.deleteIn(e.shared,[s])})}).addCase(mc,(e,r)=>{let n=g.getIn(e[r.payload.context].context_data,"blocking_action_counter",0);r.payload.isInitiateBlockingAction?g.setIn(e[r.payload.context].context_data,"blocking_action_counter",n+1):g.setIn(e[r.payload.context].context_data,"blocking_action_counter",n-1)}).addCase(kle,(e,r)=>{e.locale=g.getIn(r.payload,"locale","")})}),rB=Lle;var oB=/\[(\d+)\]$/gi,iB=/(\d+)/gi,Ule=/\[\d+\]$/,sB=(t,e,r,n=[d.CONTEXT_DATA,d.CASE_INFO.CASE_INFO,d.CONTENT])=>{let o=g.getIn(e,n);if(o){let s=vE(o,[],[]);for(let a of s)g.setIn(t[r],[...n,...a],{})}},nB=(t,e,r,n)=>{let{property:o,pageReference:i,category:s,type:a,subType:c}=n.payload,l=g.getIn(t[e],r);if(l&&s===d.CASEMESSAGES)g.setIn(t[e],Qn(o,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),r&&r.length>0&&g.setIn(t[e],Qn(o,i,s),u)}},jle=(t,e)=>{let{property:r,pageReference:n,category:o,isListEntry:i,stateObj:s}=e.payload,{context:a}=e.payload,c=a;if(s)return sB(t,s,a),t;let l=Qn(r,n,o,i);return o===d.PAGE&&a?.includes(ge.WORKAREA)&&(c=qe(a)),nB(t,c,l,e),nB(t,a,l,e),t},zle=t=>{let e=t.map(r=>{let n=r.match(oB),o=null;if(n?.length){let i=n[0].match(iB);i?.length&&(o=parseInt(i[0],10))}return{key:r,hasIndex:!!n,numericIndex:o}});return e.sort((r,n)=>!r.hasIndex&&!n.hasIndex?r.key.localeCompare(n.key):!r.hasIndex&&n.hasIndex?-1:r.numericIndex!==null&&n.numericIndex!==null?r.numericIndex-n.numericIndex:1),e.map(r=>r.key)},Fle=(t,e)=>{let{property:r,pageReference:n,category:o,isListEntry:i,deletingIndex:s,stateObj:a}=e.payload,{context:c}=e.payload;if(a)return sB(t,a,c),t;let l=Qn(r,n,o,i);if(Number.isInteger(s)){g.deleteIn(t[c],l);let u=l.slice(0,l.length-1),p=g.getIn(t[c],u)||{},m=zle(Object.keys(p));p=m.map(f=>p[f]),p.forEach((f,h)=>{let S=m[h].match(oB);if(S?.length){let A=parseInt(S[0].match(iB)[0],10);A>s&&(g.deleteIn(t[c],u.concat(m[h])),g.setIn(t[c],u.concat(m[h].replace(Ule,`[${A-1}]`)),f))}})}else g.setIn(t[c],l,{});return t};function Vle(t){let e=null,r=t.lastIndexOf(".");return r<0?null:(e=t.substring(0,r),e&&`caseInfo.content.${e}`.replace(/\(/g,"[").replace(/\)/g,"]"))}function aB(t,e){return g.getIn(t,e)?.dataInfo?.content!==void 0}var cB=(t,e)=>{let r=g.getIn(t,e);return B.isObjectCaseType(r?.objectInfo?.objectTypeID)===!0};function lB(t,e){let r=Vr.FIELD_MESSAGES_PATH;return aB(t,e)?r=Vr.DATA_OBJECT_FIELD_MESSAGES_PATH:cB(t,e)&&(r=Vr.OBJECT_FIELD_MESSAGES_PATH),r}var Ble=(t,e,r)=>{let n=g.getIn(r,d.ERROR_FIELD_IN_PAGE).slice(1),o=g.getIn(r,d.ERROR_IN_PAGE_IDENTIFIER).slice(1);if(o){let i="caseInfo.content";aB(t,e)?i="dataInfo.content":cB(t,e)&&(i="objectInfo.content");let s=n?`${i}.${n}`:i;s=s.replace(/\(/g,"[").replace(/\)/g,"]");let a=Qn(o,s,d.PROPERTY),c=g.getIn(t[e],`${s}.classID`),l=lt(o,c),u=v.getLocale()??"en-US",p=new Wd(u,l?.localeReference),m={type:E.MESSAGES.MESSAGES_TYPE_ERROR,message:r.localizedValue,...l?.label&&{fieldLabel:p.getLocalizedText(l.label)}},f=g.getIn(t[e],a,[]);if(g.isContains(f,m))return;g.setIn(t[e],a,[...f,m])}},Hle=(t,e,r)=>{r.forEach(n=>{Ble(t,e,n)})},Gle=t=>{let e=[];return t.forEach(r=>{let n=r.erroneousInputOutputFieldInPage?.replace(/^\./,"");e.push({type:E.MESSAGES.MESSAGES_TYPE_ERROR,message:r.localizedValue,...n&&{fieldInPage:n}})}),e};function qle(t,e){let{err:r,formFields:n}=e.payload,{context:o}=e.payload,{fieldErrors:i,pageErrors:s}=Sj(r.errorDetails,n),a=lB(t,o);if(g.setIn(t,[o,...a],{}),g.setIn(t,[o,...Vr.PAGE_MESSAGES_PATH],[]),i.forEach(c=>{let l=g.getIn(c,d.ERROR_FIELD_IN_PAGE);if(l){let u=l.slice(1);if(u){let p=Vle(u);if(!p)return!1;let m=u.substring(u.lastIndexOf(".")+1),f=Qn(m,p,d.PROPERTY);g.setIn(t,[o,...f],[])}}}),i.length>0&&Hle(t,o,i),s.length>0){let c=Gle(s);t[o]||(o=d.APP.APP),g.setIn(t,[o,...Vr.PAGE_MESSAGES_PATH],c)}else o.includes&&o.includes(ge.WORKAREA)&&(o=qe(o)),g.deleteIn(t,[o,...Vr.PAGE_MESSAGES_PATH]);return t}var Wle=Oi({},t=>{t.addCase(Te,(e,r)=>r.payload.err.errorDetails&&(r.payload.err.errorClassification===E.VALIDATION_FAIL||r.payload.err.errorClassification===E.INVALID_INPUTS||(r.payload.err?.displayButtonsOnErrors?.length??0)>0)?qle(e,r):e).addCase(kt,(e,r)=>{let{context:n}=r.payload,o=[n,...lB(e,n)],i=[n,...Vr.PAGE_MESSAGES_PATH];if(g.setIn(e,o,{}),g.setIn(e,i,[]),n&&n.includes(ge.WORKAREA)){let a=[xo(n),...Vr.PAGE_MESSAGES_PATH];g.setIn(e,a,[])}}).addCase(Wn,(e,r)=>{let{isListEntry:n,clearAll:o,context:i}=r.payload;return o?(g.deleteIn(e,[i,d.CONTEXT_DATA]),e):n?Fle(e,r):jle(e,r)}).addCase(Ws,(e,r)=>{let{messages:n,property:o,pageReference:i,context:s,category:a}=r.payload,c=Qn(o,i,a);n&&n.length>0&&Array.isArray(n)&&c&&c.length>0&&g.setIn(e[s],Qn(o,i,a),n)})}),E0=Wle;var uB=(t,e,r,n,o)=>{g.setIn(t[e],[...r,n],o)},Kle=(t,e,r,n,o)=>{let i=xt(g.getIn(t[e],[...r,n],{}),o);g.setIn(t[e],[...r,n],i)},Jle=(t,e,r,n,o)=>{let i=g.getIn(t[e],r,[]);typeof n=="string"?delete i[n]:i.splice(n,1),g.setIn(t[e],r,i),be.deleteListNode(e,[o],i.length)},Yle=(t,e,r,n,o)=>{if(n===o)return;let i=g.getIn(t[e],[...r,n],{}),s=g.getIn(t[e],r,[]);s.splice(n,1),s.splice(o,0,i),g.setIn(t[e],r,s),Uj(t,e,r?.join("."),n,o)},Zle=(t,e,r,n)=>{let o=g.getIn(t[e],r)||[],i=!1;n.forEach(s=>{let{instruction:a,content:c,listIndex:l}=s;a===d.LIST_ACTIONS.SELECT?(o[l]=c,i=!0):delete o[l]}),i&&ta(e,r?.join(".")),g.setIn(t[e],r,o.filter(Boolean))},Qle=(t,e,r)=>{g.setIn(t[e],r,[])},Xle=(t,e,r,n)=>{g.setIn(t[e],r,n)},eue=(t,e,r)=>{g.setIn(t[e],r,{})},tue=Oi({},t=>{t.addCase(mo,(e,r)=>{let{instruction:n,actions:o,context:i,referenceList:s,listIndex:a,groupIndex:c,listMoveToIndex:l,content:u={}}=r.payload,p=oo(s);switch(n){case d.LIST_ACTIONS.ADD:uB(e,i,p,c,u);break;case d.LIST_ACTIONS.INSERT:uB(e,i,p,a,u);break;case d.LIST_ACTIONS.UPDATE:Kle(e,i,p,a??c,u);break;case d.LIST_ACTIONS.DELETE:Jle(e,i,p,a??c,s);break;case d.LIST_ACTIONS.MOVE:Yle(e,i,p,a,l);break;case d.LIST_ACTIONS_TYPE.SELECT_DESELECT:Zle(e,i,p,o);break;case d.LIST_ACTIONS_TYPE.DESELECT_ALL:Qle(e,i,p);break;case d.LIST_ACTIONS.REPLACE:Xle(e,i,p,u);break;case d.LIST_ACTIONS.DELETEPAGE:eue(e,i,p);break;default:break}})}),dB=tue;var pB=(t,e)=>{if(t||(t=Qh().data),e.type===Ks)return Qh().data;switch(e.type){case Er:case _t:case lc:case Zl:case Us:case Ro:case js:case Jl:case Xo:case ru:case mc:case nu:return rB(t,e);case Te:case Wn:case Ws:return E0(t,e);case kt:return E0(S0(t,e),e);case Et:case Ze:case Yo:case Hs:case et:case mn:case Fs:case Zo:case Qo:case Vs:case po:case zi:case Bs:case Yl:case Xl:return S0(t,e);case mo:return dB(t,e);default:return t}};var mB={},A0=(t,e=[])=>{e.forEach(r=>{g.deleteIn(t,[r])})},rue=(t,e,r,n)=>{t===""&&g.deleteIn(e,[r,"items",n,"key"])},nue=(t,e,r,n,o)=>{n||(o?g.setIn(t,[e,"items",r,"pageName"],o):g.deleteIn(t,[e,"items",r,"pageName"]))},C0=(t,e)=>{let{type:r,payload:n}=e,o=r===kt,{target:i,context:s,semanticURL:a="",root:c,containerItemID:l,childContainers:u,flowName:p,resourceType:m="",key:f="",clearView:h=!1,pageName:S}=n;return c?g.setIn(t,[i,"items",l,"view"],c):h&&g.deleteIn(t,[i,"items",l,"view"]),s&&g.setIn(t,[i,"items",l,"context"],s),p&&g.setIn(t,[i,"items",l,"flowName"],p),(!o||o&&f)&&g.setIn(t,[i,"items",l,"key"],f.trim()),rue(f,t,i,l),(!o||o&&a)&&g.setIn(t,[i,"items",l,"semanticURL"],a),(!o||o&&m)&&g.setIn(t,[i,"items",l,"resourceType"],m),nue(t,i,l,o,S),A0(t,u),t},oue=({prevItems:t,prevAccessedOrder:e,containerItemID:r,root:n,semanticURL:o,key:i,flowName:s,readOnly:a,context:c,isInCreateStage:l,resourceType:u,actionName:p,isMinimizable:m,isBulkAction:f,showProgress:h,progressMessage:S,modalOptions:A,isTraditionalRemoteCase:C,resourceStatus:_,hideDefaultActionButtons:I,referenceList:N,subscriptName:x,subscriptFieldName:H,pageGroupName:G,isPageGroup:ne,index:j,actionID:oe,acTertiary:Ie,isMultiRecordData:he,parentContext:De,isDeleteConfirmation:Fe,workId:_e,caseTypeID:Ye,className:Oe,keys:ft,enableBackNavigation:Qt,heading:yr,pageName:Xt})=>({accessedOrder:[...e,r],items:{...t,[r]:{view:n,semanticURL:o,key:i,flowName:s,readOnly:a,context:c,isInCreateStage:l,resourceType:u,actionName:p,isMinimizable:m,...f&&{isBulkAction:f},showProgress:h,progressMessage:S,modalOptions:A,isTraditionalRemoteCase:C,resourceStatus:_,...I&&{hideDefaultActionButtons:I},referenceList:N,subscriptName:x,subscriptFieldName:H,pageGroupName:G,isPageGroup:ne,index:j,...oe&&{actionID:oe},...Ie&&{acTertiary:Ie},...he&&{isMultiRecordData:he},...De&&{parentContext:De},...Xt&&{pageName:Xt},...Fe&&{isDeleteConfirmation:Fe,workId:_e,caseTypeID:Ye,className:Oe,keys:ft,enableBackNavigation:Qt},heading:yr}}}),iue=(t,e)=>{let{target:r,context:n,isInCreateStage:o,isBulkAction:i,semanticURL:s,root:a,containerItemID:c,actionMgrID:l,key:u,flowName:p,resourceType:m,actionName:f,isMinimizable:h,showProgress:S,progressMessage:A,modalOptions:C,resourceStatus:_,hideDefaultActionButtons:I,actionID:N,isMultiRecordData:x,acTertiary:H,parentContext:G,heading:ne,isTraditionalRemoteCase:j,readOnly:oe,referenceList:Ie,subscriptName:he,subscriptFieldName:De,pageGroupName:Fe,isPageGroup:_e,index:Ye,isDeleteConfirmation:Oe,workId:ft,caseTypeID:Qt,className:yr,keys:Xt,enableBackNavigation:un,pageName:bo}=e.payload,Rr=t[r],Vn=Rr&&Rr.type,Kr=Rr&&Rr.accessedOrder||[],Ft=Rr&&Rr.items||{};if(t[r]&&Vn==="single"&&Kr.length>0){C0(t,e);return}let ao=oue({prevItems:Ft,prevAccessedOrder:Kr,containerItemID:c,root:a,semanticURL:s,key:u,flowName:p,readOnly:oe,context:n,isInCreateStage:o,resourceType:m,actionName:f,isMinimizable:h,isBulkAction:i,showProgress:S,progressMessage:A,modalOptions:C,isTraditionalRemoteCase:j,resourceStatus:_,hideDefaultActionButtons:I,referenceList:Ie,subscriptName:he,subscriptFieldName:De,pageGroupName:Fe,isPageGroup:_e,index:Ye,actionID:N,acTertiary:H,isMultiRecordData:x,parentContext:G,isDeleteConfirmation:Oe,workId:ft,caseTypeID:Qt,className:yr,keys:Xt,enableBackNavigation:un,heading:ne,pageName:bo});w.resolveActionByID(l,null,!1),t[r]||(t[r]={accessedOrder:[],items:{}},Vn!==void 0&&(t[r].type=Vn)),g.setIn(t,[r,"accessedOrder"],ao.accessedOrder),g.setIn(t,[r,"items",c],ao.items[c])},sue=(t,e,r)=>{let n=t&&t[e]?.type,o=t&&t[e]?.accessedOrder||[];return n==="single"?o.length>0?o:[...o,r]:o.includes(r)?o:[...o,r]},aue=(t,e)=>{let{actionMgrID:r,data:n,target:o,containerItemID:i}=e.payload,s=t;try{let a=sue(t,o,i);g.setIn(t,[o,"items",i,"transientItems"],[]),g.setIn(t,[o,"accessedOrder"],a),s=C0(t,e),w.resolveActionByID(r,n,!1)}catch{w.rejectActionByID(r,!1)}return s},cue=Oi(mB,t=>{t.addCase(Ks,()=>mB).addCase(Ql,(e,r)=>{let{context:n,name:o,type:i,actionMgrID:s}=r.payload,a=`${n}/${o}`;if(w.resolveActionByID(s,null,!1),e[a])return e;g.setIn(e,[a],{type:i,accessedOrder:[],items:{}})}).addCase(sS,(e,r)=>{let{containerName:n,childContainers:o=[]}=r.payload;g.deleteIn(e,[n]),o.forEach(i=>{g.deleteIn(e,[i])})}).addCase(Yo,(e,r)=>{let{context:n,name:o,actionMgrID:i,childContainers:s}=r.payload,a=`${n}/${o}`;w.resolveActionByID(i,null,!1),g.setIn(e,[a,"accessedOrder"],[]),g.setIn(e,[a,"items"],{}),Array.isArray(s)&&s.forEach(c=>{g.deleteIn(e,[c])})}).addCase(Et,(e,r)=>{iue(e,r)}).addCase(kt,(e,r)=>{let{actionMgrID:n,data:o}=r.payload;try{C0(e,r),w.resolveActionByID(n,o,!1)}catch{w.rejectActionByID(n,!1)}}).addCase(et,(e,r)=>aue(e,r)).addCase(or,(e,r)=>{let{target:n,containerItemID:o,actionMgrID:i}=r.payload;try{let s=g.getIn(e,[n,"accessedOrder"]).filter(a=>a!==o);s.push(o),g.setIn(e,[n,"accessedOrder"],s),w.resolveActionByID(i,null,!1)}catch{w.rejectActionByID(i,!1)}}).addCase(Hs,(e,r)=>{let{target:n,containerItemID:o,actionMgrID:i,childContainers:s}=r.payload;try{let a=g.getIn(e,[n,"accessedOrder"]).filter(c=>c!==o);g.setIn(e,[n,"accessedOrder"],a),g.deleteIn(e,[n,"items",o]),A0(e,s),w.resolveActionByID(i,null,!1)}catch{w.rejectActionByID(i,!1)}}).addCase(Ze,(e,r)=>{let{target:n,containerItemID:o,actionMgrID:i,childContainers:s}=r.payload;try{let a=g.getIn(e,[n,"accessedOrder"]).filter(c=>c!==o);g.setIn(e,[n,"accessedOrder"],a),g.deleteIn(e,[n,"items",o]),A0(e,s),w.resolveActionByID(i,null,!1)}catch{w.rejectActionByID(i,!1)}}).addCase(Fs,(e,r)=>{let{transientItemID:n,target:o,contextName:i}=r.payload,s=g.getIn(e,[o,"items",i,"transientItems"])??[];g.setIn(e,[o,"items",i,"transientItems"],[...s,n])}).addCase(Qo,(e,r)=>{let{target:n,containerItemID:o}=r.payload;g.deleteIn(e,[n,"items",o,"transientItems"])}).addCase(Zo,(e,r)=>{let{target:n,transientItemID:o,containerItemID:i}=r.payload,a=(g.getIn(e,[n,"items",i,"transientItems"])??[]).filter(c=>c!==o);g.setIn(e,[n,"items",i,"transientItems"],a)})}),fB=cue;var gB={},Qh=()=>gB,lue=t=>{let e=t.Data||t.data,{uiResources:r={}}=t,n=r[d.CONTEXT_DATA]||t[d.CONTEXT_DATA];gB={data:{locale:v.getLocale(),[d.APP.APP]:{...e,[d.CONTEXT_DATA]:n}},containers:{}}},hB=t=>(lue(t),{data:pB,containers:fB});var I0=(t,e=!1)=>t===d.ACTION?e?jt.REFRESH_CASE_DATA:jt.REFRESH_ASSIGNMENT_DATA:jt.REFRESH_CASE_VIEW,_0=(t,e,r)=>{let n=[];e&&r&&n.push({page:e,actionID:r});let o=t;for(;o;){let i=J.getPropertyValue(d.CONTEXT_DATA_MODAL_VIEW.CONTEXT_DATA_MODAL_VIEW,"",o);if(!i?.isMultiRecordData||i.editType!==d.ACTION||!i.interestPage||!i.interestPageActionID)break;i.interestPage!==e&&n.unshift({page:i.interestPage,actionID:i.interestPageActionID}),o=i.parentContext}return n},t_=t=>{let{context:e}=t,n={...Rt(e,{skipUUID:!1}).content,contextData:!1},o=Nu(e);g.isEmpty(o)||(n=wc(o,n));let i=I0(t.editType,t.isLocalAction),{restApi:s,reqType:a}=U(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}`,n.interestPageActionID=t.interestPageActionID,v.isInfinityRuntime()&&(n.actionIdArrayToBeProcessed=_0(e,t.interestPage,t.interestPageActionID))),n.interestPage=t.interestPage,q(M(c,{method:a,body:n,headers:t.headers},e)).pipe(O(l=>({actionInPayload:t,response:l.data,headers:$e(l.headers)})),me(": Error occurred during ajax call : ",e))};var r_=[d.CASE_INFO.CASE_INFO_CONTENT,d.OBJECT_INFO.OBJECT_INFO_CONTENT],uue=(t,e)=>`${r_.find(n=>g.hasIn(t,n))??d.CASE_INFO.CASE_INFO_CONTENT}${g.convertClipboardPageToPageRefNotation(e)}`,b0=async(t,e)=>{let{context:r,serverPrecedenceFields:n,requestType:o}=e,i=Bt.getTargetViewContainerName(Rn),s=Z(i,r),a={acName:s,context:r},c=Le(t,{[E.STOPMERGEACTIONS]:!0,[E.ACTIONS.DELETEAVIALACTIONS]:!0});c.directUrlUpdation=!1,o===jt.REFRESH&&await Pe(c,e,a);let u=Me(c,{target:s,context:r});e.interestPage&&(u.interestPath=uue(u.data,e.interestPage)),u.isArrayDeepMerge=e.options?.isArrayDeepMerge,u.preserveClientChanges=e.options?.preserveClientChanges!==void 0?e.options.preserveClientChanges:!0;let p=B.getPropertiesToReArrange(r);return{payload:u,mergeOptions:{serverPrecedenceFields:n,propertiesToReArrange:p}}},yB=async(t,e)=>{let{context:r}=e,{payload:n,mergeOptions:o}=await b0(t,e),i=V(Re,n,o),s=i.payload?.data?.pageInstructions;return s?.length>0&&(delete i.payload?.data?.pageInstructions,ke.mergeServerPageInstructions(r,s)),T(i),n};var due=()=>{let t=`${d.APP.APP}/${d.PRIMARY}`,e=se(t);return(e?Ar(`${e}/${d.WORKAREA}`):null)??Ar(t)},SB=async t=>{let e=due();if(!e)return;let{data:r}=kx(t);typeof r!="object"||r===null||await yB(r,{context:e,serverPrecedenceFields:[],requestType:jt.REFRESH})};var v0=t=>typeof t=="object"&&t!==null&&!Array.isArray(t),EB=t=>v0(t)||t===void 0||t===null,AB=t=>v0(t)?t:void 0,T0=(t,e)=>t===e||t.startsWith(`${e}.`)||t.startsWith(`${e}[`),CB=(t,e,r,n,o=[])=>{let i={stalePaths:[],conflictPaths:[]},s=(c,l,u,p)=>{o.some(m=>T0(p,m)||T0(m,p))||lo(u,l)||(lo(c,l)?i.stalePaths.push(p):lo(c,u)||i.conflictPaths.push(p))},a=(c,l,u,p)=>{if(!(l===u||o.some(m=>T0(p,m)))){if(v0(c)&&EB(l)&&EB(u)){Object.keys(c).forEach(m=>{a(c[m],AB(l)?.[m],AB(u)?.[m],`${p}.${m}`)});return}Array.isArray(c)||Array.isArray(l)||Array.isArray(u)||s(c,l,u,p)}};return a(t,e,r,n),i};var Is={},{VIEW:pue,FIELD:mue}=d.CONTEXT_TREE_NODE_TYPES,fue=["refreshFor","propertyName","optionalPayload","resetForm","skipPayloadGeneration","isFillFormWithAI"],o_={},i_={},s_={},P0={},a_={},c_={},N0=new Set,IB=0,gue=(t,e)=>{let r=[];return Object.keys(t).forEach(n=>{(!Object.hasOwn(e,n)||e[n]!==t[n])&&r.push(n)}),r},_B=t=>{let e=kh(t.context);return{changedPropertyValues:e,preserveFields:t.preRequestSnapshot?gue(e,t.preRequestSnapshot):[]}},hue=t=>{if(!t)return;let e=a_[t];return delete a_[t],e},yue=t=>{if(!t)return;let e=c_[t];return delete c_[t],e},Sue=(t,e)=>{let r=t.mergePayload?.preserveClientChanges===!1?e.preserveFields:Object.keys(e.changedPropertyValues),{serverPrecedenceFields:n}=t.mergeOptions,o=(n??[]).flatMap(i=>r_.map(s=>`${s}.${i}`));return[...r,...o]},Eue=t=>typeof t=="object"&&t!==null?JSON.parse(JSON.stringify(t)):t,Aue=(t,e)=>{let r=t.mergePayload?.data;if(t.preRequestData===void 0||!r)return!1;let n=W(t.context),o=t.mergePayload.interestPath?[t.mergePayload.interestPath]:r_,i=Sue(t,e),s=!1;return o.forEach(a=>{let c=g.getIn(r,a);if(c===void 0)return;let{stalePaths:l,conflictPaths:u}=CB(c,g.getIn(t.preRequestData,a),g.getIn(n,a),a,i);l.forEach(p=>{let m=g.getIn(n,p);m===void 0?g.deleteIn(r,p):g.setIn(r,p,Eue(m))}),(l.length>0||u.length>0)&&(s=!0)}),s},Cue=t=>{let e=w.getNextActionMgrId(),r={...t.options,actionMgrID:e};fue.forEach(n=>{delete r[n]}),N0.add(e),T(la({...t,options:r}))},Iue=t=>t.some(r=>r.isReconciliation)?void 0:[...t].reverse().find(r=>{let n={...r.actionConfig?.options};return r.actionConfig&&!n.isFillFormWithAI})?.actionConfig,bB=t=>t.actionConfig?.actionType===fc,_ue=t=>{let e=0,r=()=>{},n=new Promise(o=>{r=o});return $.publish(E.PUB_SUB_EVENTS.ON_FILL_FORM_WITH_AI_COMPLETE,{context:t,registerField:()=>{e+=1},deregisterField:()=>{e-=1,e===0&&r()}}),e===0&&r(),n},TB=async t=>{bB(t)&&(await _ue(t.context),t.actionMgrID&&w.resolveActionByID(t.actionMgrID,t.mergePayload)),Ct.deRegisterBlockingAction(t.context).catch(()=>{})},vB=(t,e,r)=>{let n=e&&Aue(t,r),{preserveFields:o}=r,i=o.length>0?{...t.mergeOptions,preserveFields:o}:t.mergeOptions,s=V(Re,t.mergePayload,i),a=g.getIn(s,"payload.data.pageInstructions");return a&&a.length>0&&(delete s.payload?.data?.pageInstructions,ke.mergeServerPageInstructions(t.context,a)),T(s),t.actionMgrID&&!bB(t)&&w.resolveActionByID(t.actionMgrID,t.mergePayload),n},bue=t=>{delete i_[t];let e=o_[t];if(delete o_[t],!e||e.length===0)return;e.sort((a,c)=>a.seq-c.seq);let r=e.length>1,n=!1,o=new Set;e.map(a=>({item:a,changeState:_B(a)})).forEach(({item:a,changeState:c})=>{n=vB(a,r,c)||n,o.add(a.context)}),o.forEach(a=>{$.publish(E.PUB_SUB_EVENTS.ON_REFRESH_COMPLETE,{context:a})});let s=n?Iue(e):void 0;s&&Cue(s),e.forEach(TB)},Tue=(t,e,r)=>{if(!t)return;s_[t]=e,IB+=1,P0[t]=IB,a_[t]=kh(r),c_[t]=W(r),(i_[e]??(i_[e]=new Set)).add(t)},vue=t=>t?P0[t]??0:0,R0=t=>{if(!t)return;let e=s_[t];if(!e)return;delete s_[t],delete P0[t],delete a_[t],delete c_[t],N0.delete(t);let r=i_[e];r&&(r.delete(t),r.size===0&&bue(e))},Rue=t=>(vB(t,!1,_B(t)),$.publish(E.PUB_SUB_EVENTS.ON_REFRESH_COMPLETE,{context:t.context}),TB(t)),Pue=t=>{let{ID:e,actionID:r,context:n}=t;return`${e}.${n}.${r}`},Nue=(t,e,r)=>{let n=e.value.data[r]?.objectInfo?.headers,o=e.value.data[r]?.caseInfo?.headers;return!B.shouldUseUnifiedHandling()&&t&&n?n:o},Oue=t=>{let{reqHeaders:e}=t;e&&(t.headers=t.headers||{},e.etag&&(t.headers["if-match"]=e.etag))},xue=t=>(yt()||nV(t)>0)&&Is[t],Due=(t,e,r)=>{let{mcpAction:n,body:o}=t;return n&&yt()&&YC({body:o,responseType:t.responseType})?tr(n.actionName,{queryPayload:n.queryPayload,body:ZC(o),headers:ai({headers:t.headers,body:o},e)},t.cancelConfig?.token):M(t.url,t,e,{cancelContext:r})},wue=(t,e)=>{let r=[];for(let n=0;n<Is[t].length;){let o=Is[t][n],i=dj(o,e);if(i===kT)return!1;i===!0&&(r.push(n),o.cancelConfig?.cancel()),n+=1}for(let n=r.length-1;n>=0;n-=1)Is[t].splice(r[n],1);return!0},$ue=(t,e)=>{let{context:r}=t;Oue(t);let n=Pue(e);if(e.interestPage&&(t.interestPage=e.interestPage),xue(n)&&!wue(n,t)){let i=Object.assign(new Error,{code:"ERR_CANCELED"});return Promise.reject(i)}let o=hu();return t.signal=o.token,t.cancelConfig=o,Is[n]?Is[n].push(t):Is[n]=[t],$.publish(E.PUB_SUB_EVENTS.ON_REFRESH_START,{context:r}),jm()&&Tue(e.options?.actionMgrID,n,r),Due(t,r,n).then(i=>(delete Is[n],i)).catch(i=>{throw i&&i.code!=="ERR_CANCELED"&&delete Is[n],i})},n_=(t,e)=>({routeKey:t,restAPI:U(t,e)}),Mue=(t,e)=>{let{isObjectType:r,isExternalObject:n,actionID:o,context:i,isExternalCase:s,casetypeID:a}=t,c=d.getDefaultQualifiedName(d.VIEW_NAMES.OBJECT_CREATE_VIEW);if(e||r&&MT(i)){let l=n&&o===c?jt.REFRESH_EXTERNAL_OBJECT:jt.REFRESH_CASE_DATA,u=B.shouldUseUnifiedHandling();return n&&o===c&&u&&(l=jt.REFRESH_EXTERNAL_CASE_DATA),n_(l,t)}return n_(s&&a&&o===c?jt.REFRESH_EXTERNAL_CASE_DATA:jt.REFRESH_ASSIGNMENT_DATA,t)},kue=(t,e,r,n,o)=>{o={...o,calculations:{fields:e,whens:r}};let{routeKey:i,restAPI:s}=n_(n?jt.RECALCULATE_CASE_DATA:jt.RECALCULATE_ASSIGNMENT_DATA,t),a=jt.RECALCULATE;return{routeKey:i,restAPI:s,requestBody:o,requestType:a}},Lue=(t,e)=>{let{caseWideAction:r,caseViewAction:n,fieldsWithDeclarativeTargets:o,fieldsWithWhen:i,isViewsWithWhen:s,interestPage:a,options:c,isMultiRecordData:l,editType:u,isLocalAction:p,interestPageActionID:m,context:f}=t,{optionalPayload:h}=c;h&&(e.content={...h});let S,A={},C={...e},_=jt.REFRESH;return n||l&&u===d.ACTION?(S=I0(u,p),l&&u===d.ACTION&&(C.interestPageActionID=m,v.isInfinityRuntime()&&(C.actionIdArrayToBeProcessed=_0(f))),A=U(S,t),C={...C,interestPage:a}):s||c.refreshFor?{routeKey:S,restAPI:A}=Mue(t,r):(o.length>0||i.length>0)&&({routeKey:S,restAPI:A,requestBody:C,requestType:_}=kue(t,o,i,r,C)),{routeKey:S,restAPI:A,requestBody:C,requestType:_}},Uue=(t,e,r,n,o)=>{let i=lt(t,e);if(!i||i.dataRetrievalType!=="copy")return;let s=g.getIn(r,`content.content.${t}`);if(!s||typeof s!="object")return;(n?Object.keys(s).filter(c=>c!==n):Object.keys(s)).length>0&&o.push(t)},jue=(t,e)=>t.pipe(ee(jt.REFRESH_DATA,fc),O(r=>{let n=r.payload;return n.actionType=r.type,n}),ri(r=>!bu(r?.options?.actionMgrID)),z(r=>{let{context:n,contextData:o,options:i,isObjectType:s}=r,{propertyName:a="",classID:c="",isObjectWideAction:l,skipPayloadGeneration:u}=i,p=u?{content:{}}:Rt(n,{skipUUID:!1,isObjectWideAction:l}),m=[],f=[],h=!1;v.getFeatureMap().granularUIRefresh?({fieldsWithDeclarativeTargets:m=[],whens:f=[]}=mj(n),h=f.some(Oe=>Oe.type===pue)):h=!0;let A=f.filter(Oe=>Oe.type===mue),C=g.getPropertyName(a),_=C?C.split("."):[],I=_.pop(),N=_.join("."),x=[];N&&Uue(N,c,p,I,x),r.serverPrecedenceFields=x;let H={...p.content,contextData:o},G=Nu(n);g.isEmpty(G)||(H=wc(G,H));let ne=Lue({...r,fieldsWithDeclarativeTargets:m,fieldsWithWhen:A,isViewsWithWhen:h},H);Ct.registerBlockingAction(n).catch(()=>{});let{routeKey:j,restAPI:oe,requestBody:Ie,requestType:he}=ne;r={...r,requestType:he},r.requestType=he;let{reqType:De,restApi:Fe}=oe,_e={...Nue(s,e,n)};_e&&!_e.etag&&r.isMultiRecordData&&r.editType===d.ACTION&&(_e.etag=g.getETag(r.context));let Ye={reqHeaders:_e,context:n,method:De,body:Ie,url:lj(r,Fe),...j&&{mcpAction:{actionName:j,queryPayload:uj(r)}}};return q($ue(Ye,r)).pipe(O(Oe=>{let ft=pj(Oe?.data,i?.classID,s);return i?.resetForm&&be.removeContextTreeNode(n),{response:{...ft},actionConfig:r,actionMgrID:r.options.actionMgrID,headers:$e(Oe.headers)}}),me(": Error occurred during fetch call at refreshData Epic : ",r.context,r?.options?.actionMgrID))}),z(async r=>{if(r&&r.type===Te)return Ct.deRegisterBlockingAction(r.payload?.context).catch(()=>{}),r.payload?.err?.code==="ERR_CANCELED"?(R0(r.payload?.actionMgrID),[]):($.publish(d.ON_REFRESH_ERROR,{context:r.payload?.context}),R0(r.payload?.actionMgrID),ue(r));let{actionConfig:n,response:o,actionMgrID:i}=r,{context:s}=n,{payload:a,mergeOptions:c}=await b0(o,n),l=i?s_[i]:void 0,u={seq:vue(i),actionMgrID:i,context:s,mergePayload:a,mergeOptions:c,preRequestSnapshot:hue(i),preRequestData:yue(i),actionConfig:n,isReconciliation:N0.has(i)};return l?(o_[l]??(o_[l]=[])).push(u):await Rue(u),R0(i),[]}));x4(t=>{SB(t).catch(e=>{console.error("Failed to merge MCP tool result into the store",e)})});var zue=[jue],RB=zue;var Fue=t=>t.pipe(ee(pS),z(async e=>{let{context:r}=e.payload,n={},o={},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=jo()[c.name];if(p&&a in p){let m=p[a],{loadTime:f}=m;if(!ir.isTimeElapsed(f,l,u))return}}return ir.getData(c.name,{dataViewParameters:c.dataViewParameters},r).then(l=>{let u=c.mode===d.READONLY?o:n,p=P.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(n).length&&s.push(Re({context:r,data:n})),Object.keys(o).length&&s.push(Vw({data:o,context:r})),T(s),[]})),Vue=[Fue],PB=Vue;var Bue=t=>typeof t=="object"&&t!==null&&"ID"in t&&typeof t.ID=="string"&&"state"in t&&typeof t.state=="string",O0=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 Or().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 r=Object.entries(e?.message??{})[0];if(!r)return null;let[n,o]=r;if(typeof o=="string")return{userID:n,state:this.normalizeInteractionState(o),eventType:o};if(typeof o!="object"||o===null||!("state"in o)||typeof o.state!="string")return null;let i=this.normalizeInteractionState(o.state),s="assignmentId"in o&&typeof o.assignmentId=="string"&&o.assignmentId||("assignmentID"in o&&typeof o.assignmentID=="string"?o.assignmentID:void 0);return{userID:n,state:i,eventType:o.state,assignmentId:s}}static init(e){e&&(this.collabConfig=e)}static isCollaborationEnabled(){return!!(t.collabConfig?.appEnabled&&t.collabConfig?.portalEnabled)}static isLaunchpadRuntime(){return!v.isInfinityRuntime()}static dispatchCollaboratorAction=(e,r,n,o,i)=>{T({type:"LIST_ACTION",payload:{instruction:e,context:r,referenceList:o,listIndex:n,content:i,skipDirtyValidation:!0,skipRefresh:!0}})};static handleCaseCollaboratorsUpdate(e,r,n){let o=this.getCollaborationState(n);if(!o)return;let{userID:i,state:s,eventType:a,assignmentId:c}=o;if(i===v.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=[r,this.caseContextById[e],...this.getAssignmentContextsForCase(e)].filter(h=>!!h);new Set([...m,...m.map(h=>qe(h))]).forEach(h=>{let S=re(d.CASE_INFO.CASE_INFO_COLLABORATORS,"",h)||[],A=S.findIndex(C=>C.ID===i);A!==-1?l?this.dispatchCollaboratorAction("DELETE",h,A,d.CASE_INFO.CASE_INFO_COLLABORATORS,null):this.dispatchCollaboratorAction("REPLACE",h,null,`${d.CASE_INFO.CASE_INFO_COLLABORATORS}[${A}]`,p):l||this.dispatchCollaboratorAction("INSERT",h,S.length,d.CASE_INFO.CASE_INFO_COLLABORATORS,p)}),this.isLaunchpadRuntime()&&this.updateLaunchpadCollaborationState(e,s,c)}static updateLaunchpadCollaborationState(e,r,n){let o=this.getAssignmentContextsForCase(e);this.ASSIGNMENT_AWARE_STATES.has(r)&&((r==="saved"||r==="submitted")&&(this.pendingActionStateByCaseId[e]={state:r,assignmentId:n}),o.forEach(a=>this.updateStaleState(a,r,n)));let i=this.getRemoteEditorCount(e),s=this.pendingActionStateByCaseId[e];o.forEach(a=>{this.refreshCollaborationBanner(a,i,s)})}static getCaseIdFromContext(e){let r=re(d.CASE_INFO.CASE_INFO_ID,"",e);return typeof r=="string"&&r?r:void 0}static resolveCaseIdForAssignmentContext(e,r){if(r){let n=this.getCaseIdFromContext(r);if(n)return n;let o=this.caseIdByAssignmentContext[r];if(o)return o}return e}static getAssignmentContextsForCase(e){let r=this.assignmentContextsByCaseId[e]??[];if(r.length>0)return r;let n=[];return Object.entries(this.caseIdByAssignmentContext).forEach(([o,i])=>{(i===e||this.getCaseIdFromContext(o)===e)&&n.push(o)}),n}static getMessageTypeForBanner(e){return e.endsWith("-error")||e==="stale-assignment"?this.ERROR_TYPE:e==="stale-data"?this.STALE_DATA_TYPE:e}static clearCurrentBanner(e,r){dt({category:this.PAGE_CATEGORY,context:e,type:this.getMessageTypeForBanner(r)})}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)||re(d.CASE_INFO.IS_LOCAL_ACTION,"",e)===!0}static isAssignmentContext(e){return e.includes(d.WORKAREA)||e.includes(d.MODAL)}static restoreCollaboratorsFromContext(e,r){if(this.editorStateByCaseId[e])return;let n=[r,qe(r)],o;for(let a of n)if(o=re(d.CASE_INFO.CASE_INFO_COLLABORATORS,"",a),Array.isArray(o))break;if(!Array.isArray(o))return;let i=v.getOperatorIdentifier(),s={};o.forEach(a=>{if(!Bue(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,r,n,o){if(this.DEPARTURE_STATES.has(o)){this.respondedToViewOpenByCaseId[e]?.delete(r);return}if(n!==this.VIEW_OPEN&&o!=="viewing")return;let i=this.respondedToViewOpenByCaseId[e]??new Set;if(this.respondedToViewOpenByCaseId[e]=i,i.has(r))return;let s=this.localInteractionStateByCaseId[e];if(!s)return;i.add(r);let a=s===this.EDITING_STATE?this.EDIT_OPEN:this.VIEW_OPEN;this.publishCaseEvent(a,e)}static updateStaleState(e,r,n){if(!this.isLaunchpadRuntime())return;let o=n?this.assignmentIdByContext[e]===n:!1,i=!this.isLocalActionContext(e)&&o&&(r==="submitted"||r==="stage_changed");if(wu(e)&&!i)return;let{bannerType:s,messageType:a,message:c}=this.getStaleBannerDetails(i),l=this.collaborationBannerByContext[e];l!==s&&(l&&this.clearCurrentBanner(e,l),Nn({category:this.PAGE_CATEGORY,context:e,messages:[{type:a,message:c}]}),this.collaborationBannerByContext[e]=s,i?(YT(e,!0),this.hideAssignmentActions(e)):YT(e,!1))}static hideAssignmentActions(e){if(!this.isLaunchpadRuntime()||!W(e))return;let r=re(d.CASE_INFO.ACTION_BUTTONS,"",e),n=Array.isArray(r?.main)?r.main:[],o=Array.isArray(r?.secondary)?r.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"};T({type:_t,payload:{context:e,reference:d.CASE_INFO.ACTION_BUTTONS,value:{main:n.filter(s=>i(s)),secondary:o.filter(s=>i(s))}}})}static isAssignmentStale(e){return wu(e)}static isContextStale(e){return bE(e)}static getMatchingPendingAction(e,r){let n=typeof r=="string"?{state:r}:r,o=this.assignmentIdByContext[e];if(n&&(!n.assignmentId||n.assignmentId===o))return n}static refreshCollaborationBanner(e,r,n){if(!this.isLaunchpadRuntime())return;let o=this.getMatchingPendingAction(e,n);if(o){let i=this.collaborationBannerByContext[e];if(i==="stale-data"||i==="stale-assignment")return;let s=o.state==="submitted"?"submitted-error":"saved-error";if(this.collaborationBannerByContext[e]!==s){let a=this.ACTION_STATE_MESSAGES[o.state];a&&this.showActionBanner(e,this.getLocalizedMessage(a),o.state)}return}this.updateCollaborationBanner(e,r)}static getRemoteEditorCount(e){let r=this.editorStateByCaseId[e]??{};return Object.values(r).filter(n=>n===this.EDITING_STATE).length}static clearPendingActionStates(e){delete this.pendingActionStateByCaseId[e]}static isCaseStillLoaded(e){let r=this.caseContextById[e];return r?re(d.CASE_INFO.CASE_INFO_ID,"",r)===e:!1}static updateCollaborationBanner(e,r){let n=this.collaborationBannerByContext[e];this.isAssignmentStale(e)||n==="stale-data"||(r>0?((n==="saved-error"||n==="submitted-error")&&dt({category:this.PAGE_CATEGORY,context:e,type:this.ERROR_TYPE}),n===this.INFO_TYPE&&dt({category:this.PAGE_CATEGORY,context:e,type:this.INFO_TYPE}),Nn({category:this.PAGE_CATEGORY,context:e,messages:[{type:this.WARNING_TYPE,message:this.getLocalizedMessage(this.EDIT_WARNING_MESSAGE)}]}),this.collaborationBannerByContext[e]=this.WARNING_TYPE):(n===this.WARNING_TYPE||n==="saved-error"||n==="submitted-error")&&(dt({category:this.PAGE_CATEGORY,context:e,type:n===this.WARNING_TYPE?this.WARNING_TYPE:this.ERROR_TYPE}),Nn({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 r=this.collaborationBannerByContext[e];r&&(this.clearCurrentBanner(e,r),kj(e),delete this.collaborationBannerByContext[e])}static showActionBanner(e,r,n){let o=this.collaborationBannerByContext[e];o&&this.clearCurrentBanner(e,o),Nn({category:this.PAGE_CATEGORY,context:e,messages:[{type:this.ERROR_TYPE,message:r}]}),this.collaborationBannerByContext[e]=n==="submitted"?"submitted-error":"saved-error"}static handleLocalSubmit=e=>{let r=e?.caseID;if(!r)return;this.pendingSaveCaseIds.add(r);let n=e.assignmentId||(e.context?re(d.CASE_INFO.ASSIGNMENT_ID,"",e.context):void 0),o=e.isModalAction===!0&&e.isModalLaunchedFromPrimaryValue===!0,i=e.isLocalAction===!0||o;i||(this.suppressEditingWarningOnNextAssignmentLoadByCaseId[r]=!0),this.publishCaseEvent(i?this.EDIT_SAVE:this.EDIT_SUBMIT,r,n)};static handleLocalSave=e=>{let r=e?.caseID||(e?.context?re(d.CASE_INFO.CASE_INFO_ID,"",e.context):"");if(!r)return;this.pendingSaveCaseIds.add(r);let n=e.assignmentID;this.publishCaseEvent(this.EDIT_SAVE,r,n)};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:r,actionInContext:n}=e??{};if(!n||!this.isAssignmentContext(n))return;let o=this.resolveCaseIdForAssignmentContext(r,n);if(!o)return;this.caseCollabSubIds[o]||this.subscribeToCollaborators(o,n),this.pendingSaveCaseIds.delete(o),this.restoreCollaboratorsFromContext(o,n);let i=this.getRemoteEditorCount(o);this.suppressEditingWarningOnNextAssignmentLoadByCaseId[o]&&(delete this.suppressEditingWarningOnNextAssignmentLoadByCaseId[o],i=0);let s=this.assignmentContextsByCaseId[o]??(this.assignmentContextsByCaseId[o]=[]);s.includes(n)||s.push(n),this.caseIdByAssignmentContext[n]=o;let a=e.assignmentID;a&&(this.assignmentIdByContext[n]=a),this.clearCollaborationBanner(n),this.refreshCollaborationBanner(n,i,this.pendingActionStateByCaseId[o])};static closeAssignmentContext(e){this.clearCollaborationBanner(e);let r=this.caseIdByAssignmentContext[e];if(delete this.caseIdByAssignmentContext[e],delete this.assignmentIdByContext[e],!r)return;let n=this.assignmentContextsByCaseId[r];if(!n)return;let o=n.indexOf(e);o!==-1&&n.splice(o,1),n.length===0&&delete this.assignmentContextsByCaseId[r]}static handleAssignmentUnload=e=>{let r=e?.actionInContext;r&&this.closeAssignmentContext(r)};static subscribeToCollaborators(e,r){let n=Tt.subscribe({matcher:"CASE_COLLABORATOR",criteria:{caseId:e}},o=>this.handleCaseCollaboratorsUpdate(e,r,o));this.caseCollabSubIds[e]=n,this.caseContextById[e]=r}static unsubscribeToCollaborators(e){Tt.unsubscribe(this.caseCollabSubIds[e]),delete this.caseCollabSubIds[e];let r=this.caseContextById[e];r&&(this.clearCollaborationBanner(r),delete this.caseContextById[e]);let n=this.assignmentContextsByCaseId[e];n&&n.slice().forEach(o=>this.closeAssignmentContext(o)),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,r,n){Tt.publishMessage({filter:{matcher:"CASE_COLLABORATOR",criteria:{caseId:r}},message:n?{state:e,assignmentId:n}:e})}static handleCaseLoadEvent(e){let{caseId:r,context:n}=e,o=!this.openCaseViewByCaseId.has(r);this.openCaseViewByCaseId.add(r);let i=this.caseCollabSubIds[r];o&&i&&Tt.unsubscribe(i),(!i||o)&&this.subscribeToCollaborators(r,n),this.restoreCollaboratorsFromContext(r,n),this.localInteractionStateByCaseId[r]??="viewing",this.publishCaseEvent(this.VIEW_OPEN,r)}static shouldKeepCaseSubscriptionOnUnload(e){return this.pendingSaveCaseIds.has(e)||(this.assignmentContextsByCaseId[e]??[]).length>0||this.isCaseStillLoaded(e)}static handleCaseUnloadEvent(e){let{caseId:r}=e;this.openCaseViewByCaseId.delete(r),!this.shouldKeepCaseSubscriptionOnUnload(r)&&this.caseCollabSubIds[r]&&(this.publishCaseEvent(this.VIEW_CLOSE,r),delete this.localInteractionStateByCaseId[r],this.unsubscribeToCollaborators(r))}static handleCaseClosedEvent(e){let{caseId:r}=e;this.openCaseViewByCaseId.delete(r),r&&this.caseCollabSubIds[r]&&(this.publishCaseEvent(this.VIEW_CLOSE,r),delete this.localInteractionStateByCaseId[r],this.unsubscribeToCollaborators(r))}static getCaseEventCallback(e,r){switch(e){case d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_EDIT_OPEN:return n=>{this.cancelTransitionCaseIds.delete(n),this.localInteractionStateByCaseId[n]=this.EDITING_STATE,this.publishCaseEvent(r,n)};case d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_LOAD:return n=>this.handleCaseLoadEvent(n);case d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_UNLOAD:return n=>this.handleCaseUnloadEvent(n);case d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_CLOSED:return n=>this.handleCaseClosedEvent(n);case d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_EDIT_CLOSE:return n=>this.handleCaseEditClose(n);default:throw new Error(`Unhandled eventKey: ${e}`)}}static subscribeToEvent(e,r,n){let o=this.getCaseEventCallback(e,r);$.subscribe(e,o,n)}static unsubscribeFromEvent(e,r){$.unsubscribe(e,r)}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"),$.subscribe(d.PUB_SUB_EVENTS.CASE_EVENTS.ASSIGNMENT_SUBMISSION,this.handleLocalSubmit,"case_collab_submit"),$.subscribe(d.PUB_SUB_EVENTS.CASE_EVENTS.SAVE_ASSIGNMENT_COMPLETE,this.handleLocalSave,"case_collab_save"),$.subscribe(d.PUB_SUB_EVENTS.EVENT_CANCEL,this.handleLocalCancel,"case_collab_cancel"),$.subscribe(d.PUB_SUB_EVENTS.ASSIGNMENT_EVENTS.ASSIGNMENT_LOAD,this.handleAssignmentLoad,"case_collab_assignment_load"),$.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"),$.unsubscribe(d.PUB_SUB_EVENTS.CASE_EVENTS.ASSIGNMENT_SUBMISSION,"case_collab_submit"),$.unsubscribe(d.PUB_SUB_EVENTS.CASE_EVENTS.SAVE_ASSIGNMENT_COMPLETE,"case_collab_save"),$.unsubscribe(d.PUB_SUB_EVENTS.EVENT_CANCEL,"case_collab_cancel"),$.unsubscribe(d.PUB_SUB_EVENTS.ASSIGNMENT_EVENTS.ASSIGNMENT_LOAD,"case_collab_assignment_load"),$.unsubscribe(d.PUB_SUB_EVENTS.ASSIGNMENT_EVENTS.ASSIGNMENT_UNLOAD,"case_collab_assignment_unload"))}},_s=O0;var x0=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";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:r}=e.data;if(r===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}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}$.publish(d.PUB_SUB_EVENTS.EVENT_SHOW_CANCEL_ALERT,{isModalAction:!0,hideDelete:!0}),this.isDirtyDialogActive=!0}else this.callback?.call(this)};shouldBypassDirtyPopupForStaleAssignment=()=>{let e=`${E.APP.APP}${d.FORWARD_SLASH_STRING}${E.PRIMARY}`,r=Ar(e),n=r?se(r):"";if(!n)return!1;let o=pe(n);return[n,o].filter(s=>typeof s=="string"&&s.length>0).some(s=>_s.isAssignmentStale(s))};handleCaseCancel=()=>{let e=Ke(E.APP.APP),r=e[e.length-1],n=se(r),o=W(n)?.caseInfo?.ID;if(o&&n&&ct({}).getPConnect().getActionsApi().getDescendants(o,n),kr(n)){let i=Ma(n);i&&ct({}).getPConnect().getActionsApi().getDescendants(o,i)}};loadPreview=e=>{let{pyID:r,caseClassName:n,uniqueId:o}=e.data;o===this.getUniqueId()&&ct({}).getPConnect().getActionsApi().showCasePreview(r,{caseClassName:n})};navigateToDefaultPage=()=>{let e=P.getDefaultQualifiedName("Data-Portal"),r=P.getDefaultQualifiedName("pyHome"),n=ct({isRoot:!0}),o=PCore.getStore()?.getState().data.app?.pyPortal?.pyPrimaryNavPages,i;Array.isArray(o)&&o[0]&&(i=o[0]);let s=i?.pyClassName||e,a=i?.pyRuleName||r;n.getPConnect().getActionsApi().showPage(a,s)};closeContainer=e=>{let{uniqueId:r}=e.data;r===this.getUniqueId()&&this.navigateToDefaultPage()};updateCoexistenceDrilldownCase=e=>{let{key:r,caseClassName:n,actionApi:o,caseLabel:i,uniqueId:s}=e.data;if(s!==this.getUniqueId())return;let a=o;o===t.OPEN_WORK_ITEM&&(a=t.OPEN_WORK_BY_HANDLE),ye.updateSemanticURLAndDocumentTitle({key:r,caseClassName:n,actionName:a,name:i}),ct({}).getPConnect().getActionsApi().updateRecents(n,r.substring(r.lastIndexOf(" ")+1),i,r)};openAssignment=e=>{let{pzInsKey:r,caseClassName:n,uniqueId:o}=e.data;o===this.getUniqueId()&&(this.onCreateCallback&&this.openAssignmentParams&&(r&&this.openAssignmentParams[0]&&this.openAssignmentParams[0].payload&&this.openAssignmentParams[0].payload.data?this.openAssignmentParams[0].payload.data.caseInfo.assignments[0].ID=r:this.openAssignmentParams[0]&&this.openAssignmentParams[0].payload&&this.openAssignmentParams[0].payload.data&&(this.openAssignmentParams[0].payload.data.caseInfo.content.coexistenceAction="openWorkByHandle"),r&&n&&ct({}).getPConnect().getActionsApi().openAssignment(r,n,{containerName:E.PRIMARY,context:E.APP.APP})),this.onCreateCallback=null,this.openAssignmentParams=null)};getNextWork=e=>{let{uniqueId:r}=e.data;if(r===this.getUniqueId()){let n=`${E.APP.APP}${d.FORWARD_SLASH_STRING}${E.PRIMARY}`;ct({meta:{},options:{context:Ar(n)}}).getPConnect().getActionsApi().getNextWork()}};openWorkByHandle=e=>{let{key:r,caseClassName:n,uniqueId:o}=e.data;if(o===this.getUniqueId()){let i=`${E.APP.APP}${d.FORWARD_SLASH_STRING}${E.PRIMARY}`;ct({meta:{},options:{context:Ar(i)}}).getPConnect().getActionsApi().openWorkByHandle(r,n)}};createWork=e=>{let{strClassName:r,uniqueId:n,strFlowParams:o,caseInitProperties:i}=e.data;if(n===this.getUniqueId()){let s=`${E.APP.APP}${d.FORWARD_SLASH_STRING}${E.PRIMARY}`,a=ct({meta:{},options:{context:Ar(s)}}),c=i+o,l=new URLSearchParams(c.slice(1)),u=this.setStartingFields(l);a.getPConnect().getActionsApi().createWork(r,{startingFields:u})}};setStartingFields=e=>{let r={};return e.forEach((n,o)=>{o&&(r[o]=n)}),r};destroyBroadcastChannel=()=>{this.getBroadCastChannel()?.close(),this.broadcastChannel=null};subscribeEvents=()=>{this.setReverseCoexistenceCaseLoaded(!0),$.subscribe(E.PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.HANDLE_DISCARD,this.handleDiscard),$.subscribe(E.PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.CHECK_IS_FORM_DIRTY,this.postDirtyPopupMessage)};unsubscribeEvents=()=>{$.unsubscribeAllWithEventType(E.PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.CHECK_IS_FORM_DIRTY),$.unsubscribeAllWithEventType(E.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,r,n)=>{this.broadcastChannel===null&&this.init(!1),this.broadcastChannel?.postMessage({action:t.OPEN_ASSIGNMENT_MODAL,uniqueId:this.getUniqueId(),key:e}),this.broadcastEventToIframe=!1,this.onCreateCallback=r,this.openAssignmentParams=n}},rp=new x0;var _o={NEXT_ASSIGNMENT_ID:"data.nextAssignmentInfo.ID",FIRST_ASSIGNMENT_ID:"data.caseInfo.assignments.0.ID",NEXT_ASSIGNMENT_INFO:"nextAssignmentInfo",NEXT_ASSIGNMENT_INFO_CONTEXT:"nextAssignmentInfo.context"},D0=t=>{let{containerName:e,isInCreateStage:r}=t;return r?d.MODAL:e||Bt.getTargetViewContainerName(aS)},l_=t=>{let e=yo(t);return br(e,ts(t))||bt("createWork",{caseClassName:e}).replace(/{.+?}/,String(er(Ht(t))))},u_=t=>t.initiatingContext||t.context,Ba=async(t,e)=>It(t)?{continueExecution:!0,removeActionPayload:{},dirtyCheckPerformed:!1}:{...await vt(t,e),dirtyCheckPerformed:!0},w0=t=>{if(B.shouldUseUnifiedHandling())return t?.uiResources?.root?.config?.name===P.getDefaultQualifiedName("pzCreateDetails")||!1;let e=g.getIn(t,[d.DATA,d.CASE_INFO.CASE_INFO]);return Yt(e)&&yu(v.getOperatorIdentifier(),e)},NB=(t,e)=>{let r=w0(t),{skipBrowserSemanticUrlUpdate:n=!1,isTraditionalUICase:o}=e,i=o&&!oa();g.setIn(t,["directUrlUpdation"],(!r||i)&&!n)},OB=t=>t.confirmationNote?d.REVIEW_MODE:d.PERFORM_MODE,xB=(t,e,r)=>!tn(t)&&It(e)&&(r??!0),DB=t=>mr(t)&&v.isOpenCasePageAfterCreateInMultiDocEnabled();var Hue="Error occurred during ajax call at createWork Epic : ",wB=(t,e)=>{let{class:r,context:n,viewType:o=it.PAGE}=t,{removeActionPayload:i}=e,s=t?.pageName?t?.pageName:v.getDefaultCasePage();return(t.isTraditionalUICase||!s&&t.renderInline===!0&&o!==it.FORM)&&(s=P.getDefaultQualifiedName("pyDetails")),q(Ai.createCase(r,{...t,pageName:s,viewType:o,context:n})).pipe(O(({response:a,headers:c})=>(Ve.analyseResponse(a),{response:a,actionInPayload:t,headers:c,removeActionPayload:i})),me(Hue,n))};var Ha=t=>{$.publish(d.PUB_SUB_EVENTS.DISPLAY_CASE_CREATED_TOASTER,t)},np=t=>{$.publish(d.PUB_SUB_EVENTS.CASE_EVENTS.CREATE_STAGE_DONE,t)},$B=t=>{$.publish(d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_VIEW_OPENED_AFTER_CREATE,t)};var Gue=(t,e)=>B.isExternalCaseType(t)&&e?e:Go(),que=t=>{let e=0,r=[],n={},o,i=!1,s=!1,a="",c="";return t.pipe(ee(jw),gr(100),O(l=>({actionMgrID:e}=l.payload,l.payload)),z(l=>{let{context:u}=l;if(o=l.class,s=!1,a="",c="",B.isExternalCaseType(o)&&(dt({context:u,stateObj:W(u),clearContextMessages:!0}),!Dr(u))){let f={type:E.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return w.rejectActionByID(e,!0,f),Ec()}let p=D0(l),m=Z(p,u);return i=Dn(o),q(Ba(m,{loadingContext:u})).pipe(z(({continueExecution:f,removeActionPayload:h,dirtyCheckPerformed:S})=>f?(s=S,l.isTraditionalUICase=i,wB(l,{removeActionPayload:h})):(w.rejectActionByID(e),At)))}),z(async l=>{if(l?.type===Te)return l.payload.context=Gue(o,l.payload.context),r.push(ue(l)),r;let{actionInPayload:u,response:p,headers:m,removeActionPayload:f}=l,h=u_(u),S=B.isExternalCaseType(u.class),A=w0(p);(u.renderInline||v.getDefaultCasePage()||i)&&(A=!1),g.setIn(p.data,E.CASE_INFO.IS_FIRST_ASSIGNMENT,!0);let C=D0({...u,isInCreateStage:A}),_=Z(C,u.context),I=st(_,C,u.context),{openCaseViewAfterCreate:N}=u;if(!s&&xB(C,_,N)){let{continueExecution:_e}=await vt(_,{loadingContext:u.context});if(!_e)return w.rejectActionByID(e),r}let x=u?.openCaseViewAfterCreate??!0,H=Le(p);if(!x&&!A&&!DB(_)){let _e=mT(p),{businessID:Ye,caseType:Oe,resolvedURL:ft,caseTypeName:Qt}=nE(p);return n={caseId:Ye,label:Qt,href:ft},Ha(n),np({caseId:Ye,assignmentId:_e,caseType:Oe,ID:Ht(H),initiatingContext:h}),S&&fT(u),r}let G=String(er(Ht(H))),ne=l_(H);H.semanticURL=ne,pt.setComponentCache(G,Ge.addDebugHeaders(u.debugInfo)),NB(H,u);let j={acName:_,context:I},oe=wn(I);await Pe(H,u,j);let Ie=OB(H),he={target:_,context:I,initiatingContext:h,containerItemID:I,headers:m,semanticURL:ne,isInCreateStage:A,isMinimizable:A,caseViewMode:Ie,currentCaseViewMode:oe,assignmentContext:g.getIn(H,_o.NEXT_ASSIGNMENT_INFO_CONTEXT),nextAssignmentInfo:g.getIn(H,_o.NEXT_ASSIGNMENT_INFO),resourceType:E.CASE,openCaseViewAfterCreate:u.openCaseViewAfterCreate,modalOptions:u.modalOptions,debugInfo:u.debugInfo};xn(he,H);let De=Me(H,he);i&&(De.data.caseInfo.content.coexistenceAction="openAssignment"),B.setTraditionalGadgetId(De.data);let Fe=Gt(_,De);return rn(Fe)&&si(r,{removeActionPayload:f,target:_}),S&&fT(u),r.push(Fe),pr(H,he),$B({caseId:G}),a=Ie,c=Ht(H),r}),O(()=>{let l=oa(),u=Yt(g.getIn(r[0]?.payload,"data.caseInfo"));return i&&l&&u?rp.postCreateCaseMessage(r[0]?.payload?.nextAssignmentInfo?.ID,hn,r):hn(r),a===E.CASE_VIEW_MODE.PERFORM&&es(c),mt(r,e),n={},r=[],a="",c="",r}))},MB=que;var{RESOURCE_TYPES:UB}=E,jB=t=>{let{isModalAction:e,viewType:r,isInCreateStage:n,isCaseWideAction:o}=t;return e&&n&&!o?it.PAGE:r||it.FORM},zB=t=>{let{isCaseWideAction:e,caseTypeID:r}=t;return B.shouldUseUnifiedHandling()?e||B.isObjectCaseType(r)?X_:Q_:e?X_:Q_},d_=(t,e)=>{let{containerItemID:r,context:n,actionMgrID:o,isInCreateStage:i,isModalAction:s}=e;if(i&&s){let a=jr(r),c=Z(a,n);t.push(V(nr,{containerItemID:r,target:c,actionMgrID:o}))}},Ga=(t,e)=>{let{containerItemID:r,skipReleaseLockRequest:n,isInCreateStage:o,isProcessAction:i}=e,s=pe(r),a=`${s?.includes("root")?d.APP.ROOT:d.APP.APP}/${ge.MODAL}`;t.push(V(Qe,{containerItemID:r,context:s,target:a,skipReleaseLockRequest:n,isInCreateStage:o,isProcessAction:i}))},Wue=(t,e)=>{let r=t?.assignmentID,o=(e?.data?.caseInfo?.assignments??[])[0]?.ID;return r!==o},$0=t=>re(".openCaseViewAfterCreate",d.CONTEXT_DATA,t)??!0,Kue=(t,e)=>mr(t)&&($0(e)||v.isOpenCasePageAfterCreateInMultiDocEnabled()),Jue=t=>t.initiatingContext||re(".initiatingContext",d.CONTEXT_DATA,t?.context),Yue=(t,e)=>{let{content:r}=e?Au(t):Lo(t);return{...r&&{content:r}}},Zue=async(t,{translatedDXAPIResponse:e,actionInPayload:r},n,o,i)=>{let{caseID:s}=r,a=XU(e),c=o?Yn(e):yo(e),{caseViewMode:l,headers:u,semanticURL:p,actionMgrID:m,directUrlUpdation:f,key:h,flowName:S,resourceType:A}=n,C=te(r?.context),_=We(C,r?.context)?.acTertiary,I=Jue(r);Object.assign(i,{caseId:s,assignmentId:a,caseType:c,isSubmitFromBlendedUI:_,...I&&{initiatingContext:I},...Yue(e,o)}),Ga(t,{...r,skipReleaseLockRequest:!0});let N=`${r?.containerItemID.includes("root")?d.APP.ROOT:d.APP.APP}/${ge.PRIMARY}`,x=st(N,ge.PRIMARY),H=Ge.getCoreHeadersFromContext(r.context)||!1,G=Me(e,{target:N,context:x,containerItemID:x,caseViewMode:l,headers:u,semanticURL:p,key:h,flowName:S,resourceType:A,directUrlUpdation:f,debugInfo:H&&H.debugInfo&&{debugId:H.debugInfo[d.COREHEADER_APP_DEBUG_ID]},shouldUpdateCaseActionsInParentContext:!0});if(It(N)){let ne=W(x),oe=`You will lose unsaved changes for ${ts({data:ne})}. Do you want to continue?`;if($0(r.context)){let{continueExecution:Ie}=await vt(N,{dirtyMessage:oe});if(!Ie)return n.directUrlUpdation=!1,w.rejectActionByID(m),Ec();G.currentCaseViewMode=wn(G?.context),t.push(V(kn,G)),r.__deferCaseActionsPayload=G}else return t}else if(Kue(N,r.context))t.push(V(Pt,G));else return t;return e.directUrlUpdation=f,e.semanticURL=p,await Pe(e,{...G,acName:N},{acName:N,context:x}),t},Que=(t,e,r)=>{let n=/^app\/preview_[0-9]*/g,{containerItemID:o,caseID:i}=e;if(o&&n.test(o)&&kr(o)){let{caseClassName:s}=r,a=qe(o),c=pe(a);t.push(V(Mm,{containerItemID:a,context:c,container:ge.PREVIEW,containerName:ge.PREVIEW,caseId:i,viewName:E.PREVIEW_VIEW_NAME,caseClassName:s,updateData:!0}))}},Xue=(t,e,r)=>{let{containerItemID:n}=e,o=pe(n),{data:i,caseViewMode:s}=r;if(o&&kr(n)){let a=xo(o),c={data:i,caseViewMode:s,context:a};g.setIn(c.data,["context_data","caseViewMode"],s),t.push({type:mn,payload:{context:a}});let l=B.getPropertiesToReplace(n);t.push(V(Re,c,{propertiesToReplace:l})),e.shouldUpdateCaseActionsInParentContext=!0,e.__deferCaseActionsPayload=e}},FB=(t,e)=>{let{isCaseWideAction:r,assignmentID:n,actionID:o}=e;return{isCaseWideAction:r,caseID:Ht(t),assignmentID:r?null:n,actionID:o||null}},p_=(t,{isModalAction:e,target:r,transientItemID:n})=>{if(e){let i=t.find(({type:s})=>s===et);i?.payload&&(r=i.payload.target,n=i.payload.containerItemID)}let o=Fw({target:r,containerItemID:n});o.payload.transientItems.length&&t.push(o)},ede=(t,e,r)=>{if(e.isProcessAction&&(Ga(r,{...e,skipReleaseLockRequest:!0}),t)){let n=`${e?.containerItemID.includes("root")?d.APP.ROOT:d.APP.APP}/${ge.PRIMARY}`,o=st(n,ge.PRIMARY),i={insKey:t.ID,className:t.content.classID,context:o,acTargetName:d.PRIMARY,isChild:!0},s={type:uo,payload:{...i}};r.push(s)}},VB=t=>/^app\/preview_[0-9]*/g.test(t),hl=(t,e)=>{let r=/^app\/primary_[0-9]*/g,n=qe(t);return VB(t)?!1:n===e?!0:r.test(n)},m_=t=>{if(!$0(t.context)){let e,r=t?.caseTypeID,n=t?.caseTypeName;return t.businessID?e=t.businessID:e=t.workID,{caseID:e,caseTypeID:r,caseTypeName:n}}return{}},tde=(t,e)=>{let r=te(t);return wt(r,e)},rde=(t,e=!1,r=!1)=>{let o=w.getNextActionMgrId(),i=J.getPropertyValue(E.CASE_INFO.ASSIGNMENT_ID,"",t),s=J.getPropertyValue(E.CASE_INFO.ASSIGNMENTACTION_ID,"",t);return{ID:i,actionID:s,context:t,caseWideAction:e,contextData:r,options:{actionMgrID:o}}},kB=(t,e,r,n)=>{let{data:o,caseViewMode:i}=e,s={data:o,caseViewMode:i,context:r};if(g.setIn(s.data,["context_data","caseViewMode"],i),t.push({type:mn,payload:{context:r}}),n){let c={data:Ve.transformObjectToCase(o),caseViewMode:i,context:r};t.push(V(Re,c))}t.push(V(Re,s))},nde=t=>{if(!t?.isCaseWideAction)return!1;let e=t.context;return!!((e?qe(e):void 0)?.includes(ge.MODAL)&&e?.includes(ge.MODAL))},ode=async(t,e,r,n,o,i,s,a,c,l)=>{let{headers:u}=c,p=l?d.OBJECT_INFO.OBJECT_INFO:d.CASE_INFO.CASE_INFO,m=nde(n);if(t)if(m){Ga(o,{...n,skipReleaseLockRequest:!0}),e.doDeleteCaseSummary=n.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:h,caseViewMode:S}=e,A={data:h,caseViewMode:S,context:r};A?.data&&g.setIn(A.data,["context_data","caseViewMode"],S),o.push(V(Re,A))}else{if(typeof c?.response?.uiResources?.root!="object"){let oe=(Oe,ft)=>{let Qt=Oe.findIndex(yr=>yr.ID===ft);if(Qt!==-1){let[yr]=Oe.splice(Qt,1);Oe.unshift(yr)}return Oe},Ie=W(t),he=c?.response?.data?.caseInfo?.assignments??[],De=Ie?.caseInfo?.assignments??[],Fe=wn(t)===d.PERFORM_MODE,_e=he[0]?.ID!==De[0]?.ID,Ye=he.length>0&&De.length>0;Fe&&_e&&Ye&&c?.response?.data?.caseInfo?.assignments&&(c.response.data.caseInfo.assignments=oe(he,De[0]?.ID))}let f=It(te(t)),h=!1,S=te(r),A=ut(S),C=se(S);C&&A?.items?.[C]?.key===c?.actionInPayload?.caseID&&(h=!0),Ga(o,{...n,skipReleaseLockRequest:!0});let _=jr(t),I={target:te(t),containerItemID:t,context:t,containerName:_};e.doDeleteCaseSummary=n.doDeleteCaseSummary;let N=xo(r),x=W(N),H=W(n.context),G=x[p]?.ID,ne=H[p]?.ID,j=W(t)?.caseInfo?.ID;if(f&&G===ne||!f&&(s===""||I.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&&Wue(n,a)&&(e.flowName=" ",e.clearView=!0,e.root?.config?.name!==d.PY_CONFIRM&&(e.root=void 0)),t.includes(d.ACTIONAREA)?o.push(V(Re,{...e,key:s,resourceType:"",...I})):We(I.target,I.containerItemID)?.resourceType!==UB.PAGE&&j===e.data?.caseInfo?.ID&&o.push(V(rr,{...e,key:s,resourceType:"",...I}));else if(i){let oe=te(t),Ie=wt(oe,s);if(Ie)I.target=oe,I.context=Ie,I.containerItemID=Ie,o.push(V(rr,{...e,key:s,resourceType:"",...I}));else{let he=Ke(r)[0];if(n.target=he,n.context=st(he,d.WORKAREA,r),n?.context){n.containerItemID=n.context,o.push(V(Pt,{...n,...e}));let De=n.containerItemID;o.push(V(nr,{parentContainerTarget:he,containerItemID:De}))}}}if(n.target=te(t),n.containerName=jr(t),n.context=t,n.containerItemID=t,n.shouldUpdateCaseActionsInParentContext=!0,g.setIn(e,"acName",I.target),await Pe(a,e),n.__deferCaseActionsPayload=n,h&&(r.includes(d.WORKAREA)&&kr(r)&&(r=xo(r)),kB(o,e,r,l)),!i&&e.caseViewMode===d.PERFORM_MODE){let oe=tde(t,s),Ie={data:{[p]:{headers:u}},context:oe};o.push(V(Re,Ie)),o.push(la(rde(oe)))}}else{Ga(o,n);let f=!1,h=te(r),S=ut(h),A=se(h);if(A&&S?.items?.[A]?.key===c?.actionInPayload?.caseID&&(f=!0),i){let C=Ke(r)[0];n.target=C,n.context=st(C,d.WORKAREA,r),n.containerItemID=n.context,o.push(V(Pt,{...n,...e}));let _=n.containerItemID;o.push(V(nr,{parentContainerTarget:C,containerItemID:_}))}f&&kB(o,e,r,l)}},BB=(t,e,r,n,o)=>{let i,s=te(e);mr(s)?i=wt(s,r.data?.caseInfo?.ID):i=se(s);let a=!0;if(t&&i){let c=J.getPropertyValue(E.CASE_INFO.ASSIGNMENTACTION_ID,"",i),l=J.getPropertyValue(E.CASE_INFO.ASSIGNMENT_ID,"",i);if(c){let p=r?.data?.caseInfo?.assignments?.find(m=>m.ID===l)?.actions;p&&!p.some(m=>m?.ID===c)&&(a=!1)}}return n&&t&&a&&Qi(null,d.CASE_VIEW_MODE_PROP,i)===d.PERFORM_MODE&&o},ide=async(t,e,r,n,o,i,s)=>{let a=i?"objectInfo":"caseInfo";ede(t.data[a].parentCaseInfo,e,o);let c=t?.data[a]?.parentCaseInfo?.ID;if(c){let l=te(e?.context),u=We(l,e?.context)?.parentContext,p=te(u);e?.isProcessAction&&ml(p,c)&&tw(u,t?.data[a]?.lastUpdateTime)}r.resourceType=UB.CASE,r.directUrlUpdation=!0,e.isProcessAction||await Zue(o,{translatedDXAPIResponse:n,actionInPayload:e},r,i,s)},HB=async(t,e,r)=>{let n={assignmentID:t?.data?.caseInfo?.assignments[0]?.ID,className:t?.data?.caseInfo?.content?.classID,containerName:ge.PRIMARY,targetContainerName:ge.PRIMARY,viewType:it.PAGE,isLastStepInCreateStage:!0,context:r},o={type:No,payload:{...n}};e.push(o)},M0=async(t,e,r,n,o)=>{t.doDeleteCaseSummary=e.doDeleteCaseSummary,t.caseViewMode===d.REVIEW_MODE&&(t.flowName=" ",t.clearView=!0);let{containerItemID:i}=e;It(te(i))||g.setIn(t.data,["context_data","caseViewMode"],t.caseViewMode);let s=B.getPropertiesToReplace(i);o.push(V(rr,{...t,...n,propertiesToReplace:s})),g.setIn(t,"acName",n.target),await Pe(r,t),Xue(o,e,t)},f_=async(t,e,r,n,o,i,s,a,c,l={})=>{let{isCaseWideAction:u,isInCreateStage:p,containerItemID:m}=t,f=qe(t.context),h=lE(o,c),S=c?Yn(o):yo(o),A=p&&!h&&!u,C=Ke(f)[0],_=C?se(C):f,I=jr(m),N=pe(m),x=Object.freeze({target:t.target,containerItemID:m,context:N,containerName:I});A&&!VB(t.context)?await ide(a,t,e,o,i,c,l):hl(t.context,_)?await ode(_,e,f,t,i,r,n,o,s,c):(u||c)&&!hl(t.context,_)?(Ga(i,t),Que(i,t,{caseClassName:S})):await M0(e,t,o,x,i)},g_=(t,e,r)=>{let{isModalAction:n,isCaseWideAction:o,caseID:i,assignmentID:s,isLocalAction:a}=e,c=hl(e.context,r),l=t?.data?.caseInfo?.stages,u=t?.data?.caseInfo?.stageID;iE({caseID:i,context:e.context,assignmentId:s,isLocalAction:!!a,isModalAction:n,isModalLaunchedFromPrimaryValue:c,isCaseWideAction:o,stages:l,stageID:u})},GB=(t,e)=>{let{assignmentID:r}=e;return t?.data?.caseInfo?.assignments?.some(n=>n.ID===r&&n?.canPerform==="true")},h_=t=>{let e=t?.payload?.err?.errorDetails,r=t?.payload?.context;e?.forEach(n=>{n[d.ERROR_FIELD_IN_PAGE]=n[d.ERROR_FIELD_IN_PAGE].replace(/(\(\d+\))/g,a=>`[${parseInt(a.substring(1,a.length-1),10)-1}]`);let o=n[d.ERROR_FIELD_IN_PAGE].slice(1),i=n[d.ERROR_IN_PAGE_IDENTIFIER],s=i.startsWith(".")?i.slice(1):i;if(s){let a=o?`caseInfo.content.${o}`:"caseInfo.content";a=d.getProperty(a.replace(/\(/g,"[").replace(/\)/g,"]"));let c=Qn(s,a,d.PROPERTY),l={type:E.MESSAGES.MESSAGES_TYPE_ERROR,message:n.localizedValue};be.mutateField(r,a,c[c.length-1],{messages:[l],type:E.MESSAGES.MESSAGES_TYPE_ERROR,fieldName:i})}})},LB=t=>{let e=W("app")?.pyPortal?.pyPrimaryNavPages,r=Array.isArray(e)?e[0]:null;return r?(nn.clearChangedProperties(t),[{type:Nr,payload:{className:r.pyClassName,containerName:d.PRIMARY,context:d.APP.APP,pageReference:"pyPortal",viewName:r.pyRuleName,skipSemanticUrl:""}}]):[]},qB=async t=>{let{target:e,containerItemID:r,context:n}=t,o=Ar("app/primary"),i=We(e,r)?.parentContext,s=!!e&&mr(e),a=mr("app/primary");if(s&&i!==d.APP.APP){if(await aa(r,{skipDirtyCheck:!0}),Zd(e).length===0)return LB(n)}else if(o&&a&&!i)await aa(o,{skipDirtyCheck:!0,eventName:"Dismiss case"});else return LB(n);return[]};var k0=t=>{let{containerName:e,isInCreateStage:r}=t;return r?d.MODAL:e||Bt.getTargetViewContainerName(ei)},WB=t=>t?.uiResources?.root?.config?.name===P.getDefaultQualifiedName("pzCreateDetails")||!1,op=(t,e)=>{let r=WB(t),{skipBrowserSemanticUrlUpdate:n=!1}=e;g.setIn(t,["directUrlUpdation"],!r&&!n)},ip=t=>t.confirmationNote?d.REVIEW_MODE:d.PERFORM_MODE,sp=(t,e)=>{let r;return t.renderInline||v.getDefaultCasePage()?r=!1:r=WB(e),r},KB=(t,e)=>{B.isExternalObject(t.class)&&(t.containerItemID=t.context,Ga(e,t))},JB=(t,e)=>!t&&!e,YB=(t,e,r)=>!tn(t)&&It(e)&&!B.isExternalObject(r),ZB=(t,e,r)=>{if(rn(t)){let{removeActionPayload:n,target:o}=e;si(r,{removeActionPayload:n,target:o})}},QB=t=>{B.isExternalObject(t.class)&&Ha({content:Or().getLocaleValue("Successfully submitted!","Assignment")})},XB=t=>{B.isExternalObject(t)&&Ve.setNeedsMapping(!1)};var L0=t=>{let{containerName:e,isInCreateStage:r}=t;return r?d.MODAL:e||Bt.getTargetViewContainerName(Js)};var sde="Error occurred during ajax call at createObject Epic : ",e8=(t,e)=>{let{class:r,context:n,viewType:o=it.PAGE}=t,{removeActionPayload:i}=e,s=t?.pageName?t?.pageName:v.getDefaultCasePage();return q(Ai.createCase(r,{...t,pageName:s,viewType:o,context:n,retrieveActionViewForNewObject:!0})).pipe(O(({response:a,headers:c})=>(Ve.analyseResponse(a),{response:a,actionInPayload:t,headers:c,removeActionPayload:i})),me(sde,n))};var t8="CREATE_EXTERNAL_CASE";var ade=t=>{let e=0,r=[],n=!1;return t.pipe(ee(t8),gr(100),O(i=>({actionMgrID:e}=i.payload,i.payload)),z(i=>{let{context:s}=i,a=L0(i),c=Z(a,s);return n=!1,q(Ba(c,{loadingContext:s})).pipe(z(({continueExecution:l,removeActionPayload:u,dirtyCheckPerformed:p})=>l?(n=p,e8(i,{removeActionPayload:u})):(w.rejectActionByID(e),At)))}),z(async i=>{if(i&&i.type===Te)return i.payload.context=Go(),r.push(ue(i)),r;let{actionInPayload:s,response:a,headers:c,removeActionPayload:l}=i,u=u_(s),p=sp(s,a);g.setIn(a.data,d.getProperty(d.CASE_INFO.IS_FIRST_ASSIGNMENT),!0);let m=L0({...s,isInCreateStage:p}),f=Z(m,s.context),h=st(f,m,s.context);if(!n&&!tn(m)&&It(f)){let{continueExecution:H}=await vt(f,{loadingContext:s.context});if(!H)return w.rejectActionByID(e),r}let S=Le(a),A=l_(S);S.semanticURL=A,op(S,s),await Pe(S,s,{acName:f,context:h});let _=ip(S),I={target:f,context:h,initiatingContext:u,headers:c,semanticURL:A,caseViewMode:_,containerItemID:h,isInCreateStage:p,isMinimizable:p,assignmentContext:g.getIn(S,_o.NEXT_ASSIGNMENT_INFO_CONTEXT),nextAssignmentInfo:g.getIn(S,_o.NEXT_ASSIGNMENT_INFO),resourceType:E.RESOURCE_TYPES.CASE,openCaseViewAfterCreate:s.openCaseViewAfterCreate,modalOptions:s.modalOptions,debugInfo:s.debugInfo,isExternalCaseCreationFlow:!0};xn(I,S);let N=Me(S,I),x=Gt(f,N);return rn(x)&&si(r,{removeActionPayload:l,target:f}),r.push(x),SE(r),r}),O(()=>(hn(r),mt(r,e),r=[],r)))},r8=ade;var{RESOURCE_TYPES:cde}=E,Xh=(t,e={})=>{let{viewType:r,containerName:n,targetContainerName:o,isChild:i}=t,s=Lo(e);return wU(s)&&t?.stageID===s.stageID?it.PAGE:r||((pT(n)||pT(o))&&!i?it.FORM:it.PAGE)},n8=(t,e)=>{let r=Lo(t),n;v.getDefaultCasePage()?n=!1:n=Yt(r);let{isChild:o,containerName:i,isTraditionalUICase:s}=e,a=o&&n,c=n&&!e.isActionFromToDoList;return(a||c)&&!s&&!e.renderInline?d.MODAL:i||Ut(qn,e)},o8=async(t,e,r)=>{let{semanticURL:n,containerItemID:o,isParallelAssignment:i,insKey:s}=e,{target:a,actionInPayload:c}=r,{skipBrowserSemanticUrlUpdate:l=!1}=c,u=pe(o);await Pe({directUrlUpdation:!l,semanticURL:n},c,{acName:a,target:a,context:u}),t.push(V(nr,{containerItemID:o,target:a,isParallelAssignment:i,insKey:s,resourceType:cde.CASE,context:u,doDeleteCaseSummary:c.doDeleteCaseSummary}))},i8=(t,e)=>{let r=Lo(t),n=Ht(t),o=Yt(r),{skipBrowserSemanticUrlUpdate:i=!1,viewType:s,isTraditionalUICase:a}=e,c=a&&!oa(),l=s===it.PAGE&&(!o||c)&&!i,{caseTypeID:u,businessID:p}=r;if(l){let m=br(u,p)||bt(Lt,{caseClassName:u}).replace(/{.+?}/,String(er(n)));t.semanticURL=m,t.directUrlUpdation=!0}},s8=t=>{let e=t?.headers??{};return t?.isRemote&&(e=$e(e,t.remoteClassName)),e},lde=(t,e,r,n,o)=>{Xh(t,e)===it.FORM?(r.caseViewMode=n||d.PERFORM_MODE,o.push(V(rr,r))):o.push(V(kn,r))},ude=(t,e,r,n,o)=>{if(si(t,{removeActionPayload:e,target:r}),yj(n.key,r))n.context=Ar(r),n.containerItemID=n.context,t.push(V(kn,n));else if((o?.isChild||o?.isRemote)&&o?.isMultiDoc){let i=te(o.context);n.target=i,n.context=o.context,n.containerItemID=o.context,t.push(V(kn,n))}else{let i=te(n.context),s=wt(i,n.key);s?(n.target=i,n.context=s,n.containerItemID=s,t.push(V(kn,n))):t.push(V(Pt,n))}},a8=(t,e,r,n,o,i,s)=>{It(e)&&Fr(e)?lde(n,o,t,i,r):ude(r,s,e,t,n)},c8=(t,e)=>{t.acTertiary&&(e.data.caseInfo.isFirstAssignment=t.acTertiary)},l8=(t,e)=>{if(t=ae.getRemoteCaseClassBySourceClass(t)??t,ae.isRemoteCase(t)){let{RemoteClassName:r,RemoteSystemID:n,name:o}=ae.getRemoteCase(t);if(e.headers?.RemoteSystemID||w.setRemoteCaseHeaderByContext(e,n),ae.isTraditionalRemoteCase(t)||ae.getRemoteAppPlatformVersion(n)){e.assignmentID=e.assignments?.[0]?.ID;let i={className:t,name:o,action:ES,remoteClassName:r};w.setTraditionalRemoteCaseParams(e,i)}}},dde=t=>{let{inlineViewType:e,caseTypeID:r,RedirectURL:n}=t;if(e&&e.toLowerCase().includes("remote"))return!1;let o=ae.getRemoteCaseClassBySourceClass(r)??r;return!ae.isRemoteCase(o)&&!!n},u8=(t,e,r)=>{if(!t||!e||!dde(e)||!e.RedirectURL)return!1;try{let n=new URL(e.RedirectURL);if(n.protocol==="https:")return globalThis.open(n.href,"_blank","noopener,noreferrer"),w.resolveActionByID(r),!0}catch{}return!1},d8=(t,e,r,n)=>{if(It(t)&&kr(e)){let o=r?.data?.caseInfo?.assignments;if(Array.isArray(o)&&o.length>0){let i=qe(e);n.push(V(Re,{context:i,data:{caseInfo:{assignments:o}}},{propertiesToReplace:[{path:d.CASE_INFO.ASSIGNMENTS,allowMultiple:!0}]}))}}},p8=(t,e)=>{t&&(e.data.caseInfo.content.coexistenceAction="openAssignment")};var pde="Error occurred during ajax call at openAssignment Epic : ",m8=({restUrl:t,reqType:e,requestHeaders:r,debugInfo:n,context:o,isGetNextWork:i,doNotMergeMessagesForStatusCode:s,mcpAction:a})=>{if(yt())return tr(a.actionName,{...a.payload,headers:{"if-match":r&&r.etag,...r}});let c=B.appendExcludeQueryParamToUrl(t);return M(c,{method:e,headers:{"if-match":r&&r.etag,...r,...n&&{...Ge.addDebugHeaders(n)}}},o,{doNotMergeHttpMessagesForStatusCode:i?s:""})},f8=(t,e)=>{let r=Xh(t),{headers:n,context:o,assignmentID:i,isGetNextWork:s,debugInfo:a,isOpenStage:c,stageID:l,caseID:u,jsActionQueryParams:p,isLastStepInCreateStage:m}=t,f="404",h,S;s?{restApi:h,reqType:S}=U(eb,{viewType:r}):c?{restApi:h,reqType:S}=U(Z_,{caseID:u,stageID:l}):{restApi:h,reqType:S}=U(qn,{assignmentID:i,viewType:r});let{removeActionPayload:A}=e,C=v.getDefaultCasePage(),_="",I=t.pageName;t.isTraditionalUICase&&(I=P.getDefaultQualifiedName("pyDetails")),C?_=`${h}?viewType=${r}&pageName=${C}`:I?_=`${h}?viewType=${r}&pageName=${I}`:_=`${h}?viewType=${r}`,p&&Object.keys(p).forEach(G=>{_+=`&${G}=${p[G]}`});let N=s8(t),x=qn;s?x=eb:c&&(x=Z_);let H=G=>({actionName:x,payload:{queryPayload:{...p,assignmentID:i,caseID:u,stageID:l,viewType:r,params:{pageName:G}}}});return q(m8({restUrl:_,reqType:S,requestHeaders:N,debugInfo:a,context:o,isGetNextWork:s,doNotMergeMessagesForStatusCode:f,mcpAction:H(C||I)})).pipe(O(G=>v.isCoexistenceAppOfType(d.APP_TYPE.UIKIT)&&!m?Yt(G.data.data.caseInfo)?G:(_=I?_.replaceAll(I,P.getDefaultQualifiedName("pyDetails")):_,v.setDefaultCasePage(P.getDefaultQualifiedName("pyDetails")),{isReloadWithDifferentViewTypeRequired:!0,restUrl:_}):G),z(G=>G?.isReloadWithDifferentViewTypeRequired?m8({restUrl:_,reqType:S,requestHeaders:N,debugInfo:a,context:o,isGetNextWork:s,doNotMergeMessagesForStatusCode:f,mcpAction:H(P.getDefaultQualifiedName("pyDetails"))}):Se(G)),O(G=>{let{key:ne,flowName:j}=zT(i);return Ve.analyseResponse(G),{response:{...G.data,key:ne,flowName:j},actionInPayload:t,viewType:r,removeActionPayload:A,headers:$e({...n,...G.headers})}}),me(pde,o))};var{RESOURCE_TYPES:mde}=E,fde=(t,e)=>{e!==void 0&&t.push({status:Number(e)})},gde=(t,e)=>t&&String(t.canPerform)==="false"?d.REVIEW_MODE:e??d.PERFORM_MODE,g8=t=>{let e=v.getRuntime()==="Browser",r=0,n=[],o=[],i=!1,s=!1;return t.pipe(ee(wa),O(a=>({actionMgrID:r}=a.payload,{...a.payload,...e?{insKey:a.payload.assignmentID}:{assignmentID:a.payload.assignmentID}})),z(a=>{i=a.isGetNextWork;let{context:c}=a,l;(a?.isChild||a?.isRemote)&&a?.isMultiDoc?l=it.FORM:l=Xh(a),a.viewType=l;let u=Ut(qn,a),p=Z(u,c),{activate:m,activateContainerActionPayload:f}=ns(mde.ASSIGNMENT,p,a);if(m&&!a.isParallelCall)return Se({type:or,activateContainerActionPayload:f,actionInPayload:a});let h=se(p),S;return f?.isParallelAssignment?S=Promise.resolve({continueExecution:!0,removeActionPayload:{}}):h?S=vt(p,{loadingContext:c}):S=Promise.resolve({continueExecution:!0,removeActionPayload:{}}),q(S).pipe(z(({continueExecution:A,removeActionPayload:C})=>A?(s=Dn(a.className),a.isTraditionalUICase=s,v.isWSSPortal()&&(a.headers={...a.headers,[d.X_ORIGIN_CHANNEL]:"WSS"}),f8(a,{removeActionPayload:C})):(w.rejectActionByID(r),At)))}),z(async a=>{if(a?.type===Te){if(i){let{payload:Ye}=a,{err:Oe}=Ye;fde(o,Oe?.response?.status)}return n.push(ue(a)),n}let{type:c,actionInPayload:l,response:u,viewType:p,headers:m,removeActionPayload:f,activateContainerActionPayload:h}=a;if(u?.redirectInfo?.jsAction==="openStage"){let Ye=u?.redirectInfo?.stageID,Oe=wa,ft=u?.data?.caseInfo?.ID;l.isOpenStage=!0,l.stageID=Ye,l.jsActionQueryParams=u?.redirectInfo?.jsActionQueryParams;let Qt={type:Oe,payload:{...l,caseID:ft,headers:m}};return n.push(Qt),n}if(u8(i,u?.data?.caseInfo,r))return n;let{context:S,caseViewMode:A,debugInfo:C}=l,_=u?.data?.caseInfo?.assignments?.find(Ye=>Ye.ID===l.assignmentID);l.caseViewMode=gde(_,A);let I=u?.data?.caseInfo?.caseTypeID;s=Dn(I),l.isTraditionalUICase=s;let N=n8(u,l);s&&(N=l.containerName??N);let x=Z(N,S);if(c===or)return await o8(n,h,{actionInPayload:l,target:x}),n;let H=u?.data?.caseInfo?.content,G=u?.data?.caseInfo?.ID,ne=u?.uiResources?.root?.config?.name,j=u?.uiResources?.root?.config?.context;H&&!H[P.getDefaultQualifiedName("pyViewName")]&&ne&&l.viewType!=="page"&&(g.setIn(H,P.getDefaultQualifiedName("pyViewName"),ne),g.setIn(H,P.getDefaultQualifiedName("pyViewContext"),j));let oe=Le(u);i8(oe,l);let Ie=st(x,N,S),he={...l.debugInfo,debugId:l.debugInfo?.debugId??Ge.getCoreHeadersFromContext(S)?.debugInfo?.[d.COREHEADER_APP_DEBUG_ID]};he.debugId&&pt.setComponentCache(G,Ge.addDebugHeaders(he)),await Pe(oe,l,{acName:x,target:x,context:Ie});let Fe={target:x,context:Ie,containerItemID:Ie,headers:m,parentContext:qe(l?.context),isMinimizable:Yt(g.getIn(oe,"data.caseInfo")),doDeleteCaseSummary:l.doDeleteCaseSummary,acTertiary:l.acTertiary,resourceType:E.ASSIGNMENT,debugInfo:C,shouldUpdateCaseActionsInParentContext:!0,caseID:G};xn(Fe,oe,{skipFlowNameUpdate:l?.caseViewMode===d.REVIEW_MODE});let _e=Me(oe,Fe);return l.isProcessAction&&(_e.data.isProcessAction=l.isProcessAction),p8(s,_e),B.setTraditionalGadgetId(_e.data),c8(l,_e),_e.caseViewMode=l.caseViewMode,a8(_e,x,n,l,u,A,f),l8(I,_e.data.caseInfo),d8(x,_e.containerItemID,oe,n),p===it.FORM&&kr(_e.containerItemID)&&(_e.skipMergeAssignmentsAndActions=!1,Eo(_e,n,j)),pr(oe,Fe),qU({actionInContext:S,assignmentID:l.assignmentID,caseKey:_e.key,target:x}),es(_e.key),n}),O(()=>{let a=r,c=oa(),l=Yt(g.getIn(n[0]?.payload,"data.caseInfo"));return s&&c&&l?rp.postCreateCaseMessage(n[0]?.payload?.data?.caseInfo?.assignments?.[0]?.ID,T,n):T(n),mt(n,a,o),n[0]?.payload?.isParallelAssignment&&T({type:wa,payload:{...n[0].payload,isParallelCall:!0}}),n=[],n}))};var hde="Error occurred during ajax call at openWorkByHandle Epic : ",U0=(t,e)=>{let{insKey:r,headers:n,context:o,debugInfo:i,viewType:s}=t,{removeActionPayload:a}=e,c=t?.pageName?t?.pageName:v.getDefaultCasePage(),l=U(Lt,{caseID:r,params:{pageName:c}}),{restApi:u}=l,{reqType:p}=l;return s==="none"&&(u=`${u?.split("viewType")[0]}viewType=none`),u=B.appendExcludeQueryParamToUrl(u),q(yt()?tr(Lt,{queryPayload:{caseID:r,params:{viewType:s==="none"?"none":"page",pageName:c}}}):M(u,{method:p,headers:{...n,...i&&{...Ge.addDebugHeaders(i)}}},o)).pipe(O(m=>(Ve.analyseResponse(m),{response:m.data,actionInPayload:t,headers:$e({...n,...m.headers}),removeActionPayload:a})),me(hde,o,t.actionMgrID))};var h8=async(t,e)=>{let{activateContainerActionPayload:{semanticURL:r,containerItemID:n},actionInPayload:o,actionInPayload:{context:i,skipBrowserSemanticUrlUpdate:s,doDeleteCaseSummary:a}}=e,c=Ut(Lt,o),l=Z(c,i),u=pe(n);await Pe({directUrlUpdation:!s,semanticURL:r},o,{acName:l,containerName:c,target:l,context:u},!1,!!s),t.push(V(nr,{containerItemID:n,target:l,context:u,doDeleteCaseSummary:a}))},y8=(t,e)=>{let{isRemoteCase:r,remoteCaseClass:n}=e,o=Ht(t),i=r?n:yo(t),s=r?"":br(i,ts(t));if(s)return s;let a={id:e?.insKey},c=bt(Lt,{caseClassName:i},a);return c=c?.replace("{workID}",String(er(o)))?.replace("{id}",e?.insKey),c};var S8="OPEN_WORK_BY_HANDLE";var{RESOURCE_TYPES:j0}=E,yde=(t,e)=>{let r=wt(t,e);if(!r)return null;let n=We(t,r);if(!(n?.resourceType===j0.ASSIGNMENT&&typeof n?.context=="string"&&n.context!==""))return null;let i=typeof n.semanticURL=="string"?n.semanticURL.trim():"";return i?{target:t,containerItemID:r,semanticURL:i,insKey:e}:null},Sde=async(t,e,r)=>{let n=e?.containerItemID||null,o=n&&Ke(n)[0]?se(Ke(n)[0]):n,i=o||n,s=pe(i)||i,a=te(s)||te(i),c=s?wn(s):void 0,l=o?W(o)?.caseInfo?.ID:void 0,u=t?.insKey;if(!s||!i||c!==d.REVIEW_MODE||o===n||!l||!u||l!==u)return;let p;try{p=await Ab(U0({...t,context:s,viewType:"none"},{removeActionPayload:void 0}))}catch{return}if(!p||Je(p.type))return;let m=Le(p.response),f=[{path:d.CASE_INFO.ASSIGNMENTS,allowMultiple:!0}],h={...m?.data,caseInfo:{...m?.data?.caseInfo??{},assignments:m?.data?.caseInfo?.assignments??[]}};r.push(V(kn,{containerItemID:i,target:a,context:s,data:h,caseViewMode:d.REVIEW_MODE,isArrayDeepMerge:!0,propertiesToReplace:f}))},Ede=async(t,e,r)=>{let{actionInPayload:n,activateContainerActionPayload:o,type:i,response:s,removeActionPayload:a,headers:c}=t,{context:l,skipBrowserSemanticUrlUpdate:u,debugInfo:p}=n,m=Ut(Lt,n),f=Z(m,l);if(cE(i))await h8(e,{activateContainerActionPayload:o,actionInPayload:n}),await Sde(n,o,e);else{let A=st(f,m,l,{buildNew:!0}),C=Le(s),_=y8(C,n);C.semanticURL=_,C.directUrlUpdation=!u,await Pe(C,n,{acName:f,context:A},!1,!!u);let N=Me(C,{target:f,context:A,containerItemID:A,semanticURL:_,headers:c,debugInfo:p});N.caseViewMode=d.REVIEW_MODE,N.resourceType=j0.CASE,r&&(N.data.caseInfo.content.coexistenceAction="openWorkByHandle",N.data.caseID=N.data.caseInfo.ID),B.setTraditionalGadgetId(N.data),xn(N,C,{skipFlowNameUpdate:!0}),N.currentCaseViewMode=wn(t?.actionInPayload?.context);let x=Gt(f,N);a.containerItemID&&rn(x)&&e.push(V(Qe,{containerItemID:a.containerItemID,target:f})),e.push(x),pr(C,N)}let h=n.insKey;aE({caseKey:h,actionInContext:l,target:f});let S=s?.data?.caseInfo?.assignments?.[0]?.ID;S&&h&&$m({actionInContext:l,assignmentID:S,caseKey:h})},E8=t=>{let e=0,r=[],n=!1;return t.pipe(ee(S8),O(o=>({actionMgrID:e,isAutoRedirection:n=!1}=o.payload,o.payload)),z(o=>{let{context:i,isChild:s,viewType:a}=o,c=Ut(Lt,o),l=Z(c,i),{activate:u,activateContainerActionPayload:p}=ns(j0.CASE,l,o),m=It(l);if(!u&&!m&&o.insKey&&l){let S=yde(l,o.insKey);S&&(u=!0,p=S)}let f=u&&!s&&a!=="none",h=a!=="none"&&!f?vt(l,{loadingContext:i}):Promise.resolve({continueExecution:!0,removeActionPayload:void 0});return n&&pt.setComponentCache("redirectionInProgress",!0),q(h).pipe(z(({continueExecution:S,removeActionPayload:A})=>S?f?(EE(p),Se({type:or,activateContainerActionPayload:p,actionInPayload:o})):U0(o,{removeActionPayload:A}):(n&&pt.setComponentCache("redirectionInProgress",!1),w.rejectActionByID(e),At)))}),z(async o=>{if(o&&Je(o.type))return r.push(ue(o)),r;let i=W(o?.actionInPayload?.context),s=Dn(o?.actionInPayload.className);if(o?.actionInPayload?.viewType==="none"){if(i?.context_data?.caseViewMode!=="perform"){let a=Le(o?.response),c={data:{...a?.data},context:o?.actionInPayload?.context,isArrayDeepMerge:!0};r.push({type:mn,payload:{context:c.context,doDeleteConfirmationDetails:!1}}),s&&c.data.caseInfo?.content&&(c.data.caseInfo.content.coexistenceAction="openWorkByHandle",c.data.caseID=c.data.caseInfo.ID),B.setTraditionalGadgetId(c.data),r.push(V(Re,c));let l=te(o?.actionInPayload?.context),u=jr(o?.actionInPayload?.context),p=Object.freeze({target:l,containerItemID:o?.actionInPayload?.context,context:o?.actionInPayload?.context,containerName:u});if(kr(o?.actionInPayload?.context)){let m=Me(o?.response,{...p});Eo({...m,isArrayDeepMerge:!0},r)}o.actionInPayload.shouldUpdateCaseActionsInParentContext=!0,o.actionInPayload.containerItemID=o?.actionInPayload?.context,o.actionInPayload.caseID=o?.actionInPayload?.insKey,pr(a,o?.actionInPayload)}}else await Ede(o,r,s);return r}),O(()=>(n&&pt.setComponentCache("redirectionInProgress",!1),T(r),mt(r,e),r=[],r)))};var A8="FINISH_ASSIGNMENT";var Ade="Error occurred during ajax call at finishAssignment Epic : ",C8=(t,e)=>{let{assignmentID:r,actionID:n,caseID:o,context:i,additionalHeaders:s={},outcome:a,jsActionQueryParams:c,headers:l}=t,{state$:u}=e,p=jB(t),m=zB(t),f={assignmentID:r,actionID:n,caseID:o,viewType:p},{restApi:h}=U(m,f),{reqType:S}=U(m,f);p&&!h?.includes("viewType=")&&(h=h?.includes("?")?`${h}&viewType=${p}`:`${h}?viewType=${p}`),a&&!h?.includes("outcome")&&(h=h?.includes("?")?`${h}&outcome=${a}`:`${h}?outcome=${a}`),h=Su(c,h),h=B.appendExcludeQueryParamToUrl(h),t.viewType=p;let{content:A}=Rt(i),C=u.value.data[i]?.caseInfo?.headers||{},{etag:_}=C,I={"if-match":_,...l,...s};return q(yt()?tr(m,{queryPayload:{...c,...f,outcome:a},body:A,headers:I}):M(h,{method:S,body:A,headers:I},i)).pipe(O(N=>{let{data:x,headers:H}=N;return Ve.analyseResponse(x),{response:x,actionInPayload:t,headers:$e({...I,...H})}}),me(Ade,i))};var I8=t=>{$.publish(d.PUB_SUB_EVENTS.CASE_EVENTS.CREATE_STAGE_DONE,t)},y_=t=>{$.publish(d.PUB_SUB_EVENTS.EVENT_EXPRESS_LOCALACTION,t)},z0=t=>{$.publish(d.PUB_SUB_EVENTS.ERROR_ON_FINISH_ASSIGNMENT,t)},_8=t=>{$.publish(d.PUB_SUB_EVENTS.EVENT_LOCALACTION_SUBMISSION,t)},b8=t=>{$.publish(d.PUB_SUB_EVENTS.DISPLAY_CASE_SUBMITTED_TOASTER,t)},T8=t=>{$.publish(d.PUB_SUB_EVENTS.EVENT_FINISH_ASSIGNMENT_DONE,t)};var{RESOURCE_TYPES:Cde}=E,Ide=t=>{let e=we()?.getState()?.data,r=e?Object.keys(e).find(o=>o.includes(d.WORKAREA)):void 0;return/^app\/primary(_\d+)?$/.test(t)&&!r},v8=(t,e)=>{let r=0,n=[],o={},i="",s={},a=!1,c=!1;return t.pipe(ee(A8),z(l=>{let u,p,m,f=v.isCoexistenceAppOfType(d.APP_TYPE.UIKIT);if({actionMgrID:r}=l.payload,i=l.payload.context,dt({context:i,stateObj:W(i),clearContextMessages:!0}),!Dr(i)||ev(i)){let h={type:E.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return w.rejectActionByID(r,!0,h),Ct.handleDeferredActionCompletion(l.payload.context).then(()=>{z0({errorType:E.ERROR_TYPE.CLIENT})}),Se([])}return Se(l.payload).pipe(z(h=>{pt.setComponentCache("lastActionID",h?.actionID),d_(n,h);let S={...h};return C8(S,{state$:e})}),z(async h=>{if(h&&h.type===Te){tE(h);let Ft=ue(h);return n.push(Ft),n}Io.clearContextedCache(i);let{headers:S,actionInPayload:A,response:C}=h,{containerItemID:_,context:I=pe(_),isModalAction:N,isInCreateStage:x}=A;a=A.isCaseWideAction,c=A.isProcessAction;let H=te(_);A.target=H;let G=jr(_),ne=Object.freeze({target:A.target,containerItemID:_,context:I,containerName:G});g.setIn(C.data,d.CASE_INFO.IS_FIRST_ASSIGNMENT,!1),g.setIn(C.data,d.CASE_INFO_IS_LOCAL_ACTION,!1),C?.uiResources?.root?.config?.name&&A.viewType!=="page"&&g.setIn(C.data,d.CASE_INFO.VIEW_NAME,C?.uiResources?.root?.config?.name),y_({submitResponse:C});let j=Le(C,{[E.STOPMERGEACTIONS]:!C.nextAssignmentInfo}),oe=yo(j),Ie=qe(A.context),he=Ke(Ie)[0]?se(Ke(Ie)[0]):Ie,De=lE(j),Fe=x&&!De;N&&!x&&!hl(A.context,he)&&(j=yE(j,W(_)));let _e=Me(j,{headers:S,actionMgrID:r,directUrlUpdation:!1,isActiveWorkAreaPrimaryAndWorkareaAbsent:Ide(he||"")});if(uE(_e.data,A),_e.caseClassName=oe,_e.resourceType=Cde.ASSIGNMENT,_e.headers=S,j?.uiResources?.root?.type==="AutoClose"){let Ft=we()?.getState()?.data?.[ne.context]?.caseInfo,{ID:ao,name:Ja,content:Ya}=Ft;return n=await qB(A),b8({ID:ao,caseName:Ja,content:Ya,status:Lo(j).status}),n}let Oe,ft,Qt=j?.data?.caseInfo?.assignments?.some(Ft=>Ft.ID===A.assignmentID),yr=GB(j,A),Xt=BB(Qt,he,j,N,yr),un=A?.actionID===E.LOCAL_ACTIONS.TRANSFER_ASSIGNMENT,bo=It(te(he));if(j?.data?.nextAssignmentInfo&&!un)_e.caseViewMode=d.PERFORM_MODE,Oe=Ht(j),ft=!0;else if(Xt&&!un)j?.confirmationNote&&j?.uiResources?.root?.config?.name===d.PY_CONFIRM?_e.caseViewMode=d.REVIEW_MODE:_e.caseViewMode=d.PERFORM_MODE,Oe=Ht(j),bo&&(_e.flowName=" "),_e.deleteAssignmentSpecificResources=!1,ft=!1;else{_e.caseViewMode=d.REVIEW_MODE,g.setIn(_e.data,"context_data.caseViewMode",d.REVIEW_MODE);let Ft=$U(j?.data?.caseInfo);j?.confirmationNote&&(Ft||j?.uiResources?.root?.config?.name===d.PY_CONFIRM)&&!bo?Oe=Ht(j):Oe="",ft=!1}let Rr=Ht(j),Vn=!1;xn(_e,j,{skipFlowNameUpdate:_e?.caseViewMode===d.REVIEW_MODE||Xt});let Kr=br(oe,ts(j))||bt("createWork",{caseClassName:oe}).replace(/{.+?}/,String(er(Rr)));if(j.semanticURL=Kr,_e.semanticURL=Kr,N?(await f_(A,_e,ft,Oe,j,n,h,C,!1,s),Fe&&(o=m_(A),_e.caseViewMode===d.PERFORM_MODE&&es(Rr))):x&&f&&!De?(v.setDefaultCasePage(d.PY_DETAILS),await HB(C,n,qe(I))):(await M0(_e,A,j,ne,n),Vn=ft&&_e.caseViewMode===d.PERFORM_MODE&&!a&&!c),he?.includes(d.ACTIONAREA)&&I===he){nn.clearChangedProperties(I);let Ft=W(he);n=[{type:ji,payload:{actionID:Ft.caseInfo.activeActionID,context:he,containerItemID:_,target:te(he),actionMgrID:w.getNextActionMgrId(),containerName:d.ACTIONAREA,localActionType:E.LOCAL_ACTION_TYPE.CASE_WIDE,caseID:Ft.caseInfo.ID}}]}if(ia(h,n),Ct.handleDeferredActionCompletion(i).catch(()=>{}),g_(_e,A,he),Vn&&es(Rr),!j?.data?.nextAssignmentInfo){let Ft=FB(j,A);Iu(Rr),sE({...Ft,containerItemID:_})}return p_(n,{transientItemID:_,target:H,isModalAction:N}),p=j,m=A,u=A,n}),O(()=>{let h=n.find(S=>S.type===Te);return h?(Ct.handleDeferredActionCompletion(i).then(()=>{z0({errorType:E.ERROR_TYPE.SERVER})}).catch(()=>{}),h_(h),w.rejectActionByID(r)):w.resolveActionByID(r,o),s?.caseId&&I8(s),hn(n),wm()&&p&&m&&pr(p,m.__deferCaseActionsPayload??m),!h&&(a||c)&&_8({updateState:!0}),!h&&u&&T8(u),n=[],o={},s={},n}))}))};var R8="CANCEL_ASSIGNMENT";var qa=t=>{let e={},{routeKey:r,isModalAction:n,caseID:o,context:i,RemoteSystemID:s}=t;s&&(e.RemoteSystemID=s);let a=r||zk,{restApi:c,reqType:l}=U(a,{ID:o,caseID:o,viewType:it.PAGE}),u=pt.getComponentCache(o),p=u&&typeof u=="object"?u:{},m=B.appendExcludeQueryParamToUrl(c);return q(M(m,{method:l,headers:{...e,...p}},i,{includeRemoteSystemIdIfPresent:!!s})).pipe(O(f=>(pt.resetComponentCache(o),n?{actionInPayload:t}:{response:f.data,actionInPayload:t,headers:$e(f.headers)})),me(": Error occurred during ajax call at release lock request : ",i))};var F0=(t,e)=>{let{isModalAction:r}=e;return qa({routeKey:Uk,isModalAction:r,...t})};var P8=t=>{let{isModalAction:e,containerItemID:r}=t;return e?ge.MODAL:jr(r)},N8=async(t,e)=>{let{childContainerItemID:r,caseViewMode:n,referencedUsers:o,response:i}=e,s=qe(r),a=pe(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:o,context_data:{caseViewMode:n}}},p=[];c&&p.push({path:d.CASE_INFO.ASSIGNMENTS,allowMultiple:!0}),p.length>0?t.push(V(Re,u,{propertiesToReplace:p})):t.push(V(Re,u))};var _de=(t,e)=>{let r=pe(e);return(r&&r!==t?[t,r]:[t]).some(o=>_s.isContextStale(o))},O8=t=>{let e=0,r=[];return t.pipe(ee(R8),O(n=>({actionMgrID:e}=n.payload,n.payload)),z(n=>{let{isModalAction:o}=n;n.context||(n.context=pe(n.containerItemID));let{context:i}=n,s=P8(n),a=Z(s,i);return _de(i,n.containerItemID)?(n.RemoteSystemID=ae.getRemoteHeaderByContext(n.context)??void 0,q(F0(n,{isModalAction:o}))):q(vt(a,{loadingContext:i})).pipe(z(({continueExecution:c})=>c?(n.RemoteSystemID=ae.getRemoteHeaderByContext(n.context)??void 0,q(F0(n,{isModalAction:o}))):(w.rejectActionByID(e),At)))}),z(n=>{if(n&&n.type===Te)return r.push(ue(n)),q([r]);let{actionInPayload:o,response:i}=n,{containerItemID:s,isModalAction:a,isInCreateStage:c}=o,l=o.caseID??Ht(i);i?.data.caseInfo&&(i.data.caseInfo.availableProcesses=i.data.caseInfo.availableProcesses??[]);let u=te(s),p=pe(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:Ht(i),skipReleaseLockRequest:!1};return c&&r.push(V(rr,m)),!a&&kr(s)&&N8(r,{childContainerItemID:s,caseViewMode:d.REVIEW_MODE,referencedUsers:i?.data.referencedUsers,response:i}),l&&Iu(l),m.skipReleaseLockRequest=!0,n.actionInPayload.shouldUpdateCaseActionsInParentContext=!0,pr(n?.response,n?.actionInPayload),r.push(V(Qe,m)),q([r])}),O(()=>(T(r),mt(r,e),r=[],r)))};var x8="NAVIGATE_TO_STEP";var bde="Error occurred during ajax call at navigateToStep Epic : ",D8=(t,e)=>{let{ID:r,stepID:n,containerItemID:o,context:i=pe(o),isInCreateStage:s}=t,{state$:a}=e,c=s?it.PAGE:it.FORM,l={ID:r,stepID:n,viewType:c},{restApi:u,reqType:p}=U(Fk,l),{content:m}=Rt(i),f=a.value.data[i].caseInfo.headers,h=B.appendExcludeQueryParamToUrl(u);return q(M(`${h}`,{method:p,body:m,headers:{"if-match":f&&f.etag}},i)).pipe(O(S=>({response:S.data,actionInPayload:t,headers:$e({...f,...S.headers})})),me(bde,i))};var{RESOURCE_TYPES:Tde}=E,w8=(t,e)=>{let r=0,n=[];return t.pipe(ee(x8),Vt(o=>{({actionMgrID:r}=o.payload);let i,s;return Se(o.payload).pipe(z(a=>(Vm(a.context),D8(a,{state$:e}))),z(async a=>{if(a&&Je(a.type))return n.push(ue(a)),n;let{actionInPayload:c,response:l,headers:u}=a,{containerItemID:p,context:m=pe(p),isModalAction:f}=c;Io.clearContextedCache(c.context);let h=te(p),S=jr(p),A=Object.freeze({target:h,containerItemID:p,context:m,containerName:S}),C=l?.data?.caseInfo?.content,_=l?.uiResources?.root?.config?.name,I=l?.uiResources?.root?.config?.context;C&&!C[P.getDefaultQualifiedName("pyViewName")]&&_&&c.viewType!=="page"&&(g.setIn(C,P.getDefaultQualifiedName("pyViewName"),_),g.setIn(C,P.getDefaultQualifiedName("pyViewContext"),I)),i=Le(l);let N={acName:h,...A};await Pe(i,c,N),s=Me(i,{...A,headers:u}),l?.nextAssignmentInfo||(s.caseViewMode=d.REVIEW_MODE),ia(a,n),s.doDeleteCaseSummary=c.doDeleteCaseSummary,s.resourceType=Tde.ASSIGNMENT,s.caseID=Ht(i),xn(s,i),uE(s.data,c);let x=i.data?.caseInfo?.stages,H=i.data?.caseInfo?.stageID;if(iE({caseID:Ht(i),context:c.context,assignmentId:c.assignmentID,isLocalAction:!!c.isLocalAction,isModalAction:f,stages:x,stageID:H}),kr(p)){let G=B.getPropertiesToReplace(p);Eo(s,n,"",{propertiesToReplace:G})}return n.push(V(rr,s)),s.shouldUpdateCaseActionsInParentContext=!0,n}),O(()=>(T(n),i&&s&&pr(i,s),mt(n,r),n=[],n)))}))};var $8=t=>{let{caseID:e,context:r}=t,{restApi:n,reqType:o}=U(cS,{ID:e});return q(M(n,{method:o},r)).pipe(O(i=>(Ve.analyseResponse(i.data),{response:i.data,actionInPayload:t,headers:$e(i.headers)})),me(": Error occurred during ajax call at deleteCaseInCreateStage Epic : ",r))};var M8=t=>{$.publish(d.PUB_SUB_EVENTS.CASE_EVENTS.CREATE_STAGE_DELETED,t)};var vde=(t,e)=>{let r=0,n,o=[];return t.pipe(ee(vh),O(i=>({actionMgrID:r,caseType:n}=i.payload,i.payload)),z(i=>i.ignoreCaseDeletion?Se({actionInPayload:i}):$8(i)),z(async i=>{if(i&&Je(i.type)){let{payload:m}=i,f=ue({...i,...m,actionMgrID:r});return o.push(f),o}let{actionInPayload:s}=i,{context:a,isModalAction:c}=s,l=c?ge.MODAL:ge.PRIMARY,u=Z(l,a);if(!c&&u){let m={acName:u,target:u,context:a},f=e.value.containers[u],{semanticURL:h}=MU(f);await Pe({directUrlUpdation:!0,semanticURL:h},s,m)}if(s.isProcessAction&&s.parentCaseInfo){let m={insKey:s.parentCaseInfo.ID,className:s.parentCaseInfo.content.classID,context:s.parentContext,acTargetName:d.PRIMARY,isChild:!0},f={type:uo,payload:{...m}};o.push(f)}let p={target:u,containerItemID:a,context:a,caseDeleted:!0};return o.push(V(Qe,p)),o}),O(()=>(T(o),mt(o,r)===d.PROMISE_VALUE.RESOLVE&&M8({caseType:n}),o=[],o)))},k8=vde;var L8=(t,e)=>{let{assignmentID:r,actionID:n,context:o}=t,{restApi:i,reqType:s}=U(jk,{assignmentID:r,actionID:n}),{content:a}=Rt(o),c=e.value.data[o]?.caseInfo?.headers,l=B.appendExcludeQueryParamToUrl(i);return q(M(l,{method:s,body:a,headers:{"if-match":c&&c.etag}},o)).pipe(O(u=>({response:u.data,actionInPayload:t,headers:$e(u.headers)})),me(": Error occurred during ajax call at saveAndCloseAssignment Epic at save action : ",o))};var U8=t=>{$.publish(d.PUB_SUB_EVENTS.CASE_EVENTS.SAVE_ASSIGNMENT_COMPLETE,t)};var V0=(t,e=!1)=>{let{action:r,state$:n,actionMgrID:o}=t,i=r.payload.autosave===!0,s,a={},c=[];return Se(r.payload).pipe(z(l=>{s=re("caseInfo.ID","",l.context)||void 0;let u=re("caseInfo.caseTypeID","",l.context),p=re("caseInfo.businessID","",l.context);return a=br(u,p)?{caseTypeID:u,businessID:p}:{},L8(l,n)}),Ac(l=>{if(l&&Je(l.type))return Se(l);let{containerItemID:u}=l&&l.actionInPayload,p=qe(u),m=te(p),f=ut(m),h=Ke(p)[0],S=h?se(h):p;!It(te(S))&&({containerItemID:S}=qd(S,l.actionInPayload.caseID,h));let C=se(m);r.payload.canUpdateAvailableActions&&Cu(l.response);let _=ae.getRemoteHeaderByContext(l.actionInPayload.context),I={...l.actionInPayload,RemoteSystemID:_===null?void 0:_},N=x=>V(Re,{context:x,data:{caseInfo:{...l.response.data?.caseInfo||{},headers:l.headers}}});if(S&&c.push(N(S)),f?.items?.[C]?.key===l?.actionInPayload?.caseID){let x={context:p,data:{...l.response.data,caseInfo:{...l.response.data?.caseInfo||{},headers:l.headers}}},H=B.getPropertiesToReplace(u);c.push(V(Re,x,{propertiesToReplace:H}))}return i||c.push(V(rr,{context:u})),ia(l,c),qa(I)}),z(async l=>{if(l&&Je(l.type)){let{payload:A}=l,C=ue({...l,...A,actionMgrID:o});c.push(C);let _=t.action.payload.modalLoadingContainer;if(_){let I=_.context,{context_data:N}=W(I)||{};N?.isLoading&&aa(I)}return c}let{actionInPayload:u,response:p}=l,{context:m,containerName:f}=u,S={target:Z(f,m),containerItemID:m,context:m};return u.shouldUpdateCaseActionsInParentContext=!0,pr(p,u),!e&&!i&&c.push(V(Qe,S)),c}),O(()=>(T(c),mt(c,o),i||U8({context:r.payload.context,caseID:s,assignmentID:r.payload.assignmentID,...a}),e||(c=[]),Ct.isDeferredActionInProgress(r.payload.context)&&Ct.handleDeferredActionCompletion(r.payload.context),c)))},Rde=(t,e)=>{let r=0,n;return t.pipe(ee(Ii),Vt(o=>{let{saveOnly:i}=o.payload;return{actionMgrID:r,caseType:n}=o.payload,V0({action:o,state$:e,actionMgrID:r,caseType:n},i)}))},j8=Rde;var z8=t=>{$.unsubscribe(d.PUB_SUB_EVENTS.EVENT_EXPRESS_LOCALACTION,t)},F8=(t,e)=>{$.subscribe(d.PUB_SUB_EVENTS.EVENT_EXPRESS_LOCALACTION,t,e)};var S_=t=>{let{callbacks:e}=t;e?.submit&&F8(n=>{e.submit(n),z8("expressLocalActionSubmit")},"expressLocalActionSubmit")},V8=t=>{let e=0,r,n=[],o={value:we()?.getState()};return Se(t).pipe(ee(Ii),Vt(i=>{let{isFormValid:s}=i.payload;if({actionMgrID:e,caseType:r}=i.payload,!s){let c={type:E.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return w.rejectActionByID(e,!0,c),Se([])}return V0({action:i,state$:o,actionMgrID:e,caseType:r,actionsOut:n},!0)}))};var{LOCAL_ACTION_TYPE:B8}=d,{RESOURCE_TYPES:Pde}=E,Nde=t=>{let e=t.localActionType?.toLowerCase();return e===B8.CASE_WIDE||e===B8.EXPRESS||e&&t.isPromotedAction?Gs:lS},ap=(t,e)=>{let{actionID:r,assignmentID:n,caseID:o,context:i,openActionType:s,modalLoadingContainer:a,headers:c}=t,{isProcessAction:l}=e,u=l?tu:Nde(t),p=it.FORM,{reqType:m}=U(u,{caseID:o,ID:n,actionID:r,viewType:p}),{restApi:f}=U(u,{caseID:o,ID:n,actionID:r,viewType:p});t.actionType=u===Gs?d.CASE:d.ASSIGNMENT,f&&!f.includes("viewType=")&&(f=f.includes("?")?`${f}&viewType=${p}`:`${f}?viewType=${p}`),f=B.appendExcludeQueryParamToUrl(f);let h=a?.context??i;return q(M(f,{method:m,headers:c},h)).pipe(O(S=>({response:S.data,actionInPayload:t,headers:$e(S.headers,"",t.headers)})),me(`: Error occurred during ajax call at ${s} Epic : `,h))},E_=(t,e)=>{let{isProcessAction:r}=e,n=r?tu:lS;t.openActionType=n;let o=Ut(n,t),i;if(o==="modal"){if(!Mo.isOnline()||t.isAppOffline)return w.rejectActionByID(t.actionMgrID),Promise.resolve();i=Ke(t.contextName)[0]?Ke(t.contextName)[0]:te(t.contextName);let s=i?se(i):t.contextName,a=pe(s),c=Ut(t.openActionType,t),l=Z(c,t.context),u=Zr(t.context,ur(c,t.context));if(T(Pt({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}})),T(Fh({context:u})),t.modalLoadingContainer={target:l,context:u},!Ke(t.contextName)[0]||!t.continueExecution||!xr(a))return ap(t,e);t.saveActionPayload.modalLoadingContainer=t.modalLoadingContainer,t.saveActionPayload.canUpdateAvailableActions=!t.saveActionPayload.isModalAction;let p=ul(t.saveActionPayload);return q([p]).pipe(z(m=>V8(m)),z(m=>m.length===1&&Je(m[0].type)?q(vt(i,{loadingContext:t.context})).pipe(z(({continueExecution:f})=>f?ap(t,e):(w.rejectActionByID(t.actionMgrID),At))):ap(t,e)),O(m=>m))}return ap(t,e)},Ode=t=>t==="async"?"submitBulkActionAsync":"submitBulkAction",xde=t=>t.containerItemID?.includes(d.ACTIONAREA)&&t.context?.includes(d.ACTIONAREA),cp=async(t,e,{headers:r,actionInPayload:n})=>{let{context:o,actionName:i,openActionType:s,doDeleteCaseSummary:a,modalLoadingContainer:c,skipMergeAssignmentsAndActions:l}=n,u=Le(t),p=Ut(s,n),m=c?.target??Z(p,o),f,h,S=!1;!Fr(m)||mr(m)&&!ml(m,t.data.caseInfo.ID)?(h=ur(p,o),tn(p)&&(h=Zr(o,h)),f=h,S=!0):(mr(m)?f=wt(m,t.data.caseInfo.ID):f=se(m),h=pe(f)),await Pe(u,n,{acName:m,target:m,containerName:p,context:h}),(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,_;C?_=d.PERFORM_MODE:_=d.REVIEW_MODE;let I=Me(u,{target:m,context:h,containerItemID:f,caseViewMode:_,doDeleteCaseSummary:a,headers:r,actionName:i,isMinimizable:!1,isInCreateStage:tn(p),resourceType:Pde.ASSIGNMENT,isProcessAction:n.isProcessAction,showProgress:n.showProgress,progressMessage:n.progressMessage,assignmentID:n.assignmentID,actionType:n.actionType,skipMergeAssignmentsAndActions:l});C&&xn(I,u),tn(p)&&delete I.doDeleteCaseSummary,n.openActionType===pc&&(I.isBulkAction=!0,I.data.caseInfo.actionButtons.main[0].jsAction=Ode(n.runningMode),I.data.caseInfo.actionButtons.secondary[0].jsAction="cancelBulkAction",I.data.caseInfo.cases=n.selectedList,I.data.caseInfo.isAssignment=n.isAssignment);let N;if(S?N=Pt:n.isProcessAction||xde(n)?N=kn:N=rr,I.data.context_data.isProcessAction=n.isProcessAction,e.push(V(N,I)),S||e.push(V(As,I)),S){let G=Ke(n.contextName),ne=wt(G,t.data.caseInfo.ID);if(ne){let j={data:{caseInfo:{headers:r}},context:ne};e.push(V(Re,j))}}f!==se(m)&&e.push(V(nr,{target:m,containerItemID:f})),kr(f)&&!c?.context&&Eo(I,e);let x=I.nextAssignmentInfo?.context==="other";return n.isProcessAction&&!Dn(I.nextAssignmentInfo?.className)&&!x&&ia({response:u,actionInPayload:{...n,containerItemID:f}},e),I.caseViewMode===d.REVIEW_MODE&&e.push(V(Qe,I)),I.shouldUpdateCaseActionsInParentContext=!0,g.getIn(t.data,["caseInfo","isLocalAction"])||pr(u,I),e};var H8="OPEN_LOCAL_ACTION";var G8=(t,e)=>E_(t,e);var Dde=t=>{let e=0,r=[];return t.pipe(ee(H8),O(n=>({actionMgrID:e}=n.payload,n.payload)),ri(()=>!bu(e)),z(n=>G8(n,{actionMgrID:e})),z(async n=>{if(!n)return At;if(Je(n.type)){let l=ue(n);r.push(l);let{context_data:u}=W(n.payload.context)||{};return u?.isLoading&&r.push(V(As,n.payload)),r}let{actionInPayload:o,headers:i,response:s}=n,{actionID:a}=o;g.setIn(s,"data.caseInfo.activeActionID",a);let c=g.getIn(s,"data.caseInfo.ID");return es(c),g.setIn(s.data,d.CASE_INFO_IS_LOCAL_ACTION,!0),o.refreshConditions&&g.setIn(s.data,d.CASE_INFO_REFRESH_CONDITIONS,o.refreshConditions),await cp(s,r,{headers:i,actionInPayload:o}),S_(o),r}),O(()=>(T(r),mt(r,e),r=[],r)))},q8=Dde;var W8=t=>{let{actionID:e,context:r,openActionType:n,caseTypeID:o,bulkContextID:i="",bulkContextType:s=""}=t,a=pc,{reqType:c,restApi:l}=U(a,{caseTypeID:o,actionID:e,bulkContextID:i,bulkContextType:s});return q(M(l,{method:c},r)).pipe(O(u=>({response:u.data,actionInPayload:t,headers:$e(u.headers)})),me(`: Error occurred during ajax call at ${n} Epic : `,r))};var K8=t=>{$.unsubscribe(d.PUB_SUB_EVENTS.EVENT_BULKACTION,t)},J8=(t,e)=>{$.subscribe(d.PUB_SUB_EVENTS.EVENT_BULKACTION,t,e)};var Y8=(t,e)=>{let{context:r}=t,{actionMgrID:n}=e;t.openActionType=pc;let o=Ut(pc,t),i=Z(o,r);return q(vt(i,{loadingContext:r})).pipe(z(({continueExecution:s})=>s?W8(t):(w.rejectActionByID(n),At)))},Z8=t=>{let{callbacks:e}=t;e?.submit&&J8(n=>{e.submit(n),K8("bulkActionSubmit")},"bulkActionSubmit")};var Q8="OPEN_BULK_ACTION";var wde=t=>{let e=0,r=[];return t.pipe(ee(Q8),O(n=>({actionMgrID:e}=n.payload,n.payload)),z(n=>Y8(n,{actionMgrID:e})),z(async n=>{if(n&&Je(n.type??"")){let c=ue(n);return r.push(c),r}let{actionInPayload:o,headers:i,response:s}=n,{actionID:a}=o;return g.setIn(s,"data.caseInfo.activeActionID",a),await cp(s,r,{headers:i,actionInPayload:o}),Z8(o),r}),O(()=>(r.length===1&&Je(r[0].type)?w.rejectActionByID(e):w.resolveActionByID(e),T(r),r=[],r)))},X8=wde;var e5=t=>{let{actionID:e,context:r,cases:n,classID:o,isAssignment:i}=t,{content:s}=Rt(r,{nonEmptyAndChangedData:!0}),a=5;try{$n.getSharedState(P.getQualifiedNameForComplexRuleReferences("D_pySingleExecutionBulkActionsMeta.D_pySingleExecutionBulkActionsMeta.pxResults"))?.find(A=>A[P.getDefaultQualifiedName("pyClassName")]===o)?.pyList.split(",").includes(e)&&(a=1)}catch(S){console.error('Failed to fetch to "D_pySingleExecutionBulkActionsMeta" DP response',S)}let c=n.map(S=>({ID:S})),l=c.length/a,u=i?Gk:uS,{reqType:p,restApi:m}=U(u,{actionID:e}),f=[],h=c.length;for(let S=0;S<h;S+=l){let A=c.slice(S,S+l);i?s.assignments=A:s.cases=A,A.length&&f.push(q(M(m,{method:p,body:s},r)).pipe(O(C=>{let{data:_,headers:I}=C;return{response:_,actionInPayload:t,headers:$e({...I})}}),me("Error occurred during ajax call at submitbulkaction Epic : ",r)))}return Cb(f)};var t5=t=>{$.publish(d.PUB_SUB_EVENTS.EVENT_BULKACTION,t)};var r5="SUBMIT_BULK_ACTION";var n5=t=>{let e=0,r=[],n,o="";return t.pipe(ee(r5),Vt(i=>{let{isFormValid:s}=i.payload;if({actionMgrID:e}=i.payload,!s){let a={type:E.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return w.rejectActionByID(e,!0,a),Se([])}return Se(i.payload).pipe(z(a=>(n=a,e5(n))),z(a=>{let c=0,l=0,u=[],{containerItemID:p,context:m}=n;return a.forEach(f=>{let{response:h}=f;c+=Number(h.successCount),l+=Number(h.failureCount),l&&h.results.forEach(S=>{S.status!=="200"&&S.error&&S.error.errorDetails&&S.error.errorDetails.forEach(A=>{u.push({ID:S.BusinessID,message:A.localizedValue})})})}),o=`${c} record(s) updated`,t5({submitResponse:a}),n.target=v.getRenderingMode()==="HYBRID"?te(p):`${d.APP.APP}/${ge.MODAL}`,r.push(V(Qe,{containerItemID:p,context:m,target:n.target,skipReleaseLockRequest:!0})),l&&r.push(V(zm,{messages:[{type:"error",message:l===1?"1 record failed to update":`${l} records failed to update`,errorDetails:u,showHeader:!1}],context:qe(m)||m,category:"HTTP",showHeader:!1})),r}),O(()=>(w.resolveActionByID(e,o),T(r),r=[],r)))}))};var o5=t=>{let{actionID:e,context:r,cases:n}=t,{content:o}=Rt(r,{nonEmptyAndChangedData:!0});o.cases=n.map(c=>({ID:c}));let i=uS,{reqType:s,restApi:a}=U(i,{actionID:e,runningMode:"async"});return q(M(a,{method:s,body:o},r)).pipe(O(c=>{let{data:l,headers:u}=c;return{response:l,actionInPayload:t,headers:$e({...u})}}),me("Error occurred during ajax call at submitbulkactionasync Epic : ",r))};var i5=t=>{$.publish(d.PUB_SUB_EVENTS.EVENT_BULKACTION,t)};var s5="SUBMIT_BULK_ACTION_ASYNC";var a5=t=>{let e=0,r=[],n,o={};return t.pipe(ee(s5),Vt(i=>{let{isFormValid:s}=i.payload;if({actionMgrID:e}=i.payload,!s){let a={type:E.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return w.rejectActionByID(e,!0,a),Se([])}return Se(i.payload).pipe(Vt(a=>(n=a,o5(n))),O(a=>{let{containerItemID:c,context:l}=n,{response:u}=a;return o={caseID:u.caseID,caseTypeID:"BackgroundJob"},i5({submitResponse:u}),n.target=`${d.APP.APP}/${ge.MODAL}`,r.push(V(Qe,{containerItemID:c,context:l,target:n.target,skipReleaseLockRequest:!0})),r}),O(()=>(w.resolveActionByID(e,o),T(r),r=[],r)))}))};var c5=(t,e)=>E_(t,e);var $de=t=>{let e=0,r=[];return t.pipe(ee(eI),O(n=>({actionMgrID:e}=n.payload,n.payload)),z(n=>{let i=Ut(tu,n),s=Z(i,n.context);return q(vt(s,{loadingContext:n.context})).pipe(z(({continueExecution:a})=>a?(Vm(n.context),c5(n,{actionMgrID:e,isProcessAction:!0})):(w.rejectActionByID(n.actionMgrID),At)))}),z(async n=>{if(n&&Je(n.type)){let a=ue(n);return r.push(a),r}let{actionInPayload:o,headers:i,response:s}=n;return await cp(s,r,{headers:i,actionInPayload:o}),r}),O(()=>(hn(r),mt(r,e),r=[],r)))},l5=$de;var u5=t=>{let e=0,r=[];return t.pipe(ee(Ze,et),O(n=>({actionMgrID:e}=n.payload,n.payload)),z(n=>{let{containerItemID:o,caseID:i,context:s,caseDeleted:a,skipReleaseLockRequest:c,currentCaseViewMode:l,isProcessAction:u,isInCreateStage:p,deleteWork:m}=n,f=l===d.PERFORM_MODE,h=i&&f;return m?Se([]):u&&p?qa(n):o===s&&!a&&!c&&h?qa(n):o?.includes(d.MODAL)&&wn(Ma(o))===d.REVIEW_MODE?qa(n):Se([])}),z(n=>(n&&Je(n.type)&&r.push(ue(n)),r)),O(()=>(T(r),mt(r,e),r=[],r)))};var Mde=t=>{let{context:e,containerItemID:r}=t.payload;if(typeof r!="string"||!r)return!1;let n=pe(r);return(n&&n!==e?[e,n]:[e||r]).some(i=>typeof i=="string"&&!!i&&_s.isAssignmentStale(i))},d5=t=>t.pipe(ee(eu),HS(()=>BS(100)),O(e=>{if(Mde(e))return T({type:Ui,payload:e.payload}),[];let{actionMgrID:r,isChildCase:n,isModalAction:o,isProcessAction:i,isDataObject:s,skipReleaseLockRequest:a,isInCreateStage:c,containerItemID:l,context:u}=e.payload;return w.resolveActionByID(r),$.publish(d.PUB_SUB_EVENTS.EVENT_SHOW_CANCEL_ALERT,{isModalAction:o,hideDelete:i?!1:n,isDataObject:s,skipReleaseLockRequest:a,isInCreateStage:c,containerItemID:u||l}),[]})),p5=t=>t.pipe(ee(iS),HS(()=>BS(100)),O(e=>{let{actionMgrID:r,context:n,containerName:o,containerItemID:i}=e.payload,s=Z(o,n);return w.resolveActionByID(r),T(V(nr,{containerItemID:i,target:s,doDeleteCaseSummary:!1})),[]}));var m5=t=>{let e=0,r=[],n="";return t.pipe(ee(Bi),O(o=>({actionMgrID:e}=o.payload,o.payload)),z(o=>t_(o)),z(async o=>{if(o&&o.type===Te)return r.push(ue(o)),{actionsOut:r,actionInPayload:{skipPageInstructions:!0}};let{actionInPayload:i,response:s,headers:a}=o,c=i.containerName,l=Z(c,i.context),u=st(l,c,i.context);u=Zr(i.context,u);let{pageReference:p,targetProperty:m,index:f,subscriptFieldName:h,pageGroupName:S,actionType:A,isPageGroup:C}=i,_=p?.startsWith(E.OBJECT_INFO.OBJECT_INFO),I=null;_?(I=Ve.transformCaseData(s),I.uiResources.root.config.context=`${p}${m}[${f}]`):I=s;let N=I?.uiResources?.root?.config?.name??i.interestPageActionID,x=Le(I);x.key=i.ID,x.data?.caseInfo?(x.data.caseInfo.ID=i.ID,SV(x,f,h,A,S)):x.data?.objectInfo&&(x.data.objectInfo.ID=i.ID);let{interestPageActionID:H,editType:G,isLocalAction:ne,actionID:j}=i,oe={isMultiRecordData:!0,viewName:i.viewID,parentContext:i.context,interestPage:i.interestPage,interestPageActionID:H,editType:G,isLocalAction:ne,actionID:j};x.uiResources.context_data.modalView=oe;let Ie=W(i.context)?.context_data?.caseInfo,he=`${i.pageReference}${i.targetProperty}`,De=QT(Ie,he,i.index);x.uiResources.context_data.caseInfo={...x.uiResources.context_data.caseInfo,content:g.mergeDeep(x.uiResources.context_data.caseInfo?.content,De?.content)};let Fe=J.getProperty(d.CASE_INFO.REMOTESYSTEMID,"",i.context);await Pe(x,i,{acName:l,context:u});let Ye={target:l,context:u,containerItemID:u,headers:a,index:f,subscriptFieldName:h,pageGroupName:S,isPageGroup:C};Fe&&(Ye.headers={...Ye.headers,RemoteSystemID:Fe});let Oe=Me(x,Ye);Oe.resourceStatus=i.actionType,Oe.isMultiRecordData=!0,Oe.readOnly=i.readOnly,Oe.parentContext=i.context,Oe.heading=i.heading,Oe.data.caseInfo&&G===d.ACTION&&(Oe.data.caseInfo={...Oe.data.caseInfo,...EV(i),isLocalAction:i.isLocalAction}),Oe.clearStateMachine=!1,i.viewName=N;let ft=Gt(l,Oe);n=u,r.push(ft);let Qt={changedListProperty:[],leafProperty:[]};return G===d.ACTION&&(ke.registerForServerChanges(),Qt=Cr.getServerProperties(Oe.data,u)),{actionsOut:r,actionInPayload:i,serverProps:Qt}}),O(({actionInPayload:o,serverProps:i={changedListProperty:[],leafProperty:[]}})=>{if(vc(r)?w.rejectActionByID(e):w.resolveActionByID(e),o.skipPageInstructions||yV(n,o.pageReference,o.targetProperty,o.index,o.actionType),T(r),r=[],o.editType===d.ACTION){Cr.handleServerChanges(n,i.changedListProperty,i.leafProperty),ke.unRegisterForServerChanges();let s=d.getProperty(E.CASE_INFO.CASE_INFO_CONTENT),a=g.convertClipboardPageToPageRefNotation(o.interestPage),c=s+a;o.columns.forEach(l=>{let u=fe.trimAnnotation(l.config.value),p=re(u,c,n),m=lt(u.startsWith(".")?u.split(".").pop():u,l.config.classID);be.getFieldNode(n,c,o.viewName,u)||be.addFieldNode(n,c,o.viewName,u,p,{isDeclarativeTarget:!!m?.isDeclarativeTarget,context:n,propertyName:u,pageReference:c,value:l.config.value,isInsideList:/\[\d+\]/.test(c)||/\[\d+\]/.test(u)})})}return r}))};var kde=(t,e=!1)=>t===d.ACTION?e?jt.REFRESH_CASE_DATA:jt.REFRESH_ASSIGNMENT_DATA:jt.REFRESH_CASE_VIEW,f5=t=>{let{context:e}=t,n={...Rt(e).content,contextData:!1},o=Nu(e);g.isEmpty(o)||(n=wc(o,n));let i=kde(t.editType,t.isLocalAction),{restApi:s,reqType:a}=U(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}`,n.interestPageActionID=t.interestPageActionID),n.interestPage=t.interestPage,q(M(c,{method:a,body:n,headers:t.headers},e)).pipe(O(l=>({actionInPayload:t,response:l.data,headers:$e(l.headers)})),me(": Error occurred during getEmbeddedDataView request : ",e))};var Lde=()=>({rootView:null,data:null,uiResources:null,containerContext:null}),g5=(t,e,r)=>typeof r=="string"?`${t}${e}.${r}`:`${t}${e}[${r}]`,Ude=t=>{let{containerName:e,context:r}=t;if(!e)return{context:r,containerContext:null,target:null};let n=Z(e,r),o=st(n,e,r)||e,i=Zr(r,o);return{context:i,containerContext:i,target:n}},jde=(t,e,r,n,o)=>{if(o){let i=Ve.transformCaseData(t);return i.uiResources.root.config.context=g5(e,r,n),i}return t},zde=(t,e,r)=>{let n=c=>typeof c=="object"&&c!==null,o=(c,l)=>{if(n(c))return c[l]},s=e.replace(/^\./,"").split("."),a=t;for(let c of s)a=o(a,c);return typeof r=="string"?o(a,r)??null:Array.isArray(a)?a[r]??null:null},Fde=(t,e,r,n,o)=>{let i=t.data?.caseInfo?.content;if(i){let a=zde(i,n,o);a&&T(da({context:e,reference:r,value:a}))}let s=t.uiResources?.context_data;s&&T(da({context:e,reference:d.CONTEXT_DATA,value:s}))},h5=t=>{let e=0,r=[];return t.pipe(ee(hS),O(n=>{let{payload:o}=n;return{actionMgrID:e}=o,o}),z(n=>f5(n)),Ac(async n=>{let o=Lde();if(n?.type===Te)return r.push(ue(n)),{actionsOut:r,actionInPayload:{skipPageInstructions:!0},responseData:o};let{actionInPayload:i,response:s,headers:a}=n,{pageReference:c,targetProperty:l,index:u,containerName:p}=i,m=c?.startsWith(E.OBJECT_INFO.OBJECT_INFO),{context:f,containerContext:h,target:S}=Ude(i),A=jde(s,c,l,u,m),C=Le(A);C.key=i.ID;let _=g5(c,l,u);if(await Pe(C,i,p?{acName:S,context:f}:{context:f}),p&&S){let H=Me(C,{target:S,context:f,containerItemID:f,headers:a,index:u});H.resourceStatus=i.actionType,H.isMultiRecordData=!0,H.readOnly=i.readOnly,H.parentContext=i.context,H.clearStateMachine=!1;let G=Gt(S,H);r.push(G)}else Fde(C,f,_,l,u);let N=C.uiResources?.root||null;return N?.config&&(N.config.context=_),o.rootView=N,o.data=C.data,o.uiResources=C.uiResources,o.containerContext=h,{actionsOut:r,actionInPayload:i,responseData:o}}),O(({actionsOut:n,responseData:o})=>{vc(n)?w.rejectActionByID(e):w.resolveActionByID(e,o);let i=n;return r=[],i}))};var y5=(t,e)=>{let{pageReference:r,isMultiRecordData:n}=e,o=J.getPropertyValue(d.getProperty(E.CASE_INFO.CASE_INFO_ID),r,t.parentContext),i=J.getPropertyValue(d.CONTEXT_DATA_MODAL_VIEW.VIEW_NAME,r,t.parentContext),s=J.getPropertyValue(E.CASE_INFO.ASSIGNMENT_ID,r,t.parentContext),a=J.getPropertyValue(d.CONTEXT_DATA_MODAL_VIEW.CONTEXT_DATA_MODAL_VIEW,r,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"?vu(o,s,u,t.parentContext,c,l,p,n,a.editType):Dc(o,i,t.parentContext,f,{})};var Vde=(t,e)=>{if(t&&e.editType==="action"&&t.type!==Te){let{context:r,pageReference:n}=e,o={context:r},{response:i}=t,s=n?.startsWith(E.OBJECT_INFO.OBJECT_INFO),a=null;s?(a=Ve.transformCaseData(i),a.uiResources.root.config.context=n):a=i;let c=Le(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,o);l.skipValidation=!0;let u=V(Re,l);ke.registerForServerChangesSync(),T(u),ke.unRegisterForServerChanges()}return t},S5=t=>{let e="",r=[],n;return t.pipe(ee(yS),Vt(o=>{n=o.payload;let{isFormValid:i}=o.payload;if({actionMgrID:e}=o.payload,!i){let s={type:E.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return w.rejectActionByID(e,!0,s),Ct.handleDeferredActionCompletion(o.payload.context),Se([])}return Se(o.payload).pipe(z(s=>(n=s,t_(n))),z(async s=>Vde(s,n)),z(async s=>{if(s&&s.type===Te){let m=ue(s);return r.push(m),r}let{containerItemID:a,context:c,pageReference:l,interestPage:u}=n,p=u?.replace(/\(\d+\)$/,"");return nU(c,n.parentContext,l.startsWith(E.OBJECT_INFO.OBJECT_INFO_CONTENT)?d.getProperty(E.OBJECT_INFO.OBJECT_INFO_CONTENT):d.getProperty(E.CASE_INFO.CASE_INFO_CONTENT),!1,p),r.push(V(Qe,{containerItemID:a,context:c,target:n.target,skipReleaseLockRequest:!0})),r}),O(()=>{if(vc(r))w.rejectActionByID(e),Ct.handleDeferredActionCompletion(n.context);else{w.resolveActionByID(e),Ct.handleDeferredActionCompletion(n.context);let{pageReference:s}=o.payload,a=J.getPropertyValue(d.CONTEXT_DATA_MODAL_VIEW.IS_MULTI_RECORD_DATA,s,n.parentContext);a?y5(n,{isMultiRecordData:a,pageReference:s}):Ru(n.parentContext,d.getProperty(d.CASE_INFO.CASE_INFO_CONTENT),{})}return T(r),r=[],r}))}))};var Bde="Error ocurred during ajax call at getDescendants Epic : ",E5=t=>{let{caseID:e,headers:r,debugInfo:n,context:o}=t,i=U(Mk,{caseID:e}),{restApi:s}=i,{reqType:a}=i;return q(M(s,{method:a,headers:{...r,...n&&{...Ge.addDebugHeaders(n)}}},o)).pipe(O(c=>({actionInPayload:t,response:c.data,headers:$e({...r,...c.headers})})),me(Bde,o))};var A5=t=>{let e=0,r=[];return t.pipe(ee(mD),O(n=>({actionMgrID:e}=n.payload,n.payload)),z(n=>E5(n)),z(async n=>{if(n&&Je(n.type))return r.push(ue(n)),r;let{actionInPayload:o,response:i}=n,s={};if(g.setIn(s,"caseInfo.childCases",i?.childCases??[]),i?.uiResources?.resources&&xm(i.uiResources.resources),i?.uiResources?.components)try{await go(i.uiResources.components)}catch(c){return r.push(ue({payload:{...o,err:c}})),r}i?.uiResources?.localeReferences&&g.setIn(s,"localeReferences",i.uiResources.localeReferences),i?.uiResources?.childCases_context_data&&g.setIn(s,"childCases_context_data",i.uiResources.childCases_context_data);let a={data:s,context:o?.context};return r.push(V(Re,a)),r}),O(()=>(T(r),mt(r,e),r=[],r)))};var C5=(t,e)=>{let r={type:E.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};w.rejectActionByID(t,!0,r),Ct.handleDeferredActionCompletion(e)},I5=(t,e,r)=>{xr(e)&&t.push(V(Qe,{containerItemID:r,skipReleaseLockRequest:!0}))},_5=({itemData:t,workareaContainerData:e,subscriptData:r,pageGroupName:n,activeWorkArea:o,subscriptFieldName:i,actionMgrID:s,containerItemID:a})=>{let c={referenceList:t?.referenceList,ID:e?.caseInfo?.ID,index:r[i],containerName:E.MODAL,pageReference:E.CASE_INFO.CASE_INFO_CONTENT,viewID:E.VIEW_NAMES.DATA_OBJECT_CREATE_VIEW,skipSemanticUrl:!0,actionType:E.RESOURCE_STATUS.CREATE,interestPage:`.${n}.${r[i]??""}`,targetProperty:`.${n??""}`,pageGroupName:n,context:o??"",subscriptFieldName:i};return{type:Bi,payload:{isInCreateStage:!1,isModalAction:!0,parentContext:"",target:"",...c,actionMgrID:s,containerItemID:a,doDeleteCaseSummary:!1,isFormValid:!0}}};var b5=t=>{let e="",r=[],n,o={};return t.pipe(ee(SS),Vt(i=>{n=i.payload;let{isFormValid:s}=i.payload;return{actionMgrID:e}=i.payload,s?Se(i.payload).pipe(z(a=>(n=a,Se({}))),z(async()=>{let{containerItemID:a}=n,c=W(a),l=a,u=c?.dataInfo.content;delete u.classID;let p=qe(l),m=Ke(p).length,f=Ke(p)[m-1]?se(Ke(p)[m-1]):p,h=te(a),S=We(h,a)||{},A=S?.referenceList?.replaceAll(".",""),C=S?.subscriptName,_=W(f),I={..._,caseInfo:{content:{...u}}},N={containerItemID:f,data:I};r.push(V(rr,N)),I5(r,l,a);let x=_5({itemData:S,workareaContainerData:_,subscriptData:u,pageGroupName:A,activeWorkArea:f,subscriptFieldName:C,actionMgrID:e,containerItemID:a});return r.push(x),o=u,r}),O(()=>(w.resolveActionByID(e,o),T(r),r=[],r))):(C5(e,i.payload.context),Se([]))}))};var Hde=[MB,r8,g8,E8,q8,X8,n5,a5,l5,v8,w8,O8,u5,j8,k8,d5,p5,m5,h5,S5,A5,b5],T5=Hde;var{RESOURCE_TYPES:B0}=E,A_="pyCasePreview",Gde=(t,e,r,n,o)=>{t&&o===ge.PREVIEW?(r.data.caseInfo.progress=!1,delete r.root,pr(r,r),n.actionsOut=V(rr,{...r,containerName:o})):t?(n.actionsOut=[],n.actionsOut.push(V(nr,{target:e,containerItemID:t}))):n.actionsOut=V(Pt,{...r,containerName:o})},qde=(t,e)=>{let r=B.isObjectCaseType(t.caseClassName);if(t.key&&!r){let n=te(t?.context),o=wt(n,t.key),i=t?.context;(o||t.updateData||e2(i))&&e.actionsOut.push(V(Re,t))}else e.actionsOut.push(V(Re,t))},Wde=t=>{let{containerName:e,updateData:r,viewLoadingContainer:n}=t,o=e||Bt.getTargetViewContainerName(Rn),i=n?.target??Z(o,t.context),s=n?.context??(e===ge.PREVIEW&&r?t.context:st(i,o,t.context,{buildNew:!!e}));return{target:i,context:s}},Kde=(t,e)=>{let r=U("loadView",e);t.viewContext===B0.PAGE&&(r=U(Rn,{page:t.viewName,pageClass:t.pageClass}));let n=P.getDefaultQualifiedName(A_);return t.containerName===ge.PREVIEW&&t.caseId&&t.viewContext!==B0.PAGE&&(t.viewName===n||t.viewName===A_)&&(r=U(Lt,{caseID:t.caseId,params:{pageName:n}})),r},Jde=t=>t.pipe(ee(Kl),O(e=>e.payload),ri(e=>!bu(e.actionMgrID)),z(e=>{let r={caseID:e.caseId,viewID:e.viewName,caseClassName:e.caseClassName,RemoteSystemID:e.RemoteSystemID};if(e.containerName===ge.PREVIEW&&e.context&&e.caseId&&!e.updateData){let s=Z(ge.PREVIEW,e.context),a=st(s,ge.PREVIEW,e.context,{buildNew:!0}),c=decodeURI(e.caseId);T(Pt({...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 n={};if(r.RemoteSystemID)n.RemoteSystemID=r.RemoteSystemID;else if(ae.isRemoteCase(r.caseClassName)){let{RemoteSystemID:s}=ae.getRemoteCase(r.caseClassName);n.RemoteSystemID=s}let{restApi:o,reqType:i}=Kde(e,r);return q(M(B.appendExcludeQueryParamToUrl(o),{method:i,headers:n},e.context)).pipe(O(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:$e(s.headers),rootView:g.getIn(c,d.ROOT)}}),me(": Error ocurred during ajax call at loadView Epic : ",e.viewLoadingContainer?.context??e.context))}),z(async e=>{let r={};if(e?.type===Te){if(r.actionsOut=ue(e),e?.payload?.context?.includes(ge.PREVIEW)){let a={...W(e.payload.context),caseInfo:{progress:!1,error:!0}},c=Z(ge.PREVIEW,e.payload.context);r.actionsOut=V(rr,{key:a.key,target:c,containerName:ge.PREVIEW,context:e.payload.context,containerItemID:e.payload.context,data:a})}return r}try{r.actionMgrID=e?.actionConfig?.actionMgrID,r.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}=Wde(s);s.context=m;let f={acName:p,context:m},h={};h=Le(a),h.directUrlUpdation=!1,await Pe(h,s,f);let S={...s,target:p,context:m,containerItemID:l||m,headers:c},A=Me(h,S);if(A.resourceType=B0.CASE,s.viewName===d.PY_CONFIRM&&(A.caseViewMode=d.REVIEW_MODE,g.setIn(A.data,["context_data","caseViewMode"],d.REVIEW_MODE)),u&&!A.updateData){A.caseViewMode=d.REVIEW_MODE,g.setIn(A.data,["context_data","caseViewMode"],A.caseViewMode);let C=te(A?.context),_=wt(C,A.key);Gde(_,C,A,r,u)}else{A.preserveClientChanges=!0,r.actionsOut=[],u===ge.PREVIEW&&r.actionsOut.push({type:mn,payload:{context:m,skipMergeAssignmentsAndActions:!1}});let{viewName:C}=s;C===P.getDefaultQualifiedName(A_)&&pr(A,A),qde(A,r)}}catch(s){console.error(s),r.rootView={type:"error",payload:s}}let{caseId:n,context:o,viewName:i}=e.actionConfig;return i===P.getDefaultQualifiedName(A_)&&WU({caseId:n,context:o}),r}),O(({rootView:e,actionsOut:r,actionMgrID:n=0})=>(w.resolveActionByID(n,e),Ve.setNeedsMapping(!1),r))),Yde=t=>{let e=0,r=[];return t.pipe(ee(Nr),O(n=>({actionMgrID:e}=n.payload,n.payload)),z(n=>{$.publish(E.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_STARTED);let{debugInfo:o,context:i,viewName:s,className:a,skipSemanticUrl:c=!1,containerName:l=Bt.getTargetViewContainerName(Rn)}=n,u=o&&{...Ge.addDebugHeaders(o)},p=Z(l,i),m="";if(!c){let{semanticURL:S,activate:A,activateContainerActionPayload:C}=Ej(s,a,p);if(m=S,A)return EE(C),Se({type:or,activateContainerActionPayload:C,actionConfig:n})}let h=se(p)?vt(p,{loadingContext:i}):Promise.resolve({continueExecution:!0,removeActionPayload:{}});return q(h).pipe(z(({continueExecution:S,removeActionPayload:A})=>S?q((()=>{if(yt())return tr("openPage",{pageName:s,pageClass:a,headers:u});let{restApi:_,reqType:I}=U(Rn,{page:s,pageClass:a});return M(_,{method:I,headers:u},i)})()).pipe(O(_=>{let I={};return typeof _.data=="string"?I=JSON.parse(_.data):I=_.data,{response:{...I,key:m,semanticURL:m},actionConfig:n,headers:$e(_.headers),removeActionPayload:A,skipSemanticUrl:c}}),me(": Error ocurred during ajax call at showPage Epic : ",n.context)):(w.rejectActionByID(e),At)))}),z(async n=>{let o={};if(o.actionManagerID=n?.actionConfig?.actionMgrID,n&&n.type===Te)return r.push(ue(n)),o;let{type:i}=n,{actionConfig:s,skipSemanticUrl:a}=n,c=s.containerName||Bt.getTargetViewContainerName(Nr),l=Z(c,s.context);$.publish(E.PUB_SUB_EVENTS.EVENT_PREVIEW_DISMISS,{pageName:n.actionConfig.viewName,pageClass:n.actionConfig.className}),$.publish(E.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_INIT,{pageName:n.actionConfig.viewName,pageClass:n.actionConfig.className});let{remoteCasePayload:u,updatedType:p}=Cj(i,n,s,l);if(i=p??i,s.isDeferLoaded){let{response:m,headers:f={}}=n,{isCreateDataObject:h,context:S}=s,A=Le(m,{isCreateDataObject:h});A.directUrlUpdation=!a,await Pe(A,s,{acName:l,context:S});let I=Me(A,{containerItemID:S,target:l,headers:f,context:S});o.rootView=g.getIn(A,d.ROOT),r.push(V(Re,I))}else if(i===or){let{activateContainerActionPayload:{semanticURL:m,containerItemID:f}}=n,h=pe(f),S={acName:l,context:h};s.isTraditionalRemoteCase||await Pe({directUrlUpdation:!0,semanticURL:m},s,S,!0),r.push(V(nr,{target:l,containerItemID:f}))}else{let m=st(l,c,s.context),{response:f,headers:h={},removeActionPayload:S}=n,A=Le(f,{isCreateDataObject:s.isCreateDataObject});A.directUrlUpdation=!a;let C={acName:l,context:m},_=wn(m);await Pe(A,s,C);let I={target:l,context:m,containerItemID:m,headers:h,debugInfo:s.debugInfo,currentCaseViewMode:_,referenceList:s?.referenceListStr,subscriptName:s?.subscriptName,pageName:s.viewName},N=Me(A,I);N.resourceType=E.PAGE,s.isCreateDataObject&&(N.resourceType=E.RESOURCE_TYPES.DATA,N.resourceStatus=E.RESOURCE_STATUS.CREATE,delete N.data.caseInfo,N.referenceList=s.referenceListStr,N.subscriptName=s.subscriptName),Ij(s,u,N),N.data??={},N.data.traditionalGadgetId=B.getUniqueGadgetId();let x=Gt(l,N);S.containerItemID&&rn(x)&&r.push(V(Qe,{containerItemID:S.containerItemID,target:l})),r.push(x)}return $.publish(E.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_DONE,{target:l,pageName:n.actionConfig.viewName,pageClass:n.actionConfig.className}),o}),O(({actionManagerID:n=0,rootView:o})=>{w.resolveActionByID(n,o),T(r),r=[]}),qi())},Zde=[Jde,Yde],v5=Zde;var Qde="Error occurred during ajax call at showData Epic : ",Xde=(t,e,r)=>{let{context:n,pageName:o,dataContext:i,dataContextParameters:s,semanticURL:a,skipSemanticUrl:c,RemoteSystemID:l}=t,{removeActionPayload:u}=e,p={};return p.RemoteSystemID=l,q((()=>{if(yt())return tr(Oo,{queryPayload:{pageName:o},body:{dataContext:i,dataContextParameters:s}});let{restApi:f,reqType:h,body:S}=U(Oo,{pageName:o,dataContext:i,dataContextParameters:s});return M(f,{method:h,headers:p,body:S},n)})()).pipe(O(f=>({response:{...f.data,key:a,semanticURL:a},actionConfig:t,headers:$e(f.headers),removeActionPayload:u,skipSemanticUrl:c})),me(Qde,t.context,String(r)))},H0=Xde;var{RESOURCE_TYPES:G0}=E,epe=(t,e)=>{let{context:r,pageName:n,dataContext:o,dataContextParameters:i,skipSemanticUrl:s=!1,isDeferLoaded:a=!1,parentAction:c="",resourceType:l,containerName:u,RemoteSystemID:p}=t,m=Z(u,r),f="",h={context:r,pageName:n,dataContext:o,dataContextParameters:i,semanticURL:f,skipSemanticUrl:s,containerName:u,isDeferLoaded:a,parentAction:c,resourceType:l,RemoteSystemID:p};if(!s){f=bt(Oo,{pageName:n,dataViewName:o},i),h.semanticURL=f;let{activate:S,activateContainerActionPayload:A}=ns(G0.PAGE,m,{semanticURL:f});return S?Se({type:or,activateContainerActionPayload:A,actionConfig:t}):q(vt(m,{loadingContext:r})).pipe(z(({continueExecution:C,removeActionPayload:_})=>C?H0(h,{removeActionPayload:_},e):(w.rejectActionByID(e),At)))}return H0(h,{removeActionPayload:{}},e)},tpe=t=>{let e=0,r=[],n;return t.pipe(ee(uc),Ac(o=>({actionMgrID:e}=o.payload,Se(o.payload).pipe(z(i=>epe(i,e)),z(async i=>{if(i&&i.type===Te)return r.push(ue(i)),r;let{type:s,actionConfig:a,headers:c,response:l,skipSemanticUrl:u}=i;n=g.getIn(l,d.ROOT);let{containerName:p,parentAction:m,resourceType:f}=a,h=Z(p,a.context),S,A=wn(a?.context);if(a.isDeferLoaded){S=Le(l),S.directUrlUpdation=!u;let C={acName:h,context:a.context};await Pe(S,a,C);let _={target:h,headers:c,context:a.context,containerItemID:i.containerItemID},I=Me(S,_);return r=V(Re,I),r}if(s===or){let{activateContainerActionPayload:{semanticURL:C,containerItemID:_}}=i,I=pe(_);await Pe({directUrlUpdation:!0,semanticURL:C},a,{acName:h,context:I},!0),r.push(V(nr,{target:h,containerItemID:_,resourceType:G0.DATA}))}else if(f==="DATA"&&m===Vi){let{context:C}=a,_=l?.data,I={context:C,data:_};r.push(V(Re,I))}else{let C=st(h,p,a.context),{removeActionPayload:_}=i;S=Le(l),S.directUrlUpdation=!u,await Pe(S,a,{acName:h,context:C});let x=Me(S,{target:h,context:C,containerItemID:C,headers:c,currentCaseViewMode:A});x.resourceType=G0.DATA;let H=Gt(h,x);_.containerItemID&&rn(H)&&r.push(V(Qe,{containerItemID:_.containerItemID,target:h})),SE(r),r.push(H)}return r}),O(()=>(w.resolveActionByID(e,n),T(r),r=[],r))))))},R5=tpe;var rpe="Error occurred during ajax call at deleteDataObject Epic",npe=t=>{let{dataViewName:e,context:r,dataViewParameters:n}=t,o={data_view_ID:e,dataViewParameters:encodeURIComponent(JSON.stringify(n))},{restApi:i,reqType:s}=U(Kk,o);return q(M(i,{method:s},r)).pipe(O(a=>({response:a.data,actionInPayload:t})),me(rpe,r))},P5=npe;var ope=t=>{let e=0,r=[];return t.pipe(ee(mS),gr(100),O(n=>({actionMgrID:e}=n.payload,n.payload)),z(n=>P5(n)),z(async n=>{if(n&&n.type===Te){let{payload:o}=n,i=ue({...n,...o,actionMgrID:e});return r.push(i),r}return[]}),O(()=>(r.length===1&&Je(r[0].type)?w.rejectActionByID(e):w.resolveActionByID(e),T(r),r=[],r)))},N5=ope;var ipe="Error occurred during ajax call at GET data object actions : ",spe=t=>{let{dataViewID:e,dataViewParameters:r,context:n}=t,o={data_view_ID:e},{restApi:i,reqType:s}=U(Wk,o);return q(M(i,{method:s,body:{dataViewParameters:r}},n)).pipe(O(a=>({...a.data})),me(ipe,t.context))},O5=spe;var ape=t=>{let e=0,r=[],n=100,o={};return t.pipe(ee(nS),gr(n),O(i=>({actionMgrID:e}=i.payload,i.payload)),z(i=>O5(i)),z(async i=>i&&i.type===Te?(r.push(ue(i)),r):(o=i,[])),O(()=>(r.length===1&&Je(r[0].type)?w.rejectActionByID(e):w.resolveActionByID(e,o),T(r),r=[],r)))},x5=ape;var cpe=[R5,tD,rD,nD,N5,x5,oD,iD],D5=cpe;var{RESOURCE_TYPES:{CASE:lpe,DATA:upe,OBJECT:dpe,PAGE:ppe}}=E,mpe=(t,e,r)=>{e===ppe&&r&&(t.pageName=r)},yl=[],Sl=!1,lp=!1,C_=null,ey=null,q0={},fpe=t=>t?.routeKey===Fi?s9(t.payload?.caseTypeID,t.payload?.businessID):"",gpe=t=>t.pipe(ee(oS),Cm(200),O(e=>e.payload),z(e=>{lp=!1,$.subscribe(E.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_STARTED,()=>{lp=!0});let r=Tr.getPreviewMode()&&Ge.addDebugHeaders({debugId:g.generateUniqueID()});q0.dataContext=e.payload.dataViewName,q0.dataContextParameters=e.payload.dataViewKeys;let{context:n,requestType:o,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"'))),Sl=i===$r,Sl&&Ve.setNeedsMapping(!0);let a=gt.getServerURL()+s,c=e.options.context,l,u={},p=e?.payload?.caseClassName;if(ae.isRemoteCase(p)){let{RemoteSystemID:m}=ae.getRemoteCase(p);u.RemoteSystemID=m}if(v.isWSSPortal()&&(u[d.X_ORIGIN_CHANNEL]="WSS"),o==="POST"){l=e.payload,s.indexOf("viewType=")<0&&(s=`${s}?viewType=page`);let m=VT(i),f;switch(m){case lpe:case dpe:f={caseTypeID:l.caseTypeID,processID:l.processID,content:{}};break;case upe:f=q0;break;default:f=l}return q(M(a,{method:o,body:f,headers:{...u,...r}},n)).pipe(O(h=>({response:{...h.data},payload:e,headers:$e(h.headers,"",u)})),me(": Error occurred during ajax call at historyEpic : ",e))}return q(M(B.appendExcludeQueryParamToUrl(a),{method:"GET",headers:{...u,...r}},c.substring(0,c.lastIndexOf("/")))).pipe(O(m=>({response:m.data,payload:e,headers:{...$e(m.headers),...r}})),Gi(m=>{if(i===qs){let f={messages:[{type:"error",message:m.response.data.errorDetails[0].localizedValue}],category:"PAGE"};pt.setComponentCache("assignments-launchAssignment-Error",f);let h=dE(II()),S=ye.getEndPointInfo(h.split("/assignments")[0]),A=gt.getServerURL()+S.routeEndpoint;return e={...e,routeKey:Lt,resetSemanticURL:!0},q(M(A,{method:S.reqType,headers:{...u,...r}},c.substring(0,c.lastIndexOf("/")))).pipe(O(C=>({response:C.data,payload:e,headers:{...$e(C.headers),...r}})))}return Se(os(": Error occurred during ajax call at historyEpic : ",m,n))}))}),z(async e=>{if(lp)return yl;if($.subscribe(E.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_STARTED,()=>{lp=!0}),e&&e.type===Te)return ue(e);let{headers:r={},response:n,payload:o}=e,i=Le(n,{[E.STOPMERGEACTIONS]:!n.nextAssignmentInfo}),s=o.options.acName,a=It(s)&&Fr(s)?se(s):e.payload.options.context,c=a;r.RemoteSystemID=o?.payload?.RemoteSystemID,ey={target:s,context:a,containerItemID:c,headers:r,debugInfo:{debugId:r[d.COREHEADER_APP_DEBUG_ID]}};let l=o?.payload?.pageClass,u=o?.payload?.page,p=Sl?$r:Lt,m=Sl?o.payload.objectID:o.payload.workID,f=Sl?"{objectID}":"{workID}",h=Sl?`objects/${m}`:fpe(o);o?.payload?.caseName&&m&&(h=bt(p,{caseName:e.payload.payload.caseName}),h=h?.replace(f,m)||"",l=o?.payload?.caseClassName),(o?.routeKey===qs||o?.resetSemanticURL)&&t2(c,i),bj(o?.routeKey,i),Tj(i),$.publish(E.PUB_SUB_EVENTS.EVENT_PREVIEW_DISMISS,{pageName:u,pageClass:l}),$.publish(E.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_INIT,{pageName:u,pageClass:l});let S=g.getIn(i,d.COMPONENTS);S&&await go(S),Yi(i,o.options.actionConfig,!0),$.publish(E.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_DONE,{target:s,pageName:u,pageClass:l});let A=Me(i,ey),C=VT(e.payload.routeKey);return A=Aj(C,{...n.data,semanticURL:h,caseViewMode:d.REVIEW_MODE},A),A.data.traditionalGadgetId=B.getUniqueGadgetId(),mpe(A,C,u),yl.push(Gt(s,A)),C_=i,_j(a,yl),yl}),O(()=>(lp||T(yl),C_&&ey&&pr(C_,ey),yl=[],Sl=!1,lp=!1,ey=null,C_=null,yl)),me("Error occurred")),hpe=[gpe],w5=hpe;var ype=t=>{let e=0;return t.pipe(ee(Ks),O(r=>({actionMgrID:e}=r.payload,r.payload)),O(()=>{let r=we()?.getState(),n=Qh();return lo(r,n)&&e>0?w.resolveActionByID(e,{}):w.rejectActionByID(e),[]}),qi())},Spe=[ype],$5=Spe;var Epe=t=>{let e=0,r=[];return t.pipe(ee(Qy),O(n=>({actionMgrID:e}=n.payload,n.payload)),z(n=>{let{context:o,skipSemanticUrl:i=!1,insightID:s}=n,a="",c;i||(a=bt(dc,{insightID:"{insightID}"}),a=a.replace("{insightID}",s),c=ye.getEndPointInfo(a));let{restApi:l,reqType:u}=U(dc,{...c?.payload||[],insightID:s});return q(M(l,{method:u},o)).pipe(O(p=>{let m={};return typeof p.data=="string"?m=JSON.parse(p.data):m=p.data,{response:{...m,key:a,semanticURL:a},actionConfig:n,skipSemanticUrl:i}}),me(": Error occurred during ajax call at showPage Epic : ",n.context))}),z(async n=>{if(n&&n.type===Te)return r.push(ue(n)),r;let{actionConfig:o,skipSemanticUrl:i}=n,s=Bt.getTargetViewContainerName(Nr),a=Z(s,o.context),c=st(a,s,o.context),{response:l}=n,u=Le(l);u.directUrlUpdation=!i,await Pe(u,o,{acName:a,context:c},!i,i);let S=Me(u,{target:a,context:c,containerItemID:c});S.resourceType=E.PAGE;let A=Gt(a,S);return r.push(A),r}),O(()=>{w.resolveActionByID(e),T(r),r=[]}),qi())},Ape=[Epe],M5=Ape;var Cpe=t=>{let e=0,r=[];return t.pipe(ee(Xy),O(n=>({actionMgrID:e}=n.payload,n.payload)),z(n=>{let{context:o,skipSemanticUrl:i=!1,dashboardID:s}=n,a="";i||(a=bt(gm,{dashboardID:s}),a=a.replace("{dashboardID}",s));let{restApi:c,reqType:l}=U(gm,{dashboardID:s});return q(M(c,{method:l},o)).pipe(O(u=>{let p={};return typeof u.data=="string"?p=JSON.parse(u.data):p=u.data,{response:{...p,key:a,semanticURL:a},actionConfig:n,skipSemanticUrl:i}}),me(": Error occurred during ajax call at showPage Epic : ",n.context))}),z(async n=>{if(n&&n.type===Te)return r.push(ue(n)),r;let{actionConfig:o,skipSemanticUrl:i}=n,s=Bt.getTargetViewContainerName(Nr),a=Z(s,o.context),c=st(a,s,o.context),{response:l}=n,u=Le(l);u.directUrlUpdation=!i,await Pe(u,o,{acName:a,context:c},!i,i);let S=Me(u,{target:a,context:c,containerItemID:c});S.resourceType=E.PAGE;let A=Gt(a,S);return r.push(A)}),O(()=>{w.resolveActionByID(e),T(r),r=[]}),qi())},Ipe=[Cpe],k5=Ipe;var _pe="Error occurred during ajax call at createObject Epic : ",L5=(t,e)=>{let{class:r,context:n,viewType:o=it.PAGE}=t,{removeActionPayload:i}=e,s=t?.pageName?t?.pageName:v.getDefaultCasePage();return q(Ai.createCase(r,{...t,pageName:s,viewType:o,context:n})).pipe(O(({response:a,headers:c})=>(Ve.analyseResponse(a),{response:a,actionInPayload:t,headers:c,removeActionPayload:i})),me(_pe,n))};var U5="CREATE_OBJECT";var bpe=(t,e)=>B.isExternalObject(t)&&e?e:Go(),Tpe=t=>{let e=0,r=[],n={},o,i=100,s=!1;return t.pipe(ee(U5),gr(i),Vt(a=>{if({actionMgrID:e}=a.payload,B.isExternalObject(a.payload.class)&&!Dr(a.payload.context)){let c={type:E.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return w.rejectActionByID(e,!0,c),Se([])}return Se(a.payload).pipe(z(c=>{let{context:l}=c;o=c.class;let u=k0(c),p=Z(u,l);return s=!1,q(Ba(p,{loadingContext:l})).pipe(z(({continueExecution:m,removeActionPayload:f,dirtyCheckPerformed:h})=>m?(s=h,L5(c,{removeActionPayload:f})):(w.rejectActionByID(e),At)))}),z(async c=>{if(c&&c.type===Te)return c.payload.context=bpe(o,c.payload.context),r.push(ue(c)),r;let{actionInPayload:l,response:u,headers:p,removeActionPayload:m}=c,f=sp(l,u);g.setIn(u.data,d.getProperty(d.CASE_INFO.IS_FIRST_ASSIGNMENT),!0);let h=k0({...l,isInCreateStage:f}),S=Z(h,l.context),A=st(S,h,l.context);if(KB(l,r),!s&&YB(h,S,o)){let{continueExecution:Ie}=await vt(S,{loadingContext:l.context});if(!Ie)return w.rejectActionByID(e),r}let C=l?.openCaseViewAfterCreate??!0;if(JB(C,f)){let{businessID:Ie,caseType:he,resolvedURL:De}=nE(u);return n={id:Ie,label:he,href:De},Ha(n),np({caseId:Ie,caseType:he}),r}QB(l);let _=Le(u),I=String(er(ho(_))),N=Yn(_),x=br(N,Xi(_))||bt(ei,{caseClassName:N}).replace(/{.+?}/,I);_.semanticURL=x,pt.setComponentCache(I,Ge.addDebugHeaders(l.debugInfo)),op(_,l),await Pe(_,l,{acName:S,context:A});let G=ip(_),ne={target:S,context:A,headers:p,semanticURL:x,caseViewMode:G,containerItemID:A,isInCreateStage:f,isMinimizable:f,assignmentContext:g.getIn(_,_o.NEXT_ASSIGNMENT_INFO_CONTEXT),nextAssignmentInfo:g.getIn(_,_o.NEXT_ASSIGNMENT_INFO),resourceType:E.RESOURCE_TYPES.OBJECT,openCaseViewAfterCreate:l.openCaseViewAfterCreate,modalOptions:l.modalOptions,debugInfo:l.debugInfo};ii(ne,_);let j=Me(_,ne),oe=Gt(S,j);return ZB(oe,{removeActionPayload:m,target:S},r),r.push(oe),r}),O(()=>(hn(r),mt(r,e),setTimeout(()=>XB(o)),n={},r=[],r)))}))},j5=Tpe;var vpe="Error occurred during ajax call at executeObjectWideAction Epic : ",z5=(t,e)=>{let{assignmentID:r,actionID:n,caseID:o,context:i,additionalHeaders:s={},jsActionQueryParams:a}=t,{state$:c}=e,l=it.PAGE,u=tL,p={assignmentID:r,actionID:n,viewType:l,objectID:o},{restApi:m}=U(u,p),{reqType:f}=U(u,p);l&&!m?.includes("viewType=")&&(m=m?.includes("?")?`${m}&viewType=${l}`:`${m}?viewType=${l}`),m=Su(a,m),t.viewType=l;let{content:h}=Rt(i,{isObjectWideAction:!0}),S=c.value.data[i]?.objectInfo?.headers||{},{etag:A}=S,C={"if-match":A,...s};return q(M(m,{method:f,body:h,headers:C},i)).pipe(O(_=>{let{data:I,headers:N}=_;return Ve.analyseResponse(_.data),{actionInPayload:t,response:I,headers:$e({...C,...N})}}),me(vpe,i))};var Rpe=(t,e)=>{let{isCaseWideAction:r}=e;return{isCaseWideAction:r,caseID:ho(t)}},F5=Rpe;var{RESOURCE_TYPES:Ppe}=E,Npe=(t,e)=>{let r=0,n=[],o={},i="";return t.pipe(ee(su),Vt(s=>{if({actionMgrID:r}=s.payload,i=s.payload.context,dt({context:i,stateObj:W(i),clearContextMessages:!0}),!Dr(i)){let a={type:E.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return w.rejectActionByID(r,!0,a),Ct.handleDeferredActionCompletion(s.payload.context),Se([])}return Se(s.payload).pipe(z(a=>{d_(n,a);let c={...a};return z5(c,{state$:e})}),z(async a=>{if(a?.type===Te){let oe=ue(a);return n.push(oe),n}Io.clearContextedCache(i);let{headers:c,actionInPayload:l,response:u}=a,{containerItemID:p,isModalAction:m,isInCreateStage:f}=l,h=te(p);l.target=h,g.setIn(u.data,d.OBJECT_INFO_IS_LOCAL_ACTION,!1),y_({submitResponse:u});let S=Le(u,{[E.STOPMERGEACTIONS]:!u.nextAssignmentInfo}),A=Yn(S),C=qe(l.context),_=Ke(C)[0]?se(Ke(C)[0]):C,I=VU(S),N=f&&!I;m&&!f&&!hl(l.context,_)&&(S=yE(S,W(p)));let x=Me(S,{headers:c,actionMgrID:r,directUrlUpdation:!1});BU(x.data,l),x.caseClassName=A,x.resourceType=Ppe.ASSIGNMENT,x.headers=c;let H=!1,G=ho(S);ii(x,S);let ne=br(A,Xi(S))||bt(ei,{caseClassName:A}).replace(/{.+?}/,String(er(G)));S.semanticURL=ne,x.semanticURL=ne,await f_(l,x,H,G,S,n,a,u,!0),N&&(o=m_(l),np({caseId:l.caseID,caseType:l.caseTypeID,assignmentId:l.assignmentID})),HU(a,n),Ct.handleDeferredActionCompletion(i),g_(x,l,_);let j=F5(S,l);return sE({...j,containerItemID:p}),p_(n,{transientItemID:p,target:h,isModalAction:m}),n}),O(()=>{let a=n.find(c=>c.type===Te);return a?(Ct.handleDeferredActionCompletion(i),h_(a),w.rejectActionByID(r)):w.resolveActionByID(r,o),hn(n),Ve.setNeedsMapping(!1),n=[],o={},n}))}))},V5=Npe;var Ope="Error occurred during ajax call at getObject Epic : ",B5=(t,e)=>{let{insKey:r,headers:n,context:o,debugInfo:i,viewType:s}=t,{removeActionPayload:a}=e,c=t.pageName?t.pageName:d.VIEW_NAMES.PY_DETAILS,l=U($r,{objectID:r,params:{pageName:c}}),{restApi:u}=l,{reqType:p}=l;return s==="none"&&(u=`${u?.split("viewType")[0]}viewType=none`),q(M(u,{method:p,headers:{...n,...i&&{...Ge.addDebugHeaders(i)}}},o)).pipe(O(m=>(Ve.analyseResponse(m.data),{response:m.data,actionInPayload:t,headers:$e({...n,...m.headers}),removeActionPayload:a})),me(Ope,o))};var H5=async(t,e)=>{let{activateContainerActionPayload:{semanticURL:r,containerItemID:n},actionInPayload:o,actionInPayload:{context:i,skipBrowserSemanticUrlUpdate:s,doDeleteCaseSummary:a}}=e,c=Ut($r,o),l=Z(c,i),u=pe(n);await Pe({directUrlUpdation:!s,semanticURL:r},o,{acName:l,containerName:c,target:l,context:u}),t.push(V(nr,{containerItemID:n,target:l,context:u,doDeleteCaseSummary:a}))},G5=t=>{let e=ho(t),r=Yn(t),n=br(r,Xi(t));if(n)return n;let o=bt($r,{objectClassName:r});return o=o?.replace("{objectID}",String(er(e))),o};var q5="GET_OBJECT";var{RESOURCE_TYPES:W5}=E,xpe=async(t,e)=>{let{actionInPayload:r,activateContainerActionPayload:n,type:o,response:i,removeActionPayload:s,headers:a}=t,{context:c,skipBrowserSemanticUrlUpdate:l,debugInfo:u}=r,p=Ut($r,r),m=Z(p,c);if(cE(o))await H5(e,{activateContainerActionPayload:n,actionInPayload:r});else{let h=st(m,p,c,{buildNew:!0}),S=Le(i),A=G5(S);S.semanticURL=A,S.directUrlUpdation=!l,await Pe(S,r,{acName:m,context:h});let _=Me(S,{target:m,context:h,containerItemID:h,semanticURL:A,headers:a,debugInfo:u});_.caseViewMode=d.REVIEW_MODE,_.resourceType=W5.OBJECT,ii(_,S);let I=Gt(m,_);s.containerItemID&&rn(I)&&e.push(V(Qe,{containerItemID:s.containerItemID,target:m})),e.push(I)}let f=r.insKey;aE({caseKey:f,actionInContext:c})},Dpe=t=>{let e=0,r=[];return t.pipe(ee(q5),O(n=>({actionMgrID:e}=n.payload,n.payload)),z(n=>{let{context:o,isChild:i,viewType:s}=n,a=Ut($r,n),c=Z(a,o),l=s!=="none"?vt(c,{loadingContext:o}):Promise.resolve({continueExecution:!0,removeActionPayload:void 0});return q(l).pipe(z(({continueExecution:u,removeActionPayload:p})=>{if(!u)return w.rejectActionByID(e),At;let{activate:m,activateContainerActionPayload:f}=ns(W5.OBJECT,c,n);return m&&!i&&s!=="none"?Se({type:or,activateContainerActionPayload:f,actionInPayload:n}):B5(n,{removeActionPayload:p})}))}),z(async n=>{if(n&&Je(n.type))return r.push(ue(n)),r;if(n?.actionInPayload?.viewType==="none"){if(W(n?.actionInPayload?.context)?.context_data?.caseViewMode!==d.PERFORM_MODE){let s={data:{...Le(n?.response)?.data},context:n?.actionInPayload?.context,isArrayDeepMerge:!0};r.push({type:mn,payload:{context:s.context,doDeleteConfirmationDetails:!1}}),r.push(V(Re,s));let a=te(n?.actionInPayload?.context),c=jr(n?.actionInPayload?.context),l=Object.freeze({target:a,containerItemID:n?.actionInPayload?.context,context:n?.actionInPayload?.context,containerName:c});if(rE(n?.actionInPayload?.context)){let u=Me(n?.response,{...l});Eo({...u,isArrayDeepMerge:!0},r)}}}else await xpe(n,r);return r}),O(()=>(T(r),mt(r,e),r=[],r)))},K5=Dpe;var J5="OPEN_OBJECT_ACTION";var wpe=(t,e,r,n)=>{let o,i,s=!1,a=mr(t);return!Fr(t)||a&&!ml(t,n)?(i=ur(e,r),tn(e)&&(i=Zr(r,i)),o=i,s=!0):(o=a?wt(t,n):se(t),i=pe(o)),{context:i,containerItemID:o,isNewContainerItem:s}},$pe=t=>t?d.PERFORM_MODE:d.REVIEW_MODE,Mpe=t=>t?Pt:rr,W0=t=>{let{actionID:e,caseID:r,context:n,openActionType:o,modalLoadingContainer:i}=t,s=it.FORM,a=U(CS,{objectID:r,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??n;return q(M(l,{method:c,headers:{}},u)).pipe(O(p=>(Ve.analyseResponse(p.data),{response:p.data,actionInPayload:t,headers:$e(p.headers)})),me(`: Error occurred during ajax call at ${o} Epic : `,u))},Y5=async(t,e,{headers:r,actionInPayload:n})=>{let{context:o,actionName:i,openActionType:s,doDeleteCaseSummary:a,modalLoadingContainer:c}=n,l=Le(t,{info:E.OBJECT_INFO.OBJECT_INFO}),u=Ut(s,n),p=c?.target??Z(u,o),{context:m,containerItemID:f,isNewContainerItem:h}=wpe(p,u,o,t.data.objectInfo.ID);await Pe(l,n,{acName:p,target:p,containerName:u,context:m});let A=l.uiResources?.root,C=$pe(A),_=Me(l,{target:p,context:m,containerItemID:f,caseViewMode:C,doDeleteCaseSummary:a,headers:r,actionName:i,isMinimizable:!1,isInCreateStage:tn(u),resourceType:E.RESOURCE_TYPES.OBJECT,isProcessAction:n.isProcessAction,showProgress:n.showProgress,progressMessage:n.progressMessage,actionType:n.actionType});if(A&&ii(_,l),tn(u)&&delete _.doDeleteCaseSummary,e.push(V(Mpe(h),_)),h||e.push(V(As,_)),h){let I=Ke(n.contextName),N=wt(I,t.data.objectInfo.ID);if(N){let x={data:{objectInfo:{headers:r}},context:N};e.push(V(Re,x))}}return f!==se(p)&&e.push(V(nr,{target:p,containerItemID:f})),rE(f)&&!c?.context&&Eo(_,e),e};var kpe=t=>{if(t.openActionType=CS,Ut(t.openActionType,t)===d.MODAL){let r=Ut(t.openActionType,t),n=Z(r,t.context),o=Zr(t.context,ur(r,t.context));return T(Pt({target:n,context:o,containerItemID:o,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}}})),T(Fh({context:o})),t.modalLoadingContainer={target:n,context:o},W0(t)}return W0(t)},Z5=kpe;var Lpe=t=>{let e=0,r=[];return t.pipe(ee(J5),O(n=>({actionMgrID:e}=n.payload,n.payload)),z(n=>Z5(n)),z(async n=>{if(Je(n.type)){let c=ue(n);return r.push(c),W(n.payload.context)?.context_data?.isLoading&&r.push(V(As,n.payload)),r}let{actionInPayload:o,headers:i,response:s}=n,{actionID:a}=o;return g.setIn(s,"data.objectInfo.activeActionID",a),g.setIn(s.data,d.getProperty(d.OBJECT_INFO_IS_LOCAL_ACTION),!0),o.refreshConditions&&g.setIn(s.data,d.getProperty(d.CASE_INFO_REFRESH_CONDITIONS),o.refreshConditions),await Y5(s,r,{headers:i,actionInPayload:o}),S_(o),r}),O(()=>(T(r),mt(r,e),r=[],r)))},Q5=Lpe;var K0=t=>{let{containerName:e,isInCreateStage:r}=t;return r?d.MODAL:e||Bt.getTargetViewContainerName(Js)};var Upe="Error occurred during ajax call at createObject Epic : ",X5=(t,e)=>{let{class:r,context:n,viewType:o=it.PAGE}=t,{removeActionPayload:i}=e,s=t?.pageName?t?.pageName:v.getDefaultCasePage();return q(Ai.createCase(r,{...t,pageName:s,viewType:o,context:n,retrieveActionViewForNewObject:!0})).pipe(O(({response:a,headers:c})=>(Ve.analyseResponse(a),{response:a,actionInPayload:t,headers:c,removeActionPayload:i})),me(Upe,n))};var eH="CREATE_EXTERNAL_OBJECT";var jpe=t=>{let e=0,r=[],n=!1;return t.pipe(ee(eH),gr(100),O(i=>({actionMgrID:e}=i.payload,i.payload)),z(i=>{let{context:s}=i,a=K0(i),c=Z(a,s);return n=!1,q(Ba(c,{loadingContext:s})).pipe(z(({continueExecution:l,removeActionPayload:u,dirtyCheckPerformed:p})=>l?(n=p,X5(i,{removeActionPayload:u})):(w.rejectActionByID(e),At)))}),z(async i=>{if(i&&i.type===Te)return i.payload.context=Go(),r.push(ue(i)),r;let{actionInPayload:s,response:a,headers:c,removeActionPayload:l}=i,u=sp(s,a);g.setIn(a.data,d.getProperty(d.CASE_INFO.IS_FIRST_ASSIGNMENT),!0);let p=K0({...s,isInCreateStage:u}),m=Z(p,s.context),f=st(m,p,s.context);if(!n&&!tn(p)&&It(m)){let{continueExecution:H}=await vt(m,{loadingContext:s.context});if(!H)return w.rejectActionByID(e),r}let h=Le(a),S=Yn(h),A=br(S,Xi(h))||bt(Js,{caseClassName:S}).replace(/{.+?}/,String(er(ho(h))));h.semanticURL=A,op(h,s),await Pe(h,s,{acName:m,context:f});let _=ip(h),I={target:m,context:f,headers:c,semanticURL:A,caseViewMode:_,containerItemID:f,isInCreateStage:u,isMinimizable:u,assignmentContext:g.getIn(h,_o.NEXT_ASSIGNMENT_INFO_CONTEXT),nextAssignmentInfo:g.getIn(h,_o.NEXT_ASSIGNMENT_INFO),resourceType:E.RESOURCE_TYPES.OBJECT,openCaseViewAfterCreate:s.openCaseViewAfterCreate,modalOptions:s.modalOptions,debugInfo:s.debugInfo,isExternalObjectCreationFlow:!0};ii(I,h);let N=Me(h,I),x=Gt(m,N);return rn(x)&&si(r,{removeActionPayload:l,target:m}),r.push(x),r}),O(()=>(hn(r),mt(r,e),r=[],r)))},tH=jpe;var rH=t=>{let{workId:e,context:r,isExternalCase:n}=t,o=n?cS:nL,{restApi:i,reqType:s}=U(o,{ID:e});return q(M(i,{method:s},r)).pipe(O(a=>({response:a.data,actionInPayload:t,headers:$e(a.headers)})),me("Error occurred during ajax call at deleteWork Epic : ",r))};var nH=t=>{$.publish(d.PUB_SUB_EVENTS.WORK_EVENTS.WORK_DELETED,t)};var zpe=t=>{let e=0,r,n=[];return t.pipe(ee(Vx),O(o=>({actionMgrID:e,caseTypeID:r}=o.payload,o.payload)),z(o=>{if(!o.skipDeleteConfirmation&&!o.ignoreWorkDeletion){let i=ge.MODAL,s=Z(i,o.context),a=Zr(o.context,ur(i,o.context));return T([V(Pt,{target:s,context:a,containerItemID:a,containerName:i,isDeleteConfirmation:!0,actionName:"Delete",workId:o.workId,caseTypeID:r,className:o.className,keys:o.keys,...o.enableBackNavigation&&{enableBackNavigation:!0},data:{caseInfo:{caseTypeID:r}}})]),w.resolveActionByID(e),At}return o.ignoreWorkDeletion?Se({actionInPayload:o}):rH(o)}),z(async o=>{if(o&&Je(o.type)){let{payload:a}=o;return n.push(ue({...o,...a,actionMgrID:e})),n}let{actionInPayload:i}=o,{context:s}=i;if(Ha({content:Or().getLocaleValue("Deleted successfully!","Messages")}),s?.includes(d.PREVIEW)&&n.push(V(Lc,kc({context:d.APP.APP,name:d.PREVIEW}))),s?.includes(d.MODAL)){let a=ge.MODAL,c=Z(a,s);We(c,s)?.enableBackNavigation&&window?.history?.back()}return n}),O(()=>(T(n),mt(n,e)===d.PROMISE_VALUE.RESOLVE&&nH({caseTypeID:r}),n=[],n)))},oH=zpe;var Fpe=[j5,K5,V5,Q5,tH,oH],iH=Fpe;var sH=_V(...RB,...T5,...v5,...w5,...D5,...PB,...$5,...M5,...k5,...iH);var Vpe=new Set([Et,kt,Ze,et,Vs,Bs,Zo]),Bpe=()=>t=>e=>{let{type:r="",payload:n={}}=e||{},{category:o,context:i,transientItemID:s}=n;if(o==="HTTP"||!Vpe.has(r)){t(e);return}AE(i||s),be.removeContextTreeNode(i||s),(r===Et||r===Ze)&&n?.target?.indexOf("modal")!==-1&&$.publish(E.PUB_SUB_EVENTS.PEGA_EMBED_CUSTOM,r),t(e)},aH=Bpe;var El={},Hpe=new Set([Et,Er,Xo,et,Ze]),cH=t=>(El[t]||(El[t]={}),El[t]),Gpe=(t,e,r)=>{let n=cH(t),o=cH(d.CONTEXT),i=n[e]??[];n[e]=[...new Set([...i,r])];let s=o[r]??[];o[r]=[...new Set([...s,e])]},qpe=(t,e)=>{let r=e.lastIndexOf("_"),n=r>-1?e.slice(0,r):e,o=El[n],i=o?.[e];if(i){let s=i.indexOf(t);s>-1&&i.splice(s,1)}return i&&i.length>0?null:(o&&(delete o[e],Object.keys(o).length===0&&delete El[n]),{dataPageName:n,dataPageNameWithHash:e})},J0=t=>{if(!t)return;let e=El[d.CONTEXT],n=(e?.[t]??[]).map(o=>qpe(t,o)).filter(o=>!!o);e&&(delete e[t],Object.keys(e).length===0&&delete El[d.CONTEXT]),n.length>0&&T(Bw({dataPagesToBeRemoved:n}))},lH=(t={},e)=>{e&&Object.keys(t).forEach(r=>{let n=t[r];Object.keys(n??{}).forEach(o=>{Gpe(r,o,e)})})};var Wpe=(t,e)=>{e&&e.length>0&&(t===et||t===Ze)&&e.forEach(r=>{J0(r)})},Kpe=(t,e)=>{let{data:r={},context:n=null,childContainersContexts:o=[]}=e??{};if(Wpe(t,o),t===Et||t===Er||t===Xo){let i=t===Xo?r:r.shared;lH(i,n);return}if(t===et){J0(n),lH(r.shared,n);return}t===Ze&&J0(n)},Jpe=()=>t=>e=>{(Array.isArray(e)?e:[e]).forEach(n=>{let o=n?.type;Hpe.has(o)&&Kpe(o,n?.payload)}),t(e)},uH=Jpe;var{PUB_SUB_EVENTS:dH}=E,Ype=new Set([Ze,et]),Zpe=(t,e,r,n,o,i)=>{let s=t.getState(),{resourceType:a,key:c,context:l}=g.getIn(s,["containers",e,"items",r])||{},u=g.getIn(s,["data",l,d.CONTEXT_DATA,"initiatingContext"]),p={resourceType:a,key:c,context:l,containerItemID:r,...u&&{initiatingContext:u},...n!==void 0?{eventName:n}:{}};$.publish(dH.CONTAINER_EVENTS.CLOSE_CONTAINER_ITEM,p),e===`${E.APP.APP}/${d.PRIMARY}`&&i===d.CONTAINER_TYPE.MULTIPLE&&$.publish(dH.CONTAINER_EVENTS.CLOSE_MULTI_TYPE_PRIMARY_CONTAINER_ITEM,{key:c,newAccessedOrder:o})},Qpe=(t,e)=>{e&&e.length>0&&(t===et||t===Ze)&&e.forEach(r=>{r&&xh.cleanCaches(r)})},Xpe=t=>e=>r=>{let n=o=>{if(!Ype.has(o.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}={}}=o;i===Ze&&Zpe(t,s,a,f,p,m),Qpe(i,u),c&&(i===et||i===Ze&&l)&&xh.cleanCaches(c)};Array.isArray(r)?r.forEach(n):n(r),e(r)},pH=Xpe;var eme=t=>t===`${d.APP.APP}/${d.PRIMARY}`,tme=new Set([Et,et,Ze]),Y0=t=>t===`${d.APP.APP}/${d.MODAL}`,rme=(t,e,r,n,o)=>{t&&e&&(Y0(o)?ZU({caseId:t,caseClass:r,context:n||""}):JU({caseId:t,caseClass:r,context:n||""}))},nme=(t,e)=>{t&&(Y0(e)?QU({caseId:t,caseClass:"",context:""}):YU({caseId:t}))},ome=()=>t=>e=>{if(!e||typeof e!="object"||!("type"in e)||typeof e.type!="string"||!tme.has(e.type)){t(e);return}let{type:r}=e,{payload:n}=e,{target:o,key:i,context:s,data:a}=n||{};if(eme(o)||Y0(o)){let c=a?.caseInfo?.ID,l=s||"",u=re(d.CASE_INFO.CASE_INFO_ID,"",l)||"",p=a?.caseInfo?.caseTypeID||"";if((r===et||r===Ze)&&nme(u,o),r===Et||r===et){t(e),rme(i,!!c,p,l,o);return}}t(e)},mH=ome;var ime=new Set([Et,kt,et,Ze,po]),sme=()=>t=>e=>{if(!e||!ime.has(e.type)){t(e);return}let{payload:{context:r=null,transientItemID:n=null,clearStateMachine:o=!0}={},type:i}=e;r&&(i===Et||i===kt||i===et||i===Ze)&&o&&(vm(r),bm(r)),n&&i===po&&(vm(n),bm(n)),t(e)},fH=sme;var ame=new Set([Et,et,Ze,kt]),up=t=>typeof t=="object"&&t!==null,cme=t=>up(t)&&typeof t.context=="string",lme=t=>({context:t.context,data:up(t.data)?t.data:{},resourceType:typeof t.resourceType=="string"?t.resourceType:"",caseID:typeof t.caseID=="string"?t.caseID:void 0}),ume=t=>up(t)&&typeof t.type=="string",hH=t=>t?.toString().includes(d.MODAL)??!1,xi=t=>g.getIn(t,d.CASE_INFO.ASSIGNMENT_ID),ty=t=>g.getIn(t,["caseInfo","ID"]),gH=t=>{if(!t)return;let e=W(t);return up(e)?e:void 0},dme=(t,e,r,n)=>{let o=ty(e),i=xi(e);!o||!i||o===r&&i===n||_u({actionInContext:t,assignmentID:i,caseKey:o})},pme=(t,e,r,n)=>{if(t===Ze){_u(n);return}(t===kt||t===et)&&dme(e,r,n.caseKey,n.assignmentID),$m(n)},yH=t=>{let e=Object.keys(Tt.subscribers);for(let r=0;r<e.length;r+=1){let n=e[r],o=Tt.subscribers[n],{matcher:i,criteria:s}=o.filter;i==="COACH_UPDATE"&&s?.caseId===t&&Tt.unsubscribe(n)}},mme=(t,e,r)=>{if(r===d.RESOURCE_TYPES.ASSIGNMENT){let n=xi(e),o=g.getIn(e,["caseInfo","ID"]);if(n&&o)return{actionInContext:t,assignmentID:n,caseKey:o}}else if(r===d.RESOURCE_TYPES.CASE&&t?.includes("workarea")){let n=g.getIn(e,["caseInfo","ID"]),o=xi(e);if(n&&o)return{actionInContext:t,assignmentID:o,caseKey:n}}},fme=(t,e,r)=>{if(r!==d.RESOURCE_TYPES.ASSIGNMENT)return;let n=W(t),o=xi(n),i=xi(e),s=ty(e)??ty(n);if(o&&o!==i&&s&&_u({actionInContext:t,assignmentID:o,caseKey:s}),i&&s)return{actionInContext:t,assignmentID:i,caseKey:s}},gme=(t,e)=>{if(t?.includes("workarea")){let r=xi(W(t));r&&_u({actionInContext:t,assignmentID:r,caseKey:e})}else yH(e)},hme=(t,e,r,n)=>{if(t?.includes("workarea")){let o=xi(W(t));o&&_u({actionInContext:t,assignmentID:o,caseKey:n})}else yH(n);if(r===d.RESOURCE_TYPES.ASSIGNMENT){let o=xi(e);if(o)return{actionInContext:t,assignmentID:o,caseKey:n}}},yme=(t,e)=>{let r=up(t.payload)?t.payload:void 0;if(!r||!hH(r.target))return!1;let n=typeof r.context=="string"?r.context:void 0,o=up(r.data)?r.data:void 0,i=typeof r.caseID=="string"?r.caseID:void 0,s=typeof r.assignmentID=="string"?r.assignmentID:void 0,a=gH(n);e(t);let c=t.type===Ze?a:gH(n),l=i??ty(o)??ty(c),u=s??xi(o)??xi(c);if(!n||!l||!u)return!0;let p={actionInContext:n,assignmentID:u,caseKey:l};return pme(t.type,n,a,p),!0},Sme=(t,e)=>{if(hH(e.target))return;let{context:r,data:n,resourceType:o,caseID:i}=e;if(t===Et)return mme(r,n,o);if(t===kt)return fme(r,n,o);if(t===Ze&&i){gme(r,i);return}if(t===et&&i)return hme(r,n,o,i)},Eme=()=>t=>e=>{if(!ume(e)||!ame.has(e.type)){t(e);return}let{type:r,payload:n}=e;if(yme(e,t))return;let o;cme(n)&&(o=Sme(r,lme(n))),t(e),o&&$m(o)},SH=Eme;var EH=new Set([Po,Ui,eS,$k,ji,Y_]),Ame=new Set([Et,et,kt,Ze,J_,Bi,vn,mo,...EH]),Cme=(t,e)=>t===ji?e.saveActionPayload?.containerItemID:t===Y_?e.saveContainerItemID??e.context:e.containerItemID??e.context,Ime=(t,e)=>{if(!l6(e))return!1;let r=e.containerItemID||t,n=e.target||te(r),o=We(n,r),i=e.resourceType||o?.resourceType,s=e.key||o?.key;return i===d.RESOURCE_TYPES.ASSIGNMENT&&!!s},_me=(t,e,r)=>{t===Et||t===et||t===kt&&e.data?(Es(r)&&EI(r),t===et&&HD(r),Ime(r,e)&&d6(r,{containerName:e.containerName??""})):t===Ze&&(Es(r)&&EI(r),HD(r))},bme=(t,e)=>{if(t!==Ze||!e.includes(d.MODAL))return;let r=xo(e),n=`${r}/`;for(let o of m6())(o===r||o.startsWith(n))&&g6(o)},Tme=(t,e)=>{if(e.context){if(t===vn){JS(e.context,null),Yd(e.context);return}t===mo&&!e?.isDefault&&!e?.skipDirtyValidation&&Yd(e.context)}},vme=(t,e,r)=>{if(t===J_){e.autosave||AI(r);return}if(t===Bi){f6(r);return}EH.has(t)&&AI(r)},Rme=t=>typeof t=="object"&&t!==null,Pme=()=>t=>e=>{if(e&&typeof e=="object"&&"type"in e&&"payload"in e&&typeof e.type=="string"&&Ame.has(e.type)&&Rme(e.payload)){let{type:r,payload:n}=e,o=Cme(r,n);o&&(bme(r,o),_me(r,n,o),Es(o)&&(Tme(r,n),vme(r,n,o)))}t(e)},AH=Pme;var CH=bV(),Nme=t=>{if(we()!==null){ys();return}let e=[I6.propertyChangeMiddleware,aH,uH,fH,CH,SH,AH,mH,pH],r=W9({reducer:hB(t),middleware:n=>n({serializableCheck:!1,thunk:!1}).concat(e),enhancers:n=>n().prepend(f0).concat(f0)});CH.run(sH),xw(r)},Al=Nme;var Ome=["ar","arc","ckb","dv","fa","ha","he","khw","ks","ps","ur","yi"],Z0=t=>Ome.includes(t.split("-")[0])?"rtl":"ltr";async function xme(t){if(!t)return;let e=v.getLocale();v.setLocale(t);let r=v.getLocale();if(!(!r||r===e)){if(_I(["lang"]),typeof window<"u"){let n=new URL(window.location.href);n.searchParams.set("lang",r),window.history.replaceState(window.history.state,"",n.toString())}v.isInfinityRuntime()&&await gs.loadLocaleBundle([r]),await Xd(r),typeof document<"u"&&(document.documentElement.lang=r,document.documentElement.dir=Z0(r)),T({type:nu,payload:{locale:r}}),$.publish(d.PUB_SUB_EVENTS.EVENT_LOCALE_CHANGED,{locale:r,previousLocale:e})}}var IH=xme;var Dme=t=>typeof t!="object"||t===null||Array.isArray(t)?!1:Object.values(t).every(e=>typeof e=="string"),Q0=class{#e(e,r,n,o,i){let s=!1;return e.IncludeInURL&&r!==void 0&&(o[e.Key]=r,e.Key==="portal"&&r!==n&&(s=!0)),Array.isArray(e.IncludeInHeaders)&&r!==void 0&&e.IncludeInHeaders.forEach(a=>{i[a.Value]||(i[a.Value]=[]),i[a.Value].push(`${e.Key}=${r}`)}),s}#t(e,r,n){let o={},i={},s=!1;return Array.isArray(e)&&e.forEach(a=>{let c=r[a.Key];this.#e(a,c,n,o,i)&&(s=!0)}),{urlParams:o,headerMap:i,isPortalChanged:s}}#r(e){let r=pt.getComponentCache("lastActionID"),n=Oc.truncateNamespace(e),o=Oc.truncateNamespace(typeof r=="string"?r:(r??"").toString());return n===o}#n({message:e}){let{RequestContext:r,ActionName:n}=e;if(!this.#r(n))return;let o=JSON.parse(r);if(!Dme(o))throw new TypeError("RequestContext must be a JSON object with string values.");let i=o,s=v.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);pt.setURLParams(l),$.publish(d.PUB_SUB_EVENTS.EVENT_REQUEST_CONTEXT_CHANGED,i),Object.entries(u).forEach(([m,f])=>{let S=Ge.getRegisteredHeaders()[m]?.split(";").map(C=>C.trim())||[],A=new Map;[...S,...f].forEach(C=>{let _=C.indexOf("=");_!==-1&&A.set(C.slice(0,_),C)}),Ge.registerHeader(m,[...A.values()].join("; "))}),pt.setComponentCache("lastActionID",""),p&&globalThis.location&&globalThis.location.reload()}subscribeToGlobalEvents(){let e=g.generateUniqueID(),n={matcher:"SWITCH_REQUEST_CONTEXT",criteria:{UserID:v.getOperatorIdentifier()||""}};Tt.subscribe(n,this.#n.bind(this),void 0,e)}},_H=new Q0;var bH="displaySaveAssignmentBrowserNotification",X0=!1,TH=t=>{X0||($.subscribe(d.PUB_SUB_EVENTS.CASE_EVENTS.SAVE_ASSIGNMENT_COMPLETE,e=>{t("Save Assignment",e)},bH),X0=!0)},vH=()=>{$.unsubscribe(d.PUB_SUB_EVENTS.CASE_EVENTS.SAVE_ASSIGNMENT_COMPLETE,bH),X0=!1};var ry=()=>{if(!(typeof globalThis>"u"))return globalThis.Notification},e$=()=>{let t=v?.environmentInfoObject;return t?.features?.pyEnableBrowserNotifications===!0||t?.pyFeatures?.pyEnableBrowserNotifications===!0},wme=()=>typeof document>"u"?"visible":document.visibilityState,I_=()=>typeof window<"u"&&typeof document<"u",RH=t=>{if(!t||typeof window>"u")return!1;try{return new URL(t,window.location.origin).origin===window.location.origin}catch{return!1}},t$=!1,bs={initialize(){!I_()||t$||!e$()||(TH(bs.notifyFromEvent),t$=!0,ry()?.permission==="default"&&bs.requestPermission().catch(()=>{}))},destroy(){vH(),t$=!1},async requestPermission(){if(!I_()||!e$())return"denied";let t=ry();if(!t)return"denied";if(t.permission!=="default")return t.permission;let e=t.requestPermission(),r=await Promise.resolve(e);try{Object.defineProperty(t,"permission",{configurable:!0,value:r})}catch{}return r},canShowNativeNotifications(){if(!I_()||!e$())return!1;let t=ry();return!!(t&&t.permission==="granted")},notify(t){if(!I_()||!bs.canShowNativeNotifications()||t.notifyWhenVisible===!1&&wme()==="visible")return null;let e=ry();if(!e)return null;let r=t.href??(t.caseTypeID&&(t.caseId||t.caseID)?Eu.getSemanticURLForToaster(t.caseTypeID,t.caseId??t.caseID??"",void 0,void 0,void 0,t.businessID):void 0),n=RH(r)?r:void 0,o=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??o,a=new e(o,{body:i,tag:s,icon:t.icon,silent:t.silent,requireInteraction:t.requireInteraction,data:{...t.data,href:n}});return a.addEventListener("click",()=>{bs.openNotificationTarget(n),a.close()}),a},async showNotification(t){let e=ry();return e?.permission==="granted"?bs.notify(t):e?.permission==="denied"||await bs.requestPermission()!=="granted"?null:bs.notify(t)},openNotificationTarget(t){RH(t)&&(window.focus(),window.location.assign(t))},notifyFromEvent(t,e){let r={...e,title:e.title??t,body:e.assignmentID?`Assignment ${e.assignmentID} has been saved.`:e.body};bs.showNotification(r).catch(()=>{})}},__=bs;var $me=()=>{$.publish(d.PUB_SUB_EVENTS.BOOTSTRAP_SHELL_EVENTS.CONSTELLATION_LOADED,{})},PH={publishConstellationLoadedEvent:$me};var r$=class{activateContainerItemOnSwitch(e){let r=`${d.APP.APP}/${d.PRIMARY}`,n=wt(r,e),o={target:r,containerItemID:n};ct({}).getPConnect().getContainerManager().activateContainerItem(o)}removeContainerItemOnClose(e){let r=`${d.APP.APP}/${d.PRIMARY}`,n=wt(r,e),o={target:r,containerItemID:n};ct({}).getPConnect().getContainerManager().removeContainerItem(o)}showCasePreview(e,r){let o=ct({meta:{type:"PreviewViewContainer",config:{name:d.PREVIEW}},options:{context:d.APP.APP,target:"root/hybrid_preview"}});o.getPConnect().getContainerManager().resetContainers({name:d.PRIMARY,context:d.APP.APP}),Rh(d.APP.APP,d.PREVIEW)||o.getPConnect().getContainerManager().initializeContainers({type:"multiple",name:d.PREVIEW}),o.getPConnect().getActionsApi().showCasePreview(e,{caseClassName:r})}closeCasePreview(){ct({}).getPConnect().getContainerManager().resetContainers({name:d.PREVIEW,context:d.APP.APP})}isFormDirty(e){let r=`${d.APP.APP}/${d.PRIMARY}`,n=rw(r,e);return nn.isStateModified(n)}getEventUtils(){return PH}getBroadcastUtils(){return rp}isTraditionalUICase(e){return Dn(e)}},ny=new r$;var n$=class{static openCase(e,r=E.APP.APP,n={}){return n.renderInline=!0,n.pageName?(v.setDefaultCasePage(P.getDefaultQualifiedName(n.pageName)),n.pageName=P.getDefaultQualifiedName(n.pageName)):(v.setDefaultCasePage(P.getDefaultQualifiedName(d.PY_DETAILS)),n.pageName=P.getDefaultQualifiedName(d.PY_DETAILS)),n?.disableAssignmentHeader?v.disableAssignmentHeader(n.disableAssignmentHeader):v.disableAssignmentHeader(!1),gn.openCase(e,r,d.PRIMARY,n)}static createCase(e,r=E.APP.APP,n={}){return n.renderInline=!0,n.pageName?(v.setDefaultCasePage(P.getDefaultQualifiedName(n.pageName)),n.pageName=P.getDefaultQualifiedName(n.pageName)):(v.setDefaultCasePage(P.getDefaultQualifiedName(d.PY_DETAILS)),n.pageName=P.getDefaultQualifiedName(d.PY_DETAILS)),n?.disableAssignmentHeader?v.disableAssignmentHeader(n.disableAssignmentHeader):v.disableAssignmentHeader(!1),gn.createCase(e,r,d.PRIMARY,n)}static getNextWork(e=E.APP.APP,r={}){return r.renderInline=!0,r.pageName?(v.setDefaultCasePage(P.getDefaultQualifiedName(r.pageName)),r.pageName=P.getDefaultQualifiedName(r.pageName)):(v.setDefaultCasePage(P.getDefaultQualifiedName(d.PY_DETAILS)),r.pageName=P.getDefaultQualifiedName(d.PY_DETAILS)),r?.disableAssignmentHeader?v.disableAssignmentHeader(r.disableAssignmentHeader):v.disableAssignmentHeader(!1),gn.getNextWork(e,d.PRIMARY,r)}static openAssignment(e,r=E.APP.APP,n={}){return n.renderInline=!0,n.pageName?(v.setDefaultCasePage(P.getDefaultQualifiedName(n.pageName)),n.pageName=P.getDefaultQualifiedName(n.pageName)):(v.setDefaultCasePage(P.getDefaultQualifiedName(d.PY_DETAILS)),n.pageName=P.getDefaultQualifiedName(d.PY_DETAILS)),n?.disableAssignmentHeader?v.disableAssignmentHeader(n.disableAssignmentHeader):v.disableAssignmentHeader(!1),gn.openAssignment(e,r,d.PRIMARY,n)}static openPage(e,r,n=E.APP.APP,o={}){let i=Nr;o?.defaultCasePage?(v.setDefaultCasePage(P.getDefaultQualifiedName(o.defaultCasePage)),o.defaultCasePage=P.getDefaultQualifiedName(o.defaultCasePage)):v.setDefaultCasePage(P.getDefaultQualifiedName(d.PY_DETAILS)),o?.disableAssignmentHeader?v.disableAssignmentHeader(o.disableAssignmentHeader):v.disableAssignmentHeader(!1);let s={viewName:e,className:r,acTargetName:d.PRIMARY,actionMgrID:w.getNextActionMgrId(),context:n},{promise:a}=w.actionManagerPromise(i,s.actionMgrID);return T({type:i,payload:{...s}}),a}static getCurrentContextAPI(e,r=E.APP.APP){let n={meta:{config:{}},options:{context:r,pageReference:e,containerName:d.PRIMARY}};return ct(n).getPConnect()}},b_=n$;var v_={};Wt(v_,{buildResizeMessage:()=>NH,mashup:()=>T_});function Mme(){try{let{ancestorOrigins:t}=globalThis.location;if(t&&t.length>0)return t[0]??""}catch{}return""}function o$(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 NH(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 i$=class{gadgetName="";resize=!1;parentOrigin="";boundOnMessage=this.onMessage.bind(this);init(e){if(typeof globalThis.location>"u"||typeof globalThis.document>"u")return;let{resizing:r,parentOrigin:n}=e;this.gadgetName=globalThis.window.name,this.resize=r==="stretch",this.parentOrigin="",n?this.parentOrigin=o$(n):globalThis.document.referrer?this.parentOrigin=o$(globalThis.document.referrer):this.parentOrigin=o$(Mme());let o=globalThis.document.getElementsByTagName("app-root")[0];o&&(o.classList.add("mashup"),globalThis.window.parent!==globalThis.window&&this.resize&&this._registerResizeObserver(o))}send(e){if(typeof globalThis.window>"u"||typeof globalThis.location>"u")return;let{action:r,message:n}=e,o=JSON.stringify({gadgetName:this.gadgetName,action:r,message:n});globalThis.window.parent.postMessage(o,this.parentOrigin||globalThis.location.origin)}_registerResizeObserver(e){if(typeof globalThis.ResizeObserver!="function")return;new globalThis.ResizeObserver(n=>{for(let o of n){let i=NH(o);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 r;try{r=JSON.parse(e.data)}catch{return!1}return r.action==="UpdateUrl"&&this._updateUrl(r.message.url),!0}getMessageHandler(){return this.boundOnMessage}},T_=new i$;typeof window<"u"&&window.addEventListener("message",T_.getMessageHandler(),!1);var OH={type:"RootContainer",config:{renderingMode:"noPortal"},children:[{type:"ViewContainer",config:{routingInfo:"@ROUTING_INFO",name:"primary"}}]},kme={type:"RootContainer",config:{renderingMode:"hybrid"},children:[{type:"HybridViewContainer",config:{routingInfo:"@ROUTING_INFO",name:"primary",contextName:"app"},children:[]}]},Lme="app-root.mashup > .case-view, app-root.mashup > .page-view { min-height: 0px !important; }",xH="portal-less-styles",s$=class{createC11nEnv=e=>ct(e);getContextUtils=()=>au;getRoutingManager=()=>Ys;getComponentsRegistry=()=>Zs;getStateManager=()=>Ee;getActionCreators=()=>rt;getStreamObservable=()=>QS;getActionProcessor=()=>ze;getActionHandler=()=>DI;renderApp=(e,r)=>{let n={context:d.APP.APP},i={...g.getIn(e,d.ROOT),options:n};Al(e),Yi(e,n,!0);let s=this.createC11nEnv({meta:i,isRoot:!0});$.publish(E.PUB_SUB_EVENTS.EVENT_RENDER_APP,{props:s,domContainerID:r})};updateStoreWithUiRoot=async(e,r,n)=>{let{data:o,uiResources:i={}}=e,{root:s}=i,a=g.getIn(i,d.CONTEXT_DATA),c=Le(e);await Pe(c,{},{},!1,!0);let l={...o,[d.CONTEXT_DATA]:a};YD(s,r,l,n)};fetchEndPointResource=(e,r,n)=>{M(e,{method:"GET"},d.APP.ROOT).then(o=>{o.status===200&&this.updateStoreWithUiRoot(o.data,r,n)})};loadComponent=async(e,r,n)=>{await go(n);let o=this.createC11nEnv({meta:e,isRoot:!0});we()||Al({}),$.publish(E.PUB_SUB_EVENTS.EVENT_RENDER_APP,{props:o,domContainerID:r})};setStaticServerUrl=(e,r,n)=>{Be.initServer(e,r,n)};loadView=async(e,r,n=[])=>{gt.init();let o=Le(e),i=g.getIn(o,d.VIEWS),s=g.getIn(o,d.NAVIGATIONS),a=g.getIn(o,d.COMPONENTS)||[];a.push(...n);let c=g.getIn(o,d.STATIC_SERVER_URL),l=g.getIn(o,d.APPLICATION_DATA);i&&_w(i),s&&bw(s),h9(l),c&&Be.initServer(c),await go(a,c),this.renderApp(o,r)};initAppShell=(e,r,n)=>{Hh(e),Bt.buildActionTargetMap(r),gt.init(n)};initRoutingTable=(e,r)=>{Hh(e,!0),gt.init(r)};setAppAlias=e=>{Be.setAppAlias(e)};getHomeRestApi=e=>{let r=gt.getServerURL(),{restApi:n}=Nc("home",{portalName:e});return`${r}${n}`};getViewRestApi=(e,r)=>{let{restApi:n}=p9(e,r);return gt.getServerURL()+n};loadRootComponent=async(e,r,n=[],o,i,s)=>{let{config:a}=r||{},c=a?.name;if(we()||Al({}),s){let h=`${d.APP.ROOT}/${c}`;QD(h),CI().deleteContainerItem(h)}(CI().getContainerItems()||[]).length>1&&!c?.startsWith("hybrid_")&&c!=="authoring-preview"&&ys(),T(Re({data:{},context:d.APP.ROOT}));let u=this.createC11nEnv({meta:r,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",...n];await go(f),$.publish(E.PUB_SUB_EVENTS.EVENT_RENDER_APP,{props:u,domContainerID:e,componentName:"RootContainer",portalTarget:o,styleSheetTarget:i})};loadViewByName=(e,r,n,o)=>{let i=this.getViewRestApi(e,n);i===gt.getServerURL()&&(i=this.getHomeRestApi(r)),this.fetchEndPointResource(i,o)};loadPortalView=(e,r)=>{let o=this.getHomeRestApi(e);Cl.loadRuntimeDataPages(),this.fetchEndPointResource(o,r,!0)};configureForBrowserBookmark=e=>{f9(e)};checkIfSemanticURL=()=>Bh();onPCoreReady=e=>{$.subscribe(E.PUB_SUB_EVENTS.EVENT_RENDER_APP,e,"renderAppCallback")};onPCoreCleanup=e=>{$.subscribe(E.PUB_SUB_EVENTS.EVENT_UNMOUNT_APP,e,"unmountAppCallback")};setFieldsDefaultConfigs=e=>{en.updateFieldDefaults(e)};setGoogleMapsAPIKey=e=>{gt.setGoogleMapsAPIKey(e)};setFetchDefaultHeaders=e=>{Jn(e)};setFetchAuthInfo=e=>{Ji(e)};getCaseApi=()=>gn;getMashupApi=()=>b_;enableAppRouting=e=>{$I(e)};initStore=()=>Al({});getBootstrapConfig=async(e,r)=>{let n=`${r.token_type} ${r.access_token}`;return fetch(`${e}/api/application/v2/data_views/D_pxBootstrapConfig`,{method:"GET",headers:new Headers({Authorization:n})}).then(o=>o.json())};getBootstrapConfigViaSB=async(e,r,n)=>{let o=n?`?dataViewParameters=${encodeURIComponent(JSON.stringify({themeID:n}))}`:"",i=`${e}/api/application/v2/data_views/D_pxBootstrapConfig${o}`;return M(i,{method:"GET",headers:new Headers(r)}).then(s=>{if(s.data)return s.data;throw Error("D_pxBootstrapConfig load failed.",{cause:s.status})})};initCoreContainers=(e={})=>{let{containerType:r="single"}=e,n=ct({meta:OH,options:{context:"root",pageReference:"",target:"root"}});return n.getPConnect().getContainerManager().initializeContainers({type:r,name:"primary",context:"app"}),{props:{getPConnect:n.getPConnect}}};loadMashup=async(e,r=!0)=>{if(r){let o=(document.querySelector(e)??document.getElementsByTagName(e)[0])?.parentNode;if(o&&!document.getElementById(xH)){let i=document.createElement("style");i.id=xH,i.textContent=Lme,o.appendChild(i)}}await this.loadRootComponent(e,OH,[d.LOAD_VIEW_STRING,"ViewContainer"]),globalThis.parent!==globalThis&&T_.init({resizing:"stretch"})};bootstrapWithAuthHeader=async(e,r,n=[],o,i)=>{let{customRendering:s=!1,onPCoreReadyCallback:a,staticContentServerUrl:c,dynamicSetCookie:l=!1,renderingMode:u,locale:p,envType:m,themeID:f,customCookies:h=!1,enableRouting:S}=e,{restServerUrl:A,authInfo:C,authorizationHeader:_,appAlias:I,theme:N={}}=e,x=e.additionalHeaders?{...e.additionalHeaders}:{},H=e.extras?.defaultPortalName;H&&(x={...x,"X-Pega-Portal-Name":H});let G=null,ne=!_&&C&&!C.authType;if(C||(e.authInfo={},C=e.authInfo),(_&&Object.keys(C).length===0||h&&!ne&&!C.authType)&&(C.authType="custom"),C.customCookies=h,!_&&C.tokenInfo?.access_token){let{tokenInfo:he}=C;_=`${he.token_type} ${he.access_token}`}if(C.tokenInfo?.csrf&&(x={...x,pzCTkn:C.tokenInfo.csrf}),I&&I.indexOf("/")===-1&&(I=`app/${I}`),m==="LAUNCHPAD"){x={...x,"X-Constellation-App":"Pega"},A=A.endsWith("/dx")?A:`${A}/dx`;let he=f?`?themeID=${f}`:"";globalThis.PCore&&(G=await this.getLPConfig(`${A}/api/application/v2/environmentInfo${he}`,_,x,h)),Object.keys(N).length===0&&G?.theme?.definition&&(N=JSON.parse(G.theme.definition).Theme)}else ne?G=await this.preInitBootstrapConfig(e,I,x,f):G=await this.getBootstrapConfigExtended(I?`${A}/${I}`:`${A}`,_,x,f,h,p);let j=G?.pyConfigJSON?JSON.parse(G.pyConfigJSON):{...G};m==="LAUNCHPAD"&&await this.applyEnvironmentInfoResponse(j),j.restServerConfig=A,j.dynamicSemanticUrl=!1,j.dynamicSetCookie=l,j.enableRouting=!1,j.serviceConfig?Object.assign(j.serviceConfig,{contextPath:"",appAlias:I}):j.serviceConfig={contextPath:"",appAlias:I,staticContentServer:c,appStaticContentServer:"no-appstatic"},j.additionalHeaders={Authorization:_,...x},j.envType=m,j.dynamicLoadComponents=!s,j.dynamicSemanticUrl=!s,j.noHistory=!0,j.theme=N??{};let oe=f&&j?.themeObject?j.themeObject:null;j.theme=oe||N,j.renderingMode=u??j.renderingMode,j.locale=p||j.locale,e.semanticUrlArgs&&(j.semanticUrlArgs=e.semanticUrlArgs);let Ie=c||j.serviceConfig.staticContentServer;if(j.isSdk?(j.enableRouting=S,j.dynamicSemanticUrl=j.enableRouting,j.environmentInfo||(j.environmentInfo={}),j.environmentInfo.pyExecutionRuntimeName=E.APP.SDK_RUNTIME,Be.initServer(c,"no-appstatic")):(j.serviceConfig.staticContentServer=Ie,j.serviceConfig.appStaticContentServer=j.serviceConfig.appStaticContentServer||"no-appstatic",Be.initServer(Ie,Ie)),j.renderingMode==="EMBED"&&C?.authentication_service&&C.authentication_service!=="pega"&&(j.routingInfo||(j.routingInfo={}),j.routingInfo.authServiceAlias=C.authentication_service),await Cl.initCoreConfig(j),a&&$.subscribe(E.PUB_SUB_EVENTS.EVENT_RENDER_APP,a,"renderAppCallback"),j.envType==="LAUNCHPAD"&&j.renderingMode==="EMBED"&&v.setIsWebEmbed(!0),C&&["OAuth2.0","custom"].includes(C?.authType)&&this.setFetchAuthInfo(C),!s){let he=v.environmentInfoObject?.pyInfinityStaticService,De=null;if(he){let Ye=await Zt.getDataAsync("D_pxGetComponentLibraryListAndMap","",{});Array.isArray(Ye.data)&&Ye.data.length>0&&(De=Ye.data)}let Fe=async(Ye,Oe)=>{try{let ft=async()=>{await this.importReactRoot(),Ye(!0)};$.subscribe("component-map-loaded",ft),"ReactRoot"in Zs.getLazyMap()&&Ye(!0)}catch(ft){Oe(ft)}};await new Promise(Fe),Cl.initCoreContainers(),await this.loadRootContainerWithHybrid(r,n,o,i),De&&await Promise.all(De.map(({pyComponentMap:Ye,pxUpdateDateTime:Oe})=>Be.importCustomComponentMap(Ye,Oe)))}};loadRootContainerWithHybrid=(e,r=[],n,o)=>(r.push(d.CONTAINER_TYPE?.HYBRID||"HybridViewContainer",d.LOAD_VIEW_STRING),this.loadRootComponent(e,kme,r,n,o));getBootstrapConfigExtended=async(e,r,n,o,i,s)=>{let a={};o&&(a.themeID=o),s&&(a.locale=s);let c=o||s?`?dataViewParameters=${encodeURIComponent(JSON.stringify(a))}`:"",l=`${e}/api/application/v2/data_views/D_pxBootstrapConfig${c}`,u=r?{Authorization:r,...n}:n;return fetch(l,{method:"GET",headers:new Headers(u),credentials:r&&!i?"same-origin":"include"}).then(p=>{if(p.ok)return p.json();throw Error("D_pxBootstrapConfig load failed.",{cause:p.status})})};getLPConfig=async(e,r,n,o)=>{let i=new Headers({...n,...r&&{Authorization:r}}),s=await fetch(e,{method:"GET",headers:i,credentials:r&&!o?"same-origin":"include"});if(!s.ok)throw new Error("environmentInfo load failed.",{cause:s.status});return s.json()};applyEnvironmentInfoResponse=async e=>{let{environmentInfo:r,pyCaseTypeList:n,theme:o,keyMapping:i}=e,{pxApplication:s,features:a,pxLocale:c}=r,l={simpleTable:{pageInstructionUUIDGeneration:!1},...a},u=Intl.DateTimeFormat().resolvedOptions().timeZone.toUpperCase(),p=u==="ETC/UNKNOWN"?"America/New_York":u;e.environmentInfo={...r,pxApplication:{...s},features:l,pyCaseTypeList:n,pxLocale:{...c,pyTimeZone:p}},e.timezone=p;let m=Object.keys(e.environmentInfo);return{isEnvInfoValid:["pxOperator","pxLocale","pxApplication"].every(S=>m.includes(S)),theme:o,keyMapping:i,features:l}};importReactRoot=async()=>{let e=[];return Zs.getComponent("ReactRoot").modules.forEach(r=>{e.push(r())}),Promise.allSettled(e)};preInitBootstrapConfig=async(e,r,n,o)=>{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:h={}}=e,S=o??null,A={restServerUrl:i,restServerConfig:i,dynamicSetCookie:c,enableRouting:!1,serviceConfig:{contextPath:"",appAlias:r,staticContentServer:a,appStaticContentServer:"no-appstatic"},additionalHeaders:{...n},envType:f,dynamicLoadComponents:!s,dynamicSemanticUrl:!s,noHistory:!0,themeIDObj:S,theme:S||h,renderingMode:u,locale:p,timezone:m,tokens:{C11NB2S:""}};return Be.initServer(a,"no-appstatic"),await Cl.init(A),l&&["OAuth2.0","custom"].includes(l?.authType)&&this.setFetchAuthInfo(l),this.getBootstrapConfigViaSB(r?`${i}/${r}`:`${i}`,n,o)}},Wr=new s$;var a$=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}},DH=a$;var c$=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;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 DH(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.requestContext=e.requestContext,this.pzencv1zzz=e.pzencv1zzz}},wH=c$;var l$="@P .viewConfig",Ume="@ROUTING_INFO",$H="runtimeEnvironmentInfo",dp=0,u$=class{#e=[];async init(e){let r=new wH(e);this.#t(),$I(r.enableRouting),Al({}),en.updateFieldDefaults(r.fieldDefaults),en.setFieldDefault("Percentage","storePercentageAsDecimal",r.storePercentageAsDecimal),this.#o(r.routingInfo,r.actionModel,{server:r.restServerConfig,reAuthUrl:r.serviceConfig.reAuthUrl});let{appAliasWithoutServlet:n,appAlias:o,googleMapKey:i,staticContentServer:s,appStaticContentServer:a}=r.serviceConfig;Be.setAppAlias(n||o),gt.setGoogleMapsAPIKey(i),Be.initServer(s,a,r.tokens.C11NB2S),ae.setRemoteCaseMapping(r.remoteCaseMapping),_s.init(r.collab),_s.subscribeToCaseEvents(),Oc.subscribeToCaseEvents(),Tt.subscribeToCaseEvents(),Tt.setConnectionConfig({messagingService:r.serviceConfig.messagingService}),r.initBroadcast&&ny.getBroadcastUtils().init();let c=this.#a(r.renderingMode);r.additionalHeaders=r.additionalHeaders||{},r.additionalHeaders[d.X_ORIGIN_CHANNEL]??=c,Ge.setDefaultHeaders(r.additionalHeaders),Ge.setRequestContext(r.requestContext),r.envType==="Infinity"&&await this.loadEnvironmentInfoFromDataPage(r);let l={...r.environmentInfo,isAnonymousUser:r.isAnonymousUser===!0,encCSRFToken:r.pzencv1zzz,renderingMode:r.renderingMode,...r.portalTemplate?{pyPortalTemplate:r.portalTemplate}:{}};l.pyCaseTypeList?.forEach(m=>{let f=m.pyWorkTypeImplementationClassName;f&&(m.localeReference=Ri(Cn.CASE,f))}),this.#c(r,l.features?.isNamespaceEnabled),this.configureTheme(r.theme),v.setCookieComplianceMethod(r.cookieComplianceMethod),v.setIsExtraCallRequiredForDefaultHome(r.isExtraCallRequiredForDefaultHome),v.setEnablePriorityAndUrgencyImprovements(r.enablePriorityAndUrgencyImprovements),v.setEnvironmentInfo(l);let p=new URLSearchParams(globalThis.location?.search??"").get("lang")||r.locale||globalThis.navigator?.language||"en-US";v.setLocale(p),typeof document<"u"&&(document.documentElement.lang=p,document.documentElement.dir=Z0(p)),Or().setTimezone(r.timezone),pt.init(),r.envType!=="Infinity"&&_H.subscribeToGlobalEvents(),__.initialize(),r.initBroadcast&&ny.getBroadcastUtils().init(),await Xd()}configureTheme=e=>{if(e){let r=e.light,n=e.dark;r!==void 0&&n!==void 0?(this.#i(r),this.#i(n,{type:"dark"})):v.setTheme(e)}};getBootstrapConfig=async(e,r)=>{let n=`${r.token_type} ${r.access_token}`,o=`${e}/api/application/v2/data_views/${P.getDefaultQualifiedName("D_pxBootstrapConfig")}`;return(await fetch(o,{method:"GET",headers:new Headers({Authorization:n})})).json()};initCoreContainers=(e={})=>{let{containerType:r="single"}=e,o=ct({meta:{type:"RootContainer",config:{renderingMode:"noPortal"},children:[{type:"ViewContainer",config:{routingInfo:"@ROUTING_INFO",name:"primary"}}]},options:{context:"root",pageReference:"",target:"root"}});return o.getPConnect().getContainerManager().initializeContainers({type:r,name:"primary",context:"app"}),{props:{getPConnect:o.getPConnect}}};importReactRoot=async()=>{let e=[];return Wr.getComponentsRegistry().getComponent("ReactRoot")?.modules?.forEach(r=>{e.push(r())}),Promise.allSettled(e)};importDesignSystemComponentMap=async(e,r,n)=>{try{iV(e)}catch(i){console.error("Design system load blocked: untrusted or malformed URL",i);return}let o=(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 o(`${e}component/project/${r}/designsystems/${n}/componentsmap.js?v=${Date.now()}`)}catch(i){console.log(i)}};buildSemanticUrl=(e,r,n,o,i)=>{let s=new URLSearchParams(r),a=n==="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 S=(e.startsWith("/")?e.substring(1):e).split("/");l=S[0]||null,u=S[1]||null,S[2]==="assignments"&&S[3]&&(p=S[3])}let m=[o];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:r,serviceConfig:n,semanticUrl:o,queryParams:i,noPortal:s,noHistory:a,viewName:c,theme:l,restServerConfig:u,dynamicLoadComponents:p=!0,dynamicSemanticUrl:m=!0,renderingMode:f="FULL_PORTAL",envType:h,extras:S}=e,{appAlias:A,contextPath:C}=n,_=globalThis.location,I=_?.origin??"",N=u??I,x={};if(C&&(N+=C),A&&h!=="LAUNCHPAD"&&(N+=`/${A}`),e.restServerConfig=N,this.#s(),m===!0){let oe=this.buildSemanticUrl(o,i,s,N,c);!a&&oe&&typeof globalThis.history<"u"&&globalThis.history.replaceState({},"home",oe)}else if(f!=="HYBRID"){let oe=_?.href??"",Ie=oe.indexOf("?");Ie>0&&typeof globalThis.history<"u"&&globalThis.history.pushState({},"home",oe.substring(0,Ie)),x.dynamicSemanticUrl=!1}else console.log(`renderingMode :${f}`);p!==!0&&(x.dynamicLoadComponents=!1);let H=null;if(A){let oe=A.indexOf("/app/");H=oe>=0?A.substring(oe+1):A}if((x.dynamicSemanticUrl===!1||x.dynamicLoadComponents===!1)&&PCore.setBehaviorOverrides(x),e.appAlias=H,l)if(typeof l=="object")e.theme=l;else try{e.theme=JSON.parse(l)}catch{e.theme={}}let ne=_?`${_.protocol}//${_.host}`:r.domain;if(f==="EMBED")try{ne=new URL(e.restServerConfig).origin}catch{}let j={...r,domain:ne,searchParams:_?_.search:"",embedQueryParams:e.semanticUrlArgs};e.routingInfo=j,e.initBroadcast=v.environmentInfoObject?.pxMashupDetails?.pyIsTraditionalCoexistence==="true",e.noPortal&&(e.noPortal==="true"||e.noPortal===!0)&&(e.renderingMode="EMBED"),S?.cspNonce&&Reflect.set(globalThis,"__webpack_nonce__",S.cspNonce),v.setCaseLabelFirstInTitle(e.extras?.useDefaultBrowserTabTitle??!0),await this.init(e)};launchViewByName=async(e,r,n,o,i,s,a,c,l=[])=>{dp+=1;let u=c||`mashup${dp}`,p={type:"RootContainer",config:{viewConfig:l$,renderingMode:"view",name:u}};await Wr.loadRootComponent(e,p,i,s,a),await this.loadCustomComponentLibrariesIfEnabled(l),Wr.loadViewByName(r,n,o,u)};launchView=(e,r,n=[],o,i,s,a)=>{dp+=1;let c;a==="hybrid"?c=`hybrid_${dp}`:a?c=a:c=`mashup${dp}`;let l={type:"RootContainer",config:{viewConfig:l$,renderingMode:"portal",name:c}};a===d.HYBRID&&dl.setRuntimeParam(d.HYRBID_ROOT_CONTAINERNAME,c),dl.setRuntimeParams(o),Wr.loadRootComponent(e,l,n,i,s).then(()=>Wr.updateStoreWithUiRoot(r,c,!1))};launchPortal=async(e,r,n=`portal${dp+=1}`,o=[],i=[])=>{let s="LoadingComponent",a={type:"RootContainer",config:{viewConfig:l$,renderingMode:"portal",skeleton:s,name:n}},c=[...o,s];v.isPortalLoaded=!0;try{return await Wr.loadRootComponent(e,a,c),await this.loadCustomComponentLibrariesIfEnabled(i),Wr.loadPortalView(r,n)}catch(l){throw console.error(`Failed to launch portal ${r}:`,l),l}};launchMashup=(e,r=!0,n=[])=>{let o={type:"RootContainer",config:{renderingMode:"noPortal"},children:[{type:"ViewContainer",config:{routingInfoAnnotation:Ume,name:"primary"}}]};if(r&&!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 Wr.loadRootComponent(e,o,[d.LOAD_VIEW_STRING,"ViewContainer"]),await this.loadCustomComponentLibrariesIfEnabled(n)))();let s=Reflect.get(globalThis,"parent"),a=Reflect.get(globalThis,"window");s&&s!==a&&import(`${Be.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 r=e.environmentInfo.pyDataPages,n=({pyLoadOnlyInRuntime:o})=>o===!0||o==="true";this.#e=r.filter(n),this.#r(r.filter(o=>!n(o))),this.#e.length>0&&$.subscribe(d.PUB_SUB_EVENTS.EVENT_POST_ACTION,({actionType:o})=>{(o===zs||o===uo||o===No)&&this.loadRuntimeDataPages()},$H)}};loadRuntimeDataPages=()=>{if(v.getRenderingMode()==="PREVIEW")return;let e=this.#e;this.#t(),this.#r(e)};#t(){this.#e=[],$.unsubscribe(d.PUB_SUB_EVENTS.EVENT_POST_ACTION,$H)}#r(e){e.length!==0&&setTimeout(()=>{this.loadDataPagesIntoEnvironmentInfo(e).catch(r=>{console.error("Error loading data pages into environment info:",r)})},d.PRIORITY.TRIVIAL)}loadDataPagesIntoEnvironmentInfo=async e=>{if(!e?.length)return;let r=v.environmentInfoObject;if(!r)return;let n=e.filter(({pyName:a,pyPath:c})=>!a||!c?(console.warn("Invalid data page configuration: missing pyName or pyPath"),!1):!0);if(n.length===0)return;let o=await Promise.allSettled(n.map(async({pyName:a,pyPath:c})=>{try{let l=await Zt.getPageDataAsync(a,"",{});return{pyPath:c,response:l}}catch(l){return console.error(`Failed to load data page ${a}:`,l),null}})),i=o.length,s=!1;for(let a=0;a<i;a+=1){let c=o[a];if(c.status==="fulfilled"&&c.value){let{pyPath:l,response:u}=c.value;this.setNestedProperty(r,l,u),s=!0}}s&&v.setEnvironmentInfo(r)};#n(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)&&Object.getPrototypeOf(e)===Object.prototype}setNestedProperty(e,r,n){let o=r.startsWith(".")?r.slice(1):r;if(!o){typeof n=="object"&&n!==null&&Object.assign(e,n);return}let i=o.split("."),s=i.length,a=e;for(let c=0;c<s-1;c+=1){let l=i[c],u=a[l];if(this.#n(u))a=u;else{let p={};a[l]=p,a=p}}a[i[s-1]]=n}start=async(e,r)=>{let n=e.extras?.defaultPortalName;n&&(e.additionalHeaders={...e.additionalHeaders||{},"X-Pega-Portal-Name":n});let{serviceConfig:{appStaticContentServer:o},ccV2LibId:i,environmentId:s,isAlternateDesignSystemEnabled:a,alternateDesignSystemName:c}=e;await this.initCoreConfig(e);let l=v.environmentInfoObject?.pyC11nDXCBDevURL,u=a==="true"&&c!=="other",p=async()=>{await this.importReactRoot();let S=[];l?S.push(Be.importCustomComponentMap("")):i&&S.push(Be.importCustomComponentMap(i)),u&&S.push(this.importDesignSystemComponentMap(o,s,c)),S.length&&await Promise.all(S),r?.()},m=Wr.getComponentsRegistry();return"ReactRoot"in m.getLazyMap()?!0:m.getComponent("ReactRoot")?(await p(),!0):new Promise(S=>{let A=async()=>{await p(),$.unsubscribe("component-map-loaded","component-map-loaded-id"),S(!0)};$.subscribeOnce("component-map-loaded",A,"component-map-loaded-id")})};registerForDebugInfo=e=>{if(v.setPreviewMode(),!e)return;let r=({debugInfo:n})=>{let o=n?.["X-Pega-App-Debug-ID"];o&&e.postMessage({appDebugID:o})};$.subscribe("fetchSuccess",r,"fetchSuccess"),$.subscribe("fetchFailure",r,"fetchFailure")};toggleTracerHeaders=e=>{e.addEventListener("message",r=>{r?.data?.enableTracer?Tr.enableTracer():Tr.disableTracer()})};loadEnvironmentInfo=async e=>{let r=Reflect.get(globalThis,"pms"),n=typeof r=="object"&&r!==null?Reflect.get(r,"device"):void 0,o=typeof n=="object"&&n!==null&&Reflect.get(n,"systemName")==="Android";if(e.theme&&!o)try{let i=JSON.parse(e.theme.definition),s=i.Branding,a=i.Theme;v.setBrandingInfo(s),v.setTheme(a)}catch{v.setBrandingInfo({}),v.setTheme({})}if(e.darkTheme&&!o){let i={type:"dark"};try{let s=JSON.parse(e.darkTheme.definition);v.setBrandingInfo(s.Branding,i),v.setTheme(s.Theme,i)}catch{v.setBrandingInfo({},i),v.setTheme(void 0,i)}}e.keyMapping&&v.setKeyMapping(e.keyMapping),v.setCookieComplianceMethod(e.cookieComplianceMethod??"none")};async loadCustomComponentLibrariesIfEnabled(e){e?.length>0&&(v.environmentInfoObject?.pyInfinityStaticService||yt())&&await this.loadCustomComponentLibraries(e)}async loadCustomComponentLibraries(e){let r=e.map(n=>this.importSingleCustomComponent(n));await Promise.all(r)}importSingleCustomComponent(e){return typeof e=="object"&&"pyComponentMap"in e?Be.importCustomComponentMap(e.pyComponentMap,e.pxUpdateDateTime):Be.importCustomComponentMap(e)}#o(e,r,n){Hh(e),Bt.buildActionTargetMap(r),gt.init(n)}#s(){document.querySelectorAll('head link[rel~="icon"], head link[rel~="apple-touch-icon"]').forEach(r=>{r.setAttribute("href",r.href)})}#i(e,r){if(e===null)return;if(typeof e=="object"){v.setTheme(e,r);return}let n;try{n=JSON.parse(e)}catch{v.setTheme(r?.type==="dark"?void 0:{},r);return}v.setTheme(n,r)}#a(e){return e===d.EMBED?d.X_ORIGIN_CHANNEL_EMBEDDED_BROWSER:d.X_ORIGIN_CHANNEL_BROWSER}#c(e,r){r&&(e.additionalHeaders.Prefer="namespaced",Ge.setDefaultHeaders(e.additionalHeaders))}},jme=new u$,Cl=jme;var zme="createViewRuleByID",Fme="getViewRuleByID",Vme="updateViewRuleByID",Bme="deleteViewRuleByID",Hme="getCalculatedFieldsInViewByID",Gme=(t,e)=>{let{restApi:r,reqType:n}=U(zme);return M(r,{method:n,body:t},e).then(o=>o.data)},qme=(t,e)=>{let{restApi:r,reqType:n}=U(Fme,{ID:t});return M(r,{method:n},e).then(o=>o.data)},Wme=(t,e,r)=>{let{restApi:n,reqType:o}=U(Vme,{ID:t});return M(n,{method:o,body:e},r).then(i=>i.data)},Kme=(t,e)=>{let{restApi:r,reqType:n}=U(Bme,{ID:t});return M(r,{method:n},e).then(o=>o.data)},Jme=(t,e,r)=>{let{restApi:n,reqType:o}=U(Hme,{caseID:t,viewID:e});return M(n,{method:o,body:{calculations:{fields:r}}}).then(i=>i.data)},MH={createViewRule:Gme,getViewRule:qme,updateViewRule:Wme,deleteViewRule:Kme,getCalculatedFields:Jme};var Yme="addCaseFollower",Zme="deleteCaseFollower",Qme="getCaseFollowers",Xme={"Content-Type":"application/json"},efe=(t,e,r)=>{let n={caseID:t},o=JSON.stringify({users:e.map(i=>({ID:i}))});return ve(Yme,{body:o,queryPayload:n,headers:Xme},r)},tfe=(t,e,r)=>ve(Zme,{queryPayload:{caseID:t,followerID:e}},r),rfe=(t,e)=>ve(Qme,{queryPayload:{caseID:t}},e).then(n=>n.data.followers),kH={addCaseFollower:efe,deleteCaseFollower:tfe,getCaseFollowers:rfe};var nfe="addRelatedCases",ofe="removeRelatedCase",ife="getRelatedCases",sfe=(t,e,r)=>{let n={caseID:t},o=JSON.stringify({cases:e});return ve(nfe,{body:o,queryPayload:n},r)},afe=(t,e,r)=>ve(ofe,{queryPayload:{caseID:t,relatedCaseID:e}},r),cfe=(t,e)=>ve(ife,{queryPayload:{caseID:t}},e).then(n=>n.data.relatedCases),LH={addRelatedCases:sfe,removeRelatedCase:afe,getRelatedCases:cfe};var d$="operatorDetails",lfe="operatorDetailsByBusinessID",ufe=(t,e=!1)=>{let{reqType:r}=U(d$,{});if(r==="GET"){let n={encodedOperatorId:encodeURIComponent(`{"opname":"${t}"}`)};return ve(d$,{queryPayload:n})}return e?ve(lfe,{body:{dataViewParameters:{BusinessID:t}}}):ve(d$,{body:{dataViewParameters:{ID:t}}})},UH={getOperatorDetails:ufe};var jH="postCustomFeedMessages",dfe="postFeedMessages",pfe="deleteFeedMessage",mfe="getFeedMessages",ffe="likeFeedMessages",gfe="unlikeFeedMessages",hfe="getMentionSuggestions",yfe="getTagSuggestions",Sfe="getFeedMessageLikes",Efe="editFeedMessage",Afe="getMentionTypes",Cfe="getViewRuleByMessageType",Ife="refreshCustomPostTypeView",pp={"Content-Type":"application/json"},p$=class{mentionsTagsCancelTokenSource;mentions;constructor(){this.mentionsTagsCancelTokenSource=[],this.mentions=[]}getFeeds=(e,r,n,o,i,s,a)=>{let c=s.getLocalizationService();a||(this.mentions=[]);let l="";o&&Array.isArray(o)&&o?.length>0&&(o.forEach(f=>{f.on&&(l=`${l}${f.id},`)}),l===""&&(l="ClearFilters"));let u="";a&&(u=s.getValue("pulse.pageLastEntry"));let p={filterForContext:r==="pyDataFeed"?encodeURIComponent(e):e,feedID:r,feedClass:n,filterBy:l,pageSize:10,olderThan:u};for(let f=0;f<i.length;f+=1)i[f].cancel();let m=Ci();return i.push(m),ve(mfe,{queryPayload:p,cancelTokenSource:m},s.getContextName()).then(async f=>{if(f.status===200&&f.data){i.pop();let h=[],S={},A=!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 _=f.data.data.FeedList?.pxResults;Array.isArray(_)&&_?.length>0&&_.forEach((I,N)=>{I.ID=I.pzInsKey!==""?I.pzInsKey:`message${N}`,h.push(I.ID),S[I.ID]=I,I?.mentions&&Array.isArray(I?.mentions)&&I.mentions?.length>0&&this.mentions.push(I.mentions),I?.pxResults&&Array.isArray(I?.pxResults)&&I.pxResults?.length>0&&I.pxResults.forEach(x=>{x?.mentions&&Array.isArray(x?.mentions)&&x.mentions?.length>0&&this.mentions.push(...x.mentions)}),!A&&!["pzPostDetails","pzPrivatePostDetails"].includes(I.pyMessageViewReference)&&(A=!0)})}if(A&&await cI({uiResources:f.data.uiResources}),!o&&(o=[{id:"All",label:c.getLocalizedText("All"),on:!0,disabled:!1}],f?.data?.data?.FeedFilters)){let _=f.data.data.FeedFilters?.pxResults,I=!0;if(_&&Array.isArray(_)&&_?.length>0){_.forEach(x=>{let H={id:x.pyFeedSourceReference,label:c.getLocalizedText(x.pyLabel),disabled:!1,on:x.pySelected==="true"};H.on||(I=!1),o.push(H)});let N=o.find(x=>x.id==="All");N&&(N.on=I)}}}if(a&&s.getValue("pulse.messageIDs")){let _=s.getValue("pulse.messages");_={..._,...S},Object.values(_).forEach(I=>{I?.mentions&&Array.isArray(I?.mentions)&&I.mentions?.length>0&&this.mentions.push(I.mentions),I?.pxResults&&Array.isArray(I?.pxResults)&&I.pxResults?.length>0&&I.pxResults.forEach(N=>{N?.mentions&&Array.isArray(N?.mentions)&&N.mentions?.length>0&&this.mentions.push(...N.mentions)})})}if(JD(s.getContextName())){s.updateState({pulse:{messages:a&&s.getValue("pulse.messageIDs")?{...s.getValue("pulse.messages"),...S}:S,messageIDs:a&&s.getValue("pulse.messageIDs")?[...s.getValue("pulse.messageIDs"),...h]:h,nextPageFirstEntry:f?.data?.nextPageFirstEntry||"",pageLastEntry:f?.data?.pageLastEntry||"",postTypes:C,pulseContext:e}});let _=[...new Map(this.mentions.flat()?.map(I=>[I.mentionsID,I])).values()].filter(I=>Object.hasOwn(I,"mentionsType")).filter(I=>!I?.mentionsType?.toLowerCase().includes("user"));return{feedFilters:o,caseMentions:_}}}else return s.reportError(`getFeeds call failed ${f.status}`,f.data),f}).catch(f=>{if(!bh(f))return s.reportError(": Error occurred during ajax call at getFeeds API : ",f.response),f.response})};postMessage=(e,r,n,o=[],i=!1,s=[])=>{let a={message:r,context:e,parentMessageId:i?e:"",attachments:o,pyRecipients:s.length?s:void 0},c=s.length===0?{body:JSON.stringify(a),headers:pp}:{body:JSON.stringify(a),queryPayload:{type:"PegaSocial-Post-Private"},headers:pp};return ve(s.length?jH:dfe,c,n.getContextName()).then(l=>{if((l.status===201||l.status===200)&&l.data){let u=l?.data;if(i){u.parentMessageID=e;let{pxResults:h,caseMentions:S}=this.buildMessageObject(u,i,n,o.length>0);return n.updateState({pulse:{messages:{[e]:{pxResults:h}}}}),S}let{messages:p,messageIDs:m,caseMentions:f}=this.buildMessageObject(u,i,n,o.length>0);return n.updateState({pulse:{messages:p,messageIDs:m}}),f}return n.reportError(`postMessage call failed with status ${l.status}`,l),""}).catch(l=>{throw n.reportError(": Error occurred during ajax call at postMessage API : ",l.response),l.response})};postCustomMessage=(e,r,n)=>ve(jH,{body:r,queryPayload:{type:e},headers:pp},n.getContextName()).then(async i=>{if(i.status===201&&i.data){let s=i.data.data,a={ID:s.ID,pzInsKey:s.ID,classID:s.classID,pyPostType:s.pyPostType,postedByUser:s.postedByUser,pyIsDeleteEnabled:s.pyIsDeleteEnabled,pyMessageViewReference:s.messageViewReference,pyFeed:{pyIconType:"user",pyCommentContext:s.pyCommentContext,pyPostedOn:s.postedTime,pyFeedTitle:s.postedByUser.name,pyIconReference:s.postedByUser.ID},...s.PostMessage};Dh(s.messageViewReference,n,r.context)||await cI({uiResources:i.data.uiResources}),n.updateState({pulse:{messages:{[a.ID]:a,...n.getValue("pulse.messages")},messageIDs:[a.ID,...n.getValue("pulse.messageIDs")]}})}return n.reportError(`postCustomMessage call failed with status ${i.status}`,i),""}).catch(i=>{throw n.reportError(": Error occurred during ajax call at postCustomMessage API : ",i.response),i.response});editMessage=({messageID:e,parentMessageID:r,message:n,pConnectObj:o,isReply:i=!1,recipients:s=[]})=>{let a=JSON.stringify({message:n,...s.length&&{pyRecipients:s}});return ve(Efe,{queryPayload:{messageID:e},body:a,headers:pp},o.getContextName()).then(l=>{if(l?.status===200&&l?.data){let u=l?.data;if(i){u.parentMessageID=r;let{pxResults:f,caseMentions:h}=this.buildMessageObject(u,i,o,!1);return o.updateState({pulse:{messages:{[r]:{pxResults:f}}}}),h}let{messages:p,caseMentions:m}=this.buildMessageObject(u,i,o,!1);return o.updateState({pulse:{messages:p}}),m}return o.reportError(`editMessage call failed with status ${l.status}`,l),""}).catch(l=>{throw o.reportError(": Error occurred during ajax call at editMessage API : ",l.response),l.response})};buildMessageObject=(e,r,n,o=!1)=>{let i={ID:e?.ID||"",classID:e?.classID||"PegaSocial-Message",tags:e?.tags||[],pyHasAttachment:o,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=n.getValue("pulse.messages");if(r){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=n.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 r=e?.filter(n=>n?.mentions&&Array.isArray(n?.mentions)&&n.mentions?.length>0)?.map(n=>n.mentions)?.concat(this.mentions);return[...new Map(r.flat()?.map(n=>[n.mentionsID,n])).values()].filter(n=>Object.hasOwn(n,"mentionsType")).filter(n=>!n?.mentionsType?.toLowerCase().includes("user"))};likeMessage=({pulseContext:e,likedBy:r,messageID:n,isReply:o,pConnectObj:i})=>{let s=r?gfe:ffe,a=JSON.stringify({ContextClass:e});ve(s,{body:a,queryPayload:{pulseContext:e},headers:pp},i.getContextName()).then(l=>{if(l.status===200)if(o){let u=i.getValue(`pulse.messages.${n}`),p=u?.pxResults&&Array.isArray(u?.pxResults)&&u.pxResults?.length>0&&u.pxResults?.map(m=>{if(m={...m},m.pzInsKey===e){let f=0,h=!1,S=m.pyLikes?m?.pyLikes?.pxLikeCount:0;r?(f=S-1,h=!1):(f=S+1,h=!0),m.pyLikes={pxLikeCount:f,pxIsLiked:h}}return m});i.updateState({pulse:{messages:{[n]:{pxResults:p}}}})}else{let u={...i.getValue(`pulse.messages.${n}`)},p=u.pyLikes?u.pyLikes.pxLikeCount:0,m=0,f=!1;r?(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,r,n,o)=>{let i=e;r&&(i=n),ve(pfe,{queryPayload:{messageID:i}},o.getContextName()).then(a=>{if(a.status===200)if(r){let c=o.getValue(`pulse.messages.${e}`),l=c?.pxResults&&Array.isArray(c?.pxResults)&&c.pxResults?.length>0&&c.pxResults?.filter(u=>u.pzInsKey!==n);o.updateState({pulse:{messages:{[e]:{pxResults:l}}}})}else{let c=o.getValue("pulse.messageIDs"),l=c&&Array.isArray(c)&&c?.length>0&&c?.filter(p=>p!==e),u={...o.getValue("pulse.messages")};delete u[e],o.updateState({pulse:{messageIDs:l,messages:u}})}else o.reportError(`deleteMessage call failed with status ${a.status}`,a)}).catch(a=>{o.reportError(": Error occurred during ajax call at deleteMessage API : ",a.response)})};getLikedUsers=(e,r)=>ve(Sfe,{queryPayload:{messageID:e}},r.getContextName());getMentionSuggestions=(e,r)=>{let{pulseContext:n,searchFor:o,mentionsType:i,listSize:s=5}=e,a={pulseContext:n,searchFor:o,mentionsType:i,listSize:s};for(let l=0;l<this.mentionsTagsCancelTokenSource.length;l+=1)this.mentionsTagsCancelTokenSource[l].cancel();let c=Ci();return this.mentionsTagsCancelTokenSource.push(c),ve(hfe,{queryPayload:a,cancelTokenSource:c},r.getContextName()).then(l=>(this.mentionsTagsCancelTokenSource=[],l.status===200&&l.data?l?.data:(r.reportError(`Get mention suggestions call failed ${l.status}`,l.data),[]))).catch(l=>{bh(l)||r.reportError(": Error occurred during ajax call at getMentionSuggestions API : ",l.response.data)})};getMentionTypes=e=>ve(Afe,{},e.getContextName());getPostTypeView=(e,r,n)=>ve(Cfe,{queryPayload:{type:e,contextID:n??""}},r.getContextName());refreshCustomPostTypeView=(e,r,n,o)=>ve(Ife,{body:r,queryPayload:{type:e,contextID:o??""},headers:pp},n.getContextName());getTagSuggestions=(e,r)=>{let{searchFor:n,listSize:o=5}=e,i={searchFor:n,listSize:o};for(let a=0;a<this.mentionsTagsCancelTokenSource.length;a+=1)this.mentionsTagsCancelTokenSource[a].cancel();let s=Ci();return this.mentionsTagsCancelTokenSource.push(s),ve(yfe,{queryPayload:i,cancelTokenSource:s},r.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}`):r.reportError(`Get tag suggestions call failed ${a.status}`,a.data),c}).catch(a=>{bh(a)||r.reportError(": Error occurred during ajax call at getTagSuggestions API : ",a.response.data)})}},zH=new p$;var _fe="addTagsToCase",bfe="deleteCaseTag",Tfe="getCaseTags",vfe=(t,e)=>{let r={caseID:t,viewID:P.getDefaultQualifiedName("pyTaggedCases")};return ve("loadView",{queryPayload:r},e.getContextName()).then(n=>n?.data).catch(n=>{e.reportError(": Error occurred during ajax call at fetchTaggedcases API : ",n.response)})},Rfe=(t,e)=>ve(Tfe,{queryPayload:{caseID:t}},e.getContextName()).then(n=>n?.data?.tagsList).catch(n=>{e.reportError(": Error occurred during ajax call at fetchTags API : ",n.response)}),Pfe=(t,e,r)=>{let n={caseID:t},o=JSON.stringify({tags:e});return ve(_fe,{body:o,queryPayload:n},r.getContextName()).then(i=>i?.data?.results).catch(i=>{r.reportError(": Error occurred during ajax call at postTags API : ",i.response)})},Nfe=(t,e,r)=>ve(bfe,{queryPayload:{caseID:t,tagID:e}},r.getContextName()).catch(o=>{r.reportError(": Error occurred during ajax call at removeTag API : ",o.response)}),Ofe=t=>{let e=P.getDefaultQualifiedName("D_pxGetTagsLandingPageURL");return Zt.getPageDataAsync(e,t.getContextName(),{},{invalidateCache:!0}).catch(r=>{t.reportError(": Error occurred during ajax call getTagsLandingPageURL API : ",r.response)})},FH={getTaggedCases:vfe,getTags:Rfe,postTags:Pfe,removeTag:Nfe,getTagsLandingPageURL:Ofe};var R_=(t,e)=>{XD(e.getContextName(),t.etag),ew(e.getContextName(),t.etag)};var xfe="getAllParticipants",Dfe="getParticipantRoles",wfe="getParticipantRoleView",$fe="getParticipant",Mfe="createParticipant",kfe="updateParticipant",Lfe="deleteParticipant",Ufe=(t,e)=>ve(xfe,{queryPayload:{caseID:t}},e.getContextName()).then(n=>n?.data?.data.content.pyParticipants).catch(n=>{e.reportError(": Error occurred during ajax call at getParticipants API : ",n.response)}),jfe=(t,e)=>ve(Dfe,{queryPayload:{caseID:t}},e.getContextName()).then(n=>n?.data?.participant_roles).catch(n=>{e.reportError(": Error occurred during ajax call at getParticipantRoles API : ",n.response)}),zfe=(t,e,r)=>ve($fe,{queryPayload:{caseID:t,participantID:e}},r.getContextName()).then(o=>o?.data).catch(o=>{r.reportError(": Error occurred during ajax call at getParticipant API : ",o.response)}),Ffe=async(t,e,r,n,o)=>{let i={caseID:t},s={...r,participantRoleID:e},a={"if-match":n.getCaseSummary().headers.etag};return new Promise((c,l)=>{ve(Mfe,{body:s,queryPayload:i,headers:a},n.getContextName()).then(u=>{R_(u.headers,n),c()}).catch(u=>{u.response.data.errorDetails?.forEach(m=>{m.erroneousInputOutputFieldInPage=m.erroneousInputOutputFieldInPage.replace(/\.pyWorkParty\([^)]*\)/,"")});let p=$c(o||n.getContextName());n.reportError(": Error occurred during ajax call at createParticipant API : ",{...u.response.data,formFields:p},o),l(u.response)})})},Vfe=async(t,e,r,n,o)=>{let i={caseID:t,participantID:e},s={"if-match":n.getCaseSummary().headers.etag};return new Promise((a,c)=>{ve(kfe,{body:r,queryPayload:i,headers:s},n.getContextName()).then(l=>{R_(l.headers,n),a()}).catch(l=>{l.response.data.errorDetails?.forEach(p=>{p.erroneousInputOutputFieldInPage=p.erroneousInputOutputFieldInPage.replace(/\.pyWorkParty\([^)]*\)/,"")});let u=$c(o||n.getContextName());n.reportError(": Error occurred during ajax call at updateParticipant API : ",{...l.response.data,formFields:u},o),c(l.response)})})},Bfe=(t,e,r)=>{let n={caseID:t,participantID:e},o={"if-match":r.getCaseSummary().headers.etag};return new Promise((i,s)=>{ve(Lfe,{queryPayload:n,headers:o},r.getContextName()).then(a=>{R_(a.headers,r),i()}).catch(a=>{r.reportError(": Error occurred during ajax call at deleteParticipant API : ",a.response),s(a.response)})})},Hfe=(t,e,r)=>ve(wfe,{queryPayload:{caseID:t,participant_roleID:e}},r.getContextName()).then(o=>o?.data).catch(o=>{r.reportError(": Error occurred during ajax call at fetchTaggedcases API : ",o.response)}),VH={getParticipants:Ufe,getRoleView:Hfe,getParticipantRoles:jfe,getParticipant:zfe,createParticipant:Ffe,updateParticipant:Vfe,deleteParticipant:Bfe};var Gfe="createListPersonalization",qfe="deleteListPersonalization",Wfe="updateListPersonalization",Kfe="getUIListPersonalizations",P_=()=>na("getDataFromSRS");function m$(t=[]){return t.reduce((e,r)=>(e[r.personalizationID]={name:r.name,personalizationState:JSON.parse(r.personalizationState||"{}")},e),{})}var f$="create",g$="update",HH="delete";function oy(t,e,r,n){let o=OI(e);if(o){switch(t){case f$:case g$:{let{markAsDefault:i,...s}=n;Object.entries(s).length>0&&(o.allPersonalizations[r]=s),i&&(o.defaultPersonalization=r);break}case HH:{delete o.allPersonalizations[r],o.defaultPersonalization===r&&(o.defaultPersonalization="");break}default:return null}return o}return null}function BH(t){return typeof t=="object"&&t!==null}function Jfe(t){if(!BH(t))return null;let e=t[P.getDefaultQualifiedName("ID")];if(typeof e!="string"||!e)return null;let r=t[P.getDefaultQualifiedName("PersonalizationState")],n=typeof r=="string"?r:JSON.stringify(r);try{let i=JSON.parse(n);if(!BH(i)||Array.isArray(i))return null}catch{return null}let o=t[P.getDefaultQualifiedName("Name")];return{personalization:{personalizationID:e,name:typeof o=="string"?o:"",personalizationState:n},isDefault:!!t[P.getDefaultQualifiedName("MarkAsDefault")]}}async function GH(t){let e=v.getOperatorIdentifier(),n=(await Zt.getDataAsync(P.getDefaultQualifiedName("InsightPersonalizationListByOperatorAndInsight"),void 0,{InsightID:t,UserID:e})).data;return(Array.isArray(n)?n:[]).reduce((i,s)=>{let a=Jfe(s);return a&&i.push(a),i},[])}async function Yfe(t){let e=await GH(t),r="",n=[];for(let o of e)o.isDefault&&(r=o.personalization.personalizationID),n.push(o.personalization);return{defaultPersonalization:r,allPersonalizations:n}}var Wa={};async function Zfe(t,e,r){let n=P.getDefaultQualifiedName("InsightPersonalization"),i=(await ve("createWork",{body:{caseTypeID:n,content:{[P.getDefaultQualifiedName("InsightID")]:t,[P.getDefaultQualifiedName("Name")]:r.name??"",[P.getDefaultQualifiedName("MarkAsDefault")]:r.markAsDefault??!1,[P.getDefaultQualifiedName("PersonalizationState")]:JSON.stringify(r.personalizationState)},processID:P.getDefaultQualifiedName("pyStartCase")},queryPayload:{viewType:"none",caseClassName:n}})).data?.ID??e;return Wa[e]=i,i}async function qH(t,e){let r=P.getDefaultQualifiedName("Edit"),{restApi:n,reqType:o}=U("caseWideActions",{caseID:t,actionID:r}),s=(await M(`${n}?viewType=form`,{method:o}))?.headers?.etag;if(!s)throw new Error(`Missing etag for personalization case ${t}`);let a={};e.markAsDefault!==void 0&&(a[P.getDefaultQualifiedName("MarkAsDefault")]=e.markAsDefault),e.name!==void 0&&(a[P.getDefaultQualifiedName("Name")]=e.name),e.personalizationState!==void 0&&(a[P.getDefaultQualifiedName("PersonalizationState")]=JSON.stringify(e.personalizationState));let{restApi:c,reqType:l}=U("executeCaseWideActions",{caseID:t,actionID:r});await M(`${c}?viewType=form`,{method:l,headers:{"if-match":s},body:{content:a,pageInstructions:[]}})}async function WH(t,e){await(await GH(t)).filter(({isDefault:o,personalization:i})=>o&&i.personalizationID!==e).reduce((o,{personalization:i})=>o.then(()=>qH(i.personalizationID,{markAsDefault:!1})),Promise.resolve())}async function Qfe(t){let e=P.getDefaultQualifiedName("MarkAsInactive"),{restApi:r,reqType:n}=U("caseWideActions",{caseID:t,actionID:e}),i=(await M(`${r}?viewType=form`,{method:n}))?.headers?.etag;if(!i)throw new Error(`Missing etag for personalization case ${t}`);let{restApi:s,reqType:a}=U("executeCaseWideActions",{caseID:t,actionID:e});await M(`${s}?viewType=form`,{method:a,headers:{"if-match":i},body:{content:{[P.getDefaultQualifiedName("ReasonForStatusUpdate")]:Or().getLocaleValue("Insight Personalization delete")},pageInstructions:[]}})}var Xfe=async t=>{if(P_()){let o=await Yfe(t);return Array.isArray(o.allPersonalizations)&&(o.allPersonalizations=m$(o.allPersonalizations)),o}let e=OI(t);if(e)return Array.isArray(e.allPersonalizations)&&(e.allPersonalizations=m$(e.allPersonalizations)),Promise.resolve(e);let{restApi:r,reqType:n}=U(Kfe,{listID:t});return M(r,{method:n,body:{}}).then(o=>{let{data:i}=o;return{allPersonalizations:m$(i.allPersonalizations),defaultPersonalization:i.defaultPersonalization}})},ege=async(t,e,r)=>{if(P_()){let i=await Zfe(t,e,r);return oy(f$,t,e,r),r.markAsDefault&&await WH(t,i),{data:i}}let{restApi:n,reqType:o}=U(Gfe,{listID:t});return oy(f$,t,e,r),M(n,{method:o,body:{...r,personalizationState:JSON.stringify(r.personalizationState)}}).then(i=>{let s=i.data;return Wa[e]=s,i})},tge=async(t,e,r)=>{let n=Wa[e]||e;if(P_()){await qH(n,r),oy(g$,t,e,r),r.markAsDefault&&await WH(t,n);return}oy(g$,t,e,r);let{restApi:o,reqType:i}=U(Wfe,{listID:t,personalizationID:n})||{};return M(o,{method:i,body:{...r,personalizationState:JSON.stringify(r.personalizationState)}})},rge=async(t,e)=>{let r=Wa[e]||e;if(oy(HH,t,e),P_()){await Qfe(r),Wa[e]&&delete Wa[e];return}let{restApi:n,reqType:o}=U(qfe,{listID:t,personalizationID:r});return M(n,{method:o,body:{}}).then(i=>(Wa[e]&&delete Wa[e],i))};function nge(t){return t?{createPersonalization:ege.bind(null,t),updatePersonalization:tge.bind(null,t),deletePersonalization:rge.bind(null,t),fetchPersonalizations:Xfe.bind(null,t)}:{createPersonalization:()=>Promise.resolve(""),updatePersonalization:()=>Promise.resolve(),deletePersonalization:()=>Promise.resolve(),fetchPersonalizations:()=>Promise.resolve({})}}var KH=nge;var wr=typeof window<"u"?window.sessionStorage:{getItem:()=>null,setItem:()=>{}},JH="getDataObjects",oge="getDataPageObjects",ige="getDataPages",sge="getListData",age="getInsightIDs",QH="getInsightByID",cge="getClassResources",lge="createInsight",uge="deleteInsight",dge="exportToExcel",pge="exportToCSV",mge="scheduleInsight",fge="updateScheduledInsight",gge="deleteScheduledInsight",hge="translateStrings",yge="updateInsight",Sge=["LocalList","RemoteList","PromptList","DataPage"],mp=null;function Ege(t=!0){if(mp)return mp;let e=ir.getAppCacheKey(oge);if(t&&wr.getItem(e))return Promise.resolve(JSON.parse(`${wr.getItem(e)}`));let r={datapageRequestType:"explorable"},{restApi:n,reqType:o}=U(ige,r);return mp=M(n,{method:o,datapageRequestType:"explorable"}),mp.then(i=>{mp=null,wr.setItem(e,JSON.stringify(i))}),mp}function Age(){let t=ir.getAppCacheKey(JH);if(wr.getItem(t))return Promise.resolve(JSON.parse(`${wr.getItem(t)}`));let{restApi:e,reqType:r}=U(JH,{}),n=M(e,{method:r});return n.then(o=>{wr.setItem(t,JSON.stringify(o))}),n}var YH=[],Cge=async t=>{let e=t.filter(i=>!YH.includes(i));if(e.length===0)return;let r={classIDs:t.join(",")},{restApi:n,reqType:o}=U(cge,r);return M(n,{method:o}).then(i=>{i.data.resources&&(YH.push(...e),ZS(i.data.resources))})};function Ige(t){let e=ir.getAppCacheKey(`DefaultColumns_${Object.values(t).join("_")}`);if(wr.getItem(e))return Promise.resolve(JSON.parse(`${wr.getItem(e)}`));let r={dataViewName:P.getDefaultQualifiedName("D_pzGetDefaultColumns")},{restApi:n,reqType:o}=U(sge,r),i=M(n,{method:o,body:{dataViewParameters:t}});return i.then(s=>{wr.setItem(e,JSON.stringify(s))}),i}function _ge(t){return"type"in t&&"classID"in t}function bge(t){let e=zr(t);if(e&&e.classID){let r=Rw(e.classID),n=e.rdFields,o=(n&&!Array.isArray(n)?n.fields:void 0)?.filter(i=>i.indexOf(".")>0);if(o&&!g.isEmpty(o)){let i=o.reduce((s,a)=>{let c=NI(a,e.classID);return c&&_ge(c)&&(s[a]=c),s},{});r={...r,...i}}if(r&&Object.keys(r).length>0){for(let i of Object.keys(r))r[i].type.startsWith("Page")?delete r[i]:r[i]?.datasource&&Sge.includes(r[i].datasource.tableType)&&(r[i].fieldType="Picklist");return{sourceFields:r,sourceMetadata:e}}}return{}}function Tge(t,e,r){if(!e){let i=zr(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 n=ir.getAppCacheKey(`RDColumns-${t}`);if(wr.getItem(n))return Promise.resolve(JSON.parse(`${wr.getItem(n)}`));let o=ir.getData(P.getDefaultQualifiedName("D_pxFieldsForDataSource"),{dataViewParameters:{DataPageName:t}},r);return o.then(i=>{wr.setItem(n,JSON.stringify(i))}),o}function vge(t="",e=""){let r=ir.getAppCacheKey(`PFColumns-${t}${e}`);if(wr.getItem(r))return Promise.resolve(JSON.parse(`${wr.getItem(r)}`));let n=ir.getData(P.getDefaultQualifiedName("D_pxGetInitialFieldsForDataSource"),{dataViewParameters:{DataPageName:t,ClassName:e}});return n.then(o=>{wr.setItem(r,JSON.stringify(o))}),n}var h$={},y$=t=>ir.getAppCacheKey(`PrimaryFields-${t}`),Rge=async(t,e,r,n,o)=>{let i=ir.getData(P.getDefaultQualifiedName("D_pxGetPrimaryFieldsForInsights"),{dataViewParameters:{...e&&{topLevelClassID:e},...n&&{joinedClassIDs:n.join(",")},...r&&{topLevelDataPageID:r}}},o).then(s=>{let a=s.data?.data||[],c={};t.forEach(l=>{c[l]=[]}),a.forEach(l=>{let u=l.classID,p=l[P.getDefaultQualifiedName("pyFieldName")];c[u].push(p)}),Object.entries(c).forEach(([l,u])=>{let p=y$(l);wr.setItem(p,JSON.stringify(u))})}).finally(()=>{t.forEach(s=>{delete h$[s]})});return t.forEach(s=>{h$[s]=i}),i};function Pge(t,e){let r=[],n=[],o=!1,i=[],s=[];return t&&s.push(t),e&&e.length>0&&s.push(...e),s.forEach(a=>{let c=y$(a);if(wr.getItem(c))return;let l=h$[a];if(l){n.push(l);return}r.push(a),a===t?o=!0:i.push(a)}),{allClasses:s,promisesToAwait:n,classesToFetch:r,isTopLevelClassPresent:o,joinedClassesToFetch:i}}async function Nge(t,e,r,n){let{allClasses:o,promisesToAwait:i,classesToFetch:s,isTopLevelClassPresent:a,joinedClassesToFetch:c}=Pge(t,r);return s.length&&i.push(Rge(s,a?t:void 0,a?e:void 0,c.length>0?c:void 0,n)),Promise.allSettled(i).then(()=>{let l={};return o.forEach(u=>{let p=y$(u);if(wr.getItem(p))try{l[u]=JSON.parse(`${wr.getItem(p)}`)}catch{}}),{data:l}})}function Oge(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 XH(t){return typeof t=="object"&&t!==null}function xge(t){return XH(t)&&typeof t.classID=="string"&&Array.isArray(t.fields)}function Dge(t){return{...t[1],fieldID:t[0],fieldType:t[1].fieldType||(t[1].isUserReference?"User reference":void 0),category:Oge(t),classID:t[1].associationClassID?t[1].associationClassID:t[1].classID}}function ZH({data:t}){let e=(i,s)=>Ri("FIELD",i,s),r=typeof t.classID=="string"?t.classID:"",n=Ri("CASE",r);t.classNameLocaleReference=n;let o=Array.isArray(t.fields)?t.fields:[];for(let i=0;i<o.length;i+=1){let s=o[i];if(XH(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=n)}Object.assign(s,a)}}return{data:t}}function wge(t,e,r){if(!e){let{sourceMetadata:o,sourceFields:i}=bge(t);if(o&&i&&Object.keys(i).length>0){let s={...o,fields:Object.entries(i).map(Dge)};if(xge(s)){let a=ZH({data:s});return Promise.resolve(a)}}}let n={dataSource:t,columns:[],parameters:{},associationFilter:r,matchPosition:"",ignoreCase:!1};return Io.init(n).then(({dataSourceMetaData:o})=>o?ZH({data:o}):{data:{classID:"",className:"",isQueryable:!1,fields:[]}})}function $ge(){let{restApi:t,reqType:e}=U(age);return M(t,{method:e})}function Mge(t){let e=vw(t);if(e)return Promise.resolve({data:{pyInsights:[e]}});let r={insightID:t},{restApi:n,reqType:o}=U(QH,r);return M(n,{method:o})}function kge(t){let e={insightID:t.join(",")},{restApi:r,reqType:n}=U(QH,e);return M(r,{method:n})}function Lge(t){let{restApi:e,reqType:r}=U(lge);return M(e,{method:r,body:JSON.stringify(t),headers:{"Content-Type":"application/json"}})}function Uge(t,e){let r={insightID:t},{restApi:n,reqType:o}=U(yge,r),i;return"UpdateDateTime"in e&&(i=e.UpdateDateTime),M(n,{method:o,body:JSON.stringify(e),headers:{"if-match":i,"Content-Type":"application/json"}})}function jge(t){let e={insightID:t},{restApi:r,reqType:n}=U(uge,e);return M(r,{method:n})}function zge(t){let{restApi:e,reqType:r}=U(dge);return M(e,{method:r,body:JSON.stringify(t)})}function Fge(t){let{restApi:e,reqType:r}=U(pge);return M(e,{method:r,body:JSON.stringify(t)})}var Vge=(t,e)=>{let r={insightID:t},{restApi:n,reqType:o}=U(mge,r);return M(n,{method:o,body:JSON.stringify(e)})},Bge=(t,e,r)=>{let n={insightID:t,scheduleID:e},{restApi:o,reqType:i}=U(fge,n);return M(o,{method:i,body:JSON.stringify(r)})},Hge=(t,e)=>{let r={insightID:t,scheduleID:e},{restApi:n,reqType:o}=U(gge,r);return M(n,{method:o})};function Gge(t){let{restApi:e,reqType:r}=U(hge);return M(e,{method:r,body:JSON.stringify(t)})}var eG={getDataObjects:Age,getDataPageObjects:Ege,getDataViewMetadata:wge,getDefaultColumns:Ige,getFieldsForDataSource:Tge,getPrimaryFieldsForDataSource:vge,getPrimaryFieldsForInsights:Nge,getInsightIDs:$ge,getInsightByID:Mge,getInsightsByID:kge,loadClassResources:Cge,createInsight:Lge,updateInsight:Uge,deleteInsight:jge,exportToExcel:zge,exportToCSV:Fge,scheduleInsight:Vge,updateScheduledInsight:Bge,deleteScheduledInsight:Hge,translateStrings:Gge};var S$=class{addRoutes=e=>g9(e)},tG=new S$;var E$=class{static registerModule(e,r,n){Object.assign(n,{[e]:()=>r})}},rG=E$;var A$=class{static getPostActionEvent=()=>E.PUB_SUB_EVENTS.EVENT_POST_ACTION;static getCaseEvent=()=>Object.freeze(E.PUB_SUB_EVENTS.CASE_EVENTS);static getDataEvent=()=>Object.freeze(E.PUB_SUB_EVENTS.DATA_EVENTS);static getTransientEvent=()=>Object.freeze(E.PUB_SUB_EVENTS.EVENT_TRANSIENT_ITEMS);static getBootstrapShellEvent=()=>Object.freeze(E.PUB_SUB_EVENTS.BOOTSTRAP_SHELL_EVENTS);static getBulkProcessEvent=()=>Object.freeze(E.PUB_SUB_EVENTS.EVENT_BULKACTION);static getLocalActionProcessEvent=()=>Object.freeze(E.PUB_SUB_EVENTS.EVENT_LOCALACTION_SUBMISSION)},nG=A$;var C$=class{genericFailedMessage;constructor(){this.genericFailedMessage="Failed to display content. Contact the application administrator."}getGenericFailedMessage(){return this.genericFailedMessage}setGenericFailedMessage(e){this.genericFailedMessage=e}},oG=new C$;var qge=t=>{Ji({tokenInfo:t}),t?.csrf&&!t?.access_token?Jn({pzCTkn:t?.csrf}):Jn({Authorization:`${t?.token_type} ${t?.access_token}`}),setTimeout(()=>$.publish("updateSession",{updateStatus:"success"}),0)},Wge=t=>GS.init(t),Kge=async()=>pU(),Jge=t=>{Jn({Authorization:t}),setTimeout(()=>$.publish("updateSession",{updateStatus:"success"}),0)},iG={setTokens:qge,revokeTokens:Kge,getAuthInstance:Wge,setAuthorizationHeader:Jge};var x$={};Wt(x$,{SDK_VERSION:()=>O$,compareSdkPCoreVersions:()=>xhe,createCustomEvent:()=>Whe,dateFormatInfoDefault:()=>mG,filterForFieldValueList:()=>jhe,getAllFields:()=>Uhe,getAutoFlexClass:()=>Hhe,getBooleanValue:()=>vhe,getCurrentTimezone:()=>Phe,getDateFormatInfo:()=>Nhe,getFilteredStages:()=>Vhe,getInitials:()=>Rhe,getInstructions:()=>zhe,getIsAssignmentView:()=>gG,getLocale:()=>fG,getOptionList:()=>khe,getReferenceList:()=>Ohe,getSDKAssignmentUtils:()=>Khe,getSDKCaseUtils:()=>Jhe,getSDKContainerUtils:()=>Yhe,getSDKDashboardUtils:()=>Zhe,getSdkVersion:()=>Dhe,getUniqueControlID:()=>bhe,getVBodyClass:()=>Bhe,handleEvent:()=>Lhe,initPConnectField:()=>Fhe,isLastStep:()=>Ghe,resetControlID:()=>The,resolveContext:()=>qhe,setVisibilityForList:()=>N$});var I$={};Wt(I$,{findCurrentIndices:()=>aG,flattenSteps:()=>sG,getAssignmentValidationMessages:()=>ehe,getRefreshProps:()=>cG,handleAssignmentButtonPress:()=>the,handleSaveActionSuccess:()=>lG,hasNavigation:()=>Yge,isVerticalNavigation:()=>Zge,parseActionButtons:()=>Xge,registerRefresh:()=>Qge});function sG(t,e=[]){for(let r of t)r.steps?sG(r.steps,e):e.push(r);return e}function aG(t,e,r){let n=0;for(let o of t)o.visited_status==="current"?(e[r]=n,o.step_status=""):o.visited_status==="success"?(n+=1,o.step_status="completed"):(n+=1,o.step_status=""),o.steps&&aG(o.steps,e,r+1);return e}function Yge(t){if(!t)return!1;let e=t.template?.toLowerCase()==="standard",r=t.steps?.length===1;return!e&&!r}function Zge(t){return t?.template?.toLowerCase()==="vertical"}function cG(t){return t?t.filter(e=>e.event==="Changes"&&e.field).map(e=>[e.field,e.field?.substring(1)??""]):[]}function Qge(t){let e=t.getCaseInfo().getActionRefreshConditions?.(),r=t.getContextName(),n=t.getPageReference();PCore.getRefreshManager().deRegisterForRefresh(r);let o=cG(e);if(o.length===0)return;let i=t.getCaseInfo().getKey(),s={autoDetectRefresh:!0,preserveClientChanges:!1},a=PCore.getRefreshManager();for(let c of o)a.registerForRefresh("PROP_CHANGE",t.getActionsApi().refreshCaseView.bind(t.getActionsApi(),i,"",n,{...s,refreshFor:c[0]}),`${n}.${c[1]}`,`${r}/${n}`,r)}function Xge(t){return{main:t?.main??[],secondary:t?.secondary??[]}}function ehe(t,e){try{return PCore.getMessageManager().getValidationErrorMessages(t,e)??[]}catch{return[]}}function lG(t,e,r){t.cancelAssignment(e,!1).then(()=>{PCore.getPubSubUtils().publish(PCore.getConstants().PUB_SUB_EVENTS.CASE_EVENTS.CREATE_STAGE_SAVED,r)})}function the(t){let{sAction:e,sButtonType:r,itemKey:n,isInModal:o,getPConnect:i,actionsApi:s,localizedVal:a,localeCategory:c,showToast:l}=t;if(r==="secondary")switch(e){case"navigateToStep":{s.navigateToStep("previous",n).then(()=>{}).catch(()=>{l(a("Navigation failed!",c))});break}case"saveAssignment":{let u=i(),p=u.getCaseInfo().getKey(),m=u.getCaseInfo().getAssignmentID();s.saveAssignment?.(n)?.then(()=>{let f=u.getCaseInfo().c11nEnv.getValue(PCore.getConstants().CASE_INFO.CASE_TYPE_ID);lG(s,n,{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(),h=m.getCaseInfo().isLocalAction()||!!(PCore.getConstants().CASE_INFO.IS_LOCAL_ACTION&&m.getValue(PCore.getConstants().CASE_INFO.IS_LOCAL_ACTION));f&&o&&!h?s.cancelCreateStageAssignment(n).then(S=>{p(u.EVENT_CANCEL,S)}).catch(()=>{l(a("Cancel failed!",c))}):s.cancelAssignment(n,!1).then(S=>{p(u.EVENT_CANCEL,S)}).catch(()=>{l(a("Cancel failed!",c))});break}case"rejectCase":{s.rejectCase?.(n)?.then(()=>{})?.catch(()=>{l(a("Rejection failed!",c))});break}default:break}else if(r==="primary")switch(e){case"finishAssignment":{s.finishAssignment(n).then(()=>{}).catch(()=>{l(a("Submit failed!",c))});break}case"approveCase":{s.approveCase?.(n)?.then(()=>{})?.catch(()=>{l(a("Approve failed!",c))});break}default:break}}var _$={};Wt(_$,{extractTabsInfo:()=>ohe,filterSummaryFields:()=>rhe,getChildRegionByName:()=>nhe,openCaseEditAction:()=>she,resolveCaseTypeIcon:()=>ihe});function rhe(t){let e=t().getRawMetadata(),r=e.children?.[0],n=e.children?.[1],o=r?.children??[],i=n?.children??[],s=o.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 nhe(t,e){for(let r of t){let n=r.props?.getPConnect?.();if(n){let o=n.getRawMetadata?.();if(o?.type?.toLowerCase()==="region"&&o?.name?.toLowerCase()===e.toLowerCase())return r}}return null}function ohe(t){let e=[],r=[],n=t?.props?.getPConnect?.()?.getChildren?.();return n?(n.forEach((o,i)=>{let s=o.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}),r.push({type:"DeferLoad",config:s}))}),{vertTabInfo:e,deferLoadInfo:r}):{vertTabInfo:e,deferLoadInfo:r}}function ihe(t,e){let r=t?t.replace("pi pi-",""):e;return!r||r.includes(".")?"polaris-solid":r}function she(t,e){let r=t.getActionsApi();r.openLocalAction.bind(r)(e.ID,{...e,containerName:"modal",type:"express"})}var v$={};Wt(v$,{addContainerItem:()=>lhe,addFlowContainerItem:()=>dhe,configureBrowserBookmark:()=>uhe,getActiveCaseActionName:()=>uG,getFirstCaseActionName:()=>yhe,getToDoAssignments:()=>hhe,getTodoVisibility:()=>T$,hasContainerItems:()=>phe,isCaseWideLocalAction:()=>b$,isContainerInitialized:()=>ahe,isRenderWithToDoWrapper:()=>She,setContainerLimit:()=>che,showBanner:()=>ghe});function ahe(t){let e=t.getContextName(),r=t.getContainerName();return PCore.getContainerUtils().isContainerInitialized(e,r)??!1}function che(t,e,r,n){let{CONTAINER_TYPE:o}=PCore.getConstants();if(r===o.MULTIPLE&&n){let i=t.getContextName();PCore.getContainerUtils().setContainerLimit(`${i}/${e}`,n)}}function lhe(t){let e=t.getContainerManager(),r=t.getContextName();e.addContainerItem({context:r,semanticURL:""})}function uhe(t){let e=p=>p,r=t.getContextName(),n=t.getContainerName(),o=PCore.getEnvironmentInfo(),{APP:i}=PCore.getConstants(),s=t.getValue(`pyPortal.${e("pyPrimaryNavPages")}`),a="",c="",l="",u=o?.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:r,containerName:n,acName:n,semanticURL:"",defaultViewLabel:l,ruleName:a,className:c})}catch{}}function dhe(t){let e=t.getContainerManager(),r=t.getContextName(),n=t.getValue("context_data.caseViewMode"),o,i;if(n!=="review"){let s=r.substring(0,r.lastIndexOf("_")),a=PCore.getContainerUtils().getActiveContainerItemName(s),c=PCore.getContainerUtils().getContainerItemData(s,a);c&&({key:o,flowName:i}=c)}e.addContainerItem({semanticURL:"",key:o,flowName:i,caseViewMode:"perform",resourceType:"ASSIGNMENT",data:t.getDataObject(r)})}function phe(t){let e=t.getContextName(),r=t.getContainerName();return!!PCore.getContainerUtils().hasContainerItems(`${e}/${r}`)}function fp(){return PCore.getConstants().CASE_INFO}function uG(t){let e=fp(),r=t.getValue(e.CASE_INFO_ACTIONS),n=t.getValue(e.ACTIVE_ACTION_ID);return r?.find(i=>i.ID===n)?.name??""}function b$(t){let e=fp(),r=t.getValue(e.ACTIVE_ACTION_ID),n=t.getValue(e.CASE_INFO_ACTIONS);return n&&r?n.find(i=>i.ID===r)?.type==="Case":!1}function dG(t){let e=fp(),r=t.getValue(e.CHILD_ASSIGNMENTS),n=[];if(r&&r.length>0){for(let{assignments:o,Name:i}of r)if(o)for(let s of o)n.push({...s,caseName:i})}return n}function mhe(t){return!!t.getValue("caseMessages")}function fhe(t){let e=fp(),r=t.getValue(e.D_CASE_ASSIGNMENTS_RESULTS),n=dG(t);return!!(r||n.length>0||b$(t))}function ghe(t){let e=t();return mhe(e)||!fhe(e)}function T$(t){return t.getValue("context_data.caseViewMode")!=="perform"}function hhe(t){let e=fp(),r=t.getValue(e.CASE_INFO_ACTIONS),n=t.getValue(e.ASSIGNMENT_LABEL),o=t.getValue(e.D_CASE_ASSIGNMENTS_RESULTS)??[],s=dG(t).map(c=>({...c,isChild:!0})),a=[...o,...s];if(r&&!T$(t)){let c=uG(t);return a.map(l=>({...l,name:c||n}))}return a}function yhe(t){let e=fp();return t.getValue(e.CASE_INFO_ACTIONS)?.[0]?.name??""}function She(t,e){let r=t(),{showWithToDo:n}=e;return!!(n&&(!b$(r)||T$(r)))}var R$={};Wt(R$,{combineFilters:()=>Ehe,convertDateToGMT:()=>Ahe,createFilter:()=>pG,getFilterExpression:()=>Ihe,getFormattedDate:()=>Che,getLayoutDataFromRegion:()=>_he});function pG(t,e,r="EQ"){return{condition:{lhs:{field:e},comparator:r,rhs:{value:t}}}}function Ehe(t,e){return t&&t.length?e?{AND:[e,...t]}:t.length>1?{AND:[...t]}:t[0]:e}function Ahe(t){let{valueAsISOString:e}=t;return e?e.substring(0,e.indexOf("T")):void 0}function Che(t){if(t)return`${t.getFullYear()}-${`0${t.getMonth()+1}`.slice(-2)}-${`0${t.getDate()}`.slice(-2)}`}function Ihe(t,e,r){if(t==="")return null;let n="EQ";return r.type==="TextInput"&&!r.isNumber&&(n="CONTAINS"),r.config.filterType==="RelativeDates"?"":pG(t,e,n)}function _he(t){let e={width:"full",fillAvailable:!0,minWidth:[300,"px"]};return t.props?.getPConnect()?.getChildren()?.map((r,n)=>{let o=r?.getPConnect();return{id:o?.getComponentName()?`${o.getComponentName()}--${n}`:`item--${n}`,content:o?.getComponent(),layoutConfig:{...e,...o?.getConfigProps().layoutConfig}}})}var O$="0.1.0",mG={dateFormatString:"MM/DD/YYYY",dateFormatStringLong:"MMM DD, YYYY",dateFormatStringLC:"mm/dd/yyyy",dateFormatMask:"__/__/____"},P$=0;function bhe(){return P$+=1,`control-${P$}`}function The(){P$=0}function vhe(t){if(typeof t=="string"){let e=t.toLowerCase();return e==="true"||e==="on"||e===""}return!!t}function Rhe(t){if(!t)return"";let e=t.charAt(0),r=t.lastIndexOf(" "),n=t.lastIndexOf(".");return r>0?e+=t.substring(r+1).charAt(0):n>0&&(e+=t.substring(n+1).charAt(0)),e.toUpperCase()}function fG(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 Phe(t){if(t)return t;let e=PCore.getLocaleUtils().getTimeZoneInUse?.();return e||Intl.DateTimeFormat().resolvedOptions().timeZone}function Nhe(){let t=PCore.getLocaleUtils(),e={...mG},r=fG(),n=new Date(Date.parse("30 November 2023 12:00:00 GMT")),o=new Intl.DateTimeFormat(r).format(n),i=o.indexOf("11"),s=o.indexOf("30"),a=o.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:o[i+2]},{loc:s,format:"DD",longFormat:"DD",placeholder:c?t.getLocaleValue("day_placeholder","CosmosFields"):"dd",mask:"__",separator:o[s+2]},{loc:a,format:"YYYY",longFormat:"YYYY",placeholder:c?t.getLocaleValue("year_placeholder","CosmosFields"):"yyyy",mask:"____",separator:o[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 Ohe(t){let e=t.getComponentConfig(),r=String(e.referenceList??"").replace("@P ","");if(r.includes("D_")){let n=t.resolveDatasourceReference?.(r);n!=null&&(typeof n=="object"&&"pxResults"in n?r=n.pxResults:typeof n=="string"&&n.startsWith("D_")&&!n.endsWith(".pxResults")&&(r=`${n}.pxResults`))}return r}function xhe(){console.warn(`Using Constellation version ${PCore.getPCoreVersion()}. SDK version: ${O$}. Ensure the Constellation version matches your Infinity server.`)}function Dhe(){return O$}function whe(t){if(typeof t=="string")return t;if(t)return String(t)}function $he(t){return typeof t.datasource=="object"&&Array.isArray(t.datasource)?t.datasource:[]}function Mhe(t,e){let r=t.datasource;if(typeof r=="string"&&e[r])return[];let n=t.listOutput;if(typeof r=="object"&&!Array.isArray(n)){let o=r.source;n=Array.isArray(o)?o:[]}return(n??[]).forEach(o=>{o.value=o.text??o.value}),n??[]}function khe(t,e={}){let r=t.listType;return r?r.toLowerCase()==="associated"?$he(t):r.toLowerCase()==="datapage"?Mhe(t,e):[]:[]}function Lhe(t,e,r,n){switch(e){case"change":t.updateFieldValue(r,n);break;case"blur":t.triggerFieldChange(r,n);break;case"changeNblur":t.updateFieldValue(r,n),t.triggerFieldChange(r,n);break;default:break}}function Uhe(t){let e=t.getRawMetadata()?.children;return Array.isArray(e)?e.map(r=>(Array.isArray(r.children)?r.children:[]).map(o=>o.config??{})):[]}function jhe(t){return t.filter(({visibility:e})=>e!==!1).map(({value:e,label:r})=>({id:(r??"").toLowerCase(),name:r??"",value:e}))}function gG(t){let e=String(t.getValue(E.CASE_INFO.CASE_INFO_CLASSID)??""),n=`${String(t.getValue(E.CASE_INFO.ASSIGNMENTACTION_ID)??"")}!${e}`,o=`${t.getCurrentView()}!${t.getCurrentClassID()}`;return n===o}function zhe(t,e="casestep"){let r=whe(t.getValue(E.CASE_INFO.INSTRUCTIONS)),n=gG(t);switch(e){case"casestep":return n&&r?.length?r:void 0;case"none":return;default:return e.startsWith("@PARAGRAPH")?void 0:e}}function N$(t,e){let{selectionMode:r,selectionList:n,renderMode:o,referenceList:i}=t.getComponentConfig(),s=E.LIST_SELECTION_MODE;(r===s.MULTI&&n||o==="Editable"&&i)&&t.getListActions()?.setVisibility(e)}function Fhe(t){if(t.isEditable()){let e=t.getActionsApi();e&&(t.setAction?.("onChange",r=>{e.changeHandler?.(t,r)}),t.setAction?.("onBlur",r=>{e.eventHandler?.(t,r)}))}return t.addFormField(),N$(t,!0),()=>{t.removeFormField?.(),N$(t,!1),t.removeNode()}}function Vhe(t){return Array.isArray(t)?t.filter(e=>e.type!=="Alternate"||e.type==="Alternate"&&e.visited_status==="active"):[]}function Bhe(t,e){let r="psdk-vertical-step-body";return t<e-1?`${r} psdk-vertical-step-line`:r}function Hhe(t,e){let r=e.length,n=e[r-1],o=e.findIndex(a=>a.ID===t?.ID),i=t.visited_status==="current",s=o===r-2&&n?.visited_status==="current";return i||s?"flex-auto":""}function Ghe(t,e){return t===e-1}function qhe(t){return t?t.replace(/\((\d+)\)/g,(e,r)=>`[${parseInt(r,10)-1}]`):null}function Whe(t,e){return typeof window<"u"?new CustomEvent(t,{detail:{additionalData:e}}):null}function Khe(){return I$}function Jhe(){return _$}function Yhe(){return v$}function Zhe(){return R$}var D$=class{getDebouncedSubject(e){return new Xs().pipe(Cm(e))}},hG=new D$;var Qhe=(()=>{let t="[!#-'*+/0-9=?A-Z\\^_`a-z{|}~\\-]+",e="\\\\[\\x00-\\x7f]",r=`"(?:[^\\r"\\\\\\x80-\\xff]|${e})*"`,n=`\\[(?:[^\\r\\[\\]\\\\\\x80-\\xff]|${e})*\\]`,o=`(?:${t}|${r})`,i=`(?:${t}|${n})`,s=`${o}(?:\\.${o})*`,a=`${i}(?:\\.${i})*`;return new RegExp(`^${s}@${a}$`)})();function Xhe(t){return Qhe.test(t)}var eye=(()=>{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 tye(t){return eye.test(t)}Dt.register("email",(t,{useRFC822Validation:e})=>{let r=null,n=e?Xhe(t):tye(t);return t&&!n&&(r="Enter a valid email address"),r});Dt.register("integer",t=>{let e=null;return t&&!/^(-)?\d+$/.test(t)&&(e="Invalid number"),e});Dt.register("required",t=>Array.isArray(t)&&t.length===0||t==null||t===""?"Cannot be blank":null);function rye(t){if(Be.isStaticContentReference(t))return!0;try{let e=new URL(t);return e.protocol==="http:"||e.protocol==="https:"||e.protocol==="ftp:"}catch{return!1}}Dt.register("url",t=>{let e=null;return t&&!rye(t)&&(e="Enter a valid url"),e});var N_={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 w$(t,e,r){var n=Array.prototype.slice.call(e);n.push(N_);var o=t.apply(this,n);return r&&o&&Object.setPrototypeOf(o,r),o}function $$(t,e){t=t.split("-"),e=e.split("-");for(var r=t[0].split("."),n=e[0].split("."),o=0;o<3;o++){var i=Number(r[o]),s=Number(n[o]);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 nye={}.constructor;function Di(t){return t!=null&&t.constructor===nye}var oye=/^\d+$/;function M$(t){return oye.test(t)}var iye="1.2.0",sye="1.7.35",yG=" ext. ",St=class{constructor(e){U$(e),this.metadata=e,AG.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 r=this.countryCallingCodes()[e];if(r&&r.length===1&&r[0]==="001")return!0}}isNonGeographicCallingCode(e){return this.nonGeographic()?!!this.nonGeographic()[e]:!this.getCountryCodesForCallingCode(e)}country(e){return this.selectNumberingPlan(e)}selectNumberingPlan(e,r){let n,o;if(e&&(M$(e)?o=e:n=e),r&&(o=r),n&&n!=="001"){let i=this.getCountryMetadata(n);if(!i)throw new Error(`Unknown country: ${n}`);this.numberingPlan=new O_(i,this)}else if(o){if(!this.hasCallingCode(o))throw new Error(`Unknown calling code: ${o}`);this.numberingPlan=new O_(this.getNumberingPlanMetadata(o),this)}else this.numberingPlan=void 0;return this}getCountryCodesForCallingCode(e){let r=this.countryCallingCodes()[e];if(r)return r.length===1&&r[0].length===3?void 0:r}getCountryCodeForCallingCode(e){let r=this.getCountryCodesForCallingCode(e);if(r)return r[0]}getNumberingPlanMetadata(e){let r=this.getCountryCodeForCallingCode(e);if(r)return this.getCountryMetadata(r);if(this.nonGeographic()){let n=this.nonGeographic()[e];if(n)return n}else{let n=this.countryCallingCodes()[e];if(n&&n.length===1&&n[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}},O_=class{constructor(e,r){this.globalMetadataObject=r,this.metadata=e,AG.call(this,r.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(r=>new k$(r,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()&&SG(this.types(),e))return new L$(SG(this.types(),e),this)}ext(){return this.v1||this.v2?yG:this.metadata[13]||yG}},k$=class{constructor(e,r){this._format=e,this.metadata=r}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()&&!aye.test(this.nationalPrefixFormattingRule()))}internationalFormat(){return this._format[5]||this.format()}},aye=/^\(?\$1\)?$/,L$=class{constructor(e,r){this.type=e,this.metadata=r}pattern(){return this.metadata.v1?this.type:this.type[0]}possibleLengths(){if(!this.metadata.v1)return this.type[1]||this.metadata.possibleLengths()}};function SG(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 U$(t){if(!t)throw new Error("[libphonenumber-js] `metadata` argument not passed. Check your arguments.");if(!Di(t)||!Di(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 ${Di(t)?"an object of shape: { "+Object.keys(t).join(", ")+" }":"a "+cye(t)+": "+t}.`)}var cye=t=>typeof t;function iy(t,e){let r=new St(e);if(r.hasCountry(t))return r.selectNumberingPlan(t).countryCallingCode();throw new Error(`Unknown country: ${t}`)}function EG(t,e){return e.countries.hasOwnProperty(t)}function AG(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?$$(e,iye)===-1?this.v2=!0:$$(e,sye)===-1?this.v3=!0:this.v4=!0:this.v1=!0}function j$(t,e){let r=t.slice();for(let n of e)t.indexOf(n)<0&&r.push(n);return r.sort((n,o)=>n-o)}function Il(t,e,r){return CG(t,void 0,e,r)}function CG(t,e,r,n){r&&(n=new St(n.metadata),n.selectNumberingPlan(r));let o=n.type(e),i=o&&o.possibleLengths()||n.possibleLengths();if(!i)return"IS_POSSIBLE";if(e==="FIXED_LINE_OR_MOBILE"){if(!n.type("FIXED_LINE"))return CG(t,"MOBILE",r,n);let c=n.type("MOBILE");c&&(i=j$(i,c.possibleLengths()))}else if(e&&!o)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 z$(t,e,r){e===void 0&&(e={});let n=new St(r);if(e.v2){if(!t.countryCallingCode)throw new Error("Invalid phone number object passed");n.selectNumberingPlan(t.country||t.countryCallingCode)}else{if(!t.phone)return!1;if(t.country){if(!n.hasCountry(t.country))throw new Error(`Unknown country: ${t.country}`);n.selectNumberingPlan(t.country)}else{if(!t.countryCallingCode)throw new Error("Invalid phone number object passed");n.selectNumberingPlan(t.countryCallingCode)}}if(n.possibleLengths())return F$(t.phone||t.nationalNumber,n);if(t.countryCallingCode&&n.isNonGeographicCallingCode(t.countryCallingCode))return!0;throw new Error('Missing "possibleLengths" in metadata. Perhaps the metadata has been generated before v1.0.18.')}function F$(t,e){return Il(t,void 0,e)==="IS_POSSIBLE"}function cn(t,e){return t=t||"",new RegExp("^(?:"+e+")$").test(t)}var lye=["MOBILE","PREMIUM_RATE","TOLL_FREE","SHARED_COST","VOIP","PERSONAL_NUMBER","PAGER","UAN","VOICEMAIL"];function _l(t,e,r){if(e=e||{},!t.country&&!t.countryCallingCode)return;let n=new St(r);n.selectNumberingPlan(t.country||t.countryCallingCode);let o=e.v2?t.nationalNumber:t.phone;if(cn(o,n.nationalNumberPattern())){if(V$(o,"FIXED_LINE",n))return n.type("MOBILE")&&n.type("MOBILE").pattern()===""||!n.type("MOBILE")||V$(o,"MOBILE",n)?"FIXED_LINE_OR_MOBILE":"FIXED_LINE";for(let i of lye)if(V$(o,i,n))return i}}function V$(t,e,r){let n=r.type(e);return!n||!n.pattern()||n.possibleLengths()&&n.possibleLengths().indexOf(t.length)<0?!1:cn(t,n.pattern())}function B$(t,e,r){e=e||{};let n=new St(r);if(n.selectNumberingPlan(t.country||t.countryCallingCode),n.hasTypes())return _l(t,e,n.metadata)!==void 0;let o=e.v2?t.nationalNumber:t.phone;return cn(o,n.nationalNumberPattern())}var uye=/^[A-Z]{2}$/;function H$(t){return uye.test(t)}var dye=!1;function G$(t,e){let r,n,o=new St(e);return H$(t)?(r=t,o.selectNumberingPlan(r),n=o.countryCallingCode()):(n=t,dye&&o.isNonGeographicCallingCode(n)&&(r="001")),{country:r,callingCode:n}}function q$(t,e,r){let o=new St(r).getCountryCodesForCallingCode(t);return o?o.filter(i=>pye(e,i,r)):[]}function pye(t,e,r){let n=new St(r);return n.selectNumberingPlan(e),n.numberingPlan.possibleLengths().indexOf(t.length)>=0}var ln="0-90-9٠-٩۰-۹",mye="-‐-―−ー-";var fye=" ",gye="()()[]\\[\\]",hye="~⁓∼~",gp=`${mye}//..${fye}${gye}${hye}`,sy="++";var yye=new RegExp("(["+ln+"])");function W$(t,e,r,n){if(!e)return;let o=new St(n);o.selectNumberingPlan(e||r);let i=new RegExp(o.IDDPrefix());if(t.search(i)!==0)return;t=t.slice(t.match(i)[0].length);let s=t.match(yye);if(!(s&&s[1]!=null&&s[1].length>0&&s[1]==="0"))return t}function K$(t,e){if(t&&e.numberingPlan.nationalPrefixForParsing()){let r=new RegExp("^(?:"+e.numberingPlan.nationalPrefixForParsing()+")"),n=r.exec(t);if(n){let o,i,s=n.length-1,a=s>0&&n[s];if(e.nationalPrefixTransformRule()&&a)o=t.replace(r,e.nationalPrefixTransformRule()),s>1&&(i=n[1]);else{let l=n[0];o=t.slice(l.length),a&&(i=n[1])}let c;if(a){let l=t.indexOf(n[1]);t.slice(0,l)===e.numberingPlan.nationalPrefix()&&(c=e.numberingPlan.nationalPrefix())}else c=n[0];return{nationalNumber:o,nationalPrefix:c,carrierCode:i}}}return{nationalNumber:t}}function J$(t,e,r){let n=new St(r);for(let o of e)if(n.selectNumberingPlan(o),n.leadingDigits()){if(t&&t.search(n.leadingDigits())===0)return o}else if(_l({phone:t,country:o},void 0,n.metadata))return o}var Sye=!1;function ay(t,{nationalNumber:e,metadata:r}){if(Sye&&r.isNonGeographicCallingCode(t))return"001";let n=r.getCountryCodesForCallingCode(t);if(n)return n.length===1?n[0]:J$(e,n,r.metadata)}function hp(t,e,r){let{carrierCode:n,nationalNumber:o}=K$(t,r);if(o!==t){if(!Eye(t,o,r))return{nationalNumber:t};if(r.numberingPlan.possibleLengths()&&(e||(e=ay(r.numberingPlan.callingCode(),{nationalNumber:o,metadata:r})),!Aye(o,e,r)))return{nationalNumber:t}}return{nationalNumber:o,carrierCode:n}}function Eye(t,e,r){return!(cn(t,r.nationalNumberPattern())&&!cn(e,r.nationalNumberPattern()))}function Aye(t,e,r){switch(Il(t,e,r)){case"TOO_SHORT":case"INVALID_LENGTH":return!1;default:return!0}}function Y$(t,e,r,n,o){if(!(e||r||n))return{number:t};let i=e||r?iy(e||r,o):n;if(t.indexOf(i)===0){let s=new St(o);s.selectNumberingPlan(e||r||n);let a=t.slice(i.length),{nationalNumber:c}=hp(a,void 0,s),{nationalNumber:l}=hp(t,void 0,s);if(!cn(l,s.nationalNumberPattern())&&cn(c,s.nationalNumberPattern())||Il(l,void 0,s)==="TOO_LONG")return{countryCallingCode:i,number:a}}return{number:t}}function cy(t,e,r,n,o){if(!t)return{};let i;if(t[0]!=="+"){let c=W$(t,e||r,n,o);if(c&&c!==t)i=!0,t="+"+c;else{if(e||r||n){let{countryCallingCode:l,number:u}=Y$(t,e,r,n,o);if(l)return{countryCallingCodeSource:"FROM_NUMBER_WITHOUT_PLUS_SIGN",countryCallingCode:l,number:u}}return{number:t}}}if(t[1]==="0")return{};let s=new St(o),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 Z$(t){return t.replace(new RegExp(`[${gp}]+`,"g")," ").trim()}var Cye=/(\$\d)/;function Q$(t,e,{useInternationalFormat:r,withNationalPrefix:n,carrierCode:o,metadata:i}){let s=t.replace(new RegExp(e.pattern()),r?e.internationalFormat():n&&e.nationalPrefixFormattingRule()?e.format().replace(Cye,e.nationalPrefixFormattingRule()):e.format());return r?Z$(s):s}var Iye=/^[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?$/;function X$(t,e,r){let n=new St(r);if(n.selectNumberingPlan(t||e),n.defaultIDDPrefix())return n.defaultIDDPrefix();if(Iye.test(n.IDDPrefix()))return n.IDDPrefix()}var _ye=";ext=",yp=t=>`([${ln}]{1,${t}})`;function ly(t){var e="20",r="15",n="9",o="6",i="[ \\t,]*",s="[:\\..]?[ \\t,-]*",a="#?",c="(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)",l="(?:[xx##~~]|int|int)",u="[- ]+",p="[ \\t]*",m="(?:,{2}|;)",f=_ye+yp(e),h=i+c+s+yp(e)+a,S=i+l+s+yp(n)+a,A=u+yp(o)+"#",C=p+m+s+yp(r)+a,_=p+"(?:,)+"+s+yp(n)+a;return f+"|"+h+"|"+S+"|"+A+"|"+C+"|"+_}var bye="["+ln+"]{"+2+"}",Tye="["+sy+"]{0,1}(?:["+gp+"]*["+ln+"]){3,}["+gp+ln+"]*",vye=new RegExp("^["+sy+"]{0,1}(?:["+gp+"]*["+ln+"]){1,2}$","i"),Rye=Tye+"(?:"+ly()+")?",Pye=new RegExp("^"+bye+"$|^"+Rye+"$","i");function eM(t){return t.length>=2&&Pye.test(t)}function IG(t){return vye.test(t)}function _G({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 bG={formatExtension:(t,e,r)=>`${t}${r.ext()}${e}`};function rM(t,e,r,n){r?r=xye({},bG,r):r=bG;let o=new St(n);if(t.country&&t.country!=="001"){if(!o.hasCountry(t.country))throw new Error(`Unknown country: ${t.country}`);o.selectNumberingPlan(t.country)}else if(t.countryCallingCode)o.selectNumberingPlan(t.countryCallingCode);else return t.phone||"";let i=o.countryCallingCode(),s=r.v2?t.nationalNumber:t.phone,a;switch(e){case"NATIONAL":return s?(a=D_(s,t.carrierCode,"NATIONAL",o,r),tM(a,t.ext,o,r.formatExtension)):"";case"INTERNATIONAL":return s?(a=D_(s,null,"INTERNATIONAL",o,r),a=`+${i} ${a}`,tM(a,t.ext,o,r.formatExtension)):`+${i}`;case"E.164":return`+${i}${s}`;case"RFC3966":return _G({number:`+${i}${s}`,ext:t.ext});case"IDD":if(!r.fromCountry)return;let c=Oye(s,t.carrierCode,i,r.fromCountry,o);return c?tM(c,t.ext,o,r.formatExtension):void 0;default:throw new Error(`Unknown "format" argument passed to "formatNumber()": "${e}"`)}}function D_(t,e,r,n,o){let i=Nye(n.formats(),t);return i?Q$(t,i,{useInternationalFormat:r==="INTERNATIONAL",withNationalPrefix:!(i.nationalPrefixIsOptionalWhenFormattingInNationalFormat()&&o&&o.nationalPrefix===!1),carrierCode:e,metadata:n}):t}function Nye(t,e){return Dye(t,r=>{if(r.leadingDigitsPatterns().length>0){let n=r.leadingDigitsPatterns()[r.leadingDigitsPatterns().length-1];if(e.search(n)!==0)return!1}return cn(e,r.pattern())})}function tM(t,e,r,n){return e?n(t,e,r):t}function Oye(t,e,r,n,o){if(iy(n,o.metadata)===r){let a=D_(t,e,"NATIONAL",o);return r==="1"?r+" "+a:a}let s=X$(n,void 0,o.metadata);if(s)return`${s} ${r} ${D_(t,null,"INTERNATIONAL",o)}`}function xye(...t){let e=1;for(;e<t.length;){if(t[e])for(let r in t[e])t[0][r]=t[e][r];e++}return t[0]}function Dye(t,e){let r=0;for(;r<t.length;){if(e(t[r]))return t[r];r++}}function nM(){return nM=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},nM.apply(null,arguments)}var Ka=class{constructor(e,r,n){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]==="+"&&!r)throw new TypeError("`metadata` argument not passed");if(Di(r)&&Di(r.countries)){n=r;let s=e;if(!wye.test(s))throw new Error('Invalid `number` argument passed: must consist of a "+" followed by digits');let{countryCallingCode:a,number:c}=cy(s,void 0,void 0,void 0,n);if(r=c,e=a,!r)throw new Error("Invalid `number` argument passed: too short")}if(!r)throw new TypeError("`nationalNumber` argument is required");if(typeof r!="string")throw new TypeError("`nationalNumber` argument must be a string");U$(n);let{country:o,callingCode:i}=G$(e,n);this.country=o,this.countryCallingCode=i,this.nationalNumber=r,this.number="+"+this.countryCallingCode+this.nationalNumber,this.getMetadata=()=>n}setExt(e){this.ext=e}getPossibleCountries(){return this.country?[this.country]:q$(this.countryCallingCode,this.nationalNumber,this.getMetadata())}isPossible(){return z$(this,{v2:!0},this.getMetadata())}isValid(){return B$(this,{v2:!0},this.getMetadata())}isNonGeographic(){return new St(this.getMetadata()).isNonGeographicCallingCode(this.countryCallingCode)}isEqual(e){return this.number===e.number&&this.ext===e.ext}getType(){return _l(this,{v2:!0},this.getMetadata())}format(e,r){return rM(this,e,r?nM({},r,{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)}},wye=/^\+\d+$/;var In=class t extends Error{constructor(e){super(e),Object.setPrototypeOf(this,t.prototype),this.name=this.constructor.name}};var TG=new RegExp("(?:"+ly()+")$","i");function oM(t){let e=t.search(TG);if(e<0)return{};let r=t.slice(0,e),n=t.match(TG),o=1;for(;o<n.length;){if(n[o])return{number:r,ext:n[o]};o++}}var $ye={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 vG(t){return $ye[t]}function w_(t){let e="";for(let r of t.split(""))e+=Mye(r,e)||"";return e}function Mye(t,e,r){if(t==="+"){if(e){typeof r=="function"&&r("end");return}return"+"}return vG(t)}var sM="+",kye="[\\-\\.\\(\\)]?",RG="(["+ln+"]|"+kye+")",Lye="^\\"+sM+RG+"*["+ln+"]"+RG+"*$",Uye=new RegExp(Lye,"g"),iM=ln,jye="["+iM+"]+((\\-)*["+iM+"])*",zye="a-zA-Z",Fye="["+zye+"]+((\\-)*["+iM+"])*",Vye="^("+jye+"\\.)*"+Fye+"\\.?$",Bye=new RegExp(Vye,"g"),aM="tel:",$_=";phone-context=",PG=";isub=";function cM(t){let e=t.indexOf($_);if(e<0)return null;let r=e+$_.length;if(r>=t.length)return"";let n=t.indexOf(";",r);return n>=0?t.substring(r,n):t.substring(r)}function NG(t){return t===null?!0:t.length===0?!1:Uye.test(t)||Bye.test(t)}function lM(t,{extractFormattedPhoneNumber:e}){let r=cM(t);if(!NG(r))throw new In("NOT_A_NUMBER");let n;if(r===null)n=e(t)||"";else{n="",r.charAt(0)===sM&&(n+=r);let i=t.indexOf(aM),s;i>=0?s=i+aM.length:s=0;let a=t.indexOf($_);n+=t.substring(s,a)}let o=n.indexOf(PG);if(o>0&&(n=n.substring(0,o)),n!=="")return n}var Gye=250,qye=new RegExp("["+sy+ln+"]"),Wye=new RegExp("[^"+ln+"#]+$"),Kye=!1;function uM(t,e,r){e=e||{};let n=new St(r);if(e.defaultCountry&&!n.hasCountry(e.defaultCountry))throw e.v2?new In("INVALID_COUNTRY"):new Error(`Unknown country: ${e.defaultCountry}`);let{number:o,ext:i,error:s}=Yye(t,e.v2,e.extract);if(!o){if(e.v2)throw s==="TOO_SHORT"?new In("TOO_SHORT"):new In("NOT_A_NUMBER");return{}}let{country:a,nationalNumber:c,countryCallingCode:l,countryCallingCodeSource:u,carrierCode:p}=Qye(o,e.defaultCountry,e.defaultCallingCode,n);if(!n.hasSelectedNumberingPlan()){if(e.v2)throw new In("INVALID_COUNTRY");return{}}if(!c||c.length<2){if(e.v2)throw new In("TOO_SHORT");return{}}if(c.length>17){if(e.v2)throw new In("TOO_LONG");return{}}if(e.v2){let f=new Ka(l,c,n.metadata);return a&&(f.country=a),p&&(f.carrierCode=p),i&&(f.ext=i),f.__countryCallingCodeSource=u,f}let m=(e.extended?n.hasSelectedNumberingPlan():a)?cn(c,n.nationalNumberPattern()):!1;return e.extended?{country:a,countryCallingCode:l,carrierCode:p,valid:m,possible:m?!0:!!(e.extended===!0&&n.possibleLengths()&&F$(c,n)),phone:c,ext:i}:m?Zye(a,c,i):{}}function Jye(t,e,r){if(!t)return;if(t.length>Gye){if(r)throw new In("TOO_LONG");return}if(e===!1)return t;let n=t.search(qye);if(!(n<0))return t.slice(n).replace(Wye,"")}function Yye(t,e,r){let n=lM(t,{extractFormattedPhoneNumber:i=>Jye(i,r,e)});if(!n)return{};if(!eM(n))return IG(n)?{error:"TOO_SHORT"}:{};let o=oM(n);return o.ext?o:{number:n}}function Zye(t,e,r){let n={country:t,phone:e};return r&&(n.ext=r),n}function Qye(t,e,r,n){let{countryCallingCodeSource:o,countryCallingCode:i,number:s}=cy(w_(t),void 0,e,r,n.metadata),a;if(i)n.selectNumberingPlan(i);else if(s&&(e||r))e?(a=e,n.selectNumberingPlan(e),i=n.numberingPlan.callingCode()):(n.selectNumberingPlan(r),i=r,Kye&&n.isNonGeographicCallingCode(i)&&(a="001"));else return{};if(!s)return{countryCallingCodeSource:o,countryCallingCode:i};let{nationalNumber:c,carrierCode:l}=hp(w_(s),void 0,n),u=ay(i,{nationalNumber:c,metadata:n});return u&&(a=u,u==="001"||n.selectNumberingPlan(a)),{country:a,countryCallingCode:i,countryCallingCodeSource:o,nationalNumber:c,carrierCode:l}}function dM(){return dM=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},dM.apply(null,arguments)}function pM(t,e,r){return uM(t,dM({},e,{v2:!0}),r)}function mM(){return mM=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},mM.apply(null,arguments)}function fM(t){let[e,r,n,o]=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(!r||typeof r=="string")o?(s=n,a=o):(s=void 0,a=n),r&&(s=mM({defaultCountry:r},s));else if(Di(r))n?(s=r,a=n):a=r;else throw new Error(`Invalid second argument: ${r}`);return{text:i,options:s,metadata:a}}function gM(){return gM=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},gM.apply(null,arguments)}function hM(t,e,r){e&&e.defaultCountry&&!EG(e.defaultCountry,r)&&(e=gM({},e,{defaultCountry:void 0}));try{return pM(t,e,r)}catch(n){if(!(n instanceof In))throw n}}function uy(){let{text:t,options:e,metadata:r}=fM(arguments);return hM(t,e,r)}var M_=class extends Ka{constructor(e){super(e,N_)}};function k_(){return w$(uy,arguments,M_.prototype)}var OG="Enter a valid phone number";Dt.register("phone",t=>{let e=null;t&&!/^\+?\d+$/.test(t)&&(e=OG);let n=t?.startsWith("+");if(t&&n){let o=k_(t);(!o||!o.isPossible()||t!==o.number)&&(e=OG)}return e});var xG="",DG="",Xye=t=>{if(t&&t.startsWith(xG)&&t.endsWith(xG))return"invalid";if(t&&t.startsWith(DG)&&t.endsWith(DG))return"incomplete"},yM=(t,e)=>{switch(Xye(e)??e){case"invalid":return`Incorrect ${t}`;case"incomplete":return`Incomplete ${t}`;default:return null}};Dt.register("datetime",t=>yM("date and time",t));Dt.register("date",t=>yM("date",t));Dt.register("time",t=>yM("time",t));var wG=t=>{let e="Error with one or more files";for(let r of t)if(r?.error)return e;return null};Dt.register("attachment",t=>{let e=null,r="Error with one or more files";return t&&("pyCount"in t&&Array.isArray(t.pxResults)?e=wG(t.pxResults):Array.isArray(t)?e=wG(t):"error"in t&&t.error&&(e=r)),e});var bl=()=>{let t={},e=typeof Intl<"u"?Intl.DateTimeFormat().resolvedOptions().timeZone:void 0;e&&(t["user-timezone"]=e);let r=typeof navigator<"u"?navigator.language:void 0;return r&&(t["user-locale"]=r),t},MG="createConversation",L_="sendMessage",kG="getConversations",LG="getMessages",UG="createConversationForAgent",$G="sendMessageForAgent",eSe="getConversationsForAgent",tSe="getMessagesForAgent",rSe="likeAgentMessage",nSe="dislikeAgentMessage",oSe="getAgent",jG="getCoach",zG=(t,e,r,n,o,i,s)=>{for(let c of s)c?.cancel&&typeof c.cancel=="function"&&c.cancel();let a=Ci();return s.push(a),ve(t,{queryPayload:kG===t?{assistantID:e,contextID:r,pageSize:n,pageIndex:o}:{agentID:e,contextID:r,pageSize:n,pageIndex:o},cancelTokenSource:a,headers:bl()},i).finally(()=>{let c=s.indexOf(a);c!==-1&&s.splice(c,1)})},FG=(t,e,r,n,o)=>{for(let s of o)s?.cancel&&typeof s.cancel=="function"&&s.cancel();let i=Ci();return o.push(i),ve(t,{queryPayload:LG===t?{assistantID:e,conversationID:r}:{agentID:e,conversationID:r},cancelTokenSource:i,headers:bl()},n).then(s=>(o.pop(),s))},VG=(t,e,r,n,o,i,s=!1)=>{for(let c of o)c?.cancel&&typeof c.cancel=="function"&&c.cancel();let a=Ci();return o.push(a),ve(t,{body:JSON.stringify({contextID:e,executeStarterQuestion:!1,...i&&i.isManualConfirmationSupported&&{capabilities:{tools:{isManualConfirmationSupported:!0}}},...t===UG&&s&&{showAgentRecommendations:s}}),cancelTokenSource:a,queryPayload:t===MG?{assistantID:r}:{agentID:r},headers:bl()},n).then(c=>(o.pop(),c))},BG=(t,e,r,n,o,i,s)=>{let a={...n&&{request:n},...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 ve(t,{body:JSON.stringify(a),queryPayload:t===L_?{assistantID:e,conversationID:r}:{agentID:e,conversationID:r},headers:bl()},o)},HG=(t,e,r,n,o,i,s,a)=>{let c={...n&&{request:n},...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===L_?{assistantID:e,conversationID:r}:{agentID:e,conversationID:r},{restApi:u,reqType:p}=U(t,l),m={method:p,headers:{Accept:"text/event-stream",...bl()},body:JSON.stringify(c),responseType:"stream",adapter:"fetch",...a&&{signal:a.token}};return M(u,m,o)},GG=(t,e,r,n,o)=>{for(let s of n)s?.cancel&&typeof s.cancel=="function"&&s.cancel();let i=Ci();return n.push(i),ve(t,{queryPayload:t===jG?{assistantID:e,...o&&{contextID:o}}:{agentID:e,...o&&{contextID:o}},cancelTokenSource:i},r).then(s=>(n.pop(),s)).catch(s=>{throw n.pop(),s})},iSe=(t,e,r,n,o,i=[])=>zG(kG,t,e,r,n,o,i),sSe=(t,e,r,n,o,i=[])=>zG(eSe,t,e,r,n,o,i),aSe=(t,e,r,n=[])=>FG(LG,t,e,r,n),cSe=(t,e,r,n=[])=>FG(tSe,t,e,r,n),lSe=(t,e,r,n=[])=>VG(MG,t,e,r,n),uSe=(t,e,r,n=[],o,i)=>VG(UG,t,e,r,n,o,i),dSe=(t,e,r,n,o)=>o?.enableStreaming?HG(L_,t,e,r,n,void 0,o):BG(L_,t,e,r,n),pSe=(t,e,r,n,o,i)=>i?.enableStreaming?HG($G,t,e,r,n,o,i,i.cancelTokenSource):BG($G,t,e,r,n,o,i),mSe=(t,e,r,n=[])=>GG(oSe,t,e,n,r),fSe=(t,e,r,n=[])=>GG(jG,t,e,n,r),gSe=(t,e,r,n)=>{let o={queryPayload:{agentID:t,conversationID:e,messageID:r},headers:bl()};return ve(rSe,o,n)},hSe=(t,e,r,n,o="")=>{let i={queryPayload:{agentID:t,conversationID:e,messageID:r},body:JSON.stringify({feedbackText:o}),headers:bl()};return ve(nSe,i,n)},qG={createConversation:lSe,sendMessage:dSe,createConversationForAgent:uSe,sendMessageForAgent:pSe,getAgent:mSe,getCoach:fSe,likeAgentMessage:gSe,unLikeAgentMessage:hSe,getConversations:iSe,getConversationsForAgent:sSe,getMessages:aSe,getMessagesForAgent:cSe};var SM=class{async rewriteText(e){let{originalText:r,rewriteAction:n,additionalInstructions:o,context:i}=e,s=v.isInfinityRuntime(),a=v.getRewriteGenAIDP()??P.getDefaultQualifiedName("D_RewriteWithAI"),c={OriginalText:r,RewriteAction:n,AdditionalInstructions:o||""};try{let l,u;if(s){let p=await Zt.getPageDataAsync(a,i,c),f=Object.fromEntries(Object.entries(p)).pyResponseData;l=typeof f=="string"?f:void 0}else{let m=(await Zt.getDataAsync(a,i,c)).data[0],f=m[P.getDefaultQualifiedName("Content")];l=typeof f=="string"?f:void 0;let h=m[P.getDefaultQualifiedName("ErrorMessage")];u=typeof h=="string"?h: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"}}}},WG=new SM;var EM=class{classAccessMap=new Map;static instance;constructor(){let e=v.getClassesAccessList();e.length!==0?this.classAccessMap=e.reduce((r,n)=>(r.set(n.pyClassName,n.pyHasCreateAccess),r),new Map):this.classAccessMap=v.getCaseTypeList().reduce((r,n)=>(r.set(n.pyWorkTypeImplementationClassName,n.hasCreateAccess??!0),r),new Map)}hasCreateAccess(e){return this.classAccessMap.get(e)}static getInstance(){return this.instance||(this.instance=new this),this.instance}},KG=EM;var AM=class{static AUTOSAVE_SAVE_STATUS=Kd;static isAutosaveEnabledForContext(e){return Es(e)}static subscribeAutosaveStatus(e,r){return p6(e,r)}static notifyChange(e,r,n){Es(e)&&(u6(e,r,n),Yd(e))}},JG=AM;var CM=class t{static behaviorOverrides={};getPersonalizationUtils=KH;constructor(){t.behaviorOverrides={}}getPCoreVersion=()=>"27.1.0";onPCoreReady=e=>Wr.onPCoreReady(e);onPCoreCleanup=e=>Wr.onPCoreCleanup(e);getComponentsRegistry=()=>Wr.getComponentsRegistry();checkIfSemanticURL=()=>Wr.checkIfSemanticURL();isValidSemanticURL=()=>m9();getRoutingUtils=()=>tG;getViewResources=()=>ED;configureForBrowserBookmark=e=>Wr.configureForBrowserBookmark(e);getStore=()=>we();resetStore=()=>ys();getMessageManager=()=>$u;getCoexistenceManager=()=>ny;getStoreValue=(e,r,n)=>re(e,r,n);getContainerUtils=()=>ca;getAnnotationUtils=()=>Ir;getFieldUtils=()=>oi;getFieldDefaultUtils=()=>en;getAssetLoader=()=>Be;getAttachmentUtils=()=>gu;getViewRuleApi=()=>MH;getFeedUtils=()=>zH;getTagUtils=()=>FH;getGenAIAssistantUtils=()=>qG;getGenAIUtils=()=>WG;getStakeholderUtils=()=>VH;getUserApi=()=>UH;getCaseFollowerApi=()=>kH;getCaseUtils=()=>B;getStateUtils=()=>$n;getRelatedCasesApi=()=>LH;getDataApi=()=>Io;getDataApiUtils=()=>ir;getAnalyticsUtils=()=>eG;getLocaleUtils=e=>{let r=e??v.getLocale()??"en-US";return vi(r)};registerLocaleManager=e=>{let r=this.getLocaleUtils();Object.keys(e).forEach(n=>{r[n]=e[n]})};setBehaviorOverrides=e=>{t.behaviorOverrides=e};setBehaviorOverride=(e,r)=>{t.behaviorOverrides[e]=r};getBehaviorOverrides=()=>t.behaviorOverrides;getBehaviorOverride=e=>t.behaviorOverrides[e];getAsynchronousUtils=()=>hG;createPConnect=e=>ct(e);getPubSubUtils=()=>$;registerComponentCreator=e=>{JV(e)};getConstants=()=>Object.freeze(E);getResolvedConstantValue=e=>d.getProperty(e);getEvents=()=>nG;getRestClient=()=>QC;getMashupApi=()=>b_;getEnvironmentInfo=()=>v;switchLocale=e=>IH(e);getRuntimeParamsAPI=()=>dl;getSemanticUrlUtils=()=>Eu;getRemoteCaseUtils=()=>ae;getNavigationUtils=()=>pt;getSDKUtils=()=>x$;registerModule=(e,r)=>rG.registerModule(e,r,this);getErrorHandler=()=>oG;getFormUtils=()=>nn;getAutosaveUtils=()=>JG;getMessagingServiceManager=()=>Tt;getMetadataUtils=()=>Zn;getDataPageUtils=()=>Zt;getDataTypeUtils=()=>_i;getCascadeManager=()=>Cr;isDeepEqual=(e,r)=>lo(e,r);getAuthUtils=()=>iG;getDebugger=()=>Tr;getDeferLoadManager=()=>Hd;getExpressionEngine=()=>zD;getActionsSequencer=()=>Ct;getRefreshManager=()=>Ti;getInitialiser=()=>Cl;getBootstrapUtils=()=>Wr;getContextTreeManager=()=>be;getAccessPrivilege=()=>KG.getInstance();getObjectTransformer=()=>Ve;getAllStateMachines=(e,r,n)=>!r||!n?ke.getAllStateMachinesByContext(e):ke.getAllStateMachines(e,r,n);isNamespaceEnabled=()=>P.isNamespaceEnabled();getQualifiedName=(e,r)=>P.getQualifiedName(e,r);getDefaultQualifiedName=e=>this.getQualifiedName(e,"PegaPlatform");getNameSpaceUtils=()=>P;getNetworkUtils=()=>Mo;getMashupBridge=()=>v_;getConfirmDialogService=()=>li;getBrowserNotificationService=()=>__;getMCPClient=()=>Ah},YG=new CM;globalThis.PCore=YG;var Mbt=YG;export{Mbt as default};
|
|
63
|
+
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(),tie=b.object({method:b.literal("ui/notifications/host-context-changed"),params:T4.describe("Partial context update containing only changed fields.")}),Fze=b.object({method:b.literal("ui/update-model-context"),params:b.object({content:b.array(yi).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.")})}),Vze=b.object({method:b.literal("ui/initialize"),params:b.object({appInfo:gi.describe("App identification (name and version)."),appCapabilities:Zoe.describe("Features and capabilities this app provides."),protocolVersion:b.string().describe("Protocol version this app supports.")})}),rie=b.object({protocolVersion:b.string().describe('Negotiated protocol version string (e.g., "2025-11-21").'),hostInfo:gi.describe("Host application identification and version."),hostCapabilities:Yoe.describe("Features and capabilities provided by the host."),hostContext:T4.describe("Rich context about the host environment.")}).passthrough(),nie={target:"draft-2020-12"};async function _4(t,e){let r=t["~standard"];if(r.jsonSchema)return r.jsonSchema[e](nie);throw Error(`Schema (vendor: ${r.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 b4(t,e,r=""){let n=await t["~standard"].validate(e);if(n.issues){let o=n.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(r+o)}return n.value}function oie(t,e){let r={...t,...e};return e.experimental!==void 0&&(r.experimental={...t.experimental,...e.experimental}),e.tools!==void 0&&(r.tools={...t.tools,...e.tools}),r}var VC=class t extends mx{_appInfo;_appCapabilities;options;_hostCapabilities;_hostInfo;_hostContext;_registeredTools={};_initializedSent=!1;_registeredEvents=new Set;_events=new fx;_methods=new gx;setRequestHandler=(...e)=>{let[r,...n]=C4("request",e)??e;this._methods.claim(r,"setRequestHandler"),super.setRequestHandler.call(this,r,...n)};setNotificationHandler=(...e)=>{let[r,...n]=C4("notification",e)??e;this._methods.claim(r,"setNotificationHandler"),super.setNotificationHandler.call(this,r,...n)};removeRequestHandler=e=>{this._methods.release(e),super.removeRequestHandler(e)};removeNotificationHandler=e=>{this._methods.release(e),super.removeNotificationHandler(e)};replaceRequestHandler=(e,...r)=>{this._methods.replace(e),super.setRequestHandler.call(this,e,...r)};_assertInitialized(e){if(this._initializedSent)return;let r=`[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(r);console.warn(`${r}. This will throw in a future release.`)}eventSchemas={toolinput:Boe,toolinputpartial:Hoe,toolresult:eie,toolcancelled:Goe,hostcontextchanged:tie};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 r=`[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(r);console.warn(r)}setEventHandler(e,r){r&&this._assertHandlerTiming(e),this._ensureEventSlot(e),this._events.setHandler(e,r)}addEventListener(e,r){this._assertHandlerTiming(e),this._ensureEventSlot(e),this._events.addEventListener(e,r)}removeEventListener(e,r){this._events.removeEventListener(e,r)}_ensureEventSlot(e){if(this._registeredEvents.has(e))return;let r=this.eventSchemas[e];if(!r)throw Error(`Unknown event: ${String(e)}`);this.setNotificationHandler(r.shape.method.value,{params:r.shape.params},n=>{let o=n;e==="hostcontextchanged"&&(this._hostContext={...this._hostContext,...o}),this._events.dispatch(e,o)}),this._registeredEvents.add(e)}getEventHandler(e){return this._events.getHandler(e)}warnIfRequestHandlerReplaced(e,r,n){r&&n&&console.warn(`[MCP Apps] ${e} handler replaced. Previous handler will no longer be called.`)}constructor(e,r={},n={autoResize:!0}){super(n),this._appInfo=e,this._appCapabilities=r,this.options=n,this._methods.replace("notifications/cancelled"),this._methods.replace("notifications/progress"),!n.allowUnsafeEval&&b.config({jitless:!0}),this.replaceRequestHandler("ping",o=>(console.log("Received ping:",o.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=oie(this._appCapabilities,e)}registerTool(e,r,n){if(this._registeredTools[e])throw Error(`Tool ${e} is already registered`);let o=this,i=()=>{o._initializedSent&&o._appCapabilities.tools?.listChanged&&o.sendToolListChanged()},s=r.inputSchema!==void 0,a={title:r.title,description:r.description,inputSchema:r.inputSchema,outputSchema:r.outputSchema,annotations:r.annotations,_meta:r._meta,enabled:!0,enable(){this.enabled=!0,i()},disable(){this.enabled=!1,i()},update(c){Object.assign(this,c),i()},remove(){o._registeredTools[e]===a&&(delete o._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 b4(p,c??{},`Invalid input for tool ${e}: `):c??{};u=await n(m,l)}else u=await n(l);return a.outputSchema&&!u.isError&&(u.structuredContent=await b4(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,r)=>{let n=this._registeredTools[e.name];if(!n)throw Error(`Tool ${e.name} not found`);return n.handler(e.arguments,r)},this.onlisttools=async(e,r)=>({tools:await Promise.all(Object.entries(this._registeredTools).filter(([n,o])=>o.enabled).map(async([n,o])=>{let i={name:n,title:o.title,description:o.description,inputSchema:o.inputSchema?await _4(o.inputSchema,"input"):{type:"object",properties:{}}};return o.outputSchema&&(i.outputSchema=await _4(o.outputSchema,"output")),o.annotations&&(i.annotations=o.annotations),o._meta&&(i._meta=o._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:Koe.shape.params,result:Joe},(r,n)=>{if(!this._onteardown)throw Error("No onteardown handler set");return this._onteardown(r,n)})}_oncalltool;get oncalltool(){return this._oncalltool}set oncalltool(e){this.warnIfRequestHandlerReplaced("oncalltool",this._oncalltool,e),this._oncalltool=e,this.replaceRequestHandler("tools/call",(r,n)=>{if(!this._oncalltool)throw Error("No oncalltool handler set");return this._oncalltool(r.params,n)})}_onlisttools;get onlisttools(){return this._onlisttools}set onlisttools(e){this.warnIfRequestHandlerReplaced("onlisttools",this._onlisttools,e),this._onlisttools=e,this.replaceRequestHandler("tools/list",(r,n)=>{if(!this._onlisttools)throw Error("No onlisttools handler set");return this._onlisttools(r.params,n)})}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,r){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,...r})}async readServerResource(e,r){return this._assertInitialized("readServerResource"),await this.request({method:"resources/read",params:e},r)}async listServerResources(e,r){return this._assertInitialized("listServerResources"),await this.request({method:"resources/list",params:e},r)}async createSamplingMessage(e,r){return this._assertInitialized("createSamplingMessage"),await this.request({method:"sampling/createMessage",params:e},r)}sendMessage(e,r){return this._assertInitialized("sendMessage"),this.request({method:"ui/message",params:e},Voe,r)}sendLog(e){return this.notification({method:"notifications/message",params:e})}updateModelContext(e,r){return this._assertInitialized("updateModelContext"),this.request({method:"ui/update-model-context",params:e},Pa,r)}openLink(e,r){return this._assertInitialized("openLink"),this.request({method:"ui/open-link",params:e},zoe,r)}sendOpenLink=this.openLink;downloadFile(e,r){return this._assertInitialized("downloadFile"),this.request({method:"ui/download-file",params:e},Foe,r)}requestTeardown(e={}){return this.notification({method:"ui/notifications/request-teardown",params:e})}requestDisplayMode(e,r){return this._assertInitialized("requestDisplayMode"),this.request({method:"ui/request-display-mode",params:e},Qoe,r)}sendSizeChanged(e){return this.notification({method:"ui/notifications/size-changed",params:e})}setupSizeChangedNotifications(){let e=!1,r=0,n=0,o=()=>{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!==r||c!==n)&&(r=l,n=c,this.sendSizeChanged({width:l,height:c}))}))};o();let i=new ResizeObserver(o);return i.observe(document.documentElement),i.observe(document.body),()=>i.disconnect()}async connect(e=new yh(window.parent,window.parent),r){if(this.transport)throw Error("App is already connected. Call close() before connecting again.");this._initializedSent=!1;try{await super.connect(e);let n=await this.request({method:"ui/initialize",params:{appCapabilities:this._appCapabilities,appInfo:this._appInfo,protocolVersion:Moe}},rie,r);if(n===void 0)throw Error(`Server sent invalid initialize result: ${n}`);this._hostCapabilities=n.hostCapabilities,this._hostInfo=n.hostInfo,this._hostContext=n.hostContext,await this.notification({method:"ui/notifications/initialized"}),this._initializedSent=!0,this.options?.autoResize&&this.setupSizeChangedNotifications()}catch(n){throw this.close(),n}}};var iie=["inline","fullscreen"],R4="pxC11nAction",Ho,P4=new WeakMap,fs,BC=Promise.resolve(),Ud=0,N4,Sx=!1,Ex,O4=!1,Eh=(...t)=>{O4&&console.log("[MCP]",...t)},x4=t=>{N4=t},D4=R4,w4=()=>D4,v4=()=>new DOMException("MCP initialization was superseded by a newer initialize or disconnect call","AbortError"),Ax=class extends yh{initializeRequestSent;resolveInitializeRequestSent=()=>{};constructor(...e){super(...e),this.initializeRequestSent=new Promise(r=>{this.resolveInitializeRequestSent=r})}async send(...e){await super.send(...e);let[r]=e;"method"in r&&r.method==="ui/initialize"&&this.resolveInitializeRequestSent()}},sie=(t,e,r,n)=>{let o=new Ax(e,r),i=t.connect(o);return P4.set(t,i),n?i:(i.catch(s=>{Ho===t&&(Ho=void 0,console.error("MCP host did not complete the initialize handshake",s))}),Promise.race([o.initializeRequestSent,i]))},jd=()=>{if(!Ho)throw new Error("MCP client is not initialized");return Ho},aie=(t,e)=>{Ho!==t&&fs!==t||(Sx=!0,Ex=e,Eh("host tool result",e),N4?.(e))},cie={async initialize(t){Ud+=1;let e=Ud;Sx=!1,Ex=void 0,D4=t.c11nToolName||R4;let r=new Set([Ho,fs].filter(i=>i!==void 0));Ho=void 0,fs=void 0;let n=Promise.all(Array.from(r,i=>i.close())),o=BC.catch(()=>{}).then(async()=>{if(await n,e!==Ud)throw v4();let i=t.eventTarget;if(!i)try{i=window.parent}catch(l){throw new Error("MCP client cannot access window.parent",{cause:l})}let s=t.eventSource??i,a=t.waitForHandshake??!0,c=new VC({name:t.name,version:t.version},{availableDisplayModes:iie},{autoResize:t.autoResize??!1,strict:t.strict??a});fs=c,c.ontoolresult=l=>aie(c,l);try{await sie(c,i,s,a)}catch(l){throw fs===c&&(fs=void 0),e===Ud&&await c.close(),l}if(e!==Ud)throw v4();fs=void 0,Ho=c});BC=o.catch(()=>{}),await o},callTool(t,e){return Eh("tool call",t.name,t.arguments),jd().callServerTool(t,e).then(r=>(Eh("tool result",t.name,r),r),r=>{throw Eh("tool call failed",t.name,r),r})},listResources(t,e){return jd().listServerResources(t,e)},readResource(t,e){return jd().readServerResource(t,e)},listPrompts(t,e){return jd().request({method:"prompts/list",params:t},e)},getPrompt(t,e){return jd().request({method:"prompts/get",params:t},e)},async disconnect(){Ud+=1;let t=new Set([Ho,fs].filter(r=>r!==void 0));Ho=void 0,fs=void 0;let e=Promise.all(Array.from(t,r=>r.close()));BC=BC.catch(()=>{}).then(()=>e).then(()=>{}),await e},isConnected(){return Ho!==void 0},hasReceivedToolResult(){return Sx},getToolResult(){return Ex},setDebug(t){O4=t},async requestDisplayMode(t){let e=jd();await P4.get(e);let r=e.getHostContext();if(r?.displayMode===t||!r?.availableDisplayModes?.includes(t))return r?.displayMode;let n=await e.requestDisplayMode({mode:t});return Eh("display mode",n.mode),n.mode}},Ah=cie;var lie=(t,e)=>e[E.TRACE_ID]?{type:"error",message:t.localizedValue||t.message,correlationID:e[E.TRACE_ID]}:{type:"error",message:t.localizedValue||t.message},uie=new Set(["resource is stale","resource is locked","resource in the wrong state","resource not found"]),die=t=>t?uie.has(t.toLowerCase()):!1,pie=(t,e)=>{if(!die(e))return t;if(t&&t.includes("/workarea")&&!t.includes("/modal")){let r=t.lastIndexOf("/workarea");if(r!==-1)return t.slice(0,r)}return t},$4=t=>typeof t=="object"&&t!==null,mie=t=>{if(t instanceof ArrayBuffer)try{let r=new TextDecoder().decode(t),n=JSON.parse(r);return $4(n)?n:{}}catch{return{}}return $4(t)?t:{}},fie=(t,e,r,n)=>{if(t.config&&ra(t.config.url,r))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($.unsubscribeAllWithEventType(zd),e.setUpdateSessionStatus(!0),r?.authType==="custom"){$.publish(E.PUB_SUB_EVENTS.EVENT_CUSTOM_REAUTH);let{url:i,config:s,context:a}=Wb(t);return Nm(i,s,a,e)}return AU(t,e,r)}if(t.response&&t.response.status&&t.response.status===401&&!t.config.isExternalUrl&&e.getUpdateSessionStatus()&&!WS(t.config.url)){let{url:i,config:s,context:a}=Wb(t);return M(i,s,a)}let o=mie(t.response?.data);if(t.response&&t.response.status&&t.response.status!==422&&t.response.status!==424&&!(t.response.status===400&&o.errorClassification===E.INVALID_INPUTS)&&t.config.headers.context&&t.response.data&&!n){let i=o.errorDetails&&o.errorDetails.map(a=>lie(a,t.response.headers)),s=pie(t.config.headers.context,o.errorClassification);return Nn({messages:i,category:"HTTP",context:s}),Promise.reject(t)}return Promise.reject(t)},M4=fie;var Cx=class{languagePacks;constructor(){this.languagePacks=[]}getLocalizationBundles(e=v.getLocale()){return(this.languagePacks.find(n=>n.pyLangCode===e)?.pyBundles??this.languagePacks.find(n=>n.pyLangCode===d.DEFAULT.toUpperCase())?.pyBundles??[]).sort((n,o)=>n.pyOrder-o.pyOrder)}hasLocalizationBundles(e=v.getLocale()){let r=this.languagePacks.find(n=>n.pyLangCode===e)?.pyBundles;return!!r&&r.length>0}async loadLocaleBundle(e){let r=e.map(i=>Zt.getPageDataAsync("D_pzBundlesForLocalization","",{locale:i,onlyApp:"false"},{invalidateCache:!0})),o=(await Promise.allSettled(r)).filter(i=>i.status==="fulfilled").flatMap(i=>i.value.pyLanguagePacks);this.setLanguagePack(o)}setLanguagePack(e){e.forEach(r=>{let n=this.languagePacks.findIndex(o=>o.pyLangCode===r.pyLangCode);n!==-1?this.languagePacks[n]=r:this.languagePacks.push(r)})}},gs=new Cx;var Ix="Accept-Language",k4=(t,e)=>Object.keys(t).some(r=>r.toLowerCase()===e.toLowerCase()),_x=class{externalHeaders;defaultHeaders;SPECIAL_CHARS;constructor(){this.externalHeaders={},this.defaultHeaders={},this.SPECIAL_CHARS={SLASH:"/"}}registerHeader(e,r){return this.defaultHeaders[e]?!1:(this.externalHeaders[e]=r,!0)}unRegisterHeader(e){this.externalHeaders[e]&&delete this.externalHeaders[e]}getRegisteredHeaders(){return{...this.getLocaleHeaders(),...this.externalHeaders}}getLocaleHeaders(){let e=v.getLocale()??v.getUseLocale();return!e||!gs.hasLocalizationBundles(e)||k4(this.defaultHeaders,Ix)||k4(this.externalHeaders,Ix)?{}:{[Ix]: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 r=new URLSearchParams(globalThis.location?.search??""),n=this.buildHeaderMapFromRequestContext(e,r);this.registerHeadersFromMap(n)}buildHeaderMapFromRequestContext(e,r){let n={};return e?.forEach(o=>{Array.isArray(o.IncludeInHeaders)&&o.IncludeInHeaders.forEach(i=>{let s=i.Value,a=r.get(o.Key)??i.defaultValue;a&&(n[s]||(n[s]=[]),n[s].push(`${o.Key}=${a}`))})}),n}registerHeadersFromMap(e){Object.entries(e).forEach(([r,n])=>{n.length>0&&this.registerHeader(r,n.join("; "))})}getDefaultHeaders(){return this.defaultHeaders}addDebugHeaders(e={}){return{[d.COREHEADER_APP_DEBUG_ID]:e.debugId,[d.COREHEADER_APP_DEBUG_LEVELS]:Tr.getDebugLevels()}}getCoreHeadersFromContext(e){if(["root","app"].includes(e)||!e)return;let r=J.getProperty(d.COREHEADERS,"",e);return r?{...r,debugInfo:Tr.getPreviewMode()&&{...r.debugInfo,[d.COREHEADER_APP_DEBUG_LEVELS]:Tr.getDebugLevels()}}:(e=e.substr(0,e.lastIndexOf(this.SPECIAL_CHARS.SLASH)),this.getCoreHeadersFromContext(e))}processCoreHeaders(e,r,n){let o=this.getCoreHeadersFromContext(n);if(o){let i=Object.keys(e);if(i.includes(d.SKIPCOREHEADERS)){delete e[d.SKIPCOREHEADERS];return}let s=Object.assign({},...Object.values(o));Object.keys({...s}).forEach(a=>{i.includes(a)||(e[a]=s[a])})}}injectCoreAdditionalHeaders(e,r,n,o){if(o?.includeRemoteSystemIdIfPresent){let i=r?.caseTypeID?{caseTypeID:r.caseTypeID}:void 0;ae.injectRemoteCaseHeader(e,i,n)}this.processCoreHeaders(e,r,n)}},gie=new _x,Ge=gie;var Ch=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 r=globalThis.PCore?.getEnvironmentInfo().getInactivityTimeout();if(this.timeoutWarned&&($.unsubscribeAllWithEventType(E.PUB_SUB_EVENTS.RESET_TIMER),this.timeoutWarned=!1,this.onWarnedReset?.()),!!r)return e&&clearTimeout(e),this.startInactivityTimeout(r>60?r:60)};startInactivityTimeout=e=>{let r=setTimeout(()=>{$.publish(E.PUB_SUB_EVENTS.TIMEOUT_REMINDER,{timeRemaining:this.expiryBuffer}),clearTimeout(r),$.subscribe(E.PUB_SUB_EVENTS.RESET_TIMER,this.resetInactiveTimeout,"resetCallback"),this.timeoutWarned=!0},(e-this.expiryBuffer)*1e3);return this.setTimerID(r),r}};var bx=class{handlers=[];use(e,r){return this.handlers.push({fulfilled:e,rejected:r}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}forEach(e){for(let r of this.handlers)r!==null&&e(r)}get size(){return this.handlers.filter(e=>e!==null).length}},Tx=bx;var no={ERR_NETWORK:"ERR_NETWORK",ECONNABORTED:"ECONNABORTED",ERR_CANCELED:"ERR_CANCELED",ERR_BAD_REQUEST:"ERR_BAD_REQUEST",ERR_BAD_RESPONSE:"ERR_BAD_RESPONSE"},HC="GET",GC="content-type",vx="accept";var hie=async t=>{let e=await t.text();if(!e||e.trim().length===0)return e;try{return JSON.parse(e)}catch{return e}},yie=async t=>{let e=await t.text();if(!e||e.trim().length===0)return e;try{return JSON.parse(e)}catch{return e}},L4=async(t,e)=>{switch(e){case"json":return hie(t);case"text":return t.text();case"arraybuffer":return t.arrayBuffer();case"blob":return t.blob();case"stream":return t.body;default:return yie(t)}},U4=t=>{let e={};return t.forEach((r,n)=>{e[n]=r}),e};var qC=()=>{let t=new AbortController;return{token:t.signal,cancel(e){t.abort(e)}}},WC=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===no.ERR_CANCELED),j4=(t,e)=>{let r=t!==void 0,n=e!==void 0&&e>0;if(!r&&!n)return;if(!n&&r)return t;let o=n?e:void 0;if(o===void 0)return t;let i=AbortSignal.timeout(o);if(!r)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)},z4=t=>t?.reason==="TimeoutError"||t?.reason instanceof DOMException&&t.reason.name==="TimeoutError"?no.ECONNABORTED:no.ERR_CANCELED;var xa=(t,e,r,n)=>{let o=new Error(t);return o.name="HttpError",o.config=e,o.code=r,o.response=n,o.isAxiosError=!0,o},Rx=(t,e)=>typeof t=="object"&&t!==null&&"name"in t&&t.name===e,Px=t=>typeof t=="object"&&t!==null&&"message"in t&&typeof t.message=="string",F4=t=>t.timeout?`timeout of ${t.timeout}ms exceeded`:"timeout exceeded",Ih=(t={})=>{let e=xa("canceled",t,no.ERR_CANCELED);return e.name="AbortError",e},Da=(t,e)=>{if(e.signal?.aborted){let r=z4(e.signal),n=xa(r===no.ECONNABORTED?F4(e):"canceled",e,r);return n.name=r===no.ECONNABORTED?"TimeoutError":"AbortError",n}if(Rx(t,"TimeoutError")){let r=xa(F4(e),e,no.ECONNABORTED);return r.name="TimeoutError",r}if(Rx(t,"AbortError"))return Ih(e);if(Rx(t,"TypeError")&&Px(t)){let r=xa(t.message||"Network Error",e,no.ERR_NETWORK);return r.isOffline=!navigator.onLine,r}if(Px(t)&&t.message==="Network Offline"){let r=xa("Network Offline",e,no.ERR_NETWORK);return r.isOffline=!0,r}if(Px(t)){let r=xa(t.message,e);return r.cause=t.cause,r}return xa(String(t),e)},V4=(t,e)=>{let r;t.status>=400&&t.status<500?r=no.ERR_BAD_REQUEST:t.status>=500&&t.status<600&&(r=no.ERR_BAD_RESPONSE);let n=xa(`Request failed with status code ${t.status}`,e,r,t);return n.status=t.status,n};var Sie="application/json, text/plain, */*",Eie="application/x-www-form-urlencoded",Aie=["POST","PUT","PATCH"],Cie=/[^\t\x20-\x7e\x80-\xff]+/g,B4=t=>t===" "||t===" ",Iie=t=>{let e=t.replace(Cie,""),r=0,n=e.length;for(;r<n&&B4(e[r]);)r+=1;for(;n>r&&B4(e[n-1]);)n-=1;return e.slice(r,n)},_ie=t=>{let e={};if(!t)return e;let r=new Map;for(let[n,o]of Object.entries(t))if(o!=null){let i=n.toLowerCase(),s=r.get(i)??n;r.set(i,s),e[s]=Iie(String(o))}return e},G4=t=>(typeof t[Symbol.iterator]!="function"&&Object.defineProperty(t,Symbol.iterator,{value(){return Object.entries(this)[Symbol.iterator]()},enumerable:!1,configurable:!0}),t),q4=t=>t instanceof FormData||t instanceof Blob||t instanceof ArrayBuffer||ArrayBuffer.isView(t)||t instanceof URLSearchParams||typeof ReadableStream<"u"&&t instanceof ReadableStream,W4=t=>typeof t=="object"&&t!==null&&!q4(t),H4=(t,e)=>Object.keys(t).find(r=>r.toLowerCase()===e),Nx=(t,e)=>{let r=_ie(t.headers),{body:n}=t;H4(r,vx)||(r[vx]=Sie);let o=H4(r,GC);return n===void 0||n instanceof FormData?o&&delete r[o]:!o&&!(n instanceof URLSearchParams)&&(W4(n)?r[GC]="application/json":Aie.includes(e)&&(r[GC]=Eie)),r},K4=t=>q4(t)||typeof t=="string"?t:JSON.stringify(t),bie=t=>{let e=(t.method??HC).toUpperCase(),r={method:e,headers:Nx(t,e),credentials:t.credentials};t.body!==void 0&&t.body!==null&&e!=="GET"&&e!=="HEAD"&&(r.body=K4(t.body));let n=j4(t.signal,t.timeout);return n&&(r.signal=n),r},J4=async t=>{let e=t.url??"",r=bie(t),n;try{n=await globalThis.fetch(e,r)}catch(s){throw Da(s,t)}let o=U4(n.headers),i;try{i=await L4(n,t.responseType)}catch(s){throw Da(s,t)}return t.headers&&G4(t.headers),{data:i,status:n.status,statusText:n.statusText,headers:o,config:t}},Tie=t=>{let e={};if(!t)return e;let r=t.trim().split(/[\r\n]+/);for(let n of r){let o=n.indexOf(":");if(o>0){let i=n.substring(0,o).trim().toLowerCase(),s=n.substring(o+1).trim();e[i]=s}}return e},Y4=t=>new Promise((e,r)=>{let n=new XMLHttpRequest,o=t.url??"",i=(t.method??HC).toUpperCase();if(n.open(i,o,!0),Object.entries(Nx(t,i)).forEach(([a,c])=>{n.setRequestHeader(a,c)}),t.credentials==="include"&&(n.withCredentials=!0),t.responseType==="arraybuffer"?n.responseType="arraybuffer":t.responseType==="blob"?n.responseType="blob":n.responseType="text",t.onUploadProgress&&n.upload&&n.upload.addEventListener("progress",t.onUploadProgress),t.onDownloadProgress&&n.addEventListener("progress",t.onDownloadProgress),t.signal){if(t.signal.aborted){n.abort(),r(Da(new DOMException("The operation was aborted.","AbortError"),t));return}t.signal.addEventListener("abort",()=>{n.abort(),r(Da(new DOMException("The operation was aborted.","AbortError"),t))},{once:!0})}t.timeout&&t.timeout>0&&(n.timeout=t.timeout),n.ontimeout=()=>{r(Da(new DOMException("The operation timed out.","TimeoutError"),t))},n.onload=()=>{t.headers&&G4(t.headers);let a=Tie(n.getAllResponseHeaders()),c;if(n.responseType==="arraybuffer"||n.responseType==="blob")c=n.response;else{let u=n.responseText;try{c=JSON.parse(u)}catch{c=u}}let l={data:c,status:n.status,statusText:n.statusText,headers:a,config:t};e(l)},n.onerror=()=>{r(Da(new TypeError("Network Error"),t))},n.onabort=()=>{r(Da(new DOMException("The operation was aborted.","AbortError"),t))};let s=t.body!==void 0&&t.body!==null?K4(t.body):null;n.send(s)}),Z4=t=>{let e=(t.method??HC).toUpperCase(),r=Nx(t,e),{body:n}=t,o=t.headers??{},i=Object.keys(o).map(s=>s.toLowerCase());Object.entries(r).forEach(([s,a])=>{i.includes(s.toLowerCase())||(o[s]=a)}),t.headers=o,W4(n)?t.data=JSON.stringify(n):n instanceof URLSearchParams&&(t.data=n.toString())};var Ox=t=>(Object.defineProperty(t,"data",{get:()=>t.body,set:e=>{t.body=e},enumerable:!1,configurable:!0}),t),Q4=t=>{let e=Object.getOwnPropertyDescriptor(t,"data");return e&&"value"in e&&e.value!==void 0&&e.value!==t.body&&(t.body=e.value),Ox(t)};var vie=t=>{if(typeof t!="object"||t===null)return!1;let e=Object.getPrototypeOf(t);return e===null||Object.getPrototypeOf(e)===null},xx=t=>{if(Array.isArray(t))return t.map(xx);if(vie(t)){let e={};return Object.keys(t).forEach(r=>{e[r]=xx(t[r])}),e}return t},Dx=class{interceptors;constructor(){this.interceptors={request:new Tx,response:new Tx}}async request(e){let r=Ox({...e,...e.body!==void 0&&{body:xx(e.body)}}),n=[s=>this.dispatchRequest(s),void 0];this.interceptors.request.forEach(s=>{n=[s.fulfilled,s.rejected,...n]}),this.interceptors.response.forEach(s=>{n=[...n,s.fulfilled,s.rejected]});let o=Promise.resolve(r),i=0;for(;i<n.length;)o=o.then(n[i],n[i+1]),i+=2;return await o}async dispatchRequest(e){let r=Q4(e);if(typeof r.adapter=="function")return Z4(r),r.adapter(r);let n;if(r.onUploadProgress||r.onDownloadProgress?n=await Y4(r):n=await J4(r),n.status>=200&&n.status<300)return n;throw V4(n,r)}get(e,r){return this.request({...r,url:e,method:"GET"})}post(e,r,n){return this.request({...n,url:e,method:"POST",body:r})}put(e,r,n){return this.request({...n,url:e,method:"PUT",body:r})}patch(e,r,n){return this.request({...n,url:e,method:"PATCH",body:r})}delete(e,r){return this.request({...r,url:e,method:"DELETE"})}static createCancelSource(){return qC()}static isCanceled(e){return WC(e)}},Rie=new Dx,KC=Rie;var zd="updateSession",Pie=t=>typeof t!="object"||t===null||!("caseTypeID"in t)?!1:typeof t.caseTypeID=="string",_h=t=>typeof t=="object"&&t!==null,eV=t=>Pie(t)?{caseTypeID:t.caseTypeID}:void 0,Nie=t=>{if(!_h(t))return!1;let{caseInfo:e}=t;return _h(e)?"errorMessage"in e:!1},hs={},Vd=new mU,ll={},Ei={},$x={},Mx="",wx=new Ch(()=>hU(Ei,Vd)),tV=t=>{ll=t},Oie=t=>!t||typeof t!="object"?!1:"continueWithDefaultErrorHandler"in t||"error"in t,rV=t=>{let{context:e}=t??{};if(typeof e=="string")return e},xie=t=>_h(t)&&"config"in t,Die=t=>_h(t),wie=t=>t.code==="ERR_NETWORK"||t.code==="ECONNABORTED"||t.message==="Network Offline"||t.isOffline===!0,$ie=t=>t.message!=="Network Offline"&&!!W(d.APP.APP)?.context_data?.isOffline,Mie=t=>!!(t.response&&t.response.status===401&&!t.config?.isExternalUrl&&(!t.config||!ra(t.config.url,Ei))),kie=t=>t.response&&t.response.status&&t.response.status===Number(Mx)?Mx:null,JC=t=>{let e=rV(t.config?.headers);return wie(t)?(W(e)?.isLoading&&T({type:Ro,payload:{context:e}}),sU(),Promise.reject(new Error("Network Offline"))):($ie(t)&&aU(),!t.response&&t.cause?.response&&(t.response=t.cause.response),Mie(t)&&$.subscribe(zd,r=>{Vd.setUpdateSessionStatus(!r.updateStatus)},zd),M4(t,Vd,Ei,kie(t)))},Lie=(t,e)=>{if(typeof e=="boolean")return e?JC(t):Promise.reject(t);if(Oie(e)){let r=e.error??t;return e.continueWithDefaultErrorHandler??!0?JC(xie(r)?r:t):Promise.reject(r)}return JC(t)},Uie=t=>typeof t=="function",jie=t=>typeof t=="function",zie=t=>{$.publish(d.PUB_SUB_EVENTS.FETCH_SUCCESS,t)},Fie=t=>{$.publish(d.PUB_SUB_EVENTS.FETCH_FAILURE,t)},Vie=t=>{if(t?.authType==="OAuth2.0"&&t.secureCookie||t.customCookies)return!0},yt=()=>v.environmentInfoObject?.["protocol-jsonrpc"]===!0,Fd=t=>typeof t=="object"&&t!==null,Bie=t=>Fd(t)?Object.entries(t).filter(e=>e[0].toLowerCase()==="etag"&&typeof e[1]=="string").map(([,e])=>e)[0]:void 0,kx=t=>{let e=t.content?.find(c=>c.type==="text")?.text;if(t.isError)throw new Error(e||"MCP tool call failed");let r;if(e)try{r=JSON.parse(e)}catch(c){if(!(c instanceof SyntaxError))throw c;r=e}let n=Fd(r)&&"Response"in r?r.Response:r,o=Fd(n)&&Fd(n.outputs)?n.outputs:void 0,i=[o,n].map(Bie).find(c=>c!==void 0),s=Fd(n)?n.ViewResponse:void 0;return{data:[o?.ViewResponse,o?.ShowPageResponse,o?.PageResponse,o?.Component,o?.responseData,s].find(c=>Fd(c)||typeof c=="string")??n,etag:i}},Hie=(t,e)=>{let r=()=>e.abort();return t.aborted?(r(),()=>{}):(t.addEventListener("abort",r),()=>t.removeEventListener("abort",r))},Gie=new Set(["openAssignment","createWork","openWorkByHandle","caseWideActions","getNextWork","finishAssignment","save","navigateToStep","refreshAssignmentData","recalculateAssignmentData","openStage","executeCaseWideActions","refreshCaseData","recalculateCaseData"]),qie=new Set(["context","authorization","pzctkn"]),Wie=(t,{headers:e,...r})=>{if(!Gie.has(t)||typeof e!="object"||e===null)return r;let n=Object.fromEntries(Object.entries(e).filter(([o,i])=>!qie.has(o.toLowerCase())&&typeof i=="string"&&i!==""));return Object.keys(n).length>0?{...r,headers:n}:r},tr=async(t,e,r,n)=>{let o=new AbortController,i=r?Hie(r,o):void 0;try{if(o.signal.aborted)throw Ih();let s={name:w4(),arguments:{ActionName:t,Payload:JSON.stringify(Wie(t,e))}},a={...r&&{signal:o.signal},...n!==void 0&&{timeout:n}},c=await(Object.keys(a).length>0?Ah.callTool(s,a):Ah.callTool(s)),{data:l,etag:u}=kx(c);return{data:l,status:200,statusText:"OK",headers:u?{etag:u}:{},config:{url:t}}}catch(s){throw o.signal.aborted?Ih():s}finally{i?.()}},Kie=t=>{if(typeof t!="object"||t===null||Array.isArray(t))return!1;let e=Object.getPrototypeOf(t);return e!==Object.prototype&&e!==null},YC=({body:t,responseType:e,adapter:r})=>(e===void 0||e==="json")&&r===void 0&&!Kie(t),ZC=t=>{if(typeof t!="string")return t;try{return JSON.parse(t)}catch{return t}},ai=(t,e="root",r={})=>{let{Authorization:n,pzCTkn:o,...i}=t.headers||{};if(t.withoutDefaultHeaders)return i;Ge.injectCoreAdditionalHeaders(i,eV(t.body),e,{includeRemoteSystemIdIfPresent:r.includeRemoteSystemIdIfPresent??!0});let s={...Ge.getDefaultHeaders(),...Ge.getRegisteredHeaders(),...i,context:e};return delete s.Authorization,delete s.pzCTkn,s},M=(t,e,r="root",n={})=>{let{doNotMergeHttpMessagesForStatusCode:o=null,cancelContext:i=r,includeRemoteSystemIdIfPresent:s=!0}=n;Mx=o,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,...m}=e,{Authorization:f,pzCTkn:h,...S}=e.headers||{};if(!p){let I=eV(e.body);Ge.injectCoreAdditionalHeaders(S,I,r,{includeRemoteSystemIdIfPresent:s})}i&&hs[i]>=0?hs[i]+=1:i&&hs[i]===void 0&&(hs[i]=1);let A=p?{...S}:{...Ge.getDefaultHeaders(),...Ge.getRegisteredHeaders(),...S,context:r};m.isExternalUrl=dU(t||""),m.fetchTimeStamp=Date.now();let C=ye.doesRestApiExist("Logout")?ye.getRestEndPoint("Logout")?.restApi:void 0,_=WS(t,C);return t&&ra(t,Ei)&&Vd.getUpdateSessionStatus()||!Vd.getUpdateSessionStatus()||m.isExternalUrl||_?(ra(t,Ei)&&Ei?.authType==="OAuth2.0"&&(A={...S}),(!C||t&&!_)&&wx.setTimerID(wx.resetInactiveTimeout(wx.getTimerID())),Eb(q(KC.request({context:r,...m,url:t??void 0,body:a,...c&&{signal:c},responseType:l,adapter:u,headers:A,credentials:Vie(Ei)?"include":void 0})).pipe(Ib(()=>{let I=Ge.getCoreHeadersFromContext(A.context);I&&zie({...I})}),Gi(I=>{let N=A,H=!!N?.[d.COREHEADER_APP_DEBUG_ID]?{debugInfo:{[d.COREHEADER_APP_DEBUG_ID]:N?.[d.COREHEADER_APP_DEBUG_ID],[d.COREHEADER_APP_DEBUG_LEVELS]:Tr.getDebugLevels()}}:Ge.getCoreHeadersFromContext(A.context);throw H&&Fie({...H,error:I}),I})))):Nm(t,e,r,Vd)},Nm=(t,e,r,n)=>new Promise((o,i)=>{$.subscribe(zd,s=>{if(n.setUpdateSessionStatus(!s.updateStatus),s.updateStatus==="success")M(t,e,r).then(o).catch(i);else{let{updateStatus:a}=s;i(_h(a)?a.error:void 0)}},zd)}),X4=t=>{hs[t]>0&&(hs[t]-=1,hs[t]===0&&delete hs[t])};KC.interceptors.request.use(t=>{if(!Mo.isOnline())return W(t.context)?.isLoading&&T({type:Ro,payload:{context:t.context}}),T({type:js,payload:{context:"app"}}),Promise.reject(new Error("Network Offline"));if(ll?.request){let e=ll.request;Uie(e)&&(t=e(t))}return t},t=>Promise.reject(t));KC.interceptors.response.use(t=>{if(t.status===202&&t.config.headers?.context&&Nie(t.data)){let e=[{type:"error",message:String(t.data.caseInfo.errorMessage)}],r=t.config.headers.context;return r&&r.includes("/workarea")&&(r=r.substring(0,r.lastIndexOf("/workarea"))),Nn({messages:e,category:"HTTP",context:r}),Promise.reject(t)}if(t.config.headers&&t.config.headers.context){let e=t.config.headers.context;t.config.skipClearErrorMessages||(qt({type:"error",category:"HTTP",context:e}).length>0&&dt({type:"error",category:"HTTP",context:e}),qt({type:"error",category:e===d.APP.APP?"PAGE":"",context:e}).length>0&&dt({type:"error",category:"PAGE",context:e}),e.slice(e.lastIndexOf("/")+1).startsWith("primary")&&(qt({type:"error",category:"HTTP",context:d.APP.APP}).length>0&&dt({type:"error",category:"HTTP",context:d.APP.APP}),qt({type:"error",category:"PAGE",context:d.APP.APP}).length>0&&dt({type:"error",category:"PAGE",context:d.APP.APP}))),X4(e)}if(ll?.response){let e=ll.response;jie(e)&&(t=e(t))}return t},t=>{if(!Die(t))return Promise.reject(t);let e=rV(t.config?.headers);return e&&X4(e),ll?.error?Promise.resolve(ll.error(t)).then(r=>Lie(t,r)):JC(t)});var nV=t=>hs[t],hu=()=>qC(),KS=t=>WC(t),Jn=t=>{Ge.setDefaultHeaders(t)},Ji=t=>{Ei={...Ei,...t}},cU=t=>{$x={...$x,...t}},lU=()=>({...$x}),Pm=()=>({...Ei});var Lx=class t{static createCase(e,r){let{caseInfo:n,startingFields:o,flowType:i,viewType:s=it.PAGE,pageName:a,context:c=d.APP.APP,debugInfo:l,headers:u,theType:p,retrieveActionViewForNewObject:m=!1,scope:f}=r,h={};n&&n.content&&(h=n.content);let{content:S={},pageInstructions:A}=t.getExternalCaseOrObjectContent(e,m,c),C={[t.getKeyBasedOnWorkType(e)]:e,content:{...h,...o,...S}};if(C={...C,...A&&{pageInstructions:A},...!B.isObjectCaseType(e)&&{processID:i}},p==="CREATE_EXTERNAL_CASE"){let I=W(c)?.caseInfo?.content;if(I&&Object.keys(I).length>0){let N=f?.Namespace&&f?.RuleResolutionID?{...I,[d.getDefaultQualifiedName("Scope")]:{[d.getDefaultQualifiedName("Namespace")]:f.Namespace,[d.getDefaultQualifiedName("RuleResolutionID")]:f.RuleResolutionID}}:I,x=g.pruneKeys(N,new Set(["pxObjClass",P.getDefaultQualifiedName("pxObjClass"),"EmbedListUUID__",P.getDefaultQualifiedName("EmbedListUUID__")]),!1);C.content[d.getDefaultQualifiedName("pyAddCaseContextPage")]=x}}let _=t.getObjectTypeViewPayload(m,e);return ve(B.getRouteKeyForCreateWork(e,m),{body:C,queryPayload:{..._,...B.isExternalCaseType(e)?{casetypeID:e}:{caseClassName:e},viewType:s,params:{pageName:a}},headers:{...u,...l&&{...Ge.addDebugHeaders(l)}}},c).then(I=>({response:I.data,requestPayload:C,headers:$e(I.headers,e,u)}))}static getObjectTypeViewPayload=(e,r)=>e?B.shouldUseUnifiedHandling()?{casetypeID:r,actionID:d.getDefaultQualifiedName(d.VIEW_NAMES.OBJECT_CREATE_VIEW)}:{objectTypeID:r,actionID:d.getDefaultQualifiedName(d.VIEW_NAMES.OBJECT_CREATE_VIEW)}:{};static getExternalCaseOrObjectContent=(e,r,n)=>{let o=B.isExternalObject(e),i=B.isExternalCaseType(e);if((i||o)&&!r){let s=Rt(n,{isExternalObject:!!(!i&&o)}),{content:a,pageInstructions:c}=s.content;return{content:a,pageInstructions:c}}return{}};static getKeyBasedOnWorkType=e=>B.shouldUseUnifiedHandling()?"caseTypeID":B.isObjectCaseType(e)?"objectTypeID":"caseTypeID"},Ai=Lx;var Jie=()=>({registerHeader:(...t)=>Ge.registerHeader(...t),unRegisterHeader:(...t)=>Ge.unRegisterHeader(...t),getRegisteredHeaders:()=>Ge.getRegisteredHeaders()}),ve=(t,{body:e={},queryPayload:r={},cancelTokenSource:n,headers:o={},responseType:i},s,a)=>{if(yt()&&YC({body:e,responseType:i}))return tr(t,{queryPayload:r,body:ZC(e),headers:o},n?.token);let{restApi:c,reqType:l}=U(t,r),u={method:l,headers:o,body:e,...i&&{responseType:i}};n&&(u.signal=n.token);let p=t==="createWork"?B.appendExcludeQueryParamToUrl(c):c;return M(p,u,s,a??{})},vT=(t,{method:e="GET",body:r={},headers:n={},withoutDefaultHeaders:o=!1,responseType:i,adapter:s,signal:a},c)=>{t.startsWith("http:")||t.startsWith("https:")||(t=gt.getServerURL()+t);let l={method:e,headers:n,body:r,withoutDefaultHeaders:o,...i&&{responseType:i},...s&&{adapter:s},...a&&{signal:a}};return M(t,l,c)},na=t=>ye.doesRestApiExist(t),Ci=()=>hu(),bh=t=>KS(t),Yie=t=>{tV(t)},Zie=()=>Ai;var Ux=new Set;function oV(){Ux.clear()}function Th(t){try{let e=new URL(t);(e.protocol==="https:"||e.protocol==="http:")&&Ux.add(e.origin)}catch{}}function iV(t){let e;try{let n=globalThis.location;e=n?new URL(t,n.href).origin:new URL(t).origin}catch{throw new Error("Blocked: malformed URL")}let r;try{let n=globalThis.location;r=n?.origin??(n?new URL(n.href).origin:"")}catch{r=""}if(e!==r&&!Ux.has(e))throw new Error(`Blocked: untrusted script origin "${e}"`)}var sV="getCustomComponent",Qie="getBinaryFile",Xie="getOperatorImage",XC="text/javascript",ese=100,aV=3e4,cV=t=>{let e=document.createElement("script");e.type=XC,e.textContent=t,document.head.appendChild(e)},mV=t=>{let e=atob(t),r=new Uint8Array(e.length);for(let n=0;n<e.length;n+=1)r[n]=e.charCodeAt(n);return r},tse=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(mV(t))},rse=12e4,lV=Promise.resolve(),nse=t=>{let e=lV.then(t);return lV=e.catch(()=>{}),e},uV=async(t,e)=>{let r=Object.entries(e).filter(([,i])=>i);if(yt()){let i=await nse(()=>tr(sV,{queryPayload:{componentName:t,...Object.fromEntries(r)},body:{},headers:{}},void 0,rse));return tse(i.data)}let n=r.map(([i,s])=>`${i}=${s}`).join("&");return(await ve(sV,{queryPayload:{componentName:n?`${t}?${n}`:t}})).data},fV=new Set(["jpg","jpeg","png","gif","webp","bmp","tif","tiff","svg","ico","heic","heif","avif"]),ose=/^DATA-CONTENT-IMAGE\s+[^!]+!([^!]+)!\/OPERATORIMAGES\/$/i,dV=/url\(\s*(?:(['"])([^'"\r\n]+)\1|([^'"\s)][^'"\r\n]*?))\s*\)/gi;function gV(t){return t.toLowerCase().split("!").pop()||""}function jx(t){return t.includes("?")||t.includes("#")?!1:fV.has(gV(t))}function ise(t){let e=t.match(ose);return e?fV.has(e[1].toLowerCase()):jx(t)}function pV(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 zx=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(r=>r.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,r={}){let n="",o=0;return e.forEach(i=>{n+=`${o===0?"?":"&"}field${o}=${i.field}&value${o}=${i.value}`,o+=1}),this.pegaOnlyUrl?this.getSvcComponentsConfigSeparatedUrls(e,n,r):this.getSvcComponentsConfigCombinedUrl(e,n,r)}async getSvcComponentsConfigSeparatedUrls(e,r,n){let o=v.getBuiltOnAppNames(),i=this.loadAndFilterPegaComponentsConfig(e,o),s=Promise.resolve([]);n.skipLoadCustomerComponents!==!0&&(s=this.loadAndCustomerComponentsConfig(r,e));let a=[];if(v.environmentInfoObject?.pyInfinityStaticService){let l=[],u=await Promise.all([i,s]),[p,m]=u,f=[];for(let S of m)S.isSdkOverridden===!0?l.push(S.componentDefinition):f.push(S.componentDefinition);let h=this.mergeComponentList([p,f,l]);a.push(...h)}else{let l=this.fetchSDKComponent(r);await Promise.all([i,s,l]).then(u=>{let p=this.mergeComponentList(u);a.push(...p)})}if(n.alternateDesignSystemURL&&a.length===1){let l=await this.getSvcComponentsConfigADS(e,r,n);a[0].alternateDesignSystemConfig=l}return{data:{components:a}}}mergeComponentList=e=>{let[r=[],n=[],o=[]]=e,i="alternateDesignSystemConfig",s=[...r,...n];return this.appStaticUrl?s.map(a=>{let{name:c,type:l,subtype:u}=a,p=o.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 r=`${this.appStaticUrl}v102/${this.appAlias}/componentslist-ext${e}`;return fetch(r,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then(n=>n.json()).then(n=>n.components).catch(()=>[])}return Promise.resolve([])}async loadAndFilterPegaComponentsConfig(e,r){return this.loadPegaComponentsConfig().then(()=>{let n=[];return this.componentsConfig&&this.componentsConfig.forEach(o=>{let i=!0;e.forEach(s=>{Array.isArray(o[s.field])?o[s.field].includes(s.value)||(i=!1):o[s.field]!==s.value&&(i=!1)}),i&&this.checkForBuiltOnSupport(r,o.allowedApplications)&&n.push(o)}),n})}async loadPegaComponentsConfig(){let e=null;if(this.componentsConfig===null){let r=`${this.staticServerURL}components/componentsconfig.json?v=${new Date().getTime()}`;e=fetch(r,{method:"GET"}).then(n=>n.json()).then(async n=>{this.componentsConfig=n,this.ccV2LibId&&await this.loadLibraryComponentsConfig(this.ccV2LibId).then(o=>{o&&o.length>0&&(this.componentsConfig=(this.componentsConfig||[]).concat(o))}).catch(o=>{console.error(`Exception while appending custom component config from library ${this.ccV2LibId} : ${o}`)})}).catch()}else e=Promise.resolve();return e}async loadLibraryComponentsConfig(e){let r=null;return r=fetch(`${this.appStaticUrl}v100/componentlib/componentsconfig/${e}?v=${Date.now()}`,{headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then(n=>{if(!n.ok)throw console.error("Error while fetching custom component config/library component config"),new Error(n.statusText);return n}).then(n=>n.json()).then(n=>Promise.resolve(n)).catch(n=>(console.error(`Exception while fetching custom component config from library ${e} : ${n}`),{error:n.message})),r}async loadAndCustomerComponentsConfig(e,r){let n=null;if(v.environmentInfoObject?.pyInfinityStaticService){let i={};r.forEach((s,a)=>{i[`field${a}`]=s.field,i[`value${a}`]=s.value}),n=PCore.getDataPageUtils().getDataAsync(P.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}`;n=fetch(i,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then(s=>s.json()).then(s=>s.components).catch(()=>[])}else n=Promise.resolve([]);return n}checkForBuiltOnSupport(e,r){if(!e||!r||e.length===0||r.length===0)return!0;let n=e.split(",");return n.length===0?!0:n.some(o=>r.includes(o))}async getSvcComponentsConfigCombinedUrl(e,r,n){let o=`${this.staticServerURL}v102/${this.appAlias}/componentslist${r}`,i=await fetch(o,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then(s=>s.json()).then(s=>({data:s}));if(n.skipLoadCustomerComponents===!0&&i?.data?.components?.length>0&&(i.data.components=i.data.components.filter(s=>s.componentKey===void 0)),n.alternateDesignSystemURL&&i?.data?.components?.length===1){let s=await this.getSvcComponentsConfigADS(e,r,n);i.data.components[0].alternateDesignSystemConfig=s}return i}getSvcComponentsConfigADS(e,r,n){let o=`${n.alternateDesignSystemURL}${n.alternateDesignSystemURL?.endsWith("/")?"":"/"}components/${e[0].value}/config-ext.json`;return fetch(o,{method:"GET"}).then(i=>{if(i.ok)return i.json();throw new Error(i.statusText)}).catch(i=>({error:i.message}))}getSvcImage(e){let r=`${this.appStaticUrl}v102/${this.appAlias}/image/${e}`;return fetch(r,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then(n=>n.blob()).catch()}getSvcImageUrl(e){try{let r=v.environmentInfoObject?.pyInfinityStaticService,{callUrlKey:n,queryPayload:o,callUrl:i}=this.buildImageRequest(e,r);return ise(e)?(this.imageBlobUrlCache[i]||(this.imageBlobUrlCache[i]=this.fetchImage(n,o,i,r)),this.imageBlobUrlCache[i]):Promise.resolve("")}catch{return Promise.resolve(null)}}buildImageRequest(e,r){let n=Qie,o,i=`${this.appStaticUrl}v102/${this.appAlias}/image/${e}`;if(r){let s=/DATA-CONTENT-IMAGE\s([^!]*)!.*\/OPERATORIMAGES\//i,a=e.match(s);if(a){let c=a[1]?.trim();if(c)n=Xie,o={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 o={fileID:e};i=U(n,o)?.restApi||i}return{callUrlKey:n,queryPayload:o,callUrl:i}}fetchImage(e,r,n,o){return o?ve(e,{queryPayload:r}).then(i=>{let s=this.decodeBase64ToByteArray(i.data),a=this.getMimeTypeFromKey(r?.fileID||r?.user_ID||""),c=new Blob([s],{type:a});return window.URL.createObjectURL(c)}).catch(i=>{throw console.error("Error fetching image:",i),i}):fetch(n,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then(i=>i.blob()).then(i=>window.URL.createObjectURL(i)).catch()}decodeBase64ToByteArray(e){return mV(e)}getMimeTypeFromKey(e){let r={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"},n=gV(e);return r[n]?r[n]:"application/octet-stream"}isStaticContentReference(e){let r=e.trim();return!r||/^[a-z][a-z\d+.-]*:/i.test(r)||r.startsWith("//")?!1:g.isWebFilePath(r)}async resolveImageSource(e){if(!this.isStaticContentReference(e))return typeof e=="string"?e:"";let r=g.normalizeStaticContentKey(e);if(!jx(r))return"";let n=await this.getSvcImageUrl(r);return typeof n=="string"&&n?n:""}async resolveBackgroundImage(e){let r=await Promise.all([...e.matchAll(dV)].map(async([n,,o,i])=>{let s=o??i;if(!s||!this.isStaticContentReference(s))return n;if(!jx(g.normalizeStaticContentKey(s)))return"none";let a=await this.resolveImageSource(s);return a?n.replace(s,a):"none"}));return e.replace(dV,n=>r.shift()??n)}async resolveThemeBackgroundImages(e){if(!this.themeHasBackgroundImage(e))return e;if(Array.isArray(e))return Promise.all(e.map(r=>this.resolveThemeBackgroundImages(r)));if(e&&typeof e=="object"){let r=await Promise.all(Object.entries(e).map(async([n,o])=>[n,await this.resolveThemeBackgroundImages(o)]));return Object.fromEntries(r)}return typeof e=="string"&&e.includes("url(")?this.resolveBackgroundImage(e):e}themeHasBackgroundImage(e){return Array.isArray(e)?e.some(r=>this.themeHasBackgroundImage(r)):e&&typeof e=="object"?Object.values(e).some(r=>this.themeHasBackgroundImage(r)):typeof e=="string"&&e.includes("url(")}getSvcLocale(e,r){let n=`${this.appStaticUrl}v102/${this.appAlias}/locales/${e}/${r}`;return fetch(n,{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(r=>r.json()).catch(()=>[])}async getSvcComponent(e){try{let r=v.environmentInfoObject?.pyC11nDXCBDevURL;if(r){let i=r.replace(/\/+$/,"");pV(i);let s=await fetch(`${i}/index.js`);if(!s.ok)throw new Error(s.statusText);return await s.text()}if(v.environmentInfoObject?.pyInfinityStaticService||yt()){let i=v.environmentInfoObject?.pxApplication?.pxUpdateDateTime,s=i?g.parsePegaDateTimeToTimestamp(i):null;return await uV(e,{v:s})}let o=await fetch(`${this.appStaticUrl}v102/${this.appAlias}/component/${e}`,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}});if(!o.ok)throw new Error(o.statusText);return await o.text()}catch(r){throw console.error("Error fetching service component:",r),r}}async importCustomComponentMap(e,r){try{let n=v.environmentInfoObject?.pyInfinityStaticService||yt(),o=v.environmentInfoObject?.pyC11nDXCBDevURL,i=`${this.appStaticUrl}v100/componentlib/componentsmap/${e}`;if(o&&(pV(o),i=`${o.replace(/\/+$/,"")}/index.js`),n&&!o){let c=v.environmentInfoObject?.pxApplication?.pxUpdateDateTime,l=await uV(e,{v:g.parsePegaDateTimeToTimestamp(c),libV:g.parsePegaDateTimeToTimestamp(r)});await this.appendCustomScriptToHead(l);return}if(n||o){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}`))},aV);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(n){console.error("Exception while appending custom component map (or load blocked):",n)}}async appendCustomScriptToHead(e){if(!(typeof document>"u"))try{if(yt()){cV(e);return}await new Promise((r,n)=>{let o=document.createElement("script");o.src=window.URL.createObjectURL(new Blob([e],{type:XC}));let i=setTimeout(()=>{n(new Error("Timed out waiting for custom component script to load"))},aV);o.onload=()=>{clearTimeout(i),r()},o.onerror=()=>{clearTimeout(i),n(new Error("Error while appending custom component map"))},document.head.appendChild(o)})}catch(r){console.error("Exception appendCustomScriptToHead:",r)}}loadSvcComponent(e){return new Promise((r,n)=>{this.getSvcComponent(e).then(o=>{if(typeof document>"u"){n(e);return}if(yt()){cV(o),r(e);return}let i=document.createElement("script");i.src=window.URL.createObjectURL(new Blob([o],{type:XC})),i.onload=()=>r(e),i.onerror=()=>n(e),document.head.appendChild(i)}).catch(o=>{console.error(`Failed to load service component ${e}:`,o),n(e)})})}initServer(e,r,n){console.log(`asset-loader.initServer(${e}, ${r})`),this.appStaticUrl=null,this.staticServerURL=null,this.pegaOnlyUrl=!1,this.componentsConfig=null,this.isolationID=null,this.isolationAssetBlobCache=new Map,oV(),e&&r&&r!=="no-appstatic"&&r!=="no-cdn"?(this.appStaticUrl=r.endsWith("/")?r:`${r}/`,this.staticServerURL=e.endsWith("/")?e:`${e}/`,this.pegaOnlyUrl=!0,Th(this.staticServerURL),Th(this.appStaticUrl)):e&&r&&r==="no-appstatic"?(this.staticServerURL=e.endsWith("/")?e:`${e}/`,this.appStaticUrl=this.staticServerURL,this.pegaOnlyUrl=!0,Th(this.staticServerURL)):e&&r&&r==="no-cdn"&&(this.staticServerURL=e.endsWith("/")?e:`${e}/`,this.appStaticUrl=this.staticServerURL,Th(this.staticServerURL)),console.log(`asset-loader.initServer() staticServerURL=${this.staticServerURL}, appStaticUrl=${this.appStaticUrl}, pegaOnlyUrl=${this.pegaOnlyUrl})`),this.b2sJWT=n}register(e,r){this.loaderObj[e]=r}getLoader(e){let r;return e?r=this.loaderObj[e]:r=(o,i)=>new Promise((s,a)=>{if(typeof document>"u"){a(o);return}let c=document.createElement(i);if(i==="script"){let l=c;l.onload=()=>{s(o)},l.onerror=()=>{a(o)},l.type=XC,l.charset="UTF-8",l.async=!1,l.src=o}else{let l=c;l.type="text/css",l.rel="stylesheet",l.href=o}document.head.appendChild(c)}).catch(s=>{console.log(s)}),r}loadAssets(e,r){let{isDevServerMode:n}=r;if(!e)return Promise.resolve();let o=[];return e.forEach(i=>{let s=Object.keys(i)[0],a=n?Object.values(i)[0]:this.getStaticServerUrl();a=a.endsWith("/")?a:`${a}/`,!this.loadedAssets[s]&&(s.includes(".js")?o.push(this.getLoader()(a+s,this.getTypes.SCRIPT)):s.includes(".css")&&this.getLoader()(a+s,this.getTypes.STYLE),this.loadedAssets[s]=!0)}),Promise.all(o)}getAssetsFromIsolations(e){let r=this.getIsolationID(),{restApi:n,reqType:o}=Nc("getAssetsFromIsolations",{isolationID:r,assetPath:e})||{},i=`${this.appStaticUrl}${n}`,s=this.isolationAssetBlobCache.get(i);if(s)return this.isolationAssetBlobCache.delete(i),this.isolationAssetBlobCache.set(i,s),s;let a=fetch(i,{method:o,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>ese;){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,"/")||"",r=decodeURIComponent(globalThis.atob(e).split("").map(o=>`%${`00${o.charCodeAt(0).toString(16)}`.slice(-2)}`).join("")),n=JSON.parse(r);this.isolationID=n?.tenant_id}return this.isolationID}},Be=new zx;var Fx=class{c11nEnv;constructor(e){this.c11nEnv=e}validate(e,r){let{value:n}=this.c11nEnv.getStateProps();if(!r&&(r=n,!r)){let s=this.c11nEnv.getComponentConfig(),a=this.c11nEnv.getStateProps();s.selectionMode==="multi"?r=a.selectionList:s.renderMode==="Editable"?r=a.referenceList:s.selectionMode==="single"?r=a.selectionKey:r=a.value}let o=wj(this.c11nEnv.getContextName(),this.c11nEnv.getPageReference(),r),{message:i}=Dt.validate(this.c11nEnv.getComponentName()?.toLowerCase(),r,e,o);return i?{status:!1,message:i}:{status:!0}}validateEmail(e,r={}){let n=Dt.getValidator("email");if(!n)return{status:"success"};let o=n(e,r);return o?{status:"failure",message:o}:{status:"success"}}},hV=Fx;var yV=(t,e,r,n,o)=>{if(o!==d.RESOURCE_STATUS.CREATE)return;ke.isStateMachineExist(t,e,r)||ke.setStateMachine(t,r,e,new Cc(r,e,t)),ke.getStateMachine(t,e,r).insert({},typeof n=="string"?n:n+1,!0,{isDefault:!0})},SV=(t,e,r,n,o)=>{typeof e=="string"&&t.data?.caseInfo?.content&&r&&(n==="CREATE"||n==="UPDATE")&&(t.data.caseInfo.content[o][e][r]=e)},EV=t=>{let e=!t.isLocalAction&&t.editType===d.ACTION;return{...e?{}:{activeActionID:t.actionID},assignments:[{ID:t.assignmentID,...e?{actions:[{ID:t.actionID}]}:{}}]}},AV=t=>{let{CASE_INFO:e}=E,r=(o,i)=>J.getPropertyValue(o,"",i),n=r(d.CONTEXT_DATA_MODAL_VIEW.PARENT_CONTEXT,t);for(;n;){let o=r(e.ASSIGNMENT_ID,n),i=r(e.ACTIVE_ACTION_ID,n),s=r(e.ASSIGNMENTACTION_ID,n);if(o||i||s)return{assignmentID:o,activeActionID:i,assignmentActionID:s,isLocalAction:r(e.IS_LOCAL_ACTION,n)};n=r(d.CONTEXT_DATA_MODAL_VIEW.PARENT_CONTEXT,n)}};var eI="OPEN_PROCESS_ACTION";var wa="OPEN_ASSIGNMENT";var vh="DELETE_CASE_IN_CREATE_STAGE",CV=t=>({type:vh,payload:t});var Ii="SAVE_AND_CLOSE",ul=t=>({type:Ii,payload:t});var sse="DELETE_DATA_OBJECT",IV=t=>({type:sse,payload:t});var Vx="DELETE_WORK",Bx=t=>({type:Vx,payload:t});var Hx=class{static getSavableDataPage(e){return Gx(e)}static getLookUpDataPage(e){return Wx(e)}static getLookUpDataPageInfo(e){return Kx(e)}static getDataPageKeys(e){return qx(e)}},_i=Hx;var Jx=class{static getPropertyName(e){return fe.getPropertyName(e)}static isProperty(e){return fe.isProperty(e)}static getLeafPropertyName(e){return fe.getLeafPropertyName(e)}static isPropertyInternal(e){return e.startsWith("px")||e.startsWith("pz")}},Ir=Jx;var Yx=class t{static createContainerPConnect(e,r,n,o=!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,r);if(!m)return null;let h={meta:u,options:{context:p,pageReference:f||r,containerName:n,containerItemID:a,parentPageReference:r,hasForm:o||n===ge.WORKAREA||n===ge.MODAL||m===d.CREATE_DETAILS_VIEW_NAME,target:l}};return ct(h).getPConnect}}return null}static processRootViewDetails(e,r,n){let{config:{context:o,name:i}={}}=e,{context:s}=r,a=i,c=o,l=Ir.isProperty(i),u=Ir.isProperty(o);if(u){let p=Ir.getPropertyName(o);c=re(`.${p}`,p.startsWith(".")?n:"",s)}if(c||(c=n),l){let p=Ir.getPropertyName(i);a=re(`.${p}`,c,s)}return l&&u&&a!==""&&(a=i,c=o),{viewName:a,viewContext:c}}static addFlowContainerItem(e){let r=e.getContainerManager(),n=e.getContextName(),o=e.getValue("context_data.caseViewMode"),i,s;if(o!=="review"){let a=n.substring(0,n.lastIndexOf("_")),c=se(a),l=We(a,c);l&&({key:i,flowName:s}=l)}r.addContainerItem({semanticURL:"",key:i,flowName:s,caseViewMode:"perform",resourceType:"ASSIGNMENT",data:e.getDataObject(n)})}static hasContainerItems=e=>{let r=e.getContextName(),n=e.getContainerName();return PCore.getContainerUtils().hasContainerItems(`${r}/${n}`)};static hasGetNextWorkLinks=e=>e.getValue(d.CASE_INFO.GETNEXTWORK);static getActiveCaseActionName=e=>{let r=e.getValue(d.CASE_INFO.CASE_INFO_ACTIONS),n=e.getValue(d.CASE_INFO.ACTIVE_ACTION_ID);return r.find(i=>i.ID===n)?.name||""};static getFirstCaseActionName=e=>e.getValue(d.CASE_INFO.CASE_INFO_ACTIONS)[0]?.name||"";static hasNotificationMessages=e=>!!e.getValue("caseMessages");static isCaseWideLocalAction=e=>{let r=e.getValue(d.CASE_INFO.ACTIVE_ACTION_ID),n=e.getValue(d.CASE_INFO.CASE_INFO_ACTIONS);return n&&r?n.find(i=>i.ID===r)?.type==="Case":!1};static getChildCaseAssignments=e=>{let r=e.getValue(d.CASE_INFO.CHILD_ASSIGNMENTS),n=[];return r&&r.length>0&&r.forEach(({assignments:o=[],Name:i,caseTypeID:s})=>{let a=o.map(c=>({...c,caseName:i,caseTypeID:s}));n=n.concat(a)}),n};static hasAssignments=e=>{let r=e.getValue(d.CASE_INFO.D_CASE_ASSIGNMENTS_RESULTS),n=t.getChildCaseAssignments(e);return!!(Array.isArray(n)&&n.length>0||Array.isArray(r)&&r.length>0||t.isCaseWideLocalAction(e))};static showBanner=e=>{let r=e();return t.hasNotificationMessages(r)||!t.hasAssignments(r)};static showTodo=e=>e.getValue("context_data.caseViewMode")!=="perform";static isRenderWithToDoWrapper=(e,r)=>{let n=e(),{showWithToDo:o}=r;return o&&(!t.isCaseWideLocalAction(n)||t.showTodo(n))};static getToDoAssignments=e=>{let r=e.getValue(d.CASE_INFO.CASE_INFO_ACTIONS),n=e.getValue(d.CASE_INFO.ASSIGNMENT_LABEL),o=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=[...o,...s],c=JSON.parse(JSON.stringify(a));return r&&!t.showTodo(e)&&(c=c.map(l=>(l.name=t.getActiveCaseActionName(e)||l?.name||n,l))),c}},tI=Yx;var Zx=class{c11nEnv;constructor(e){this.c11nEnv=e}containerManagerPromise=e=>{let r=w.getNextActionMgrId(),n,o,i=new Promise((s,a)=>{n=s,o=a});if(n&&o)w.register(r,i,n,o,e);else throw new Error("resolveFn or rejectFn is not defined.");return{actionMgrID:r,promise:i}};initializeContainers(e){let r=Ql,n=this.c11nEnv,o=n.getContextName(),i=n.getContainerName(),s={context:o,name:i,type:d.CONTAINER_TYPE.SINGLE},{actionMgrID:a,promise:c}=this.containerManagerPromise(r),l={...s,...e,actionMgrID:a};return T(Qx(l)),c}addContainerItem(e){let r=Et,n=this.c11nEnv,o=n.getMetadata(),{children:i}=o||{},s;Array.isArray(i)&&i.length>0&&([s]=i);let a=n.getContextName(),c=n.getContainerName(),l=ur(c,a,e?.containerType===d.CONTAINER_TYPE.SINGLE),u=Z(c,a),p={root:{...s,config:{...s?.config,context:s?.config?.context||n.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(r),h={...p,...e,actionMgrID:m};return T(Pt(h)),f}updateContainerItem(e){if(!e?.containerItemID)return Promise.reject(new Error("updateContainerItem : containerItemID is required in containerInfo object"));let r=kt,n=pe(e.containerItemID),o=te(e.containerItemID),i={context:n,target:o},{actionMgrID:s,promise:a}=this.containerManagerPromise(r),c={...i,...e,actionMgrID:s};return T(rr(c)),a}activateContainerItem(e){if(!e?.containerItemID)return Promise.reject(new Error("activateContainerItem : containerItemID is required in containerInfo object"));let r=or,o={target:te(e.containerItemID)},{actionMgrID:i,promise:s}=this.containerManagerPromise(r),a={...o,...e,actionMgrID:i};return T(nr(a)),s}removeContainerItem(e){if(!e?.containerItemID)return Promise.reject(new Error("removeContainerItem : containerItemID is required in containerInfo object"));let r=Ze,n=pe(e.containerItemID),o=te(e.containerItemID),i={context:n,target:o},{actionMgrID:s,promise:a}=this.containerManagerPromise(r),c={...i,...e,actionMgrID:s};return T(Qe(c)),a}resetContainers(e){if(!e?.context||!e?.name)return Promise.reject(new Error("resetContainers : context and name are required in containerInfo object"));let r=Yo,n=kc(e),{actionMgrID:o,promise:i}=this.containerManagerPromise(r),s={...n,...e,actionMgrID:o};return T(Lc(s)),i}addTransientItem(e){let{id:r,data:n,sourceContainerItemId:o}=e,i=this.c11nEnv.getContextName(),s=sb(r,i),a=bi(i);if(s&&a.includes(s))return s;let c=n;if(o){let l=W(o);if(!l)throw new Error(`addTransientItem: source container item "${o}" not found in store`);c=g.deepClone(l)}return T(Xx({transientItemID:s,contextName:i,target:te(i),data:c})),s}updateTransientData(e){let{transientItemID:r,data:n}=e,o=this.c11nEnv.getContextName();if(r){if(!bi(o).includes(r))return}else return;T(Ph({transientItemID:r,data:n}))}removeTransientItem(e){let r=this.c11nEnv.getContextName(),{target:n=this.c11nEnv.getTarget(),containerItemID:o,transientItemID:i}=e;if(i&&o){if(!bi(r).includes(i))return}else return;T(Nh({target:n,containerItemID:o,transientItemID:i}))}createContainerPConnect(e,r,n,o=!1){tI.createContainerPConnect(e,r,n,o)}hasContainerItems(){let e=this.c11nEnv.getContextName(),r=this.c11nEnv.getContainerName();return Fr(`${e}/${r}`)}isContainerInitialized(){let e=this.c11nEnv.getContextName(),r=this.c11nEnv.getContainerName();return Rh(e,r)}},Bd=Zx;var eD=class extends hb{constructor(e,r){super(r)}},ee=(...t)=>ri(e=>t.includes(e.type)),_V=(...t)=>(e,r)=>new Ot(n=>{let o=t.map(i=>i(e,r).subscribe(n));return()=>{o.forEach(i=>i.unsubscribe())}}),ase=t=>typeof t!="object"||t===null||!("type"in t)?!1:typeof t.type=="string",bV=()=>{let t=new Xs,e=null,r=null,n=o=>(r=o,e=new eD(t.asObservable(),o.getState()),i=>s=>{let a=i(s);return e?.next(o.getState()),ase(s)&&t.next(s),a});return n.run=o=>{if(!e||!r)throw new Error("Epic middleware must be added to the store before calling run().");return o(t.asObservable(),e).subscribe(i=>{r?.dispatch(i)})},n};var me=(t,e,r)=>Gi(n=>(n?.code!=="ERR_CANCELED"&&console.error(t,n),Se(os(t,n,e,null,r))));var gr=(t,e)=>r=>new Ot(n=>{let o={},i=0;return r.pipe(z(s=>{let a=Date.now(),c;return e?c=e:c=lo,c&&c(s,o)&&a-i<t?Ec():(o=s,i=a,Se(s))})).subscribe(n)});var cse="Error occurred during ajax call at createDataObject Epic",lse=t=>{let{dataPageID:e,context:r,headers:n,containerItemID:o}=t,i={data_view_ID:e},{restApi:s,reqType:a}=U(qk,i),{content:c}=Rt(o);return q(M(s,{method:a,headers:n,body:{data:c.content,pageInstructions:c?.pageInstructions}},o)).pipe(O(l=>({response:l.data,actionInPayload:t})),me(cse,r))},TV=lse;var use="CREATE_DATA_OBJECT",rI=t=>({type:use,payload:t});var tD=t=>{let e=0,r=[];return t.pipe(ee(ou),gr(100),Vt(n=>{let{isFormValid:o}=n.payload;if({actionMgrID:e}=n.payload,!o){let i={type:E.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return w.rejectActionByID(e,!0,i),Se([])}return Se(n.payload).pipe(z(i=>TV(i)),z(async i=>{if(i&&i.type===Te){let{payload:m}=i,f=ue({...i,...m,actionMgrID:e});return r.push(f),{actionsOut:r,data:void 0}}let{actionInPayload:s}=i,{containerItemID:a,isModalAction:c}=s,l=c?ge.MODAL:ge.PRIMARY,p={target:Z(l,a),containerItemID:a,context:a};return r.push(V(Qe,p)),{actionsOut:r,data:i?.response}}),O(({data:i})=>(r.length===1&&Je(r[0].type)?w.rejectActionByID(e):w.resolveActionByID(e,i),T(r),r=[],r)))}))};var dse="Error occurred during ajax call at getDataObjectView Epic",pse=t=>{let{dataLookUp:e,context:r,headers:n,viewName:o,requestPayload:i}=t,s={data_view_ID:e,view_ID:o},{restApi:a,reqType:c}=U(Jk,s);return q(M(a,{method:c,headers:n,body:{dataViewParameters:i}},r)).pipe(O(l=>({response:l.data,headers:$e(l.headers),actionInPayload:t})),me(dse,r))},vV=pse;var mse="VIEW_DATA_OBJECT",nI=t=>({type:mse,payload:t});var rD=t=>{let e=0,r=[];return t.pipe(ee(fS),gr(100),O(n=>({actionMgrID:e}=n.payload,n.payload)),z(n=>vV(n)),z(async n=>{if(n&&n.type===Te){let{payload:S}=n,A=ue({...n,...S,actionMgrID:e});return r.push(A),r}let{actionInPayload:o,response:i,headers:s={}}=n,{containerName:a,readOnly:c,actionName:l}=o,u=Z(a,o.context),p=st(u,a,o.context),m={acName:u,context:p};if(i?.data?.dataInfo){let{dataInfo:S}=i.data;S.dataContext||=o.dataLookUp,S.dataContextParameters||=o.requestPayload}await Pe(i,o,m);let h=Me(i,{target:u,context:p,containerItemID:p,headers:s});return h.resourceType=E.RESOURCE_TYPES.DATA,h.resourceStatus=E.RESOURCE_STATUS.UPDATE,h.readOnly=c,h.actionName=l,h.key=JSON.stringify(o.requestPayload),r.push(V(Pt,h)),r}),O(()=>(r.length===1&&Je(r[0].type)?w.rejectActionByID(e):w.resolveActionByID(e),T(r),r=[],r)))};var fse="Error occurred during ajax call at updateDataObject Epic",gse=t=>{let{dataPageID:e,context:r,headers:n,containerItemID:o,key:i}=t,s={data_view_ID:e},{restApi:a,reqType:c}=U(dS,s),{content:l}=Rt(o);return q(M(a,{method:c,headers:{...n,"if-match":t?.etag},body:{data:{...l.content,...i},pageInstructions:l.pageInstructions||[]}},o)).pipe(O(u=>({response:u.data,actionInPayload:t})),me(fse,r))},RV=gse;var hse="UPDATE_DATA_OBJECT",oI=t=>({type:hse,payload:t});var nD=t=>{let e=0,r=[];return t.pipe(ee(iu),gr(100),Vt(n=>{let{isFormValid:o}=n.payload;if({actionMgrID:e}=n.payload,!o){let i={type:E.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return w.rejectActionByID(e,!0,i),Se([])}return Se(n.payload).pipe(z(i=>RV(i)),z(async i=>{if(i&&i.type===Te){let{payload:m}=i,f=ue({...i,...m,actionMgrID:e});return r.push(f),r}let{actionInPayload:s}=i,{containerItemID:a,isModalAction:c}=s,l=c?ge.MODAL:ge.PRIMARY,p={target:Z(l,a),containerItemID:a,context:a};return r.push(V(Qe,p)),r}),O(()=>(r.length===1&&Je(r[0].type)?w.rejectActionByID(e):w.resolveActionByID(e),T(r),r=[],r)))}))};var yse="Error occurred during ajax call at getDataObjectView Epic",Sse=t=>{let{lookupDatapage:e,context:r,headers:n,actionID:o,dataViewParameters:i}=t,s={data_view_ID:e,action_ID:o},{restApi:a,reqType:c}=U("openDataObjectAction",s);return q(M(a,{method:c,headers:n,body:{dataViewParameters:i}},r)).pipe(O(l=>({response:l.data,headers:$e(l.headers),actionInPayload:t})),me(yse,r))},PV=Sse;var oD=t=>{let e=0,r=[];return t.pipe(ee(gS),gr(100),O(o=>({actionMgrID:e}=o.payload,o.payload)),z(o=>PV(o)),z(async o=>{if(o&&o.type===Te){let{payload:C}=o,_=ue({...o,...C,actionMgrID:e});return r.push(_),r}let{actionInPayload:i,response:s,headers:a={}}=o,{containerName:c,actionID:l,context:u,actionName:p}=i,m=Z(c,i.context),f=ur(c,u);f=Zr(u,f);let h={target:m,context:f,containerItemID:f,headers:a,resourceType:E.RESOURCE_TYPES.DATA,resourceStatus:E.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 A=Me(s,h);return r.push(V(Pt,A)),r}),O(()=>(r.length===1&&Je(r[0].type)?w.rejectActionByID(e):w.resolveActionByID(e),T(r),r=[],r)))};var Ese="Error occurred during ajax call at getDataObjectView Epic",Ase=t=>{let{savableDatapage:e,context:r,headers:n,actionID:o,keys:i,containerItemID:s,jsActionQueryParams:a}=t,c={data_view_ID:e,action_ID:o},{restApi:l}=U("submitDataObjectAction",c),{reqType:u}=U("submitDataObjectAction",c),{content:p}=Rt(s);return l=Su(a,l),q(M(l,{method:u,headers:{...n,"if-match":t?.etag},body:{data:{...p?.content,...i},pageInstructions:p?.pageInstructions||[]}},r)).pipe(O(m=>({response:m.data,actionInPayload:t})),me(Ese,r))},NV=Ase;var Cse=(t,e,r,n)=>{let{resourceType:o,key:i,containerItemID:s}=n,a=Me(r,e);a.resourceType=o||E.RESOURCE_TYPES.DATA;let c=xo(s);t.push(V(Qe,a));let l=re(".dataContext","dataInfo",c),u=re(".dataContextParameters","dataInfo",c),p={context:c,skipSemanticUrl:!0,resourceType:o,parentAction:Vi,dataContext:l,dataContextParameters:u},m=l&&u&&bt(Oo,{pageName:d.PY_DETAILS,dataViewName:l},u)||"";if(s?.includes(d.PREVIEW)){let f={type:uc,payload:{pageName:d.VIEW_NAMES.PY_DATA_PREVIEW,container:d.PREVIEW,containerName:d.PREVIEW,...p}};t.push(f)}else if(o!==d.PAGE&&i===m&&s?.includes(d.PRIMARY)){let f={type:uc,payload:{pageName:d.VIEW_NAMES.PY_DETAILS,containerName:"",...p}};t.push(f)}return t},iD=t=>{let e=0,r=[];return t.pipe(ee(Vi),gr(100),Vt(o=>{let{isFormValid:i}=o.payload;({actionMgrID:e}=o.payload);let s=o.payload.context;if(!i){let a={type:E.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return w.rejectActionByID(e,!0,a),Se([])}return dt({context:s,stateObj:W(s),clearContextMessages:!0}),Se(o.payload).pipe(z(a=>NV(a)),z(async a=>{if(a&&a.type===Te){tE(a,"dataObject");let{payload:_}=a,I=ue({...a,..._,actionMgrID:e});return r.push(I),r}let{actionInPayload:c,response:l,headers:u={}}=a,{containerName:p,containerItemID:m,resourceType:f,key:h}=c,S=Z(p,c.context),A={acName:S,context:c.context};await Pe(l,c,A);let C={key:h,target:S,resourceType:f,containerItemID:m,headers:u,context:c.context};return r=Cse(r,C,l,{key:h,resourceType:f,containerItemID:m}),r}),O(()=>(r.length===1&&Je(r[0].type)?w.rejectActionByID(e):w.resolveActionByID(e),T(r),r=[],r)))}))};var sD=class{components;constructor(){this.components={}}_checkComponent(e,r){return!!this.components[r]?.[e]}start(e,r,n,o,i){let s={viewName:e,pageReference:n,contextName:o,isInProgress:!0,active:!0,caseKey:r};this.components[o]=this.components[o]||{},this.components[o][i]=s}stop(e,r){this._checkComponent(e,r)&&(this.components[r][e].isInProgress=!1)}remove(e,r){this._checkComponent(e,r)&&delete this.components[r][e]}removeContext(e){delete this.components[e]}enableCascade(e){this.components[e]&&Object.values(this.components[e]).forEach(r=>{r.isInProgress&&(r.cascade=!0)})}activate(e,r){this._checkComponent(e,r)&&(this.components[r][e].active=!0)}deactivate(e,r){this._checkComponent(e,r)&&(this.components[r][e].active=!1)}refreshActiveComponents(e){e&&this.components[e]&&Object.keys(this.components[e]).forEach(r=>{this.refreshComponent(r,e)})}refreshComponent(e,r){if(!this._checkComponent(e,r))return;let n=this.components[r][e];if(n.active&&n.cascade){let{caseKey:o,viewName:i,pageReference:s}=n;Dc(o,i,r,s,{})}}},Hd=new sD;var aD=class{constructor(e,r,n,o,i=100,s=500){this.finalDataViewCall=e;this.combiner=r;this.comparator=n;this.separator=o;this.maxtime=i;this.maxsize=s;this.groupedDataViewArray=[]}finalDataViewCall;combiner;comparator;separator;maxtime;maxsize;groupedDataViewArray;timeoutId;findCombinableDataViewCall(e){return this.groupedDataViewArray.find(r=>this.comparator(r,e))}dequeueAllDataViewCalls(){for(this.groupedDataViewArray.reverse();this.groupedDataViewArray.length>0;){let e=this.groupedDataViewArray.pop();this.finalDataViewCall(e).then(r=>{this.separator(e,r)})}clearTimeout(this.timeoutId)}dequeueDataViewCallOnSizeExceed(e){let r=this.groupedDataViewArray.findIndex(n=>this.comparator(n,e));this.groupedDataViewArray[r]&&(this.groupedDataViewArray.splice(r,1),this.finalDataViewCall(e).then(n=>{this.separator(e,n)}))}queueDataViewCall(e,r){let n=this.findCombinableDataViewCall(e),o,i;return o=new Promise(s=>{i=s}),n&&!n.dataViewCallMap[r]?(this.combiner(n,e),n.dataViewCallMap[r]={promise:o,resolve:i}):n?o=n.dataViewCallMap[r].promise:(n={...e,dataViewCallMap:{[r]:{promise:o,resolve:i}}},this.groupedDataViewArray.push({...e,dataViewCallMap:{[r]:{promise:o,resolve:i}}})),Object.keys(n.dataViewCallMap).length===this.maxsize?this.dequeueDataViewCallOnSizeExceed(n):(clearTimeout(this.timeoutId),this.timeoutId=setTimeout(()=>this.dequeueAllDataViewCalls(),this.maxtime)),o}},OV=aD;var cD=class{bufferedDataQueues;constructor(){this.bufferedDataQueues={}}getBufferedDataQueueForDataPage(e){return this.bufferedDataQueues[e]}addBufferedDataQueueForDataPage(e,r,n,o,i,s,a){return this.getBufferedDataQueueForDataPage(e)||(this.bufferedDataQueues[e]=new OV(r,n,i,o,s,a)),this.bufferedDataQueues[e]}},xV=cD;var Ise=t=>{let e=t?.F0.rhs?.value;t.F0.rhs={values:[e]},t.F0.comparator="IN"},_se=(t,e)=>Object.keys(t).length===1&&Object.keys(t).length===Object.keys(e).length,bse=(t,e)=>e.F0.comparator==="EQ"&&(t.F0.comparator===e.F0.comparator||t.F0.comparator==="IN"),Tse=(t,e)=>_se(t,e)&&bse(t,e)&&t.F0.ignoreCase===e.F0.ignoreCase,DV=t=>t.map(e=>e.field),vse=(t,e)=>{let r=(t.query?.filter).filterConditions,n=(e.query?.filter).filterConditions,o=(e.query?.filter).logic,i=Object.keys(r).length;Tse(r,n)?(r.F0.comparator==="EQ"&&Ise(r),(r.F0.rhs?.values).push(n.F0.rhs?.value)):(Object.keys(n).forEach((c,l)=>{let u=`F${i+l}`;r[u]=n[c],o=o.replace(c,u)}),(t.query?.filter).logic+=` OR ${o}`);let s=DV(t.query?.select);DV(e.query?.select).forEach(c=>{s.includes(c)||(t.query?.select).push({field:c})})},Rse=(t,e)=>t.dataViewParameters&&e.dataViewParameters&&Object.keys(e.dataViewParameters).length===Object.keys(t.dataViewParameters).length&&!Object.keys(t.dataViewParameters).some(r=>typeof e.dataViewParameters?.[r]=="string"?t.dataViewParameters?.[r]!==e.dataViewParameters?.[r]:!g.isEqual(t.dataViewParameters?.[r],e.dataViewParameters?.[r])),Pse=(t,e)=>!t.dataViewParameters&&!e.dataViewParameters,Nse=(t,e)=>Object.keys(t.filterConditions).length%Object.keys(e.filterConditions).length===0?!Object.keys(e.filterConditions).some(r=>t.filterConditions[r].lhs.field!==e.filterConditions[r]?.lhs.field):!1,Ose=(t,e)=>Nse(t.query?.filter,e.query?.filter)&&(Rse(t,e)||Pse(t,e)),xse=(t,e)=>{let{data:r}=e,{dataViewCallMap:n,filterDataOnClient:o}=t;Object.keys(n).forEach(i=>{n[i].resolve({data:o(i,r)})})},Dse=t=>({combiner:vse,comparator:Ose,separator:xse,...t}),wV=Dse;var lD=(t,e)=>{if(!(typeof window>"u"))try{window.sessionStorage.setItem(t,e)}catch{}},$V=(t,e="",r="IS_NULL")=>({comparator:r,lhs:{field:t},...e&&{rhs:{value:e}}}),Oh=t=>t!=null&&typeof t=="object"&&!("then"in t),wse=(t=[],e={},r="")=>{if(!(t.length&&Object.keys(e)))return;let n={};return t.forEach((i,s)=>{let a=e[i],c;a?c=$V(i,a,"EQ"):c=$V(i);let l=`T${s+1}`;n[l]=c}),{logic:Object.keys(n).join(` ${r} `),filterConditions:n}},uD=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,r){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=r)}static searchResultsCache={};static init(e,r){return new Promise((n,o)=>{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=g.getHashedString(a),l=`${e.dataSource}_${c}`,u=`__dataviewmetadata__${e.dataSource}`,p=ir.getAppCacheKey(u);if(typeof window<"u"&&window.sessionStorage.getItem(p)){let m=JSON.parse(`${window.sessionStorage.getItem(p)}`);if(r&&t.searchResultsCache?.[r]?.[l])n(t.searchResultsCache[r][l]);else if(e.cacheLifeSpan!=="form"&&t.searchResultsCache?.persisted?.[l])n(t.searchResultsCache.persisted[l]);else{let f=new t(e,r);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(r,e,l,f),n(f)):(f.associationFilter=e.associationFilter,f.propertyFilter=e.propertyFilter,f.fetchMetaData(r).then(h=>{lD(p,JSON.stringify({isQueryable:h.data.isQueryable,dataSourceMetaData:h.data,isInitialised:!0,associationFilter:e.associationFilter})),f.isQueryable=h.data.isQueryable,f.dataSourceMetaData=h.data,f.isInitialised=!0,t.initializeCache(r,e,l,f),n(f)}).catch(h=>{f.isInitialised=!1,o(h)}))}}else if(e.deferDatasource&&zr(e.dataSource)){let m=new t(e,r),f=zr(e.dataSource);m.isQueryable=!!f?.isQueryable,m.isInitialised=!0,m.dataSourceMetaData=f,lD(p,JSON.stringify({isQueryable:f?.isQueryable,dataSourceMetaData:f,isInitialised:!0})),m.context=r,t.initializeCache(r,e,l,m),n(m)}else{let m=new t(e,r);m.associationFilter=e.associationFilter,m.propertyFilter=e.propertyFilter,m.fetchMetaData(r).then(f=>{lD(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(r,e,l,m),n(m)}).catch(f=>{m.isInitialised=!1,o(f)})}})}static bufferedDataView=new xV;registerForBufferedCall(e){return this.isQueryable&&(this.initializeBufferCallsForDataPage(wV(e)),this.bufferInitialized=!0),this}static clearContextedCache(e){delete t.searchResultsCache[e]}static initializeCache(e,r,n,o){e&&r.cacheLifeSpan?.toLowerCase()==="form"?(t.searchResultsCache[e]===void 0&&(t.searchResultsCache[e]={}),t.searchResultsCache[e][n]=o):(t.searchResultsCache.persisted===void 0&&(t.searchResultsCache.persisted={}),t.searchResultsCache.persisted[n]=o)}fetchMetaData(e){return ir.getDataViewMetadata(this.dataSource,e,this.associationFilter,this.propertyFilter)}initializeBufferCallsForDataPage(e){let r=n=>Zt.getDataAsync(this.dataSource,this.context,n.dataViewParameters,n.paging,n.query);t.bufferedDataView.addBufferedDataQueueForDataPage(this.dataSource,r,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,r,n)=>{let o=this.buildSelect(n),i=wse(e,r,"AND");return{select:o,...i&&{filter:i},...ir.isDistinctResultsOnly(o)&&{distinctResultsOnly:"true"}}};buildSchemaForQueryableDPWithKeys=(e,r,n)=>({dataViewParameters:this.parameters,query:this.buildQueryWithKeys(e,r,n),paging:this.buildPageOptions()});getRowDataByKeys=async(e,r,n)=>this.memoizedGetRowDataByKeys(e,r,n);buildKeyCacheKey(e,r,n){let o=e.map(s=>[s,r[s]??""]),i=n?.columns?.map(s=>s.value);return JSON.stringify({filterEntries:o,columns:i,pageNumber:this.pageNumber})}memoizedGetRowDataByKeys(e,r,n){let o=this.buildKeyCacheKey(e,r,n);(n?.invalidateCache||n?.purgeDataPageCache)&&this.keyCache.delete(o);let i=this.keyCache.get(o);if(i)return i;let s=this.isQueryable?this.buildSchemaForQueryableDPWithKeys(e,r,n):this.buildSchemaForNonQueryableDP(),c=Zt.getDataAsync(this.dataSource,this.context,s.dataViewParameters,this.isQueryable?s.paging:void 0,this.isQueryable?s.query:void 0,{...n}).catch(l=>(this.keyCache.delete(o),Promise.reject(l)));return this.keyCache.set(o,c),c}getData(e,r){if(this.isQueryable){if(this.bufferInitialized)try{let o=this.buildSchemaForQueryableBufferDP(e);return t.bufferedDataView.getBufferedDataQueueForDataPage(this.dataSource).queueDataViewCall(o,e)}catch{let o=this.buildSchemaForQueryableDP(e,r);return Zt.getDataAsync(this.dataSource,this.context,o.dataViewParameters,o.paging,o.query)}let n=this.buildSchemaForQueryableDP(e,r);return Zt.getDataAsync(this.dataSource,this.context,n.dataViewParameters,n.paging,n.query,{...r})}return this.fetchNonQueryableResults(e,r)}getCachedResult(e,r){if(this.enablePagination&&Oh(r)&&r.has(this.pageNumber))return r.get(this.pageNumber);let n=this.cache.get(e);if(!this.enablePagination&&n&&!Oh(n))return n}handleCacheError(e,r){if(this.enablePagination){let n=this.cache.get(e);n&&Oh(n)&&n.delete(this.pageNumber)}else this.cache.delete(e);return Promise.reject(r)}storeCacheResult(e,r){if(this.enablePagination){let n=this.cache.get(e);(!n||!Oh(n))&&(n=new Map,this.cache.set(e,n)),n.set(this.pageNumber,r)}else this.cache.set(e,r)}isResultCached(e){if(!this.isInitialised||!this.isValidDatasource()||this.context&&!Gd(this.context))return!1;let r=e.toLowerCase(),n=this.cache.get(r);return n?this.enablePagination?Oh(n)&&n.has(this.pageNumber):!0:!1}memoizedGetData(e,r){let n=e?.toLowerCase(),o=this.cache.get(n);if(this.isResultCached(e)&&o){let c=this.getCachedResult(n,o);if(c)return c}let a=this.getData(e,r).catch(c=>this.handleCacheError(n,c));return this.storeCacheResult(n,a),a}fetchData(e,r=!1,n){return this.isValidDatasource()?this.context&&!Gd(this.context)?Promise.resolve({data:[]}):this.isInitialised?(this.pageNumber=r?this.pageNumber:1,this.memoizedGetData(e??"",n)):Promise.reject(new Error):Promise.reject(new Error)}fetchPaginatedData(e){return this.pageNumber+=1,this.fetchData(e,!0)}fetchNonQueryableResults(e,r){if(e===void 0)return Promise.resolve({data:[]});if(this.fetchedNQData)return Promise.resolve({data:this.filterDataOnClient(e,this.nonQueryableData,r)});if(this.isNQDataFetchInProgress&&this.fetchNQDataPromise)return this.fetchNQDataPromise.then(()=>({data:this.filterDataOnClient(e,this.nonQueryableData,r)})).catch(n=>Promise.reject(n));if(this.dataSourceMetaData&&"structure"in this.dataSourceMetaData&&this.dataSourceMetaData.structure?.toLowerCase()==="list"){let n=this.buildSchemaForNonQueryableDP();return this.fetchNQDataPromise=Zt.getDataAsync(this.dataSource,this.context,n.dataViewParameters,void 0,void 0,r),this.isNQDataFetchInProgress=!0,new Promise((o,i)=>{this.fetchNQDataPromise?.then(s=>(this.nonQueryableData=[...s.data],this.fetchedNQData=!0,o({data:this.filterDataOnClient(e,this.nonQueryableData,r)}))).catch(s=>i(s)).finally(()=>{this.isNQDataFetchInProgress=!1,this.fetchNQDataPromise=null})})}return Promise.resolve(null)}filterDataOnClient(e,r,n){let o=(n?.columns??this.columns)?.filter(i=>i.useForSearch).map(i=>i.value);return r.reduce((i,s)=>(o?.some(c=>{let l=t.resolveEmbeddedPath(c),u=g.getIn(s,l);return u!=null&&this.positionMatches(`${u}`,e,n)})&&i.push({...s}),i),[])}static resolveEmbeddedPath(e){return e.startsWith("!P!")||e.startsWith("!PL!")?e.substring(e.lastIndexOf("!")+1).replace(/:/g,"."):e}positionMatches(e,r,n){let o=n?.ignoreCase??this.ignoreCase,i=o?e.toLowerCase():e,s=o?r.toLowerCase():r;switch(n?.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 r=[],n=[];return(e?.columns??this.columns)?.forEach(o=>{if(!n.includes(o.value)){n.push(o.value);let i={field:o.value};r.push(i)}}),r}buildFilters(e,r){let n=r?.matchPosition??this.matchPosition,o=r?.ignoreCase??this.ignoreCase,i={},s=0;(r?.columns??this.columns)?.forEach(c=>{if(c.useForSearch){let l=`F${s}`;s+=1;let u={field:c.value},p={value:e},m="CONTAINS";n==="start"?m="STARTS_WITH":n==="equals"&&(m="EQ");let f={...`${parseFloat(e)}`!==e&&{ignoreCase:o?"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,r){let n=this.buildSelect(r);return e?{select:n,filter:this.buildFilters(e,r),...ir.isDistinctResultsOnly(n)&&{distinctResultsOnly:"true"}}:{select:n,...ir.isDistinctResultsOnly(n)&&{distinctResultsOnly:"true"}}}buildPageOptions(){return this.enablePagination?{pageNumber:this.pageNumber,pageSize:this.pageSize}:{maxResultsToFetch:this.maxResultsDisplay}}buildSchemaForQueryableDP(e,r){return{dataViewParameters:this.parameters,query:this.buildQuery(e,r),paging:this.buildPageOptions()}}buildSchemaForNonQueryableDP(){return{dataViewParameters:this.parameters}}isValidDatasource(){return!!this.dataSource}},Io=uD;var dD=class t{refreshMap;propChangeRefreshMap;constructor(){this.refreshMap={},this.propChangeRefreshMap={}}static initializeRefreshCache(e,r,n,o,i){typeof e[r]>"u"&&(e[r]={}),e[r][n]=[{uniqueHash:o,callback:i}]}registerForRefresh(e,r,n,o,i){n=g.convertClipboardPageToPageRefNotation(n);let s=o.split("/").join(d.HASH_DELIMITER),a=g.getHashedString(s);e==="PROP_CHANGE"?this.propChangeRefreshMap?.[i]?.[n]?this.propChangeRefreshMap[i][n].some(l=>l.uniqueHash===a)||this.propChangeRefreshMap[i][n].push({uniqueHash:a,callback:r}):t.initializeRefreshCache(this.propChangeRefreshMap,i,n,a,r):this.refreshMap?.[i]?.[`${e}-${n}`]?this.refreshMap[i][`${e}-${n}`].some(l=>l.uniqueHash===a)||this.refreshMap[i][`${e}-${n}`].push({uniqueHash:a,callback:r}):t.initializeRefreshCache(this.refreshMap,i,`${e}-${n}`,a,r)}triggerPropChangeRefresh(e,r){let n=this.propChangeRefreshMap?.[r];if(!n)return!1;let o=J.getPropertyValue(d.CONTEXT_DATA_MODAL_VIEW.CONTEXT_DATA_MODAL_VIEW,e,r),{interestPage:i=""}=o||{},s=u=>g.convertPageRefToClipboardPageNotation(u).replace(`${d.CASE_INFO?.CASE_INFO_CONTENT}${i}`,"");if(n[e]){let u=s(e);return n[e].forEach(p=>p.callback(u)),!0}let a=be.getContextReferences(r)?.get(e),c=a&&J.resolveContextTreeNodeProps(a.props)||{},{contextPageRef:l}=c;if(l&&n[l]){let u=s(l);return n[l].forEach(p=>p.callback(u)),!0}for(let u of Object.keys(n)){let p;if(g.segmentsMatch(u,e)?p=e:l&&g.segmentsMatch(u,l)&&(p=l),p){let m=s(p);return n[u].forEach(f=>f.callback(m)),!0}}return!1}triggerRefreshForType(e,r,n){return e==="PROP_CHANGE"?this.triggerPropChangeRefresh(r,n):this.refreshMap?.[n]?.[`${e}-${r}`]?(this.refreshMap[n][`${e}-${r}`].forEach(o=>o.callback()),!0):!1}deRegisterForRefresh(e){delete this.propChangeRefreshMap[e],delete this.refreshMap[e]}},Ti=new dD;var pD=class{static cleanCaches(e){Cr.purgeCascadeFields(e),Hd.removeContext(e),Io.clearContextedCache(e),$.cleanContextSubscribers(e),AE(e),be.removeContextTreeNode(e),Tt.clearContext(e),Ti.deRegisterForRefresh(e)}},xh=pD;var mD="GET_DESCENDANTS",MV=t=>({type:mD,payload:t});var fD=class{runtimeParams;runtimeParamsMap;constructor(){this.runtimeParams={},this.runtimeParamsMap={}}setRuntimeParams(e){this.runtimeParams=e}getRuntimeParams(){return this.runtimeParams}setRuntimeParam(e,r){this.runtimeParamsMap[e]=r}getRuntimeParam(e){return this.runtimeParamsMap[e]}},dl=new fD;var gD=class{MISSING_CONTEXT_PARAM="context is required parameter";INVALID_CONTEXT_DETAILS="Invalid Context";INVALID_CONTEXT_OPERATION="Invalid Operation on Given Context";schedulePendingActionOnCompletion(e,r){let n=[],o=r.context_data?.blocking_action_counter??0,i=r.context_data?.deferred_action_queue?[...r.context_data.deferred_action_queue]:[],s=r.context_data?.is_deferred_action_in_progress??!1;if(o<=0){if(s)n.push({type:Er,payload:{context:e,data:{context_data:{is_deferred_action_in_progress:!1}}}});else if(i.length>0){let a=i.shift();s=!s,n.push({type:Er,payload:{context:e,data:{context_data:{deferred_action_queue:i,blocking_action_counter:o,is_deferred_action_in_progress:s}}}}),a&&n.push(a)}else return;T(n)}}executeOrQueueDeferredAction(e){if(!e?.payload?.context)return Promise.reject(new Error("Action Context is Mandatory Field."));let r=W(e?.payload?.context);if(r){let n=[],o=r.context_data?.blocking_action_counter??0,i=r.context_data?.deferred_action_queue?[...r.context_data.deferred_action_queue]:[],s=r.context_data?.is_deferred_action_in_progress??!1;return i.length<=0&&!s&&(o<=0?(n.push(e),s=!s):i.push(e),n.unshift({type:Er,payload:{context:e.payload.context,data:{context_data:{deferred_action_queue:i,blocking_action_counter:o,is_deferred_action_in_progress:s}}}}),T(n)),Promise.resolve()}return Promise.reject(new Error(this.INVALID_CONTEXT_DETAILS))}handleDeferredActionCompletion(e){if(!e)return Promise.reject(new Error(this.MISSING_CONTEXT_PARAM));let r=W(e);return r&&r.context_data?.is_deferred_action_in_progress===!0?(T({type:Er,payload:{context:e,data:{context_data:{is_deferred_action_in_progress:!1}}}}),this.schedulePendingActionOnCompletion(e,r),Promise.resolve()):Promise.reject(new Error(this.INVALID_CONTEXT_DETAILS))}registerBlockingAction(e){return e?W(e)?(T({type:mc,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 r={...W(e)};return r.context_data={...r.context_data},r&&r.context_data?.blocking_action_counter>0?(T({type:mc,payload:{context:e,isInitiateBlockingAction:!1}}),r.context_data.blocking_action_counter-=1,this.schedulePendingActionOnCompletion(e,r),Promise.resolve()):Promise.reject(new Error(this.INVALID_CONTEXT_OPERATION))}cancelDeferredActionsOnError(e){if(!e)return;let r=W(e);if(r){let n={...r};n.context_data={...n.context_data},n.context_data?.deferred_action_queue&&g.rejectPendingActions(n.context_data.deferred_action_queue)&&(n.context_data.deferred_action_queue=[]),n.context_data?.blocking_action_counter&&(n.context_data.blocking_action_counter=0),n.context_data?.is_deferred_action_in_progress&&(n.context_data.is_deferred_action_in_progress=!1),T({type:Er,payload:{context:e,data:{...n}}}),On.disableLoadingIndicator({context:e})}}isDeferredActionInProgress(e){if(!e)return Promise.reject(new Error(this.MISSING_CONTEXT_PARAM));let r=W(e);return!!(r&&r.context_data?.is_deferred_action_in_progress===!0)}},$se=new gD,Ct=$se;var kV=(t,e)=>{let r={},n=_i.getLookUpDataPage(t),o=_i.getDataPageKeys(n);if(o)for(let i of o)r[i.keyName]=i.isAlternateKeyStorage?e[i.linkedField]:e[i.keyName];return{dataViewParameters:r,dataPageID:n,dataPageKeys:o}},LV=(t,e)=>{let r=_i.getSavableDataPage(t),n=_i.getDataPageKeys(r);return n?.forEach(o=>{o.isAlternateKeyStorage&&(o.keyName===o.linkedField||Object.keys(e).includes(o.linkedField))?o.keyName=e[o.linkedField]:o.isAlternateKeyStorage&&Object.keys(e).includes(o.keyName)&&o.keyName!==o.linkedField?(e[o.linkedField]=e[o.keyName],delete e[o.keyName]):o.keyName=e[o.keyName]}),{keys:e,dataPageID:r,dataPageKeys:n}},iI=t=>{$.publish(E.PUB_SUB_EVENTS.EVENT_CANCEL,t)},Mse=t=>{if(t.includes(d.ACTIONAREA))return!0;let e=Ma(t);return!!se(`${e}/${d.ACTIONAREA}`)?.includes(d.ACTIONAREA)},kse=(t,e,r)=>B.shouldUseUnifiedHandling()||Mse(t)?Po:jU(e,r??!1),UV=(t,e,r)=>{let{callbacks:n}=r;return r.callbacks=null,t(e,r).then(o=>{o==="cancel"?n?.cancel?.():n?.submit?.()})},Lse=t=>{let e=B.shouldUseUnifiedHandling();return B.isExternalCaseType(t)?tb:B.isExternalObject(t)?e?tb:eL:e?zs:B.isObjectCaseType(t)?Zk:zs},Use=t=>!B.shouldUseUnifiedHandling()&&(t.type==="Object"||B.isObjectCaseType(t?.caseClassName||"")||globalThis.location?.href?.includes("/objects/"))?Xk:ji,jV=(t,e,r)=>!r&&e===d.ACTION?t.getValue(E.CASE_INFO.ASSIGNMENTACTION_ID):t.getValue(E.CASE_INFO.ACTIVE_ACTION_ID),jse=(t,e)=>{let r=t.getValue(E.CASE_INFO.IS_LOCAL_ACTION),n=t.getValue(E.CASE_INFO.ASSIGNMENT_ID),o=jV(t,e,r);if(e===d.ACTION&&(!o||!r&&!n)){let i=AV(t.getContextName());i&&(!n&&!o&&(r=i.isLocalAction),n=n||i.assignmentID,o=o||(r?i.activeActionID:i.assignmentActionID))}return{localAction:r,assignmentID:n,actionID:o}},hD=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,r,n)=>!e&&r||n;getCaseID=e=>e.caseID||this.c11nEnv.getValue(d.getProperty(E.CASE_INFO.CASE_INFO_ID))||e?.links?.open?.href?.split("/")?.[2];getSaveActionPayload=(e,r=!1,n=!1)=>{let o=e,i=o&&o.includes(d.MODAL),s=this.c11nEnv.getValue(E.CASE_INFO.CASE_INFO_ID),a=this.c11nEnv.getValue(E.CASE_INFO.ASSIGNMENT_ID),c=this.c11nEnv.getValue(E.CASE_INFO.ACTIVE_ACTION_ID)?this.c11nEnv.getValue(E.CASE_INFO.ACTIVE_ACTION_ID):this.c11nEnv.getValue(E.CASE_INFO.ASSIGNMENTACTION_ID),l=this.c11nEnv.getContainerName(),u=this.c11nEnv.getValue(E.CASE_INFO.CASE_TYPE_ID),p=r?void 0:Dr(this.c11nEnv.getContextName()),m=this.c11nEnv.getValue("isProcessAction","isProcessAction");return ze.buildActionObject({context:o,containerItemID:e,assignmentID:a,actionID:c,caseID:s,containerName:l,caseType:u,isModalAction:i,isFormValid:p,isProcessAction:m,saveOnly:r,autosave:n},this.c11nEnv)};actionsApiPromise=(e,r,n=!0)=>{let o="";r&&r.actionMgrID!==null?o=r.actionMgrID||"":o=w.getNextActionMgrId();let i,s,a=new Promise((c,l)=>{i=c,s=l});if(i&&s)w.register(o,a,i,s,e,r,n);else throw new Error("resolveFn or rejectFn is not defined.");return{actionMgrID:o,promise:a}};showDataObjectCreateView(e,r=E.VIEW_NAMES.DATA_OBJECT_CREATE_VIEW){let n=ze.buildActionObject({viewName:r,className:e},this.c11nEnv),o=Nr,{promise:i}=this.actionsApiPromise(o,n);return T({type:o,payload:{...n,containerName:E.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 r=e,n=xr(r),o=re(d.CASE_INFO.CASE_INFO_ID,"",r),i=re(d.CASE_INFO.ASSIGNMENT_ID,"",r);if(!n)return new Bd(this.c11nEnv).removeContainerItem({containerItemID:e,skipReleaseLockRequest:!0});let s=eu,a=ze.buildActionObject({containerItemID:e,context:r},this.c11nEnv),c=r&&r.includes(d.MODAL);T({type:s,payload:{...a,isModalAction:c,isDataObject:!0,skipReleaseLockRequest:!0}});let{promise:l}=this.actionsApiPromise(s,a);return l.then(()=>{iI({caseID:o,assignmentID:i,context:r})})}createDataObject(e){if(!e)return Promise.reject(new Error("containerItemID is required parameter"));let{data:r}=we()?.getState()||{},n=r[e]?.dataInfo?.content?.classID;if(!n)return Promise.reject(new Error(d.DATA_CLASS_NOT_FOUND));if($a(E.VIEW_NAMES.SUBSCRIPT_CREATE_VIEW)){let u=this.handleSubscript.call(this,e,this.c11nEnv);if(u)return u}let i=_i.getSavableDataPage(n),s=ou,a=!!e&&e.includes(d.MODAL),c=ze.buildActionObject({containerItemID:e,dataPageID:i},this.c11nEnv),{promise:l}=this.actionsApiPromise(s,c);return T(rI({...c,isModalAction:a,isFormValid:Dr(e)})),l}deleteDataObject(e,r){if(!e)return Promise.reject(new Error("className is required parameter"));if(!r)return Promise.reject(new Error("keys is required parameter"));let n=mS,o=_i.getSavableDataPage(e),i=_i.getDataPageKeys(o),s={};if(i)for(let l of i)s[l.keyName]=l.isAlternateKeyStorage?r[l.linkedField]:r[l.keyName];let a=ze.buildActionObject({dataViewName:o,dataViewParameters:s},this.c11nEnv),{promise:c}=this.actionsApiPromise(n,a);return T(IV({...a})),c}getDataObjectView(e,r,n={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(!r)return Promise.reject(new TypeError(this.MSG_KEY_PROPERTIES_REQUIRED));if(typeof r!="object")return Promise.reject(new TypeError("keyProperties must be a object"));let o=fS,{dataPageID:i,dataViewParameters:s}=kV(e,r),a=ze.buildActionObject({dataLookUp:i,keyProperties:r,requestPayload:s,viewName:n.viewName||E.VIEW_NAMES.DATA_OBJECT_EDIT_VIEW,containerName:d.MODAL,readOnly:n.readOnly,actionName:n.actionName},this.c11nEnv),{promise:c}=this.actionsApiPromise(o,a);return T(nI({...a})),c}updateDataObject(e,r){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if(!r)return Promise.reject(new Error("keys 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));let{dataPageID:i,keys:s}=LV(o,r),a=iu,c=e&&e.includes(d.MODAL),l=ze.buildActionObject({containerItemID:e,dataPageID:i,key:s},this.c11nEnv),u=n[e]?.caseInfo?.headers?.etag,{promise:p}=this.actionsApiPromise(a,l);return T(oI({...l,isModalAction:c,isFormValid:Dr(e),etag:u})),p}updateDataObjectFields(e,r,n,o={}){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(!r||Object.keys(r).length===0)return Promise.reject(new Error(this.MSG_KEY_PROPERTIES_REQUIRED));let{etag:i,context:s=this.c11nEnv.getContextName()}=o,{restApi:a,reqType:c}=U(dS,{data_view_ID:e});return M(a,{method:c,headers:i?{"if-match":i}:{},body:{data:{...n,...r},pageInstructions:[]}},s)}openDataObjectAction(e,r,n,o){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(!r)return Promise.reject(new TypeError(this.MSG_KEY_PROPERTIES_REQUIRED));if(typeof r!="object")return Promise.reject(new TypeError("keyProperties must be a object"));if(!n)return Promise.reject(new Error(this.MSG_ACTION_ID_REQUIRED));if(!o)return Promise.reject(new Error(this.MSG_ACTION_NAME_REQUIRED));let i=gS,{dataViewParameters:s,dataPageID:a,dataPageKeys:c}=kV(e,r),l=ze.buildActionObject({actionID:n,actionName:o,dataViewParameters:s,lookupDatapage:a,containerName:d.MODAL,dataViewPayload:c,context:this.c11nEnv.getContextName()},this.c11nEnv),{promise:u}=this.actionsApiPromise(i,l);return T({type:i,payload:{...l}}),u}submitDataObjectAction(e,r,n,o){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(!r)return Promise.reject(new Error(this.MSG_KEY_PROPERTIES_REQUIRED));if(!n)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=o?.jsActionQueryParams,c=Ma(e),l=te(c),u=We(l,c)||{},{resourceType:p="",key:m=""}=u,f=Vi,{dataPageID:h,keys:S}=LV(s,r),A=ze.buildActionObject({containerItemID:e,actionID:n,resourceType:p,key:m,keys:S,savableDatapage:h,containerName:d.MODAL,context:e,jsActionQueryParams:a},this.c11nEnv);A.context=e;let C=i[e]?.caseInfo?.headers?.etag,{promise:_}=this.actionsApiPromise(f,A);return T({type:f,payload:{...A,isFormValid:Dr(e),etag:C}}),_}createWork(e,r={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=ae.getRemoteCaseClassBySourceClass(e)??e,window.pms?.plugins?.c11n?.createWork)return window.pms.plugins.c11n.createWork(e,P.getDefaultQualifiedName("pyStartCase"),r);let{dockable:n=!1}=r?.modalOptions||{},o=r.theType?r.theType:Lse(e),i=ze.buildActionObject({class:e,flowType:P.getDefaultQualifiedName("pyStartCase"),containerName:d.PRIMARY,openCaseViewAfterCreate:!0,...r,theType:o,modalOptions:{isDockable:n}},this.c11nEnv),{promise:s}=this.actionsApiPromise(o,i);if(i.headers={...i.headers},r.channelName?i.headers[d.X_ORIGIN_CHANNEL]=r.channelName:v.isWSSPortal()&&(i.headers[d.X_ORIGIN_CHANNEL]="WSS"),o=this.handleRemoteCaseForCreateWork(e,i,o),Tr.getPreviewMode()){i.debugInfo={debugId:g.generateUniqueID()};let a=Ge.getCoreHeadersFromContext(i?.context||""),c=String(a?.debugInfo?.[d.COREHEADER_APP_DEBUG_ID]||"");c&&o!==zs&&(i.debugInfo={debugId:c})}return T({type:o,payload:{...i}}),s}handleRemoteCaseForCreateWork(e,r,n){if(ae.isRemoteCase(e)){let{RemoteClassName:o,RemoteSystemID:i,name:s}=ae.getRemoteCase(e);if(r.className=e,r.class=o,w.setRemoteCaseHeaderByContext(r,i),ae.isTraditionalRemoteCase(e)||ae.isRemoteCaseVersionDifferent(e)){let a={className:e,name:s,action:hm,remoteClassName:o};return w.setTraditionalRemoteCaseParams(r,a)}}return n}createCase(e,r={}){return this.createWork(e,{...r,theType:"CREATE_WORK"})}getDataObjectActions(e,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));let n=nS,o=ze.buildActionObject({dataViewID:e,dataViewParameters:r},this.c11nEnv),{promise:i}=this.actionsApiPromise(n,o);return T({type:n,payload:{...o}}),i}getDescendants(e,r){if(!e)return Promise.reject(new Error(this.MSG_CASE_ID_REQUIRED));if(typeof r!="string")return Promise.reject(new TypeError(this.MSG_CONTEXT_STRING));let n=r||this.c11nEnv.getContextName(),o=Dk,i=ze.buildActionObject({caseID:e,currentContext:n},this.c11nEnv),{promise:s}=this.actionsApiPromise(o,i),a=MV({...i,context:n});return T(a),s}openWorkByHandle(e,r,n={}){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(!r)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if(typeof r!="string")return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(r=ae.getRemoteCaseClassBySourceClass(r)??r,window.pms?.plugins?.c11n?.openWorkByHandle)return window.pms.plugins.c11n.openWorkByHandle(e,r);let o={insKey:e,acTargetName:n.targetContainer||d.PRIMARY,containerName:n.targetContainer||d.PRIMARY},i=B.shouldUseUnifiedHandling()||!B.isObjectCaseType(r)?uo:Qk,s=ze.buildActionObject(o,this.c11nEnv),{promise:a}=this.actionsApiPromise(i,s);return s.headers={...s.headers},n.channelName?s.headers[d.X_ORIGIN_CHANNEL]=n.channelName:v.isWSSPortal()&&(s.headers[d.X_ORIGIN_CHANNEL]="WSS"),s.className=r,ae.isRemoteCase(r)&&(i=this.setRemoteCaseParamsForOpenCase(s,r,i,n.remoteCaseMeta)),Tr.getPreviewMode()&&n.targetContainer!==d.WORKAREA&&(s.debugInfo={debugId:g.generateUniqueID()}),T({type:i,payload:{...n,...s}}),a}setRemoteCaseParamsForOpenCase(e,r,n,o={}){let{RemoteSystemID:i,RemoteClassName:s,name:a}=ae.getRemoteCase(r);if(w.setRemoteCaseHeaderByContext(e,i),e.isRemoteCase=!0,e.remoteCaseClass=r,e.remoteCaseMeta=o,ae.isTraditionalRemoteCase(r)||ae.getRemoteAppPlatformVersion(i??"")){let c={className:r,name:a,action:AS,remoteClassName:s};return w.setTraditionalRemoteCaseParams(e,c)}return n}openAssignment(e,r,n={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(!r)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if(typeof r!="string")return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(r=ae.getRemoteCaseClassBySourceClass(r)??r,window.pms?.plugins?.c11n?.openAssignment)return window.pms.plugins.c11n.openAssignment(e,r);let o={assignmentID:e,doDeleteCaseSummary:!0,containerName:n.containerName,isActionFromToDoList:n.isActionFromToDoList,isChild:!1,...n.renderInline!==void 0&&{renderInline:n.renderInline},...n.pageName!==void 0&&{pageName:n.pageName}};n.isChild&&(o.containerName=d.PRIMARY,o.isChild=n.isChild);let i=wa,s=ze.buildActionObject(o,this.c11nEnv),{promise:a}=this.actionsApiPromise(i,s);if(s.headers=s.headers||{},n.channelName?s.headers[d.X_ORIGIN_CHANNEL]=n.channelName:v.isWSSPortal()&&(s.headers[d.X_ORIGIN_CHANNEL]="WSS"),ae.isRemoteCase(r)){let{RemoteClassName:l,RemoteSystemID:u,name:p}=ae.getRemoteCase(r);if(w.setRemoteCaseHeaderByContext(s,u),s.remoteCaseMeta=n.remoteCaseMeta,ae.isTraditionalRemoteCase(r)||ae.getRemoteAppPlatformVersion(u??"")){let m={className:r,name:p,action:ES,remoteClassName:l};i=w.setTraditionalRemoteCaseParams(s,m)}}s.className=r,s.activeItemCaseViewMode=this.c11nEnv.getValue("context_data.caseViewMode"),Tr.getPreviewMode()&&![d.WORKAREA].includes(n.containerName)&&(s.debugInfo={debugId:g.generateUniqueID()});let c={context:s.context||n.context,containerName:s.containerName||n.containerName,targetContainerName:s.containerName||n.containerName,viewType:s.viewType||n.viewType,skipBrowserSemanticUrlUpdate:n.skipBrowserSemanticUrlUpdate};return T({type:i,payload:{...s,...c}}),a}finishAssignment(e,r={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 n=pe(e),o=n;if(n?.includes(`/${d.WORKAREA}`)&&(o=n.substring(0,o?.lastIndexOf(`/${d.WORKAREA}`))),$j(n)){let oe=[{type:"error",message:this.c11nEnv.getLocalizationService().getLocalizedMessage(this.MSG_ACTIVE_SUGGESTION_UNATTENDED)}];return Nn({messages:oe,context:o,category:E.PAGE}),Promise.reject({type:E.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR})}let i=r?.isTriggeredFromDifferentContext,{caseID:s,assignments:a,localActionID:c,caseActions:l,caseInfo:u,businessID:p,caseTypeID:m,caseTypeName:f}=cT(e,this.c11nEnv,{isTriggeredFromDifferentContext:i}),h=Yt(u),S=!1,A,C=l?.find(oe=>oe.ID===c);C?S=C?.type==="Case":A=W(n);let{assignmentID:_}=cT(e,this.c11nEnv,{isTriggeredFromDifferentContext:i});A?.context_data?.actionType&&(S=A.context_data.actionType===d.CASE,_=_||A.context_data.assignmentID);let I=UU(a,_,c,u?.activeActionID),[N,x]=s.split(" "),H={class:N,actionID:I,assignmentID:_,caseID:s,workID:x,containerName:this.c11nEnv.getContainerName(),containerItemID:e,isCaseWideAction:S,doDeleteCaseSummary:!0,isInCreateStage:h,businessID:p,caseTypeID:m,caseTypeName:f};e?.includes(d.MODAL)&&(H.containerName=d.MODAL,H.isModalAction=!0),H.outcome=r.outcomeID,H.jsActionQueryParams=r.jsActionQueryParams,u?.isLocalAction&&(H.viewType=it.FORM);let G=kse(e,m,u?.isObjectWideAction),ne=ze.buildActionObject(H,this.c11nEnv);ne.context=n;let{promise:j}=this.actionsApiPromise(G,ne);return ne.isProcessAction=this.c11nEnv.getValue("isProcessAction","isProcessAction")||W(n).context_data.isProcessAction,ne.headers??={},v.isWSSPortal()&&(ne.headers[d.X_ORIGIN_CHANNEL]="WSS"),Ct.executeOrQueueDeferredAction({type:G,payload:{...ne,context:n}}),j}getNextWork(e={}){if(v.getRenderingMode()==="HYBRID")return $.publish(E.PUB_SUB_EVENTS.CASE_EVENTS.GET_NEXT_WORK,{userIdentifier:v.getOperatorIdentifier()}),Promise.resolve();let r=wa,n=ze.buildActionObject({...e,containerName:d.PRIMARY,isGetNextWork:!0},this.c11nEnv),{promise:o}=this.actionsApiPromise(r,n);return T({type:r,payload:{...n}}),o}openStage(e){if(!e)return Promise.reject(new Error("stageID is required parameter for openStage"));let r=wa,n=this.c11nEnv.getValue(E.CASE_INFO.CASE_INFO_ID),o=this.c11nEnv.getCaseSummary().headers,i=ze.buildActionObject({containerName:this.c11nEnv.getContainerName(),isOpenStage:!0,stageID:e},this.c11nEnv),{promise:s}=this.actionsApiPromise(r,i),a={type:r,payload:{...i,caseID:n,headers:o}};return T(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 r=tS,n=this.c11nEnv.getValue(E.CASE_INFO.CASES),o=this.c11nEnv.getValue(E.CASE_INFO.ACTIVE_ACTION_ID),i=this.c11nEnv.getValue(E.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=ze.buildActionObject(s,this.c11nEnv),c=pe(e);a.context=c;let{promise:l}=this.actionsApiPromise(r,a);return T({type:r,payload:{...a,context:c,cases:n,actionID:o,isAssignment:i,isFormValid:Dr(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 r=rS,n=this.c11nEnv.getValue(E.CASE_INFO.CASES),o=this.c11nEnv.getValue(E.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=ze.buildActionObject(s,this.c11nEnv),c=pe(e);a.context=c;let{promise:l}=this.actionsApiPromise(r,a);return T({type:r,payload:{...a,context:c,cases:n,actionID:o,isFormValid:Dr(c),classID:this.c11nEnv.getCurrentClassID()}}),l}openBulkAction(e,r){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}=r;return r.callbacks=null,window.pms.plugins.c11n.openBulkAction(e,r).then(p=>{p==="cancel"?u?.cancel?.():u?.submit?.()})}let{selectedList:n,runningMode:o}=r,i=r.type,s={selectedList:n,vcName:r.target,actionName:r?.name,actionID:e,doDeleteCaseSummary:!0,localActionType:i,runningMode:o,...r},a=wk,c=ze.buildActionObject(s,this.c11nEnv),{promise:l}=this.actionsApiPromise(a,c);return T({type:a,payload:{...c}}),l}cancelBulkAction(e){return e?typeof e!="string"?Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING)):new Bd(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)):(T({type:_t,payload:{reference:E.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)):(T({type:_t,payload:{reference:E.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[,r]=this.c11nEnv.getValue(E.CASE_INFO.DUPLICATECASEINSKEY).split(" "),n={type:_t,payload:{reference:E.CASE_INFO.DUPLICATECASEFLAG,value:d.DUPLICATE,context:e}},o={type:_t,payload:{reference:E.CASE_INFO.DUPLICATECASEID,value:r,context:e}};return T([n,o]),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 r={type:_t,payload:{reference:E.CASE_INFO.DUPLICATECASEFLAG,value:d.IGNORE,context:e}},n={type:_t,payload:{reference:E.CASE_INFO.DUPLICATECASEID,value:"",context:e}},o={type:_t,payload:{reference:E.CASE_INFO.DUPLICATECASEINSKEY,value:"",context:e}};return T([r,n,o]),this.finishAssignment(e)}openLocalAction(e,r){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 n=this.getCaseID(r);if(window.pms?.plugins?.c11n?.openLocalAction)return r.caseID=n,UV(window.pms.plugins.c11n.openLocalAction,e,r);let o=r.assignKey||this.c11nEnv.getValue(E.CASE_INFO.ASSIGNMENT_ID),i=r.type,s={caseID:n,assignmentID:o,vcName:r.target,actionName:r?.name,assignKey:o,actionID:e,doDeleteCaseSummary:!0,localActionType:i,...r},a=r.containerName===d.ACTIONAREA?ji:Use(r),c=ze.buildActionObject(s,this.c11nEnv);(r.containerName===d.ACTIONAREA||r.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===ji)return T({type:a,payload:{...c}}),l;if(r.type==="Object")return T({type:a,payload:{...c}}),l;let f=se(p),h=this.c11nEnv.getValue(d.getProperty(E.CASE_INFO.CASE_INFO_ID)),A=n!==h&&f?ae.getRemoteHeaderByContext(f)||ae.getRemoteHeaderByContext(u):ae.getRemoteHeaderByContext(u);if(w.setRemoteCaseHeaderByContext(c,A),!p)return m=u,T({type:a,payload:{...c,contextName:u,continueExecution:!1}}),l;let{continueExecution:C,containerItemID:_}=qd(u,n,p);if(m=_,!C||m&&we()?.getState()?.data[m]?.context_data?.caseViewMode==="review")return T({type:a,payload:{...c,contextName:u,continueExecution:C}}),l;let I=m,N=I&&I.includes(d.MODAL),x=r.assignKey||this.c11nEnv.getValue(E.CASE_INFO.ASSIGNMENT_ID),H=W(m),G=H?.caseInfo?.assignments?H.caseInfo.assignments[0]?.actions[0]?.ID:void 0,ne=n,j=se(p),oe=mr(te(j)),Ie=W(j),he=oe&&Ie;he&&(ne=Ie?.caseInfo?.ID,x=Ie?.caseInfo?.assignments[0]?.ID,G=Ie?.caseInfo?.assignments[0]?.actions[0]?.ID);let De=this.c11nEnv.getContainerName(),Fe=this.c11nEnv.getValue(E.CASE_INFO.CASE_TYPE_ID),_e=!0,Ye=this.c11nEnv.getValue("isProcessAction","isProcessAction"),Oe=ze.buildActionObject({context:I,containerItemID:he?j:m,assignmentID:x,actionID:G,caseID:he?ne:n,containerName:De,caseType:Fe,isModalAction:N,isFormValid:_e,isProcessAction:Ye},this.c11nEnv);Oe.context=he?j:m;let ft=pe(m),Qt=this.c11nEnv.getCaseSummary(),yr=Yt(Qt),Xt=ze.buildActionObject({caseID:n,containerItemID:m,cancelContext:ft},this.c11nEnv),un={};return N?(Xt.acTargetName=d.MODAL,Xt.isInCreateStage=yr,Xt.isModalAction=N,un={...Xt}):un={...Xt,acName:Z(this.c11nEnv.getContainerName(),Xt.context)},T({type:a,payload:{...c,contextName:u,saveActionPayload:Oe,cancelActionPayload:un,continueExecution:C}}),l}openProcessAction(e,r){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 n=this.c11nEnv.getValue(E.CASE_INFO.CASE_INFO_ID)||r.caseID;if(window.pms?.plugins?.c11n?.openProcessAction)return r.caseID=n,UV(window.pms.plugins.c11n.openProcessAction,e,r);let o=this.c11nEnv.getValue(E.CASE_INFO.ASSIGNMENT_ID)||r.assignKey,i=r.type,s={caseID:n,assignmentID:o,vcName:r.target,actionName:r?.name,assignKey:o,actionID:e,doDeleteCaseSummary:!0,processActionType:i,isProcessAction:!0,...r},a=eI,c=ze.buildActionObject(s,this.c11nEnv),l=this.c11nEnv.getContextName(),u=Ke(l)[0],p=ae.getRemoteHeaderByContext(l);if(!p&&u){let h=ut(u);h?.accessedOrder.forEach(S=>{(r.caseID||n)===h.items[S].key&&(p=ae.getRemoteHeaderByContext(h.items[S].context))})}w.setRemoteCaseHeaderByContext(c,p);let{promise:m}=this.actionsApiPromise(a,c),{containerItemID:f}=qd(l,n,u);return T({type:a,payload:{...c,saveContainerItemID:f}}),m}navigateToStep(e,r){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(!r)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if(typeof r!="string")return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));let n=eS,o=this.c11nEnv.getValue(E.NEXT_ASSIGNMENT_INFO_ID)?this.c11nEnv.getValue(E.NEXT_ASSIGNMENT_INFO_ID):this.c11nEnv.getValue(E.CASE_INFO.ASSIGNMENT_ID),i=Yt(this.c11nEnv.getCaseSummary()),s=this.c11nEnv.getValue(E.CASE_INFO.CASE_INFO_ID),a={ID:o,stepID:e,acTargetName:this.c11nEnv.getContainerName(),targetContainerName:this.c11nEnv.getContainerName(),containerItemID:r,doDeleteCaseSummary:!0,isInCreateStage:i,caseID:s};r&&r.includes(d.MODAL)&&(a.acTargetName=d.MODAL);let c=ze.buildActionObject(a,this.c11nEnv),{promise:l}=this.actionsApiPromise(n,c),u=pe(r);return T({type:n,payload:{...c,containerItemID:r,context:u}}),l}cancelAssignment(e,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));let{CASE_INFO:n}=E,o=Ui,i=pe(e),s=e&&e.includes(d.MODAL),a=this.c11nEnv.getCaseSummary(),c=Yt(a),l=this.c11nEnv.getValue(d.getProperty(n.CASE_INFO_ID)),u=this.c11nEnv.getValue(n.ASSIGNMENT_ID),p=ze.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:Z(this.c11nEnv.getContainerName(),p.context)};let{promise:f}=this.actionsApiPromise(o,p);return T({type:o,payload:m}),f.then(()=>{r||iI({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:r}=E,n=e,o=eu,i=e&&e.includes(d.MODAL),s=this.c11nEnv.getValue(r.CASE_INFO_ID),a=ze.buildActionObject({caseID:s,containerItemID:e,context:n},this.c11nEnv);if(!xr(n))return new Bd(this.c11nEnv).removeContainerItem({containerItemID:e}).then(()=>{Iu(s),iI({caseID:s,context:this.c11nEnv.getContextName()})});T({type:o,payload:{...a,isModalAction:i}});let{promise:l}=this.actionsApiPromise(o,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:r}=E,n=eu,o=e,i=o&&o.includes(d.MODAL),s=this.c11nEnv.getCaseSummary(),a=this.c11nEnv.getValue(d.getProperty(d.CASE_INFO.CASE_TYPE_ID)),c=Yt(s),l=this.c11nEnv.getValue(d.getProperty(r.CASE_INFO_ID)),u=ze.buildActionObject({caseID:l,containerItemID:e,context:o},this.c11nEnv),p=this.c11nEnv.getValue("isProcessAction","isProcessAction"),m=v.isCoexistenceAppOfType(d.APP_TYPE.UIKIT);u.isProcessAction=p;let f=v.getRenderingMode();if(c&&(i||m||f==="EMBED")&&!_c(s)){let S=this.c11nEnv.getValue(d.getProperty(d.CASE_INFO.IS_FIRST_ASSIGNMENT)),A=xr(o);if(this.shouldDeleteCaseInCreateStage(A,S,m)){let C=!!B.isExternalObject(a);return this.deleteCaseInCreateStage(e,C)}T({type:n,payload:{...u,isModalAction:i,isChildCase:LU(s),isInCreateStage:c}})}let{promise:h}=this.actionsApiPromise(n,u);return h.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 r=Ii,n=this.getSaveActionPayload(e,!0),{promise:o}=this.actionsApiPromise(r,n);return Ct.executeOrQueueDeferredAction(ul(n)),o}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 r=Ii,n=this.getSaveActionPayload(e),{promise:o}=this.actionsApiPromise(r,n);return T(ul(n)),o}deleteCaseInCreateStage(e,r=!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 n=vh,o=e,i=o&&o.includes(d.MODAL),s=this.c11nEnv.getValue(d.getProperty(E.CASE_INFO.CASE_INFO_ID)),a=this.c11nEnv.getValue(d.getProperty(E.CASE_INFO.CASE_TYPE_ID)),c=ze.buildActionObject({caseID:s,caseType:a,containerItemID:e,context:o,ignoreCaseDeletion:r},this.c11nEnv),l=this.c11nEnv.getValue("isProcessAction","isProcessAction"),u=this.c11nEnv.getValue(d.getProperty(E.CASE_INFO.PARENTCASEINFO));c.isProcessAction=l,c.parentCaseInfo=u;let p=`${d.APP.APP}/${ge.PRIMARY}`,m=st(p,ge.PRIMARY);c.parentContext=m,i&&(c.targetName=d.MODAL,c.containerName=ge.MODAL,c.isModalAction=i),T(CV(c));let{promise:f}=this.actionsApiPromise(n,c);return f.then(()=>{iI({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:r}=ye.getRestEndPoint("getRecents")||{};r=`${r}?maxResultsToFetch=${e}`;let n=gt.getServerURL()+r;return M(n,{method:"GET",headers:{}})}updateRecents(e,r,n,o){let{restApi:i}=ye.getRestEndPoint("updateRecents")||{},s=`${gt.getServerURL()}${i}`;return M(s,{method:"PATCH",headers:{"Content-Type":"application/json"},body:{pyLabel:n,pyID:r,classID:e,ID:o}})}logout(){let{restApi:e}=ye.getRestEndPoint("Logout")||{},r=`${gt.getServerURL()}${e}`;return M(r,{method:"GET",headers:{}}).then(n=>(Object.keys(be.rootNodes).forEach(o=>{xh.cleanCaches(o)}),be.rootNodes={},sessionStorage.clear(),ys(),Promise.resolve(n)))}invoke(e,r={}){let n={method:r.method||"GET",body:r.body};return M(e,n,this.c11nEnv.getContextName())}showCasePreview(e,r={}){this.loadView(e,P.getDefaultQualifiedName("pyCasePreview"),{container:ge.PREVIEW,containerName:ge.PREVIEW,context:E.APP.APP,...r})}showDataPreview(e,r,n){return e?typeof e!="string"?Promise.reject(new TypeError("dataContext must be string")):r?typeof r!="object"?Promise.reject(new TypeError("dataContextParameters must be an object")):this.showData(P.getDefaultQualifiedName("pyDataPreview"),e,r,{container:ge.PREVIEW,containerName:ge.PREVIEW,context:E.APP.APP,...n||{},skipSemanticUrl:!0}):Promise.reject(new Error("dataContextParameters is required parameter")):Promise.reject(new Error("dataContext is required parameter"))}loadView(e,r,n){let o=ze.buildActionObject({caseId:e,viewName:r,caseClassName:this.c11nEnv.getValue(d.getProperty(E.CASE_INFO.CASE_TYPE_ID)),RemoteSystemID:ae.getRemoteHeaderByContext(this.c11nEnv.getContextName())},this.c11nEnv);n||(n={containerName:this.c11nEnv.getContainerName(),updateData:!1}),n&&typeof n=="object"?(Object.hasOwn(n,"container")&&!Object.hasOwn(n,"containerName")&&(n.containerName=n.container),o={...o,...n}):o={...o,containerName:this.c11nEnv.getContainerName()};let i=Kl,{promise:s}=this.actionsApiPromise(i,o,!1);return T({type:i,payload:{...o}}),s}showPage(e,r,n={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(!r)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if(typeof r!="string")return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(window.pms?.plugins?.c11n?.showPage)return window.pms.plugins.c11n.showPage(e,r,n);let o=ze.buildActionObject({viewName:e,className:r},this.c11nEnv),i=Nr,{promise:s}=this.actionsApiPromise(i,o);return Tr.getPreviewMode()&&(o.debugInfo={debugId:g.generateUniqueID()}),T({type:i,payload:{...o,...n,containerName:n.containerName||this.c11nEnv.getContainerName(),skipSemanticUrl:n.skipSemanticUrl}}),s}showInsight(e,r={}){if(!e)return Promise.reject(new Error(this.MSG_INSIGHTID_REQUIRED));let n=ze.buildActionObject({},this.c11nEnv),o=Qy,{promise:i}=this.actionsApiPromise(o,n);return T({type:o,payload:{...n,containerName:this.c11nEnv.getContainerName(),skipSemanticUrl:r.skipSemanticUrl||!1,insightID:e}}),i}showDashboard(e,r={}){if(!e)return Promise.reject(new Error(this.MSG_DASHBOARDID_REQUIRED));let n=ze.buildActionObject({},this.c11nEnv),o=Xy,{promise:i}=this.actionsApiPromise(o,n);return T({type:o,payload:{...n,containerName:this.c11nEnv.getContainerName(),skipSemanticUrl:r.skipSemanticUrl||!1,dashboardID:e}}),i}showData(e,r,n,o={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(!r)return Promise.reject(new Error("dataContext is required parameter"));if(typeof r!="string")return Promise.reject(new TypeError("dataContext must be string"));let i=ze.buildActionObject({pageName:e,dataContext:r,dataContextParameters:n,RemoteSystemID:ae.getRemoteHeaderByContext(this.c11nEnv.getContextName())},this.c11nEnv),s=uc;o?.containerName||(o.containerName=v.getRenderingMode()==="HYBRID"?dl.getRuntimeParam(d.HYRBID_ROOT_CONTAINERNAME):Bt.getTargetViewContainerName(s));let{promise:a}=this.actionsApiPromise(s,i);return T({type:s,payload:{...i,...o,skipSemanticUrl:!!o.skipSemanticUrl}}),a}changeHandler(e,r){ze.changeHandler(e,r)}eventHandler(e,r){ze.eventHandler(e,r)}triggerFieldChange(e,r,n=!1,o={skipDirtyValidation:!1,skipPageInstructionGeneration:!1}){let i=this.c11nEnv.getContextName(),s=this.c11nEnv.getPageReference(),a=J.getContextPath(s,e);n||this.c11nEnv.getValidationApi().validate(r),this.c11nEnv.isInsideList()&&!o.skipPageInstructionGeneration&&this.c11nEnv.getListActions().updateProperty(e,r,o);let c=this.c11nEnv.getValue(d.CLASS_ID),l=e?e.split(".").filter(u=>!!u):[];l.length>1&&(l.pop(),c=re(`.${l.join(".")}.classID`,s,i)),e=g.trimDotForProperty(e),T({type:vn,payload:{reference:a,value:r,context:i,pageReference:this.c11nEnv.getPageReference(),propertyName:e||this.c11nEnv.getComponentConfig().value,classID:c}})}updateFieldValue(e,r,n={}){let{removePropertyFromChangedList:o=!1,isArrayDeepMerge:i=!0,contextPageReference:s="",isListEntry:a=!1,skipDirtyValidation:c=!1,associatedProperty:l,skipPageInstructionGeneration:u=!1}=n,p=this.c11nEnv.getContextName(),m=this.c11nEnv.getPageReference(),f=s?.startsWith(m)?s.replace(m,""):s;m=s||m;let h=J.getContextPath(m,e),S=!1;this.c11nEnv.isInsideList()&&!u&&this.c11nEnv.getListActions().updateProperty(f?`${f}${e}`:e,r,{isArrayDeepMerge:i,skipDirtyValidation:c}),this.c11nEnv.isBulkAction()&&(S=!0),e||(e=this.c11nEnv.getStateProps().value),dt({type:E.MESSAGES.MESSAGES_TYPE_ERROR,property:e,pageReference:m,context:p,isListEntry:a}),T({type:_t,payload:{reference:h,value:r,context:p,isArrayDeepMerge:i,skipDirtyValidation:c,...S&&{isStrictTracking:S},...o&&{removePropertyFromChangedList:o},...l&&{associatedProperty:`${m}${l}`}}})}activateModalContainerItem(e){let r=iS,{context:n}=e,o=n&&n.includes(d.MODAL),i=ze.buildActionObject({...e,containerName:this.c11nEnv.getContainerName(),containerItemID:n},this.c11nEnv);o&&(i.containerName=d.MODAL,i.isModalAction=o),T({type:r,payload:i});let{promise:s}=this.actionsApiPromise(r,i);return s}refreshCaseView(e,r,n,o={}){let{promise:i,actionMgrID:s}=this.actionsApiPromise("REFRESH_DATA"),{autoDetectRefresh:a,propertyName:c,preserveClientChanges:l,classID:u,context:p,optionalPayload:m,isArrayDeepMerge:f}=o,h={actionMgrID:s,caseViewAction:!0,preserveClientChanges:l,propertyName:c,classID:u,isArrayDeepMerge:f,optionalPayload:m};o.refreshFor&&(h.refreshFor=o?.refreshFor),o.resetForm&&(h.resetForm=o?.resetForm),o.skipPayloadGeneration&&(h.skipPayloadGeneration=o?.skipPayloadGeneration);let S=p||this.c11nEnv.getContextName(),A=this.c11nEnv.getPageReference(),C=this.c11nEnv.getValue(d.CONTEXT_DATA_MODAL_VIEW.CONTEXT_DATA_MODAL_VIEW),{isMultiRecordData:_,editType:I}=C||{};if(a&&_&&I===d.ACTION){let N=this.c11nEnv.getValue(E.CASE_INFO.ASSIGNMENT_ID),{actionID:x,interestPage:H,interestPageActionID:G,isLocalAction:ne}=C;vu(e,N,x,S,H,G,ne,_,I,h)}else!_&&a&&(kU(S,A)||bc(S,A))?Ru(S,n,h):Dc(e,r,S,n,h);return i}refreshEmbeddedDataWithAction(e,r,n,o,i,s,a,c,l={}){let{promise:u}=this.actionsApiPromise(jt.REFRESH_DATA),p=this.c11nEnv.getContextName();return vu(e,r,n,p,o||this.c11nEnv.getPageReference(),i,s,a,c,l),u}openEmbeddedDataModal(e,r,n,o,i,s,a,c,l=!1,u=E.MODAL){let p=Bi,m=r.getCaseInfo().getKey(),{localAction:f,assignmentID:h,actionID:S}=jse(r,a),A=r.getPageReference(),C=typeof o=="string"?`${r.getPageReference().replace(d.getProperty(E.CASE_INFO.CASE_INFO_CONTENT),"")}${n}.${o}`:`${r.getPageReference().replace(d.getProperty(E.CASE_INFO.CASE_INFO_CONTENT),"")}${n}[${o}]`;A.startsWith(E.OBJECT_INFO.OBJECT_INFO)&&!m&&(m=r.getCaseInfo().getObjectKey(),C=`${r.getPageReference().replace(E.OBJECT_INFO.OBJECT_INFO_CONTENT,"")}${n}[${o}]`);let _=r.getMetadata(),I=Array.isArray(_?.config?.children)?_.config.children[0]?.children||[]:[],N={readOnly:l,targetProperty:n,index:o,viewID:e,ID:m,actionType:i,interestPage:g.convertPageRefToClipboardPageNotation(C),heading:s,editType:a,interestPageActionID:a===d.ACTION?c:void 0,actionID:S,isLocalAction:f,operationFlag:d.EMBEDDED_DATA_MODAL.SHOW_ROW,isPageGroup:typeof o=="string",assignmentID:!f&&a===d.ACTION?h:void 0,columns:I},x=ze.buildActionObject(N,this.c11nEnv);if(a===d.ACTION){let ne=g.getETag(x.context);x.headers={"If-Match":ne}}let{promise:H}=this.actionsApiPromise(p,x);return v.getFeatureMap().granularUIRefresh&&I.forEach(ne=>{let j=fe.trimAnnotation(ne.config.value),oe=lt(j.startsWith(".")?j.replace(".",""):j,ne.config.classID);oe&&!Array.isArray(oe)&&oe.isDeclarativeTarget&&be.addFieldNode(r.getContextName(),A+C,r.viewName??"",j,"",{isDeclarativeTarget:!0,propertyName:j,pageReference:A+C})}),T({type:p,payload:{...x,containerName:u,skipSemanticUrl:!0}}),H}getEmbeddedDataView(e,r,n,o,i,s="",a="",c=!1,l=""){let u=hS,p=r.getCaseInfo().getKey(),m=r.getValue(E.CASE_INFO.IS_LOCAL_ACTION),f=r.getValue(E.CASE_INFO.ASSIGNMENT_ID),h=jV(r,s,m),S=r.getPageReference(),A=typeof o=="string"?`${r.getPageReference().replace(d.getProperty(E.CASE_INFO.CASE_INFO_CONTENT),"")}${n}.${o}`:`${r.getPageReference().replace(d.getProperty(E.CASE_INFO.CASE_INFO_CONTENT),"")}${n}[${o}]`;S.startsWith(E.OBJECT_INFO.OBJECT_INFO)&&!p&&(p=r.getCaseInfo().getObjectKey(),A=`${r.getPageReference().replace(E.OBJECT_INFO.OBJECT_INFO_CONTENT,"")}${n}[${o}]`);let C={readOnly:c,targetProperty:n,index:o,viewID:e,ID:p,actionType:i,interestPage:g.convertPageRefToClipboardPageNotation(A),editType:s,interestPageActionID:s===d.ACTION?a:void 0,actionID:h,isLocalAction:m,operationFlag:d.EMBEDDED_DATA_MODAL.SHOW_ROW,isPageGroup:typeof o=="string",assignmentID:!m&&s===d.ACTION?f:void 0,containerName:l},_=ze.buildActionObject(C,this.c11nEnv);if(s===d.ACTION){let N=g.getETag(_.context);_.headers={"If-Match":N}}let{promise:I}=this.actionsApiPromise(u,_);return T({type:u,payload:{..._,skipSemanticUrl:!0}}),I}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 r=yS,n=this.c11nEnv.getValue(d.getProperty(E.CASE_INFO.CASE_INFO_ID)),o=this.c11nEnv.getValue(d.getProperty(E.CASE_INFO.ASSIGNMENT_ID)),i=this.c11nEnv.getPageReference().replace(d.getProperty(E.CASE_INFO.CASE_INFO_CONTENT),""),s=pe(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(E.OBJECT_INFO.OBJECT_INFO)&&!n&&(n=this.c11nEnv.getValue(E.OBJECT_INFO.OBJECT_INFO_ID),i=this.c11nEnv.getPageReference().replace(E.OBJECT_INFO.OBJECT_INFO_CONTENT,"")),dt({context:s,stateObj:W(s),clearContextMessages:!0});let h={containerItemID:e,containerName:this.c11nEnv.getContainerName(),doDeleteCaseSummary:!0,isInCreateStage:!1,ID:n,viewID:m,isFormValid:Dr(s),interestPage:g.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:o};e&&e.includes(d.MODAL)&&(h.containerName=d.MODAL,h.isModalAction=!0);let S=ze.buildActionObject(h,this.c11nEnv);if(l===d.ACTION){let C=g.getETag(S.context);S.headers={"If-Match":C}}let{promise:A}=this.actionsApiPromise(r,S);if(xr(s)){let[C,_,I]=Wi.getPageListNameAndIndexFromPageName(this.c11nEnv.getPageReference());be.mutatePageList(f,C,_,{type:Wn,rowIndex:I}),T({type:Wn,payload:{pageReference:this.c11nEnv.getPageReference(),context:f,isListEntry:!0}})}return Ct.executeOrQueueDeferredAction({type:r,payload:{...S,context:s}}),A}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 r=pe(e),n=this.c11nEnv.getPageReference(),{promise:o,actionMgrID:i}=this.actionsApiPromise(fc);return Ru(r,n,{actionMgrID:i,isFillFormWithAI:!0,preserveClientChanges:!1}),o}handleSubscript(e,r){if(!$a(E.VIEW_NAMES.SUBSCRIPT_CREATE_VIEW))return Promise.reject(new Error(this.MSG_SUBSCRIPT_VIEW_REQUIRED));let o=SS,i=ze.buildActionObject({containerItemID:e},r);T({type:o,payload:{...i,isDataObject:!0,skipReleaseLockRequest:!0,isFormValid:Dr(e),context:e}});let{promise:s}=this.actionsApiPromise(o,i);return s}showSubscriptCreateView(e,r,n,o=E.VIEW_NAMES.SUBSCRIPT_CREATE_VIEW){let i=ze.buildActionObject({viewName:o,className:e,referenceListStr:r,subscriptName:n},this.c11nEnv),s=Nr,{promise:a}=this.actionsApiPromise(s,i);return T({type:s,payload:{...i,containerName:E.MODAL,skipSemanticUrl:!0,isCreateDataObject:!0}}),a}deleteWork(e,r,n){if(!e)return Promise.reject(new Error("workId is required parameter"));let o=rb,i=B.isExternalCaseType(r),s=ze.buildActionObject({workId:e,caseTypeID:r,isExternalCase:i,...n?.skipDeleteConfirmation&&{skipDeleteConfirmation:!0},...n?.enableBackNavigation&&{enableBackNavigation:!0}},this.c11nEnv),{promise:a}=this.actionsApiPromise(o,s);return T(Bx({...s})),a}deleteDataRecord(e,r){if(!e)return Promise.reject(new Error("className is required parameter"));if(!r)return Promise.reject(new Error("keys is required parameter"));let n=rb,o=ze.buildActionObject({className:e,keys:r},this.c11nEnv),{promise:i}=this.actionsApiPromise(n,o);return T(Bx({...o})),i}},zV=hD;var yD=class{c11nEnv;constructor(e){this.c11nEnv=e}getContextKey(){return this.c11nEnv.getValue(d.getProperty(d.DATA_INFO.DATA_INFO_CONTEXT_KEY))}},FV=yD;var sI=class{fieldType;constructor(e){this.fieldType=e}applyFallback(e){let r=en.getDefaultsforType(this.fieldType);e.currencyISOCode=e.currencyISOCode||r?.currencyISOCode||"USD"}};var aI=class{static getStrategy(e){switch(e){case"Currency":case"Decimal":case"Integer":case"Percentage":return new sI(e);default:return}}};var Cn={DATAPAGE:"DATAPAGE",VIEW:"VIEW",FIELD:"FIELD",CASE:"CASE",PARAGRAPH:"PARAGRAPH",PORTAL:"PORTAL"};var VV=/[\\^$.*+?()[\]{}|]/g,zse=RegExp(VV.source);function Fse(t){return t=Gy(t),t&&zse.test(t)?t.replace(VV,"\\$&"):t}var BV=Fse;var Vse=/\{(\d+)\}/,Bse=t=>{let e=t.split(Vse),r=[],n=new Map,o="",i=0;return e.forEach((s,a)=>{if(a%2===0){o+=BV(s),i+=s.length;return}let c=Number(s),l=n.get(c);if(l!==void 0){o+=`\\${l}`;return}r.push(c),n.set(c,r.length),o+="(.+?)"}),{key:t,pattern:new RegExp(`^${o}$`),groupToPlaceholder:r,literalLength:i}},HV=(t,e)=>{if(!t)return;let r;for(let s of Object.keys(e)){let a=Bse(s),c=a.pattern.exec(t);c&&(!r||a.literalLength>r.template.literalLength)&&(r={template:a,captures:c.slice(1)})}if(!r)return;let{template:n,captures:o}=r,i=[];return n.groupToPlaceholder.forEach((s,a)=>{i[s]=o[a]}),{message:e[n.key],args:i}};var Ri=(t,e,r,n)=>{let o=[Cn.VIEW,Cn.FIELD,Cn.PARAGRAPH],s=[Cn.DATAPAGE,Cn.PARAGRAPH].includes(t)&&n?`#${n}`:"",a=t===Cn.DATAPAGE?"@BASECLASS":r;return t===Cn.DATAPAGE||o.includes(t)?`${a}!${t}!${e}${s}`.toUpperCase():`${t}!${e}${s}`.toUpperCase()},Wd=class t{locale;localeReference;static COMMON_LABELS="COMMONLABELS";static MESSAGES="MESSAGES";static COMPONENT_FIELDS="COMPONENTFIELDS";static CASE_HISTORY="CASEHISTORY";lookupList=[];constructor(e,r){this.localeReference=r,this.locale=e}getLocalizedText(e,r){let n=[...this.localeReference?[this.localeReference.toUpperCase()]:[],...this.lookupList,t.COMPONENT_FIELDS,t.COMMON_LABELS],o=this.#t(e,n)||e;return(r?this.#e(o,r):o)||e}getLocalizedMessage(e,r){let n=this.#t(e,[t.MESSAGES,t.COMMON_LABELS])??e;return(r?this.#e(n,r):n)||e}getLocalizedDataPage(e,r,n,o){if(!r||!n||!e)return e;let s=[Ri(Cn.DATAPAGE,r,void 0,n),t.COMMON_LABELS,...this.lookupList],a=this.#t(e,s)??e;return(o?this.#e(a,o):a)||e}getLocalizedCaseHistory(e){if(!e)return e;let r=vi(this.locale).localeStore[t.CASE_HISTORY];if(!r||Object.keys(r).length===0)return e;let n=HV(e,r);if(!n?.message)return e;let o=n.args.map(i=>this.getLocalizedText(i));return this.#e(n.message,o,!0)}#e(e,r,n=!1){if(r.length===0)return e;let o=n?0:1;return e.replace(/\{(\d+)\}/g,(i,s)=>r[`${Number(s)-o}`]??i)}#t(e,r=this.lookupList){if(r.length===0)return;let n=vi(this.locale);for(let o of r){let i=this.#r(e,n.localeStore[o]);if(i)return i}}#r(e,r={}){let n=r[e];if(typeof n=="string")return n}setLookupList(e){Array.isArray(e)&&(this.lookupList=e)}};var SD=class{_dataSourceMap;constructor(){this._dataSourceMap={}}hasContextName(e){return e in this._dataSourceMap}addContextName(e,r){r&&Object.keys(r).length>0?this._dataSourceMap[e]=r: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,r,n){if(this.hasContextName(e)){let o=this.getContextObjectByName(e);if(o)if(Array.isArray(n))o[r]=n;else{let i=o[r];o[r]=[...new Set([...i,n])]}}else{let o={};Array.isArray(n)?o[r]=n:o[r]=[n],this.addContextName(e,o)}}deletePropertyInContext(e,r){if(this.hasContextName(e)){let n=this.getContextObjectByName(e);n&&r in n&&delete n[r]}}getPropertyFromContext(e,r){if(this.hasContextName(e)){let n=this.getContextObjectByName(e);if(n&&r in n)return n[r]}return[]}getDependencies(e,r){let n=this.getPropertyFromContext(e,r),o=new Set(n);return n.forEach(i=>{o.add(i)}),[...o]}},ka=new SD;var ED={};Wt(ED,{fetchViewResources:()=>Dh,refreshViewByName:()=>Gse,updateViewResources:()=>cI});var cI=async t=>{let e=Le(t),r=g.getIn(e,d.COMPONENTS);Yi(e,{},!0),await go(r)},Dh=(t,e,r)=>J.resolveView(t,e,r),GV=(t,e,r,n)=>{let o=t[e];if(!o)return!1;let i=g.getIn(o,E.CASE_INFO.CASE_INFO_CLASSID);return g.getIn(o,d.CASE_INFO.VIEW_NAME)===r&&(!n||i===n)},qV=t=>{let{accessedOrder:e,items:r}=t;if(!e||!r)return null;let n=e[e.length-1];return n?r[n]?.context??null:null},Hse=(t,e)=>{let r=we();if(!r)return null;let n=r.getState(),{data:o,containers:i}=n;if(!i||!o)return null;let s=`${E.APP.APP}/primary`;if(i[s]){let a=qV(i[s]);if(a&&GV(o,a,t,e))return a}for(let a of Object.keys(i)){if(a===s)continue;let c=qV(i[a]);if(c&&GV(o,c,t,e))return c}return null},Gse=(t,e="",r="")=>{let n=r||null;if(!n){let a=`${E.APP.APP}/primary`;n=Hse(t,e),n||(n=Ar(a))}if(!n)return Promise.reject(new Error(`Unable to find an active context for view "${t}".`));let o=W(n);if(!o)return Promise.reject(new Error(`No data found for context "${n}".`));let i=g.getIn(o,E.CASE_INFO.CASE_INFO_ID)||"",s=ct({options:{context:n,pageReference:E.CASE_INFO.CASE_INFO_CONTENT}});return AD(),s.getPConnect().getActionsApi().refreshCaseView(i,t,"",{autoDetectRefresh:!0,preserveClientChanges:!1}).finally(()=>{CD()})};var ID=class{meta;datasource;options;index;datasourceObj;constructor(e,r,n){this.meta=e,this.datasource=r,this.index=0,this.options=n,this.datasourceObj=J.getPropertyValue(r,n.pageReference,n.context)}hasNext(){return this.index<this.datasourceObj.length}next(){if(!this.hasNext())throw new Error("No Children");let e=J.getContextPath(this.datasource,this.index);return this.index+=1,ct({meta:this.meta,options:{...this.options,pageReference:e}})}resetIndex(){this.index=0}},_D=ID;var bD=class{children;options;index;constructor(e,r){this.children=e,this.index=0,this.options=r}hasNext(){return this.index<this.children.length}next(){if(!this.hasNext())throw new Error("No Children");let e=this.index,r=this.children[e];this.index+=1;let n=r?._relativePath??`${this.options?.relativePath??""}.children[${e}]`;return ct({meta:r,index:this.index,options:{...this.options,relativePath:n}})}resetIndex(){this.index=0}},qse=(t,e)=>{let r=!!t?.repeat;if(!!t?.["repeat-self"])return new _D(t,t.context||"",e);if(r){let o=La(`${e.context}.${d.SUMMARY_OF_LISTS}`,t.pageReference,e.context);return new _D(t.children[0],o||t.context,e)}if(t?.children)return new bD(t.children,e)},WV=qse;var pl=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,r){let n=[];if(e&&["portal","view"].includes(r)){let{accessedOrder:o,items:i}=e;if(o&&i){let s=o[o.length-1];i[s]&&i[s].view&&Object.keys(i[s].view).length>0&&n.push(i[s])}}return n}static getDependentProperties=e=>{let r=[];return e._rawConfig?.config?.parameters?r=Object.values(e._rawConfig?.config?.parameters||{}):e.getFieldMetadata(e.getStateProps()?.value)?.datasource?.parameters&&(r=(e.getFieldMetadata(e.getStateProps()?.value)?.datasource?.parameters||[]).map(n=>n?.value)),r.filter(n=>Ir.isProperty(n)).map(n=>Ir.getPropertyName(n))}},Wse=new pl;Object.freeze(Wse);var TD,lI=(t,e,r)=>{t&&(Object.keys(t).forEach(n=>{if(n!=="children"){let o=t[n],i=fe.trimAnnotation(o);if((typeof i=="string"||typeof o=="string")&&(g.isValidAnnotation(o)&&g.isPropertyRef(i)||o.startsWith("@W ")||o.startsWith("@DW ")||o.startsWith("@E ")||o.startsWith("@PARAGRAPH ")||o.startsWith("@ATTACHMENT ")))r&&r.parentKey&&(r.isObjHasValue=!0),o.startsWith("@PARAGRAPH ")?e[n]=o:e[n]=i;else if(Array.isArray(i))i.forEach((s,a)=>{let c={parentStateObj:e,parentKey:n,isObjHasValue:!!e[n]};e[n]=e[n]||[],e[n][a]=Object.create({}),lI(s,e[n][a],c)});else if(i&&typeof i=="object"&&i.type!=="exp"){let s={parentStateObj:e,parentKey:n,isObjHasValue:!!e[n]};e[n]=e[n]||{},lI(i,e[n],s)}}}),r&&!r.isObjHasValue&&delete r.parentStateObj[r.parentKey])},KV=(t,e)=>{t._inheritedProps=t._inheritedProps||[],t.inheritedProps=[...t._inheritedProps,...g.deepClone(e.inheritedProps)]},sa=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:r,isRoot:n,options:o={},useCustomContext:i}=e;this.meta=r,this._isRoot=n,this.options=o,this.useCustomContext=i,this._rawConfig=r?.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=o.viewName,this.parentViewName=o.viewName??"",this._referenceList=o.referenceList||"",this._isInsideList=o.isInsideList||!1,this._inheritedConfig={},this._localeRuleName=o.localeReference,this._containerTarget=o.target,this._readOnly=r?.config?.readOnly||o.readOnly,this._hasSuggestions=!1,this._actionsApi=null,this._classID=null,this.index=e.index,this.categoryName=o.categoryName||"",this._relativePath=o.relativePath??"",o.inheritedConfig&&Object.keys(o.inheritedConfig).length>0&&(this._inheritedConfig=g.deepClone(o.inheritedConfig)),r?.config?.inheritedProps&&KV(this._inheritedConfig,r?.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=oi.formatePageReferenceToArrayIndex(this.meta.config.value)),lI(this._rawConfig,this._stateProps),this._isState=!g.isObjectEmpty(this._stateProps),this._rawConfig&&this._rawConfig.config&&(this._isExpressionExist=g.isExpressionExist(this._rawConfig.config),this._isWhenExist=g.isWhenExist(this._rawConfig.config),this._isValidatorExist=Dt.isValidatorExist(this._rawConfig.config)),this._isRoot?this._contextName=E.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=fe.handleAnnotation(this.options.pageReference,this)),this._pageReference=J.getContextPath(s||this.options.parentPageReference,this._pageReference),this._pageReference||(this._pageReference=""),this._type==="reference"&&(this._rawConfig=r);let a=this._type==="reference"&&g.isWhenExist({visibility:this.meta?.config?.visibility}),c=this._checkAndSetDecisionParagraph("instructions",this._rawConfig?.instructions),l=!1;if(this._type!=="reference"&&r&&(this._rawConfig=J.resolveReference(r,this)),this._rawConfig){let u=this.getRawConfigProps();u&&(this._localeRuleName=fe.trimAnnotation(u.localeReference)||o.localeReference,this._isExpressionExist=g.isExpressionExist(u),this._isWhenExist=g.isWhenExist(u),this._isValidatorExist=Dt.isValidatorExist(u),l=this._checkAndSetDecisionParagraph("label",u?.label)),this._children=this._rawConfig.children,this._rawConfig?.type?.toLowerCase()===d.VIEW&&this._rawConfig.name&&(this.viewName=fe.handleAnnotation(this._rawConfig.name,this)),this.options.hasForm&&sj(this)}(a||c||l)&&gE(this.viewName,this._contextName,this._pageReference)}_checkAndSetDecisionParagraph(e,r,n){let o=!1;if(r&&r.startsWith(d.PARAGRAPH_ANNOTATION)){let i=fe.trimAnnotation(r);o=So.isDecisionParagraph(i,n??this.getCurrentClassID()),o&&this.setStateProps({[e]:r})}return o}isDeclarativeTarget(){let e=!1;if(this.getValue(this._pageReference)||this._pageReference===""){let r=fe.trimAnnotation(this.getPropertyName());e=this.getFieldMetadata(r)?.isDeclarativeTarget||!1}return e}_getPropertyName(){let e=fe.trimAnnotation(this.getPropertyName());return this._pageReference===""&&e.startsWith(".")?e.substring(1,e.length):e}addFieldNode(){let e=this._getPropertyName(),{value:r,contextPage:n,label:o,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 h=this._type==="Address"&&this._rawConfig?.config?.associatedView?fe.trimAnnotation(this._rawConfig.config.associatedView):"",S=o||u,A=this._rawConfig?.type,C={target:this._containerTarget,context:this._contextName,pageReference:this._pageReference,propertyName:fe.trimAnnotation(r),label:S?.startsWith("@")?fe.handleAnnotation(S,this,void 0):S,required:i,readOnly:s,disabled:a,visibility:c||this.options?.visibility,skipRequiredValidation:this.options?.isBulkAction,inheritedProps:this.getInheritedProps(),useCustomContext:this.useCustomContext,value:r,validationType:l,...n&&{contextPageRef:`${this._pageReference}${fe.trimAnnotation(n)}`},componentName:A,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,(h||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||"",fe.trimAnnotation(this.getPropertyName()),this.index);else if(this._type==="Address"&&this._rawConfig?.config?.associatedView)be.removeViewNode(this._contextName,this._pageReference,fe.trimAnnotation(this._rawConfig.config.associatedView),this.index);else{let e=this._rawConfig?.config?.context?`${this._pageReference}${this._rawConfig?.config.context}`:this._pageReference,n={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,n)}}addViewNode(){if(!this.isReadOnly()){if(this._rawConfig?.type?.toLowerCase()===d.VIEW&&this._rawConfig.name&&this.viewName){let r={visibility:this.options?.visibility??this._rawConfig.config?.visibility??this._rawConfig.config?.referenceVisibility};be.addViewNode(this._contextName,this._pageReference,this.viewName,this.parentViewName,r)}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,fe.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="",r="",n=g.getWhenNames(this._rawConfig?.config),o=this.getRawConfigProps();if(o?.type&&o?.type?.toLowerCase()===d.VIEW)r=d.CONTEXT_TREE_NODE_TYPES.VIEW,e=this.getCurrentView();else{r=d.CONTEXT_TREE_NODE_TYPES.FIELD;let i=this.getPropertyName();e=fe.isProperty(i)?fe.trimAnnotation(i):""}e&&n.forEach(i=>{be.addWhenNode(this.getContextName(),this.getPageReference(),r,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:r,required:n,contextPage:o,readOnly:i,disabled:s,visibility:a,validationType:c,selectionMode:l,selectionList:u,selectionKey:p,referenceList:m,renderMode:f,caption:h,uniqueField:S}=this.getRawConfigProps(),A=r||h,C=[];["Multiselect","Checkbox"].includes(this._rawConfig.type)&&(C=this.getSelfReferencingDatapageKeys()),be.addPageListNode(this._contextName,this._pageReference,this.viewName??"",fe.trimAnnotation(this.getPropertyName()),{target:this._containerTarget,context:this._contextName,pageReference:this._pageReference,propertyName:fe.trimAnnotation(this.getPropertyName()),label:A?.startsWith("@")?fe.handleAnnotation(A,this,void 0):A,required:n,readOnly:i,disabled:s,...o&&{contextPageRef:`${this._pageReference}${fe.trimAnnotation(o)}`},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:S,selfReferencingDatapageKeys:["Multiselect","Checkbox"].includes(this._rawConfig.type)?C:void 0});let _=this.getValue(fe.trimAnnotation(this.getPropertyName()),this._pageReference)||[];be.updatePageListNode(this._contextName,this._pageReference,fe.trimAnnotation(this.getPropertyName()),_.length)}this.isWhenExist()&&this.addWhenNode(),this.isVisible()||this.removeNode()}getStateProps(){return this._stateProps}setStateProps(e){g.mergeDeep(e,this._stateProps)}getMetadata(){return this._rawConfig}getSharedDataPageForReferenceList(){let e=this.getCaseInfo().getClassName(),r=this.getCurrentView();if(!r||!e)return;let n=Dh(r,this,e);if(!n)return;let o=this.getRawMetadata()?.config?.referenceList;if(!o)return;let i={};typeof n.config?.parameters=="object"&&n.config.parameters!==null&&(i=n.config.parameters);let s=g.generateDataPageHashWithParameters(i,o,this),a=jo(),c=a?a[o]?.[s]:{};return Array.isArray(c?.[P.getDefaultQualifiedName("pxResults")])?c[P.getDefaultQualifiedName("pxResults")]:void 0}getParameterizedDataPageFieldValue(e,r){return this._dpResolver??=new fE(this),this._dpResolver.resolve(e,r)}getCaseInfo(){return this._caseInfo||(this._caseInfo=new oE(this)),this._caseInfo}getDataInfo(){return this._dataInfo||(this._dataInfo=new FV(this)),this._dataInfo}getCaseLocaleReference(e){let r=this.getRawConfigProps(),n=e||this.getValue(d.getProperty(d.CASE_INFO.CASE_TYPE_ID))||this.getValue(d.CLASS_ID,d.getProperty(d.DATA_INFO.DATA_INFO_CONTENT))||r?.referenceClass||r?.className;return n?Ri(Cn.CASE,n):null}getListActions(){return oU(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(),r;return e.selectionMode==="multi"?r="selectionList":e.selectionMode==="single"&&e.selectionKey?r="selectionKey":e.renderMode==="Editable"?r="referenceList":this._type==="Address"?r="addressProp":r="value",this.getComponentConfig()[r]}getFullReference(){let e=this.getPageReference(),r=this.getPropertyName();return J.getContextPath(e,r)}getContextName(){return this._contextName}getContainerName(){let{type:e}=this.getMetadata()||{},r=[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:n=ge.PRIMARY,name:o,routingInfo:i}=this.getComponentConfig();return(e&&r.includes(e)||i==="@ROUTING_INFO")&&o?o:this.options.containerName||n}getTarget(){return this._containerTarget}getCurrentView(){return this.viewName}populateSuggestionProps(e){if(this._rawConfig?.config&&Object.hasOwn(this._rawConfig.config,"value")&&this.getStateProps()?.value&&this.options.hasForm){let r=Ee?.getStore()?.getState()?.data[`${this.getContextName()}/${d.SUGGESTION}`],n=this.getStateProps()?.value,o=J.getContextPath(this.getPageReference(),n),i=r?$n.getSuggestionsContext(this.getContextName()).getField(o):void 0;this._hasSuggestions=!!i,e.hasSuggestions=this._hasSuggestions,this._stateProps.hasSuggestions=this._hasSuggestions}}getConfigProps(e={}){let r={...en.getDefaultsforType(this._type),readOnly:this._readOnly,...this._rawConfig?.config,...this._additionalRegisteredProps,...this._inheritedConfig};return aI.getStrategy(this._type)?.applyFallback(r),this.populateSuggestionProps(r),this.resolveConfigProps(r,e),g.resolveStringBooleans(e)}getLocalizationService(e){let r=this.getComponentName(),n=e||(r==="View"?this._rawConfig?.config?.template:r),o=v.getLocale()??"en-US",i=new Wd(o,n),s=this.getCaseLocaleReference();return i.setLookupList(["APP!APPLICATION"]),s&&i.setLookupList([s]),i}getRawConfigProps(){let{_deepProps:e,...r}={...en.getDefaultsforType(this._type),...this._rawConfig?.config,...this._additionalRegisteredProps,...this._inheritedConfig};return this.populateSuggestionProps(r),r}resolveConfigProps(e,r={}){return e&&(J.resolveProps(e,r,this),fe.handleComponentMapping(r,{type:this.getComponentName()||"",config:e},this)),r}registerAdditionalProps(e={}){return Object.assign(this._additionalRegisteredProps,e),lI(e,this._stateProps),this.resolveConfigProps(this._additionalRegisteredProps)}deRegisterAdditionalProps(e=[]){return e.forEach(r=>{delete this._additionalRegisteredProps[r]}),!0}populateAdditionalProps(e){let r=a=>a?.map(c=>({...c,message:this.getLocalizationService()?.getLocalizedMessage(c.message)??c.message})),n=this.getComponentName(),o=this.getComponentConfig(),i=n===d.ROOT_CONTAINER&&e.renderingMode!=="portal";if(n===d.MODAL_VIEW_CONTAINER||n===d.CASE_CREATE_STAGE||n===d.OBJECTACTIONCONTAINER){let a=se(`${d.APP.APP}/${this.getContainerName()}`),c=qt({context:a,category:E.PAGE});e.pageMessages=r(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||fe.trimAnnotation(this.getRawConfigProps().selectionList):!a&&this.getComponentConfig()?.renderMode==="Editable"&&this.getStateProps().referenceList&&(a=this.getStateProps().referenceList);let c=qt({property:a,pageReference:this.getPageReference(),context:this.getContextName(),type:E.MESSAGES.MESSAGES_TYPE_ERROR}),l=qt({property:a,pageReference:this.getPageReference(),context:this.getContextName(),type:E.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(n===d.ROOT_CONTAINER){let a=XT(i,se(`${d.APP.APP}/${this.getContainerName()}`));e.httpMessages=Array.isArray(a)?r(a):a,this._stateProps.httpMessages=e.httpMessages;let c=$n.getSharedState("isLoggedOut");e.isLoggedOut=c,this._stateProps.isLoggedOut=c;let l=qt({context:d.APP.ROOT,category:"PAGE"});e.pageMessages=r(l),this._stateProps.pageMessages=e.pageMessages}if(n===d.HYBRID_VIEW_CONTAINER){let a=qt({context:d.APP.APP,category:d.HTTP});e.httpMessages=r(a),this._stateProps.httpMessages=a}if(n===d.APP_SHELL&&e.portalDocMode===d.CONTAINER_TYPE.MULTIPLE&&(e.activeCases=gn.getOpenedCaseItems(`${E.APP.APP}/${d.PRIMARY}`),this._stateProps.activeCases=e.activeCases),n===d.APP_SHELL){let a=d.APP.APP,c=se(`${a}/${this.getContainerName()}`),l=[...qt({context:a,category:"PAGE"})||[],...qt({context:c,category:"PAGE"})||[]],u=l.length>0?l:void 0;e.pageMessages=u&&r(u),this._stateProps.pageMessages=e.pageMessages}if(e.value&&n===d.SCALARLIST&&(this._stateProps.value=e.value),n===d.APP_SHELL||n===d.MODAL_VIEW_CONTAINER||n===d.CASE_CREATE_STAGE||o.template===d.CASE_PREVIEW||o.template===d.RULE_PREVIEW){let a=qt({context:d.APP.APP,category:"HTTP"}),c=v.getRenderingMode()==="HYBRID"?`${this.getContextName()}/${this.getContainerName()}`:`${d.APP.APP}/${this.getContainerName()}`,l=qt({context:se(c),category:"HTTP"});a?l&&(a=a.concat(qt({context:se(c),category:"HTTP"}))):a=qt({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(n===d.VIEW_CONTAINER||n===d.FLOW_CONTAINER||n===d.MODAL_VIEW_CONTAINER||n===d.PREVIEW_VIEW_CONTAINER||n===d.ROOT_CONTAINER||n===d.OBJECTACTIONCONTAINER){if(e.routingInfo=ym(this.getContainerName(),this._contextName),n===d.ROOT_CONTAINER&&(e.rootConfig=pl.getItemView(e.routingInfo,e.renderingMode),this._stateProps.rootConfig=e.rootConfig),this._stateProps.routingInfo=e.routingInfo,n===d.FLOW_CONTAINER||n===d.OBJECTACTIONCONTAINER){let a=qt({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=Ee?.getStore()?.getState()?.data;p&&u&&(e.lastUpdateTime=p[u]?.caseInfo?.lastUpdateTime,this._stateProps.lastUpdateTime=p[u]?.caseInfo?.lastUpdateTime);let m=qt({context:u,category:E.PAGE}),f=qt({context:u,category:"HTTP"});e.httpMessages=r(f),e.pageMessages=r(m),this._stateProps.pageMessages=e.pageMessages,this._stateProps.httpMessages=e.httpMessages,f?.forEach(h=>{h.errorDetails&&(e.errorDetails=e.errorDetails?e.errorDetails.push(...h.errorDetails):h.errorDetails,this._stateProps.errorDetails=e.errorDetails),h.correlationID&&(e.correlationID=h.correlationID)})}}if(e.loadingInfo=this.getLoadingStatus(this.getContextName()),e.isAppOffline=W(d.APP.APP).context_data?.isOffline,e.assignmentNames=this.getCaseInfo().getAssignments()?.map(a=>a.name),e.childAssignmentNames=this.getCaseInfo().getChildAssignments()?.map(a=>a.name),n===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 o.template===d.CASE_VIEW||o.template===d.RULE_VIEW||o.template===d.SELF_SERVICE_CASE_VIEW||o.template===d.CASE_PREVIEW||o.template===d.RULE_PREVIEW||o.template===d.OBJECT_PAGE?(e.caseInfo=this.getCaseSummary(),this._stateProps.caseInfo=e.caseInfo):n===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:r,datasource:n,listType:o}=this.getComponentConfig(),{propertyValue:i,propertyAnnotation:s}=this.getPropertyDetails(o,n,r);if(i&&typeof i=="string"&&(i.includes(s)||i.includes(d.ATTACHMENT_ANNOTATION))){let a=fe.getPropertyName(i),c=this.getFieldMetadata(a);c&&this.updateConfigData(e,c,a)}}resolvePropertyMetadata(e,r){if(!e)return e;let n=vD(`${this._pageReference}.${r}`,this._contextName);if(!Array.isArray(e)){let{additionalInformation:o,classID:i}=e;this._checkAndSetDecisionParagraph("additionalInformation",o??void 0,i)?this._additionalRegisteredProps.additionalInformation=o:o&&this.setStateProps({additionalInformation:n}),e.additionalInformation=n;let{inputFormat:a}=e;if(typeof a=="string"&&a.startsWith("@")){let c=fe.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 r=e.split(".");if(r.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(lt(e,s),e)}let n=r.pop(),o=r.join(".")?".":"",i=this.getValue(`${o}${r.join(".")}${d.CLASS_ID}`);return i||(i=g.resolvePageClass(e,this.getCurrentClassID())),this.resolvePropertyMetadata(lt(n,i),e)}getCurrentPageFieldMetadata(e=null){let r=this.getPageReference().split(".");e!==null&&(r=e.split("."));let n=r.pop();return this.resolvePropertyMetadata(lt(n,this.getValue(`${r.join(".")}${d.CLASS_ID}`)))}getCurrentClassID(){return this._classID??this.getValue(d.CLASS_ID)}getCaseSummary(){let e={...this.getDataObject()[d.getProperty(E.CASE_INFO.CASE_INFO)]};return e.CaseID=e.CaseID||this.getValue(d.getProperty(E.CASE_INFO.CASE_INFO_PZINSKEY)),{...e,isCaseWideAction:()=>bc(this.getContextName(),this.getPageReference())}}getReferencedUser(e){let r=this.getValue("referencedUsers");if(Array.isArray(r)){let n=r.find(o=>o.UserID===e);if(n)return{userId:n.UserID,UserName:n.UserName}}return r&&r[e]?r[e]:null}getCaseStages(){return this.getDataObject()[E.CASE_INFO.CASE_INFO].stages}getStageID(){return this.getDataObject()[E.CASE_INFO.CASE_INFO].stageID}getActions(){return this._actions}isRoot(){return this._isRoot}getRelativePath(){return this._relativePath}resolveContextProps(e){let{value:r}=this.getStateProps();r&&(e.error=this.getContextDataValue(`${this.getPageReference()+r}.error`),e.validatemessage=this.getContextDataValue(`${this.getPageReference()+r}.validatemessage`))}isValidatorExist(){return!!this._isValidatorExist}getValidationApi(){return new hV(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"?fe.handleAnnotation(this._rawConfig?.config?.visibility,this):typeof this.options?.visibility=="string"?fe.handleAnnotation(this.options?.visibility,this):!0}isReadOnly(){return this._readOnly===void 0?!1:this._readOnly==="true"||this._readOnly===!0?!0:typeof this._readOnly=="string"?fe.handleAnnotation(this._readOnly,this)===!0:!1}hasChildren(){return!!this._children}getComputedVisibility(e=[]){let r=this._type==="reference"&&!!this.getReferencedView(),n=r?this.getReferencedViewPConnect().getPConnect():this,o=e;if(r){let u=`${this.getRawMetadata()?.config?.name}!${this._ruleClass}`;if(e.includes(u))return!1;o=[...e,u]}if(this.getConfigProps().visibility===!1)return!1;if(n.getConfigProps().requiresVisibleChildren===!1||this.getConfigProps().requiresVisibleChildren===!1)return!0;let i=n.getConfigProps(),s={includeTypes:["Group","Region","View"],excludeTemplates:["ListView","SimpleTable","StudioTable"]},a=n._type&&s.includeTypes.includes(n._type)&&!s.excludeTemplates.includes(i.template);if(i.highlightedData&&i.highlightedData.length&&i.showHighlightedData&&(a=!1),!a)return!0;let l=n.getChildren();return l?l.some(u=>u.getPConnect().getComputedVisibility(o)):!1}getChildrenIterator(){return this._children.setContext(this.getPageReference()),this._children}setAction(e,r){this._actions[e]=r}getComponentName(){return this._rawConfig&&this._rawConfig.type}isComponentRefreshable(){return!!(this._rawConfig&&this._rawConfig.isRefreshable)}getDataObject(e){return W(e||this.getContextName())}getImagePath(e){return`${Be.getConstellationServiceUrl()}/v860/${Be.getAppAlias()}/image/${e}?org=${ye.getOrganizationName()}`}skipRequiredValidation(){return this.options.isBulkAction}isBulkAction(){return this.options.isBulkAction}getChildren(){if(this._children&&this._children.length){let e=this.options?.inheritedProps?.find(o=>o?.prop==="shouldAutoRefresh");e&&(this._inheritedConfig._inheritedProps=[...this._inheritedConfig._inheritedProps||[],e]);let r=WV(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}),n=[];for(;r?.hasNext();){let o=r.next();(!this.isBulkAction()||!this.#r(o))&&n.push(o)}return r?.resetIndex(),n}return[]}setInheritedProp(e,r,n=!1){this._inheritedConfig[e]=r;let o=Object.hasOwn(this._inheritedConfig._deepProps??{},e);(n||o)&&(this._inheritedConfig._deepProps={...this._inheritedConfig._deepProps,[e]:r})}getDeepInheritedProps(){return{...this._inheritedConfig?._deepProps}}getDeepInheritedConfig(){let e=this.getDeepInheritedProps();return Object.keys(e).length>0?{...e,_deepProps:e}:void 0}#e(e){let r=this.getDeepInheritedConfig();return r?{...e,inheritedConfig:{...e.inheritedConfig,...r}}:e}getLocaleRuleName(){return this._localeRuleName}getLocalizedValue(e,r,n){let o=n||this.getLocaleRuleName(),i=o&&r?`${o}#${r}`:o,s=this.getLocalizationService(i).getLocalizedText(e);return s===e?this.getLocalizationService().getLocalizedText(e):s}getLocaleRuleNameFromKeys(e,r,n){return`${e}!${r}!${n}`}getValue(e,r){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 n=r||this.getPageReference(),o=e?.match(/^(Parent(?:\.Parent)*)(?:\.(.*))?$/);if(o){let i=o[1].split(".").length,s=o[2]||"",a=n?.split(".")||[];n=a.slice(0,Math.max(a.length-i,0)).join("."),s?e=`.${s}`:(e=n,n="")}return this._hasSuggestions&&this.getStateProps()?.value===e?J.getPropertyValue(e,n,`${this._contextName}/${d.SUGGESTION}`):J.getPropertyValue(e,n,this._contextName)}setInheritedConfig(e){if(!e)return;let{readOnly:r,displayMode:n,referenceType:o,hideLabel:i}=e;i&&(this._inheritedConfig.hideLabel=i),o&&(this._inheritedConfig.referenceType=o),n&&(this._inheritedConfig.displayMode=n),(this._inheritedConfig.readOnly||r)&&(this._inheritedConfig.readOnly=r),e.inheritedProps&&(e.inheritedProps?.forEach(s=>{s.prop==="required"&&(this._inheritedConfig[s.prop]=s.value)}),KV(this._inheritedConfig,e))}getInheritedProps(){let e={},r={};return this._inheritedConfig.inheritedProps?.forEach(n=>{r[n.prop]=n.value}),J.resolveProps(r,e,this),e}setValue(e,r,n,o=!1,i={}){if(!g.isValidPropertyReference(e))return;let s,a,{isArrayDeepMerge:c}=i;this.isInsideList()&&this.getListActions().updateProperty(e,r),this.isBulkAction()&&(s=!0,r||(a=!0)),T({type:"SET_PROPERTY",payload:{reference:J.getContextPath(this.getPageReference(),e),value:r,initialValue:n,isImplicit:o,context:this.getContextName(),...c!==void 0&&{isArrayDeepMerge:c},...s&&{isStrictTracking:s},...a&&{removePropertyFromChangedList:a}}})}updateDirtyCheckChangeList(e,r){let n={reference:`${this.getPageReference()}${e}`,value:r,context:this.getContextName()};YV(n)}getContextDataValue(e,r){return Qi(r||this.getPageReference(),e,this._contextName)}updateState(e){let r=this._pageReference.indexOf(d.CASE_INFO.CASE_INFO_CONTENT),n=this._pageReference.indexOf("."),o=d.CASE_INFO.CASE_INFO_CONTENT;r!==0&&(o=n>0?this._pageReference.substring(n):this._pageReference),T(Re({context:this._contextName,data:e,rootPageReference:o}))}replaceState(e,r,n={}){if(!g.isValidPropertyReference(e))return;let{skipDirtyValidation:o=!1}=n;T({type:"REPLACE_PROPERTY",payload:{reference:J.getContextPath(this.getPageReference(),e),value:r,context:this.getContextName(),skipDirtyValidation:o}})}reportError(e,r,n){T(os(e,r||{},n,r?.formFields))}getComponent(){return TD({getPConnect:()=>this})}createComponent(e,r,n,o){let i=this._pageReference;if(r){let s=La(`${this.getPageReference()}.${d.SUMMARY_OF_LISTS}`,r,this._contextName);i=J.getContextPath(s||r,n)||r}else if(o&&o.pageReference){let s=o.pageReference;s=fe.handleAnnotation(s,this),i=J.getContextPath(this._pageReference,s)||""}return TD(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}),o)}getReferencedView(){if(this.meta)return J.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 r={...this.getComponentConfig()},n=this.options?.inheritedConfig?._inheritedProps?.find(o=>o.prop==="shouldAutoRefresh");return n&&!r?.inheritedProps?.some(o=>o.prop==="shouldAutoRefresh")&&r?.inheritedProps?.push(n),delete r?.name,delete r?.type,ct({meta:this.getReferencedView(),options:this.#e({...e?this.options:void 0,...r,context:this.getContextName(),pageReference:r.context?this._resolvePageRef(r.context):this.getPageReference(),viewName:this.viewName})})}getContainerManager(){return new Bd(this)}getActionsApi(){return this._actionsApi||(this._actionsApi=new zV(this)),this._actionsApi}getActionManager(){return w}doesContextExist(e){return Gd(e??this.getContextName())}getGoogleMapsAPIKey(){return gt.getGoogleMapsAPIKey()}getServerURL(){return gt.getServerURL()}getLoadingStatus(e){let r=null;return e?(r=W(e),r=r?r.context_data:null):r=this.getDataObject().context_data,r&&r.isLoading?r.isLoading:!1}clearErrorMessages(e){e?.property?dt({type:"error",property:e.property,pageReference:this.getPageReference(),context:this.getContextName(),...e.subType&&{subType:e.subType}}):e?.context?dt({type:"error",...e}):(dt({type:"error",...e,context:d.APP.APP}),dt({type:"error",...e,context:se(`${d.APP.APP}/${this.getContainerName()}`)}))}resolveDatasourceReference(e){return La(`${this.getPageReference()}.${d.SUMMARY_OF_LISTS}`,e,this.getContextName())||e}removeFormField(){}addFormField(){}setPageValue(e,r,n){delete e?.classID,this.replaceState(r,e),n?rU(e,r,this):Oj(this.getContextName(),`${this.getPageReference()}${r}`,this.getStateProps()?.value??"")}acceptSuggestion(e){if(this.getStateProps()?.value&&this.options.hasForm&&this._hasSuggestions){let r=$n.getSuggestionsContext(this.getContextName()),n=this.getStateProps()?.value||e,o=J.getContextPath(this.getPageReference(),n),i=r.getField(o);this._hasSuggestions=!1,this.getActionsApi().updateFieldValue(n,i),this.getActionsApi().triggerFieldChange(n,i),r.removeField(o,{actionPerformed:"accepted"})}}ignoreSuggestion(e){if(this.getStateProps()?.value&&this.options.hasForm&&this._hasSuggestions){let r=this.getStateProps()?.value||e,n=J.getContextPath(this.getPageReference(),r);this._hasSuggestions=!1,$n.getSuggestionsContext(this.getContextName()).removeField(n,{actionPerformed:"ignored"}),ka.getDependencies(this._contextName,n)?.forEach(i=>{$n.getSuggestionsContext(this.getContextName()).removeField(i,{actionPerformed:"ignored"})})}}getSelfReferencingDatapageKeys(){let e=[],r=this.getPropertyName(),n=this.getFieldMetadata(r),{datasource:{parameters:o={}}={}}=n||{};return Object.values(o).forEach(i=>{let[,s]=i.split("."),a=r?.split(".").pop();s===a&&e.push(i.substring(i.lastIndexOf(".")+1))}),e}isReadOnlyField(){let{value:e,datasource:r,listType:n}=this.getComponentConfig(),{propertyValue:o,propertyAnnotation:i}=this.getPropertyDetails(n,r,e);if(!o||typeof o!="string"||!(o.includes(i)||o.includes(d.ATTACHMENT_ANNOTATION)))return!1;let s=fe.getPropertyName(o),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,r){let n=Ir.isPropertyInternal(r),o=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||n||!o&&(s&&!l||a)&&u)}getPropertyDetails(e,r,n){return e===d.ASSOCIATED?{propertyValue:r,propertyAnnotation:d.ASSOCIATED_PROPERTY_ANNOTATION}:{propertyValue:n,propertyAnnotation:d.PROPERTY_ANNOTATION}}updateConfigData(e,r,n){e.fieldMetadata=r,r.additionalInformation&&(e.additionalInformation=r?.additionalInformation),r.inputFormat&&typeof r.inputFormat!="string"&&(e.inputFormat=r.inputFormat),this.#t(e,n)&&(e.readOnly=!0,this._stateProps.readOnly=e.readOnly,e.fieldMetadata.isDeclarativeTarget&&this.registerAdditionalProps({readOnly:!0})),e.fieldMetadata?.isReadOnly&&(e.readOnly=!0,this.registerAdditionalProps({readOnly:!0}))}#r(e){let r=e.getPConnect().getComponentName(),n=e.getPConnect().getConfigProps().template;return!(pl.allowedComponetsForBulkProcessing[r]===!0||pl.allowedComponetsForBulkProcessing[r]?.[n]===!0)}};function ct(t){let e=new sa(t);return{getPConnect:()=>e}}function JV(t){TD=t}var RD=class t{_grammar;_state;_tree;_exprStr;_endState;_subParser;_position;constructor(e,r,n){this._grammar=e,this._state="expectOperand",this._exprStr=r||"",this._endState=n||{},this._subParser=null}static _setParent(e,r){Object.defineProperty(e,"_parent",{value:r,writable:!0})}_addToken(e){let r=uI[this._state],n=this._exprStr;if(this._exprStr+=e.element,r.subHandler){this._subParser||this._startSubExpression(n);let o=this._subParser?._addToken(e);o&&(this._endSubExpression(),this._state=o)}else if(r.operatorTypes?.[e.tokenType]){let o=r.operatorTypes[e.tokenType],i=PD[e.tokenType];i&&i.call(this,e),o.toState&&(this._state=o.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:r}=uI[this._state];this._subParser=new t(this._grammar,e,r)}_endSubExpression(){uI[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}},dI=RD;var Kse="literal",xD="identifier",Jse=t=>typeof t=="object"&&t!==null&&"operationType"in t,ND={operatorType:"binaryOperator",precedence:1,evaluate:(t,e)=>typeof t=="object"||typeof e=="object"?!1:t&&e},OD={operatorType:"binaryOperator",precedence:1,evaluate:(t,e)=>typeof t=="object"||typeof e=="object"?!1:t||e},ZV=(t,e,r)=>{let n=t==="",o=e===""||e===null||e===void 0;if(n&&o)return r;if(typeof e=="boolean"){let s=!n&&t!=="false"&&t!=="0"?!!t:!1;return r?s===e:s!==e}return n!==o?!r:r?t===e:t!==e},QV={">":{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:ZV(t,e,!0)},"!=":{operatorType:"binaryOperator",precedence:2,evaluate:(t,e)=>typeof t=="object"||typeof e=="object"?!0:ZV(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"},"&&":ND,AND:ND,and:ND,"||":OD,OR:OD,or:OD,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))}},Yse=(t,e,r)=>{if(typeof t.value!="string")return"";let n=t.value.substring(1),o=e?.getFieldMetadata(n)?.type??"";if(o)return o;let{pageReference:i,context:s}=r??{};if(!i||!s)return"";let a=J.resolveClassID(t.value,i,s),c=lt(n,a);return c&&!Array.isArray(c)?c.type??"":""},DD={BinaryExpression:function(e){let r=[],n=e.right,o=e.operator??"",i=e.left;if(!i)return!1;let s=typeof i.value=="boolean"?"True-False":"";r[0]=this.evaluateAST(i),!s&&i.operationType===xD&&(s=Yse(i,this._context,this._contextTreeNodeContext)),r[1]=n?this.evaluateAST(n,s):"";let a=this._grammar[o];return a?.evaluate?a.evaluate(r[0],r[1]):!1},identifier:function(e){let r=typeof e.value=="string"?e.value:"";if(this._localDataObject)return g.getIn(this._localDataObject,r?r.substring(1).split("."):[])??"";if(this._contextTreeNodeContext)return J.getLitePropertyValue(this._contextTreeNodeContext,r)??"";if(!this._context)return"";let n=this._context.getFieldMetadata(r)?.type??"",o=this._context.getValue(r)??"";if(n==="Decimal"&&typeof o=="string"){let i=parseFloat(o);return Number.isNaN(i)?"":i}return o},literal:function(e,r){return(r===void 0||r===""||r==="True-False")&&(e.value==="true"||e.value==="false")?e.value==="true":e.value??""},UnaryExpression:function(e){let r=e.operator,n=e.right;if(!r||!n)return!1;let o=this._grammar[r];return o?.evaluate?o.evaluate(n):!1}},PD={unaryOperator:function(e){this.setPositionInAST({operationType:"UnaryExpression",operator:String(e.value)})},binaryOperator:function(e){let r=String(e.value),{precedence:n}=this._grammar[r],o=this._position._parent,i=o?o.operator:null,s=i?this._grammar[i]:null,a=s?s.precedence:null;if(a&&n)for(;o?.operator&&a>=n;)this._position=o,o=o._parent;let c={operationType:"BinaryExpression",operator:r,left:this._position};dI._setParent(this._position,c),o?(this._position=o,this.setPositionInAST(c)):(this._tree=c,this._position=c)},identifier:function(e){let r={operationType:xD,value:e.value};this.setPositionInAST(r)},literal:function(e){this.setPositionInAST({operationType:Kse,value:e.value})},subExpression:function(e){Jse(e)&&this.setPositionInAST(e)}},uI={expectOperand:{operatorTypes:{literal:{toState:"expectBinOp"},identifier:{toState:xD},unaryOperator:{},openParenthesis:{toState:"subExpression"}}},expectBinOp:{operatorTypes:{binaryOperator:{toState:"expectOperand"}}},identifier:{operatorTypes:{binaryOperator:{toState:"expectOperand"}}},subExpression:{subHandler:PD.subExpression,endStates:{closeParenthesis:"expectBinOp"}}};var Zse=["binaryOperator","unaryOperator","openParenthesis"],Qse=/^\s*$/,XV=/^[a-zA-Z_.$][(0-9)a-zA-Z0-9_.$]*$/,Xse="literal",eae="identifier",tae=/\\\\/,rae=["'(?:(?:\\\\')|[^'])*'",'"(?:(?:\\\\")|[^"])*"',"\\s+","\\btrue\\b","\\bfalse\\b"],nae=["[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]+)"],oae=/^-?(?:(?:[0-9]*\.[0-9]+)|[0-9]+)$/,wD=class t{_grammar;_splitRegex;constructor(e){this._grammar=e}static _isNegative(e){return Zse.some(r=>r===e[e.length-1].tokenType)}static _isWhitespace(e){return!!e.match(Qse)}static _createWordboundary(e){return e=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),e.match(XV)&&(e=`\\b${e}\\b`),e}static _unquote(e){let[r]=e,n=new RegExp(`\\\\${r}`,"g");return e.substr(1,e.length-2).replace(n,r).replace(tae,"\\")}_getSplitRegex(){if(!this._splitRegex){let e=Object.keys(this._grammar).sort((r,n)=>n.length-r.length).map(r=>t._createWordboundary(r),this);this._splitRegex=new RegExp(`(${[rae.join("|"),e.join("|"),nae.join("|")].join("|")})`)}return this._splitRegex}_splitExpression(e){let r=this._getSplitRegex();return e.split(r).filter(n=>n.trim())}_createToken(e){let r={tokenType:Xse,value:e,element:e};return e.startsWith('"')||e.startsWith("'")?r.value=t._unquote(e):e.match(oae)?r.value=parseFloat(e):e==="true"||e==="false"?r.value=e==="true":this._grammar[e]?r.tokenType=this._grammar[e].operatorType:e.match(XV)&&(r.tokenType=eae),r}_getTokens(e){let r=[],n=!1;for(let o=0;o<e.length;o+=1)t._isWhitespace(e[o])?r.length&&(r[r.length-1].element+=e[o]):e[o]==="-"&&t._isNegative(r)?n=!0:(n&&(e[o]=`-${e[o]}`,n=!1),r.push(this._createToken(e[o])));return r}tokenize(e){let r=this._splitExpression(e);return this._getTokens(r)}},e6=wD;var $D=class{_grammar;_expression;_ast;_context;_contextTreeNodeContext;_localDataObject;constructor(e,r){this._grammar={...QV},this._expression=e,this._ast=null,this._contextTreeNodeContext=null,this._localDataObject=r}buildAST(){let r=new e6(this._grammar).tokenize(this._expression),n=new dI(this._grammar);return n.addTokens(r),this._ast=n.buildAst(),this}evaluate(e,r){return this._context=e,this._contextTreeNodeContext=r,this.evaluateAST(this._ast)}evaluateAST(e,r){return r6(e.operationType,DD)&&DD[e.operationType].call(this,e,r)}},t6=$D;var MD=(t,e)=>{let r=/[a-zA-Z0-9_)"'\s]=[a-zA-Z0-9_("'\s]/,n=t.replace(r,o=>o.replace("=","=="));return new t6(n,e)},kD=t=>t?t.buildAST():!0,LD=(t,e,r)=>t?t.evaluate(e,r):!0,pI=(t,e,r)=>{let n=MD(t,e),o=kD(n);return LD(o,r)},r6=(t,e)=>t in e;var UD=class{static handleExpression(e,r,n,o){let i=this.getContext(e,o),a={actionObject:{action:"decexp",params:{source:e,value:r,targets:n},context:i}};gt.fetchData(a).then(c=>c.json()).then(c=>{this.updateState(c,o)}).catch(c=>console.log(c))}static getContext(e,r){let n=e.substring(0,e.indexOf(".")),o=J.getPropertyValue(`${n}.${P.getDefaultQualifiedName("pxObjClass")}`,null,r)||J.getPropertyValue(`${n}.${P.getDefaultQualifiedName("pyClassName")}`,null,r);return{name:n,class:o}}static updateState(e,r){Object.keys(e).forEach(n=>T({type:_t,payload:{context:r,reference:n,value:e[n]}}))}},n6=UD;var mI={},o6=(t,e)=>mI[e]&&Object.hasOwn(mI[e],t),jD=t=>{let{context:e}=t;o6(t.reference,e)&&n6.handleExpression(t.reference,t.value,mI[e][t.reference],e)},tT=(t={})=>{g.copy(t,mI)},iae=(t,e,r)=>pI(t,e,r?.pConnect.getPConnect());var FD=class{static isPageInstruction(e){return e&&e.includes("[")&&e.includes("]")}},fI=FD;var Kd={IDLE:"idle",SAVING:"saving",SKIPPED:"skipped",ERROR:"error"},sae=5e3,aae=()=>{let t=Number(v.getFeatureMap()?.pyAutoSaveDurationInMS);return t>0?t:sae},VD='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])',cae=`${VD}, textarea, [contenteditable="true"]`,Pi=new Map,Ss=new Map,hI=new Set,wh=new Map,$h=new Map,Jd=new Set,gI=(t,e)=>{wh.get(t)?.forEach(r=>r(e))},lae=t=>{let e=$h.get(t);if(!(!e||e.size===0)){for(let[r,n]of e)ke.executeStateMachine(t,r,n,!0,{skipStateUpdate:!1,skipDirtyValidation:!1})||T(da({reference:r,value:n,context:t,isImplicit:!1,skipDirtyValidation:!1}));$h.delete(t)}},uae=(t,e)=>{let r=t,n=r.includes(d.MODAL),o=re(E.CASE_INFO.CASE_INFO_ID,null,r),i=re(E.CASE_INFO.ASSIGNMENT_ID,null,r),a=re(E.CASE_INFO.ACTIVE_ACTION_ID,null,r)||re(E.CASE_INFO.ASSIGNMENTACTION_ID,null,r),c=re(E.CASE_INFO.CASE_TYPE_ID,null,r),l=re("isProcessAction","isProcessAction",r),u=w.getNextActionMgrId(),p={context:r,containerItemID:t,assignmentID:i,actionID:a,caseID:o,containerName:e,caseType:c,isModalAction:n,isFormValid:void 0,isProcessAction:l,saveOnly:!0,autosave:!0,actionMgrID:u},m,f,h=new Promise((S,A)=>{m=S,f=A});if(m&&f)w.register(u,h,m,f,Ii,p,!0);else throw new Error("Promise executor did not synchronously assign resolveFn/rejectFn.");return Ct.executeOrQueueDeferredAction(ul(p)),h},yI=(t,e)=>{let r=Ss.get(t);r!==void 0&&clearTimeout(r),Ss.set(t,setTimeout(()=>{Ss.delete(t),e()},aae()))},BD=t=>{let e=qe(t),r=te(e);return!r||!mr(r)?!0:se(r)===e},SI=async t=>{if(hI.has(t)||Jd.has(t))return;let e=Pi.get(t);if(!e||!BD(t))return;let r=typeof document<"u"?document.activeElement:null;if(r&&r===vU(t)&&r.matches(VD)){yI(t,()=>SI(t).catch(()=>{}));return}lae(t);let n=!1;Qb(!0);try{if(!nn.hasUnsavedChanges(t))return;n=nn.isFormValid(t)}finally{Qb(!1)}if(!n){gI(t,Kd.SKIPPED);return}hI.add(t),gI(t,Kd.SAVING);try{await uae(t,e.containerName),nn.clearChangedProperties(t),gI(t,Kd.IDLE)}catch{gI(t,Kd.ERROR)}finally{hI.delete(t)}},i6=()=>{if(!(typeof document>"u"||!document.activeElement?.matches(cae)))for(let e of Pi.keys())Ss.has(e)&&BD(e)&&yI(e,()=>SI(e).catch(()=>{}))},s6=i6,a6=t=>{t.key==="Tab"&&i6()},c6=t=>{let{target:e}=t;if(!(typeof Element>"u"||!(e instanceof Element)||!e.matches(VD)))for(let r of Pi.keys())Ss.has(r)&&BD(r)&&(JS(r,e),yI(r,()=>SI(r).catch(()=>{})))},l6=t=>{let e=t?.data?.caseInfo?.settings?.autoSave;if(e!=null)return!!e;let r=t?.containerItemID??t?.context;if(r){let n=re("caseInfo.settings.autoSave",null,r);if(n!=null)return!!n}return!1},Es=t=>Pi.has(t),u6=(t,e,r)=>{let n=$h.get(t);n||(n=new Map,$h.set(t,n)),n.set(e,r)},d6=(t,e)=>{Pi.size===0&&typeof document<"u"&&(document.addEventListener("pointerdown",s6,{passive:!0}),document.addEventListener("keydown",a6,{passive:!0}),document.addEventListener("input",c6,{capture:!0,passive:!0})),Pi.set(t,e)},EI=t=>{let e=Ss.get(t);e!==void 0&&clearTimeout(e),Ss.delete(t),hI.delete(t),Pi.delete(t),Jd.delete(t),$h.delete(t),YS(t),Pi.size===0&&typeof document<"u"&&(document.removeEventListener("pointerdown",s6),document.removeEventListener("keydown",a6),document.removeEventListener("input",c6,{capture:!0}))},HD=t=>{let e=`${t}/`;for(let r of[...Pi.keys()])r.startsWith(e)&&EI(r)},p6=(t,e)=>{let r=wh.get(t);return r||(r=new Set,wh.set(t,r)),r.add(e),()=>{let n=wh.get(t);n&&(n.delete(e),n.size===0&&wh.delete(t))}},AI=t=>{let e=Ss.get(t);e!==void 0&&(clearTimeout(e),Ss.delete(t))},Yd=t=>{Pi.has(t)&&(Jd.has(t)||yI(t,()=>SI(t).catch(()=>{})))},m6=()=>Jd,f6=t=>{AI(t),Jd.add(t)},g6=t=>{Jd.delete(t),nn.hasUnsavedChanges(t)&&Yd(t)};var{APP:dae}=d,hr={},Ua={},ja={},y6=new Set([kt,Ze,et,Qo]),pae=new Set([vn,mo,_t,lc,po,zi,...y6]),Ou="You will lose unsaved changes. Do you want to continue?",Rj="You have reached maximum limit of pending changes. Please commit/cancel one or more changes to continue.",mae=(t,e,r)=>{let n=Ua[e]||{};return Object.keys(n).forEach(o=>{let i=n[o].associatedProperty;Object.hasOwn(n,o)&&(i===void 0||r.has(i))&&g.buildObject(o,t,n[o].value)}),t},Mc=(t=dae.APP,e,r)=>{let n=hr[t]||{},o=Ua[t]||{};if(Object.keys(n).length===0&&Object.keys(o).length===0)return{};let i=[],s=null;e||(i=$c(t,!0)),r||(s=new Set(Mj(t)));let a=new Set(i),c={};return mae(c,t,a),Object.keys(n).forEach(l=>{let u=!e&&a.has(l)||e;Object.hasOwn(n,l)&&u&&!s?.has(l)&&g.buildObject(l,c,n[l].value)}),c};var Mh=t=>{let{context:e}=t,r=t.reference.startsWith(".")?t.reference.substr(1):t.reference;delete hr[e]?.[r],delete Ua[e]?.[r]};zL((t,e)=>{Mh({context:t,reference:e});let r=e.lastIndexOf(".");r<1||r===e.length-1||dt({type:d.MESSAGES.MESSAGES_TYPE_ERROR,context:t,pageReference:e.slice(0,r),property:e.slice(r)})});var S6=t=>t&&ja[t],WT=t=>{t&&ja[t]&&(ja[t]=!1)},h6=(t,e)=>{let{context:r,initialValue:n="",isStrictTracking:o,associatedProperty:i}=e,s=e.reference.startsWith(".")?e.reference.substr(1):e.reference;t[s]?t[s].previousValue=re(e.reference,null,r):(t[s]={initialValue:n||re(e.reference,null,r)},t[s].previousValue=t[s].initialValue),t[s].value=e.value,i&&(t[s].associatedProperty=i),o&&t[s].value===t[s].initialValue&&Mh(e)},E6=t=>{let{payload:e}=t,{context:r}=e,n=e.reference.startsWith(".")?e.reference.substr(1):e.reference;be.isFieldExists(r,n)||(Ua[r]=Ua[r]||{},h6(Ua[r],e)),hr[r]=hr[r]||{},h6(hr[r],e)},A6=(t,e,r)=>{let n=hr[t]||{},o;r instanceof Set?o=r:r&&r.length>0&&(o=new Set(r)),Object.keys(n).forEach(i=>{o?.has(i)||g.hasIn(e,i)&&(n[i].value=g.getIn(e,i))})},kh=t=>{let e=hr[t];if(!e)return{};let r={};return Object.keys(e).forEach(n=>{r[n]=e[n].value}),r},YV=({value:t,context:e,reference:r})=>{let n=te(e),o=We(n,e)||{};if(fI.isPageInstruction(r)||o?.subscriptFieldName)return;let i=r?.startsWith(".")?r?.substr(1):r;hr[e]=hr[e]||{},hr[e][i]||(hr[e][i]={initialValue:re(i,null,e)}),hr[e][i].value=t},xr=t=>t&&hr[t]&&Object.keys(hr[t]).some(e=>hr[t][e].initialValue!==hr[t][e].value)||!!S6(t),GD=(t,e)=>{if(!(t&&e))return!1;let r=hr[t]&&hr[t][e];return r?r.previousValue!==r.value:!1},fae=()=>Object.keys(hr).some(t=>xr(t)),xu=t=>{t&&hr[t]?(hr[t]={},Ua[t]={}):t==="all"&&(hr={},Ua={},ja={}),ja[t]&&(ja[t]=!1),YS(t)},C6=(t,e,r=new Set)=>{if(r.has(e))return;r.add(e);let n=ka.getDependencies(t,e),o=Cr.getResetDependencies(t,e);[...n,...o].forEach(i=>{let s=g.getPropertyNameFromDependency(i);if(typeof i=="object"&&i.mode==="multiRecord"){let a=s.split("."),c=`.${a.pop()}`,l=a.join(".");ke.isStateMachineExist(t,l,c)?ke.getStateMachine(t,l,c).deleteAll():Es(t)&&(ke.setStateMachine(t,c,l,new Cc(c,l,t)),ke.getStateMachine(t,l,c)?.deleteAll(!1))}else fI.isPageInstruction(s)&&ke.executeStateMachine(t,s,""),T({type:_t,payload:{reference:s,value:"",context:t,isArrayDeepMerge:!0,isImplicit:!0}});C6(t,s,r)})},gae=t=>{let{context:e,pageReference:r,value:n,reference:o}=t;Cr.triggerCascade(e,o,n);let i=ka.getDependencies(e,o),s={context:e,datapages:{}};C6(e,o),i.forEach(a=>{let c=r;a.startsWith(r)||(c="");let l=a.replace(`${c}`,"").split(".").filter(I=>!!I);l.pop();let u=l.join("."),p=re(`.${u}`,c,e)?.classID||t.classID,m=lt(a.split(".").pop(),p),{datasource:f}=m,h={},S=[];f.parameters.forEach(I=>{I?.value?(h[I.name]=Ir.isProperty(I.value)?re(`.${g.getFullPropertyReference([u,g.getPropertyName(I.value)])}`,c,e):I.value,h[I.name]===void 0||h[I.name]===null||h[I.name]===""?(h[I.name]="",S.push(d.NULL_STRING)):S.push(h[I.name])):(h[I.name]="",S.push(d.NULL_STRING))});let A=f.name.concat(d.UNDERSCORE_STRING,g.getHashedString(S.join(d.HASH_DELIMITER))),{name:C}=f,_=zr(C);s.datapages[A]={mode:f.mode,propertyName:a,name:f.name,dataViewParameters:h,refreshStrategy:_?.refreshStrategy}}),i.length&&T({type:pS,payload:s})},hae=()=>t=>e=>{let{type:r,payload:n={}}=e||{};if(!r||!pae.has(r)){t(e);return}if(r===vn&&(jD(n),gae(n),Ct.registerBlockingAction(n.context).catch(()=>{}),setTimeout(()=>{jm()?!Ti.triggerRefreshForType("PROP_CHANGE",n.reference,n.context)&&(GD(n.context,n.reference)||Rm(n.context))&&Pu(n):((GD(n.context,n.reference)||Rm(n.context))&&Pu(n),Ti.triggerRefreshForType("PROP_CHANGE",n.reference,n.context)),Ct.deRegisterBlockingAction(n.context).catch(()=>{})},0)),r===mo&&!n?.isDefault){let{context:o,referenceList:i,c11nEnv:s,listIndex:a,instruction:c,skipDirtyValidation:l=!1,skipRefresh:u=!1}=n;a===0&&c==="INSERT"&&s&&aj(s),u||setTimeout(()=>{Ti.triggerRefreshForType("PROP_CHANGE",i,o)||Pu({context:o,pageReference:i})},0),l||(ja[`${o}`]=!0)}if(r===_t||r===lc){let{reference:o,isImplicit:i,context:s,skipDirtyValidation:a=!1}=n;be.updateFieldNodeValue(s,o,n.value),!fI.isPageInstruction(o)&&!a?E6(e):a||(ja[`${s}`]=!0),(n.removePropertyFromChangedList||i)&&Mh(n)}if(r===po||r===zi){let{transientItemID:o,data:i}=n;g.iterateLeafNodes(i,s=>{Mh({context:o,reference:s.join(".")})})}r&&y6.has(r)&&(xu(n.context),Cr.purgeResetDependencies(n.context),oj(n.context),(n.childContainersContexts||[]).forEach(s=>{xu(s)}),(n.transientItems||[]).forEach(s=>{xu(s)})),t(e)},I6={propertyChangeMiddleware:hae,getChanges:Mc,recordChange:E6,isDirty:fae,isPropertyDirty:GD,isContextDirty:xr,resetChangedProperties:xu,deleteRecordedChange:Mh,isComplexObjectMerged:S6,resetComplexObjectDirtyStatus:WT};var qD=class{getCoreheaders(e){let r=`${E.APP.APP}${d.FORWARD_SLASH_STRING}${d.PRIMARY}`,n=se(r),o=pe(n),i=J.getProperty(d.COREHEADERS,"",o);if(i&&e in i)return i[e]}},_6=new qD;var Lh={defaultLimit:16},KD={SINGLE:"single",MULTIPLE:"multiple"},ge={PRIMARY:"primary",WORKAREA:"workarea",MODAL:"modal",PREVIEW:"preview"},zn=()=>we()?.getState()?.containers;function ot(t){return typeof t=="string"&&t.trim()!==""}var ut=t=>ot(t)?we()?.getState().containers[t]:null,qd=(t,e,r)=>{if(!r)return{continueExecution:!1,containerItemID:t};let n=ut(r),o=!1,i=t;return n?.accessedOrder.forEach(s=>{e===n.items[s].key&&(o=!0,i=n.items[s].context)}),{continueExecution:o,containerItemID:i}},We=(t,e)=>{if(!ot(t)||!ot(e))return null;let n=zn()?.[t];return n&&n.items&&n.items[e]||null},BT=t=>ot(t)?we()?.getState().containers[t]?.items:null,Zd=t=>ot(t)?we()?.getState().containers[t]?.accessedOrder||[]:[],yae=t=>ot(t)&&Zd(t)?.length>0||!1,ml=(t,e,r)=>{if(!ot(t)||!ot(e))return!1;let o=zn()?.[t],i=o&&o.items||null,s=r||((a,c)=>a===c);if(e&&i){for(let a of Object.keys(i))if(s(e,i[a].key))return!0}return!1},JD=t=>{let{containers:e}=we()?.getState()||{};return!e||!ot(t)?!1:Object.keys(e).some(r=>e[r]?.accessedOrder?.includes(t))},wt=(t,e,r)=>{if(!ot(t)||!ot(e))return null;let o=zn()?.[t],i=o&&o.items||null,s=r||((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},Sae=(t,e)=>{let r=(n,o)=>n?.toLowerCase()===o?.toLowerCase();if(t&&e){for(let n of Object.keys(e))if(r(t,e[n].key))return e[n]}return null},Eae=t=>{if(!ot(t))return null;let e=zn()??{};for(let r of Object.keys(e))if(e[r]){let o=e[r].items??null,i=Sae(t,o);if(i)return i}return null},Rh=(t,e)=>{if(!ot(t)||!ot(e))return!1;let r=zn();return r&&Object.hasOwn(r,`${t}/${e}`)},Aae=(t,e)=>{if(!ot(t)||!ot(e))return null;let n=zn()?.[`${t}/${e}`];return n&&n.type},se=t=>{if(!ot(t))return null;let e=null,r=zn();if(r&&r[t]){let n=r[t],{accessedOrder:o}=n;e=o&&o.length>0?o[o.length-1]:null}return e},Cae=(t,e,r)=>{if(!ot(t)||!ot(e))return!1;let n=wt(t,e,r);return n?n===se(t):!1},b6=(t,e)=>{let r=null,n=zn();if(!n)return null;for(let o of Object.keys(n))if(n[o].items){let i=n[o].items[t];if(i?r=i[e]:r=null,r)break}return r},pe=t=>ot(t)?b6(t,"context"):null,Ar=t=>{if(!ot(t))return null;let e=null,r=zn();if(r&&r[t]){let n=r[t],{accessedOrder:o}=n,i=o&&o.length>0?o[o.length-1]:null;e=pe(i)}return e},Tu=t=>{if(!ot(t))return[];let e=t.endsWith("/")?t:`${t}/`,r=[],n=!1,o=zn();if(!o)return[];let i=s=>{let a=[];return Object.keys(s).forEach(l=>{l.startsWith(e)&&l!==e&&a.push(l),l===t&&(n=!0)}),a};for(let s of Object.keys(o))if(o[s].items){let a=i(o[s].items);a&&a.length>0&&(r=r.concat(a)),r=r.sort()}return n?r:[]},Ke=t=>{if(!ot(t))return[];let e=[],r=zn();if(!r)return[];let n=`${t}${d.FORWARD_SLASH_STRING}`;for(let o of Object.keys(r))o.startsWith(n)&&e.push(o);return e},ko=t=>{if(!ot(t))return[];let e=[],r=zn();if(!r)return[];let n=`${t}${d.FORWARD_SLASH_STRING}`;for(let o of Object.keys(r))o.startsWith(n)&&(Zd(o)||[]).forEach(s=>{pe(s)!==t&&e.push(pe(s))});return e},Uh=t=>{let e=[...ko(t),t],r=[],n=we()?.getState().data||{};return e.forEach(o=>{Object.hasOwn(n,`${o}/${d.SUGGESTION}`)&&r.push(`${o}/${d.SUGGESTION}`)}),r},It=t=>ot(t)?t&&ut(t)&&ut(t).type===KD.SINGLE:null,mr=t=>ot(t)?t&&ut(t)&&ut(t).type===KD.MULTIPLE:null,Fr=t=>ot(t)&&ut(t)&&ut(t).items&&Object.keys(ut(t)?.items).length>0||!1,T6=t=>t&&Lh[t]?Lh[t]:Lh.defaultLimit,Iae=(t,e=Lh.defaultLimit)=>{ot(t)&&(Lh[t]=e)},HT=t=>{if(!ot(t))return!1;let e=!1,r=ut(t),{items:n={}}=r,o=Object.keys(n),i=T6(t);return o&&o.length>0&&o.length>=i&&(e=!0),e},kc=t=>{if(!t||!ot(t.name)||!ot(t.context))return null;let e=t?.name,r=`${t?.context}/${e}`,n=ut(r),o=Array.isArray(n?.accessedOrder)&&n?.accessedOrder.map(a=>n?.items[`${a}`]?.context)||[],i=Ke(`${d.APP.APP}/${d.PREVIEW}`),s=ko(`${d.APP.APP}/${d.PREVIEW}`);return{context:t?.context,name:e,containerItems:[...o,...s],childContainers:i}},jh=t=>{if(!ot(t))return!1;let e=pe(t);return xr(e)||FT(t)},GT=t=>{if(!ot(t))return null;let e,r=ut(t),{accessedOrder:n=[]}=r;for(let o=0;o<n.length;o+=1){let i=n[o];if(!jh(i)){e=i;break}}return e},te=t=>{if(!ot(t))return null;let{containers:e}=we()?.getState()||{};if(e){for(let n of Object.keys(e))if(e[n]?.accessedOrder?.includes(t))return n}let r=t.lastIndexOf(d.UNDERSCORE_STRING);return t.slice(0,r)},aa=async(t,e={})=>{if(!ot(t))return Promise.reject(new Error("closeContainerItem: containerItemID is the required parameter"));let r=te(t),n=pe(t),{skipDirtyCheck:o}=e,i=!0,s=[];if(jh(t)&&!o&&(On.disableLoadingIndicator({context:n}),i=await li.confirm(Or().getLocaleValue(Ou,"Messages")),On.enableLoadingIndicator({context:n})),i){let{accessedOrder:a=[],items:c={},type:l}=ut(r);s=a.filter(S=>S!==t);let u=s[s.length-1],p=c[u]||{},{semanticURL:m=d.FORWARD_SLASH_STRING,context:f}=p;r?.includes(ge.MODAL)||(s.length>0&&m&&m!==d.FORWARD_SLASH_STRING?Zi({directUrlUpdation:!0,semanticURL:m,options:{containerItemID:u,context:f}}):Zi({directUrlUpdation:!0,semanticURL:d.FORWARD_SLASH_STRING,options:{}})),T(Qe({containerItemID:t,context:n,target:r,containerInfo:{newAccessedOrder:s,containerType:l},...e.eventName!==void 0?{eventName:e.eventName}:{}}))}return{newAccessedOrder:s,removeItem:i}},YD=(t,e,r,n)=>{let o="root",i=ur(e,o,!0),s=Z(e,o),a={root:t,containerItemID:i,context:n?"app":i,target:s,containerName:e},c={data:r,context:n?"app":i},l=[Pt(a)];l.push(Re(c)),T(l)},_ae=(t,e,r)=>{let n=Zd(t);n=n.filter(i=>i!==e);let o=!1;for(let i=0;i<n.length;i+=1)if(pe(n[i])===r){o=!0;break}return o},ZD=t=>{if(!ot(t))return!1;let e=zn(),r=pe(t),n=e?Object.keys(e):[],o=!1;for(let i=0;i<n.length&&(o=_ae(n[i],t,r),!o);i+=1);return o},bi=t=>{Array.isArray(t)||(t=[t]);let e=zn()||{};return t.map(r=>{let n=te(r);return g.getIn(e,[n,"items",r,"transientItems"])||[]}).flat()},bae=t=>{let{transientItemID:e,data:r,options:n}=t,o=g.deepClone(we()?.getState().data[e]);n?.reset&&g.iterateLeafNodes(o,i=>{i[i.length-1]!=="classID"&&g.setIn(o,i,"")}),T(Ph({transientItemID:e,data:g.mergeDeep(r,o)}))},Tae=t=>{let{transientItemID:e,data:r}=t;T(ow({transientItemID:e,data:r}))},vae=t=>{let e=g.deepClone(we()?.getState().data[t]);g.iterateLeafNodes(e,r=>{r[r.length-1]!=="classID"&&g.setIn(e,r,"")}),T(nw({transientItemID:t,data:e}))},v6=t=>{let e=g.deepClone(we()?.getState().data[t]);g.iterateLeafNodes(e,r=>g.setIn(e,r,"")),T(iw({transientItemID:t,data:e}))},Rae=t=>{we()?.getState().data[t]&&v6(t);let e=t.lastIndexOf("/"),r=e>0?t.substring(0,e):t,n=te(r);T(Nh({transientItemID:t,containerItemID:r,target:n}))},WD=class{static items;static addContainerItems(e){this.items=e}static getContainerItems(){return this.items}static deleteContainerItem(e){let r=this?.items?.indexOf(e);r!==void 0&&r!==-1&&this.items.splice(r,1)}},Pae=(t,e={})=>{if(!ot(t))return;let r=ut(t),n=Array.isArray(r?.accessedOrder)?r.accessedOrder:[];if(n.length===0)return;let{remove:o,keep:i}=e,s;if(i!==void 0){let a=new Set(i);s=n.filter(c=>!a.has(c))}else if(o!==void 0){let a=new Set(o);s=n.filter(c=>a.has(c))}else s=[...n];for(let a of s){let c=pe(a),l=bi(a);T(Qe({containerItemID:a,context:c,target:t,...l.length>0&&{transientItems:l}}))}},CI=()=>WD,QD=t=>{let e={containerName:t};e.childContainers=Ke(t),T({type:sS,payload:e})},XD=(t,e)=>{let r=Tu(t),{key:n}=We(te(t),t),o=[];r.forEach(i=>{let{key:s}=We(te(i),i);if(s===n){let a={data:{caseInfo:{headers:{etag:e}}},target:te(i),context:i};o.push({type:Er,payload:a})}}),o.length&&T(o)},ew=(t,e)=>{let r=[],n={data:{caseInfo:{headers:{etag:e}}},target:te(t),context:t};r.push({type:Er,payload:n}),r.length&&T(r)},Go=()=>v.isPortalLoaded?"app":"root",Nae=()=>_6,tw=(t,e)=>{let r={data:{caseInfo:{lastUpdateTime:e}},target:te(t),context:t};T({type:Er,payload:r})},rw=(t,e)=>{let r=wt(t,e),n=wt(`${r}/workarea`,e);return pe(n)},hE=t=>ot(t)?b6(t,"parentContext"):null,Oae=t=>{let{accessedOrder:e}=t;return e&&e.length>0?e[e.length-1]:""},Ma=t=>{if(t&&typeof t=="string"){let e=t.split("/");return e.pop(),e.join("/")}return null},xae=()=>tI;var R6=t=>{typeof window>"u"||(window.document.title=t)},P6=(t,e)=>(t!==void 0&&(t.options=e),{stateObj:t}),N6=(t,e,r)=>{if(!(typeof window>"u"))try{window.history.pushState(t,e,r),window.scrollTo(0,0)}catch{throw new Error("Error- Unable to Add to Browser History")}},O6=(t,e,r)=>{if(!(typeof window>"u"))try{window.history.replaceState(t,e,r)}catch{throw new Error("Error- Unable to Replace Browser History")}},x6=t=>t.state?.type==="ui-navigation"?($.publish(E.PUB_SUB_EVENTS.URL_NAVIGATION,t.state),null):t.state?t.state.stateObj:null,D6=t=>{typeof window>"u"||window.addEventListener("popstate",e=>t(e))},w6=()=>{typeof window>"u"||(window.onbeforeunload=()=>null)},Qd=()=>typeof window>"u"?"":ci(window.location.pathname),II=()=>typeof window>"u"?"":ci(window.location.pathname+window.location.search);var $6=()=>typeof window>"u"?"":window.location.search,zh=(t,e,r)=>{switch(r){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 Dae=/^(?!\.+$)[\w.~-]+$/,wae=/^[^/?#{}]+\/\{businessID\}$/,$ae=/^[A-Za-z0-9]+__/,Mae={reqType:"GET",endPoint:"/api/application/v2/cases/[{caseTypeID}][businessID={businessID}]?viewType={viewType}",body:{},urlPattern:"cases/[{caseTypeID}][businessID={businessID}]",params:{caseTypeID:"",businessID:"",viewType:"page"}},sw=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,r)=>{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=r,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(n=>{Uo(n)?this.dynamicRoutesList?.push(n):this.staticRoutesList?.push({[n]:e[n]})})};_getDynamicKeyName=e=>{let r=e.indexOf("{")+1,n=e.lastIndexOf("}");return e.slice(r,n)};isDefaultPortal=()=>`${this.bDefaultPortal}`!="false";getPortalName=()=>this.portalName;getApplicationPath=()=>ci(`${this.getReqContextName()}/${this.getReqServletNameReal()}`);getReqServletNameReal=()=>`${this.reqServletNameReal}`;getAppDelimeter=()=>`${this.appDelimeter}`;getApplicationName=()=>`${this.appName}`;getApplicationAlias=()=>`${this.appAlias}`;getServletPath=()=>`${this.reqServletPath}`;getOrganizationName=()=>`${this.orgName}`;getReqContextName=()=>ci(this.reqContextName);getRoutingInfo=()=>this.routingInfo;processUrl=(e,r)=>{r&&(e=e.toLowerCase()),e&&(e=decodeURIComponent(e));let n=new RegExp(this.getApplicationPath(),"i");return e=e.replace(n,""),e.startsWith("/")&&rs()&&v.getRenderingMode()!=="PREVIEW"&&this.setDefaultClassName(""),ci(e)};stripIgnoredParams(e){return this.ignoreFromEndPoint?.forEach(r=>{e.includes(r)&&(e=e.substring(0,e.indexOf(r)))}),e}getRouteDetails=(e,r)=>{if(!r)return this.appRoutes[e];let n="",o={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&&(n=s.routeKey,o={...s.payload})}),!n&&this.appRoutes&&this.appRoutes[e]&&(n=this.appRoutes[e].routeKey,o={...this.appRoutes[e].payload}),{routeKey:n,payload:o}};transformRemoteCasePayload(e){let{caseClassName:r,caseID:n}=e;if(!ae.isRemoteCase(r))return e;let{RemoteClassGroup:o,RemoteSystemID:i}=ae.getRemoteCase(r??"");return{...e,caseID:n?.replace(r??"",o?.toUpperCase()),RemoteSystemID:i}}getEndPointInfo=e=>{e=this.stripIgnoredParams(e);let r=rs(),n=this.processUrl(e,!0),o=this._getMatchedRouteInRoutingTable(n,r?this.defaultClassName:void 0);o||(n=this.processUrl(this.defaultViewUrlPath,!r),o=this._getMatchedRouteInRoutingTable(n,r?this.defaultClassName:void 0)||"");let{routeKey:i,payload:s}=this.getRouteDetails(o,r),a=this.appRoutesMeta?.[i]?.restApi??(i===Fi?Mae: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),o)};getSemanticURL(e,r,n){return this.buildSemanticURL(e,r,n)}findBusinessIDRoute(e){let r=[];Object.entries(this.appRoutes??{}).forEach(([s,a])=>{let c=a?.payload?.caseTypeID;a?.routeKey===Fi&&typeof c=="string"&&c&&wae.test(s)&&r.push({pattern:s,typeID:c})});let n=r.find(({typeID:s})=>s===e);if(n)return n.pattern;let o=s=>s.replace($ae,""),i=r.filter(({typeID:s})=>o(s)===o(e));return i.length===1?i[0].pattern:void 0}getBusinessIDURLPath(e,r){return!this.appRoutesMeta||!(Fi in this.appRoutesMeta)?"":this.getBusinessIDRoutePath(e,r)}getBusinessIDRoutePath(e,r){return!e||!r||!Dae.test(r)||ae.isRemoteCase(e)?"":this.findBusinessIDRoute(e)?.replace("{businessID}",r)??""}getResolvedSemanticURL(e,r,n={},o){let i=e===Lt||e===$r,s=n?.businessID,a=i&&typeof s=="string"?this.getBusinessIDURLPath(r?.caseClassName,s):"";if(!a){let p=this.getSemanticURL(e,r,n);a=p,Uo(p)&&p.match(Rc)?.forEach(f=>{let h=this._getDynamicKeyName(f);n[h]&&(a=a.replace(f,String(n[h])))})}let c=L6(a,o),l=new URL(c),u=this.getPortalName();return this.isDefaultPortal()?l.searchParams.delete("portal"):u&&!d2(l.searchParams)&&l.searchParams.append("portal",u),o&&!l.searchParams.has("lang")&&l.searchParams.append("lang",o),Pc(l.toString())}buildDocumentTitle(e,r,n){let o=n??"";return v.getCaseLabelFirstInTitle()?e&&r?`${e} (${r}) - ${o}`:o:e&&r?`${r}: ${e} - ${o}`:o}updateSemanticURLAndDocumentTitle(e,r){let n=/{.+?}/,{key:o,actionName:i,caseClassName:s,isRemoteCase:a,name:c}=e;if(a&&!s)return;let l=this.getSemanticURL(i,{caseClassName:s}).replace(n,String(er(o))),u=`${E.APP.APP}${d.FORWARD_SLASH_STRING}${E.PRIMARY}`,p={semanticURL:l,directUrlUpdation:!0,options:{acName:u,context:Ar(u)}},m=Qd();l&&!m.includes(l)&&k6(p,r);let f=o.substring(o.lastIndexOf(" ")+1),h=v.environmentInfoObject?.pxApplication?.pyLabel,S=this.buildDocumentTitle(c,f,h);U6(S)}buildSemanticURL(e,r,n){let{urlPattern:o}=this.appRoutesMeta?.[e]||{},i=o?.split("/").length,s=o?.split("/");this.setDefaultClassName(r?.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],n);if(Object.keys(r).length===0)return"";let c=a.find(l=>{let u=this.appRoutes[l].payload,p={...n};delete p.dataViewName,delete p.dataContext;let m=u.dataViewKeys||u.dataContextParameters||{},f=Object.keys(r).every(h=>r[h]===u[h]);return f?!g.isEmpty(m)&&!g.isEmpty(p)?Object.keys(p).every(h=>Object.hasOwn(m,h)):f:!1});return c?this._getQueryParamsResolvedURL(c,n):a.includes("cases/{id}")&&n?.id?"cases/{id}":""}_getQueryParamsResolvedURL(e,r,n=!1){let[o,i]=e.includes("?")?e.split("?"):[e];if(i&&r&&Object.keys(r).length>0){let s={};for(let[u,p]of Object.entries(r))s[u.toLowerCase()]=p;let a=new URLSearchParams(i),c={};for(let[u,p]of a.entries())if(typeof p=="string"&&Uo(p)){let m=this._getDynamicKeyName(p),f=m.toLowerCase(),h=n?s:r,S=n?r[m]??h[f]:h[m];S!=null&&(c[u]=S)}else typeof p=="string"&&(c[u]=p);let l=new URLSearchParams(Object.entries(c).map(([u,p])=>[u,String(p??"")]));return`${o}?${Pc(l.toString())}`}return o}_getQueryParamsObject(e){let r={};if(!e)return r;for(let n of e.split("&")){let o=n.indexOf("=");if(o!==-1){let i=n.slice(0,o),s=n.slice(o+1);try{r[decodeURIComponent(i)]=decodeURIComponent(s)}catch{r[i]=s}}}return r}getRestEndPoint(e,r){try{return this._buildRestApi(e,r)}catch(n){return console.error(n),null}}_buildRestApi(e,r){if(e&&this.appRoutesMeta?.[e]){let{reqType:n,body:o,params:i}=this.appRoutesMeta[e].restApi,{endPoint:s}=this.appRoutesMeta[e].restApi;r?.params&&r.params.pageName&&(s=`${s}&pageName=${r.params.pageName}`);let a=s.match(Rc);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,()=>r?.[l]??i?.[l])}if(o){let c={};return Object.keys(o).forEach(u=>{if(r&&this._isSpecialInstruction(u)){let p=o[u];Array.isArray(p)&&p.every(m=>typeof m=="string")&&(c={...c,...this._processInstruction(u,p,r)})}}),{restApi:s,reqType:n,body:c}}return{restApi:s,reqType:n}}throw new Error(`Cannot find route metadata for the routeKey: ${e}.`)}_isSpecialInstruction(e){return e&&e.startsWith("@")}_processInstruction(e,r,n){let o={};return e==="@COPY"&&r.forEach(i=>{o[i]=n?.[i]}),o}doesRestApiExist(e){return!!(this.appRoutesMeta&&this.appRoutesMeta[e])}_resolveMatchedRouteQueryParams=(e,r,n,o)=>{if(!e)return;let i=r.indexOf("?"),s=i!==-1?r.substring(i+1):void 0;if(s){let a=`${n.join("/")}?${s}`;return this._getQueryParamsResolvedURL(a,o,!0)}};_resolveRoute=(e,r,n)=>{let o=[],[i,s]=r.includes("?")?r.split("?"):[r],[a,c]=n.includes("?")?n.split("?"):[n],l=i.split("/"),u=a.split("/"),p={};for(let C=0;C<u.length;C+=1)if(o[C]=u[C],Uo(u[C])){let _=this._getDynamicKeyName(u[C]);p[_]=l[C],o[C]=l[C]}let m=this._getQueryParamsObject(c),f=this._getQueryParamsObject(s),h={};for(let[C,_]of Object.entries(f))h[C.toLowerCase()]=_;for(let C of Object.keys(m))Uo(m[C])?p[C]=f[C]||h[C.toLowerCase()]:p[C]=m[C];let S=this._resolveMatchedRouteQueryParams(s,n,o,f),A=this._resolvePayload(e,p,n);return{...this._resolveRouteEndPoint(A,n),urlPath:S||o.join("/")}};_resolveRouteEndPoint=(e,r)=>{let{routeEndpoint:n}=e;if(!Uo(n))return e;let o={};if(o[r]=e,e.payload!==void 0){let i=n.match(Rc);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===Fi&&c==="businessID"?encodeURIComponent(e.payload[c]):e.payload[c];n=n.replace(a,u)}else this._sendWarningAndErrorMessages(`Unable to resolve dynamic token {${c}} in routeEndpoint- ${c} is missing in payload`,o)}}else this._sendWarningAndErrorMessages("Unable to resolve dynamic token(s) in routeEndpoint- payload is missing in routing table for-",o);return{...e,routeEndpoint:n}};_resolvePayload=(e,r,n)=>{if(typeof e.payload>"u")return e;let o={};o[n]=e;let i={...e.payload,...this._resolvePayloadRecursive(e.payload,r)};return{...e,payload:i}};_resolvePayloadRecursive(e,r){if(Array.isArray(e))return e.map(o=>this._resolvePayloadRecursive(o,r)).flat();let n={};for(let o of Object.keys(e)){let i=e[o];if(typeof i=="string"&&Uo(i)){let s=i.match(Rc)??[];for(let a of s){let c=this._getDynamicKeyName(a);r[c]!==void 0?i=i.replace(a,r[c]):this._sendWarningAndErrorMessages(`Unable to resolve dynamic token {${c}} in payload - {${c}} is missing in semantic url construct`)}n[o]=i}else i&&typeof i=="object"?n[o]=this._resolvePayloadRecursive(i,r):n[o]=i}return n}_getMatchedRouteInRoutingTable=(e,r)=>{let[n]=e.includes("?")?e.split("?"):[e],o=this._findMatchedRouteInStaticList(n,r);if(o!==void 0||(o=this._findMatchedRouteInDynamicList(e),o!==void 0))return o};_findMatchedRouteInStaticList=(e,r)=>{if(!this.staticRoutesList||!e)return;let n=e.toLowerCase(),o=r?.toLowerCase();if(rs()){let i=this._findMatchingRouteByClass(n,o);if(!i)return;let a=Object.values(i)[0]?.payload?.page||"";return this.setStaticRoutePage(a),Object.keys(i)[0]}return this._findInStaticList(n)};_findMatchingRouteByClass=(e,r)=>{if(this.staticRoutesList)return this.staticRoutesList.find(n=>Object.entries(n).some(([o,i])=>{if(!i)return!1;let s=i.payload?.page?.toLowerCase(),a=i.payload?.pageClass?.toLowerCase(),c=s===e||o.toLowerCase()===e;return r?c&&a===r:c}))};_findInStaticList=e=>{if(!this.staticRoutesList)return;let r=this.staticRoutesList.find(n=>Object.keys(n)[0].toLowerCase()===e);return r?Object.keys(r)[0]:void 0};_findMatchedRouteInDynamicList=e=>{let[r,n]=e.includes("?")?e.split("?"):[e],o=r.split("/");return this.dynamicRoutesList?.find(i=>{let[s,a]=i.includes("?")?i.split("?"):[i],c=s.split("/");if(c.length!==o.length)return!1;let l=0;for(l=0;l<c.length;l+=1){let u=c[l].toLowerCase();if(!Uo(u)&&u!==o[l]&&c2(u)!==o[l])return!1}if(a){let u=new URLSearchParams(n.toLowerCase()),p=new URLSearchParams(a.toLowerCase()),m=new Set,f=new Set,h=/\{[a-zA-Z]+\}/;for(let S of u.keys())m.add(S);for(let S of p.keys())f.add(S);if(f.size!==m.size)return!1;for(let S of m){if(!f.has(S))return!1;let A=p.get(S);if(u.get(S)!==A&&!h.test(A??""))return!1}}return!0})};_sendWarningAndErrorMessages=(e,r)=>{zh(e,r,"warning"),zh("Error in Generated Routing Table",null,"error"),zh("Back | Forward for this page may NOT work as intended",null,"warning"),zh("Bookmark | Refresh for this page may NOT work as intended",null,"warning")}},kae=new sw,ye=kae;var aw=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 r=e?.pxOperator?.pyUserName,n=r?g.decodeHtmlEntities(r):void 0,o={...e,pxOperator:e.pxOperator?{...e.pxOperator,...n?{pyUserName:n}:{}}:e.pxOperator};this.environmentInfoObject=o;let i=this.environmentInfoObject?.features||g.convertObjectWithStringToBoolean(this.environmentInfoObject?.pyFeatures)||{granularUIRefresh:!1};this.environmentInfoObject.features={...i,granularUIRefresh:i.granularUIRefresh||i.pyEnableGranularUIRefresh||!1},this.environmentInfoObject.pyGenAIEnabled=!!this.environmentInfoObject.pyGenAIEnabled,P.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&&_I(a)}gs.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 ye.getPortalName()}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,r){return r?.type==="dark"?this.darkThemeOverrides=e:this.themeOverrides=e,$.publish(d.PUB_SUB_EVENTS.UI_EVENTS.THEME_CHANGE,e),r?.type==="dark"?this.darkThemeOverrides:this.themeOverrides}getNavOrientation(){return this.nav?.orientation??this.environmentInfoObject?.pyNavOrientation}setNavOrientation(e){return this.nav={...this.nav,orientation:e},$.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,r){return r?.type==="dark"?this.brandingInfoDark=e:this.brandingInfo=e,this.brandingInfo}getCookieComplianceMethod(){return this.cookieComplianceMethod}setCookieComplianceMethod(e){this.cookieComplianceMethod=e}setLocale(e){let n=e.replaceAll("-","_").split("_").slice(0,2);this.locale=n.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 r=Reflect.get(e,"plugins");return typeof r=="object"&&r!==null&&(!!Reflect.get(r,"c11n_spa")||!!Reflect.get(r,"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(){Tr.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 r=this.environmentInfoObject?.features;return this.environmentInfoObject&&e&&(this.environmentInfoObject?.features?this.environmentInfoObject.features={...r,...e}:this.environmentInfoObject.features={...e}),this.getFeatureMap()}getFeatureMap(){return this.environmentInfoObject?.features||{}}getFeature(...e){if(e.length!==0)return g.getIn(this.getFeatureMap(),e)}setKeyMapping(e){return this.KeyMapping=e,this.KeyMapping}getKeyMapping(e){let r=this.KeyMapping[e];return r!==void 0?r: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||[]:[]}getClassesAccessList(){return this.environmentInfoObject?.pyClassesAccessList?.pxResults??[]}getUserSettings(){return this.environmentInfoObject?.pyUserSettings||null}getLocalizationVersion(){let e=this.getFeatureMap().pyLocalizationVersion,r=this.getFeatureMap().localizationVersion;return r!==void 0?r:e!==void 0?parseInt(e,10):1}getLocalizationBundles(e=this.locale){return gs.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(r=>r.pyClassName===e).map(r=>r.pyActionName)??[]}getInlineEditActionViews(e){return this.environmentInfoObject?.pyInlineEditActions?.filter(r=>r.pyClassName===e).map(r=>r.pyViewName)??[]}getFullObjectDisplayTemplate(){return this.environmentInfoObject?.pyFullObjectDisplayTemplate??void 0}setFullObjectDisplayTemplate(e){this.environmentInfoObject&&(this.environmentInfoObject.pyFullObjectDisplayTemplate=e),$.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),$.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),$.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),$.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),$.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),$.publish(d.PUB_SUB_EVENTS.UI_EVENTS.PORTAL_CONTENT_WIDTH_CHANGE,e)}},v=new aw;var Lae=t=>t.status==="fulfilled",Uae=async t=>{let e=v.getAvailableLocalePacks(),r=v.getLocalizationBundles(t),n;if(t&&e&&e.includes(t)?n=[ve("getLocalizationPack",{queryPayload:{locale:t}})]:r.length>0&&(n=r.map(c=>ve("getLocalizationPack",{queryPayload:{version:c.pyBundleVersion,bundle:c.pyBundleName}}))),!n||n.length===0)return;let o=200,i=201,s=await Promise.allSettled(n),a=vi(t??"en-US");s.filter(Lae).forEach(({value:c})=>{if([o,i].includes(c.status)&&c.data){let l=c.data;Object.keys(l).forEach(u=>{a.setLocaleForRule(l[u],u)})}})},jae=async(t=v.getLocale())=>{try{await Uae(t)}catch(e){console.warn(e)}},Xd=jae;var cw=class{static regex=/\{@P[^}]*\s*:\s*[^}]*\}/g;static subRegex=/:'[a-zA-Z0-9!@#$&()\\-`.+,/\s"]*'/;static keyMap={};static formatLocaleKey(e){let r=0,n="";for(;r<=e.length;){let o=e.indexOf("{@P ",r);if(o===-1){n+=e.substring(r,e.length);break}n+=e.substring(r,o);let i=e.indexOf("}",r),s=e.substring(o,i+1),[a,c]=this.getKeyAndValue(s);this.addKeyToMap(a,c),n+=`${s.split(":")[0]}}`,r=i+1}return n}static getKeyAndValue(e){let r=e.indexOf(":"),n=e.indexOf("}");return[`${e.substring(0,r)}}`,e.substring(r+1,n)]}static addKeyToMap(e,r){this.keyMap[e]=r}static replaceWithValue(e){let r=0,n="";for(;r<=e.length;){let o=e.indexOf("{@P ",r);if(o===-1){n+=e.substring(r,e.length);break}n+=e.substring(r,o);let i=e.indexOf("}",r),s=e.substring(o,i+1);n+=this.keyMap[s],r=i+1}return n}},lw=cw;var bI=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,r)=>{let n=e.LocaleContent,o=r.toUpperCase();o.startsWith("@BASECLASS!DATAPAGE!")&&o.split(/[!#]/).length<4?Object.entries(n).forEach(([i,s])=>{s!==null&&typeof s=="object"&&"fields"in s&&this.updateLocaleStore(s,`${o}#${i}`.toUpperCase())}):o==="GENERIC!GENERICFIELDS"?Object.entries(n).forEach(([i,s])=>{s!==null&&typeof s=="object"&&this.sanitizeLocaleField(s,i.toUpperCase())}):this.sanitizeLocaleField(n,o)};updateLocaleStore=(e,r)=>{let n=e.fields||e,o=this.localeStore[r];o?g.mergeDeep(n,o):n&&typeof n=="object"&&(this.localeStore[r]=n)};sanitizeLocaleField=(e,r)=>{["DASHBOARDSMANAGER","DATAEXPLORER","INSIGHT"].includes(r.toUpperCase())&&Object.entries(e).forEach(([,o])=>{o!==null&&typeof o=="object"&&"fields"in o&&this.updateLocaleStore(o,r)}),this.updateLocaleStore(e,r)};getLocaleForRule(e){return this.localeStore[e]}resetLocaleStore=()=>{this.localeStore={}};getLocaleValue(e,r,n,o){let i=this.#e(n,r),s=this.#t(e);s&&(e=lw.formatLocaleKey(e));let a=i?this.localeStore[i.toUpperCase()]??{}:{},c=o?this.localeStore[o.toUpperCase()]??{}:{};return n?.toUpperCase()==="MESSAGES"&&typeof e=="string"?this.getLocalizedErrorMessage(a,e)||e:s?lw.replaceWithValue(a[e]||c[e]||e):a[e]||c[e]||e}#e(e,r){return e?.toUpperCase().startsWith("@BASECLASS!DATAPAGE!")?r?`${e}#${r}`:e:e||r}getParagraphLocaleValue(e,r){let n=`${e}!${d.PARAGRAPH}!${r}`,o=this.localeStore[n.toUpperCase()];if(o){let i=typeof globalThis.atob=="function"?decodeURIComponent(globalThis.atob(o.content).split("").map(s=>`%${`00${s.charCodeAt(0).toString(16)}`.slice(-2)}`).join("")):o.content;return{category:o.category,content:i}}return null}getPortalLocaleReference(e){return v.getLocalizationVersion()!==2?"":e?`PORTAL!${e}`.toUpperCase():`PORTAL!${v.getPortalName()}`.toUpperCase()}getCaseLocaleReference(e){return e?`CASE!${e}`.toUpperCase():null}getLocalizationVersion(){return 2}async getLocaleJsons(e){if(!await this.isCurrentLocalePackAvailable())return[];let r=v.getUseLocale(),n=[],o=PCore.getLocaleUtils().localeStore;if(e=e.filter(i=>!o[i]),e=e.map(i=>i.toUpperCase()),e.length>0){let i=e.map(a=>({localeRuleKey:a,promise:Be.getSvcLocale(r,`${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&&n.push({localeRuleKey:l.localeRuleKey,jsonData:u})}}))}return n}async loadLocaleResources(e){await gs.loadLocaleBundle(e),await Promise.all(e.map(r=>Xd(r)))}setTimezone(e){this.timezone=e}getTimeZoneInUse(){let e=Intl.DateTimeFormat().resolvedOptions().timeZone;return this.timezone||e}matchPatternWithText(e,r){let n=r,o=[];for(let i=0;i<e.length;){let s=e[i];if(s.length!==0){let a=n.indexOf(s);if(a===-1)return null;if(i>0){let c=n.slice(0,a);o.push(c)}n=n.slice(a+s.length)}i+=1}return n&&o.push(n),o}getLocalizedErrorMessage(e,r){let n="";if(e[r])return e[r];for(let o of Object.keys(e)){let i=o.split(/\{\d+\}/),s=this.matchPatternWithText(i,r);if(s){let a=e[o];if(n=this.replacePlaceHolders(s,a),n)return n}}return n}replacePlaceHolders(e,r){for(let n=0;n<e.length;){if(!r.includes(`{${n+1}}`))return"";r=r.replace(`{${n+1}}`,e[n]),n+=1}return r}async isCurrentLocalePackAvailable(){let e=v.getLocale();return this.availableLangPacks||(this.availableLangPacks=await Be.getSvcAvailableLocales()),e&&this.availableLangPacks.includes(e)}getBaseComponentLabels=()=>this.getLocaleForRule("COSMOSFIELDS");#t(e){let r=!1;return e&&typeof e=="string"&&(r=e.includes("@P ")),r}},Or=t=>{let e=t??v.getLocale()??"en-US";return vi(e)};xe.registerHandler("@L",(t,e)=>e?e.getLocalizationService(e.getLocaleRuleName()).getLocalizedText(t):t);xe.registerHandler("@P",(t,e,r)=>r?J.getLitePropertyValue(r):e.getValue(t));xe.registerHandler("@E",(t,e,r)=>{try{let n=MD(t),o=kD(n);return LD(o,e,r)}catch{}return!0});xe.registerHandler("@W",(t,e,r)=>{let n;if(r){let{pageReference:o,context:i}=r;n=Qi(o,`.${d.SUMMARY_OF_WHEN_CONDITIONS}.${t}`,i)}else n=e.getContextDataValue(`.${d.SUMMARY_OF_WHEN_CONDITIONS}.${t}`);return n===!0||n==="true"});function zae(t,e,r,n){let o="",i=r;if(e.join(d.HASH_DELIMITER)&&(o=g.getHashedString(e.join(d.HASH_DELIMITER)),i=r+d.UNDERSCORE_STRING+o),n){let l=jo(),u=l?l[r]?.[i]:{};return Array.isArray(u?.[P.getDefaultQualifiedName("pxResults")])?u[P.getDefaultQualifiedName("pxResults")]:[]}let c=(t.getDataObject()?.[r]||{})?.[i]||{};return Array.isArray(c?.[P.getDefaultQualifiedName("pxResults")])?c[P.getDefaultQualifiedName("pxResults")]:[]}function Fae(t,e,r){let n=fe.getPropertyName(t?.propertyForDisplayText??""),o=fe.getPropertyName(t?.propertyForValue??""),i=r?.lastIndexOf(".")??-1,s=i>0?r?.substring(0,i):"",a=r?.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[o]||p[`.${o}`],value:p[n]||p[`.${n}`]}))}xe.registerHandler("@ASSOCIATED",(t,e)=>{let r={},n=[],o="",i="",s=e.getPageReference();if(t.startsWith(".")){o=`${s}.${t.substring(1)}`;let I=t.split(".").filter(N=>!!N);I.length>1&&(I.pop(),i=I.join(".")),r=e.getFieldMetadata(t.substring(1))}else r=e.getFieldMetadata(t),o=t;let a=r?.datasource?.tableType,c=r?.datasource?.mode===d.READONLY,l=r?.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 Fae(r?.datasource,e,t.substring(1));if(a!==d.DATA_PAGE){let I=e.getLocalizationService(r?.localeReference);return r?.datasource?.records?.map(N=>({key:N.key,value:I.getLocalizedText(N.value)}))}let p=fe.getPropertyName(r?.datasource?.propertyForDisplayText),m=fe.getPropertyName(r?.datasource?.propertyForValue),f=Array.isArray(r?.datasource?.parameters)?r?.datasource?.parameters:[],h=e.getContextName(),S=[];if(f.forEach(I=>{if(fe.isProperty(I?.value)){let N=re(`.${g.getFullPropertyReference([i,fe.getPropertyName(I.value)])}`,s,h);S.push(g.getFullPropertyReference([s,i,fe.getPropertyName(I?.value)])),(N==null||N==="")&&(N=d.NULL_STRING),n.push(N)}else n.push(I?.value||d.NULL_STRING)}),h){let I=ka.getContextObjectByName(h)||{};S.forEach(N=>{if(N in I){let x=I[N];I[N]=[...new Set([...x,o])]}else I[N]=[o]}),ka.addContextName(h,I)}let A=zae(e,n,l,c),C=e.getLocalizationService(),_=I=>C.getLocalizedDataPage(I,l,p);return A.map(I=>{let N=I[p]||I[`.${p}`];return typeof N=="string"&&(N=_(N)),{key:I[m]||I[`.${m}`],value:N}})});xe.registerHandler("@ROUTING_INFO",(t,e)=>ym(e.getContainerName(),e.getContextName()));xe.registerHandler("@ENV",(t,e)=>{let r=mE(t);return r?r(e):t});xe.registerHandler("@DATASOURCE",(t,e)=>{let r=e.getSharedDataPageForReferenceList()||e.getValue(t)||[],n=e.getComponentConfig(),o=Object.keys(n).find(i=>n[i]?.source?.includes(t));if(o){let{fields:i,copyAll:s,filterDownloadedFields:a}=n[o],c=[];return r.forEach(l=>{let u={};s||a?Object.keys(l).forEach(p=>{let m=fe.getPropertyName(p);u[m]=l[m]}):Object.keys(i).forEach(p=>{let m=fe.getPropertyName(i[p]);u[p]=l[m]}),c.push(u)}),c}return[]});xe.registerHandler("@FIELD_META",(t,e)=>{let r={};t.startsWith(".")?r=e.getFieldMetadata(t.substring(1)):r=e.getFieldMetadata(t);let n;if(r&&r.datasource&&r.datasource.parameters){let o="",i=t.split(".").filter(s=>!!s);if(i.length>1&&(i.pop(),o=`.${i.join(".")}`),Array.isArray(r.datasource.parameters)){let s=[];r.datasource.parameters.forEach(a=>{let c={},{name:l,value:u}=a;c.name=l,typeof u=="string"&&u.startsWith("@P")?c.value=`@P ${o}${u.substring(3)}`:c.value=u,s.push(e.resolveConfigProps(c))}),n=s}else n=e.resolveConfigProps(r.datasource.parameters);r={...r,datasource:{...r.datasource,parameters:n}}}return r});xe.registerHandler("@USER",(t,e,r)=>{let n=r?J.getLitePropertyValue(r,t):e.getValue(t),o=r?J.getReferencedUser(n,r):e.getReferencedUser(n);return{userId:n,userName:o?o.UserName:null}});xe.registerHandler("@ACTIVE_CASES",(t,e)=>gn.getOpenedCaseItems(`${e.getContextName()}/${e.getContainerName()}`));xe.registerHandler("@LR",t=>t);xe.registerHandler("@CASE",(t,e)=>t===d.ID?e.getCaseInfo().getKey():t);xe.registerHandler("@SHARED",t=>$n.getSharedState(t));xe.registerHandler("@PARAGRAPH",(t,e)=>{let{useDecision:r,isBanner:n,messageType:o,dismissBanner:i}=So.getParagraphProperties(t,e),s=So.hasDecisionBannerContent(t,e);return r&&s?So.processBannerDecisionParagraph(t,e):n?{htmlContent:So.processParagraph(t,e),messageType:o,dismissBanner:i}:So.processParagraph(t,e)});xe.registerHandler("@FORMAT",(t,e)=>{let r=e.getCurrentClassID(),n=uw(t,r);if(!n?.dynamicContents?.length)return null;let{dynamicContents:o}=n;for(let i=0;i<o.length-1;i+=1)if(J.resolveWhen(o[i].when,e))return{pattern:o[i].content};return{pattern:o[o.length-1].content}});xe.registerHandler("@FILTERED_LIST",(t,e)=>{let r=t.substring(1,t.indexOf("[")),n=t.substring(t.indexOf("]")+2),o=t.substring(t.indexOf("[")+1,t.indexOf("]"));if(!e)return null;let{useCustomContext:i}=e,s;return g.isEmpty(i)?s=e.getValue(`.${r}`):(s=i,s=g.getIn(s,r)),s&&n.length>0?(o&&(s=s.filter(a=>pI(o,a))),s.map(a=>g.getIn(a,n))):null});xe.registerHandler("@ADDRESS",(t,e)=>{let r=e.getValue(t)?.[P.getDefaultQualifiedName("pyCountry")];return r?`${PCore.getDefaultQualifiedName("pyAddressForm")}_${r}`:PCore.getDefaultQualifiedName("pyAddressForm")});xe.registerHandler("@DATATYPE",(t,e)=>e.getValue(t));xe.registerHandler("@ATTACHMENT",(t,e,r)=>{let n;return r?n=J.getLitePropertyValue(r):n=e.getValue(t),gu.prepareAttachmentData(n)});var Vae=t=>t.startsWith(".")?t.slice(1):t,j6=t=>{let e=t.lastIndexOf(".");return e<0?t:t.slice(e+1)};xe.registerHandler("@FL",(t,e)=>{let r=Vae(t),n=e.getFieldMetadata(r);return!n||!n.label?j6(r):e.getLocalizationService(n.localeReference).getLocalizedText(n.label)});xe.registerHandler("@DEFERRED",(t,e)=>e.getFieldMetadata(t)?.isDeclarativeTarget?{isDeferred:!0,propertyName:t}:e.getValue(t));xe.registerHandler("@GENAICOACH",(t,e)=>dw(t,e.getCurrentClassID()));xe.registerHandler("@AIAGENT",(t,e)=>{let r=pw(t,e.getCurrentClassID());if(r)return r;let n=e.getComponentConfig();if(n){let o=n?.coaches?.find(i=>i?.config?.coach?.substring(9)===t&&i?.config?.ruleNamespace)?.config;if(o?.label){let i={label:o.label};e.resolveConfigProps({label:o.label},i);let s=i.label;return{insName:v.getFeatureMap()?.isNamespaceEnabled&&t.includes(d.DOUBLE_UNDERSCORE_STRING)?t:`${o.ruleNamespace}${d.DOUBLE_UNDERSCORE_STRING}${t}`,label:e.getLocalizedValue(s),type:"agent"}}}return null});xe.registerHandler("@REFRESH",(t,e)=>{let r=e.getCaseInfo().getKey(),n=e.getContextName(),o=e.getPageReference(),i={autoDetectRefresh:!0,preserveClientChanges:!1};Ti.registerForRefresh("PROP_CHANGE",e.getActionsApi().refreshCaseView.bind(e.getActionsApi(),r,"",o,{...i,refreshFor:`${o.replace("caseInfo.content","")}${t}`,resetForm:!0}),`${o}${t}`,`${n}/${o}`,n)});xe.registerHandler("@DW",(t,e,r)=>{let n,o=`${d.CONTEXT_DATA}.${d.SUMMARY_OF_DYNAMIC_WHENS}.${t}`;if(r){let{context:i}=r??{};n=re(o,null,i)}else n=e.getValue(o);return n===!0||n==="true"});xe.registerHandler("@CA",(t,e,r)=>r?J.getLitePropertyValue(r):e.getValue(t));function TI(t){return t&&t.startsWith("@")?t.replace(/^@\w+\s+\./,""):t}function Bae(t,e){let r=t.value&&typeof t.value=="string"&&TI(t.value);return r?r===e:!1}function z6(t,e){let r=t.authorContext;return typeof r!="string"||!r?!1:(r.startsWith(".")?r.substring(1):r)===e}function fw(t,e,r){let n=t.config;if(!n?.name||typeof n.name!="string")return null;let o=e(n.name);return o?Array.isArray(o)?o.length===1?o[0]:o.find(i=>i.classID===n.ruleClass)??o.find(i=>i.classID===r)??null:o:null}function V6(t,e,r,n,o=[]){if(t.config&&Bae(t.config,e)&&o.push({type:t?.type,config:t.config}),!t.children)return o;for(let i=0;i<t.children.length;i+=1){let s=t.children[i],a=s.type==="reference"?fw(s,r,n):s;a&&V6(a,e,r,n,o)}return o}var Hae=new Set(["autocomplete","dropdown","combobox"]);function B6(t){let e=t.config;return e?e.template==="DataReference"&&typeof e.displayAs=="string"&&Hae.has(e.displayAs.toLowerCase())&&e.selectionMode!=="multi":!1}function Gae(t){let e=t?.children;return Array.isArray(e)&&e.length>0?e[0]:null}function qae(t){let e=t.config??{},r={};return(e.contextClass!==void 0||e.targetObjectClass!==void 0)&&(r.contextClass=e.contextClass??e.targetObjectClass),e.referenceList!==void 0&&(r.referenceList=e.referenceList),r.parameters=e.parameters,r.name=e.name,r}function Wae(t){let r=(Array.isArray(t?.inheritedProps)?t.inheritedProps:[]).reduce((o,i)=>(typeof i!="object"||i===null||Array.isArray(i)||"prop"in i&&typeof i.prop=="string"&&"value"in i&&(o[i.prop]=i.value),o),{}),n={};return n.referenceType=t.referenceType,n.ruleClass=t.ruleClass,n.authorContext=t.authorContext,t.visibility!==void 0&&(n.visibility=t.visibility),t.readOnly!==void 0&&(n.readOnly=t.readOnly),t.disabled!==void 0&&(n.disabled=t.disabled),t.required!==void 0&&(n.required=t.required),t.isManyToMany!==void 0&&(n.isManyToMany=t.isManyToMany),{...n,...r}}function H6(t,e,r){let n=qae(t),o=Gae(t),i=Wae(e),s={...o?.config,...n,...i};return Array.isArray(r)&&r.length>0&&(s.descriptors=r),s.dataRelationshipContext=s.contextClass&&s.name?s.name:null,{type:o?.type,config:s}}function Kae(t,e,r,n,o){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||!B6(a))return null;let c=[];if(o){let l=typeof t.ruleClass=="string"&&t.ruleClass?t.ruleClass:n,u=o(r,l);u&&typeof u=="object"&&"descriptors"in u&&u.descriptors&&Array.isArray(u.descriptors)&&u.descriptors.length>0&&(c=u.descriptors)}return H6(a,t,c)}catch{return null}}function G6(t,e,r,n=[],o="",i){if(t.config&&z6(t.config,e)){let s=Kae(t.config,r,e,o,i);s&&n.push(s)}if(!t.children)return n;for(let s=0;s<t.children.length;s+=1){let a=t.children[s],c=a.type==="reference"&&!(a.config&&z6(a.config,e))?fw(a,r,o):a;c&&G6(c,e,r,n,o,i)}return n}function Jae(t,e){return!t||typeof t!="object"?null:Array.isArray(t)?t.find(n=>n.classID===e)??null:t}function Yae(t){let e=v.getInlineEditActionViews(t);return e&&e.length>0?e[0]:P.getDefaultQualifiedName("pyEdit")}function q6(t,e){let r=Yae(t),n=e(r);return Jae(n,t)}function gw(t,e,r,n){let o=q6(e,r);if(!o)return[];let i=V6(o,t,r,e);return i.length>0?i:G6(o,t,r,[],e,n)}function F6(t,e){let r=t.parameters;return!r||typeof r!="object"||Array.isArray(r)?!1:Object.values(r).some(n=>{let o=TI(n);return e.some(i=>o===i||o.startsWith(`${i}.`))})}function mw(t,e,r,n,o=[]){if(t.config&&F6(t.config,e)&&t.type!=="View"&&o.push({type:t.type,config:t.config,children:t.children}),!t.children)return o;for(let i=0;i<t.children.length;i+=1){let s=t.children[i];if(s&&s.type==="reference"&&s.config){let a=fw(s,r,n);a&&a.config&&(B6(a)&&F6(a.config,e)?o.push(H6(a,s.config)):mw(a,e,r,n,o))}else mw(s,e,r,n,o)}return o}function W6(t,e,r,n){let o=q6(e,r);if(!o)return[];let i=gw(t,e,r);if(!i||i.length===0)return[];let s=[],a=TI(i[0].config.value);if(a&&s.push(a),n){let c=n(t,e);c&&!Array.isArray(c)&&(c?.descriptors||[]).forEach(u=>{let p=TI(u);p&&!s.includes(p)&&s.push(p)})}return mw(o,s,r,e)}var K6={},J6={},RI={},Cw=0,PI=!1,Iw={},vI={},Sw={},Ew={},Aw={},za={},Y6={},Z6={},Q6={},hw={},yw={},Zae=(t,e,r,n)=>{let o=Array.isArray(r)?r:[r];(Array.isArray(n)?n:[n]).forEach(s=>{let a=o.findIndex(c=>c.classID===s.classID);if(a===-1)o.push(s);else{let c={isDeclarativeTarget:!1},l={...o[a],...c,...s};o[a]=l}}),e[t]=o.length===1?o[0]:o},Fn=(t={},e={})=>{if(Object.keys(e).length===0){g.copy(t,e);return}Object.keys(t).forEach(r=>{let n=t[r],o=e[r];o?Zae(r,e,o,n):e[r]=n})},lt=(t,e="")=>{if(!t)return null;let r=vI[t];if(!r)return null;if(!e)return g.deepClone(r);let n;return Array.isArray(r)?n=r.find(o=>o.classID.toLowerCase()===e.toLowerCase()||o.associationClassID?.toLowerCase()===e.toLowerCase())||null:n=r.classID.toLowerCase()===e.toLowerCase()||r.associationClassID?.toLowerCase()===e.toLowerCase()||(r.type==="Page"||r.type==="Page List")&&r?.pageClass?.toLowerCase()===e.toLowerCase()?r:null,n?g.deepClone(n):null},vi=t=>(hw[t]||(hw[t]=new bI),hw[t]),Qae=(t,e)=>(yw[t]||(yw[t]=e()),yw[t]),NI=(t,e,r,n=[])=>{if(!e||!t)return null;if(!t.includes(".")){let a,c=lt(t,e);return n.length&&(a=n.join(".")),{...c,embeddedType:r,category:a}}let[o,...i]=t.split("."),s=lt(o,e);return s&&n.push(s.label),NI(i.join("."),s?.pageClass,s?.type,n)},_w=t=>{Object.keys(t).length!==0&&(Fn(t,RI),PI&&(Cw+=1))},Xae=()=>Cw,AD=()=>{PI=!0},CD=()=>{PI=!1},bw=t=>{Fn(t,Iw)},ece=t=>{t.views&&Object.keys(t.views).length>0&&(Fn(t.views,RI),PI&&(Cw+=1)),t.navigations&&Fn(t.navigations,Iw),t.personalizations&&Fn(t.personalizations,Ew),t.insights&&Fn(t.insights,Aw),t.paragraphs&&Fn(t.paragraphs,K6),t.formats&&Fn(t.formats,J6),t.dataTypes&&Fn(t.dataTypes,za),t.datapages&&Fn(t.datapages,Y6),t.genAICoaches&&Fn(t.genAICoaches,Z6),t.AIAgents&&Fn(t.AIAgents,Q6)},tce=t=>{let e=t.fields||{};Object.keys(e).forEach(r=>{let n=e[r];if(Array.isArray(n)){if(n.forEach(o=>{t.datapages&&o.datasource&&o.datasource.tableType==="DataPage"&&(o.datasource.mode=t.datapages?.[o.datasource.name].mode);let i=Ri(Cn.FIELD,r,o.definedOnClassID??o.classID);o.localeReference=i}),n.length===1){let[o]=n;e[r]=o}}else t.datapages&&n?.datasource&&n.datasource.tableType==="DataPage"&&(n.datasource.mode=t.datapages[n.datasource.name].mode)})},xm=t=>{ece(t),tce(t);let{datapages:e={}}=t;Object.keys(e).forEach(r=>{Sw[r]=e[r]}),Fn(t.fields,vI)},$a=t=>RI[t],uT=(t,e)=>{let r=RI[t];return Array.isArray(r)?r.some(n=>n.classID===e):r?.classID===e},Tw=t=>Iw[t],zr=t=>t in Sw?Sw[t]:null,OI=t=>t in Ew?Ew[t]:null,vw=t=>t in Aw?Aw[t]:null,Rw=t=>{let e={};return Object.keys(vI).forEach(r=>{let n=vI[r],o;Array.isArray(n)?o=n.find(i=>t===i.classID):t===n.classID&&(o=n),o&&(e[r]=g.deepClone(o))}),e},rce=(t,e)=>{let n=lt(t,e)?.datasource?.parameters;return n?g.deepClone(n):null},xc=(t,e)=>{let r=null,n=K6[t];return n&&(Array.isArray(n)?r=n.find(o=>o.classID===e):n.classID===e&&(r=n)),r?g.deepClone(r):null},uw=(t,e)=>{let r=null,n=J6[t];return n&&(Array.isArray(n)?r=n.find(o=>o.classID===e):n.classID===e&&(r=n)),r?g.deepClone(r):null},dw=(t,e)=>{let r=null,n=Z6[t];return n&&(Array.isArray(n)?r=n.find(o=>o.classID===e):n.classID===e&&(r=n)),r?g.deepClone(r):null},pw=(t,e)=>{let r=null,n=Q6[t];return n&&(Array.isArray(n)?r=n.find(o=>o.classID===e):n.classID===e&&(r=n)),r?g.deepClone(r):null},Gx=t=>{if(t in za){let{savableDataPage:e}=za[t];return e}return null},qx=t=>{let e=Y6[t];if(!e)return null;let{classID:r,isAlternateKeyStorage:n,parameters:o}=e;if(n)return o.map(s=>({keyName:s.name,isAlternateKeyStorage:n,linkedField:s.linkedField}));let i=za[r];return i?i.classKeys.map(s=>({keyName:s,isAlternateKeyStorage:n})):[]},Wx=t=>{if(t in za){let{lookupDataPage:e}=za[t];return e}return null},Kx=t=>{if(Object.hasOwn(za,t)){let{lookupDataPageInfo:e}=za[t];return e}return null},vD=(t,e)=>{let r=t.split("."),n=r.pop(),o=new sa({options:{pageReference:`${r.join(".")}`,context:e}}),i=lt(n,o.getCurrentClassID())?.additionalInformation;if(!i?.includes("@PARAGRAPH"))return i;let s=fe.trimAnnotation(i);return So.processParagraph(s,o)},nce=(t,e)=>{let r=t.split("."),n=r.pop(),o=new sa({options:{pageReference:`${r.join(".")}`,context:e}}),i=lt(n,o.getCurrentClassID()),s={};return o._classID=o.getCurrentClassID(),o.resolveConfigProps(i,s),s},oce=(t,e)=>gw(t,e,$a,lt),ice=(t,e)=>W6(t,e,$a,lt);var Pw=class t{name;cascadeSubscribers;cascadeResetSubscribers;listChangeSubscribers;constructor(){this.name="CascadeManager",this.cascadeSubscribers={},this.cascadeResetSubscribers={},this.listChangeSubscribers=[]}registerResetDependencies(e,r,n,o,i,s="singleRecord"){if(!e||!n||!o?.length)return;let a=n.startsWith(".")?`${r}.${n.substring(1)}`:n,c=this.cascadeResetSubscribers[e]||{},l=this._handlePageReference(r,n,i);o.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(h=>h.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,r,n,o,i){if(!e||!n||!o?.length)return;let s=n.startsWith(".")?`${r}.${n.substring(1)}`:n,a=this.cascadeResetSubscribers[e]||{},c=this._handlePageReference(r,n,i);o.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];g.removeExistingDependentProperty(p,s)}}}),Object.keys(a).length>0&&(this.cascadeResetSubscribers[e]=a)}getResetDependencies(e,r){return this.cascadeResetSubscribers[e]?.[r]||[]}purgeResetDependencies(e){e&&this.cascadeResetSubscribers[e]&&delete this.cascadeResetSubscribers[e]}registerFields(e,r,n,o,i){this.cascadeSubscribers[e]=this.cascadeSubscribers[e]||{},n?.forEach(s=>{this.cascadeSubscribers[e][`${r}${s}`]=this.cascadeSubscribers[e][`${r}${s}`]||{};let a=this.cascadeSubscribers[e][`${r}${s}`];if(!a[i]){a[i]=o;let c=re(s,r,e);a.previousValue=typeof c=="object"?null:c}})}registerListField(e,r,n,o,i){let s=t._getFieldsForList(e,r,n);s.length>0&&(this.registerFields(e,r,s,o,i),Hd.enableCascade(e))}unRegisterListField(e,r,n,o){let i=t._getFieldsForList(e,r,n);i.length>0&&this.unRegisterFields(e,r,i,o)}static _getFieldsForList(e,r,n){let o=[],i=lt(n,re("classID",r,e));return i&&!Array.isArray(i)&&i.datasource&&i.datasource.parameters&&Object.values(i.datasource.parameters).forEach(s=>{if(fe.isProperty(s)){let a=fe.trimAnnotation(s);o.push(a)}}),o}unRegisterFields(e,r,n,o){this.cascadeSubscribers[e]&&n?.forEach(i=>{if(!this.cascadeSubscribers[e][`${r}${i}`])return;let s=this.cascadeSubscribers[e][`${r}${i}`];s[o]&&delete s[o]})}triggerCascade(e,r,n,o){let i=!1;this.cascadeSubscribers[e]&&this.cascadeSubscribers[e][r]&&(Object.keys(this.cascadeSubscribers[e][r]).forEach(s=>{let a=this.cascadeSubscribers[e][r];s!=="previousValue"&&a.previousValue!==n&&(i=!0,o?o.add(a[s]):a[s](r,n))}),i&&(this.cascadeSubscribers[e][r].previousValue=n))}purgeCascadeFields(e){delete this.cascadeSubscribers[e]}handleServerChanges(e,r=[],n=[]){if(!e)return;let o=new Set;n.forEach(i=>{let s=re(i,"",e);this.triggerCascade(e,i,s,o)}),o.forEach(i=>{i()}),!(this.listChangeSubscribers.length===0||r.length===0)&&r.forEach(i=>{this.listChangeSubscribers.forEach(s=>{let a=re(i,"",e);s(e,i,a)})})}_updateChangedProperties(e,r,n,o,i,s,a,c){let l=n&&c.some(u=>o.startsWith(u));if(e!==r||l){let u=o.lastIndexOf("."),p=o.substring(0,u),m=o.substring(u);if($u.getMessages({type:"error",property:m,context:i,pageReference:p})?.length>0&&a.push(o),!n)return;s.push(o)}}isChangedListPropertyExist(e){let r=!0;return(this.listChangeSubscribers.length===0||!g.isValidPageListProperty(e))&&(r=!1),r}_getServerProperties(e,r,n,o,i,s,a){if(typeof e!="object"){i.push(n.replace(/\.(\d+)/g,"[$1]"));let l=this.isChangedListPropertyExist(n);n=n.replace(/\.(\d+)/g,"[$1]");let u=re(n,"",r);if(u===void 0&&!e&&e!==0)return;this._updateChangedProperties(u,e,l,n,r,o,s,a);return}let c=Object.keys(e??{});for(let l=0,u=c.length;l<u;l+=1){let p=c[l],m=`${n}.${p}`;if(Array.isArray(e[p])){let f=re(m,"",r);(!f||f?.length!==e[p].length)&&a.push(m.replace(/\.(\d+)/g,"[$1]"))}this._getServerProperties(e[p],r,m,o,i,s,a)}}getServerProperties(e,r,n=d.CASE_INFO.CASE_INFO_CONTENT){let o=[],i=[],s=[],a=[],c=g.getIn(e,n);return!c||!r?{changedListProperty:o,leafProperty:s,changedPropertyWithError:i}:(this._getServerProperties(c,r,n,o,s,i,a),{changedListProperty:o,leafProperty:s,changedPropertyWithError:i})}_handlePageReference(e,r,n){let o=e;if(n==="Page"&&r.startsWith(".")&&r.slice(1).includes(".")){let i=r.substring(0,r.lastIndexOf("."));o=`${e}${i}`}return o}_resolveDependentPropertyReference(e,r){let n=r.match(/^(Parent(?:\.Parent)*)(?:\.(.*))?$/);if(!n)return g.getFullPropertyReference([e,r]);let o=n[1].split(".").length,i=n[2]||"",s=e.split("."),a=s.slice(0,Math.max(s.length-o,0)).join(".");return i?a?`${a}.${i}`:i:a}registerForListChanges(e=()=>{}){this.listChangeSubscribers.push(e)}unRegisterForListChanges(){this.listChangeSubscribers=[]}},Cr=new Pw;var sce=/\.(?![^[]+\])|\[|\]/g,ace=new Set(["createWork","showHarness","openAssignment","openWorkByHandle","initRouting"]),Ow=null,oo=t=>t?.split(sce).filter(Boolean),xw=t=>{Ow=t},we=()=>Ow,T=t=>{if(!t)return;let e=[],r=[],n=[];!Array.isArray(t)&&t.type==="MERGE_DATA"&&({changedListProperty:e,leafProperty:r,changedPropertyWithError:n}=Cr.getServerProperties(t.payload.data,t.payload.context,t.payload.rootPageReference)),Ow?.dispatch(t),!Array.isArray(t)&&t.type==="MERGE_DATA"&&(n.length&&!t.payload.skipValidation&&n.map(i=>{let s=i.lastIndexOf(".");return{property:i.substring(s),pageReference:i.substring(0,s)}}).forEach(({property:i,pageReference:s})=>{$u.clearMessages({type:"error",property:i,pageReference:s,context:t.payload.context});let a=be.getFieldReferenceForProperty(t.payload.context,`${s}${i}`);if(a){let c=J.resolveContextTreeNodeProps(a.props);Dt.validate(c.componentName?.toLowerCase(),c.propertyName,J.getLitePropertyValue(c,c.propertyName),c)}}),Cr.handleServerChanges(t.payload.context,e,r))},W=t=>we()?.getState().data?.[t],jo=()=>we()?.getState().data[d.SHARED],cce=t=>!!(t&&!t.startsWith('"')&&!t.startsWith("'")),lce=t=>t&&t.trim().substring(1,t.length-1),Nw=(t,e,r)=>{if(!cce(t))return lce(t);let n=t?.startsWith(".")?e+t:t,o=oo(n);return g.getIn(r,o)},re=(t,e,r)=>Nw(t,e,W(r)),Qi=(t,e,r)=>t?Nw(e,`${d.CONTEXT_DATA}.${t}`,W(r)):Nw(e,`${d.CONTEXT_DATA}`,W(r)),uce=(t,e,r)=>{let n=oo(`${e}.${r}`);return g.getIn(t,n)},La=(t,e,r)=>uce(W(r),`${d.CONTEXT_DATA}.${t}`,e),dce=t=>{let{context:e}=t;if(we()?.getState().data[e])return K_;let{action:n}=t;return ace.has(n)?Et:K_},Dw=(t,e)=>{let r=oo(e);return g.deleteIn(t,r)},X6=t=>!Array.isArray(t)&&typeof t=="object",xI=(t,e=[],r=[])=>{let n=new Set(r);Array.isArray(e)&&e.length>0&&e.forEach(o=>{o.allowMultiple?o.allowMultiple&&!n.has(o.path)&&g.setIn(t,o.path,[]):g.setIn(t,o.path,{})}),r.length>0&&g.rearrangeProperties(r,t)},xt=(t,e,r={})=>{let{isArrayDeepMerge:n,propertiesToReplace:o=[],propertiesToReArrange:i=[]}=r;Array.isArray(t)&&!e&&(e=[]),(o.length>0||i.length>0)&&xI(t,o,i);let s=(a,c)=>{if(X6(a)&&c!==null&&typeof c!="string"&&typeof c!="number"&&typeof c!="boolean")return Array.isArray(c)?c:Li(a,c,s);if(Array.isArray(a)&&c!==null&&Array.isArray(c)){if(n)return Li(a,c,s);{let l=c.length;if(typeof n>"u"&&l===a.length)return Li(a,c,s)}}return c===""&&a&&typeof a=="object"?a:c};return s(t,e)},ww=(t,e,r,n={isArrayDeepMerge:!0})=>{let{isArrayDeepMerge:o}=n,i=oo(e),s=g.getIn(t,i);if(typeof r=="object"&&r!==null){if(s===r)return t;let a=xt(s,r,{isArrayDeepMerge:o});return g.setIn(t,i,a)}return g.setIn(t,i,r)},$w=(t,e,r)=>{let n=oo(e);return g.setIn(t,n,r)},ys=()=>{let t=Ks,{promise:e,actionMgrID:r}=w.actionManagerPromise(t);return T({type:t,payload:{actionMgrID:r}}),e},Gd=t=>!!we()?.getState()?.data?.[t];var pce=" @#$%=!<>/\\",mce=/^[^/]+\/[^/]+\.[^/.]+$/,fce=typeof structuredClone=="function",Mw=class t{static mergeDeep(e,r){return Li(r,e)}static hasIn(e,r){return Y1(e,r)}static getIn(e,r,n){return dm(e,r,n)}static setIn(e,r,n){return Q1(e,r,n)}static deleteIn(e,r){return W1(e,r)}static isObjectEmpty(e){return!e||Object.entries(e).length===0}static isEmpty(e){return Nk(e)}static deepClone(e={}){if(e===null||typeof e!="object")return e;if(fce)try{return structuredClone(e)}catch{}return JSON.parse(JSON.stringify(e))}static copy(e,r){Object.keys(e).forEach(n=>{r[n]=e[n]})}static isPropertyRef(e){if(!e||!e.includes("."))return!1;for(let r=0;r<e.length;r+=1)if(pce.includes(e[r]))return!1;return!0}static isValidPropertyReference(e){return typeof e!="string"?!1:e===""||e.trim()!==""}static isWhenExist(e){let r=["visibility","disabled","readOnly","required"],n=!1;for(let o of Object.keys(e)){let i=e[o];i&&typeof i=="object"&&!Array.isArray(i)?n=n||t.isWhenExist(i):r.includes(o)&&typeof i=="string"&&i?.startsWith("@W ")&&(n=!0)}return!n&&e?.type==="multirecordlist"&&e?.renderMode==="Editable"&&(n=Object.keys(e?.allowActions??{}).some(o=>typeof e?.allowActions?.[o]=="string"&&e.allowActions[o]?.startsWith("@W "))),n}static getWhenNames(e){let r=["visibility","disabled","readOnly","required"],n="",o=new Set;if(e&&Object.keys(e).forEach(i=>{let s=e[i];r.includes(i)&&typeof s=="string"&&s.startsWith("@W ")&&(n=fe.trimAnnotation(s),o.add(n))}),e?.type==="multirecordlist"&&e?.renderMode==="Editable"){let i=e?.allowActions??{};Object.keys(i).forEach(s=>{typeof i[s]=="string"&&i[s]?.startsWith("@W ")&&(n=fe.trimAnnotation(i[s]),o.add(n))})}return[...o]}static isExpressionExist(e){let r=["disabled","visibility","readOnly","required"],n=!1;for(let o of Object.keys(e))r.includes(o)&&typeof e[o]=="string"&&e[o]?.startsWith("@E ")&&(n=!0);return n}static buildDataObject(e,r){let n={},o=n;return r.indexOf(".")>0?r.split(".").forEach(s=>{if(s.includes("[")){let[a]=s.split("[");n[a]=[],n=n[a],s=s.substring(s.indexOf("[")+1,s.lastIndexOf("]"))}n[s]={},n=n[s]}):(n[r]={},n=n[r]),Object.keys(e).forEach(i=>{let s=i;i.startsWith(".")&&(s=i.substring(1)),n[s]=e[i]}),o}static buildObject=(e,r,n)=>{if(n===void 0)return;let o=e.split("."),i=0;for(;i<o.length-1;i+=1){let s=o[i];s?.toString().length&&!r[s]&&(r[s]={}),r[s]&&(r=r[s])}typeof n=="object"?(r[o[i]]||(r[o[i]]=Array.isArray(n)?[]:{}),xt(r[o[i]],n,{isArrayDeepMerge:!0})):r[o[i]]=n};static crc32(e){let r=-1,n=t.getUtf8Bytes(e);for(let o of n)r=r>>>8^t.CRC32_TABLE[(r^o)&255];return(r^-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 r=[];for(let n=0;n<e.length;n+=1){let o=t.getCodePoint(e,n);r.push(...t.encodeCodePoint(o.value)),n=o.nextIndex}return r}static getCodePoint(e,r){let n=e.charCodeAt(r),o=e.charCodeAt(r+1);return n>=55296&&n<=56319&&o>=56320&&o<=57343?{value:65536+(n-55296<<10)+(o-56320),nextIndex:r+1}:n>=55296&&n<=57343?{value:65533,nextIndex:r}:{value:n,nextIndex:r}}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 r=0;r<256;r+=1){let n=r;for(let o=0;o<8;o+=1)n=n&1?3988292384^n>>>1:n>>>1;e[r]=n>>>0}return e})();static utf8Encoder=null;static getHashedString(e){return t.crc32(e).toString(16)}static getPropertyName(e){if(e){let r=e.startsWith("@P"),n=r?e.indexOf(" "):-1;return r?e.substring(n+2):e}return e}static getPropertyNameFromDependency(e){return typeof e=="string"?e:e.propertyName}static isValidJson(e){try{return JSON.parse(e)}catch(r){return console.error("not a Valid JSON",r),!1}}static isEqual(e,r){return lo(e,r)}static isContains(e,r){let n=Object.keys(e);for(let o=0;o<n.length;o+=1)if(e[n[o]]&&t.isEqual(e[n[o]],r))return!0;return!1}static removeExistingDependentProperty(e,r){let n=e.findIndex(o=>o.propertyName===r);n>=0&&e.splice(n,1)}static getFullPropertyReference(e){return Array.isArray(e)?e.filter(r=>!!r).join("."):""}static iterateLeafNodes(e,r){let n=(o,i=[])=>{Object.entries(o).forEach(([s,a])=>{i.push(Array.isArray(o)?Number(s):s),Array.isArray(a)?a.forEach((c,l)=>{i.push(l),n(c,i),i.pop()}):a!==null&&typeof a=="object"?n(a,i):r(i.slice(),a),i.pop()})};n(e)}static resolveStringBooleans(e){let r=["required","readOnly","visibility"],n=o=>o==="true";return Object.keys(e).forEach(o=>{r.includes(o)&&typeof e[o]=="string"&&(e[o]=n(e[o]))}),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 r={};return Object.entries(e).forEach(([n,o])=>{let i=n.split("."),s;i.reduce((a,c,l)=>(a[c]?s=a[c]:Number.isNaN(Number(i[l+1]))?i.length-1===l?s=o:s={}:s=[],a[c]=s,a[c]),r)}),r}static flatten(e,r,n){r||(r=""),Array.isArray(e)?e.forEach((o,i)=>{t.flatten(o,`${r}[${i}]`,n)}):typeof e=="object"&&e!==null?Object.keys(e).forEach(o=>{let i=r?`${r}.${o}`:o;t.flatten(e[o],i,n)}):n[r]=e}static buildInstructionPageReference(e,r){let o=e.startsWith(d.OBJECT_INFO.OBJECT_INFO)?`${e}${r}`.replace(d.OBJECT_INFO.OBJECT_INFO_CONTENT,""):`${e}${r}`.replace(d.CASE_INFO.CASE_INFO_CONTENT,"").replace(d.DATA_INFO.DATA_INFO_CONTENT,"");return oi.formatPageReference(o)}static convertPageRefToClipboardPageNotation(e){let r=/\[\d+\]/g;return e.replace(r,n=>n.replace(/\d+/g,o=>`${parseInt(o,10)+1}`).replace("[","(").replace("]",")"))}static convertClipboardPageToPageRefNotation(e){let r=/\(\d+\)/g;return e.replace(r,n=>n.replace(/\d+/g,o=>`${parseInt(o,10)-1}`).replace("(","[").replace(")","]"))}static segmentsMatch=(e,r)=>{let n=e.split("."),o=r.split(".");return n.length!==o.length?!1:n.every((i,s)=>{if(i===o[s])return!0;if(i.endsWith("()")){let a=i.slice(0,-2),c=o[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(r=>r.payload.actionMgrID&&w.rejectActionByID(r.payload.actionMgrID)),!0}static isValidAnnotation(e){let r=new Set(["@DATASOURCE","@ACTIVE_CASES","@ADDRESS","@ASSOCIATED","@ATTACHMENT","@CASE","@FILTERED_LIST","@PARAGRAPH","@P","@ROUTING_INFO","@USER","@W","@E","@SHARED","@CA"]),n=e.indexOf(" "),o=e.substring(0,n);return r.has(o)}static trimDotForProperty(e){return typeof e=="string"&&e.startsWith(".")?e.substring(1):e}static decodeHtmlEntities(e){if(typeof document<"u"){let o=document.createElement("textarea");return o.innerHTML=e,o.value}let r={"&":"&","<":"<",">":">",""":'"',"'":"'","'":"'","/":"/","/":"/"},n=e;return Object.entries(r).forEach(([o,i])=>{n=n.split(o).join(i)}),n=n.replace(/&#(\d+);/g,(o,i)=>String.fromCharCode(parseInt(i,10))),n=n.replace(/&#x([a-f\d]+);/gi,(o,i)=>String.fromCharCode(parseInt(i,16))),n}static convertObjectWithStringToBoolean(e){if(e&&!(Array.isArray(e)||typeof e!="object"))return Object.keys(e).forEach(r=>{let n,o=e[r];typeof o=="string"?o==="true"?n=!0:o==="false"?n=!1:n=o:typeof o=="object"?(n=o,t.convertObjectWithStringToBoolean(o)):n=o,e[r]=n}),e}static rearrangeProperties(e,r){e.forEach(n=>{let o=t.getIn(r,n);if(!o)return;let i=Object.hasOwn(o,P.getDefaultQualifiedName("pyCount"));if(i&&(o=o.pxResults),!o)return;let s=o.filter(c=>!c.error),a=o.filter(c=>c.error);t.setIn(r,i?`${n}.pxResults`:n,[...s,...a])})}static getETag(e){if(!e)return;let r=e,n=r?.split("/")||[],o=["workarea","modal","actionarea"],i=n.findIndex(s=>o.some(a=>s.startsWith(a)));return i!==-1&&(r=n.slice(0,i+1).join("/")),we()?.getState()?.data[r]?.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,r,n){let o=[],i="",s=n.getPageReference(),a=n.getContextName();Object.keys(e).forEach(u=>{let p=e[u],m=fe.isProperty(p)?re(`.${fe.getPropertyName(p)}`,s,a):p;(m==null||m==="")&&(m=d.NULL_STRING),o.push(m)});let c=r,l=o.join(d.HASH_DELIMITER);return l&&(i=t.getHashedString(l),c=r+d.UNDERSCORE_STRING+i),c}static parsePegaDateTimeToTimestamp(e){if(!e)return null;let r=e.replace(" GMT","").match(/^(\d{4})(\d{2})(\d{2})T(\d{2})(\d{2})(\d{2})\.(\d{3})$/);if(!r){let p=new Date(e).getTime();return Number.isNaN(p)?null:p}let[,n,o,i,s,a,c,l]=r.map(Number);return new Date(n,o-1,i,s,a,c,l).getTime()}static formatToUTCDate(e,r){if(!e)return e;let n=new Date(e);if(Number.isNaN(n.getTime()))return e;let o=(m,f=2)=>String(m).padStart(f,"0"),i=n.getUTCFullYear(),s=o(n.getUTCMonth()+1),a=o(n.getUTCDate());if(r==="Date")return`${i}${s}${a}`;let c=o(n.getUTCHours()),l=o(n.getUTCMinutes()),u=o(n.getUTCSeconds()),p=o(n.getUTCMilliseconds(),3);return`${i}${s}${a}T${c}${l}${u}.${p} GMT`}static isLeafProperty(e){return!!e&&!e.includes(".")}static getMetadataType(e,r,n){let o=t.isLeafProperty(e)?lt(e,r):n.getFieldMetadata(e);return Array.isArray(o)?o[0]?.type:o?.type}static toStringParameterValue(e){return typeof e=="string"?e:e instanceof Date?e.toISOString():null}static resolveParameterValue(e,r,n,o,i){if(n&&Object.hasOwn(n,e))return n[e];if(!Ir.isProperty(r))return r;let a=i!==null?Ir.getPropertyName(r):Ir.getLeafPropertyName(r);return o.getValue(`.${a}`)}static formatParameterValue(e,r,n,o,i){if(!Ir.isProperty(r))return e;let a=o!==null?Ir.getPropertyName(r):Ir.getLeafPropertyName(r);if(!a)return e;let c=t.getMetadataType(a,i,n);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,r,n,o,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,r,n);s[a]=t.formatParameterValue(l,c,r,n,o)}}return s}static normalizePropertyRef(e){let r=e.replace(/\[\d+\]/g,"");return r.startsWith(".")?r.substring(1):r}static resolvePageClass(e,r){if(!r)return;e=this.normalizePropertyRef(e);let n=e.split("."),o;n.length>1?o=n.slice(0,-1):o=n;let i=r;for(let s of o){let a=lt(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 Ls(e)&&!Array.isArray(e)}static pruneKeys=(e,r,n=!1)=>{if(!Pr(e))return e;let o=r instanceof Set?r:new Set(r);return n?(t.isNestedObject(e)?Object.keys(e).forEach(i=>{let s=e[i];if(o.has(i)){let a=Object.getOwnPropertyDescriptor(e,i);a&&a.configurable?delete e[i]:Reflect.set(e,i,void 0)}else s&&(Ls(s)||Array.isArray(s))&&t.pruneKeys(s,o,!0)}):Array.isArray(e)&&e.forEach(i=>{(Ls(i)||Array.isArray(i))&&t.pruneKeys(i,o,!0)}),e):Array.isArray(e)?e.map(i=>Ls(i)||Array.isArray(i)?t.pruneKeys(i,o,!1):i):t.isNestedObject(e)?Object.keys(e).reduce((i,s)=>{if(!o.has(s)){let a=e[s];i[s]=Ls(a)||Array.isArray(a)?t.pruneKeys(a,o,!1):a}return i},{}):e};static normalizeStaticContentKey(e){let r=this.getWebFilePath(e);if(!r)return e.trim();let n=r.decodedFileName.lastIndexOf(".");if(n<1||n===r.decodedFileName.length-1)return e.trim();let o=r.decodedFileName.slice(0,n),i=r.decodedFileName.slice(n+1);return`${r.marker.toUpperCase()}!${o.toUpperCase()}!${i.toUpperCase()}`}static isWebFilePath(e){return this.getWebFilePath(e)!==void 0}static getWebFilePath(e){let r=e.trim();if(!mce.test(r))return;let n=r.indexOf("/"),o=r.slice(0,n),s=r.slice(n+1).split(/[?#]/)[0];try{let a=decodeURIComponent(s);return a.includes("/")||a.includes("\\")?void 0:{marker:o,decodedFileName:a}}catch{return}}},g=Mw;var gce=d.SUMMARY_OF_LISTS,hce=d.SUMMARY_OF_WHEN_CONDITIONS,kw=class t{static updateData(e){Object.keys(e).forEach(r=>{T(Re({context:r,data:e[r]}))})}static updateContextData(e){Object.keys(e).forEach(r=>{T(Re({context:r,data:e[r]}))})}static resolveWhen(e,r){return!!r.getContextDataValue(`.${hce}.${e}`)}static resolveFieldValue(e,r){return r.getLocalizedValue(e)}static resolveNavigation(e,r){let n=this.resolveName(e,r);return Tw(typeof n=="string"?n:"")}static resolveView(e,r,n=""){let o=$a(this.resolveName(e,r)),i=[];if(Array.isArray(o)&&o.length>0){if(r&&o.length>1){if(n||(n=r.getValue(d.CLASS_ID)||""),!n)return;i=o.filter(s=>s[d.CLASSID]===n)}return i.length===0?o[0]:i[0]}return o}static resolveName(e,r){return e&&typeof e=="string"&&e.startsWith("param.")?(e=e.substring(6),r.getContextDataValue(`.$parameters.${e}`)):(e&&typeof e=="string"&&e.startsWith("@")&&(e=fe.handleAnnotation(e,r)),e)}static getContextPath(e,r){return typeof r!="number"&&!r?e:(r=fe.trimAnnotation(r),typeof r=="number"||typeof r=="string"?typeof r=="number"&&Number.isInteger(r)?`${e}[${r}]`:typeof r=="string"&&r.startsWith(".")?e+r:r:e)}static getRuleClass(e,r,n){let o;if(r)o=r.startsWith(d.CLASS_ANNOTATION)?r.split(d.CLASS_ANNOTATION)[1].trim():this.resolveClassID(r,e.getPageReference(),e.getContextName(),e.getValue(d.CASE_INFO.CASE_INFO_CLASSID));else if(n?.authorContext){let i=e.getFieldMetadata(n.authorContext);if(i){let s=["refer","copy"].includes(i.dataRetrievalType),a=i.type==="Page List";o=s&&a?i.pageClass:i.classID}o||(o=n.ruleClass)}return o}static resolveReference(e,r){let{type:n}=e,o;if(n==="reference"){let{config:i}=e,s=i?.type,{ref:a,name:c,context:l}=i||{},u=this.getRuleClass(r,l,i);return r&&(r._ruleClass=u),s==="navigation"?o=this.resolveNavigation(a||c,r):s==="view"?o=this.resolveView(a||c,r,u||""):s==="widget"&&(o={type:"Widget",config:{name:c,ruleClass:u}}),o}return e}static resolvePropertyReference(e,r,n){return re(r,e,n)}static getProperty(e,r,n){let o=this.resolvePropertyReference(r,e,n);if(o==null||o.length===0){let i=La(`${r}.${gce}`,e,n);i&&(o=this.resolvePropertyReference(r,i,n))}return o}static getPropertyValue(e,r,n){return e=fe.trimAnnotation(e),this.getProperty(e,r,n)}static getReferencedUser(e,r){let n=t.getLitePropertyValue(r,"referencedUsers");if(Array.isArray(n)){let o=n.find(i=>i.UserID===e);if(o)return{userId:o.UserID,UserName:o.UserName}}return n?.[e]}static getLitePropertyValue(e,r){if(!e)return;let{useCustomContext:n,propertyName:o,hasSuggestions:i,pageReference:s,context:a}=e,c=r||o||"";return n?(c=c.startsWith(".")?c.substring(1):c,c.split(".").reduce((l,u)=>l?.[u]??void 0,n)):i&&c===o?t.getPropertyValue(c,s,a?`${a}/${d.SUGGESTION}`:void 0):t.getPropertyValue(c,s,a||void 0)}static _handlePropString(e,r,n,o,i){n.startsWith("@")?e[r]=fe.handleAnnotation(n,o,i):e[r]=n}static _resolveProps(e,r,n){e&&Object.keys(e).forEach(o=>{let i=e[o];typeof i=="string"?this._handlePropString(e,o,i,r,n):Array.isArray(i)?i.forEach(s=>{this._resolveProps(typeof s=="object"?s:e[s],r,n)}):typeof i=="object"&&this._resolveProps(e[o],r,n)})}static resolveProps(e,r,n){return!e||!r||(g.mergeDeep(e,r),this._resolveProps(r,n,void 0)),r}static resolveContextTreeNodeProps(e){let r={};return e?(g.mergeDeep(e,r),this._resolveProps(r,void 0,e),g.resolveStringBooleans(r)):r}static resolvePropertyPageClass(e,r){let n=g.resolvePageClass(e,r),o=e.substring(e.lastIndexOf(".")+1),i=lt(o,n),s;if(i)return Array.isArray(i)?s=i[0]?.pageClass:s=i.pageClass,s}static resolveClassID(e,r,n,o){let i=fe.trimAnnotation(e),s=i.startsWith(".")?`${r}${i}`:i;for(;s;){let a=re(d.CLASS_ID,s,n);if(a)return a;if(o){let l=this.resolvePropertyPageClass(i,o);if(l)return l}let c=s.lastIndexOf(".");if(c===-1)break;s=s.substring(0,c)}return null}},J=kw;var Lw=class{actionHandlers;constructor(){this.actionHandlers={}}getHandler(e){return this.actionHandlers[e]}registerHandler(e,r){this.actionHandlers[e]=r}},yce=new Lw,DI=yce;function Sce(t){return typeof t=="object"&&t!==null}var Uw=class{static#e=[];static#t=!1;static getActionHandlers=(e,r,n)=>{let o=[];return{mouseenter:"hover",change:"onChange",blur:"onBlur"}[n]!==r||e.forEach(s=>{let a=DI.getHandler(s.action),{config:c}=s;o.push({handler:a,config:c})}),o};static isEditable=e=>{let{tagName:r}=e;return r==="INPUT"||r==="TEXTAREA"||r==="SELECT"||r==="DATETIME"};static isNonKeyInput=e=>{let{tagName:r,type:n}=e;return r==="SELECT"||n==="checkbox"||n==="radio"};static#r=(e,r,n)=>{for(let o=0;o<e.length;o+=1){let i=e[o],s={actionHandler:i.handler,component:r,eventType:n,config:i.config};this.#e.push(s)}};static buildActionObject=(e,r)=>{let n={...e};return n.context=v.getRuntime()==="Browser"?r.getContextName():n.context,n.pageReference=r.getPageReference(),n.actionMgrID=w.getNextActionMgrId(),n};static#n=e=>{let r=e.actionHandler,n=e.component,{config:o}=e,i={};J.resolveProps(o,i,n),r&&(r(e.eventType,i,n),this.#o())};static#o=()=>{if(!this.#t){if(this.#e.length===0)return;let e=this.#e.shift();if(!e)return;this.#n(e),e.config&&e.config.parallel==="true"&&this.#e.length>0&&this.#o()}};static#s=()=>{this.#o()};static#i=(e,r,n)=>{this.#r(e,r,n),this.#s()};static getFullRef=e=>{let r=e.getPageReference(),n=e.getComponentConfig().value;return J.getContextPath(r,n)};static#a(e,r){let o=e.getComponentConfig().behaviours||[];for(let i=0;i<o.length;i+=1){let{behaviour:s,actions:a}=o[i];if(a){let c=this.getActionHandlers(a,s,r);c&&c.length>0&&this.#i(c,e,r)}}}static changeHandler=(e,r)=>{let n=e.getStateProps().value,o=e.getContextName();if(dt({type:E.MESSAGES.MESSAGES_TYPE_ERROR,property:n,pageReference:e.getPageReference(),context:o}),(v.getRuntime()==="Browser"?"nativeEvent"in r&&r.nativeEvent instanceof Event||r instanceof Event:"nativeEvent"in r&&!!r.nativeEvent||r instanceof Event)||!("value"in r)||r.value!==null&&(!("prop"in r)||r.prop===void 0)){let{target:s}=r;s===null&&r&&"auxiliaryTarget"in r&&r.auxiliaryTarget&&(s=r.auxiliaryTarget);let a;s===void 0?a="value"in r?r.value:void 0:"value"in s?a=s.value:a=s.innerText;let c=this.getFullRef(e);T({type:_t,payload:{reference:c,value:a,context:o}}),(s===void 0||!this.isEditable(s)||this.isNonKeyInput(s))&&T({type:vn,payload:{reference:c,pageReference:e.getPageReference(),value:a,context:o,propertyName:e.getComponentConfig().value,classID:e.getValue(d.CLASS_ID)}})}else if(Sce(r)){let s=e.getPageReference(),a=e.getStateProps();for(let c of Object.keys(r)){let l=a[c],u=r[c];T({type:_t,payload:{reference:J.getContextPath(s,l),value:u,context:o}}),T({type:vn,payload:{reference:J.getContextPath(s,l),value:u,context:o}})}}};static blurHandler=(e,r)=>{let{target:n}=r;n===null&&r&&"auxiliaryTarget"in r&&(n=r.auxiliaryTarget);let{value:o,validationValue:i}=n,s=this.getFullRef(e),a=e.getContextName();n.clearMessages&&dt({type:E.MESSAGES.MESSAGES_TYPE_ERROR,property:e.getStateProps().value,pageReference:e.getPageReference(),context:a}),this.isEditable(n)&&(e.getValidationApi().validate("validationValue"in n?i:o),e.isInsideList()&&e.getListActions().updateProperty(e.getStateProps().value,o),this.isNonKeyInput(n)||T({type:vn,payload:{reference:s,pageReference:e.getPageReference(),value:o,context:a,propertyName:e.getComponentConfig().value,classID:e.getValue(d.CLASS_ID)}}))};static eventHandler=(e,r)=>{let{type:n}=r;switch(n){case"change":this.changeHandler(e,r);break;case"blur":this.blurHandler(e,r);break;default:break}n&&this.#a(e,n)};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"}},ze=Uw;var jw="CREATE_WORK",e9=t=>({type:jw,payload:t});var zw=(t,e)=>{let r=e.UserID;if(r==null)return;let n=String(r);if(t.has(n)){let o=t.get(n);t.set(n,{...o,...e})}else t.set(n,e)},Ece=t=>{if(t.length<2)return;let e=new Map;for(let r of t)zw(e,r);t.length=0;for(let r of e.values())t.push(r)};function Ace(t,e,r){let n;if(!Array.isArray(t)&&typeof t=="object"){n=g.getIn(r,d.REFERENCED_USERS,{}),g.setIn(e,d.REFERENCED_USERS,{...n,...t});return}if(n=g.getIn(r,d.REFERENCED_USERS,[]),n.length===0){Ece(t);return}let o=new Map;for(let i of n)zw(o,i);for(let i of t)zw(o,i);t.length=0;for(let i of o.values())t.push(i)}function Cce(t,e,r,n,o,i,s){let a=n.substring(0,n.indexOf("[")),c=n.substring(n.indexOf("[")+1,n.indexOf("]")),l=e[a],u=`${g.trimDotForProperty(o)}.${a}`;s.includes(u)&&Object.hasOwn(l,P.getDefaultQualifiedName("pyCount"))&&(l=l.pxResults),Array.isArray(l)&&(l?.splice(+c,1,t[n]),i.push(a),r.add(`${o}.${n}`))}function Ice(t,e,r){let n=new Set(r);Object.keys(t).forEach(o=>{(Array.isArray(t[o])&&!n.has(o)||!Array.isArray(t[o])&&!Object.hasOwn(e,o))&&delete t[o]})}var t9=(t,e,r,n,o="")=>{let i=[];Object.keys(t).forEach(s=>{typeof t[s]=="object"&&s.includes("[")?Cce(t,e,r,s,o,i,n):t[s]&&typeof t[s]=="object"?(e[s]||(e[s]=Array.isArray(t[s])?[]:{}),t9(t[s],e[s],r,n,`${o}.${s}`)):e[s]=t[s]}),Ice(e,t,i)},_ce=(t,e,r)=>{let n=new Set;t.forEach(o=>{o=g.trimDotForProperty(o);let[i,s,a]=Wi.getPageListNameAndIndexFromPageName(o);if(i&&s&&a&&!n.has(`${i}.${s}`)){let c=g.getIn(r,`${i}.${s}`)||[];Array.isArray(c)&&c.forEach((l,u)=>{u!==+a&&g.setIn(e,`${i}.${s}[${u}]`,l)}),n.add(`${i}.${s}`)}})},bce=(t,e,r)=>{if(!r||r.length===0)return e;let n=kh(t),o={},i=!1;return r.forEach(s=>{Object.hasOwn(n,s)&&g.hasIn(e,oo(s).slice(0,-1))&&(g.setIn(o,s,n[s]),i=!0)}),i?xt(e,o,{isArrayDeepMerge:!0}):e},Re=(t,e={})=>{let{serverPrecedenceFields:r=[],propertiesToReplace:n=[],propertiesToReArrange:o=[],preserveFields:i}=e,{context:s,data:a,isArrayDeepMerge:c,preserveClientChanges:l=!1}=t,u=Mc(s,!0),p=W(s),m={};if(l&&p&&a){m=g.deepClone(p);let S=g.deepClone(a);o.length>0&&g.rearrangeProperties(o,m);let A=new Set;t9(u,m,A,o),_ce(A,m,S)}let f=a?g.getIn(a,d.REFERENCED_USERS):void 0;f!==void 0&&Ace(f,a,p);let h=a;if(l){let S=g.getIn(t?.data,d.OBJECT_INFO.OBJECT_INFO_CONTENT_CLASS_ID),A=B.isExternalObject(S),C=A?{[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]}}},_=A?d.OBJECT_INFO.OBJECT_INFO_CONTENT:d.CASE_INFO.CASE_INFO_CONTENT;r.forEach(I=>{let N=`${_}.${I}`;g.deleteIn(C,N)}),h=xt(a,C,{isArrayDeepMerge:c??!0})}else A6(s,a,i),h=bce(s,a,i);return{type:Er,payload:{...t,data:h,...n.length>0?{propertiesToReplace:n}:null,...o.length>0?{propertiesToReArrange:o}:null}}},Tce=t=>({type:Ok,payload:t}),Mm=t=>({type:Kl,payload:t}),vce=t=>({type:Nr,payload:t}),Rce=t=>({type:xk,payload:t}),Pce=t=>({type:uo,payload:t}),Qx=t=>({type:Ql,payload:t}),Lc=t=>({type:Yo,payload:t}),Pt=t=>({type:Et,payload:t}),Xx=t=>({type:Fs,payload:t}),Ph=t=>({type:Vs,payload:t}),nw=t=>({type:po,payload:t}),ow=t=>({type:Bs,payload:t}),iw=t=>({type:zi,payload:t}),rr=t=>{let{containerItemID:e}=t;t.suggestionContexts=Uh(e);let r=t?.data?.caseInfo?.content,n=Object.keys(r||{}).length>0;return t.propertiesToReplace||(t.propertiesToReplace=n?B.getPropertiesToReplace(e):[]),{type:kt,payload:t}},Fh=t=>{let{context:e}=t;return{type:Us,payload:{context:e}}},As=t=>{let{context:e}=t;return{type:Ro,payload:{context:e}}},Nce=t=>({type:Hs,payload:t}),nr=t=>({type:or,payload:t}),zm=t=>({type:Ws,payload:t}),Qe=t=>{let{context:e,containerItemID:r}=t,n=e;return n||(n=pe(r)),t.context=n,t.deleteContext=!ZD(r),t.childContainers=Ke(r),t.childContainersContexts=ko(r),t.transientItems=bi([...t.childContainersContexts,r]),t.suggestionContexts=Uh(r),r===e&&(t.caseID=re(d.CASE_INFO.CASE_INFO_ID,"",e)||re(d.OBJECT_INFO.OBJECT_INFO_ID,"",e),t.RemoteSystemID=re(d.CASE_INFO.REMOTESYSTEMID,"",e)),{type:Ze,payload:t}},Fw=t=>{let{containerItemID:e}=t;return t.transientItems=bi([...ko(e),e]),{type:Qo,payload:t}},Nh=t=>{let{transientItemID:e}=t;return t.transientItems=[e],{type:Zo,payload:t}},kn=t=>{let{context:e,containerItemID:r}=t,n=e;if(n||(n=pe(r)),t.context=n,t.childContainers=Ke(r),t.childContainersContexts=ko(r),t.transientItems=bi([...t.childContainersContexts,r]),t.suggestionContexts=Uh(r),r===e){t.caseID=re(d.CASE_INFO.CASE_INFO_ID,"",e),t.RemoteSystemID=re(d.CASE_INFO.REMOTESYSTEMID,"",e);let o=re(d.CASE_INFO.CASE_INFO_CLASSNAME,"",e);ae.isTraditionalRemoteCase(o)&&(t.skipReleaseLockRequest=!0)}return{type:et,payload:t}},Oce=t=>({type:Po,payload:t}),xce=t=>({type:No,payload:t}),Dce=t=>({type:oS,payload:t}),V=(t,...e)=>(ze.resume(),t(...e)),os=(t,e,r,n,o)=>({type:Te,payload:{msg:t,err:e,context:r,formFields:n,actionMgrID:o}}),Vw=t=>({type:Xo,payload:t}),Bw=t=>({type:ru,payload:t}),Kn=t=>({type:mo,payload:t}),wce=t=>({type:Yk,payload:t}),UT=t=>({type:Yl,payload:t}),da=t=>({type:_t,payload:t});var $ce="VIEW",Mce="PAGE",Kw="add",n9="replace",Gw=["portal","noPortal","preview","debug","devtool","activeTab","contextParam","lang"],wI="",Vh="Home",o9="",qw=!0,$I=t=>(qw=t,qw),i9=()=>qw,bt=(t,e,r)=>ye.getSemanticURL(t,e,r),br=(t,e)=>ye.getBusinessIDURLPath(t,e),s9=(t,e)=>ye.getBusinessIDRoutePath(t,e),Nc=(t,e)=>ye.getRestEndPoint(t,e),U=(t,e)=>{let r=gt.getServerURL(),n=Nc(t,e);return n?(n.restApi?.startsWith("/")||(n.restApi=`/${n.restApi}`),r?.endsWith("/")&&(r=r.substring(0,r.length-1)),n.restApi=r+n.restApi,n):{}},kce=t=>{if(t&&t.root){let{root:e}=t,{resources:r}=t,{views:n}=r,i=e.config,s=i.type,a=i.name;if(s.toUpperCase()===$ce){let c=n[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()===Mce)}}return!1}return!1},r9=(t,e,r)=>{let{root:n,resources:o}=t,{views:i}=o,{config:s}=n,a=Kw,c="";if(r)c=r;else{let u=i[s.name],p=u;Array.isArray(u)&&u.length>0&&([p]=u),c=p.config.urlPath}let l=c.match(Rc);if(l){let u=g.getIn(e,s.context);c=c.replace(l[0],u.pyID)}return c.startsWith("/")&&(c=c.substring(1,c.length)),{pxURLPath:c,historyAction:a}},Lce=(t,e,r)=>{for(let[o,i]of e.entries())!t.has(o)&&Gw.includes(o)&&t.append(o,i);r&&!t.has("lang")&&t.append("lang",r);let n=ye.getRoutingInfo()?.embedQueryParams;if(n)for(let[o,i]of Object.entries(n))t.has(o)||t.append(o,String(i));return ye.isDefaultPortal()&&t.delete("portal"),t},Ww=(t,e)=>{let r=`${t}/${e}`;if(!(v.getRenderingMode()==="EMBED"))return r;let o=ye.getRoutingInfo()?.authServiceAlias;if(!o)return r;let i=encodeURIComponent(o),s;try{s=new URL(r)}catch{return r}let a=s.pathname.split("/").filter(Boolean),c=a.findIndex(p=>p.toLowerCase()==="app");if(c<0)return r;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(/\/$/,"")},Uce=(t,e,r,n,o)=>{let i=ye.getStaticRoutePage(),s=Vh?.toLowerCase();return(i?.toLowerCase()===s||n.toLowerCase()===s)&&!o.has("noPortal")?Ww(e,r):t},a9=(t,e,r,n)=>{let o,i;ci(e)?o=Ww(t,e):o=t;let s=ci(r?.pxURLPath||"");s&&(o=`${o}/${s}`);try{i=new URL(o).searchParams,o=o.includes("?")?o.split("?")[0]:o}catch(l){return console.log("Invalid url",l),""}let a=new URLSearchParams($6());if(rs()?(o=Uce(o,t,e,s,a),ye.setStaticRoutePage("")):s.toLowerCase()===Vh.toLowerCase()&&!a.has("noPortal")&&(o=Ww(t,e)),!ye.isDefaultPortal()){let l=ye.getPortalName();a.has("portal")?a.set("portal",l):a.append("portal",l)}i=Lce(i,a,n);let c=Pc(i.toString());return c&&(o+=`?${c}`),o},jce=(t,e,r)=>{if(t=t&&t!==""?t:ye.getApplicationName(),t=u2(t),r===`${wI}/${e}/`)return{title:t};let o=new URL(r).pathname.replace(`${e}/`,""),i=o.split("/");return l2(o)?{title:`${t} - ${i[i.length-1]}`}:{title:`${t} - ${i[0]}`}},c9=(t,{urlPathObjParam:e,infoParam:r,optionsParam:n,queryParam:o},i=!1,s)=>{let a,c,l;if(window.PCore.getBehaviorOverride("dynamicSemanticUrl")===!1)return;if(i)a=e,c=r,l=n;else{let{uiResources:f,data:h}=t;({options:l}=t),e&&e.pxURLPath&&Uo(e.pxURLPath)?a=r9(f,h,e.pxURLPath):a=e||r9(f,h),c=ye.getEndPointInfo(a.pxURLPath),a.pxURLPath=c.urlPath}let u=a9(wI,ye.getApplicationPath(),a,s),{title:p}=jce(o9,ye.getApplicationPath(),u),m=P6(c,{...l,title:p});a?.historyAction===Kw?N6(m,p,u):a?.historyAction===n9&&(o&&(u+=`?${o}`),O6(m,p,u))},l9=(t,e)=>{let r=null;t.directUrlUpdation&&(r={historyAction:Kw,pxURLPath:""},r.pxURLPath=t.semanticURL),c9(t,{urlPathObjParam:r,infoParam:null,optionsParam:null},!1,e)},k6=(t,e)=>{l9(t,e)},L6=(t,e)=>{let r={pxURLPath:t};return a9(wI,ye.getApplicationPath(),r,e)},Zi=t=>{let{uiResources:e}=t;i9()&&(t.directUrlUpdation||kce(e))&&l9(t)},u9=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},zce=t=>t?ae.isRemoteCase(t)&&(ae.isTraditionalRemoteCase(t)||ae.isRemoteCaseVersionDifferent(t)):!1,d9=(t,e,r)=>{let{caseClassName:n,workID:o}=t.payload,{containerName:i,context:s}=e,{RemoteClassGroup:a,RemoteSystemID:c,name:l}=ae.getRemoteCase(n),u={...t,headers:{RemoteSystemID:c},className:n,isTraditionalRemoteCase:ae.isTraditionalRemoteCase(n),isRemoteCase:ae.isRemoteCase(n),action:AS,viewName:IS,gadgetId:B.getUniqueGadgetId(),context:r??s,skipSemanticUrl:!0,insKey:`${a?.toUpperCase()} ${o}`,containerName:i,name:l};T(rt["showPage"](u))},Hw=!1,Fce=async t=>{if(Hw){Hw=!1;return}let e="showHistory",r=x6(t);if(r){let n=Go(),o=se(`${n}/primary`);if(o&&jh(o)){let i=Or().getLocaleValue(Ou,"Messages");if(!await li.confirm(i)){Hw=!0,window.history.go(1);return}}ae.isRemoteCase(r.payload?.caseClassName)?d9({...r},r.options):T(rt[e](u9(r)))}},Bh=()=>{let t=ye.getApplicationPath(),e=Qd();return t!==e},p9=(t,e)=>{let r={restApi:""};try{if(Bh()&&!e){let n=Qd(),o=ye.processUrl(n,!0),i=ye._getMatchedRouteInRoutingTable(o)||"",s=ye.getRoutingInfo(),a=ye.processUrl(n,!1).split("/"),c=a[a.length-1],l=s?.routes?.[i]?.payload?.caseID?.replace("{workID}",c).replace("{id}",c);r=ye.getRestEndPoint("loadView",{caseID:l,viewID:t})||{}}else r=ye.getRestEndPoint("showView",{page:t,pageClass:e})||{}}catch{}return r},m9=()=>{if(Bh()){let t=ye.processUrl(Qd(),!0);return!!ye._getMatchedRouteInRoutingTable(t)}return!1},Vce=(t,e)=>{let r=ye.getRoutingInfo();if(rs()&&Object.values(r?.routes??{}).find(c=>c?.payload?.pageClass===e&&c?.payload?.page===t))return t;let n=t.split(" ").join(""),o=t.split(" ").join("-").toLowerCase(),i=p2(t);return r?.routes?.[n]?n:r?.routes?.[o]?o:r?.routes?.[i]?i:t},Bce=t=>{Vh=t};var Hce=()=>{let t=v.getIsExtraCallRequiredForDefaultHome();return t===!0||t==="true"},f9=t=>{let{acName:e,context:r,defaultViewLabel:n,ruleName:o,className:i}=t,s=Vce(o||n,i);Bce(s),ye.setDefaultRoute(s),ye.setDefaultClassName(i);let a=ur(e,r),c=Z(e,r),l=Hce(),u={historyAction:n9,pxURLPath:""},p,m=null,f={acName:c,context:a,actionConfig:{context:a}};if(l||!l&&Bh()){let h=dE(II());v.shouldUseURLParams()&&(m=h.includes("?")?h.split("?")[1]:null),p=m2(h,f),u.pxURLPath=p.urlPath,typeof p.payload?.pageClass<"u"&&(p.payload.pageClass=we()?.getState()?.data?.app?.pyPortal?.classID);let S="showHistory",A={routeEndpoint:p.routeEndpoint,requestType:p.requestType,payload:p.payload,options:f,routeKey:p.routeKey};zce(p?.payload?.caseClassName)?d9(A,t,f.context):T(rt[S](u9(A)))}else p=ye.getEndPointInfo(Vh),u.pxURLPath="";c9(null,{urlPathObjParam:u,infoParam:p,optionsParam:f,queryParam:m},!0)},Hh=(t,e=!1)=>{wI=t.domain,e===!1&&i9()&&(D6(Fce),w6()),ye.init(t,Vh)},g9=t=>{ye.addRoutes(t)},h9=t=>{t&&(o9=t.pyLabel)},U6=t=>{R6(t)},_I=t=>{for(let e of t)Gw.includes(e)||Gw.push(e)};function qr(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 qce=typeof Symbol=="function"&&Symbol.observable||"@@observable",y9=qce,Jw=()=>Math.random().toString(36).substring(7).split("").join("."),Wce={INIT:`@@redux/INIT${Jw()}`,REPLACE:`@@redux/REPLACE${Jw()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Jw()}`},MI=Wce;function kI(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 Yw(t,e,r){if(typeof t!="function")throw new Error(qr(2));if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(qr(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(qr(1));return r(Yw)(t,e)}let n=t,o=e,i=new Map,s=i,a=0,c=!1;function l(){s===i&&(s=new Map,i.forEach((A,C)=>{s.set(C,A)}))}function u(){if(c)throw new Error(qr(3));return o}function p(A){if(typeof A!="function")throw new Error(qr(4));if(c)throw new Error(qr(5));let C=!0;l();let _=a++;return s.set(_,A),function(){if(C){if(c)throw new Error(qr(6));C=!1,l(),s.delete(_),i=null}}}function m(A){if(!kI(A))throw new Error(qr(7));if(typeof A.type>"u")throw new Error(qr(8));if(typeof A.type!="string")throw new Error(qr(17));if(c)throw new Error(qr(9));try{c=!0,o=n(o,A)}finally{c=!1}return(i=s).forEach(_=>{_()}),A}function f(A){if(typeof A!="function")throw new Error(qr(10));n=A,m({type:MI.REPLACE})}function h(){let A=p;return{subscribe(C){if(typeof C!="object"||C===null)throw new Error(qr(11));function _(){let N=C;N.next&&N.next(u())}return _(),{unsubscribe:A(_)}},[y9](){return this}}}return m({type:MI.INIT}),{dispatch:m,subscribe:p,getState:u,replaceReducer:f,[y9]:h}}function Kce(t){Object.keys(t).forEach(e=>{let r=t[e];if(typeof r(void 0,{type:MI.INIT})>"u")throw new Error(qr(12));if(typeof r(void 0,{type:MI.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(qr(13))})}function S9(t){let e=Object.keys(t),r={};for(let s=0;s<e.length;s++){let a=e[s];typeof t[a]=="function"&&(r[a]=t[a])}let n=Object.keys(r),o,i;try{Kce(r)}catch(s){i=s}return function(a={},c){if(i)throw i;let l=!1,u={};for(let p=0;p<n.length;p++){let m=n[p],f=r[m],h=a[m],S=f(h,c);if(typeof S>"u"){let A=c&&c.type;throw new Error(qr(14))}u[m]=S,l=l||S!==h}return l=l||n.length!==Object.keys(a).length,l?u:a}}function Gh(...t){return t.length===0?e=>e:t.length===1?t[0]:t.reduce((e,r)=>(...n)=>e(r(...n)))}function E9(...t){return e=>(r,n)=>{let o=e(r,n),i=()=>{throw new Error(qr(15))},s={getState:o.getState,dispatch:(c,...l)=>i(c,...l)},a=t.map(c=>c(s));return i=Gh(...a)(o.dispatch),{...o,dispatch:i}}}function A9(t){return kI(t)&&"type"in t&&typeof t.type=="string"}var N9=Symbol.for("immer-nothing"),C9=Symbol.for("immer-draftable"),an=Symbol.for("immer-state");function qo(t,...e){throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var io=Object,tp=io.getPrototypeOf,zI="constructor",qI="prototype",e0="configurable",FI="enumerable",UI="writable",qh="value",Ni=t=>!!t&&!!t[an];function so(t){return t?O9(t)||KI(t)||!!t[C9]||!!t[zI]?.[C9]||JI(t)||YI(t):!1}var Jce=io[qI][zI].toString(),I9=new WeakMap;function O9(t){if(!t||!c0(t))return!1;let e=tp(t);if(e===null||e===io[qI])return!0;let r=io.hasOwnProperty.call(e,zI)&&e[zI];if(r===Object)return!0;if(!ep(r))return!1;let n=I9.get(r);return n===void 0&&(n=Function.toString.call(r),I9.set(r,n)),n===Jce}function WI(t,e,r=!0){Jh(t)===0?(r?Reflect.ownKeys(t):io.keys(t)).forEach(o=>{e(o,t[o],t)}):t.forEach((n,o)=>e(o,n,t))}function Jh(t){let e=t[an];return e?e.type_:KI(t)?1:JI(t)?2:YI(t)?3:0}var Zw=(t,e,r=Jh(t))=>r===2?t.has(e):io[qI].hasOwnProperty.call(t,e),t0=(t,e,r=Jh(t))=>r===2?t.get(e):t[e],VI=(t,e,r,n=Jh(t))=>{n===2?t.set(e,r):n===3?t.add(r):t[e]=r};function Yce(t,e){return t===e?t!==0||1/t===1/e:t!==t&&e!==e}var KI=Array.isArray,JI=t=>t instanceof Map,YI=t=>t instanceof Set,c0=t=>typeof t=="object",ep=t=>typeof t=="function",Qw=t=>typeof t=="boolean";function Zce(t){let e=+t;return Number.isInteger(e)&&String(e)===t}var Cs=t=>t.copy_||t.base_;var l0=t=>t.modified_?t.copy_:t.base_;function r0(t,e){if(JI(t))return new Map(t);if(YI(t))return new Set(t);if(KI(t))return Array[qI].slice.call(t);let r=O9(t);if(e===!0||e==="class_only"&&!r){let n=io.getOwnPropertyDescriptors(t);delete n[an];let o=Reflect.ownKeys(n);for(let i=0;i<o.length;i++){let s=o[i],a=n[s];a[UI]===!1&&(a[UI]=!0,a[e0]=!0),(a.get||a.set)&&(n[s]={[e0]:!0,[UI]:!0,[FI]:a[FI],[qh]:t[s]})}return io.create(tp(t),n)}else{let n=tp(t);if(n!==null&&r)return{...t};let o=io.create(n);return io.assign(o,t)}}function u0(t,e=!1){return ZI(t)||Ni(t)||!so(t)||(Jh(t)>1&&io.defineProperties(t,{set:LI,add:LI,clear:LI,delete:LI}),io.freeze(t),e&&WI(t,(r,n)=>{u0(n,!0)},!1)),t}function Qce(){qo(2)}var LI={[qh]:Qce};function ZI(t){return t===null||!c0(t)?!0:io.isFrozen(t)}var BI="MapSet",n0="Patches",_9="ArrayMethods",x9={};function fl(t){let e=x9[t];return e||qo(0,t),e}var b9=t=>!!x9[t];var Wh,D9=()=>Wh,Xce=(t,e)=>({drafts_:[],parent_:t,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:b9(BI)?fl(BI):void 0,arrayMethodsPlugin_:b9(_9)?fl(_9):void 0});function T9(t,e){e&&(t.patchPlugin_=fl(n0),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function o0(t){i0(t),t.drafts_.forEach(ele),t.drafts_=null}function i0(t){t===Wh&&(Wh=t.parent_)}var v9=t=>Wh=Xce(Wh,t);function ele(t){let e=t[an];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function R9(t,e){e.unfinalizedDrafts_=e.drafts_.length;let r=e.drafts_[0];if(t!==void 0&&t!==r){r[an].modified_&&(o0(e),qo(4)),so(t)&&(t=P9(e,t));let{patchPlugin_:o}=e;o&&o.generateReplacementPatches_(r[an].base_,t,e)}else t=P9(e,r);return tle(e,t,!0),o0(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==N9?t:void 0}function P9(t,e){if(ZI(e))return e;let r=e[an];if(!r)return HI(e,t.handledSet_,t);if(!QI(r,t))return e;if(!r.modified_)return r.base_;if(!r.finalized_){let{callbacks_:n}=r;if(n)for(;n.length>0;)n.pop()(t);M9(r,t)}return r.copy_}function tle(t,e,r=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&u0(e,r)}function w9(t){t.finalized_=!0,t.scope_.unfinalizedDrafts_--}var QI=(t,e)=>t.scope_===e,rle=[];function $9(t,e,r,n){let o=Cs(t),i=t.type_;if(n!==void 0&&t0(o,n,i)===e){VI(o,n,r,i);return}if(!t.draftLocations_){let a=t.draftLocations_=new Map;WI(o,(c,l)=>{if(Ni(l)){let u=a.get(l)||[];u.push(c),a.set(l,u)}})}let s=t.draftLocations_.get(e)??rle;for(let a of s)VI(o,a,r,i)}function nle(t,e,r){t.callbacks_.push(function(o){let i=e;if(!i||!QI(i,o))return;o.mapSetPlugin_?.fixSetContents(i);let s=l0(i);$9(t,i.draft_??i,s,r),M9(i,o)})}function M9(t,e){if(t.modified_&&!t.finalized_&&(t.type_===3||t.type_===1&&t.allIndicesReassigned_||(t.assigned_?.size??0)>0)){let{patchPlugin_:n}=e;if(n){let o=n.getPath(t);o&&n.generatePatches_(t,o,e)}w9(t)}}function ole(t,e,r){let{scope_:n}=t;if(Ni(r)){let o=r[an];QI(o,n)&&o.callbacks_.push(function(){jI(t);let s=l0(o);$9(t,r,s,e)})}else so(r)&&t.callbacks_.push(function(){let i=Cs(t);t.type_===3?i.has(r)&&HI(r,n.handledSet_,n):t0(i,e,t.type_)===r&&n.drafts_.length>1&&(t.assigned_.get(e)??!1)===!0&&t.copy_&&HI(t0(t.copy_,e,t.type_),n.handledSet_,n)})}function HI(t,e,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||Ni(t)||e.has(t)||!so(t)||ZI(t)||(e.add(t),WI(t,(n,o)=>{if(Ni(o)){let i=o[an];if(QI(i,r)){let s=l0(i);VI(t,n,s,t.type_),w9(i)}}else so(o)&&HI(o,e,r)})),t}function ile(t,e){let r=KI(t),n={type_:r?1:0,scope_:e?e.scope_:D9(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:e,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},o=n,i=GI;r&&(o=[n],i=Kh);let{revoke:s,proxy:a}=Proxy.revocable(o,i);return n.draft_=a,n.revoke_=s,[a,n]}var GI={get(t,e){if(e===an)return t;let r=t.scope_.arrayMethodsPlugin_,n=t.type_===1&&typeof e=="string";if(n&&r?.isArrayOperationMethod(e))return r.createMethodInterceptor(t,e);let o=Cs(t);if(!Zw(o,e,t.type_))return ale(t,o,e);let i=o[e];if(t.finalized_||!so(i)||n&&t.operationMethod&&r?.isMutatingArrayMethod(t.operationMethod)&&Zce(e))return i;if(i===Xw(t.base_,e)||sle(t,e,i)){jI(t);let s=t.type_===1?+e:e,a=a0(t.scope_,i,t,s);return t.copy_[s]=a}return i},has(t,e){return e in Cs(t)},ownKeys(t){return Reflect.ownKeys(Cs(t))},set(t,e,r){let n=k9(Cs(t),e);if(n?.set)return n.set.call(t.draft_,r),!0;if(!t.modified_){let o=Xw(Cs(t),e),i=o?.[an];if(i&&i.base_===r)return t.copy_[e]=r,t.assigned_.set(e,!1),!0;if(Yce(r,o)&&(r!==void 0||Zw(t.base_,e,t.type_)))return!0;jI(t),s0(t)}return t.copy_[e]===r&&(r!==void 0||Zw(t.copy_,e,t.type_))||Number.isNaN(r)&&Number.isNaN(t.copy_[e])||(t.copy_[e]=r,t.assigned_.set(e,!0),ole(t,e,r)),!0},deleteProperty(t,e){return jI(t),Xw(t.base_,e)!==void 0||e in t.base_?(t.assigned_.set(e,!1),s0(t)):t.assigned_.delete(e),t.copy_&&delete t.copy_[e],!0},getOwnPropertyDescriptor(t,e){let r=Cs(t),n=Reflect.getOwnPropertyDescriptor(r,e);return n&&{[UI]:!0,[e0]:t.type_!==1||e!=="length",[FI]:n[FI],[qh]:r[e]}},defineProperty(){qo(11)},getPrototypeOf(t){return tp(t.base_)},setPrototypeOf(){qo(12)}},Kh={};for(let t in GI){let e=GI[t];Kh[t]=function(){let r=arguments;return r[0]=r[0][0],e.apply(this,r)}}Kh.deleteProperty=function(t,e){return Kh.set.call(this,t,e,void 0)};Kh.set=function(t,e,r){return GI.set.call(this,t[0],e,r,t[0])};function Xw(t,e){let r=t[an];return(r?Cs(r):t)[e]}function sle(t,e,r){return t.type_!==1||!t.allIndicesReassigned_||t.assigned_?.get(e)||!so(r)||r[an]?!1:t.baseRefs_.has(r)}function ale(t,e,r){let n=k9(e,r);return n?qh in n?n[qh]:n.get?.call(t.draft_):void 0}function k9(t,e){if(!(e in t))return;let r=tp(t);for(;r;){let n=Object.getOwnPropertyDescriptor(r,e);if(n)return n;r=tp(r)}}function s0(t){t.modified_||(t.modified_=!0,t.parent_&&s0(t.parent_))}function jI(t){t.copy_||(t.assigned_=new Map,t.copy_=r0(t.base_,t.scope_.immer_.useStrictShallowCopy_))}var cle=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,r,n)=>{if(ep(e)&&!ep(r)){let i=r;r=e;let s=this;return function(c=i,...l){return s.produce(c,u=>r.call(this,u,...l))}}ep(r)||qo(6),n!==void 0&&!ep(n)&&qo(7);let o;if(so(e)){let i=v9(this),s=a0(i,e,void 0),a=!0;try{o=r(s),a=!1}finally{a?o0(i):i0(i)}return T9(i,n),R9(o,i)}else if(!e||!c0(e)){if(o=r(e),o===void 0&&(o=e),o===N9&&(o=void 0),this.autoFreeze_&&u0(o,!0),n){let i=[],s=[];fl(n0).generateReplacementPatches_(e,o,{patches_:i,inversePatches_:s}),n(i,s)}return o}else qo(1,e)},this.produceWithPatches=(e,r)=>{if(ep(e))return(s,...a)=>this.produceWithPatches(s,c=>e(c,...a));let n,o;return[this.produce(e,r,(s,a)=>{n=s,o=a}),n,o]},Qw(t?.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),Qw(t?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),Qw(t?.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){so(t)||qo(8),Ni(t)&&(t=L9(t));let e=v9(this),r=a0(e,t,void 0);return r[an].isManual_=!0,i0(e),r}finishDraft(t,e){let r=t&&t[an];(!r||!r.isManual_)&&qo(9);let{scope_:n}=r;return T9(n,e),R9(void 0,n)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,e){let r;for(r=e.length-1;r>=0;r--){let o=e[r];if(o.path.length===0&&o.op==="replace"){t=o.value;break}}r>-1&&(e=e.slice(r+1));let n=fl(n0).applyPatches_;return Ni(t)?n(t,e):this.produce(t,o=>n(o,e))}};function a0(t,e,r,n){let[o,i]=JI(e)?fl(BI).proxyMap_(e,r):YI(e)?fl(BI).proxySet_(e,r):ile(e,r);return(r?.scope_??D9()).drafts_.push(o),i.callbacks_=r?.callbacks_??[],i.key_=n,r&&n!==void 0?nle(r,i,n):i.callbacks_.push(function(c){c.mapSetPlugin_?.fixSetContents(i);let{patchPlugin_:l}=c;i.modified_&&l&&l.generatePatches_(i,[],c)}),o}function L9(t){return Ni(t)||qo(10,t),U9(t)}function U9(t){if(!so(t)||ZI(t))return t;let e=t[an],r,n=!0;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,r=r0(t,e.scope_.immer_.useStrictShallowCopy_),n=e.scope_.immer_.shouldUseStrictIteration()}else r=r0(t,!0);return WI(r,(o,i)=>{VI(r,o,U9(i))},n),e&&(e.finalized_=!1),r}var lle=new cle,d0=lle.produce;function j9(t){return({dispatch:r,getState:n})=>o=>i=>typeof i=="function"?i(r,n,t):o(i)}var z9=j9(),F9=j9;var ule=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Gh:Gh.apply(null,arguments)},GWe=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}},dle=t=>t&&typeof t.match=="function";function Fa(t,e){function r(...n){if(e){let o=e(...n);if(!o)throw new Error(XI(0));return{type:t,payload:o.payload,..."meta"in o&&{meta:o.meta},..."error"in o&&{error:o.error}}}return{type:t,payload:n[0]}}return r.toString=()=>`${t}`,r.type=t,r.match=n=>A9(n)&&n.type===t,r}var q9=class Yh extends Array{constructor(...e){super(...e),Object.setPrototypeOf(this,Yh.prototype)}static get[Symbol.species](){return Yh}concat(...e){return super.concat.apply(this,e)}prepend(...e){return e.length===1&&Array.isArray(e[0])?new Yh(...e[0].concat(this)):new Yh(...e.concat(this))}};function V9(t){return so(t)?d0(t,()=>{}):t}function ple(t){return typeof t=="boolean"}var mle=()=>function(e){let{thunk:r=!0,immutableCheck:n=!0,serializableCheck:o=!0,actionCreatorCheck:i=!0}=e??{},s=new q9;return r&&(ple(r)?s.push(z9):s.push(F9(r.extraArgument))),s},fle="RTK_autoBatch";var B9=t=>e=>{setTimeout(e,t)},gle=(t,e)=>r=>{let n=!1,o=()=>{n||(n=!0,cancelAnimationFrame(i),clearTimeout(s),r())},i=t(o),s=setTimeout(o,e)},hle=(t={type:"raf"})=>e=>(...r)=>{let n=e(...r),o=!0,i=!1,s=!1,a=new Set,c=t.type==="tick"?queueMicrotask:t.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?gle(window.requestAnimationFrame,100):B9(10):t.type==="callback"?t.queueNotification:B9(t.timeout),l=()=>{s=!1,i&&(i=!1,a.forEach(u=>u()))};return Object.assign({},n,{subscribe(u){let p=()=>o&&u(),m=n.subscribe(p);return a.add(u),()=>{m(),a.delete(u)}},dispatch(u){try{return o=!u?.meta?.[fle],i=!o,i&&(s||(s=!0,c(l))),n.dispatch(u)}finally{o=!0}}})},yle=t=>function(r){let{autoBatch:n=!0}=r??{},o=new q9(t);return n&&o.push(hle(typeof n=="object"?n:void 0)),o};function W9(t){let e=mle(),{reducer:r=void 0,middleware:n,devTools:o=!0,duplicateMiddlewareCheck:i=!0,preloadedState:s=void 0,enhancers:a=void 0}=t||{},c;if(typeof r=="function")c=r;else if(kI(r))c=S9(r);else throw new Error(XI(1));let l;typeof n=="function"?l=n(e):l=e();let u=Gh;o&&(u=ule({trace:!1,...typeof o=="object"&&o}));let p=E9(...l),m=yle(p),f=typeof a=="function"?a(m):m(),h=u(...f);return Yw(c,s,h)}function Sle(t){let e={},r=[],n,o={addCase(i,s){let a=typeof i=="string"?i:i.type;if(!a)throw new Error(XI(28));if(a in e)throw new Error(XI(29));return e[a]=s,o},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&&r.push({matcher:i.settled,reducer:s.settled}),o},addMatcher(i,s){return r.push({matcher:i,reducer:s}),o},addDefaultCase(i){return n=i,o}};return t(o),[e,r,n]}function Ele(t){return typeof t=="function"}function Oi(t,e){let[r,n,o]=Sle(e),i;if(Ele(t))i=()=>V9(t());else{let a=V9(t);i=()=>a}function s(a=i(),c){let l=[r[c.type],...n.filter(({matcher:u})=>u(c)).map(({reducer:u})=>u)];return l.filter(u=>!!u).length===0&&(l=[o]),l.reduce((u,p)=>{if(p)if(Ni(u)){let f=p(u,c);return f===void 0?u:f}else{if(so(u))return d0(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 Ale=(t,e)=>dle(t)?t.match(e):t(e);function Cle(...t){return e=>t.some(r=>Ale(r,e))}var Ile="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",_le=(t=21)=>{let e="",r=t;for(;r--;)e+=Ile[Math.random()*64|0];return e},ble=["name","message","stack","code"],p0=class{constructor(t,e){this.payload=t,this.meta=e}payload;meta;_type},H9=class{constructor(t,e){this.payload=t,this.meta=e}payload;meta;_type},Tle=t=>{if(typeof t=="object"&&t!==null){let e={};for(let r of ble)typeof t[r]=="string"&&(e[r]=t[r]);return e}return{message:String(t)}},G9="External signal was aborted",vle=(()=>{function t(e,r,n){let o=Fa(e+"/fulfilled",(c,l,u,p)=>({payload:c,meta:{...p||{},arg:u,requestId:l,requestStatus:"fulfilled"}})),i=Fa(e+"/pending",(c,l,u)=>({payload:void 0,meta:{...u||{},arg:l,requestId:c,requestStatus:"pending"}})),s=Fa(e+"/rejected",(c,l,u,p,m)=>({payload:p,error:(n&&n.serializeError||Tle)(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=n?.idGenerator?n.idGenerator(c):_le(),h=new AbortController,S,A;function C(I){A=I,h.abort()}l&&(l.aborted?C(G9):l.addEventListener("abort",()=>C(G9),{once:!0}));let _=(async function(){let I;try{let x=n?.condition?.(c,{getState:p,extra:m});if(Ple(x)&&(x=await x),x===!1||h.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let H=new Promise((G,ne)=>{S=()=>{ne({name:"AbortError",message:A||"Aborted"})},h.signal.addEventListener("abort",S,{once:!0})});u(i(f,c,n?.getPendingMeta?.({requestId:f,arg:c},{getState:p,extra:m}))),I=await Promise.race([H,Promise.resolve(r(c,{dispatch:u,getState:p,extra:m,requestId:f,signal:h.signal,abort:C,rejectWithValue:((G,ne)=>new p0(G,ne)),fulfillWithValue:((G,ne)=>new H9(G,ne))})).then(G=>{if(G instanceof p0)throw G;return G instanceof H9?o(G.payload,f,c,G.meta):o(G,f,c)})])}catch(x){I=x instanceof p0?s(null,f,c,x.payload,x.meta):s(x,f,c)}finally{S&&h.signal.removeEventListener("abort",S)}return n&&!n.dispatchConditionRejection&&s.match(I)&&I.meta.condition||u(I),I})();return Object.assign(_,{abort:C,requestId:f,arg:c,unwrap(){return _.then(Rle)}})}}return Object.assign(a,{pending:i,rejected:s,fulfilled:o,settled:Cle(s,o),typePrefix:e})}return t.withTypes=()=>t,t})();function Rle(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function Ple(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var Nle=Symbol.for("rtk-slice-createasyncthunk"),WWe={[Nle]:vle};var K9="listener",J9="completed",Y9="cancelled",KWe=`task-${Y9}`,JWe=`task-${J9}`,YWe=`${K9}-${Y9}`,ZWe=`${K9}-${J9}`;var{assign:Z9}=Object;var m0="listenerMiddleware";var Ole=Z9(Fa(`${m0}/add`),{withTypes:()=>Ole}),QWe=Fa(`${m0}/removeAll`),xle=Z9(Fa(`${m0}/remove`),{withTypes:()=>xle});function XI(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 f0=(t=>{let e=new Set,r=e,n=()=>{e===r&&(e=new Set(e))},o=s=>{let a=!0;return n(),e.add(s),()=>{a&&(n(),e.delete(s),a=!1)}},i=()=>{let s=Array.from(e);r=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 h=u(m),S=c&&!f;return f||(c=!1,l=!1),S&&i(),h};return a.subscribe(()=>{l?c=!0:i()}),{...a,dispatch:p,subscribe:o}}});var Q9=t=>!!t&&typeof t=="object"&&!Array.isArray(t),Dle=(t,e)=>{if(Object.keys(e).length===0)return;Zt.updateDataPageStore(e),t[d.SHARED]||(t[d.SHARED]={});let r=t[d.SHARED];Object.entries(e).forEach(([n,o])=>{let i=r[n];Q9(i)&&Q9(o)?r[n]={...i,...o}:r[n]=o})},Va=(t,e)=>{let{data:{shared:r={}}={},context:n}=e;if(Object.keys(r).length===0){n&&g.deleteIn(t,[n,"shared"]);return}Dle(t,r),n&&g.deleteIn(t,[n,"shared"])},gl=(t,e,r=!1)=>{let{context:n,caseViewMode:o=r?void 0:d.PERFORM_MODE,containerName:i}=e;i!==ge.WORKAREA&&o&&g.setIn(t,[n,"context_data","caseViewMode"],o)},g0=(t,e)=>{let{context:r}=e;g.setIn(t,[r,"context_data","actionType"],e.actionType),g.setIn(t,[r,"context_data","assignmentID"],e.assignmentID)},X9=(t,e)=>{let{context:r}=e;g.deleteIn(t,[r,"context_data","blocking_action_counter"]),g.deleteIn(t,[r,"context_data","deferred_action_queue"])};var Zh=t=>t!==null&&typeof t=="object",eB=(t,e=[])=>{e.forEach(r=>g.deleteIn(t,r))},h0=(t,e=[])=>{e.forEach(r=>g.deleteIn(t,r))},y0=(t,e=[])=>{e.forEach(r=>{g.deleteIn(t,r)})},e_=(t,e,r={})=>{let{deleteAssignmentSpecificResources:n=!0,doDeleteConfirmationDetails:o=!0,skipMergeAssignmentsAndActions:i=!0}=r;g.deleteIn(t,[e,"nextAssignmentInfo"]),i&&(g.deleteIn(t,[e,d.CASE_INFO.CASE_INFO,"availableActions"]),g.deleteIn(t,[e,d.CASE_INFO.CASE_INFO,"availableProcesses"]),g.deleteIn(t,[e,d.CASE_INFO.CASE_INFO,"assignments"])),g.deleteIn(t,[e,d.CASE_INFO.CASE_INFO,"activeActionID"]),g.deleteIn(t,[e,d.CASE_INFO.CASE_INFO,"childCases"]),o&&(g.deleteIn(t,[e,d.CASE_INFO.CASE_INFO,"confirmationLinks"]),g.deleteIn(t,[e,"caseMessages"])),n&&(g.deleteIn(t,[e,d.CASE_INFO.CASE_INFO,"actionButtons"]),g.deleteIn(t,[e,d.CASE_INFO.CASE_INFO,"navigation"]))},wle=(t,e)=>{let{containerItemID:r,context:n,deleteContext:o}=e;o&&g.deleteIn(t,[n]),g.deleteIn(t,[r])},$le={},Mle=Oi($le,t=>{t.addCase(Et,(e,r)=>{if(!r.payload.data||e[r.payload.context])return;r.payload.doDeleteCaseSummary&&e_(e,r.payload.context);let{target:n}=r.payload;n&&(n.includes(d.WORKAREA)||n.includes(d.MODAL))?e[r.payload.context]=r.payload.data:e[r.payload.containerItemID]=r.payload.data,gl(e,r.payload),g0(e,r.payload),Va(e,r.payload),X9(e,r.payload)}).addCase(kt,(e,r)=>{r.payload.doDeleteCaseSummary&&e_(e,r.payload.context,{deleteAssignmentSpecificResources:r.payload.deleteAssignmentSpecificResources});let{target:n,propertiesToReplace:o=[]}=r.payload;if(n&&(n.includes(d.WORKAREA)||n.includes(d.MODAL))){let i=e[r.payload.context];Zh(i)&&(e[r.payload.context]=xt(i,r.payload.data,{propertiesToReplace:[...o]}))}else{let i=e[r.payload.containerItemID];Zh(i)&&(e[r.payload.containerItemID]=xt(i,r.payload.data,{propertiesToReplace:[...o]}))}(r.payload.actionType||r.payload.assignmentID)&&g0(e,r.payload),gl(e,r.payload),Va(e,r.payload),h0(e,r.payload.suggestionContexts)}).addCase(Ze,(e,r)=>{let{childContainersContexts:n=[]}=r.payload;wle(e,r.payload),y0(e,n),eB(e,r.payload.transientItems),h0(e,r.payload.suggestionContexts)}).addCase(Yo,(e,r)=>{let{containerItems:n}=r.payload;Array.isArray(n)?n.forEach(o=>{g.deleteIn(e,[o])}):g.deleteIn(e,[n])}).addCase(Hs,(e,r)=>{let{context:n,contextToBeRemoved:o,data:i,childContainersContextsToBeRemoved:s}=r.payload;e_(e,r.payload.context),gl(e,r.payload);let a=e[n],c=e[o];if(!Zh(a)||!Zh(c))return;let l=xt(a,c);Zh(l)&&(e[n]=xt(l,i),g.deleteIn(e,[o]),y0(e,s),Va(e,r.payload))}).addCase(et,(e,r)=>{let{context:n,pulseReplace:o=!0,childContainersContexts:i=[]}=r.payload,{data:s}=r.payload,a=g.getIn(e[n],"pulse"),c=g.getIn(e[n],"OperatorID"),l=g.getIn(e[n],"pxRequestor");g.setIn(e,n,s),l&&g.setIn(e,[n,"pxRequestor"],s.pxRequestor?g.mergeDeep(l,s.pxRequestor):l),c&&g.setIn(e,[n,"OperatorID"],s.OperatorID?g.mergeDeep(c,s.OperatorID):c),!o&&a&&g.setIn(e,[n,"pulse"],a),gl(e,r.payload),Va(e,r.payload),y0(e,i),eB(e,r.payload.transientItems),h0(e,r.payload.suggestionContexts)}).addCase(mn,(e,r)=>{let{context:n,doDeleteConfirmationDetails:o=!0,skipMergeAssignmentsAndActions:i=!0}=r.payload;e_(e,n,{doDeleteConfirmationDetails:o,skipMergeAssignmentsAndActions:i})}).addCase(Fs,(e,r)=>{let{transientItemID:n,data:o}=r.payload;g.setIn(e,n,o)}).addCase(Zo,(e,r)=>{let{transientItems:n}=r.payload;n.forEach(o=>g.deleteIn(e,o))}).addCase(Qo,(e,r)=>{let{transientItems:n}=r.payload;n.forEach(o=>g.deleteIn(e,o))}).addCase(Vs,(e,r)=>{let{transientItemID:n,data:o}=r.payload;xt(g.getIn(e,n),o)}).addCase(po,(e,r)=>{let{transientItemID:n,data:o}=r.payload;xt(g.getIn(e,n),o)}).addCase(zi,(e,r)=>{let{transientItemID:n,data:o}=r.payload;Object.keys(o??{}).forEach(i=>{g.deleteIn(e,[n,i])})}).addCase(Bs,(e,r)=>{let{transientItemID:n,data:o}=r.payload;g.deleteIn(e,n),g.setIn(e,n,o)}).addCase(Yl,(e,r)=>{let{key:n,value:o}=r.payload;g.setIn(e,`${d.SHARED}.${n}`,o)}).addCase(Xl,(e,r)=>{let{context:n,data:o}=r.payload;return g.setIn(e,n,o)})}),S0=Mle;function tB(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 kle=Fa(nu),Lle=Oi({},t=>{t.addCase(Er,(e,r)=>{let{propertiesToReplace:n=[],propertiesToReArrange:o=[],uiRootReference:i="",interestPath:s}=r.payload,a=i&&typeof r.payload.context=="string"?`${r.payload.context}.${i}`:r.payload.context,c=typeof a=="string"?oo(a):[],l={isArrayDeepMerge:r.payload.isArrayDeepMerge,propertiesToReplace:[...n],propertiesToReArrange:[...o]};if(i&&c.length)g.setIn(e,c,xt(g.getIn(e,c),g.getIn(r.payload.data,oo(i)),l));else if(s){let u=g.getIn(e[r.payload.context],s),p=g.getIn(r.payload.data,s),m=xt(u,p,{isArrayDeepMerge:!0}),f=g.getIn(r.payload.data.context_data,s);xI(e[r.payload.context],[...n],[...o]),g.setIn(e[r.payload.context],s,m),e[r.payload.context]&&f&&g.setIn(e[r.payload.context].context_data,s,xt(g.getIn(e[r.payload.context].context_data,s),f,{isArrayDeepMerge:!0}))}else e[r.payload.context]=xt(e[r.payload.context],r.payload.data,l);gl(e,r.payload,!0),Va(e,r.payload)}).addCase(_t,(e,r)=>{let{context:n,reference:o,value:i,isArrayDeepMerge:s}=r.payload;ww(e[n],o,i,{isArrayDeepMerge:s})}).addCase(lc,(e,r)=>{let{context:n,reference:o,value:i}=r.payload;$w(e[n],o,i)}).addCase(Zl,(e,r)=>{Dw(e[r.payload.context],r.payload.reference)}).addCase(Us,(e,r)=>{g.setIn(e[r.payload.context],"context_data.isLoading",!0)}).addCase(Ro,(e,r)=>{g.setIn(e[r.payload.context],"context_data.isLoading",!1)}).addCase(js,(e,r)=>{let n=tB(r);n&&(e[n]||(e[n]={}),g.setIn(e[n],"context_data.isOffline",!0))}).addCase(Jl,(e,r)=>{let n=tB(r);n&&(e[n]||(e[n]={}),g.setIn(e[n],"context_data.isOffline",!1))}).addCase(Xo,(e,r)=>{let{data:n}=r.payload;Va(e,{data:{shared:n}})}).addCase(ru,(e,r)=>{let{dataPagesToBeRemoved:n=[]}=r.payload;if(!e.shared||n.length===0)return;let o=new Map;n.forEach(i=>{let{dataPageName:s,dataPageNameWithHash:a}=i,c=o.get(s);c?c.push(a):o.set(s,[a])}),o.forEach((i,s)=>{i.forEach(c=>{g.deleteIn(e.shared,[s,c])});let a=g.getIn(e.shared,[s]);a&&Object.keys(a).length===0&&g.deleteIn(e.shared,[s])})}).addCase(mc,(e,r)=>{let n=g.getIn(e[r.payload.context].context_data,"blocking_action_counter",0);r.payload.isInitiateBlockingAction?g.setIn(e[r.payload.context].context_data,"blocking_action_counter",n+1):g.setIn(e[r.payload.context].context_data,"blocking_action_counter",n-1)}).addCase(kle,(e,r)=>{e.locale=g.getIn(r.payload,"locale","")})}),rB=Lle;var oB=/\[(\d+)\]$/gi,iB=/(\d+)/gi,Ule=/\[\d+\]$/,sB=(t,e,r,n=[d.CONTEXT_DATA,d.CASE_INFO.CASE_INFO,d.CONTENT])=>{let o=g.getIn(e,n);if(o){let s=vE(o,[],[]);for(let a of s)g.setIn(t[r],[...n,...a],{})}},nB=(t,e,r,n)=>{let{property:o,pageReference:i,category:s,type:a,subType:c}=n.payload,l=g.getIn(t[e],r);if(l&&s===d.CASEMESSAGES)g.setIn(t[e],Qn(o,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),r&&r.length>0&&g.setIn(t[e],Qn(o,i,s),u)}},jle=(t,e)=>{let{property:r,pageReference:n,category:o,isListEntry:i,stateObj:s}=e.payload,{context:a}=e.payload,c=a;if(s)return sB(t,s,a),t;let l=Qn(r,n,o,i);return o===d.PAGE&&a?.includes(ge.WORKAREA)&&(c=qe(a)),nB(t,c,l,e),nB(t,a,l,e),t},zle=t=>{let e=t.map(r=>{let n=r.match(oB),o=null;if(n?.length){let i=n[0].match(iB);i?.length&&(o=parseInt(i[0],10))}return{key:r,hasIndex:!!n,numericIndex:o}});return e.sort((r,n)=>!r.hasIndex&&!n.hasIndex?r.key.localeCompare(n.key):!r.hasIndex&&n.hasIndex?-1:r.numericIndex!==null&&n.numericIndex!==null?r.numericIndex-n.numericIndex:1),e.map(r=>r.key)},Fle=(t,e)=>{let{property:r,pageReference:n,category:o,isListEntry:i,deletingIndex:s,stateObj:a}=e.payload,{context:c}=e.payload;if(a)return sB(t,a,c),t;let l=Qn(r,n,o,i);if(Number.isInteger(s)){g.deleteIn(t[c],l);let u=l.slice(0,l.length-1),p=g.getIn(t[c],u)||{},m=zle(Object.keys(p));p=m.map(f=>p[f]),p.forEach((f,h)=>{let S=m[h].match(oB);if(S?.length){let A=parseInt(S[0].match(iB)[0],10);A>s&&(g.deleteIn(t[c],u.concat(m[h])),g.setIn(t[c],u.concat(m[h].replace(Ule,`[${A-1}]`)),f))}})}else g.setIn(t[c],l,{});return t};function Vle(t){let e=null,r=t.lastIndexOf(".");return r<0?null:(e=t.substring(0,r),e&&`caseInfo.content.${e}`.replace(/\(/g,"[").replace(/\)/g,"]"))}function aB(t,e){return g.getIn(t,e)?.dataInfo?.content!==void 0}var cB=(t,e)=>{let r=g.getIn(t,e);return B.isObjectCaseType(r?.objectInfo?.objectTypeID)===!0};function lB(t,e){let r=Vr.FIELD_MESSAGES_PATH;return aB(t,e)?r=Vr.DATA_OBJECT_FIELD_MESSAGES_PATH:cB(t,e)&&(r=Vr.OBJECT_FIELD_MESSAGES_PATH),r}var Ble=(t,e,r)=>{let n=g.getIn(r,d.ERROR_FIELD_IN_PAGE).slice(1),o=g.getIn(r,d.ERROR_IN_PAGE_IDENTIFIER).slice(1);if(o){let i="caseInfo.content";aB(t,e)?i="dataInfo.content":cB(t,e)&&(i="objectInfo.content");let s=n?`${i}.${n}`:i;s=s.replace(/\(/g,"[").replace(/\)/g,"]");let a=Qn(o,s,d.PROPERTY),c=g.getIn(t[e],`${s}.classID`),l=lt(o,c),u=v.getLocale()??"en-US",p=new Wd(u,l?.localeReference),m={type:E.MESSAGES.MESSAGES_TYPE_ERROR,message:r.localizedValue,...l?.label&&{fieldLabel:p.getLocalizedText(l.label)}},f=g.getIn(t[e],a,[]);if(g.isContains(f,m))return;g.setIn(t[e],a,[...f,m])}},Hle=(t,e,r)=>{r.forEach(n=>{Ble(t,e,n)})},Gle=t=>{let e=[];return t.forEach(r=>{let n=r.erroneousInputOutputFieldInPage?.replace(/^\./,"");e.push({type:E.MESSAGES.MESSAGES_TYPE_ERROR,message:r.localizedValue,...n&&{fieldInPage:n}})}),e};function qle(t,e){let{err:r,formFields:n}=e.payload,{context:o}=e.payload,{fieldErrors:i,pageErrors:s}=Sj(r.errorDetails,n),a=lB(t,o);if(g.setIn(t,[o,...a],{}),g.setIn(t,[o,...Vr.PAGE_MESSAGES_PATH],[]),i.forEach(c=>{let l=g.getIn(c,d.ERROR_FIELD_IN_PAGE);if(l){let u=l.slice(1);if(u){let p=Vle(u);if(!p)return!1;let m=u.substring(u.lastIndexOf(".")+1),f=Qn(m,p,d.PROPERTY);g.setIn(t,[o,...f],[])}}}),i.length>0&&Hle(t,o,i),s.length>0){let c=Gle(s);t[o]||(o=d.APP.APP),g.setIn(t,[o,...Vr.PAGE_MESSAGES_PATH],c)}else o.includes&&o.includes(ge.WORKAREA)&&(o=qe(o)),g.deleteIn(t,[o,...Vr.PAGE_MESSAGES_PATH]);return t}var Wle=Oi({},t=>{t.addCase(Te,(e,r)=>r.payload.err.errorDetails&&(r.payload.err.errorClassification===E.VALIDATION_FAIL||r.payload.err.errorClassification===E.INVALID_INPUTS||(r.payload.err?.displayButtonsOnErrors?.length??0)>0)?qle(e,r):e).addCase(kt,(e,r)=>{let{context:n}=r.payload,o=[n,...lB(e,n)],i=[n,...Vr.PAGE_MESSAGES_PATH];if(g.setIn(e,o,{}),g.setIn(e,i,[]),n&&n.includes(ge.WORKAREA)){let a=[xo(n),...Vr.PAGE_MESSAGES_PATH];g.setIn(e,a,[])}}).addCase(Wn,(e,r)=>{let{isListEntry:n,clearAll:o,context:i}=r.payload;return o?(g.deleteIn(e,[i,d.CONTEXT_DATA]),e):n?Fle(e,r):jle(e,r)}).addCase(Ws,(e,r)=>{let{messages:n,property:o,pageReference:i,context:s,category:a}=r.payload,c=Qn(o,i,a);n&&n.length>0&&Array.isArray(n)&&c&&c.length>0&&g.setIn(e[s],Qn(o,i,a),n)})}),E0=Wle;var uB=(t,e,r,n,o)=>{g.setIn(t[e],[...r,n],o)},Kle=(t,e,r,n,o)=>{let i=xt(g.getIn(t[e],[...r,n],{}),o);g.setIn(t[e],[...r,n],i)},Jle=(t,e,r,n,o)=>{let i=g.getIn(t[e],r,[]);typeof n=="string"?delete i[n]:i.splice(n,1),g.setIn(t[e],r,i),be.deleteListNode(e,[o],i.length)},Yle=(t,e,r,n,o)=>{if(n===o)return;let i=g.getIn(t[e],[...r,n],{}),s=g.getIn(t[e],r,[]);s.splice(n,1),s.splice(o,0,i),g.setIn(t[e],r,s),Uj(t,e,r?.join("."),n,o)},Zle=(t,e,r,n)=>{let o=g.getIn(t[e],r)||[],i=!1;n.forEach(s=>{let{instruction:a,content:c,listIndex:l}=s;a===d.LIST_ACTIONS.SELECT?(o[l]=c,i=!0):delete o[l]}),i&&ta(e,r?.join(".")),g.setIn(t[e],r,o.filter(Boolean))},Qle=(t,e,r)=>{g.setIn(t[e],r,[])},Xle=(t,e,r,n)=>{g.setIn(t[e],r,n)},eue=(t,e,r)=>{g.setIn(t[e],r,{})},tue=Oi({},t=>{t.addCase(mo,(e,r)=>{let{instruction:n,actions:o,context:i,referenceList:s,listIndex:a,groupIndex:c,listMoveToIndex:l,content:u={}}=r.payload,p=oo(s);switch(n){case d.LIST_ACTIONS.ADD:uB(e,i,p,c,u);break;case d.LIST_ACTIONS.INSERT:uB(e,i,p,a,u);break;case d.LIST_ACTIONS.UPDATE:Kle(e,i,p,a??c,u);break;case d.LIST_ACTIONS.DELETE:Jle(e,i,p,a??c,s);break;case d.LIST_ACTIONS.MOVE:Yle(e,i,p,a,l);break;case d.LIST_ACTIONS_TYPE.SELECT_DESELECT:Zle(e,i,p,o);break;case d.LIST_ACTIONS_TYPE.DESELECT_ALL:Qle(e,i,p);break;case d.LIST_ACTIONS.REPLACE:Xle(e,i,p,u);break;case d.LIST_ACTIONS.DELETEPAGE:eue(e,i,p);break;default:break}})}),dB=tue;var pB=(t,e)=>{if(t||(t=Qh().data),e.type===Ks)return Qh().data;switch(e.type){case Er:case _t:case lc:case Zl:case Us:case Ro:case js:case Jl:case Xo:case ru:case mc:case nu:return rB(t,e);case Te:case Wn:case Ws:return E0(t,e);case kt:return E0(S0(t,e),e);case Et:case Ze:case Yo:case Hs:case et:case mn:case Fs:case Zo:case Qo:case Vs:case po:case zi:case Bs:case Yl:case Xl:return S0(t,e);case mo:return dB(t,e);default:return t}};var mB={},A0=(t,e=[])=>{e.forEach(r=>{g.deleteIn(t,[r])})},rue=(t,e,r,n)=>{t===""&&g.deleteIn(e,[r,"items",n,"key"])},nue=(t,e,r,n,o)=>{n||(o?g.setIn(t,[e,"items",r,"pageName"],o):g.deleteIn(t,[e,"items",r,"pageName"]))},C0=(t,e)=>{let{type:r,payload:n}=e,o=r===kt,{target:i,context:s,semanticURL:a="",root:c,containerItemID:l,childContainers:u,flowName:p,resourceType:m="",key:f="",clearView:h=!1,pageName:S}=n;return c?g.setIn(t,[i,"items",l,"view"],c):h&&g.deleteIn(t,[i,"items",l,"view"]),s&&g.setIn(t,[i,"items",l,"context"],s),p&&g.setIn(t,[i,"items",l,"flowName"],p),(!o||o&&f)&&g.setIn(t,[i,"items",l,"key"],f.trim()),rue(f,t,i,l),(!o||o&&a)&&g.setIn(t,[i,"items",l,"semanticURL"],a),(!o||o&&m)&&g.setIn(t,[i,"items",l,"resourceType"],m),nue(t,i,l,o,S),A0(t,u),t},oue=({prevItems:t,prevAccessedOrder:e,containerItemID:r,root:n,semanticURL:o,key:i,flowName:s,readOnly:a,context:c,isInCreateStage:l,resourceType:u,actionName:p,isMinimizable:m,isBulkAction:f,showProgress:h,progressMessage:S,modalOptions:A,isTraditionalRemoteCase:C,resourceStatus:_,hideDefaultActionButtons:I,referenceList:N,subscriptName:x,subscriptFieldName:H,pageGroupName:G,isPageGroup:ne,index:j,actionID:oe,acTertiary:Ie,isMultiRecordData:he,parentContext:De,isDeleteConfirmation:Fe,workId:_e,caseTypeID:Ye,className:Oe,keys:ft,enableBackNavigation:Qt,heading:yr,pageName:Xt})=>({accessedOrder:[...e,r],items:{...t,[r]:{view:n,semanticURL:o,key:i,flowName:s,readOnly:a,context:c,isInCreateStage:l,resourceType:u,actionName:p,isMinimizable:m,...f&&{isBulkAction:f},showProgress:h,progressMessage:S,modalOptions:A,isTraditionalRemoteCase:C,resourceStatus:_,...I&&{hideDefaultActionButtons:I},referenceList:N,subscriptName:x,subscriptFieldName:H,pageGroupName:G,isPageGroup:ne,index:j,...oe&&{actionID:oe},...Ie&&{acTertiary:Ie},...he&&{isMultiRecordData:he},...De&&{parentContext:De},...Xt&&{pageName:Xt},...Fe&&{isDeleteConfirmation:Fe,workId:_e,caseTypeID:Ye,className:Oe,keys:ft,enableBackNavigation:Qt},heading:yr}}}),iue=(t,e)=>{let{target:r,context:n,isInCreateStage:o,isBulkAction:i,semanticURL:s,root:a,containerItemID:c,actionMgrID:l,key:u,flowName:p,resourceType:m,actionName:f,isMinimizable:h,showProgress:S,progressMessage:A,modalOptions:C,resourceStatus:_,hideDefaultActionButtons:I,actionID:N,isMultiRecordData:x,acTertiary:H,parentContext:G,heading:ne,isTraditionalRemoteCase:j,readOnly:oe,referenceList:Ie,subscriptName:he,subscriptFieldName:De,pageGroupName:Fe,isPageGroup:_e,index:Ye,isDeleteConfirmation:Oe,workId:ft,caseTypeID:Qt,className:yr,keys:Xt,enableBackNavigation:un,pageName:bo}=e.payload,Rr=t[r],Vn=Rr&&Rr.type,Kr=Rr&&Rr.accessedOrder||[],Ft=Rr&&Rr.items||{};if(t[r]&&Vn==="single"&&Kr.length>0){C0(t,e);return}let ao=oue({prevItems:Ft,prevAccessedOrder:Kr,containerItemID:c,root:a,semanticURL:s,key:u,flowName:p,readOnly:oe,context:n,isInCreateStage:o,resourceType:m,actionName:f,isMinimizable:h,isBulkAction:i,showProgress:S,progressMessage:A,modalOptions:C,isTraditionalRemoteCase:j,resourceStatus:_,hideDefaultActionButtons:I,referenceList:Ie,subscriptName:he,subscriptFieldName:De,pageGroupName:Fe,isPageGroup:_e,index:Ye,actionID:N,acTertiary:H,isMultiRecordData:x,parentContext:G,isDeleteConfirmation:Oe,workId:ft,caseTypeID:Qt,className:yr,keys:Xt,enableBackNavigation:un,heading:ne,pageName:bo});w.resolveActionByID(l,null,!1),t[r]||(t[r]={accessedOrder:[],items:{}},Vn!==void 0&&(t[r].type=Vn)),g.setIn(t,[r,"accessedOrder"],ao.accessedOrder),g.setIn(t,[r,"items",c],ao.items[c])},sue=(t,e,r)=>{let n=t&&t[e]?.type,o=t&&t[e]?.accessedOrder||[];return n==="single"?o.length>0?o:[...o,r]:o.includes(r)?o:[...o,r]},aue=(t,e)=>{let{actionMgrID:r,data:n,target:o,containerItemID:i}=e.payload,s=t;try{let a=sue(t,o,i);g.setIn(t,[o,"items",i,"transientItems"],[]),g.setIn(t,[o,"accessedOrder"],a),s=C0(t,e),w.resolveActionByID(r,n,!1)}catch{w.rejectActionByID(r,!1)}return s},cue=Oi(mB,t=>{t.addCase(Ks,()=>mB).addCase(Ql,(e,r)=>{let{context:n,name:o,type:i,actionMgrID:s}=r.payload,a=`${n}/${o}`;if(w.resolveActionByID(s,null,!1),e[a])return e;g.setIn(e,[a],{type:i,accessedOrder:[],items:{}})}).addCase(sS,(e,r)=>{let{containerName:n,childContainers:o=[]}=r.payload;g.deleteIn(e,[n]),o.forEach(i=>{g.deleteIn(e,[i])})}).addCase(Yo,(e,r)=>{let{context:n,name:o,actionMgrID:i,childContainers:s}=r.payload,a=`${n}/${o}`;w.resolveActionByID(i,null,!1),g.setIn(e,[a,"accessedOrder"],[]),g.setIn(e,[a,"items"],{}),Array.isArray(s)&&s.forEach(c=>{g.deleteIn(e,[c])})}).addCase(Et,(e,r)=>{iue(e,r)}).addCase(kt,(e,r)=>{let{actionMgrID:n,data:o}=r.payload;try{C0(e,r),w.resolveActionByID(n,o,!1)}catch{w.rejectActionByID(n,!1)}}).addCase(et,(e,r)=>aue(e,r)).addCase(or,(e,r)=>{let{target:n,containerItemID:o,actionMgrID:i}=r.payload;try{let s=g.getIn(e,[n,"accessedOrder"]).filter(a=>a!==o);s.push(o),g.setIn(e,[n,"accessedOrder"],s),w.resolveActionByID(i,null,!1)}catch{w.rejectActionByID(i,!1)}}).addCase(Hs,(e,r)=>{let{target:n,containerItemID:o,actionMgrID:i,childContainers:s}=r.payload;try{let a=g.getIn(e,[n,"accessedOrder"]).filter(c=>c!==o);g.setIn(e,[n,"accessedOrder"],a),g.deleteIn(e,[n,"items",o]),A0(e,s),w.resolveActionByID(i,null,!1)}catch{w.rejectActionByID(i,!1)}}).addCase(Ze,(e,r)=>{let{target:n,containerItemID:o,actionMgrID:i,childContainers:s}=r.payload;try{let a=g.getIn(e,[n,"accessedOrder"]).filter(c=>c!==o);g.setIn(e,[n,"accessedOrder"],a),g.deleteIn(e,[n,"items",o]),A0(e,s),w.resolveActionByID(i,null,!1)}catch{w.rejectActionByID(i,!1)}}).addCase(Fs,(e,r)=>{let{transientItemID:n,target:o,contextName:i}=r.payload,s=g.getIn(e,[o,"items",i,"transientItems"])??[];g.setIn(e,[o,"items",i,"transientItems"],[...s,n])}).addCase(Qo,(e,r)=>{let{target:n,containerItemID:o}=r.payload;g.deleteIn(e,[n,"items",o,"transientItems"])}).addCase(Zo,(e,r)=>{let{target:n,transientItemID:o,containerItemID:i}=r.payload,a=(g.getIn(e,[n,"items",i,"transientItems"])??[]).filter(c=>c!==o);g.setIn(e,[n,"items",i,"transientItems"],a)})}),fB=cue;var gB={},Qh=()=>gB,lue=t=>{let e=t.Data||t.data,{uiResources:r={}}=t,n=r[d.CONTEXT_DATA]||t[d.CONTEXT_DATA];gB={data:{locale:v.getLocale(),[d.APP.APP]:{...e,[d.CONTEXT_DATA]:n}},containers:{}}},hB=t=>(lue(t),{data:pB,containers:fB});var I0=(t,e=!1)=>t===d.ACTION?e?jt.REFRESH_CASE_DATA:jt.REFRESH_ASSIGNMENT_DATA:jt.REFRESH_CASE_VIEW,_0=(t,e,r)=>{let n=[];e&&r&&n.push({page:e,actionID:r});let o=t;for(;o;){let i=J.getPropertyValue(d.CONTEXT_DATA_MODAL_VIEW.CONTEXT_DATA_MODAL_VIEW,"",o);if(!i?.isMultiRecordData||i.editType!==d.ACTION||!i.interestPage||!i.interestPageActionID)break;i.interestPage!==e&&n.unshift({page:i.interestPage,actionID:i.interestPageActionID}),o=i.parentContext}return n},t_=t=>{let{context:e}=t,n={...Rt(e,{skipUUID:!1}).content,contextData:!1},o=Nu(e);g.isEmpty(o)||(n=wc(o,n));let i=I0(t.editType,t.isLocalAction),{restApi:s,reqType:a}=U(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}`,n.interestPageActionID=t.interestPageActionID,v.isInfinityRuntime()&&(n.actionIdArrayToBeProcessed=_0(e,t.interestPage,t.interestPageActionID))),n.interestPage=t.interestPage,q(M(c,{method:a,body:n,headers:t.headers},e)).pipe(O(l=>({actionInPayload:t,response:l.data,headers:$e(l.headers)})),me(": Error occurred during ajax call : ",e))};var r_=[d.CASE_INFO.CASE_INFO_CONTENT,d.OBJECT_INFO.OBJECT_INFO_CONTENT],uue=(t,e)=>`${r_.find(n=>g.hasIn(t,n))??d.CASE_INFO.CASE_INFO_CONTENT}${g.convertClipboardPageToPageRefNotation(e)}`,b0=async(t,e)=>{let{context:r,serverPrecedenceFields:n,requestType:o}=e,i=Bt.getTargetViewContainerName(Rn),s=Z(i,r),a={acName:s,context:r},c=Le(t,{[E.STOPMERGEACTIONS]:!0,[E.ACTIONS.DELETEAVIALACTIONS]:!0});c.directUrlUpdation=!1,o===jt.REFRESH&&await Pe(c,e,a);let u=Me(c,{target:s,context:r});e.interestPage&&(u.interestPath=uue(u.data,e.interestPage)),u.isArrayDeepMerge=e.options?.isArrayDeepMerge,u.preserveClientChanges=e.options?.preserveClientChanges!==void 0?e.options.preserveClientChanges:!0;let p=B.getPropertiesToReArrange(r);return{payload:u,mergeOptions:{serverPrecedenceFields:n,propertiesToReArrange:p}}},yB=async(t,e)=>{let{context:r}=e,{payload:n,mergeOptions:o}=await b0(t,e),i=V(Re,n,o),s=i.payload?.data?.pageInstructions;return s?.length>0&&(delete i.payload?.data?.pageInstructions,ke.mergeServerPageInstructions(r,s)),T(i),n};var due=()=>{let t=`${d.APP.APP}/${d.PRIMARY}`,e=se(t);return(e?Ar(`${e}/${d.WORKAREA}`):null)??Ar(t)},SB=async t=>{let e=due();if(!e)return;let{data:r}=kx(t);typeof r!="object"||r===null||await yB(r,{context:e,serverPrecedenceFields:[],requestType:jt.REFRESH})};var v0=t=>typeof t=="object"&&t!==null&&!Array.isArray(t),EB=t=>v0(t)||t===void 0||t===null,AB=t=>v0(t)?t:void 0,T0=(t,e)=>t===e||t.startsWith(`${e}.`)||t.startsWith(`${e}[`),CB=(t,e,r,n,o=[])=>{let i={stalePaths:[],conflictPaths:[]},s=(c,l,u,p)=>{o.some(m=>T0(p,m)||T0(m,p))||lo(u,l)||(lo(c,l)?i.stalePaths.push(p):lo(c,u)||i.conflictPaths.push(p))},a=(c,l,u,p)=>{if(!(l===u||o.some(m=>T0(p,m)))){if(v0(c)&&EB(l)&&EB(u)){Object.keys(c).forEach(m=>{a(c[m],AB(l)?.[m],AB(u)?.[m],`${p}.${m}`)});return}Array.isArray(c)||Array.isArray(l)||Array.isArray(u)||s(c,l,u,p)}};return a(t,e,r,n),i};var Is={},{VIEW:pue,FIELD:mue}=d.CONTEXT_TREE_NODE_TYPES,fue=["refreshFor","propertyName","optionalPayload","resetForm","skipPayloadGeneration","isFillFormWithAI"],o_={},i_={},s_={},P0={},a_={},c_={},N0=new Set,IB=0,gue=(t,e)=>{let r=[];return Object.keys(t).forEach(n=>{(!Object.hasOwn(e,n)||e[n]!==t[n])&&r.push(n)}),r},_B=t=>{let e=kh(t.context);return{changedPropertyValues:e,preserveFields:t.preRequestSnapshot?gue(e,t.preRequestSnapshot):[]}},hue=t=>{if(!t)return;let e=a_[t];return delete a_[t],e},yue=t=>{if(!t)return;let e=c_[t];return delete c_[t],e},Sue=(t,e)=>{let r=t.mergePayload?.preserveClientChanges===!1?e.preserveFields:Object.keys(e.changedPropertyValues),{serverPrecedenceFields:n}=t.mergeOptions,o=(n??[]).flatMap(i=>r_.map(s=>`${s}.${i}`));return[...r,...o]},Eue=t=>typeof t=="object"&&t!==null?JSON.parse(JSON.stringify(t)):t,Aue=(t,e)=>{let r=t.mergePayload?.data;if(t.preRequestData===void 0||!r)return!1;let n=W(t.context),o=t.mergePayload.interestPath?[t.mergePayload.interestPath]:r_,i=Sue(t,e),s=!1;return o.forEach(a=>{let c=g.getIn(r,a);if(c===void 0)return;let{stalePaths:l,conflictPaths:u}=CB(c,g.getIn(t.preRequestData,a),g.getIn(n,a),a,i);l.forEach(p=>{let m=g.getIn(n,p);m===void 0?g.deleteIn(r,p):g.setIn(r,p,Eue(m))}),(l.length>0||u.length>0)&&(s=!0)}),s},Cue=t=>{let e=w.getNextActionMgrId(),r={...t.options,actionMgrID:e};fue.forEach(n=>{delete r[n]}),N0.add(e),T(la({...t,options:r}))},Iue=t=>t.some(r=>r.isReconciliation)?void 0:[...t].reverse().find(r=>{let n={...r.actionConfig?.options};return r.actionConfig&&!n.isFillFormWithAI})?.actionConfig,bB=t=>t.actionConfig?.actionType===fc,_ue=t=>{let e=0,r=()=>{},n=new Promise(o=>{r=o});return $.publish(E.PUB_SUB_EVENTS.ON_FILL_FORM_WITH_AI_COMPLETE,{context:t,registerField:()=>{e+=1},deregisterField:()=>{e-=1,e===0&&r()}}),e===0&&r(),n},TB=async t=>{bB(t)&&(await _ue(t.context),t.actionMgrID&&w.resolveActionByID(t.actionMgrID,t.mergePayload)),Ct.deRegisterBlockingAction(t.context).catch(()=>{})},vB=(t,e,r)=>{let n=e&&Aue(t,r),{preserveFields:o}=r,i=o.length>0?{...t.mergeOptions,preserveFields:o}:t.mergeOptions,s=V(Re,t.mergePayload,i),a=g.getIn(s,"payload.data.pageInstructions");return a&&a.length>0&&(delete s.payload?.data?.pageInstructions,ke.mergeServerPageInstructions(t.context,a)),T(s),t.actionMgrID&&!bB(t)&&w.resolveActionByID(t.actionMgrID,t.mergePayload),n},bue=t=>{delete i_[t];let e=o_[t];if(delete o_[t],!e||e.length===0)return;e.sort((a,c)=>a.seq-c.seq);let r=e.length>1,n=!1,o=new Set;e.map(a=>({item:a,changeState:_B(a)})).forEach(({item:a,changeState:c})=>{n=vB(a,r,c)||n,o.add(a.context)}),o.forEach(a=>{$.publish(E.PUB_SUB_EVENTS.ON_REFRESH_COMPLETE,{context:a})});let s=n?Iue(e):void 0;s&&Cue(s),e.forEach(TB)},Tue=(t,e,r)=>{if(!t)return;s_[t]=e,IB+=1,P0[t]=IB,a_[t]=kh(r),c_[t]=W(r),(i_[e]??(i_[e]=new Set)).add(t)},vue=t=>t?P0[t]??0:0,R0=t=>{if(!t)return;let e=s_[t];if(!e)return;delete s_[t],delete P0[t],delete a_[t],delete c_[t],N0.delete(t);let r=i_[e];r&&(r.delete(t),r.size===0&&bue(e))},Rue=t=>(vB(t,!1,_B(t)),$.publish(E.PUB_SUB_EVENTS.ON_REFRESH_COMPLETE,{context:t.context}),TB(t)),Pue=t=>{let{ID:e,actionID:r,context:n}=t;return`${e}.${n}.${r}`},Nue=(t,e,r)=>{let n=e.value.data[r]?.objectInfo?.headers,o=e.value.data[r]?.caseInfo?.headers;return!B.shouldUseUnifiedHandling()&&t&&n?n:o},Oue=t=>{let{reqHeaders:e}=t;e&&(t.headers=t.headers||{},e.etag&&(t.headers["if-match"]=e.etag))},xue=t=>(yt()||nV(t)>0)&&Is[t],Due=(t,e,r)=>{let{mcpAction:n,body:o}=t;return n&&yt()&&YC({body:o,responseType:t.responseType})?tr(n.actionName,{queryPayload:n.queryPayload,body:ZC(o),headers:ai({headers:t.headers,body:o},e)},t.cancelConfig?.token):M(t.url,t,e,{cancelContext:r})},wue=(t,e)=>{let r=[];for(let n=0;n<Is[t].length;){let o=Is[t][n],i=dj(o,e);if(i===kT)return!1;i===!0&&(r.push(n),o.cancelConfig?.cancel()),n+=1}for(let n=r.length-1;n>=0;n-=1)Is[t].splice(r[n],1);return!0},$ue=(t,e)=>{let{context:r}=t;Oue(t);let n=Pue(e);if(e.interestPage&&(t.interestPage=e.interestPage),xue(n)&&!wue(n,t)){let i=Object.assign(new Error,{code:"ERR_CANCELED"});return Promise.reject(i)}let o=hu();return t.signal=o.token,t.cancelConfig=o,Is[n]?Is[n].push(t):Is[n]=[t],$.publish(E.PUB_SUB_EVENTS.ON_REFRESH_START,{context:r}),jm()&&Tue(e.options?.actionMgrID,n,r),Due(t,r,n).then(i=>(delete Is[n],i)).catch(i=>{throw i&&i.code!=="ERR_CANCELED"&&delete Is[n],i})},n_=(t,e)=>({routeKey:t,restAPI:U(t,e)}),Mue=(t,e)=>{let{isObjectType:r,isExternalObject:n,actionID:o,context:i,isExternalCase:s,casetypeID:a}=t,c=d.getDefaultQualifiedName(d.VIEW_NAMES.OBJECT_CREATE_VIEW);if(e||r&&MT(i)){let l=n&&o===c?jt.REFRESH_EXTERNAL_OBJECT:jt.REFRESH_CASE_DATA,u=B.shouldUseUnifiedHandling();return n&&o===c&&u&&(l=jt.REFRESH_EXTERNAL_CASE_DATA),n_(l,t)}return n_(s&&a&&o===c?jt.REFRESH_EXTERNAL_CASE_DATA:jt.REFRESH_ASSIGNMENT_DATA,t)},kue=(t,e,r,n,o)=>{o={...o,calculations:{fields:e,whens:r}};let{routeKey:i,restAPI:s}=n_(n?jt.RECALCULATE_CASE_DATA:jt.RECALCULATE_ASSIGNMENT_DATA,t),a=jt.RECALCULATE;return{routeKey:i,restAPI:s,requestBody:o,requestType:a}},Lue=(t,e)=>{let{caseWideAction:r,caseViewAction:n,fieldsWithDeclarativeTargets:o,fieldsWithWhen:i,isViewsWithWhen:s,interestPage:a,options:c,isMultiRecordData:l,editType:u,isLocalAction:p,interestPageActionID:m,context:f}=t,{optionalPayload:h}=c;h&&(e.content={...h});let S,A={},C={...e},_=jt.REFRESH;return n||l&&u===d.ACTION?(S=I0(u,p),l&&u===d.ACTION&&(C.interestPageActionID=m,v.isInfinityRuntime()&&(C.actionIdArrayToBeProcessed=_0(f))),A=U(S,t),C={...C,interestPage:a}):s||c.refreshFor?{routeKey:S,restAPI:A}=Mue(t,r):(o.length>0||i.length>0)&&({routeKey:S,restAPI:A,requestBody:C,requestType:_}=kue(t,o,i,r,C)),{routeKey:S,restAPI:A,requestBody:C,requestType:_}},Uue=(t,e,r,n,o)=>{let i=lt(t,e);if(!i||i.dataRetrievalType!=="copy")return;let s=g.getIn(r,`content.content.${t}`);if(!s||typeof s!="object")return;(n?Object.keys(s).filter(c=>c!==n):Object.keys(s)).length>0&&o.push(t)},jue=(t,e)=>t.pipe(ee(jt.REFRESH_DATA,fc),O(r=>{let n=r.payload;return n.actionType=r.type,n}),ri(r=>!bu(r?.options?.actionMgrID)),z(r=>{let{context:n,contextData:o,options:i,isObjectType:s}=r,{propertyName:a="",classID:c="",isObjectWideAction:l,skipPayloadGeneration:u}=i,p=u?{content:{}}:Rt(n,{skipUUID:!1,isObjectWideAction:l}),m=[],f=[],h=!1;v.getFeatureMap().granularUIRefresh?({fieldsWithDeclarativeTargets:m=[],whens:f=[]}=mj(n),h=f.some(Oe=>Oe.type===pue)):h=!0;let A=f.filter(Oe=>Oe.type===mue),C=g.getPropertyName(a),_=C?C.split("."):[],I=_.pop(),N=_.join("."),x=[];N&&Uue(N,c,p,I,x),r.serverPrecedenceFields=x;let H={...p.content,contextData:o},G=Nu(n);g.isEmpty(G)||(H=wc(G,H));let ne=Lue({...r,fieldsWithDeclarativeTargets:m,fieldsWithWhen:A,isViewsWithWhen:h},H);Ct.registerBlockingAction(n).catch(()=>{});let{routeKey:j,restAPI:oe,requestBody:Ie,requestType:he}=ne;r={...r,requestType:he},r.requestType=he;let{reqType:De,restApi:Fe}=oe,_e={...Nue(s,e,n)};_e&&!_e.etag&&r.isMultiRecordData&&r.editType===d.ACTION&&(_e.etag=g.getETag(r.context));let Ye={reqHeaders:_e,context:n,method:De,body:Ie,url:lj(r,Fe),...j&&{mcpAction:{actionName:j,queryPayload:uj(r)}}};return q($ue(Ye,r)).pipe(O(Oe=>{let ft=pj(Oe?.data,i?.classID,s);return i?.resetForm&&be.removeContextTreeNode(n),{response:{...ft},actionConfig:r,actionMgrID:r.options.actionMgrID,headers:$e(Oe.headers)}}),me(": Error occurred during fetch call at refreshData Epic : ",r.context,r?.options?.actionMgrID))}),z(async r=>{if(r&&r.type===Te)return Ct.deRegisterBlockingAction(r.payload?.context).catch(()=>{}),r.payload?.err?.code==="ERR_CANCELED"?(R0(r.payload?.actionMgrID),[]):($.publish(d.ON_REFRESH_ERROR,{context:r.payload?.context}),R0(r.payload?.actionMgrID),ue(r));let{actionConfig:n,response:o,actionMgrID:i}=r,{context:s}=n,{payload:a,mergeOptions:c}=await b0(o,n),l=i?s_[i]:void 0,u={seq:vue(i),actionMgrID:i,context:s,mergePayload:a,mergeOptions:c,preRequestSnapshot:hue(i),preRequestData:yue(i),actionConfig:n,isReconciliation:N0.has(i)};return l?(o_[l]??(o_[l]=[])).push(u):await Rue(u),R0(i),[]}));x4(t=>{SB(t).catch(e=>{console.error("Failed to merge MCP tool result into the store",e)})});var zue=[jue],RB=zue;var Fue=t=>t.pipe(ee(pS),z(async e=>{let{context:r}=e.payload,n={},o={},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=jo()[c.name];if(p&&a in p){let m=p[a],{loadTime:f}=m;if(!ir.isTimeElapsed(f,l,u))return}}return ir.getData(c.name,{dataViewParameters:c.dataViewParameters},r).then(l=>{let u=c.mode===d.READONLY?o:n,p=P.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(n).length&&s.push(Re({context:r,data:n})),Object.keys(o).length&&s.push(Vw({data:o,context:r})),T(s),[]})),Vue=[Fue],PB=Vue;var Bue=t=>typeof t=="object"&&t!==null&&"ID"in t&&typeof t.ID=="string"&&"state"in t&&typeof t.state=="string",O0=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 Or().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 r=Object.entries(e?.message??{})[0];if(!r)return null;let[n,o]=r;if(typeof o=="string")return{userID:n,state:this.normalizeInteractionState(o),eventType:o};if(typeof o!="object"||o===null||!("state"in o)||typeof o.state!="string")return null;let i=this.normalizeInteractionState(o.state),s="assignmentId"in o&&typeof o.assignmentId=="string"&&o.assignmentId||("assignmentID"in o&&typeof o.assignmentID=="string"?o.assignmentID:void 0);return{userID:n,state:i,eventType:o.state,assignmentId:s}}static init(e){e&&(this.collabConfig=e)}static isCollaborationEnabled(){return!!(t.collabConfig?.appEnabled&&t.collabConfig?.portalEnabled)}static isLaunchpadRuntime(){return!v.isInfinityRuntime()}static dispatchCollaboratorAction=(e,r,n,o,i)=>{T({type:"LIST_ACTION",payload:{instruction:e,context:r,referenceList:o,listIndex:n,content:i,skipDirtyValidation:!0,skipRefresh:!0}})};static handleCaseCollaboratorsUpdate(e,r,n){let o=this.getCollaborationState(n);if(!o)return;let{userID:i,state:s,eventType:a,assignmentId:c}=o;if(i===v.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=[r,this.caseContextById[e],...this.getAssignmentContextsForCase(e)].filter(h=>!!h);new Set([...m,...m.map(h=>qe(h))]).forEach(h=>{let S=re(d.CASE_INFO.CASE_INFO_COLLABORATORS,"",h)||[],A=S.findIndex(C=>C.ID===i);A!==-1?l?this.dispatchCollaboratorAction("DELETE",h,A,d.CASE_INFO.CASE_INFO_COLLABORATORS,null):this.dispatchCollaboratorAction("REPLACE",h,null,`${d.CASE_INFO.CASE_INFO_COLLABORATORS}[${A}]`,p):l||this.dispatchCollaboratorAction("INSERT",h,S.length,d.CASE_INFO.CASE_INFO_COLLABORATORS,p)}),this.isLaunchpadRuntime()&&this.updateLaunchpadCollaborationState(e,s,c)}static updateLaunchpadCollaborationState(e,r,n){let o=this.getAssignmentContextsForCase(e);this.ASSIGNMENT_AWARE_STATES.has(r)&&((r==="saved"||r==="submitted")&&(this.pendingActionStateByCaseId[e]={state:r,assignmentId:n}),o.forEach(a=>this.updateStaleState(a,r,n)));let i=this.getRemoteEditorCount(e),s=this.pendingActionStateByCaseId[e];o.forEach(a=>{this.refreshCollaborationBanner(a,i,s)})}static getCaseIdFromContext(e){let r=re(d.CASE_INFO.CASE_INFO_ID,"",e);return typeof r=="string"&&r?r:void 0}static resolveCaseIdForAssignmentContext(e,r){if(r){let n=this.getCaseIdFromContext(r);if(n)return n;let o=this.caseIdByAssignmentContext[r];if(o)return o}return e}static getAssignmentContextsForCase(e){let r=this.assignmentContextsByCaseId[e]??[];if(r.length>0)return r;let n=[];return Object.entries(this.caseIdByAssignmentContext).forEach(([o,i])=>{(i===e||this.getCaseIdFromContext(o)===e)&&n.push(o)}),n}static getMessageTypeForBanner(e){return e.endsWith("-error")||e==="stale-assignment"?this.ERROR_TYPE:e==="stale-data"?this.STALE_DATA_TYPE:e}static clearCurrentBanner(e,r){dt({category:this.PAGE_CATEGORY,context:e,type:this.getMessageTypeForBanner(r)})}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)||re(d.CASE_INFO.IS_LOCAL_ACTION,"",e)===!0}static isAssignmentContext(e){return e.includes(d.WORKAREA)||e.includes(d.MODAL)}static restoreCollaboratorsFromContext(e,r){if(this.editorStateByCaseId[e])return;let n=[r,qe(r)],o;for(let a of n)if(o=re(d.CASE_INFO.CASE_INFO_COLLABORATORS,"",a),Array.isArray(o))break;if(!Array.isArray(o))return;let i=v.getOperatorIdentifier(),s={};o.forEach(a=>{if(!Bue(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,r,n,o){if(this.DEPARTURE_STATES.has(o)){this.respondedToViewOpenByCaseId[e]?.delete(r);return}if(n!==this.VIEW_OPEN&&o!=="viewing")return;let i=this.respondedToViewOpenByCaseId[e]??new Set;if(this.respondedToViewOpenByCaseId[e]=i,i.has(r))return;let s=this.localInteractionStateByCaseId[e];if(!s)return;i.add(r);let a=s===this.EDITING_STATE?this.EDIT_OPEN:this.VIEW_OPEN;this.publishCaseEvent(a,e)}static updateStaleState(e,r,n){if(!this.isLaunchpadRuntime())return;let o=n?this.assignmentIdByContext[e]===n:!1,i=!this.isLocalActionContext(e)&&o&&(r==="submitted"||r==="stage_changed");if(wu(e)&&!i)return;let{bannerType:s,messageType:a,message:c}=this.getStaleBannerDetails(i),l=this.collaborationBannerByContext[e];l!==s&&(l&&this.clearCurrentBanner(e,l),Nn({category:this.PAGE_CATEGORY,context:e,messages:[{type:a,message:c}]}),this.collaborationBannerByContext[e]=s,i?(YT(e,!0),this.hideAssignmentActions(e)):YT(e,!1))}static hideAssignmentActions(e){if(!this.isLaunchpadRuntime()||!W(e))return;let r=re(d.CASE_INFO.ACTION_BUTTONS,"",e),n=Array.isArray(r?.main)?r.main:[],o=Array.isArray(r?.secondary)?r.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"};T({type:_t,payload:{context:e,reference:d.CASE_INFO.ACTION_BUTTONS,value:{main:n.filter(s=>i(s)),secondary:o.filter(s=>i(s))}}})}static isAssignmentStale(e){return wu(e)}static isContextStale(e){return bE(e)}static getMatchingPendingAction(e,r){let n=typeof r=="string"?{state:r}:r,o=this.assignmentIdByContext[e];if(n&&(!n.assignmentId||n.assignmentId===o))return n}static refreshCollaborationBanner(e,r,n){if(!this.isLaunchpadRuntime())return;let o=this.getMatchingPendingAction(e,n);if(o){let i=this.collaborationBannerByContext[e];if(i==="stale-data"||i==="stale-assignment")return;let s=o.state==="submitted"?"submitted-error":"saved-error";if(this.collaborationBannerByContext[e]!==s){let a=this.ACTION_STATE_MESSAGES[o.state];a&&this.showActionBanner(e,this.getLocalizedMessage(a),o.state)}return}this.updateCollaborationBanner(e,r)}static getRemoteEditorCount(e){let r=this.editorStateByCaseId[e]??{};return Object.values(r).filter(n=>n===this.EDITING_STATE).length}static clearPendingActionStates(e){delete this.pendingActionStateByCaseId[e]}static isCaseStillLoaded(e){let r=this.caseContextById[e];return r?re(d.CASE_INFO.CASE_INFO_ID,"",r)===e:!1}static updateCollaborationBanner(e,r){let n=this.collaborationBannerByContext[e];this.isAssignmentStale(e)||n==="stale-data"||(r>0?((n==="saved-error"||n==="submitted-error")&&dt({category:this.PAGE_CATEGORY,context:e,type:this.ERROR_TYPE}),n===this.INFO_TYPE&&dt({category:this.PAGE_CATEGORY,context:e,type:this.INFO_TYPE}),Nn({category:this.PAGE_CATEGORY,context:e,messages:[{type:this.WARNING_TYPE,message:this.getLocalizedMessage(this.EDIT_WARNING_MESSAGE)}]}),this.collaborationBannerByContext[e]=this.WARNING_TYPE):(n===this.WARNING_TYPE||n==="saved-error"||n==="submitted-error")&&(dt({category:this.PAGE_CATEGORY,context:e,type:n===this.WARNING_TYPE?this.WARNING_TYPE:this.ERROR_TYPE}),Nn({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 r=this.collaborationBannerByContext[e];r&&(this.clearCurrentBanner(e,r),kj(e),delete this.collaborationBannerByContext[e])}static showActionBanner(e,r,n){let o=this.collaborationBannerByContext[e];o&&this.clearCurrentBanner(e,o),Nn({category:this.PAGE_CATEGORY,context:e,messages:[{type:this.ERROR_TYPE,message:r}]}),this.collaborationBannerByContext[e]=n==="submitted"?"submitted-error":"saved-error"}static handleLocalSubmit=e=>{let r=e?.caseID;if(!r)return;this.pendingSaveCaseIds.add(r);let n=e.assignmentId||(e.context?re(d.CASE_INFO.ASSIGNMENT_ID,"",e.context):void 0),o=e.isModalAction===!0&&e.isModalLaunchedFromPrimaryValue===!0,i=e.isLocalAction===!0||o;i||(this.suppressEditingWarningOnNextAssignmentLoadByCaseId[r]=!0),this.publishCaseEvent(i?this.EDIT_SAVE:this.EDIT_SUBMIT,r,n)};static handleLocalSave=e=>{let r=e?.caseID||(e?.context?re(d.CASE_INFO.CASE_INFO_ID,"",e.context):"");if(!r)return;this.pendingSaveCaseIds.add(r);let n=e.assignmentID;this.publishCaseEvent(this.EDIT_SAVE,r,n)};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:r,actionInContext:n}=e??{};if(!n||!this.isAssignmentContext(n))return;let o=this.resolveCaseIdForAssignmentContext(r,n);if(!o)return;this.caseCollabSubIds[o]||this.subscribeToCollaborators(o,n),this.pendingSaveCaseIds.delete(o),this.restoreCollaboratorsFromContext(o,n);let i=this.getRemoteEditorCount(o);this.suppressEditingWarningOnNextAssignmentLoadByCaseId[o]&&(delete this.suppressEditingWarningOnNextAssignmentLoadByCaseId[o],i=0);let s=this.assignmentContextsByCaseId[o]??(this.assignmentContextsByCaseId[o]=[]);s.includes(n)||s.push(n),this.caseIdByAssignmentContext[n]=o;let a=e.assignmentID;a&&(this.assignmentIdByContext[n]=a),this.clearCollaborationBanner(n),this.refreshCollaborationBanner(n,i,this.pendingActionStateByCaseId[o])};static closeAssignmentContext(e){this.clearCollaborationBanner(e);let r=this.caseIdByAssignmentContext[e];if(delete this.caseIdByAssignmentContext[e],delete this.assignmentIdByContext[e],!r)return;let n=this.assignmentContextsByCaseId[r];if(!n)return;let o=n.indexOf(e);o!==-1&&n.splice(o,1),n.length===0&&delete this.assignmentContextsByCaseId[r]}static handleAssignmentUnload=e=>{let r=e?.actionInContext;r&&this.closeAssignmentContext(r)};static subscribeToCollaborators(e,r){let n=Tt.subscribe({matcher:"CASE_COLLABORATOR",criteria:{caseId:e}},o=>this.handleCaseCollaboratorsUpdate(e,r,o));this.caseCollabSubIds[e]=n,this.caseContextById[e]=r}static unsubscribeToCollaborators(e){Tt.unsubscribe(this.caseCollabSubIds[e]),delete this.caseCollabSubIds[e];let r=this.caseContextById[e];r&&(this.clearCollaborationBanner(r),delete this.caseContextById[e]);let n=this.assignmentContextsByCaseId[e];n&&n.slice().forEach(o=>this.closeAssignmentContext(o)),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,r,n){Tt.publishMessage({filter:{matcher:"CASE_COLLABORATOR",criteria:{caseId:r}},message:n?{state:e,assignmentId:n}:e})}static handleCaseLoadEvent(e){let{caseId:r,context:n}=e,o=!this.openCaseViewByCaseId.has(r);this.openCaseViewByCaseId.add(r);let i=this.caseCollabSubIds[r];o&&i&&Tt.unsubscribe(i),(!i||o)&&this.subscribeToCollaborators(r,n),this.restoreCollaboratorsFromContext(r,n),this.localInteractionStateByCaseId[r]??="viewing",this.publishCaseEvent(this.VIEW_OPEN,r)}static shouldKeepCaseSubscriptionOnUnload(e){return this.pendingSaveCaseIds.has(e)||(this.assignmentContextsByCaseId[e]??[]).length>0||this.isCaseStillLoaded(e)}static handleCaseUnloadEvent(e){let{caseId:r}=e;this.openCaseViewByCaseId.delete(r),!this.shouldKeepCaseSubscriptionOnUnload(r)&&this.caseCollabSubIds[r]&&(this.publishCaseEvent(this.VIEW_CLOSE,r),delete this.localInteractionStateByCaseId[r],this.unsubscribeToCollaborators(r))}static handleCaseClosedEvent(e){let{caseId:r}=e;this.openCaseViewByCaseId.delete(r),r&&this.caseCollabSubIds[r]&&(this.publishCaseEvent(this.VIEW_CLOSE,r),delete this.localInteractionStateByCaseId[r],this.unsubscribeToCollaborators(r))}static getCaseEventCallback(e,r){switch(e){case d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_EDIT_OPEN:return n=>{this.cancelTransitionCaseIds.delete(n),this.localInteractionStateByCaseId[n]=this.EDITING_STATE,this.publishCaseEvent(r,n)};case d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_LOAD:return n=>this.handleCaseLoadEvent(n);case d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_UNLOAD:return n=>this.handleCaseUnloadEvent(n);case d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_CLOSED:return n=>this.handleCaseClosedEvent(n);case d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_EDIT_CLOSE:return n=>this.handleCaseEditClose(n);default:throw new Error(`Unhandled eventKey: ${e}`)}}static subscribeToEvent(e,r,n){let o=this.getCaseEventCallback(e,r);$.subscribe(e,o,n)}static unsubscribeFromEvent(e,r){$.unsubscribe(e,r)}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"),$.subscribe(d.PUB_SUB_EVENTS.CASE_EVENTS.ASSIGNMENT_SUBMISSION,this.handleLocalSubmit,"case_collab_submit"),$.subscribe(d.PUB_SUB_EVENTS.CASE_EVENTS.SAVE_ASSIGNMENT_COMPLETE,this.handleLocalSave,"case_collab_save"),$.subscribe(d.PUB_SUB_EVENTS.EVENT_CANCEL,this.handleLocalCancel,"case_collab_cancel"),$.subscribe(d.PUB_SUB_EVENTS.ASSIGNMENT_EVENTS.ASSIGNMENT_LOAD,this.handleAssignmentLoad,"case_collab_assignment_load"),$.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"),$.unsubscribe(d.PUB_SUB_EVENTS.CASE_EVENTS.ASSIGNMENT_SUBMISSION,"case_collab_submit"),$.unsubscribe(d.PUB_SUB_EVENTS.CASE_EVENTS.SAVE_ASSIGNMENT_COMPLETE,"case_collab_save"),$.unsubscribe(d.PUB_SUB_EVENTS.EVENT_CANCEL,"case_collab_cancel"),$.unsubscribe(d.PUB_SUB_EVENTS.ASSIGNMENT_EVENTS.ASSIGNMENT_LOAD,"case_collab_assignment_load"),$.unsubscribe(d.PUB_SUB_EVENTS.ASSIGNMENT_EVENTS.ASSIGNMENT_UNLOAD,"case_collab_assignment_unload"))}},_s=O0;var x0=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";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:r}=e.data;if(r===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}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}$.publish(d.PUB_SUB_EVENTS.EVENT_SHOW_CANCEL_ALERT,{isModalAction:!0,hideDelete:!0}),this.isDirtyDialogActive=!0}else this.callback?.call(this)};shouldBypassDirtyPopupForStaleAssignment=()=>{let e=`${E.APP.APP}${d.FORWARD_SLASH_STRING}${E.PRIMARY}`,r=Ar(e),n=r?se(r):"";if(!n)return!1;let o=pe(n);return[n,o].filter(s=>typeof s=="string"&&s.length>0).some(s=>_s.isAssignmentStale(s))};handleCaseCancel=()=>{let e=Ke(E.APP.APP),r=e[e.length-1],n=se(r),o=W(n)?.caseInfo?.ID;if(o&&n&&ct({}).getPConnect().getActionsApi().getDescendants(o,n),kr(n)){let i=Ma(n);i&&ct({}).getPConnect().getActionsApi().getDescendants(o,i)}};loadPreview=e=>{let{pyID:r,caseClassName:n,uniqueId:o}=e.data;o===this.getUniqueId()&&ct({}).getPConnect().getActionsApi().showCasePreview(r,{caseClassName:n})};navigateToDefaultPage=()=>{let e=P.getDefaultQualifiedName("Data-Portal"),r=P.getDefaultQualifiedName("pyHome"),n=ct({isRoot:!0}),o=PCore.getStore()?.getState().data.app?.pyPortal?.pyPrimaryNavPages,i;Array.isArray(o)&&o[0]&&(i=o[0]);let s=i?.pyClassName||e,a=i?.pyRuleName||r;n.getPConnect().getActionsApi().showPage(a,s)};closeContainer=e=>{let{uniqueId:r}=e.data;r===this.getUniqueId()&&this.navigateToDefaultPage()};updateCoexistenceDrilldownCase=e=>{let{key:r,caseClassName:n,actionApi:o,caseLabel:i,uniqueId:s}=e.data;if(s!==this.getUniqueId())return;let a=o;o===t.OPEN_WORK_ITEM&&(a=t.OPEN_WORK_BY_HANDLE),ye.updateSemanticURLAndDocumentTitle({key:r,caseClassName:n,actionName:a,name:i}),ct({}).getPConnect().getActionsApi().updateRecents(n,r.substring(r.lastIndexOf(" ")+1),i,r)};openAssignment=e=>{let{pzInsKey:r,caseClassName:n,uniqueId:o}=e.data;o===this.getUniqueId()&&(this.onCreateCallback&&this.openAssignmentParams&&(r&&this.openAssignmentParams[0]&&this.openAssignmentParams[0].payload&&this.openAssignmentParams[0].payload.data?this.openAssignmentParams[0].payload.data.caseInfo.assignments[0].ID=r:this.openAssignmentParams[0]&&this.openAssignmentParams[0].payload&&this.openAssignmentParams[0].payload.data&&(this.openAssignmentParams[0].payload.data.caseInfo.content.coexistenceAction="openWorkByHandle"),r&&n&&ct({}).getPConnect().getActionsApi().openAssignment(r,n,{containerName:E.PRIMARY,context:E.APP.APP})),this.onCreateCallback=null,this.openAssignmentParams=null)};getNextWork=e=>{let{uniqueId:r}=e.data;if(r===this.getUniqueId()){let n=`${E.APP.APP}${d.FORWARD_SLASH_STRING}${E.PRIMARY}`;ct({meta:{},options:{context:Ar(n)}}).getPConnect().getActionsApi().getNextWork()}};openWorkByHandle=e=>{let{key:r,caseClassName:n,uniqueId:o}=e.data;if(o===this.getUniqueId()){let i=`${E.APP.APP}${d.FORWARD_SLASH_STRING}${E.PRIMARY}`;ct({meta:{},options:{context:Ar(i)}}).getPConnect().getActionsApi().openWorkByHandle(r,n)}};createWork=e=>{let{strClassName:r,uniqueId:n,strFlowParams:o,caseInitProperties:i}=e.data;if(n===this.getUniqueId()){let s=`${E.APP.APP}${d.FORWARD_SLASH_STRING}${E.PRIMARY}`,a=ct({meta:{},options:{context:Ar(s)}}),c=i+o,l=new URLSearchParams(c.slice(1)),u=this.setStartingFields(l);a.getPConnect().getActionsApi().createWork(r,{startingFields:u})}};setStartingFields=e=>{let r={};return e.forEach((n,o)=>{o&&(r[o]=n)}),r};destroyBroadcastChannel=()=>{this.getBroadCastChannel()?.close(),this.broadcastChannel=null};subscribeEvents=()=>{this.setReverseCoexistenceCaseLoaded(!0),$.subscribe(E.PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.HANDLE_DISCARD,this.handleDiscard),$.subscribe(E.PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.CHECK_IS_FORM_DIRTY,this.postDirtyPopupMessage)};unsubscribeEvents=()=>{$.unsubscribeAllWithEventType(E.PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.CHECK_IS_FORM_DIRTY),$.unsubscribeAllWithEventType(E.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,r,n)=>{this.broadcastChannel===null&&this.init(!1),this.broadcastChannel?.postMessage({action:t.OPEN_ASSIGNMENT_MODAL,uniqueId:this.getUniqueId(),key:e}),this.broadcastEventToIframe=!1,this.onCreateCallback=r,this.openAssignmentParams=n}},rp=new x0;var _o={NEXT_ASSIGNMENT_ID:"data.nextAssignmentInfo.ID",FIRST_ASSIGNMENT_ID:"data.caseInfo.assignments.0.ID",NEXT_ASSIGNMENT_INFO:"nextAssignmentInfo",NEXT_ASSIGNMENT_INFO_CONTEXT:"nextAssignmentInfo.context"},D0=t=>{let{containerName:e,isInCreateStage:r}=t;return r?d.MODAL:e||Bt.getTargetViewContainerName(aS)},l_=t=>{let e=yo(t);return br(e,ts(t))||bt("createWork",{caseClassName:e}).replace(/{.+?}/,String(er(Ht(t))))},u_=t=>t.initiatingContext||t.context,Ba=async(t,e)=>It(t)?{continueExecution:!0,removeActionPayload:{},dirtyCheckPerformed:!1}:{...await vt(t,e),dirtyCheckPerformed:!0},w0=t=>{if(B.shouldUseUnifiedHandling())return t?.uiResources?.root?.config?.name===P.getDefaultQualifiedName("pzCreateDetails")||!1;let e=g.getIn(t,[d.DATA,d.CASE_INFO.CASE_INFO]);return Yt(e)&&yu(v.getOperatorIdentifier(),e)},NB=(t,e)=>{let r=w0(t),{skipBrowserSemanticUrlUpdate:n=!1,isTraditionalUICase:o}=e,i=o&&!oa();g.setIn(t,["directUrlUpdation"],(!r||i)&&!n)},OB=t=>t.confirmationNote?d.REVIEW_MODE:d.PERFORM_MODE,xB=(t,e,r)=>!tn(t)&&It(e)&&(r??!0),DB=t=>mr(t)&&v.isOpenCasePageAfterCreateInMultiDocEnabled();var Hue="Error occurred during ajax call at createWork Epic : ",wB=(t,e)=>{let{class:r,context:n,viewType:o=it.PAGE}=t,{removeActionPayload:i}=e,s=t?.pageName?t?.pageName:v.getDefaultCasePage();return(t.isTraditionalUICase||!s&&t.renderInline===!0&&o!==it.FORM)&&(s=P.getDefaultQualifiedName("pyDetails")),q(Ai.createCase(r,{...t,pageName:s,viewType:o,context:n})).pipe(O(({response:a,headers:c})=>(Ve.analyseResponse(a),{response:a,actionInPayload:t,headers:c,removeActionPayload:i})),me(Hue,n))};var Ha=t=>{$.publish(d.PUB_SUB_EVENTS.DISPLAY_CASE_CREATED_TOASTER,t)},np=t=>{$.publish(d.PUB_SUB_EVENTS.CASE_EVENTS.CREATE_STAGE_DONE,t)},$B=t=>{$.publish(d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_VIEW_OPENED_AFTER_CREATE,t)};var Gue=(t,e)=>B.isExternalCaseType(t)&&e?e:Go(),que=t=>{let e=0,r=[],n={},o,i=!1,s=!1,a="",c="";return t.pipe(ee(jw),gr(100),O(l=>({actionMgrID:e}=l.payload,l.payload)),z(l=>{let{context:u}=l;if(o=l.class,s=!1,a="",c="",B.isExternalCaseType(o)&&(dt({context:u,stateObj:W(u),clearContextMessages:!0}),!Dr(u))){let f={type:E.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return w.rejectActionByID(e,!0,f),Ec()}let p=D0(l),m=Z(p,u);return i=Dn(o),q(Ba(m,{loadingContext:u})).pipe(z(({continueExecution:f,removeActionPayload:h,dirtyCheckPerformed:S})=>f?(s=S,l.isTraditionalUICase=i,wB(l,{removeActionPayload:h})):(w.rejectActionByID(e),At)))}),z(async l=>{if(l?.type===Te)return l.payload.context=Gue(o,l.payload.context),r.push(ue(l)),r;let{actionInPayload:u,response:p,headers:m,removeActionPayload:f}=l,h=u_(u),S=B.isExternalCaseType(u.class),A=w0(p);(u.renderInline||v.getDefaultCasePage()||i)&&(A=!1),g.setIn(p.data,E.CASE_INFO.IS_FIRST_ASSIGNMENT,!0);let C=D0({...u,isInCreateStage:A}),_=Z(C,u.context),I=st(_,C,u.context),{openCaseViewAfterCreate:N}=u;if(!s&&xB(C,_,N)){let{continueExecution:_e}=await vt(_,{loadingContext:u.context});if(!_e)return w.rejectActionByID(e),r}let x=u?.openCaseViewAfterCreate??!0,H=Le(p);if(!x&&!A&&!DB(_)){let _e=mT(p),{businessID:Ye,caseType:Oe,resolvedURL:ft,caseTypeName:Qt}=nE(p);return n={caseId:Ye,label:Qt,href:ft,createdCaseContent:p?.data?.caseInfo?.content},Ha(n),np({caseId:Ye,assignmentId:_e,caseType:Oe,ID:Ht(H),initiatingContext:h}),S&&fT(u),r}let G=String(er(Ht(H))),ne=l_(H);H.semanticURL=ne,pt.setComponentCache(G,Ge.addDebugHeaders(u.debugInfo)),NB(H,u);let j={acName:_,context:I},oe=wn(I);await Pe(H,u,j);let Ie=OB(H),he={target:_,context:I,initiatingContext:h,containerItemID:I,headers:m,semanticURL:ne,isInCreateStage:A,isMinimizable:A,caseViewMode:Ie,currentCaseViewMode:oe,assignmentContext:g.getIn(H,_o.NEXT_ASSIGNMENT_INFO_CONTEXT),nextAssignmentInfo:g.getIn(H,_o.NEXT_ASSIGNMENT_INFO),resourceType:E.CASE,openCaseViewAfterCreate:u.openCaseViewAfterCreate,modalOptions:u.modalOptions,debugInfo:u.debugInfo};xn(he,H);let De=Me(H,he);i&&(De.data.caseInfo.content.coexistenceAction="openAssignment"),B.setTraditionalGadgetId(De.data);let Fe=Gt(_,De);return rn(Fe)&&si(r,{removeActionPayload:f,target:_}),S&&fT(u),r.push(Fe),pr(H,he),$B({caseId:G}),a=Ie,c=Ht(H),r}),O(()=>{let l=oa(),u=Yt(g.getIn(r[0]?.payload,"data.caseInfo"));return i&&l&&u?rp.postCreateCaseMessage(r[0]?.payload?.nextAssignmentInfo?.ID,hn,r):hn(r),a===E.CASE_VIEW_MODE.PERFORM&&es(c),mt(r,e),n={},r=[],a="",c="",r}))},MB=que;var{RESOURCE_TYPES:UB}=E,jB=t=>{let{isModalAction:e,viewType:r,isInCreateStage:n,isCaseWideAction:o}=t;return e&&n&&!o?it.PAGE:r||it.FORM},zB=t=>{let{isCaseWideAction:e,caseTypeID:r}=t;return B.shouldUseUnifiedHandling()?e||B.isObjectCaseType(r)?X_:Q_:e?X_:Q_},d_=(t,e)=>{let{containerItemID:r,context:n,actionMgrID:o,isInCreateStage:i,isModalAction:s}=e;if(i&&s){let a=jr(r),c=Z(a,n);t.push(V(nr,{containerItemID:r,target:c,actionMgrID:o}))}},Ga=(t,e)=>{let{containerItemID:r,skipReleaseLockRequest:n,isInCreateStage:o,isProcessAction:i}=e,s=pe(r),a=`${s?.includes("root")?d.APP.ROOT:d.APP.APP}/${ge.MODAL}`;t.push(V(Qe,{containerItemID:r,context:s,target:a,skipReleaseLockRequest:n,isInCreateStage:o,isProcessAction:i}))},Wue=(t,e)=>{let r=t?.assignmentID,o=(e?.data?.caseInfo?.assignments??[])[0]?.ID;return r!==o},$0=t=>re(".openCaseViewAfterCreate",d.CONTEXT_DATA,t)??!0,Kue=(t,e)=>mr(t)&&($0(e)||v.isOpenCasePageAfterCreateInMultiDocEnabled()),Jue=t=>t.initiatingContext||re(".initiatingContext",d.CONTEXT_DATA,t?.context),Yue=(t,e)=>{let{content:r}=e?Au(t):Lo(t);return{...r&&{content:r}}},Zue=async(t,{translatedDXAPIResponse:e,actionInPayload:r},n,o,i)=>{let{caseID:s}=r,a=XU(e),c=o?Yn(e):yo(e),{caseViewMode:l,headers:u,semanticURL:p,actionMgrID:m,directUrlUpdation:f,key:h,flowName:S,resourceType:A}=n,C=te(r?.context),_=We(C,r?.context)?.acTertiary,I=Jue(r);Object.assign(i,{caseId:s,assignmentId:a,caseType:c,isSubmitFromBlendedUI:_,...I&&{initiatingContext:I},...Yue(e,o)}),Ga(t,{...r,skipReleaseLockRequest:!0});let N=`${r?.containerItemID.includes("root")?d.APP.ROOT:d.APP.APP}/${ge.PRIMARY}`,x=st(N,ge.PRIMARY),H=Ge.getCoreHeadersFromContext(r.context)||!1,G=Me(e,{target:N,context:x,containerItemID:x,caseViewMode:l,headers:u,semanticURL:p,key:h,flowName:S,resourceType:A,directUrlUpdation:f,debugInfo:H&&H.debugInfo&&{debugId:H.debugInfo[d.COREHEADER_APP_DEBUG_ID]},shouldUpdateCaseActionsInParentContext:!0});if(It(N)){let ne=W(x),oe=`You will lose unsaved changes for ${ts({data:ne})}. Do you want to continue?`;if($0(r.context)){let{continueExecution:Ie}=await vt(N,{dirtyMessage:oe});if(!Ie)return n.directUrlUpdation=!1,w.rejectActionByID(m),Ec();G.currentCaseViewMode=wn(G?.context),t.push(V(kn,G)),r.__deferCaseActionsPayload=G}else return t}else if(Kue(N,r.context))t.push(V(Pt,G));else return t;return e.directUrlUpdation=f,e.semanticURL=p,await Pe(e,{...G,acName:N},{acName:N,context:x}),t},Que=(t,e,r)=>{let n=/^app\/preview_[0-9]*/g,{containerItemID:o,caseID:i}=e;if(o&&n.test(o)&&kr(o)){let{caseClassName:s}=r,a=qe(o),c=pe(a);t.push(V(Mm,{containerItemID:a,context:c,container:ge.PREVIEW,containerName:ge.PREVIEW,caseId:i,viewName:E.PREVIEW_VIEW_NAME,caseClassName:s,updateData:!0}))}},Xue=(t,e,r)=>{let{containerItemID:n}=e,o=pe(n),{data:i,caseViewMode:s}=r;if(o&&kr(n)){let a=xo(o),c={data:i,caseViewMode:s,context:a};g.setIn(c.data,["context_data","caseViewMode"],s),t.push({type:mn,payload:{context:a}});let l=B.getPropertiesToReplace(n);t.push(V(Re,c,{propertiesToReplace:l})),e.shouldUpdateCaseActionsInParentContext=!0,e.__deferCaseActionsPayload=e}},FB=(t,e)=>{let{isCaseWideAction:r,assignmentID:n,actionID:o}=e;return{isCaseWideAction:r,caseID:Ht(t),assignmentID:r?null:n,actionID:o||null}},p_=(t,{isModalAction:e,target:r,transientItemID:n})=>{if(e){let i=t.find(({type:s})=>s===et);i?.payload&&(r=i.payload.target,n=i.payload.containerItemID)}let o=Fw({target:r,containerItemID:n});o.payload.transientItems.length&&t.push(o)},ede=(t,e,r)=>{if(e.isProcessAction&&(Ga(r,{...e,skipReleaseLockRequest:!0}),t)){let n=`${e?.containerItemID.includes("root")?d.APP.ROOT:d.APP.APP}/${ge.PRIMARY}`,o=st(n,ge.PRIMARY),i={insKey:t.ID,className:t.content.classID,context:o,acTargetName:d.PRIMARY,isChild:!0},s={type:uo,payload:{...i}};r.push(s)}},VB=t=>/^app\/preview_[0-9]*/g.test(t),hl=(t,e)=>{let r=/^app\/primary_[0-9]*/g,n=qe(t);return VB(t)?!1:n===e?!0:r.test(n)},m_=t=>{if(!$0(t.context)){let e,r=t?.caseTypeID,n=t?.caseTypeName;return t.businessID?e=t.businessID:e=t.workID,{caseID:e,caseTypeID:r,caseTypeName:n}}return{}},tde=(t,e)=>{let r=te(t);return wt(r,e)},rde=(t,e=!1,r=!1)=>{let o=w.getNextActionMgrId(),i=J.getPropertyValue(E.CASE_INFO.ASSIGNMENT_ID,"",t),s=J.getPropertyValue(E.CASE_INFO.ASSIGNMENTACTION_ID,"",t);return{ID:i,actionID:s,context:t,caseWideAction:e,contextData:r,options:{actionMgrID:o}}},kB=(t,e,r,n)=>{let{data:o,caseViewMode:i}=e,s={data:o,caseViewMode:i,context:r};if(g.setIn(s.data,["context_data","caseViewMode"],i),t.push({type:mn,payload:{context:r}}),n){let c={data:Ve.transformObjectToCase(o),caseViewMode:i,context:r};t.push(V(Re,c))}t.push(V(Re,s))},nde=t=>{if(!t?.isCaseWideAction)return!1;let e=t.context;return!!((e?qe(e):void 0)?.includes(ge.MODAL)&&e?.includes(ge.MODAL))},ode=async(t,e,r,n,o,i,s,a,c,l)=>{let{headers:u}=c,p=l?d.OBJECT_INFO.OBJECT_INFO:d.CASE_INFO.CASE_INFO,m=nde(n);if(t)if(m){Ga(o,{...n,skipReleaseLockRequest:!0}),e.doDeleteCaseSummary=n.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:h,caseViewMode:S}=e,A={data:h,caseViewMode:S,context:r};A?.data&&g.setIn(A.data,["context_data","caseViewMode"],S),o.push(V(Re,A))}else{if(typeof c?.response?.uiResources?.root!="object"){let oe=(Oe,ft)=>{let Qt=Oe.findIndex(yr=>yr.ID===ft);if(Qt!==-1){let[yr]=Oe.splice(Qt,1);Oe.unshift(yr)}return Oe},Ie=W(t),he=c?.response?.data?.caseInfo?.assignments??[],De=Ie?.caseInfo?.assignments??[],Fe=wn(t)===d.PERFORM_MODE,_e=he[0]?.ID!==De[0]?.ID,Ye=he.length>0&&De.length>0;Fe&&_e&&Ye&&c?.response?.data?.caseInfo?.assignments&&(c.response.data.caseInfo.assignments=oe(he,De[0]?.ID))}let f=It(te(t)),h=!1,S=te(r),A=ut(S),C=se(S);C&&A?.items?.[C]?.key===c?.actionInPayload?.caseID&&(h=!0),Ga(o,{...n,skipReleaseLockRequest:!0});let _=jr(t),I={target:te(t),containerItemID:t,context:t,containerName:_};e.doDeleteCaseSummary=n.doDeleteCaseSummary;let N=xo(r),x=W(N),H=W(n.context),G=x[p]?.ID,ne=H[p]?.ID,j=W(t)?.caseInfo?.ID;if(f&&G===ne||!f&&(s===""||I.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&&Wue(n,a)&&(e.flowName=" ",e.clearView=!0,e.root?.config?.name!==d.PY_CONFIRM&&(e.root=void 0)),t.includes(d.ACTIONAREA)?o.push(V(Re,{...e,key:s,resourceType:"",...I})):We(I.target,I.containerItemID)?.resourceType!==UB.PAGE&&j===e.data?.caseInfo?.ID&&o.push(V(rr,{...e,key:s,resourceType:"",...I}));else if(i){let oe=te(t),Ie=wt(oe,s);if(Ie)I.target=oe,I.context=Ie,I.containerItemID=Ie,o.push(V(rr,{...e,key:s,resourceType:"",...I}));else{let he=Ke(r)[0];if(n.target=he,n.context=st(he,d.WORKAREA,r),n?.context){n.containerItemID=n.context,o.push(V(Pt,{...n,...e}));let De=n.containerItemID;o.push(V(nr,{parentContainerTarget:he,containerItemID:De}))}}}if(n.target=te(t),n.containerName=jr(t),n.context=t,n.containerItemID=t,n.shouldUpdateCaseActionsInParentContext=!0,g.setIn(e,"acName",I.target),await Pe(a,e),n.__deferCaseActionsPayload=n,h&&(r.includes(d.WORKAREA)&&kr(r)&&(r=xo(r)),kB(o,e,r,l)),!i&&e.caseViewMode===d.PERFORM_MODE){let oe=tde(t,s),Ie={data:{[p]:{headers:u}},context:oe};o.push(V(Re,Ie)),o.push(la(rde(oe)))}}else{Ga(o,n);let f=!1,h=te(r),S=ut(h),A=se(h);if(A&&S?.items?.[A]?.key===c?.actionInPayload?.caseID&&(f=!0),i){let C=Ke(r)[0];n.target=C,n.context=st(C,d.WORKAREA,r),n.containerItemID=n.context,o.push(V(Pt,{...n,...e}));let _=n.containerItemID;o.push(V(nr,{parentContainerTarget:C,containerItemID:_}))}f&&kB(o,e,r,l)}},BB=(t,e,r,n,o)=>{let i,s=te(e);mr(s)?i=wt(s,r.data?.caseInfo?.ID):i=se(s);let a=!0;if(t&&i){let c=J.getPropertyValue(E.CASE_INFO.ASSIGNMENTACTION_ID,"",i),l=J.getPropertyValue(E.CASE_INFO.ASSIGNMENT_ID,"",i);if(c){let p=r?.data?.caseInfo?.assignments?.find(m=>m.ID===l)?.actions;p&&!p.some(m=>m?.ID===c)&&(a=!1)}}return n&&t&&a&&Qi(null,d.CASE_VIEW_MODE_PROP,i)===d.PERFORM_MODE&&o},ide=async(t,e,r,n,o,i,s)=>{let a=i?"objectInfo":"caseInfo";ede(t.data[a].parentCaseInfo,e,o);let c=t?.data[a]?.parentCaseInfo?.ID;if(c){let l=te(e?.context),u=We(l,e?.context)?.parentContext,p=te(u);e?.isProcessAction&&ml(p,c)&&tw(u,t?.data[a]?.lastUpdateTime)}r.resourceType=UB.CASE,r.directUrlUpdation=!0,e.isProcessAction||await Zue(o,{translatedDXAPIResponse:n,actionInPayload:e},r,i,s)},HB=async(t,e,r)=>{let n={assignmentID:t?.data?.caseInfo?.assignments[0]?.ID,className:t?.data?.caseInfo?.content?.classID,containerName:ge.PRIMARY,targetContainerName:ge.PRIMARY,viewType:it.PAGE,isLastStepInCreateStage:!0,context:r},o={type:No,payload:{...n}};e.push(o)},M0=async(t,e,r,n,o)=>{t.doDeleteCaseSummary=e.doDeleteCaseSummary,t.caseViewMode===d.REVIEW_MODE&&(t.flowName=" ",t.clearView=!0);let{containerItemID:i}=e;It(te(i))||g.setIn(t.data,["context_data","caseViewMode"],t.caseViewMode);let s=B.getPropertiesToReplace(i);o.push(V(rr,{...t,...n,propertiesToReplace:s})),g.setIn(t,"acName",n.target),await Pe(r,t),Xue(o,e,t)},f_=async(t,e,r,n,o,i,s,a,c,l={})=>{let{isCaseWideAction:u,isInCreateStage:p,containerItemID:m}=t,f=qe(t.context),h=lE(o,c),S=c?Yn(o):yo(o),A=p&&!h&&!u,C=Ke(f)[0],_=C?se(C):f,I=jr(m),N=pe(m),x=Object.freeze({target:t.target,containerItemID:m,context:N,containerName:I});A&&!VB(t.context)?await ide(a,t,e,o,i,c,l):hl(t.context,_)?await ode(_,e,f,t,i,r,n,o,s,c):(u||c)&&!hl(t.context,_)?(Ga(i,t),Que(i,t,{caseClassName:S})):await M0(e,t,o,x,i)},g_=(t,e,r)=>{let{isModalAction:n,isCaseWideAction:o,caseID:i,assignmentID:s,isLocalAction:a}=e,c=hl(e.context,r),l=t?.data?.caseInfo?.stages,u=t?.data?.caseInfo?.stageID;iE({caseID:i,context:e.context,assignmentId:s,isLocalAction:!!a,isModalAction:n,isModalLaunchedFromPrimaryValue:c,isCaseWideAction:o,stages:l,stageID:u})},GB=(t,e)=>{let{assignmentID:r}=e;return t?.data?.caseInfo?.assignments?.some(n=>n.ID===r&&n?.canPerform==="true")},h_=t=>{let e=t?.payload?.err?.errorDetails,r=t?.payload?.context;e?.forEach(n=>{n[d.ERROR_FIELD_IN_PAGE]=n[d.ERROR_FIELD_IN_PAGE].replace(/(\(\d+\))/g,a=>`[${parseInt(a.substring(1,a.length-1),10)-1}]`);let o=n[d.ERROR_FIELD_IN_PAGE].slice(1),i=n[d.ERROR_IN_PAGE_IDENTIFIER],s=i.startsWith(".")?i.slice(1):i;if(s){let a=o?`caseInfo.content.${o}`:"caseInfo.content";a=d.getProperty(a.replace(/\(/g,"[").replace(/\)/g,"]"));let c=Qn(s,a,d.PROPERTY),l={type:E.MESSAGES.MESSAGES_TYPE_ERROR,message:n.localizedValue};be.mutateField(r,a,c[c.length-1],{messages:[l],type:E.MESSAGES.MESSAGES_TYPE_ERROR,fieldName:i})}})},LB=t=>{let e=W("app")?.pyPortal?.pyPrimaryNavPages,r=Array.isArray(e)?e[0]:null;return r?(nn.clearChangedProperties(t),[{type:Nr,payload:{className:r.pyClassName,containerName:d.PRIMARY,context:d.APP.APP,pageReference:"pyPortal",viewName:r.pyRuleName,skipSemanticUrl:""}}]):[]},qB=async t=>{let{target:e,containerItemID:r,context:n}=t,o=Ar("app/primary"),i=We(e,r)?.parentContext,s=!!e&&mr(e),a=mr("app/primary");if(s&&i!==d.APP.APP){if(await aa(r,{skipDirtyCheck:!0}),Zd(e).length===0)return LB(n)}else if(o&&a&&!i)await aa(o,{skipDirtyCheck:!0,eventName:"Dismiss case"});else return LB(n);return[]};var k0=t=>{let{containerName:e,isInCreateStage:r}=t;return r?d.MODAL:e||Bt.getTargetViewContainerName(ei)},WB=t=>t?.uiResources?.root?.config?.name===P.getDefaultQualifiedName("pzCreateDetails")||!1,op=(t,e)=>{let r=WB(t),{skipBrowserSemanticUrlUpdate:n=!1}=e;g.setIn(t,["directUrlUpdation"],!r&&!n)},ip=t=>t.confirmationNote?d.REVIEW_MODE:d.PERFORM_MODE,sp=(t,e)=>{let r;return t.renderInline||v.getDefaultCasePage()?r=!1:r=WB(e),r},KB=(t,e)=>{B.isExternalObject(t.class)&&(t.containerItemID=t.context,Ga(e,t))},JB=(t,e)=>!t&&!e,YB=(t,e,r)=>!tn(t)&&It(e)&&!B.isExternalObject(r),ZB=(t,e,r)=>{if(rn(t)){let{removeActionPayload:n,target:o}=e;si(r,{removeActionPayload:n,target:o})}},QB=t=>{B.isExternalObject(t.class)&&Ha({content:Or().getLocaleValue("Successfully submitted!","Assignment")})},XB=t=>{B.isExternalObject(t)&&Ve.setNeedsMapping(!1)};var L0=t=>{let{containerName:e,isInCreateStage:r}=t;return r?d.MODAL:e||Bt.getTargetViewContainerName(Js)};var sde="Error occurred during ajax call at createObject Epic : ",e8=(t,e)=>{let{class:r,context:n,viewType:o=it.PAGE}=t,{removeActionPayload:i}=e,s=t?.pageName?t?.pageName:v.getDefaultCasePage();return q(Ai.createCase(r,{...t,pageName:s,viewType:o,context:n,retrieveActionViewForNewObject:!0})).pipe(O(({response:a,headers:c})=>(Ve.analyseResponse(a),{response:a,actionInPayload:t,headers:c,removeActionPayload:i})),me(sde,n))};var t8="CREATE_EXTERNAL_CASE";var ade=t=>{let e=0,r=[],n=!1;return t.pipe(ee(t8),gr(100),O(i=>({actionMgrID:e}=i.payload,i.payload)),z(i=>{let{context:s}=i,a=L0(i),c=Z(a,s);return n=!1,q(Ba(c,{loadingContext:s})).pipe(z(({continueExecution:l,removeActionPayload:u,dirtyCheckPerformed:p})=>l?(n=p,e8(i,{removeActionPayload:u})):(w.rejectActionByID(e),At)))}),z(async i=>{if(i&&i.type===Te)return i.payload.context=Go(),r.push(ue(i)),r;let{actionInPayload:s,response:a,headers:c,removeActionPayload:l}=i,u=u_(s),p=sp(s,a);g.setIn(a.data,d.getProperty(d.CASE_INFO.IS_FIRST_ASSIGNMENT),!0);let m=L0({...s,isInCreateStage:p}),f=Z(m,s.context),h=st(f,m,s.context);if(!n&&!tn(m)&&It(f)){let{continueExecution:H}=await vt(f,{loadingContext:s.context});if(!H)return w.rejectActionByID(e),r}let S=Le(a),A=l_(S);S.semanticURL=A,op(S,s),await Pe(S,s,{acName:f,context:h});let _=ip(S),I={target:f,context:h,initiatingContext:u,headers:c,semanticURL:A,caseViewMode:_,containerItemID:h,isInCreateStage:p,isMinimizable:p,assignmentContext:g.getIn(S,_o.NEXT_ASSIGNMENT_INFO_CONTEXT),nextAssignmentInfo:g.getIn(S,_o.NEXT_ASSIGNMENT_INFO),resourceType:E.RESOURCE_TYPES.CASE,openCaseViewAfterCreate:s.openCaseViewAfterCreate,modalOptions:s.modalOptions,debugInfo:s.debugInfo,isExternalCaseCreationFlow:!0};xn(I,S);let N=Me(S,I),x=Gt(f,N);return rn(x)&&si(r,{removeActionPayload:l,target:f}),r.push(x),SE(r),r}),O(()=>(hn(r),mt(r,e),r=[],r)))},r8=ade;var{RESOURCE_TYPES:cde}=E,Xh=(t,e={})=>{let{viewType:r,containerName:n,targetContainerName:o,isChild:i}=t,s=Lo(e);return wU(s)&&t?.stageID===s.stageID?it.PAGE:r||((pT(n)||pT(o))&&!i?it.FORM:it.PAGE)},n8=(t,e)=>{let r=Lo(t),n;v.getDefaultCasePage()?n=!1:n=Yt(r);let{isChild:o,containerName:i,isTraditionalUICase:s}=e,a=o&&n,c=n&&!e.isActionFromToDoList;return(a||c)&&!s&&!e.renderInline?d.MODAL:i||Ut(qn,e)},o8=async(t,e,r)=>{let{semanticURL:n,containerItemID:o,isParallelAssignment:i,insKey:s}=e,{target:a,actionInPayload:c}=r,{skipBrowserSemanticUrlUpdate:l=!1}=c,u=pe(o);await Pe({directUrlUpdation:!l,semanticURL:n},c,{acName:a,target:a,context:u}),t.push(V(nr,{containerItemID:o,target:a,isParallelAssignment:i,insKey:s,resourceType:cde.CASE,context:u,doDeleteCaseSummary:c.doDeleteCaseSummary}))},i8=(t,e)=>{let r=Lo(t),n=Ht(t),o=Yt(r),{skipBrowserSemanticUrlUpdate:i=!1,viewType:s,isTraditionalUICase:a}=e,c=a&&!oa(),l=s===it.PAGE&&(!o||c)&&!i,{caseTypeID:u,businessID:p}=r;if(l){let m=br(u,p)||bt(Lt,{caseClassName:u}).replace(/{.+?}/,String(er(n)));t.semanticURL=m,t.directUrlUpdation=!0}},s8=t=>{let e=t?.headers??{};return t?.isRemote&&(e=$e(e,t.remoteClassName)),e},lde=(t,e,r,n,o)=>{Xh(t,e)===it.FORM?(r.caseViewMode=n||d.PERFORM_MODE,o.push(V(rr,r))):o.push(V(kn,r))},ude=(t,e,r,n,o)=>{if(si(t,{removeActionPayload:e,target:r}),yj(n.key,r))n.context=Ar(r),n.containerItemID=n.context,t.push(V(kn,n));else if((o?.isChild||o?.isRemote)&&o?.isMultiDoc){let i=te(o.context);n.target=i,n.context=o.context,n.containerItemID=o.context,t.push(V(kn,n))}else{let i=te(n.context),s=wt(i,n.key);s?(n.target=i,n.context=s,n.containerItemID=s,t.push(V(kn,n))):t.push(V(Pt,n))}},a8=(t,e,r,n,o,i,s)=>{It(e)&&Fr(e)?lde(n,o,t,i,r):ude(r,s,e,t,n)},c8=(t,e)=>{t.acTertiary&&(e.data.caseInfo.isFirstAssignment=t.acTertiary)},l8=(t,e)=>{if(t=ae.getRemoteCaseClassBySourceClass(t)??t,ae.isRemoteCase(t)){let{RemoteClassName:r,RemoteSystemID:n,name:o}=ae.getRemoteCase(t);if(e.headers?.RemoteSystemID||w.setRemoteCaseHeaderByContext(e,n),ae.isTraditionalRemoteCase(t)||ae.getRemoteAppPlatformVersion(n)){e.assignmentID=e.assignments?.[0]?.ID;let i={className:t,name:o,action:ES,remoteClassName:r};w.setTraditionalRemoteCaseParams(e,i)}}},dde=t=>{let{inlineViewType:e,caseTypeID:r,RedirectURL:n}=t;if(e&&e.toLowerCase().includes("remote"))return!1;let o=ae.getRemoteCaseClassBySourceClass(r)??r;return!ae.isRemoteCase(o)&&!!n},u8=(t,e,r)=>{if(!t||!e||!dde(e)||!e.RedirectURL)return!1;try{let n=new URL(e.RedirectURL);if(n.protocol==="https:")return globalThis.open(n.href,"_blank","noopener,noreferrer"),w.resolveActionByID(r),!0}catch{}return!1},d8=(t,e,r,n)=>{if(It(t)&&kr(e)){let o=r?.data?.caseInfo?.assignments;if(Array.isArray(o)&&o.length>0){let i=qe(e);n.push(V(Re,{context:i,data:{caseInfo:{assignments:o}}},{propertiesToReplace:[{path:d.CASE_INFO.ASSIGNMENTS,allowMultiple:!0}]}))}}},p8=(t,e)=>{t&&(e.data.caseInfo.content.coexistenceAction="openAssignment")};var pde="Error occurred during ajax call at openAssignment Epic : ",m8=({restUrl:t,reqType:e,requestHeaders:r,debugInfo:n,context:o,isGetNextWork:i,doNotMergeMessagesForStatusCode:s,mcpAction:a})=>{if(yt())return tr(a.actionName,{...a.payload,headers:{"if-match":r&&r.etag,...r}});let c=B.appendExcludeQueryParamToUrl(t);return M(c,{method:e,headers:{"if-match":r&&r.etag,...r,...n&&{...Ge.addDebugHeaders(n)}}},o,{doNotMergeHttpMessagesForStatusCode:i?s:""})},f8=(t,e)=>{let r=Xh(t),{headers:n,context:o,assignmentID:i,isGetNextWork:s,debugInfo:a,isOpenStage:c,stageID:l,caseID:u,jsActionQueryParams:p,isLastStepInCreateStage:m}=t,f="404",h,S;s?{restApi:h,reqType:S}=U(eb,{viewType:r}):c?{restApi:h,reqType:S}=U(Z_,{caseID:u,stageID:l}):{restApi:h,reqType:S}=U(qn,{assignmentID:i,viewType:r});let{removeActionPayload:A}=e,C=v.getDefaultCasePage(),_="",I=t.pageName;t.isTraditionalUICase&&(I=P.getDefaultQualifiedName("pyDetails")),C?_=`${h}?viewType=${r}&pageName=${C}`:I?_=`${h}?viewType=${r}&pageName=${I}`:_=`${h}?viewType=${r}`,p&&Object.keys(p).forEach(G=>{_+=`&${G}=${p[G]}`});let N=s8(t),x=qn;s?x=eb:c&&(x=Z_);let H=G=>({actionName:x,payload:{queryPayload:{...p,assignmentID:i,caseID:u,stageID:l,viewType:r,params:{pageName:G}}}});return q(m8({restUrl:_,reqType:S,requestHeaders:N,debugInfo:a,context:o,isGetNextWork:s,doNotMergeMessagesForStatusCode:f,mcpAction:H(C||I)})).pipe(O(G=>v.isCoexistenceAppOfType(d.APP_TYPE.UIKIT)&&!m?Yt(G.data.data.caseInfo)?G:(_=I?_.replaceAll(I,P.getDefaultQualifiedName("pyDetails")):_,v.setDefaultCasePage(P.getDefaultQualifiedName("pyDetails")),{isReloadWithDifferentViewTypeRequired:!0,restUrl:_}):G),z(G=>G?.isReloadWithDifferentViewTypeRequired?m8({restUrl:_,reqType:S,requestHeaders:N,debugInfo:a,context:o,isGetNextWork:s,doNotMergeMessagesForStatusCode:f,mcpAction:H(P.getDefaultQualifiedName("pyDetails"))}):Se(G)),O(G=>{let{key:ne,flowName:j}=zT(i);return Ve.analyseResponse(G),{response:{...G.data,key:ne,flowName:j},actionInPayload:t,viewType:r,removeActionPayload:A,headers:$e({...n,...G.headers})}}),me(pde,o))};var{RESOURCE_TYPES:mde}=E,fde=(t,e)=>{e!==void 0&&t.push({status:Number(e)})},gde=(t,e)=>t&&String(t.canPerform)==="false"?d.REVIEW_MODE:e??d.PERFORM_MODE,g8=t=>{let e=v.getRuntime()==="Browser",r=0,n=[],o=[],i=!1,s=!1;return t.pipe(ee(wa),O(a=>({actionMgrID:r}=a.payload,{...a.payload,...e?{insKey:a.payload.assignmentID}:{assignmentID:a.payload.assignmentID}})),z(a=>{i=a.isGetNextWork;let{context:c}=a,l;(a?.isChild||a?.isRemote)&&a?.isMultiDoc?l=it.FORM:l=Xh(a),a.viewType=l;let u=Ut(qn,a),p=Z(u,c),{activate:m,activateContainerActionPayload:f}=ns(mde.ASSIGNMENT,p,a);if(m&&!a.isParallelCall)return Se({type:or,activateContainerActionPayload:f,actionInPayload:a});let h=se(p),S;return f?.isParallelAssignment?S=Promise.resolve({continueExecution:!0,removeActionPayload:{}}):h?S=vt(p,{loadingContext:c}):S=Promise.resolve({continueExecution:!0,removeActionPayload:{}}),q(S).pipe(z(({continueExecution:A,removeActionPayload:C})=>A?(s=Dn(a.className),a.isTraditionalUICase=s,v.isWSSPortal()&&(a.headers={...a.headers,[d.X_ORIGIN_CHANNEL]:"WSS"}),f8(a,{removeActionPayload:C})):(w.rejectActionByID(r),At)))}),z(async a=>{if(a?.type===Te){if(i){let{payload:Ye}=a,{err:Oe}=Ye;fde(o,Oe?.response?.status)}return n.push(ue(a)),n}let{type:c,actionInPayload:l,response:u,viewType:p,headers:m,removeActionPayload:f,activateContainerActionPayload:h}=a;if(u?.redirectInfo?.jsAction==="openStage"){let Ye=u?.redirectInfo?.stageID,Oe=wa,ft=u?.data?.caseInfo?.ID;l.isOpenStage=!0,l.stageID=Ye,l.jsActionQueryParams=u?.redirectInfo?.jsActionQueryParams;let Qt={type:Oe,payload:{...l,caseID:ft,headers:m}};return n.push(Qt),n}if(u8(i,u?.data?.caseInfo,r))return n;let{context:S,caseViewMode:A,debugInfo:C}=l,_=u?.data?.caseInfo?.assignments?.find(Ye=>Ye.ID===l.assignmentID);l.caseViewMode=gde(_,A);let I=u?.data?.caseInfo?.caseTypeID;s=Dn(I),l.isTraditionalUICase=s;let N=n8(u,l);s&&(N=l.containerName??N);let x=Z(N,S);if(c===or)return await o8(n,h,{actionInPayload:l,target:x}),n;let H=u?.data?.caseInfo?.content,G=u?.data?.caseInfo?.ID,ne=u?.uiResources?.root?.config?.name,j=u?.uiResources?.root?.config?.context;H&&!H[P.getDefaultQualifiedName("pyViewName")]&&ne&&l.viewType!=="page"&&(g.setIn(H,P.getDefaultQualifiedName("pyViewName"),ne),g.setIn(H,P.getDefaultQualifiedName("pyViewContext"),j));let oe=Le(u);i8(oe,l);let Ie=st(x,N,S),he={...l.debugInfo,debugId:l.debugInfo?.debugId??Ge.getCoreHeadersFromContext(S)?.debugInfo?.[d.COREHEADER_APP_DEBUG_ID]};he.debugId&&pt.setComponentCache(G,Ge.addDebugHeaders(he)),await Pe(oe,l,{acName:x,target:x,context:Ie});let Fe={target:x,context:Ie,containerItemID:Ie,headers:m,parentContext:qe(l?.context),isMinimizable:Yt(g.getIn(oe,"data.caseInfo")),doDeleteCaseSummary:l.doDeleteCaseSummary,acTertiary:l.acTertiary,resourceType:E.ASSIGNMENT,debugInfo:C,shouldUpdateCaseActionsInParentContext:!0,caseID:G};xn(Fe,oe,{skipFlowNameUpdate:l?.caseViewMode===d.REVIEW_MODE});let _e=Me(oe,Fe);return l.isProcessAction&&(_e.data.isProcessAction=l.isProcessAction),p8(s,_e),B.setTraditionalGadgetId(_e.data),c8(l,_e),_e.caseViewMode=l.caseViewMode,a8(_e,x,n,l,u,A,f),l8(I,_e.data.caseInfo),d8(x,_e.containerItemID,oe,n),p===it.FORM&&kr(_e.containerItemID)&&(_e.skipMergeAssignmentsAndActions=!1,Eo(_e,n,j)),pr(oe,Fe),qU({actionInContext:S,assignmentID:l.assignmentID,caseKey:_e.key,target:x}),es(_e.key),n}),O(()=>{let a=r,c=oa(),l=Yt(g.getIn(n[0]?.payload,"data.caseInfo"));return s&&c&&l?rp.postCreateCaseMessage(n[0]?.payload?.data?.caseInfo?.assignments?.[0]?.ID,T,n):T(n),mt(n,a,o),n[0]?.payload?.isParallelAssignment&&T({type:wa,payload:{...n[0].payload,isParallelCall:!0}}),n=[],n}))};var hde="Error occurred during ajax call at openWorkByHandle Epic : ",U0=(t,e)=>{let{insKey:r,headers:n,context:o,debugInfo:i,viewType:s}=t,{removeActionPayload:a}=e,c=t?.pageName?t?.pageName:v.getDefaultCasePage(),l=U(Lt,{caseID:r,params:{pageName:c}}),{restApi:u}=l,{reqType:p}=l;return s==="none"&&(u=`${u?.split("viewType")[0]}viewType=none`),u=B.appendExcludeQueryParamToUrl(u),q(yt()?tr(Lt,{queryPayload:{caseID:r,params:{viewType:s==="none"?"none":"page",pageName:c}}}):M(u,{method:p,headers:{...n,...i&&{...Ge.addDebugHeaders(i)}}},o)).pipe(O(m=>(Ve.analyseResponse(m),{response:m.data,actionInPayload:t,headers:$e({...n,...m.headers}),removeActionPayload:a})),me(hde,o,t.actionMgrID))};var h8=async(t,e)=>{let{activateContainerActionPayload:{semanticURL:r,containerItemID:n},actionInPayload:o,actionInPayload:{context:i,skipBrowserSemanticUrlUpdate:s,doDeleteCaseSummary:a}}=e,c=Ut(Lt,o),l=Z(c,i),u=pe(n);await Pe({directUrlUpdation:!s,semanticURL:r},o,{acName:l,containerName:c,target:l,context:u},!1,!!s),t.push(V(nr,{containerItemID:n,target:l,context:u,doDeleteCaseSummary:a}))},y8=(t,e)=>{let{isRemoteCase:r,remoteCaseClass:n}=e,o=Ht(t),i=r?n:yo(t),s=r?"":br(i,ts(t));if(s)return s;let a={id:e?.insKey},c=bt(Lt,{caseClassName:i},a);return c=c?.replace("{workID}",String(er(o)))?.replace("{id}",e?.insKey),c};var S8="OPEN_WORK_BY_HANDLE";var{RESOURCE_TYPES:j0}=E,yde=(t,e)=>{let r=wt(t,e);if(!r)return null;let n=We(t,r);if(!(n?.resourceType===j0.ASSIGNMENT&&typeof n?.context=="string"&&n.context!==""))return null;let i=typeof n.semanticURL=="string"?n.semanticURL.trim():"";return i?{target:t,containerItemID:r,semanticURL:i,insKey:e}:null},Sde=async(t,e,r)=>{let n=e?.containerItemID||null,o=n&&Ke(n)[0]?se(Ke(n)[0]):n,i=o||n,s=pe(i)||i,a=te(s)||te(i),c=s?wn(s):void 0,l=o?W(o)?.caseInfo?.ID:void 0,u=t?.insKey;if(!s||!i||c!==d.REVIEW_MODE||o===n||!l||!u||l!==u)return;let p;try{p=await Ab(U0({...t,context:s,viewType:"none"},{removeActionPayload:void 0}))}catch{return}if(!p||Je(p.type))return;let m=Le(p.response),f=[{path:d.CASE_INFO.ASSIGNMENTS,allowMultiple:!0}],h={...m?.data,caseInfo:{...m?.data?.caseInfo??{},assignments:m?.data?.caseInfo?.assignments??[]}};r.push(V(kn,{containerItemID:i,target:a,context:s,data:h,caseViewMode:d.REVIEW_MODE,isArrayDeepMerge:!0,propertiesToReplace:f}))},Ede=async(t,e,r)=>{let{actionInPayload:n,activateContainerActionPayload:o,type:i,response:s,removeActionPayload:a,headers:c}=t,{context:l,skipBrowserSemanticUrlUpdate:u,debugInfo:p}=n,m=Ut(Lt,n),f=Z(m,l);if(cE(i))await h8(e,{activateContainerActionPayload:o,actionInPayload:n}),await Sde(n,o,e);else{let A=st(f,m,l,{buildNew:!0}),C=Le(s),_=y8(C,n);C.semanticURL=_,C.directUrlUpdation=!u,await Pe(C,n,{acName:f,context:A},!1,!!u);let N=Me(C,{target:f,context:A,containerItemID:A,semanticURL:_,headers:c,debugInfo:p});N.caseViewMode=d.REVIEW_MODE,N.resourceType=j0.CASE,r&&(N.data.caseInfo.content.coexistenceAction="openWorkByHandle",N.data.caseID=N.data.caseInfo.ID),B.setTraditionalGadgetId(N.data),xn(N,C,{skipFlowNameUpdate:!0}),N.currentCaseViewMode=wn(t?.actionInPayload?.context);let x=Gt(f,N);a.containerItemID&&rn(x)&&e.push(V(Qe,{containerItemID:a.containerItemID,target:f})),e.push(x),pr(C,N)}let h=n.insKey;aE({caseKey:h,actionInContext:l,target:f});let S=s?.data?.caseInfo?.assignments?.[0]?.ID;S&&h&&$m({actionInContext:l,assignmentID:S,caseKey:h})},E8=t=>{let e=0,r=[],n=!1;return t.pipe(ee(S8),O(o=>({actionMgrID:e,isAutoRedirection:n=!1}=o.payload,o.payload)),z(o=>{let{context:i,isChild:s,viewType:a}=o,c=Ut(Lt,o),l=Z(c,i),{activate:u,activateContainerActionPayload:p}=ns(j0.CASE,l,o),m=It(l);if(!u&&!m&&o.insKey&&l){let S=yde(l,o.insKey);S&&(u=!0,p=S)}let f=u&&!s&&a!=="none",h=a!=="none"&&!f?vt(l,{loadingContext:i}):Promise.resolve({continueExecution:!0,removeActionPayload:void 0});return n&&pt.setComponentCache("redirectionInProgress",!0),q(h).pipe(z(({continueExecution:S,removeActionPayload:A})=>S?f?(EE(p),Se({type:or,activateContainerActionPayload:p,actionInPayload:o})):U0(o,{removeActionPayload:A}):(n&&pt.setComponentCache("redirectionInProgress",!1),w.rejectActionByID(e),At)))}),z(async o=>{if(o&&Je(o.type))return r.push(ue(o)),r;let i=W(o?.actionInPayload?.context),s=Dn(o?.actionInPayload.className);if(o?.actionInPayload?.viewType==="none"){if(i?.context_data?.caseViewMode!=="perform"){let a=Le(o?.response),c={data:{...a?.data},context:o?.actionInPayload?.context,isArrayDeepMerge:!0};r.push({type:mn,payload:{context:c.context,doDeleteConfirmationDetails:!1}}),s&&c.data.caseInfo?.content&&(c.data.caseInfo.content.coexistenceAction="openWorkByHandle",c.data.caseID=c.data.caseInfo.ID),B.setTraditionalGadgetId(c.data),r.push(V(Re,c));let l=te(o?.actionInPayload?.context),u=jr(o?.actionInPayload?.context),p=Object.freeze({target:l,containerItemID:o?.actionInPayload?.context,context:o?.actionInPayload?.context,containerName:u});if(kr(o?.actionInPayload?.context)){let m=Me(o?.response,{...p});Eo({...m,isArrayDeepMerge:!0},r)}o.actionInPayload.shouldUpdateCaseActionsInParentContext=!0,o.actionInPayload.containerItemID=o?.actionInPayload?.context,o.actionInPayload.caseID=o?.actionInPayload?.insKey,pr(a,o?.actionInPayload)}}else await Ede(o,r,s);return r}),O(()=>(n&&pt.setComponentCache("redirectionInProgress",!1),T(r),mt(r,e),r=[],r)))};var A8="FINISH_ASSIGNMENT";var Ade="Error occurred during ajax call at finishAssignment Epic : ",C8=(t,e)=>{let{assignmentID:r,actionID:n,caseID:o,context:i,additionalHeaders:s={},outcome:a,jsActionQueryParams:c,headers:l}=t,{state$:u}=e,p=jB(t),m=zB(t),f={assignmentID:r,actionID:n,caseID:o,viewType:p},{restApi:h}=U(m,f),{reqType:S}=U(m,f);p&&!h?.includes("viewType=")&&(h=h?.includes("?")?`${h}&viewType=${p}`:`${h}?viewType=${p}`),a&&!h?.includes("outcome")&&(h=h?.includes("?")?`${h}&outcome=${a}`:`${h}?outcome=${a}`),h=Su(c,h),h=B.appendExcludeQueryParamToUrl(h),t.viewType=p;let{content:A}=Rt(i),C=u.value.data[i]?.caseInfo?.headers||{},{etag:_}=C,I={"if-match":_,...l,...s};return q(yt()?tr(m,{queryPayload:{...c,...f,outcome:a},body:A,headers:I}):M(h,{method:S,body:A,headers:I},i)).pipe(O(N=>{let{data:x,headers:H}=N;return Ve.analyseResponse(x),{response:x,actionInPayload:t,headers:$e({...I,...H})}}),me(Ade,i))};var I8=t=>{$.publish(d.PUB_SUB_EVENTS.CASE_EVENTS.CREATE_STAGE_DONE,t)},y_=t=>{$.publish(d.PUB_SUB_EVENTS.EVENT_EXPRESS_LOCALACTION,t)},z0=t=>{$.publish(d.PUB_SUB_EVENTS.ERROR_ON_FINISH_ASSIGNMENT,t)},_8=t=>{$.publish(d.PUB_SUB_EVENTS.EVENT_LOCALACTION_SUBMISSION,t)},b8=t=>{$.publish(d.PUB_SUB_EVENTS.DISPLAY_CASE_SUBMITTED_TOASTER,t)},T8=t=>{$.publish(d.PUB_SUB_EVENTS.EVENT_FINISH_ASSIGNMENT_DONE,t)};var{RESOURCE_TYPES:Cde}=E,Ide=t=>{let e=we()?.getState()?.data,r=e?Object.keys(e).find(o=>o.includes(d.WORKAREA)):void 0;return/^app\/primary(_\d+)?$/.test(t)&&!r},v8=(t,e)=>{let r=0,n=[],o={},i="",s={},a=!1,c=!1;return t.pipe(ee(A8),z(l=>{let u,p,m,f=v.isCoexistenceAppOfType(d.APP_TYPE.UIKIT);if({actionMgrID:r}=l.payload,i=l.payload.context,dt({context:i,stateObj:W(i),clearContextMessages:!0}),!Dr(i)||ev(i)){let h={type:E.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return w.rejectActionByID(r,!0,h),Ct.handleDeferredActionCompletion(l.payload.context).then(()=>{z0({errorType:E.ERROR_TYPE.CLIENT})}),Se([])}return Se(l.payload).pipe(z(h=>{pt.setComponentCache("lastActionID",h?.actionID),d_(n,h);let S={...h};return C8(S,{state$:e})}),z(async h=>{if(h&&h.type===Te){tE(h);let Ft=ue(h);return n.push(Ft),n}Io.clearContextedCache(i);let{headers:S,actionInPayload:A,response:C}=h,{containerItemID:_,context:I=pe(_),isModalAction:N,isInCreateStage:x}=A;a=A.isCaseWideAction,c=A.isProcessAction;let H=te(_);A.target=H;let G=jr(_),ne=Object.freeze({target:A.target,containerItemID:_,context:I,containerName:G});g.setIn(C.data,d.CASE_INFO.IS_FIRST_ASSIGNMENT,!1),g.setIn(C.data,d.CASE_INFO_IS_LOCAL_ACTION,!1),C?.uiResources?.root?.config?.name&&A.viewType!=="page"&&g.setIn(C.data,d.CASE_INFO.VIEW_NAME,C?.uiResources?.root?.config?.name),y_({submitResponse:C});let j=Le(C,{[E.STOPMERGEACTIONS]:!C.nextAssignmentInfo}),oe=yo(j),Ie=qe(A.context),he=Ke(Ie)[0]?se(Ke(Ie)[0]):Ie,De=lE(j),Fe=x&&!De;N&&!x&&!hl(A.context,he)&&(j=yE(j,W(_)));let _e=Me(j,{headers:S,actionMgrID:r,directUrlUpdation:!1,isActiveWorkAreaPrimaryAndWorkareaAbsent:Ide(he||"")});if(uE(_e.data,A),_e.caseClassName=oe,_e.resourceType=Cde.ASSIGNMENT,_e.headers=S,j?.uiResources?.root?.type==="AutoClose"){let Ft=we()?.getState()?.data?.[ne.context]?.caseInfo,{ID:ao,name:Ja,content:Ya}=Ft;return n=await qB(A),b8({ID:ao,caseName:Ja,content:Ya,status:Lo(j).status}),n}let Oe,ft,Qt=j?.data?.caseInfo?.assignments?.some(Ft=>Ft.ID===A.assignmentID),yr=GB(j,A),Xt=BB(Qt,he,j,N,yr),un=A?.actionID===E.LOCAL_ACTIONS.TRANSFER_ASSIGNMENT,bo=It(te(he));if(j?.data?.nextAssignmentInfo&&!un)_e.caseViewMode=d.PERFORM_MODE,Oe=Ht(j),ft=!0;else if(Xt&&!un)j?.confirmationNote&&j?.uiResources?.root?.config?.name===d.PY_CONFIRM?_e.caseViewMode=d.REVIEW_MODE:_e.caseViewMode=d.PERFORM_MODE,Oe=Ht(j),bo&&(_e.flowName=" "),_e.deleteAssignmentSpecificResources=!1,ft=!1;else{_e.caseViewMode=d.REVIEW_MODE,g.setIn(_e.data,"context_data.caseViewMode",d.REVIEW_MODE);let Ft=$U(j?.data?.caseInfo);j?.confirmationNote&&(Ft||j?.uiResources?.root?.config?.name===d.PY_CONFIRM)&&!bo?Oe=Ht(j):Oe="",ft=!1}let Rr=Ht(j),Vn=!1;xn(_e,j,{skipFlowNameUpdate:_e?.caseViewMode===d.REVIEW_MODE||Xt});let Kr=br(oe,ts(j))||bt("createWork",{caseClassName:oe}).replace(/{.+?}/,String(er(Rr)));if(j.semanticURL=Kr,_e.semanticURL=Kr,N?(await f_(A,_e,ft,Oe,j,n,h,C,!1,s),Fe&&(o=m_(A),_e.caseViewMode===d.PERFORM_MODE&&es(Rr))):x&&f&&!De?(v.setDefaultCasePage(d.PY_DETAILS),await HB(C,n,qe(I))):(await M0(_e,A,j,ne,n),Vn=ft&&_e.caseViewMode===d.PERFORM_MODE&&!a&&!c),he?.includes(d.ACTIONAREA)&&I===he){nn.clearChangedProperties(I);let Ft=W(he);n=[{type:ji,payload:{actionID:Ft.caseInfo.activeActionID,context:he,containerItemID:_,target:te(he),actionMgrID:w.getNextActionMgrId(),containerName:d.ACTIONAREA,localActionType:E.LOCAL_ACTION_TYPE.CASE_WIDE,caseID:Ft.caseInfo.ID}}]}if(ia(h,n),Ct.handleDeferredActionCompletion(i).catch(()=>{}),g_(_e,A,he),Vn&&es(Rr),!j?.data?.nextAssignmentInfo){let Ft=FB(j,A);Iu(Rr),sE({...Ft,containerItemID:_})}return p_(n,{transientItemID:_,target:H,isModalAction:N}),p=j,m=A,u=A,n}),O(()=>{let h=n.find(S=>S.type===Te);return h?(Ct.handleDeferredActionCompletion(i).then(()=>{z0({errorType:E.ERROR_TYPE.SERVER})}).catch(()=>{}),h_(h),w.rejectActionByID(r)):w.resolveActionByID(r,o),s?.caseId&&I8(s),hn(n),wm()&&p&&m&&pr(p,m.__deferCaseActionsPayload??m),!h&&(a||c)&&_8({updateState:!0}),!h&&u&&T8(u),n=[],o={},s={},n}))}))};var R8="CANCEL_ASSIGNMENT";var qa=t=>{let e={},{routeKey:r,isModalAction:n,caseID:o,context:i,RemoteSystemID:s}=t;s&&(e.RemoteSystemID=s);let a=r||zk,{restApi:c,reqType:l}=U(a,{ID:o,caseID:o,viewType:it.PAGE}),u=pt.getComponentCache(o),p=u&&typeof u=="object"?u:{},m=B.appendExcludeQueryParamToUrl(c);return q(M(m,{method:l,headers:{...e,...p}},i,{includeRemoteSystemIdIfPresent:!!s})).pipe(O(f=>(pt.resetComponentCache(o),n?{actionInPayload:t}:{response:f.data,actionInPayload:t,headers:$e(f.headers)})),me(": Error occurred during ajax call at release lock request : ",i))};var F0=(t,e)=>{let{isModalAction:r}=e;return qa({routeKey:Uk,isModalAction:r,...t})};var P8=t=>{let{isModalAction:e,containerItemID:r}=t;return e?ge.MODAL:jr(r)},N8=async(t,e)=>{let{childContainerItemID:r,caseViewMode:n,referencedUsers:o,response:i}=e,s=qe(r),a=pe(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:o,context_data:{caseViewMode:n}}},p=[];c&&p.push({path:d.CASE_INFO.ASSIGNMENTS,allowMultiple:!0}),p.length>0?t.push(V(Re,u,{propertiesToReplace:p})):t.push(V(Re,u))};var _de=(t,e)=>{let r=pe(e);return(r&&r!==t?[t,r]:[t]).some(o=>_s.isContextStale(o))},O8=t=>{let e=0,r=[];return t.pipe(ee(R8),O(n=>({actionMgrID:e}=n.payload,n.payload)),z(n=>{let{isModalAction:o}=n;n.context||(n.context=pe(n.containerItemID));let{context:i}=n,s=P8(n),a=Z(s,i);return _de(i,n.containerItemID)?(n.RemoteSystemID=ae.getRemoteHeaderByContext(n.context)??void 0,q(F0(n,{isModalAction:o}))):q(vt(a,{loadingContext:i})).pipe(z(({continueExecution:c})=>c?(n.RemoteSystemID=ae.getRemoteHeaderByContext(n.context)??void 0,q(F0(n,{isModalAction:o}))):(w.rejectActionByID(e),At)))}),z(n=>{if(n&&n.type===Te)return r.push(ue(n)),q([r]);let{actionInPayload:o,response:i}=n,{containerItemID:s,isModalAction:a,isInCreateStage:c}=o,l=o.caseID??Ht(i);i?.data.caseInfo&&(i.data.caseInfo.availableProcesses=i.data.caseInfo.availableProcesses??[]);let u=te(s),p=pe(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:Ht(i),skipReleaseLockRequest:!1};return c&&r.push(V(rr,m)),!a&&kr(s)&&N8(r,{childContainerItemID:s,caseViewMode:d.REVIEW_MODE,referencedUsers:i?.data.referencedUsers,response:i}),l&&Iu(l),m.skipReleaseLockRequest=!0,n.actionInPayload.shouldUpdateCaseActionsInParentContext=!0,pr(n?.response,n?.actionInPayload),r.push(V(Qe,m)),q([r])}),O(()=>(T(r),mt(r,e),r=[],r)))};var x8="NAVIGATE_TO_STEP";var bde="Error occurred during ajax call at navigateToStep Epic : ",D8=(t,e)=>{let{ID:r,stepID:n,containerItemID:o,context:i=pe(o),isInCreateStage:s}=t,{state$:a}=e,c=s?it.PAGE:it.FORM,l={ID:r,stepID:n,viewType:c},{restApi:u,reqType:p}=U(Fk,l),{content:m}=Rt(i),f=a.value.data[i].caseInfo.headers,h=B.appendExcludeQueryParamToUrl(u);return q(M(`${h}`,{method:p,body:m,headers:{"if-match":f&&f.etag}},i)).pipe(O(S=>({response:S.data,actionInPayload:t,headers:$e({...f,...S.headers})})),me(bde,i))};var{RESOURCE_TYPES:Tde}=E,w8=(t,e)=>{let r=0,n=[];return t.pipe(ee(x8),Vt(o=>{({actionMgrID:r}=o.payload);let i,s;return Se(o.payload).pipe(z(a=>(Vm(a.context),D8(a,{state$:e}))),z(async a=>{if(a&&Je(a.type))return n.push(ue(a)),n;let{actionInPayload:c,response:l,headers:u}=a,{containerItemID:p,context:m=pe(p),isModalAction:f}=c;Io.clearContextedCache(c.context);let h=te(p),S=jr(p),A=Object.freeze({target:h,containerItemID:p,context:m,containerName:S}),C=l?.data?.caseInfo?.content,_=l?.uiResources?.root?.config?.name,I=l?.uiResources?.root?.config?.context;C&&!C[P.getDefaultQualifiedName("pyViewName")]&&_&&c.viewType!=="page"&&(g.setIn(C,P.getDefaultQualifiedName("pyViewName"),_),g.setIn(C,P.getDefaultQualifiedName("pyViewContext"),I)),i=Le(l);let N={acName:h,...A};await Pe(i,c,N),s=Me(i,{...A,headers:u}),l?.nextAssignmentInfo||(s.caseViewMode=d.REVIEW_MODE),ia(a,n),s.doDeleteCaseSummary=c.doDeleteCaseSummary,s.resourceType=Tde.ASSIGNMENT,s.caseID=Ht(i),xn(s,i),uE(s.data,c);let x=i.data?.caseInfo?.stages,H=i.data?.caseInfo?.stageID;if(iE({caseID:Ht(i),context:c.context,assignmentId:c.assignmentID,isLocalAction:!!c.isLocalAction,isModalAction:f,stages:x,stageID:H}),kr(p)){let G=B.getPropertiesToReplace(p);Eo(s,n,"",{propertiesToReplace:G})}return n.push(V(rr,s)),s.shouldUpdateCaseActionsInParentContext=!0,n}),O(()=>(T(n),i&&s&&pr(i,s),mt(n,r),n=[],n)))}))};var $8=t=>{let{caseID:e,context:r}=t,{restApi:n,reqType:o}=U(cS,{ID:e});return q(M(n,{method:o},r)).pipe(O(i=>(Ve.analyseResponse(i.data),{response:i.data,actionInPayload:t,headers:$e(i.headers)})),me(": Error occurred during ajax call at deleteCaseInCreateStage Epic : ",r))};var M8=t=>{$.publish(d.PUB_SUB_EVENTS.CASE_EVENTS.CREATE_STAGE_DELETED,t)};var vde=(t,e)=>{let r=0,n,o=[];return t.pipe(ee(vh),O(i=>({actionMgrID:r,caseType:n}=i.payload,i.payload)),z(i=>i.ignoreCaseDeletion?Se({actionInPayload:i}):$8(i)),z(async i=>{if(i&&Je(i.type)){let{payload:m}=i,f=ue({...i,...m,actionMgrID:r});return o.push(f),o}let{actionInPayload:s}=i,{context:a,isModalAction:c}=s,l=c?ge.MODAL:ge.PRIMARY,u=Z(l,a);if(!c&&u){let m={acName:u,target:u,context:a},f=e.value.containers[u],{semanticURL:h}=MU(f);await Pe({directUrlUpdation:!0,semanticURL:h},s,m)}if(s.isProcessAction&&s.parentCaseInfo){let m={insKey:s.parentCaseInfo.ID,className:s.parentCaseInfo.content.classID,context:s.parentContext,acTargetName:d.PRIMARY,isChild:!0},f={type:uo,payload:{...m}};o.push(f)}let p={target:u,containerItemID:a,context:a,caseDeleted:!0};return o.push(V(Qe,p)),o}),O(()=>(T(o),mt(o,r)===d.PROMISE_VALUE.RESOLVE&&M8({caseType:n}),o=[],o)))},k8=vde;var L8=(t,e)=>{let{assignmentID:r,actionID:n,context:o}=t,{restApi:i,reqType:s}=U(jk,{assignmentID:r,actionID:n}),{content:a}=Rt(o),c=e.value.data[o]?.caseInfo?.headers,l=B.appendExcludeQueryParamToUrl(i);return q(M(l,{method:s,body:a,headers:{"if-match":c&&c.etag}},o)).pipe(O(u=>({response:u.data,actionInPayload:t,headers:$e(u.headers)})),me(": Error occurred during ajax call at saveAndCloseAssignment Epic at save action : ",o))};var U8=t=>{$.publish(d.PUB_SUB_EVENTS.CASE_EVENTS.SAVE_ASSIGNMENT_COMPLETE,t)};var V0=(t,e=!1)=>{let{action:r,state$:n,actionMgrID:o}=t,i=r.payload.autosave===!0,s,a={},c=[];return Se(r.payload).pipe(z(l=>{s=re("caseInfo.ID","",l.context)||void 0;let u=re("caseInfo.caseTypeID","",l.context),p=re("caseInfo.businessID","",l.context);return a=br(u,p)?{caseTypeID:u,businessID:p}:{},L8(l,n)}),Ac(l=>{if(l&&Je(l.type))return Se(l);let{containerItemID:u}=l&&l.actionInPayload,p=qe(u),m=te(p),f=ut(m),h=Ke(p)[0],S=h?se(h):p;!It(te(S))&&({containerItemID:S}=qd(S,l.actionInPayload.caseID,h));let C=se(m);r.payload.canUpdateAvailableActions&&Cu(l.response);let _=ae.getRemoteHeaderByContext(l.actionInPayload.context),I={...l.actionInPayload,RemoteSystemID:_===null?void 0:_},N=x=>V(Re,{context:x,data:{caseInfo:{...l.response.data?.caseInfo||{},headers:l.headers}}});if(S&&c.push(N(S)),f?.items?.[C]?.key===l?.actionInPayload?.caseID){let x={context:p,data:{...l.response.data,caseInfo:{...l.response.data?.caseInfo||{},headers:l.headers}}},H=B.getPropertiesToReplace(u);c.push(V(Re,x,{propertiesToReplace:H}))}return i||c.push(V(rr,{context:u})),ia(l,c),qa(I)}),z(async l=>{if(l&&Je(l.type)){let{payload:A}=l,C=ue({...l,...A,actionMgrID:o});c.push(C);let _=t.action.payload.modalLoadingContainer;if(_){let I=_.context,{context_data:N}=W(I)||{};N?.isLoading&&aa(I)}return c}let{actionInPayload:u,response:p}=l,{context:m,containerName:f}=u,S={target:Z(f,m),containerItemID:m,context:m};return u.shouldUpdateCaseActionsInParentContext=!0,pr(p,u),!e&&!i&&c.push(V(Qe,S)),c}),O(()=>(T(c),mt(c,o),i||U8({context:r.payload.context,caseID:s,assignmentID:r.payload.assignmentID,...a}),e||(c=[]),Ct.isDeferredActionInProgress(r.payload.context)&&Ct.handleDeferredActionCompletion(r.payload.context),c)))},Rde=(t,e)=>{let r=0,n;return t.pipe(ee(Ii),Vt(o=>{let{saveOnly:i}=o.payload;return{actionMgrID:r,caseType:n}=o.payload,V0({action:o,state$:e,actionMgrID:r,caseType:n},i)}))},j8=Rde;var z8=t=>{$.unsubscribe(d.PUB_SUB_EVENTS.EVENT_EXPRESS_LOCALACTION,t)},F8=(t,e)=>{$.subscribe(d.PUB_SUB_EVENTS.EVENT_EXPRESS_LOCALACTION,t,e)};var S_=t=>{let{callbacks:e}=t;e?.submit&&F8(n=>{e.submit(n),z8("expressLocalActionSubmit")},"expressLocalActionSubmit")},V8=t=>{let e=0,r,n=[],o={value:we()?.getState()};return Se(t).pipe(ee(Ii),Vt(i=>{let{isFormValid:s}=i.payload;if({actionMgrID:e,caseType:r}=i.payload,!s){let c={type:E.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return w.rejectActionByID(e,!0,c),Se([])}return V0({action:i,state$:o,actionMgrID:e,caseType:r,actionsOut:n},!0)}))};var{LOCAL_ACTION_TYPE:B8}=d,{RESOURCE_TYPES:Pde}=E,Nde=t=>{let e=t.localActionType?.toLowerCase();return e===B8.CASE_WIDE||e===B8.EXPRESS||e&&t.isPromotedAction?Gs:lS},ap=(t,e)=>{let{actionID:r,assignmentID:n,caseID:o,context:i,openActionType:s,modalLoadingContainer:a,headers:c}=t,{isProcessAction:l}=e,u=l?tu:Nde(t),p=it.FORM,{reqType:m}=U(u,{caseID:o,ID:n,actionID:r,viewType:p}),{restApi:f}=U(u,{caseID:o,ID:n,actionID:r,viewType:p});t.actionType=u===Gs?d.CASE:d.ASSIGNMENT,f&&!f.includes("viewType=")&&(f=f.includes("?")?`${f}&viewType=${p}`:`${f}?viewType=${p}`),f=B.appendExcludeQueryParamToUrl(f);let h=a?.context??i;return q(M(f,{method:m,headers:c},h)).pipe(O(S=>({response:S.data,actionInPayload:t,headers:$e(S.headers,"",t.headers)})),me(`: Error occurred during ajax call at ${s} Epic : `,h))},E_=(t,e)=>{let{isProcessAction:r}=e,n=r?tu:lS;t.openActionType=n;let o=Ut(n,t),i;if(o==="modal"){if(!Mo.isOnline()||t.isAppOffline)return w.rejectActionByID(t.actionMgrID),Promise.resolve();i=Ke(t.contextName)[0]?Ke(t.contextName)[0]:te(t.contextName);let s=i?se(i):t.contextName,a=pe(s),c=Ut(t.openActionType,t),l=Z(c,t.context),u=Zr(t.context,ur(c,t.context));if(T(Pt({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}})),T(Fh({context:u})),t.modalLoadingContainer={target:l,context:u},!Ke(t.contextName)[0]||!t.continueExecution||!xr(a))return ap(t,e);t.saveActionPayload.modalLoadingContainer=t.modalLoadingContainer,t.saveActionPayload.canUpdateAvailableActions=!t.saveActionPayload.isModalAction;let p=ul(t.saveActionPayload);return q([p]).pipe(z(m=>V8(m)),z(m=>m.length===1&&Je(m[0].type)?q(vt(i,{loadingContext:t.context})).pipe(z(({continueExecution:f})=>f?ap(t,e):(w.rejectActionByID(t.actionMgrID),At))):ap(t,e)),O(m=>m))}return ap(t,e)},Ode=t=>t==="async"?"submitBulkActionAsync":"submitBulkAction",xde=t=>t.containerItemID?.includes(d.ACTIONAREA)&&t.context?.includes(d.ACTIONAREA),cp=async(t,e,{headers:r,actionInPayload:n})=>{let{context:o,actionName:i,openActionType:s,doDeleteCaseSummary:a,modalLoadingContainer:c,skipMergeAssignmentsAndActions:l}=n,u=Le(t),p=Ut(s,n),m=c?.target??Z(p,o),f,h,S=!1;!Fr(m)||mr(m)&&!ml(m,t.data.caseInfo.ID)?(h=ur(p,o),tn(p)&&(h=Zr(o,h)),f=h,S=!0):(mr(m)?f=wt(m,t.data.caseInfo.ID):f=se(m),h=pe(f)),await Pe(u,n,{acName:m,target:m,containerName:p,context:h}),(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,_;C?_=d.PERFORM_MODE:_=d.REVIEW_MODE;let I=Me(u,{target:m,context:h,containerItemID:f,caseViewMode:_,doDeleteCaseSummary:a,headers:r,actionName:i,isMinimizable:!1,isInCreateStage:tn(p),resourceType:Pde.ASSIGNMENT,isProcessAction:n.isProcessAction,showProgress:n.showProgress,progressMessage:n.progressMessage,assignmentID:n.assignmentID,actionType:n.actionType,skipMergeAssignmentsAndActions:l});C&&xn(I,u),tn(p)&&delete I.doDeleteCaseSummary,n.openActionType===pc&&(I.isBulkAction=!0,I.data.caseInfo.actionButtons.main[0].jsAction=Ode(n.runningMode),I.data.caseInfo.actionButtons.secondary[0].jsAction="cancelBulkAction",I.data.caseInfo.cases=n.selectedList,I.data.caseInfo.isAssignment=n.isAssignment);let N;if(S?N=Pt:n.isProcessAction||xde(n)?N=kn:N=rr,I.data.context_data.isProcessAction=n.isProcessAction,e.push(V(N,I)),S||e.push(V(As,I)),S){let G=Ke(n.contextName),ne=wt(G,t.data.caseInfo.ID);if(ne){let j={data:{caseInfo:{headers:r}},context:ne};e.push(V(Re,j))}}f!==se(m)&&e.push(V(nr,{target:m,containerItemID:f})),kr(f)&&!c?.context&&Eo(I,e);let x=I.nextAssignmentInfo?.context==="other";return n.isProcessAction&&!Dn(I.nextAssignmentInfo?.className)&&!x&&ia({response:u,actionInPayload:{...n,containerItemID:f}},e),I.caseViewMode===d.REVIEW_MODE&&e.push(V(Qe,I)),I.shouldUpdateCaseActionsInParentContext=!0,g.getIn(t.data,["caseInfo","isLocalAction"])||pr(u,I),e};var H8="OPEN_LOCAL_ACTION";var G8=(t,e)=>E_(t,e);var Dde=t=>{let e=0,r=[];return t.pipe(ee(H8),O(n=>({actionMgrID:e}=n.payload,n.payload)),ri(()=>!bu(e)),z(n=>G8(n,{actionMgrID:e})),z(async n=>{if(!n)return At;if(Je(n.type)){let l=ue(n);r.push(l);let{context_data:u}=W(n.payload.context)||{};return u?.isLoading&&r.push(V(As,n.payload)),r}let{actionInPayload:o,headers:i,response:s}=n,{actionID:a}=o;g.setIn(s,"data.caseInfo.activeActionID",a);let c=g.getIn(s,"data.caseInfo.ID");return es(c),g.setIn(s.data,d.CASE_INFO_IS_LOCAL_ACTION,!0),o.refreshConditions&&g.setIn(s.data,d.CASE_INFO_REFRESH_CONDITIONS,o.refreshConditions),await cp(s,r,{headers:i,actionInPayload:o}),S_(o),r}),O(()=>(T(r),mt(r,e),r=[],r)))},q8=Dde;var W8=t=>{let{actionID:e,context:r,openActionType:n,caseTypeID:o,bulkContextID:i="",bulkContextType:s=""}=t,a=pc,{reqType:c,restApi:l}=U(a,{caseTypeID:o,actionID:e,bulkContextID:i,bulkContextType:s});return q(M(l,{method:c},r)).pipe(O(u=>({response:u.data,actionInPayload:t,headers:$e(u.headers)})),me(`: Error occurred during ajax call at ${n} Epic : `,r))};var K8=t=>{$.unsubscribe(d.PUB_SUB_EVENTS.EVENT_BULKACTION,t)},J8=(t,e)=>{$.subscribe(d.PUB_SUB_EVENTS.EVENT_BULKACTION,t,e)};var Y8=(t,e)=>{let{context:r}=t,{actionMgrID:n}=e;t.openActionType=pc;let o=Ut(pc,t),i=Z(o,r);return q(vt(i,{loadingContext:r})).pipe(z(({continueExecution:s})=>s?W8(t):(w.rejectActionByID(n),At)))},Z8=t=>{let{callbacks:e}=t;e?.submit&&J8(n=>{e.submit(n),K8("bulkActionSubmit")},"bulkActionSubmit")};var Q8="OPEN_BULK_ACTION";var wde=t=>{let e=0,r=[];return t.pipe(ee(Q8),O(n=>({actionMgrID:e}=n.payload,n.payload)),z(n=>Y8(n,{actionMgrID:e})),z(async n=>{if(n&&Je(n.type??"")){let c=ue(n);return r.push(c),r}let{actionInPayload:o,headers:i,response:s}=n,{actionID:a}=o;return g.setIn(s,"data.caseInfo.activeActionID",a),await cp(s,r,{headers:i,actionInPayload:o}),Z8(o),r}),O(()=>(r.length===1&&Je(r[0].type)?w.rejectActionByID(e):w.resolveActionByID(e),T(r),r=[],r)))},X8=wde;var e5=t=>{let{actionID:e,context:r,cases:n,classID:o,isAssignment:i}=t,{content:s}=Rt(r,{nonEmptyAndChangedData:!0}),a=5;try{$n.getSharedState(P.getQualifiedNameForComplexRuleReferences("D_pySingleExecutionBulkActionsMeta.D_pySingleExecutionBulkActionsMeta.pxResults"))?.find(A=>A[P.getDefaultQualifiedName("pyClassName")]===o)?.pyList.split(",").includes(e)&&(a=1)}catch(S){console.error('Failed to fetch to "D_pySingleExecutionBulkActionsMeta" DP response',S)}let c=n.map(S=>({ID:S})),l=c.length/a,u=i?Gk:uS,{reqType:p,restApi:m}=U(u,{actionID:e}),f=[],h=c.length;for(let S=0;S<h;S+=l){let A=c.slice(S,S+l);i?s.assignments=A:s.cases=A,A.length&&f.push(q(M(m,{method:p,body:s},r)).pipe(O(C=>{let{data:_,headers:I}=C;return{response:_,actionInPayload:t,headers:$e({...I})}}),me("Error occurred during ajax call at submitbulkaction Epic : ",r)))}return Cb(f)};var t5=t=>{$.publish(d.PUB_SUB_EVENTS.EVENT_BULKACTION,t)};var r5="SUBMIT_BULK_ACTION";var n5=t=>{let e=0,r=[],n,o="";return t.pipe(ee(r5),Vt(i=>{let{isFormValid:s}=i.payload;if({actionMgrID:e}=i.payload,!s){let a={type:E.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return w.rejectActionByID(e,!0,a),Se([])}return Se(i.payload).pipe(z(a=>(n=a,e5(n))),z(a=>{let c=0,l=0,u=[],{containerItemID:p,context:m}=n;return a.forEach(f=>{let{response:h}=f;c+=Number(h.successCount),l+=Number(h.failureCount),l&&h.results.forEach(S=>{S.status!=="200"&&S.error&&S.error.errorDetails&&S.error.errorDetails.forEach(A=>{u.push({ID:S.BusinessID,message:A.localizedValue})})})}),o=`${c} record(s) updated`,t5({submitResponse:a}),n.target=v.getRenderingMode()==="HYBRID"?te(p):`${d.APP.APP}/${ge.MODAL}`,r.push(V(Qe,{containerItemID:p,context:m,target:n.target,skipReleaseLockRequest:!0})),l&&r.push(V(zm,{messages:[{type:"error",message:l===1?"1 record failed to update":`${l} records failed to update`,errorDetails:u,showHeader:!1}],context:qe(m)||m,category:"HTTP",showHeader:!1})),r}),O(()=>(w.resolveActionByID(e,o),T(r),r=[],r)))}))};var o5=t=>{let{actionID:e,context:r,cases:n}=t,{content:o}=Rt(r,{nonEmptyAndChangedData:!0});o.cases=n.map(c=>({ID:c}));let i=uS,{reqType:s,restApi:a}=U(i,{actionID:e,runningMode:"async"});return q(M(a,{method:s,body:o},r)).pipe(O(c=>{let{data:l,headers:u}=c;return{response:l,actionInPayload:t,headers:$e({...u})}}),me("Error occurred during ajax call at submitbulkactionasync Epic : ",r))};var i5=t=>{$.publish(d.PUB_SUB_EVENTS.EVENT_BULKACTION,t)};var s5="SUBMIT_BULK_ACTION_ASYNC";var a5=t=>{let e=0,r=[],n,o={};return t.pipe(ee(s5),Vt(i=>{let{isFormValid:s}=i.payload;if({actionMgrID:e}=i.payload,!s){let a={type:E.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return w.rejectActionByID(e,!0,a),Se([])}return Se(i.payload).pipe(Vt(a=>(n=a,o5(n))),O(a=>{let{containerItemID:c,context:l}=n,{response:u}=a;return o={caseID:u.caseID,caseTypeID:"BackgroundJob"},i5({submitResponse:u}),n.target=`${d.APP.APP}/${ge.MODAL}`,r.push(V(Qe,{containerItemID:c,context:l,target:n.target,skipReleaseLockRequest:!0})),r}),O(()=>(w.resolveActionByID(e,o),T(r),r=[],r)))}))};var c5=(t,e)=>E_(t,e);var $de=t=>{let e=0,r=[];return t.pipe(ee(eI),O(n=>({actionMgrID:e}=n.payload,n.payload)),z(n=>{let i=Ut(tu,n),s=Z(i,n.context);return q(vt(s,{loadingContext:n.context})).pipe(z(({continueExecution:a})=>a?(Vm(n.context),c5(n,{actionMgrID:e,isProcessAction:!0})):(w.rejectActionByID(n.actionMgrID),At)))}),z(async n=>{if(n&&Je(n.type)){let a=ue(n);return r.push(a),r}let{actionInPayload:o,headers:i,response:s}=n;return await cp(s,r,{headers:i,actionInPayload:o}),r}),O(()=>(hn(r),mt(r,e),r=[],r)))},l5=$de;var u5=t=>{let e=0,r=[];return t.pipe(ee(Ze,et),O(n=>({actionMgrID:e}=n.payload,n.payload)),z(n=>{let{containerItemID:o,caseID:i,context:s,caseDeleted:a,skipReleaseLockRequest:c,currentCaseViewMode:l,isProcessAction:u,isInCreateStage:p,deleteWork:m}=n,f=l===d.PERFORM_MODE,h=i&&f;return m?Se([]):u&&p?qa(n):o===s&&!a&&!c&&h?qa(n):o?.includes(d.MODAL)&&wn(Ma(o))===d.REVIEW_MODE?qa(n):Se([])}),z(n=>(n&&Je(n.type)&&r.push(ue(n)),r)),O(()=>(T(r),mt(r,e),r=[],r)))};var Mde=t=>{let{context:e,containerItemID:r}=t.payload;if(typeof r!="string"||!r)return!1;let n=pe(r);return(n&&n!==e?[e,n]:[e||r]).some(i=>typeof i=="string"&&!!i&&_s.isAssignmentStale(i))},d5=t=>t.pipe(ee(eu),HS(()=>BS(100)),O(e=>{if(Mde(e))return T({type:Ui,payload:e.payload}),[];let{actionMgrID:r,isChildCase:n,isModalAction:o,isProcessAction:i,isDataObject:s,skipReleaseLockRequest:a,isInCreateStage:c,containerItemID:l,context:u}=e.payload;return w.resolveActionByID(r),$.publish(d.PUB_SUB_EVENTS.EVENT_SHOW_CANCEL_ALERT,{isModalAction:o,hideDelete:i?!1:n,isDataObject:s,skipReleaseLockRequest:a,isInCreateStage:c,containerItemID:u||l}),[]})),p5=t=>t.pipe(ee(iS),HS(()=>BS(100)),O(e=>{let{actionMgrID:r,context:n,containerName:o,containerItemID:i}=e.payload,s=Z(o,n);return w.resolveActionByID(r),T(V(nr,{containerItemID:i,target:s,doDeleteCaseSummary:!1})),[]}));var m5=t=>{let e=0,r=[],n="";return t.pipe(ee(Bi),O(o=>({actionMgrID:e}=o.payload,o.payload)),z(o=>t_(o)),z(async o=>{if(o&&o.type===Te)return r.push(ue(o)),{actionsOut:r,actionInPayload:{skipPageInstructions:!0}};let{actionInPayload:i,response:s,headers:a}=o,c=i.containerName,l=Z(c,i.context),u=st(l,c,i.context);u=Zr(i.context,u);let{pageReference:p,targetProperty:m,index:f,subscriptFieldName:h,pageGroupName:S,actionType:A,isPageGroup:C}=i,_=p?.startsWith(E.OBJECT_INFO.OBJECT_INFO),I=null;_?(I=Ve.transformCaseData(s),I.uiResources.root.config.context=`${p}${m}[${f}]`):I=s;let N=I?.uiResources?.root?.config?.name??i.interestPageActionID,x=Le(I);x.key=i.ID,x.data?.caseInfo?(x.data.caseInfo.ID=i.ID,SV(x,f,h,A,S)):x.data?.objectInfo&&(x.data.objectInfo.ID=i.ID);let{interestPageActionID:H,editType:G,isLocalAction:ne,actionID:j}=i,oe={isMultiRecordData:!0,viewName:i.viewID,parentContext:i.context,interestPage:i.interestPage,interestPageActionID:H,editType:G,isLocalAction:ne,actionID:j};x.uiResources.context_data.modalView=oe;let Ie=W(i.context)?.context_data?.caseInfo,he=`${i.pageReference}${i.targetProperty}`,De=QT(Ie,he,i.index);x.uiResources.context_data.caseInfo={...x.uiResources.context_data.caseInfo,content:g.mergeDeep(x.uiResources.context_data.caseInfo?.content,De?.content)};let Fe=J.getProperty(d.CASE_INFO.REMOTESYSTEMID,"",i.context);await Pe(x,i,{acName:l,context:u});let Ye={target:l,context:u,containerItemID:u,headers:a,index:f,subscriptFieldName:h,pageGroupName:S,isPageGroup:C};Fe&&(Ye.headers={...Ye.headers,RemoteSystemID:Fe});let Oe=Me(x,Ye);Oe.resourceStatus=i.actionType,Oe.isMultiRecordData=!0,Oe.readOnly=i.readOnly,Oe.parentContext=i.context,Oe.heading=i.heading,Oe.data.caseInfo&&G===d.ACTION&&(Oe.data.caseInfo={...Oe.data.caseInfo,...EV(i),isLocalAction:i.isLocalAction}),Oe.clearStateMachine=!1,i.viewName=N;let ft=Gt(l,Oe);n=u,r.push(ft);let Qt={changedListProperty:[],leafProperty:[]};return G===d.ACTION&&(ke.registerForServerChanges(),Qt=Cr.getServerProperties(Oe.data,u)),{actionsOut:r,actionInPayload:i,serverProps:Qt}}),O(({actionInPayload:o,serverProps:i={changedListProperty:[],leafProperty:[]}})=>{if(vc(r)?w.rejectActionByID(e):w.resolveActionByID(e),o.skipPageInstructions||yV(n,o.pageReference,o.targetProperty,o.index,o.actionType),T(r),r=[],o.editType===d.ACTION){Cr.handleServerChanges(n,i.changedListProperty,i.leafProperty),ke.unRegisterForServerChanges();let s=d.getProperty(E.CASE_INFO.CASE_INFO_CONTENT),a=g.convertClipboardPageToPageRefNotation(o.interestPage),c=s+a;o.columns.forEach(l=>{let u=fe.trimAnnotation(l.config.value),p=re(u,c,n),m=lt(u.startsWith(".")?u.split(".").pop():u,l.config.classID);be.getFieldNode(n,c,o.viewName,u)||be.addFieldNode(n,c,o.viewName,u,p,{isDeclarativeTarget:!!m?.isDeclarativeTarget,context:n,propertyName:u,pageReference:c,value:l.config.value,isInsideList:/\[\d+\]/.test(c)||/\[\d+\]/.test(u)})})}return r}))};var kde=(t,e=!1)=>t===d.ACTION?e?jt.REFRESH_CASE_DATA:jt.REFRESH_ASSIGNMENT_DATA:jt.REFRESH_CASE_VIEW,f5=t=>{let{context:e}=t,n={...Rt(e).content,contextData:!1},o=Nu(e);g.isEmpty(o)||(n=wc(o,n));let i=kde(t.editType,t.isLocalAction),{restApi:s,reqType:a}=U(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}`,n.interestPageActionID=t.interestPageActionID),n.interestPage=t.interestPage,q(M(c,{method:a,body:n,headers:t.headers},e)).pipe(O(l=>({actionInPayload:t,response:l.data,headers:$e(l.headers)})),me(": Error occurred during getEmbeddedDataView request : ",e))};var Lde=()=>({rootView:null,data:null,uiResources:null,containerContext:null}),g5=(t,e,r)=>typeof r=="string"?`${t}${e}.${r}`:`${t}${e}[${r}]`,Ude=t=>{let{containerName:e,context:r}=t;if(!e)return{context:r,containerContext:null,target:null};let n=Z(e,r),o=st(n,e,r)||e,i=Zr(r,o);return{context:i,containerContext:i,target:n}},jde=(t,e,r,n,o)=>{if(o){let i=Ve.transformCaseData(t);return i.uiResources.root.config.context=g5(e,r,n),i}return t},zde=(t,e,r)=>{let n=c=>typeof c=="object"&&c!==null,o=(c,l)=>{if(n(c))return c[l]},s=e.replace(/^\./,"").split("."),a=t;for(let c of s)a=o(a,c);return typeof r=="string"?o(a,r)??null:Array.isArray(a)?a[r]??null:null},Fde=(t,e,r,n,o)=>{let i=t.data?.caseInfo?.content;if(i){let a=zde(i,n,o);a&&T(da({context:e,reference:r,value:a}))}let s=t.uiResources?.context_data;s&&T(da({context:e,reference:d.CONTEXT_DATA,value:s}))},h5=t=>{let e=0,r=[];return t.pipe(ee(hS),O(n=>{let{payload:o}=n;return{actionMgrID:e}=o,o}),z(n=>f5(n)),Ac(async n=>{let o=Lde();if(n?.type===Te)return r.push(ue(n)),{actionsOut:r,actionInPayload:{skipPageInstructions:!0},responseData:o};let{actionInPayload:i,response:s,headers:a}=n,{pageReference:c,targetProperty:l,index:u,containerName:p}=i,m=c?.startsWith(E.OBJECT_INFO.OBJECT_INFO),{context:f,containerContext:h,target:S}=Ude(i),A=jde(s,c,l,u,m),C=Le(A);C.key=i.ID;let _=g5(c,l,u);if(await Pe(C,i,p?{acName:S,context:f}:{context:f}),p&&S){let H=Me(C,{target:S,context:f,containerItemID:f,headers:a,index:u});H.resourceStatus=i.actionType,H.isMultiRecordData=!0,H.readOnly=i.readOnly,H.parentContext=i.context,H.clearStateMachine=!1;let G=Gt(S,H);r.push(G)}else Fde(C,f,_,l,u);let N=C.uiResources?.root||null;return N?.config&&(N.config.context=_),o.rootView=N,o.data=C.data,o.uiResources=C.uiResources,o.containerContext=h,{actionsOut:r,actionInPayload:i,responseData:o}}),O(({actionsOut:n,responseData:o})=>{vc(n)?w.rejectActionByID(e):w.resolveActionByID(e,o);let i=n;return r=[],i}))};var y5=(t,e)=>{let{pageReference:r,isMultiRecordData:n}=e,o=J.getPropertyValue(d.getProperty(E.CASE_INFO.CASE_INFO_ID),r,t.parentContext),i=J.getPropertyValue(d.CONTEXT_DATA_MODAL_VIEW.VIEW_NAME,r,t.parentContext),s=J.getPropertyValue(E.CASE_INFO.ASSIGNMENT_ID,r,t.parentContext),a=J.getPropertyValue(d.CONTEXT_DATA_MODAL_VIEW.CONTEXT_DATA_MODAL_VIEW,r,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"?vu(o,s,u,t.parentContext,c,l,p,n,a.editType):Dc(o,i,t.parentContext,f,{})};var Vde=(t,e)=>{if(t&&e.editType==="action"&&t.type!==Te){let{context:r,pageReference:n}=e,o={context:r},{response:i}=t,s=n?.startsWith(E.OBJECT_INFO.OBJECT_INFO),a=null;s?(a=Ve.transformCaseData(i),a.uiResources.root.config.context=n):a=i;let c=Le(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,o);l.skipValidation=!0;let u=V(Re,l);ke.registerForServerChangesSync(),T(u),ke.unRegisterForServerChanges()}return t},S5=t=>{let e="",r=[],n;return t.pipe(ee(yS),Vt(o=>{n=o.payload;let{isFormValid:i}=o.payload;if({actionMgrID:e}=o.payload,!i){let s={type:E.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return w.rejectActionByID(e,!0,s),Ct.handleDeferredActionCompletion(o.payload.context),Se([])}return Se(o.payload).pipe(z(s=>(n=s,t_(n))),z(async s=>Vde(s,n)),z(async s=>{if(s&&s.type===Te){let m=ue(s);return r.push(m),r}let{containerItemID:a,context:c,pageReference:l,interestPage:u}=n,p=u?.replace(/\(\d+\)$/,"");return nU(c,n.parentContext,l.startsWith(E.OBJECT_INFO.OBJECT_INFO_CONTENT)?d.getProperty(E.OBJECT_INFO.OBJECT_INFO_CONTENT):d.getProperty(E.CASE_INFO.CASE_INFO_CONTENT),!1,p),r.push(V(Qe,{containerItemID:a,context:c,target:n.target,skipReleaseLockRequest:!0})),r}),O(()=>{if(vc(r))w.rejectActionByID(e),Ct.handleDeferredActionCompletion(n.context);else{w.resolveActionByID(e),Ct.handleDeferredActionCompletion(n.context);let{pageReference:s}=o.payload,a=J.getPropertyValue(d.CONTEXT_DATA_MODAL_VIEW.IS_MULTI_RECORD_DATA,s,n.parentContext);a?y5(n,{isMultiRecordData:a,pageReference:s}):Ru(n.parentContext,d.getProperty(d.CASE_INFO.CASE_INFO_CONTENT),{})}return T(r),r=[],r}))}))};var Bde="Error ocurred during ajax call at getDescendants Epic : ",E5=t=>{let{caseID:e,headers:r,debugInfo:n,context:o}=t,i=U(Mk,{caseID:e}),{restApi:s}=i,{reqType:a}=i;return q(M(s,{method:a,headers:{...r,...n&&{...Ge.addDebugHeaders(n)}}},o)).pipe(O(c=>({actionInPayload:t,response:c.data,headers:$e({...r,...c.headers})})),me(Bde,o))};var A5=t=>{let e=0,r=[];return t.pipe(ee(mD),O(n=>({actionMgrID:e}=n.payload,n.payload)),z(n=>E5(n)),z(async n=>{if(n&&Je(n.type))return r.push(ue(n)),r;let{actionInPayload:o,response:i}=n,s={};if(g.setIn(s,"caseInfo.childCases",i?.childCases??[]),i?.uiResources?.resources&&xm(i.uiResources.resources),i?.uiResources?.components)try{await go(i.uiResources.components)}catch(c){return r.push(ue({payload:{...o,err:c}})),r}i?.uiResources?.localeReferences&&g.setIn(s,"localeReferences",i.uiResources.localeReferences),i?.uiResources?.childCases_context_data&&g.setIn(s,"childCases_context_data",i.uiResources.childCases_context_data);let a={data:s,context:o?.context};return r.push(V(Re,a)),r}),O(()=>(T(r),mt(r,e),r=[],r)))};var C5=(t,e)=>{let r={type:E.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};w.rejectActionByID(t,!0,r),Ct.handleDeferredActionCompletion(e)},I5=(t,e,r)=>{xr(e)&&t.push(V(Qe,{containerItemID:r,skipReleaseLockRequest:!0}))},_5=({itemData:t,workareaContainerData:e,subscriptData:r,pageGroupName:n,activeWorkArea:o,subscriptFieldName:i,actionMgrID:s,containerItemID:a})=>{let c={referenceList:t?.referenceList,ID:e?.caseInfo?.ID,index:r[i],containerName:E.MODAL,pageReference:E.CASE_INFO.CASE_INFO_CONTENT,viewID:E.VIEW_NAMES.DATA_OBJECT_CREATE_VIEW,skipSemanticUrl:!0,actionType:E.RESOURCE_STATUS.CREATE,interestPage:`.${n}.${r[i]??""}`,targetProperty:`.${n??""}`,pageGroupName:n,context:o??"",subscriptFieldName:i};return{type:Bi,payload:{isInCreateStage:!1,isModalAction:!0,parentContext:"",target:"",...c,actionMgrID:s,containerItemID:a,doDeleteCaseSummary:!1,isFormValid:!0}}};var b5=t=>{let e="",r=[],n,o={};return t.pipe(ee(SS),Vt(i=>{n=i.payload;let{isFormValid:s}=i.payload;return{actionMgrID:e}=i.payload,s?Se(i.payload).pipe(z(a=>(n=a,Se({}))),z(async()=>{let{containerItemID:a}=n,c=W(a),l=a,u=c?.dataInfo.content;delete u.classID;let p=qe(l),m=Ke(p).length,f=Ke(p)[m-1]?se(Ke(p)[m-1]):p,h=te(a),S=We(h,a)||{},A=S?.referenceList?.replaceAll(".",""),C=S?.subscriptName,_=W(f),I={..._,caseInfo:{content:{...u}}},N={containerItemID:f,data:I};r.push(V(rr,N)),I5(r,l,a);let x=_5({itemData:S,workareaContainerData:_,subscriptData:u,pageGroupName:A,activeWorkArea:f,subscriptFieldName:C,actionMgrID:e,containerItemID:a});return r.push(x),o=u,r}),O(()=>(w.resolveActionByID(e,o),T(r),r=[],r))):(C5(e,i.payload.context),Se([]))}))};var Hde=[MB,r8,g8,E8,q8,X8,n5,a5,l5,v8,w8,O8,u5,j8,k8,d5,p5,m5,h5,S5,A5,b5],T5=Hde;var{RESOURCE_TYPES:B0}=E,A_="pyCasePreview",Gde=(t,e,r,n,o)=>{t&&o===ge.PREVIEW?(r.data.caseInfo.progress=!1,delete r.root,pr(r,r),n.actionsOut=V(rr,{...r,containerName:o})):t?(n.actionsOut=[],n.actionsOut.push(V(nr,{target:e,containerItemID:t}))):n.actionsOut=V(Pt,{...r,containerName:o})},qde=(t,e)=>{let r=B.isObjectCaseType(t.caseClassName);if(t.key&&!r){let n=te(t?.context),o=wt(n,t.key),i=t?.context;(o||t.updateData||e2(i))&&e.actionsOut.push(V(Re,t))}else e.actionsOut.push(V(Re,t))},Wde=t=>{let{containerName:e,updateData:r,viewLoadingContainer:n}=t,o=e||Bt.getTargetViewContainerName(Rn),i=n?.target??Z(o,t.context),s=n?.context??(e===ge.PREVIEW&&r?t.context:st(i,o,t.context,{buildNew:!!e}));return{target:i,context:s}},Kde=(t,e)=>{let r=U("loadView",e);t.viewContext===B0.PAGE&&(r=U(Rn,{page:t.viewName,pageClass:t.pageClass}));let n=P.getDefaultQualifiedName(A_);return t.containerName===ge.PREVIEW&&t.caseId&&t.viewContext!==B0.PAGE&&(t.viewName===n||t.viewName===A_)&&(r=U(Lt,{caseID:t.caseId,params:{pageName:n}})),r},Jde=t=>t.pipe(ee(Kl),O(e=>e.payload),ri(e=>!bu(e.actionMgrID)),z(e=>{let r={caseID:e.caseId,viewID:e.viewName,caseClassName:e.caseClassName,RemoteSystemID:e.RemoteSystemID};if(e.containerName===ge.PREVIEW&&e.context&&e.caseId&&!e.updateData){let s=Z(ge.PREVIEW,e.context),a=st(s,ge.PREVIEW,e.context,{buildNew:!0}),c=decodeURI(e.caseId);T(Pt({...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 n={};if(r.RemoteSystemID)n.RemoteSystemID=r.RemoteSystemID;else if(ae.isRemoteCase(r.caseClassName)){let{RemoteSystemID:s}=ae.getRemoteCase(r.caseClassName);n.RemoteSystemID=s}let{restApi:o,reqType:i}=Kde(e,r);return q(M(B.appendExcludeQueryParamToUrl(o),{method:i,headers:n},e.context)).pipe(O(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:$e(s.headers),rootView:g.getIn(c,d.ROOT)}}),me(": Error ocurred during ajax call at loadView Epic : ",e.viewLoadingContainer?.context??e.context))}),z(async e=>{let r={};if(e?.type===Te){if(r.actionsOut=ue(e),e?.payload?.context?.includes(ge.PREVIEW)){let a={...W(e.payload.context),caseInfo:{progress:!1,error:!0}},c=Z(ge.PREVIEW,e.payload.context);r.actionsOut=V(rr,{key:a.key,target:c,containerName:ge.PREVIEW,context:e.payload.context,containerItemID:e.payload.context,data:a})}return r}try{r.actionMgrID=e?.actionConfig?.actionMgrID,r.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}=Wde(s);s.context=m;let f={acName:p,context:m},h={};h=Le(a),h.directUrlUpdation=!1,await Pe(h,s,f);let S={...s,target:p,context:m,containerItemID:l||m,headers:c},A=Me(h,S);if(A.resourceType=B0.CASE,s.viewName===d.PY_CONFIRM&&(A.caseViewMode=d.REVIEW_MODE,g.setIn(A.data,["context_data","caseViewMode"],d.REVIEW_MODE)),u&&!A.updateData){A.caseViewMode=d.REVIEW_MODE,g.setIn(A.data,["context_data","caseViewMode"],A.caseViewMode);let C=te(A?.context),_=wt(C,A.key);Gde(_,C,A,r,u)}else{A.preserveClientChanges=!0,r.actionsOut=[],u===ge.PREVIEW&&r.actionsOut.push({type:mn,payload:{context:m,skipMergeAssignmentsAndActions:!1}});let{viewName:C}=s;C===P.getDefaultQualifiedName(A_)&&pr(A,A),qde(A,r)}}catch(s){console.error(s),r.rootView={type:"error",payload:s}}let{caseId:n,context:o,viewName:i}=e.actionConfig;return i===P.getDefaultQualifiedName(A_)&&WU({caseId:n,context:o}),r}),O(({rootView:e,actionsOut:r,actionMgrID:n=0})=>(w.resolveActionByID(n,e),Ve.setNeedsMapping(!1),r))),Yde=t=>{let e=0,r=[];return t.pipe(ee(Nr),O(n=>({actionMgrID:e}=n.payload,n.payload)),z(n=>{$.publish(E.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_STARTED);let{debugInfo:o,context:i,viewName:s,className:a,skipSemanticUrl:c=!1,containerName:l=Bt.getTargetViewContainerName(Rn)}=n,u=o&&{...Ge.addDebugHeaders(o)},p=Z(l,i),m="";if(!c){let{semanticURL:S,activate:A,activateContainerActionPayload:C}=Ej(s,a,p);if(m=S,A)return EE(C),Se({type:or,activateContainerActionPayload:C,actionConfig:n})}let h=se(p)?vt(p,{loadingContext:i}):Promise.resolve({continueExecution:!0,removeActionPayload:{}});return q(h).pipe(z(({continueExecution:S,removeActionPayload:A})=>S?q((()=>{if(yt())return tr("openPage",{pageName:s,pageClass:a,headers:u});let{restApi:_,reqType:I}=U(Rn,{page:s,pageClass:a});return M(_,{method:I,headers:u},i)})()).pipe(O(_=>{let I={};return typeof _.data=="string"?I=JSON.parse(_.data):I=_.data,{response:{...I,key:m,semanticURL:m},actionConfig:n,headers:$e(_.headers),removeActionPayload:A,skipSemanticUrl:c}}),me(": Error ocurred during ajax call at showPage Epic : ",n.context)):(w.rejectActionByID(e),At)))}),z(async n=>{let o={};if(o.actionManagerID=n?.actionConfig?.actionMgrID,n&&n.type===Te)return r.push(ue(n)),o;let{type:i}=n,{actionConfig:s,skipSemanticUrl:a}=n,c=s.containerName||Bt.getTargetViewContainerName(Nr),l=Z(c,s.context);$.publish(E.PUB_SUB_EVENTS.EVENT_PREVIEW_DISMISS,{pageName:n.actionConfig.viewName,pageClass:n.actionConfig.className}),$.publish(E.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_INIT,{pageName:n.actionConfig.viewName,pageClass:n.actionConfig.className});let{remoteCasePayload:u,updatedType:p}=Cj(i,n,s,l);if(i=p??i,s.isDeferLoaded){let{response:m,headers:f={}}=n,{isCreateDataObject:h,context:S}=s,A=Le(m,{isCreateDataObject:h});A.directUrlUpdation=!a,await Pe(A,s,{acName:l,context:S});let I=Me(A,{containerItemID:S,target:l,headers:f,context:S});o.rootView=g.getIn(A,d.ROOT),r.push(V(Re,I))}else if(i===or){let{activateContainerActionPayload:{semanticURL:m,containerItemID:f}}=n,h=pe(f),S={acName:l,context:h};s.isTraditionalRemoteCase||await Pe({directUrlUpdation:!0,semanticURL:m},s,S,!0),r.push(V(nr,{target:l,containerItemID:f}))}else{let m=st(l,c,s.context),{response:f,headers:h={},removeActionPayload:S}=n,A=Le(f,{isCreateDataObject:s.isCreateDataObject});A.directUrlUpdation=!a;let C={acName:l,context:m},_=wn(m);await Pe(A,s,C);let I={target:l,context:m,containerItemID:m,headers:h,debugInfo:s.debugInfo,currentCaseViewMode:_,referenceList:s?.referenceListStr,subscriptName:s?.subscriptName,pageName:s.viewName},N=Me(A,I);N.resourceType=E.PAGE,s.isCreateDataObject&&(N.resourceType=E.RESOURCE_TYPES.DATA,N.resourceStatus=E.RESOURCE_STATUS.CREATE,delete N.data.caseInfo,N.referenceList=s.referenceListStr,N.subscriptName=s.subscriptName),Ij(s,u,N),N.data??={},N.data.traditionalGadgetId=B.getUniqueGadgetId();let x=Gt(l,N);S.containerItemID&&rn(x)&&r.push(V(Qe,{containerItemID:S.containerItemID,target:l})),r.push(x)}return $.publish(E.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_DONE,{target:l,pageName:n.actionConfig.viewName,pageClass:n.actionConfig.className}),o}),O(({actionManagerID:n=0,rootView:o})=>{w.resolveActionByID(n,o),T(r),r=[]}),qi())},Zde=[Jde,Yde],v5=Zde;var Qde="Error occurred during ajax call at showData Epic : ",Xde=(t,e,r)=>{let{context:n,pageName:o,dataContext:i,dataContextParameters:s,semanticURL:a,skipSemanticUrl:c,RemoteSystemID:l}=t,{removeActionPayload:u}=e,p={};return p.RemoteSystemID=l,q((()=>{if(yt())return tr(Oo,{queryPayload:{pageName:o},body:{dataContext:i,dataContextParameters:s}});let{restApi:f,reqType:h,body:S}=U(Oo,{pageName:o,dataContext:i,dataContextParameters:s});return M(f,{method:h,headers:p,body:S},n)})()).pipe(O(f=>({response:{...f.data,key:a,semanticURL:a},actionConfig:t,headers:$e(f.headers),removeActionPayload:u,skipSemanticUrl:c})),me(Qde,t.context,String(r)))},H0=Xde;var{RESOURCE_TYPES:G0}=E,epe=(t,e)=>{let{context:r,pageName:n,dataContext:o,dataContextParameters:i,skipSemanticUrl:s=!1,isDeferLoaded:a=!1,parentAction:c="",resourceType:l,containerName:u,RemoteSystemID:p}=t,m=Z(u,r),f="",h={context:r,pageName:n,dataContext:o,dataContextParameters:i,semanticURL:f,skipSemanticUrl:s,containerName:u,isDeferLoaded:a,parentAction:c,resourceType:l,RemoteSystemID:p};if(!s){f=bt(Oo,{pageName:n,dataViewName:o},i),h.semanticURL=f;let{activate:S,activateContainerActionPayload:A}=ns(G0.PAGE,m,{semanticURL:f});return S?Se({type:or,activateContainerActionPayload:A,actionConfig:t}):q(vt(m,{loadingContext:r})).pipe(z(({continueExecution:C,removeActionPayload:_})=>C?H0(h,{removeActionPayload:_},e):(w.rejectActionByID(e),At)))}return H0(h,{removeActionPayload:{}},e)},tpe=t=>{let e=0,r=[],n;return t.pipe(ee(uc),Ac(o=>({actionMgrID:e}=o.payload,Se(o.payload).pipe(z(i=>epe(i,e)),z(async i=>{if(i&&i.type===Te)return r.push(ue(i)),r;let{type:s,actionConfig:a,headers:c,response:l,skipSemanticUrl:u}=i;n=g.getIn(l,d.ROOT);let{containerName:p,parentAction:m,resourceType:f}=a,h=Z(p,a.context),S,A=wn(a?.context);if(a.isDeferLoaded){S=Le(l),S.directUrlUpdation=!u;let C={acName:h,context:a.context};await Pe(S,a,C);let _={target:h,headers:c,context:a.context,containerItemID:i.containerItemID},I=Me(S,_);return r=V(Re,I),r}if(s===or){let{activateContainerActionPayload:{semanticURL:C,containerItemID:_}}=i,I=pe(_);await Pe({directUrlUpdation:!0,semanticURL:C},a,{acName:h,context:I},!0),r.push(V(nr,{target:h,containerItemID:_,resourceType:G0.DATA}))}else if(f==="DATA"&&m===Vi){let{context:C}=a,_=l?.data,I={context:C,data:_};r.push(V(Re,I))}else{let C=st(h,p,a.context),{removeActionPayload:_}=i;S=Le(l),S.directUrlUpdation=!u,await Pe(S,a,{acName:h,context:C});let x=Me(S,{target:h,context:C,containerItemID:C,headers:c,currentCaseViewMode:A});x.resourceType=G0.DATA;let H=Gt(h,x);_.containerItemID&&rn(H)&&r.push(V(Qe,{containerItemID:_.containerItemID,target:h})),SE(r),r.push(H)}return r}),O(()=>(w.resolveActionByID(e,n),T(r),r=[],r))))))},R5=tpe;var rpe="Error occurred during ajax call at deleteDataObject Epic",npe=t=>{let{dataViewName:e,context:r,dataViewParameters:n}=t,o={data_view_ID:e,dataViewParameters:encodeURIComponent(JSON.stringify(n))},{restApi:i,reqType:s}=U(Kk,o);return q(M(i,{method:s},r)).pipe(O(a=>({response:a.data,actionInPayload:t})),me(rpe,r))},P5=npe;var ope=t=>{let e=0,r=[];return t.pipe(ee(mS),gr(100),O(n=>({actionMgrID:e}=n.payload,n.payload)),z(n=>P5(n)),z(async n=>{if(n&&n.type===Te){let{payload:o}=n,i=ue({...n,...o,actionMgrID:e});return r.push(i),r}return[]}),O(()=>(r.length===1&&Je(r[0].type)?w.rejectActionByID(e):w.resolveActionByID(e),T(r),r=[],r)))},N5=ope;var ipe="Error occurred during ajax call at GET data object actions : ",spe=t=>{let{dataViewID:e,dataViewParameters:r,context:n}=t,o={data_view_ID:e},{restApi:i,reqType:s}=U(Wk,o);return q(M(i,{method:s,body:{dataViewParameters:r}},n)).pipe(O(a=>({...a.data})),me(ipe,t.context))},O5=spe;var ape=t=>{let e=0,r=[],n=100,o={};return t.pipe(ee(nS),gr(n),O(i=>({actionMgrID:e}=i.payload,i.payload)),z(i=>O5(i)),z(async i=>i&&i.type===Te?(r.push(ue(i)),r):(o=i,[])),O(()=>(r.length===1&&Je(r[0].type)?w.rejectActionByID(e):w.resolveActionByID(e,o),T(r),r=[],r)))},x5=ape;var cpe=[R5,tD,rD,nD,N5,x5,oD,iD],D5=cpe;var{RESOURCE_TYPES:{CASE:lpe,DATA:upe,OBJECT:dpe,PAGE:ppe}}=E,mpe=(t,e,r)=>{e===ppe&&r&&(t.pageName=r)},yl=[],Sl=!1,lp=!1,C_=null,ey=null,q0={},fpe=t=>t?.routeKey===Fi?s9(t.payload?.caseTypeID,t.payload?.businessID):"",gpe=t=>t.pipe(ee(oS),Cm(200),O(e=>e.payload),z(e=>{lp=!1,$.subscribe(E.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_STARTED,()=>{lp=!0});let r=Tr.getPreviewMode()&&Ge.addDebugHeaders({debugId:g.generateUniqueID()});q0.dataContext=e.payload.dataViewName,q0.dataContextParameters=e.payload.dataViewKeys;let{context:n,requestType:o,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"'))),Sl=i===$r,Sl&&Ve.setNeedsMapping(!0);let a=gt.getServerURL()+s,c=e.options.context,l,u={},p=e?.payload?.caseClassName;if(ae.isRemoteCase(p)){let{RemoteSystemID:m}=ae.getRemoteCase(p);u.RemoteSystemID=m}if(v.isWSSPortal()&&(u[d.X_ORIGIN_CHANNEL]="WSS"),o==="POST"){l=e.payload,s.indexOf("viewType=")<0&&(s=`${s}?viewType=page`);let m=VT(i),f;switch(m){case lpe:case dpe:f={caseTypeID:l.caseTypeID,processID:l.processID,content:{}};break;case upe:f=q0;break;default:f=l}return q(M(a,{method:o,body:f,headers:{...u,...r}},n)).pipe(O(h=>({response:{...h.data},payload:e,headers:$e(h.headers,"",u)})),me(": Error occurred during ajax call at historyEpic : ",e))}return q(M(B.appendExcludeQueryParamToUrl(a),{method:"GET",headers:{...u,...r}},c.substring(0,c.lastIndexOf("/")))).pipe(O(m=>({response:m.data,payload:e,headers:{...$e(m.headers),...r}})),Gi(m=>{if(i===qs){let f={messages:[{type:"error",message:m.response.data.errorDetails[0].localizedValue}],category:"PAGE"};pt.setComponentCache("assignments-launchAssignment-Error",f);let h=dE(II()),S=ye.getEndPointInfo(h.split("/assignments")[0]),A=gt.getServerURL()+S.routeEndpoint;return e={...e,routeKey:Lt,resetSemanticURL:!0},q(M(A,{method:S.reqType,headers:{...u,...r}},c.substring(0,c.lastIndexOf("/")))).pipe(O(C=>({response:C.data,payload:e,headers:{...$e(C.headers),...r}})))}return Se(os(": Error occurred during ajax call at historyEpic : ",m,n))}))}),z(async e=>{if(lp)return yl;if($.subscribe(E.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_STARTED,()=>{lp=!0}),e&&e.type===Te)return ue(e);let{headers:r={},response:n,payload:o}=e,i=Le(n,{[E.STOPMERGEACTIONS]:!n.nextAssignmentInfo}),s=o.options.acName,a=It(s)&&Fr(s)?se(s):e.payload.options.context,c=a;r.RemoteSystemID=o?.payload?.RemoteSystemID,ey={target:s,context:a,containerItemID:c,headers:r,debugInfo:{debugId:r[d.COREHEADER_APP_DEBUG_ID]}};let l=o?.payload?.pageClass,u=o?.payload?.page,p=Sl?$r:Lt,m=Sl?o.payload.objectID:o.payload.workID,f=Sl?"{objectID}":"{workID}",h=Sl?`objects/${m}`:fpe(o);o?.payload?.caseName&&m&&(h=bt(p,{caseName:e.payload.payload.caseName}),h=h?.replace(f,m)||"",l=o?.payload?.caseClassName),(o?.routeKey===qs||o?.resetSemanticURL)&&t2(c,i),bj(o?.routeKey,i),Tj(i),$.publish(E.PUB_SUB_EVENTS.EVENT_PREVIEW_DISMISS,{pageName:u,pageClass:l}),$.publish(E.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_INIT,{pageName:u,pageClass:l});let S=g.getIn(i,d.COMPONENTS);S&&await go(S),Yi(i,o.options.actionConfig,!0),$.publish(E.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_DONE,{target:s,pageName:u,pageClass:l});let A=Me(i,ey),C=VT(e.payload.routeKey);return A=Aj(C,{...n.data,semanticURL:h,caseViewMode:d.REVIEW_MODE},A),A.data.traditionalGadgetId=B.getUniqueGadgetId(),mpe(A,C,u),yl.push(Gt(s,A)),C_=i,_j(a,yl),yl}),O(()=>(lp||T(yl),C_&&ey&&pr(C_,ey),yl=[],Sl=!1,lp=!1,ey=null,C_=null,yl)),me("Error occurred")),hpe=[gpe],w5=hpe;var ype=t=>{let e=0;return t.pipe(ee(Ks),O(r=>({actionMgrID:e}=r.payload,r.payload)),O(()=>{let r=we()?.getState(),n=Qh();return lo(r,n)&&e>0?w.resolveActionByID(e,{}):w.rejectActionByID(e),[]}),qi())},Spe=[ype],$5=Spe;var Epe=t=>{let e=0,r=[];return t.pipe(ee(Qy),O(n=>({actionMgrID:e}=n.payload,n.payload)),z(n=>{let{context:o,skipSemanticUrl:i=!1,insightID:s}=n,a="",c;i||(a=bt(dc,{insightID:"{insightID}"}),a=a.replace("{insightID}",s),c=ye.getEndPointInfo(a));let{restApi:l,reqType:u}=U(dc,{...c?.payload||[],insightID:s});return q(M(l,{method:u},o)).pipe(O(p=>{let m={};return typeof p.data=="string"?m=JSON.parse(p.data):m=p.data,{response:{...m,key:a,semanticURL:a},actionConfig:n,skipSemanticUrl:i}}),me(": Error occurred during ajax call at showPage Epic : ",n.context))}),z(async n=>{if(n&&n.type===Te)return r.push(ue(n)),r;let{actionConfig:o,skipSemanticUrl:i}=n,s=Bt.getTargetViewContainerName(Nr),a=Z(s,o.context),c=st(a,s,o.context),{response:l}=n,u=Le(l);u.directUrlUpdation=!i,await Pe(u,o,{acName:a,context:c},!i,i);let S=Me(u,{target:a,context:c,containerItemID:c});S.resourceType=E.PAGE;let A=Gt(a,S);return r.push(A),r}),O(()=>{w.resolveActionByID(e),T(r),r=[]}),qi())},Ape=[Epe],M5=Ape;var Cpe=t=>{let e=0,r=[];return t.pipe(ee(Xy),O(n=>({actionMgrID:e}=n.payload,n.payload)),z(n=>{let{context:o,skipSemanticUrl:i=!1,dashboardID:s}=n,a="";i||(a=bt(gm,{dashboardID:s}),a=a.replace("{dashboardID}",s));let{restApi:c,reqType:l}=U(gm,{dashboardID:s});return q(M(c,{method:l},o)).pipe(O(u=>{let p={};return typeof u.data=="string"?p=JSON.parse(u.data):p=u.data,{response:{...p,key:a,semanticURL:a},actionConfig:n,skipSemanticUrl:i}}),me(": Error occurred during ajax call at showPage Epic : ",n.context))}),z(async n=>{if(n&&n.type===Te)return r.push(ue(n)),r;let{actionConfig:o,skipSemanticUrl:i}=n,s=Bt.getTargetViewContainerName(Nr),a=Z(s,o.context),c=st(a,s,o.context),{response:l}=n,u=Le(l);u.directUrlUpdation=!i,await Pe(u,o,{acName:a,context:c},!i,i);let S=Me(u,{target:a,context:c,containerItemID:c});S.resourceType=E.PAGE;let A=Gt(a,S);return r.push(A)}),O(()=>{w.resolveActionByID(e),T(r),r=[]}),qi())},Ipe=[Cpe],k5=Ipe;var _pe="Error occurred during ajax call at createObject Epic : ",L5=(t,e)=>{let{class:r,context:n,viewType:o=it.PAGE}=t,{removeActionPayload:i}=e,s=t?.pageName?t?.pageName:v.getDefaultCasePage();return q(Ai.createCase(r,{...t,pageName:s,viewType:o,context:n})).pipe(O(({response:a,headers:c})=>(Ve.analyseResponse(a),{response:a,actionInPayload:t,headers:c,removeActionPayload:i})),me(_pe,n))};var U5="CREATE_OBJECT";var bpe=(t,e)=>B.isExternalObject(t)&&e?e:Go(),Tpe=t=>{let e=0,r=[],n={},o,i=100,s=!1;return t.pipe(ee(U5),gr(i),Vt(a=>{if({actionMgrID:e}=a.payload,B.isExternalObject(a.payload.class)&&!Dr(a.payload.context)){let c={type:E.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return w.rejectActionByID(e,!0,c),Se([])}return Se(a.payload).pipe(z(c=>{let{context:l}=c;o=c.class;let u=k0(c),p=Z(u,l);return s=!1,q(Ba(p,{loadingContext:l})).pipe(z(({continueExecution:m,removeActionPayload:f,dirtyCheckPerformed:h})=>m?(s=h,L5(c,{removeActionPayload:f})):(w.rejectActionByID(e),At)))}),z(async c=>{if(c&&c.type===Te)return c.payload.context=bpe(o,c.payload.context),r.push(ue(c)),r;let{actionInPayload:l,response:u,headers:p,removeActionPayload:m}=c,f=sp(l,u);g.setIn(u.data,d.getProperty(d.CASE_INFO.IS_FIRST_ASSIGNMENT),!0);let h=k0({...l,isInCreateStage:f}),S=Z(h,l.context),A=st(S,h,l.context);if(KB(l,r),!s&&YB(h,S,o)){let{continueExecution:Ie}=await vt(S,{loadingContext:l.context});if(!Ie)return w.rejectActionByID(e),r}let C=l?.openCaseViewAfterCreate??!0;if(JB(C,f)){let{businessID:Ie,caseType:he,resolvedURL:De}=nE(u);return n={id:Ie,label:he,href:De},Ha(n),np({caseId:Ie,caseType:he}),r}QB(l);let _=Le(u),I=String(er(ho(_))),N=Yn(_),x=br(N,Xi(_))||bt(ei,{caseClassName:N}).replace(/{.+?}/,I);_.semanticURL=x,pt.setComponentCache(I,Ge.addDebugHeaders(l.debugInfo)),op(_,l),await Pe(_,l,{acName:S,context:A});let G=ip(_),ne={target:S,context:A,headers:p,semanticURL:x,caseViewMode:G,containerItemID:A,isInCreateStage:f,isMinimizable:f,assignmentContext:g.getIn(_,_o.NEXT_ASSIGNMENT_INFO_CONTEXT),nextAssignmentInfo:g.getIn(_,_o.NEXT_ASSIGNMENT_INFO),resourceType:E.RESOURCE_TYPES.OBJECT,openCaseViewAfterCreate:l.openCaseViewAfterCreate,modalOptions:l.modalOptions,debugInfo:l.debugInfo};ii(ne,_);let j=Me(_,ne),oe=Gt(S,j);return ZB(oe,{removeActionPayload:m,target:S},r),r.push(oe),r}),O(()=>(hn(r),mt(r,e),setTimeout(()=>XB(o)),n={},r=[],r)))}))},j5=Tpe;var vpe="Error occurred during ajax call at executeObjectWideAction Epic : ",z5=(t,e)=>{let{assignmentID:r,actionID:n,caseID:o,context:i,additionalHeaders:s={},jsActionQueryParams:a}=t,{state$:c}=e,l=it.PAGE,u=tL,p={assignmentID:r,actionID:n,viewType:l,objectID:o},{restApi:m}=U(u,p),{reqType:f}=U(u,p);l&&!m?.includes("viewType=")&&(m=m?.includes("?")?`${m}&viewType=${l}`:`${m}?viewType=${l}`),m=Su(a,m),t.viewType=l;let{content:h}=Rt(i,{isObjectWideAction:!0}),S=c.value.data[i]?.objectInfo?.headers||{},{etag:A}=S,C={"if-match":A,...s};return q(M(m,{method:f,body:h,headers:C},i)).pipe(O(_=>{let{data:I,headers:N}=_;return Ve.analyseResponse(_.data),{actionInPayload:t,response:I,headers:$e({...C,...N})}}),me(vpe,i))};var Rpe=(t,e)=>{let{isCaseWideAction:r}=e;return{isCaseWideAction:r,caseID:ho(t)}},F5=Rpe;var{RESOURCE_TYPES:Ppe}=E,Npe=(t,e)=>{let r=0,n=[],o={},i="";return t.pipe(ee(su),Vt(s=>{if({actionMgrID:r}=s.payload,i=s.payload.context,dt({context:i,stateObj:W(i),clearContextMessages:!0}),!Dr(i)){let a={type:E.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return w.rejectActionByID(r,!0,a),Ct.handleDeferredActionCompletion(s.payload.context),Se([])}return Se(s.payload).pipe(z(a=>{d_(n,a);let c={...a};return z5(c,{state$:e})}),z(async a=>{if(a?.type===Te){let oe=ue(a);return n.push(oe),n}Io.clearContextedCache(i);let{headers:c,actionInPayload:l,response:u}=a,{containerItemID:p,isModalAction:m,isInCreateStage:f}=l,h=te(p);l.target=h,g.setIn(u.data,d.OBJECT_INFO_IS_LOCAL_ACTION,!1),y_({submitResponse:u});let S=Le(u,{[E.STOPMERGEACTIONS]:!u.nextAssignmentInfo}),A=Yn(S),C=qe(l.context),_=Ke(C)[0]?se(Ke(C)[0]):C,I=VU(S),N=f&&!I;m&&!f&&!hl(l.context,_)&&(S=yE(S,W(p)));let x=Me(S,{headers:c,actionMgrID:r,directUrlUpdation:!1});BU(x.data,l),x.caseClassName=A,x.resourceType=Ppe.ASSIGNMENT,x.headers=c;let H=!1,G=ho(S);ii(x,S);let ne=br(A,Xi(S))||bt(ei,{caseClassName:A}).replace(/{.+?}/,String(er(G)));S.semanticURL=ne,x.semanticURL=ne,await f_(l,x,H,G,S,n,a,u,!0),N&&(o=m_(l),np({caseId:l.caseID,caseType:l.caseTypeID,assignmentId:l.assignmentID})),HU(a,n),Ct.handleDeferredActionCompletion(i),g_(x,l,_);let j=F5(S,l);return sE({...j,containerItemID:p}),p_(n,{transientItemID:p,target:h,isModalAction:m}),n}),O(()=>{let a=n.find(c=>c.type===Te);return a?(Ct.handleDeferredActionCompletion(i),h_(a),w.rejectActionByID(r)):w.resolveActionByID(r,o),hn(n),Ve.setNeedsMapping(!1),n=[],o={},n}))}))},V5=Npe;var Ope="Error occurred during ajax call at getObject Epic : ",B5=(t,e)=>{let{insKey:r,headers:n,context:o,debugInfo:i,viewType:s}=t,{removeActionPayload:a}=e,c=t.pageName?t.pageName:d.VIEW_NAMES.PY_DETAILS,l=U($r,{objectID:r,params:{pageName:c}}),{restApi:u}=l,{reqType:p}=l;return s==="none"&&(u=`${u?.split("viewType")[0]}viewType=none`),q(M(u,{method:p,headers:{...n,...i&&{...Ge.addDebugHeaders(i)}}},o)).pipe(O(m=>(Ve.analyseResponse(m.data),{response:m.data,actionInPayload:t,headers:$e({...n,...m.headers}),removeActionPayload:a})),me(Ope,o))};var H5=async(t,e)=>{let{activateContainerActionPayload:{semanticURL:r,containerItemID:n},actionInPayload:o,actionInPayload:{context:i,skipBrowserSemanticUrlUpdate:s,doDeleteCaseSummary:a}}=e,c=Ut($r,o),l=Z(c,i),u=pe(n);await Pe({directUrlUpdation:!s,semanticURL:r},o,{acName:l,containerName:c,target:l,context:u}),t.push(V(nr,{containerItemID:n,target:l,context:u,doDeleteCaseSummary:a}))},G5=t=>{let e=ho(t),r=Yn(t),n=br(r,Xi(t));if(n)return n;let o=bt($r,{objectClassName:r});return o=o?.replace("{objectID}",String(er(e))),o};var q5="GET_OBJECT";var{RESOURCE_TYPES:W5}=E,xpe=async(t,e)=>{let{actionInPayload:r,activateContainerActionPayload:n,type:o,response:i,removeActionPayload:s,headers:a}=t,{context:c,skipBrowserSemanticUrlUpdate:l,debugInfo:u}=r,p=Ut($r,r),m=Z(p,c);if(cE(o))await H5(e,{activateContainerActionPayload:n,actionInPayload:r});else{let h=st(m,p,c,{buildNew:!0}),S=Le(i),A=G5(S);S.semanticURL=A,S.directUrlUpdation=!l,await Pe(S,r,{acName:m,context:h});let _=Me(S,{target:m,context:h,containerItemID:h,semanticURL:A,headers:a,debugInfo:u});_.caseViewMode=d.REVIEW_MODE,_.resourceType=W5.OBJECT,ii(_,S);let I=Gt(m,_);s.containerItemID&&rn(I)&&e.push(V(Qe,{containerItemID:s.containerItemID,target:m})),e.push(I)}let f=r.insKey;aE({caseKey:f,actionInContext:c})},Dpe=t=>{let e=0,r=[];return t.pipe(ee(q5),O(n=>({actionMgrID:e}=n.payload,n.payload)),z(n=>{let{context:o,isChild:i,viewType:s}=n,a=Ut($r,n),c=Z(a,o),l=s!=="none"?vt(c,{loadingContext:o}):Promise.resolve({continueExecution:!0,removeActionPayload:void 0});return q(l).pipe(z(({continueExecution:u,removeActionPayload:p})=>{if(!u)return w.rejectActionByID(e),At;let{activate:m,activateContainerActionPayload:f}=ns(W5.OBJECT,c,n);return m&&!i&&s!=="none"?Se({type:or,activateContainerActionPayload:f,actionInPayload:n}):B5(n,{removeActionPayload:p})}))}),z(async n=>{if(n&&Je(n.type))return r.push(ue(n)),r;if(n?.actionInPayload?.viewType==="none"){if(W(n?.actionInPayload?.context)?.context_data?.caseViewMode!==d.PERFORM_MODE){let s={data:{...Le(n?.response)?.data},context:n?.actionInPayload?.context,isArrayDeepMerge:!0};r.push({type:mn,payload:{context:s.context,doDeleteConfirmationDetails:!1}}),r.push(V(Re,s));let a=te(n?.actionInPayload?.context),c=jr(n?.actionInPayload?.context),l=Object.freeze({target:a,containerItemID:n?.actionInPayload?.context,context:n?.actionInPayload?.context,containerName:c});if(rE(n?.actionInPayload?.context)){let u=Me(n?.response,{...l});Eo({...u,isArrayDeepMerge:!0},r)}}}else await xpe(n,r);return r}),O(()=>(T(r),mt(r,e),r=[],r)))},K5=Dpe;var J5="OPEN_OBJECT_ACTION";var wpe=(t,e,r,n)=>{let o,i,s=!1,a=mr(t);return!Fr(t)||a&&!ml(t,n)?(i=ur(e,r),tn(e)&&(i=Zr(r,i)),o=i,s=!0):(o=a?wt(t,n):se(t),i=pe(o)),{context:i,containerItemID:o,isNewContainerItem:s}},$pe=t=>t?d.PERFORM_MODE:d.REVIEW_MODE,Mpe=t=>t?Pt:rr,W0=t=>{let{actionID:e,caseID:r,context:n,openActionType:o,modalLoadingContainer:i}=t,s=it.FORM,a=U(CS,{objectID:r,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??n;return q(M(l,{method:c,headers:{}},u)).pipe(O(p=>(Ve.analyseResponse(p.data),{response:p.data,actionInPayload:t,headers:$e(p.headers)})),me(`: Error occurred during ajax call at ${o} Epic : `,u))},Y5=async(t,e,{headers:r,actionInPayload:n})=>{let{context:o,actionName:i,openActionType:s,doDeleteCaseSummary:a,modalLoadingContainer:c}=n,l=Le(t,{info:E.OBJECT_INFO.OBJECT_INFO}),u=Ut(s,n),p=c?.target??Z(u,o),{context:m,containerItemID:f,isNewContainerItem:h}=wpe(p,u,o,t.data.objectInfo.ID);await Pe(l,n,{acName:p,target:p,containerName:u,context:m});let A=l.uiResources?.root,C=$pe(A),_=Me(l,{target:p,context:m,containerItemID:f,caseViewMode:C,doDeleteCaseSummary:a,headers:r,actionName:i,isMinimizable:!1,isInCreateStage:tn(u),resourceType:E.RESOURCE_TYPES.OBJECT,isProcessAction:n.isProcessAction,showProgress:n.showProgress,progressMessage:n.progressMessage,actionType:n.actionType});if(A&&ii(_,l),tn(u)&&delete _.doDeleteCaseSummary,e.push(V(Mpe(h),_)),h||e.push(V(As,_)),h){let I=Ke(n.contextName),N=wt(I,t.data.objectInfo.ID);if(N){let x={data:{objectInfo:{headers:r}},context:N};e.push(V(Re,x))}}return f!==se(p)&&e.push(V(nr,{target:p,containerItemID:f})),rE(f)&&!c?.context&&Eo(_,e),e};var kpe=t=>{if(t.openActionType=CS,Ut(t.openActionType,t)===d.MODAL){let r=Ut(t.openActionType,t),n=Z(r,t.context),o=Zr(t.context,ur(r,t.context));return T(Pt({target:n,context:o,containerItemID:o,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}}})),T(Fh({context:o})),t.modalLoadingContainer={target:n,context:o},W0(t)}return W0(t)},Z5=kpe;var Lpe=t=>{let e=0,r=[];return t.pipe(ee(J5),O(n=>({actionMgrID:e}=n.payload,n.payload)),z(n=>Z5(n)),z(async n=>{if(Je(n.type)){let c=ue(n);return r.push(c),W(n.payload.context)?.context_data?.isLoading&&r.push(V(As,n.payload)),r}let{actionInPayload:o,headers:i,response:s}=n,{actionID:a}=o;return g.setIn(s,"data.objectInfo.activeActionID",a),g.setIn(s.data,d.getProperty(d.OBJECT_INFO_IS_LOCAL_ACTION),!0),o.refreshConditions&&g.setIn(s.data,d.getProperty(d.CASE_INFO_REFRESH_CONDITIONS),o.refreshConditions),await Y5(s,r,{headers:i,actionInPayload:o}),S_(o),r}),O(()=>(T(r),mt(r,e),r=[],r)))},Q5=Lpe;var K0=t=>{let{containerName:e,isInCreateStage:r}=t;return r?d.MODAL:e||Bt.getTargetViewContainerName(Js)};var Upe="Error occurred during ajax call at createObject Epic : ",X5=(t,e)=>{let{class:r,context:n,viewType:o=it.PAGE}=t,{removeActionPayload:i}=e,s=t?.pageName?t?.pageName:v.getDefaultCasePage();return q(Ai.createCase(r,{...t,pageName:s,viewType:o,context:n,retrieveActionViewForNewObject:!0})).pipe(O(({response:a,headers:c})=>(Ve.analyseResponse(a),{response:a,actionInPayload:t,headers:c,removeActionPayload:i})),me(Upe,n))};var eH="CREATE_EXTERNAL_OBJECT";var jpe=t=>{let e=0,r=[],n=!1;return t.pipe(ee(eH),gr(100),O(i=>({actionMgrID:e}=i.payload,i.payload)),z(i=>{let{context:s}=i,a=K0(i),c=Z(a,s);return n=!1,q(Ba(c,{loadingContext:s})).pipe(z(({continueExecution:l,removeActionPayload:u,dirtyCheckPerformed:p})=>l?(n=p,X5(i,{removeActionPayload:u})):(w.rejectActionByID(e),At)))}),z(async i=>{if(i&&i.type===Te)return i.payload.context=Go(),r.push(ue(i)),r;let{actionInPayload:s,response:a,headers:c,removeActionPayload:l}=i,u=sp(s,a);g.setIn(a.data,d.getProperty(d.CASE_INFO.IS_FIRST_ASSIGNMENT),!0);let p=K0({...s,isInCreateStage:u}),m=Z(p,s.context),f=st(m,p,s.context);if(!n&&!tn(p)&&It(m)){let{continueExecution:H}=await vt(m,{loadingContext:s.context});if(!H)return w.rejectActionByID(e),r}let h=Le(a),S=Yn(h),A=br(S,Xi(h))||bt(Js,{caseClassName:S}).replace(/{.+?}/,String(er(ho(h))));h.semanticURL=A,op(h,s),await Pe(h,s,{acName:m,context:f});let _=ip(h),I={target:m,context:f,headers:c,semanticURL:A,caseViewMode:_,containerItemID:f,isInCreateStage:u,isMinimizable:u,assignmentContext:g.getIn(h,_o.NEXT_ASSIGNMENT_INFO_CONTEXT),nextAssignmentInfo:g.getIn(h,_o.NEXT_ASSIGNMENT_INFO),resourceType:E.RESOURCE_TYPES.OBJECT,openCaseViewAfterCreate:s.openCaseViewAfterCreate,modalOptions:s.modalOptions,debugInfo:s.debugInfo,isExternalObjectCreationFlow:!0};ii(I,h);let N=Me(h,I),x=Gt(m,N);return rn(x)&&si(r,{removeActionPayload:l,target:m}),r.push(x),r}),O(()=>(hn(r),mt(r,e),r=[],r)))},tH=jpe;var rH=t=>{let{workId:e,context:r,isExternalCase:n}=t,o=n?cS:nL,{restApi:i,reqType:s}=U(o,{ID:e});return q(M(i,{method:s},r)).pipe(O(a=>({response:a.data,actionInPayload:t,headers:$e(a.headers)})),me("Error occurred during ajax call at deleteWork Epic : ",r))};var nH=t=>{$.publish(d.PUB_SUB_EVENTS.WORK_EVENTS.WORK_DELETED,t)};var zpe=t=>{let e=0,r,n=[];return t.pipe(ee(Vx),O(o=>({actionMgrID:e,caseTypeID:r}=o.payload,o.payload)),z(o=>{if(!o.skipDeleteConfirmation&&!o.ignoreWorkDeletion){let i=ge.MODAL,s=Z(i,o.context),a=Zr(o.context,ur(i,o.context));return T([V(Pt,{target:s,context:a,containerItemID:a,containerName:i,isDeleteConfirmation:!0,actionName:"Delete",workId:o.workId,caseTypeID:r,className:o.className,keys:o.keys,...o.enableBackNavigation&&{enableBackNavigation:!0},data:{caseInfo:{caseTypeID:r}}})]),w.resolveActionByID(e),At}return o.ignoreWorkDeletion?Se({actionInPayload:o}):rH(o)}),z(async o=>{if(o&&Je(o.type)){let{payload:a}=o;return n.push(ue({...o,...a,actionMgrID:e})),n}let{actionInPayload:i}=o,{context:s}=i;if(Ha({content:Or().getLocaleValue("Deleted successfully!","Messages")}),s?.includes(d.PREVIEW)&&n.push(V(Lc,kc({context:d.APP.APP,name:d.PREVIEW}))),s?.includes(d.MODAL)){let a=ge.MODAL,c=Z(a,s);We(c,s)?.enableBackNavigation&&window?.history?.back()}return n}),O(()=>(T(n),mt(n,e)===d.PROMISE_VALUE.RESOLVE&&nH({caseTypeID:r}),n=[],n)))},oH=zpe;var Fpe=[j5,K5,V5,Q5,tH,oH],iH=Fpe;var sH=_V(...RB,...T5,...v5,...w5,...D5,...PB,...$5,...M5,...k5,...iH);var Vpe=new Set([Et,kt,Ze,et,Vs,Bs,Zo]),Bpe=()=>t=>e=>{let{type:r="",payload:n={}}=e||{},{category:o,context:i,transientItemID:s}=n;if(o==="HTTP"||!Vpe.has(r)){t(e);return}AE(i||s),be.removeContextTreeNode(i||s),(r===Et||r===Ze)&&n?.target?.indexOf("modal")!==-1&&$.publish(E.PUB_SUB_EVENTS.PEGA_EMBED_CUSTOM,r),t(e)},aH=Bpe;var El={},Hpe=new Set([Et,Er,Xo,et,Ze]),cH=t=>(El[t]||(El[t]={}),El[t]),Gpe=(t,e,r)=>{let n=cH(t),o=cH(d.CONTEXT),i=n[e]??[];n[e]=[...new Set([...i,r])];let s=o[r]??[];o[r]=[...new Set([...s,e])]},qpe=(t,e)=>{let r=e.lastIndexOf("_"),n=r>-1?e.slice(0,r):e,o=El[n],i=o?.[e];if(i){let s=i.indexOf(t);s>-1&&i.splice(s,1)}return i&&i.length>0?null:(o&&(delete o[e],Object.keys(o).length===0&&delete El[n]),{dataPageName:n,dataPageNameWithHash:e})},J0=t=>{if(!t)return;let e=El[d.CONTEXT],n=(e?.[t]??[]).map(o=>qpe(t,o)).filter(o=>!!o);e&&(delete e[t],Object.keys(e).length===0&&delete El[d.CONTEXT]),n.length>0&&T(Bw({dataPagesToBeRemoved:n}))},lH=(t={},e)=>{e&&Object.keys(t).forEach(r=>{let n=t[r];Object.keys(n??{}).forEach(o=>{Gpe(r,o,e)})})};var Wpe=(t,e)=>{e&&e.length>0&&(t===et||t===Ze)&&e.forEach(r=>{J0(r)})},Kpe=(t,e)=>{let{data:r={},context:n=null,childContainersContexts:o=[]}=e??{};if(Wpe(t,o),t===Et||t===Er||t===Xo){let i=t===Xo?r:r.shared;lH(i,n);return}if(t===et){J0(n),lH(r.shared,n);return}t===Ze&&J0(n)},Jpe=()=>t=>e=>{(Array.isArray(e)?e:[e]).forEach(n=>{let o=n?.type;Hpe.has(o)&&Kpe(o,n?.payload)}),t(e)},uH=Jpe;var{PUB_SUB_EVENTS:dH}=E,Ype=new Set([Ze,et]),Zpe=(t,e,r,n,o,i)=>{let s=t.getState(),{resourceType:a,key:c,context:l}=g.getIn(s,["containers",e,"items",r])||{},u=g.getIn(s,["data",l,d.CONTEXT_DATA,"initiatingContext"]),p={resourceType:a,key:c,context:l,containerItemID:r,...u&&{initiatingContext:u},...n!==void 0?{eventName:n}:{}};$.publish(dH.CONTAINER_EVENTS.CLOSE_CONTAINER_ITEM,p),e===`${E.APP.APP}/${d.PRIMARY}`&&i===d.CONTAINER_TYPE.MULTIPLE&&$.publish(dH.CONTAINER_EVENTS.CLOSE_MULTI_TYPE_PRIMARY_CONTAINER_ITEM,{key:c,newAccessedOrder:o})},Qpe=(t,e)=>{e&&e.length>0&&(t===et||t===Ze)&&e.forEach(r=>{r&&xh.cleanCaches(r)})},Xpe=t=>e=>r=>{let n=o=>{if(!Ype.has(o.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}={}}=o;i===Ze&&Zpe(t,s,a,f,p,m),Qpe(i,u),c&&(i===et||i===Ze&&l)&&xh.cleanCaches(c)};Array.isArray(r)?r.forEach(n):n(r),e(r)},pH=Xpe;var eme=t=>t===`${d.APP.APP}/${d.PRIMARY}`,tme=new Set([Et,et,Ze]),Y0=t=>t===`${d.APP.APP}/${d.MODAL}`,rme=(t,e,r,n,o)=>{t&&e&&(Y0(o)?ZU({caseId:t,caseClass:r,context:n||""}):JU({caseId:t,caseClass:r,context:n||""}))},nme=(t,e)=>{t&&(Y0(e)?QU({caseId:t,caseClass:"",context:""}):YU({caseId:t}))},ome=()=>t=>e=>{if(!e||typeof e!="object"||!("type"in e)||typeof e.type!="string"||!tme.has(e.type)){t(e);return}let{type:r}=e,{payload:n}=e,{target:o,key:i,context:s,data:a}=n||{};if(eme(o)||Y0(o)){let c=a?.caseInfo?.ID,l=s||"",u=re(d.CASE_INFO.CASE_INFO_ID,"",l)||"",p=a?.caseInfo?.caseTypeID||"";if((r===et||r===Ze)&&nme(u,o),r===Et||r===et){t(e),rme(i,!!c,p,l,o);return}}t(e)},mH=ome;var ime=new Set([Et,kt,et,Ze,po]),sme=()=>t=>e=>{if(!e||!ime.has(e.type)){t(e);return}let{payload:{context:r=null,transientItemID:n=null,clearStateMachine:o=!0}={},type:i}=e;r&&(i===Et||i===kt||i===et||i===Ze)&&o&&(vm(r),bm(r)),n&&i===po&&(vm(n),bm(n)),t(e)},fH=sme;var ame=new Set([Et,et,Ze,kt]),up=t=>typeof t=="object"&&t!==null,cme=t=>up(t)&&typeof t.context=="string",lme=t=>({context:t.context,data:up(t.data)?t.data:{},resourceType:typeof t.resourceType=="string"?t.resourceType:"",caseID:typeof t.caseID=="string"?t.caseID:void 0}),ume=t=>up(t)&&typeof t.type=="string",hH=t=>t?.toString().includes(d.MODAL)??!1,xi=t=>g.getIn(t,d.CASE_INFO.ASSIGNMENT_ID),ty=t=>g.getIn(t,["caseInfo","ID"]),gH=t=>{if(!t)return;let e=W(t);return up(e)?e:void 0},dme=(t,e,r,n)=>{let o=ty(e),i=xi(e);!o||!i||o===r&&i===n||_u({actionInContext:t,assignmentID:i,caseKey:o})},pme=(t,e,r,n)=>{if(t===Ze){_u(n);return}(t===kt||t===et)&&dme(e,r,n.caseKey,n.assignmentID),$m(n)},yH=t=>{let e=Object.keys(Tt.subscribers);for(let r=0;r<e.length;r+=1){let n=e[r],o=Tt.subscribers[n],{matcher:i,criteria:s}=o.filter;i==="COACH_UPDATE"&&s?.caseId===t&&Tt.unsubscribe(n)}},mme=(t,e,r)=>{if(r===d.RESOURCE_TYPES.ASSIGNMENT){let n=xi(e),o=g.getIn(e,["caseInfo","ID"]);if(n&&o)return{actionInContext:t,assignmentID:n,caseKey:o}}else if(r===d.RESOURCE_TYPES.CASE&&t?.includes("workarea")){let n=g.getIn(e,["caseInfo","ID"]),o=xi(e);if(n&&o)return{actionInContext:t,assignmentID:o,caseKey:n}}},fme=(t,e,r)=>{if(r!==d.RESOURCE_TYPES.ASSIGNMENT)return;let n=W(t),o=xi(n),i=xi(e),s=ty(e)??ty(n);if(o&&o!==i&&s&&_u({actionInContext:t,assignmentID:o,caseKey:s}),i&&s)return{actionInContext:t,assignmentID:i,caseKey:s}},gme=(t,e)=>{if(t?.includes("workarea")){let r=xi(W(t));r&&_u({actionInContext:t,assignmentID:r,caseKey:e})}else yH(e)},hme=(t,e,r,n)=>{if(t?.includes("workarea")){let o=xi(W(t));o&&_u({actionInContext:t,assignmentID:o,caseKey:n})}else yH(n);if(r===d.RESOURCE_TYPES.ASSIGNMENT){let o=xi(e);if(o)return{actionInContext:t,assignmentID:o,caseKey:n}}},yme=(t,e)=>{let r=up(t.payload)?t.payload:void 0;if(!r||!hH(r.target))return!1;let n=typeof r.context=="string"?r.context:void 0,o=up(r.data)?r.data:void 0,i=typeof r.caseID=="string"?r.caseID:void 0,s=typeof r.assignmentID=="string"?r.assignmentID:void 0,a=gH(n);e(t);let c=t.type===Ze?a:gH(n),l=i??ty(o)??ty(c),u=s??xi(o)??xi(c);if(!n||!l||!u)return!0;let p={actionInContext:n,assignmentID:u,caseKey:l};return pme(t.type,n,a,p),!0},Sme=(t,e)=>{if(hH(e.target))return;let{context:r,data:n,resourceType:o,caseID:i}=e;if(t===Et)return mme(r,n,o);if(t===kt)return fme(r,n,o);if(t===Ze&&i){gme(r,i);return}if(t===et&&i)return hme(r,n,o,i)},Eme=()=>t=>e=>{if(!ume(e)||!ame.has(e.type)){t(e);return}let{type:r,payload:n}=e;if(yme(e,t))return;let o;cme(n)&&(o=Sme(r,lme(n))),t(e),o&&$m(o)},SH=Eme;var EH=new Set([Po,Ui,eS,$k,ji,Y_]),Ame=new Set([Et,et,kt,Ze,J_,Bi,vn,mo,...EH]),Cme=(t,e)=>t===ji?e.saveActionPayload?.containerItemID:t===Y_?e.saveContainerItemID??e.context:e.containerItemID??e.context,Ime=(t,e)=>{if(!l6(e))return!1;let r=e.containerItemID||t,n=e.target||te(r),o=We(n,r),i=e.resourceType||o?.resourceType,s=e.key||o?.key;return i===d.RESOURCE_TYPES.ASSIGNMENT&&!!s},_me=(t,e,r)=>{t===Et||t===et||t===kt&&e.data?(Es(r)&&EI(r),t===et&&HD(r),Ime(r,e)&&d6(r,{containerName:e.containerName??""})):t===Ze&&(Es(r)&&EI(r),HD(r))},bme=(t,e)=>{if(t!==Ze||!e.includes(d.MODAL))return;let r=xo(e),n=`${r}/`;for(let o of m6())(o===r||o.startsWith(n))&&g6(o)},Tme=(t,e)=>{if(e.context){if(t===vn){JS(e.context,null),Yd(e.context);return}t===mo&&!e?.isDefault&&!e?.skipDirtyValidation&&Yd(e.context)}},vme=(t,e,r)=>{if(t===J_){e.autosave||AI(r);return}if(t===Bi){f6(r);return}EH.has(t)&&AI(r)},Rme=t=>typeof t=="object"&&t!==null,Pme=()=>t=>e=>{if(e&&typeof e=="object"&&"type"in e&&"payload"in e&&typeof e.type=="string"&&Ame.has(e.type)&&Rme(e.payload)){let{type:r,payload:n}=e,o=Cme(r,n);o&&(bme(r,o),_me(r,n,o),Es(o)&&(Tme(r,n),vme(r,n,o)))}t(e)},AH=Pme;var CH=bV(),Nme=t=>{if(we()!==null){ys();return}let e=[I6.propertyChangeMiddleware,aH,uH,fH,CH,SH,AH,mH,pH],r=W9({reducer:hB(t),middleware:n=>n({serializableCheck:!1,thunk:!1}).concat(e),enhancers:n=>n().prepend(f0).concat(f0)});CH.run(sH),xw(r)},Al=Nme;var Ome=["ar","arc","ckb","dv","fa","ha","he","khw","ks","ps","ur","yi"],Z0=t=>Ome.includes(t.split("-")[0])?"rtl":"ltr";async function xme(t){if(!t)return;let e=v.getLocale();v.setLocale(t);let r=v.getLocale();if(!(!r||r===e)){if(_I(["lang"]),typeof window<"u"){let n=new URL(window.location.href);n.searchParams.set("lang",r),window.history.replaceState(window.history.state,"",n.toString())}v.isInfinityRuntime()&&await gs.loadLocaleBundle([r]),await Xd(r),typeof document<"u"&&(document.documentElement.lang=r,document.documentElement.dir=Z0(r)),T({type:nu,payload:{locale:r}}),$.publish(d.PUB_SUB_EVENTS.EVENT_LOCALE_CHANGED,{locale:r,previousLocale:e})}}var IH=xme;var Dme=t=>typeof t!="object"||t===null||Array.isArray(t)?!1:Object.values(t).every(e=>typeof e=="string"),Q0=class{#e(e,r,n,o,i){let s=!1;return e.IncludeInURL&&r!==void 0&&(o[e.Key]=r,e.Key==="portal"&&r!==n&&(s=!0)),Array.isArray(e.IncludeInHeaders)&&r!==void 0&&e.IncludeInHeaders.forEach(a=>{i[a.Value]||(i[a.Value]=[]),i[a.Value].push(`${e.Key}=${r}`)}),s}#t(e,r,n){let o={},i={},s=!1;return Array.isArray(e)&&e.forEach(a=>{let c=r[a.Key];this.#e(a,c,n,o,i)&&(s=!0)}),{urlParams:o,headerMap:i,isPortalChanged:s}}#r(e){let r=pt.getComponentCache("lastActionID"),n=Oc.truncateNamespace(e),o=Oc.truncateNamespace(typeof r=="string"?r:(r??"").toString());return n===o}#n({message:e}){let{RequestContext:r,ActionName:n}=e;if(!this.#r(n))return;let o=JSON.parse(r);if(!Dme(o))throw new TypeError("RequestContext must be a JSON object with string values.");let i=o,s=v.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);pt.setURLParams(l),$.publish(d.PUB_SUB_EVENTS.EVENT_REQUEST_CONTEXT_CHANGED,i),Object.entries(u).forEach(([m,f])=>{let S=Ge.getRegisteredHeaders()[m]?.split(";").map(C=>C.trim())||[],A=new Map;[...S,...f].forEach(C=>{let _=C.indexOf("=");_!==-1&&A.set(C.slice(0,_),C)}),Ge.registerHeader(m,[...A.values()].join("; "))}),pt.setComponentCache("lastActionID",""),p&&globalThis.location&&globalThis.location.reload()}subscribeToGlobalEvents(){let e=g.generateUniqueID(),n={matcher:"SWITCH_REQUEST_CONTEXT",criteria:{UserID:v.getOperatorIdentifier()||""}};Tt.subscribe(n,this.#n.bind(this),void 0,e)}},_H=new Q0;var bH="displaySaveAssignmentBrowserNotification",X0=!1,TH=t=>{X0||($.subscribe(d.PUB_SUB_EVENTS.CASE_EVENTS.SAVE_ASSIGNMENT_COMPLETE,e=>{t("Save Assignment",e)},bH),X0=!0)},vH=()=>{$.unsubscribe(d.PUB_SUB_EVENTS.CASE_EVENTS.SAVE_ASSIGNMENT_COMPLETE,bH),X0=!1};var ry=()=>{if(!(typeof globalThis>"u"))return globalThis.Notification},e$=()=>{let t=v?.environmentInfoObject;return t?.features?.pyEnableBrowserNotifications===!0||t?.pyFeatures?.pyEnableBrowserNotifications===!0},wme=()=>typeof document>"u"?"visible":document.visibilityState,I_=()=>typeof window<"u"&&typeof document<"u",RH=t=>{if(!t||typeof window>"u")return!1;try{return new URL(t,window.location.origin).origin===window.location.origin}catch{return!1}},t$=!1,bs={initialize(){!I_()||t$||!e$()||(TH(bs.notifyFromEvent),t$=!0,ry()?.permission==="default"&&bs.requestPermission().catch(()=>{}))},destroy(){vH(),t$=!1},async requestPermission(){if(!I_()||!e$())return"denied";let t=ry();if(!t)return"denied";if(t.permission!=="default")return t.permission;let e=t.requestPermission(),r=await Promise.resolve(e);try{Object.defineProperty(t,"permission",{configurable:!0,value:r})}catch{}return r},canShowNativeNotifications(){if(!I_()||!e$())return!1;let t=ry();return!!(t&&t.permission==="granted")},notify(t){if(!I_()||!bs.canShowNativeNotifications()||t.notifyWhenVisible===!1&&wme()==="visible")return null;let e=ry();if(!e)return null;let r=t.href??(t.caseTypeID&&(t.caseId||t.caseID)?Eu.getSemanticURLForToaster(t.caseTypeID,t.caseId??t.caseID??"",void 0,void 0,void 0,t.businessID):void 0),n=RH(r)?r:void 0,o=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??o,a=new e(o,{body:i,tag:s,icon:t.icon,silent:t.silent,requireInteraction:t.requireInteraction,data:{...t.data,href:n}});return a.addEventListener("click",()=>{bs.openNotificationTarget(n),a.close()}),a},async showNotification(t){let e=ry();return e?.permission==="granted"?bs.notify(t):e?.permission==="denied"||await bs.requestPermission()!=="granted"?null:bs.notify(t)},openNotificationTarget(t){RH(t)&&(window.focus(),window.location.assign(t))},notifyFromEvent(t,e){let r={...e,title:e.title??t,body:e.assignmentID?`Assignment ${e.assignmentID} has been saved.`:e.body};bs.showNotification(r).catch(()=>{})}},__=bs;var $me=()=>{$.publish(d.PUB_SUB_EVENTS.BOOTSTRAP_SHELL_EVENTS.CONSTELLATION_LOADED,{})},PH={publishConstellationLoadedEvent:$me};var r$=class{activateContainerItemOnSwitch(e){let r=`${d.APP.APP}/${d.PRIMARY}`,n=wt(r,e),o={target:r,containerItemID:n};ct({}).getPConnect().getContainerManager().activateContainerItem(o)}removeContainerItemOnClose(e){let r=`${d.APP.APP}/${d.PRIMARY}`,n=wt(r,e),o={target:r,containerItemID:n};ct({}).getPConnect().getContainerManager().removeContainerItem(o)}showCasePreview(e,r){let o=ct({meta:{type:"PreviewViewContainer",config:{name:d.PREVIEW}},options:{context:d.APP.APP,target:"root/hybrid_preview"}});o.getPConnect().getContainerManager().resetContainers({name:d.PRIMARY,context:d.APP.APP}),Rh(d.APP.APP,d.PREVIEW)||o.getPConnect().getContainerManager().initializeContainers({type:"multiple",name:d.PREVIEW}),o.getPConnect().getActionsApi().showCasePreview(e,{caseClassName:r})}closeCasePreview(){ct({}).getPConnect().getContainerManager().resetContainers({name:d.PREVIEW,context:d.APP.APP})}isFormDirty(e){let r=`${d.APP.APP}/${d.PRIMARY}`,n=rw(r,e);return nn.isStateModified(n)}getEventUtils(){return PH}getBroadcastUtils(){return rp}isTraditionalUICase(e){return Dn(e)}},ny=new r$;var n$=class{static openCase(e,r=E.APP.APP,n={}){return n.renderInline=!0,n.pageName?(v.setDefaultCasePage(P.getDefaultQualifiedName(n.pageName)),n.pageName=P.getDefaultQualifiedName(n.pageName)):(v.setDefaultCasePage(P.getDefaultQualifiedName(d.PY_DETAILS)),n.pageName=P.getDefaultQualifiedName(d.PY_DETAILS)),n?.disableAssignmentHeader?v.disableAssignmentHeader(n.disableAssignmentHeader):v.disableAssignmentHeader(!1),gn.openCase(e,r,d.PRIMARY,n)}static createCase(e,r=E.APP.APP,n={}){return n.renderInline=!0,n.pageName?(v.setDefaultCasePage(P.getDefaultQualifiedName(n.pageName)),n.pageName=P.getDefaultQualifiedName(n.pageName)):(v.setDefaultCasePage(P.getDefaultQualifiedName(d.PY_DETAILS)),n.pageName=P.getDefaultQualifiedName(d.PY_DETAILS)),n?.disableAssignmentHeader?v.disableAssignmentHeader(n.disableAssignmentHeader):v.disableAssignmentHeader(!1),gn.createCase(e,r,d.PRIMARY,n)}static getNextWork(e=E.APP.APP,r={}){return r.renderInline=!0,r.pageName?(v.setDefaultCasePage(P.getDefaultQualifiedName(r.pageName)),r.pageName=P.getDefaultQualifiedName(r.pageName)):(v.setDefaultCasePage(P.getDefaultQualifiedName(d.PY_DETAILS)),r.pageName=P.getDefaultQualifiedName(d.PY_DETAILS)),r?.disableAssignmentHeader?v.disableAssignmentHeader(r.disableAssignmentHeader):v.disableAssignmentHeader(!1),gn.getNextWork(e,d.PRIMARY,r)}static openAssignment(e,r=E.APP.APP,n={}){return n.renderInline=!0,n.pageName?(v.setDefaultCasePage(P.getDefaultQualifiedName(n.pageName)),n.pageName=P.getDefaultQualifiedName(n.pageName)):(v.setDefaultCasePage(P.getDefaultQualifiedName(d.PY_DETAILS)),n.pageName=P.getDefaultQualifiedName(d.PY_DETAILS)),n?.disableAssignmentHeader?v.disableAssignmentHeader(n.disableAssignmentHeader):v.disableAssignmentHeader(!1),gn.openAssignment(e,r,d.PRIMARY,n)}static openPage(e,r,n=E.APP.APP,o={}){let i=Nr;o?.defaultCasePage?(v.setDefaultCasePage(P.getDefaultQualifiedName(o.defaultCasePage)),o.defaultCasePage=P.getDefaultQualifiedName(o.defaultCasePage)):v.setDefaultCasePage(P.getDefaultQualifiedName(d.PY_DETAILS)),o?.disableAssignmentHeader?v.disableAssignmentHeader(o.disableAssignmentHeader):v.disableAssignmentHeader(!1);let s={viewName:e,className:r,acTargetName:d.PRIMARY,actionMgrID:w.getNextActionMgrId(),context:n},{promise:a}=w.actionManagerPromise(i,s.actionMgrID);return T({type:i,payload:{...s}}),a}static getCurrentContextAPI(e,r=E.APP.APP){let n={meta:{config:{}},options:{context:r,pageReference:e,containerName:d.PRIMARY}};return ct(n).getPConnect()}},b_=n$;var v_={};Wt(v_,{buildResizeMessage:()=>NH,mashup:()=>T_});function Mme(){try{let{ancestorOrigins:t}=globalThis.location;if(t&&t.length>0)return t[0]??""}catch{}return""}function o$(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 NH(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 i$=class{gadgetName="";resize=!1;parentOrigin="";boundOnMessage=this.onMessage.bind(this);init(e){if(typeof globalThis.location>"u"||typeof globalThis.document>"u")return;let{resizing:r,parentOrigin:n}=e;this.gadgetName=globalThis.window.name,this.resize=r==="stretch",this.parentOrigin="",n?this.parentOrigin=o$(n):globalThis.document.referrer?this.parentOrigin=o$(globalThis.document.referrer):this.parentOrigin=o$(Mme());let o=globalThis.document.getElementsByTagName("app-root")[0];o&&(o.classList.add("mashup"),globalThis.window.parent!==globalThis.window&&this.resize&&this._registerResizeObserver(o))}send(e){if(typeof globalThis.window>"u"||typeof globalThis.location>"u")return;let{action:r,message:n}=e,o=JSON.stringify({gadgetName:this.gadgetName,action:r,message:n});globalThis.window.parent.postMessage(o,this.parentOrigin||globalThis.location.origin)}_registerResizeObserver(e){if(typeof globalThis.ResizeObserver!="function")return;new globalThis.ResizeObserver(n=>{for(let o of n){let i=NH(o);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 r;try{r=JSON.parse(e.data)}catch{return!1}return r.action==="UpdateUrl"&&this._updateUrl(r.message.url),!0}getMessageHandler(){return this.boundOnMessage}},T_=new i$;typeof window<"u"&&window.addEventListener("message",T_.getMessageHandler(),!1);var OH={type:"RootContainer",config:{renderingMode:"noPortal"},children:[{type:"ViewContainer",config:{routingInfo:"@ROUTING_INFO",name:"primary"}}]},kme={type:"RootContainer",config:{renderingMode:"hybrid"},children:[{type:"HybridViewContainer",config:{routingInfo:"@ROUTING_INFO",name:"primary",contextName:"app"},children:[]}]},Lme="app-root.mashup > .case-view, app-root.mashup > .page-view { min-height: 0px !important; }",xH="portal-less-styles",s$=class{createC11nEnv=e=>ct(e);getContextUtils=()=>au;getRoutingManager=()=>Ys;getComponentsRegistry=()=>Zs;getStateManager=()=>Ee;getActionCreators=()=>rt;getStreamObservable=()=>QS;getActionProcessor=()=>ze;getActionHandler=()=>DI;renderApp=(e,r)=>{let n={context:d.APP.APP},i={...g.getIn(e,d.ROOT),options:n};Al(e),Yi(e,n,!0);let s=this.createC11nEnv({meta:i,isRoot:!0});$.publish(E.PUB_SUB_EVENTS.EVENT_RENDER_APP,{props:s,domContainerID:r})};updateStoreWithUiRoot=async(e,r,n)=>{let{data:o,uiResources:i={}}=e,{root:s}=i,a=g.getIn(i,d.CONTEXT_DATA),c=Le(e);await Pe(c,{},{},!1,!0);let l={...o,[d.CONTEXT_DATA]:a};YD(s,r,l,n)};fetchEndPointResource=(e,r,n)=>{M(e,{method:"GET"},d.APP.ROOT).then(o=>{o.status===200&&this.updateStoreWithUiRoot(o.data,r,n)})};loadComponent=async(e,r,n)=>{await go(n);let o=this.createC11nEnv({meta:e,isRoot:!0});we()||Al({}),$.publish(E.PUB_SUB_EVENTS.EVENT_RENDER_APP,{props:o,domContainerID:r})};setStaticServerUrl=(e,r,n)=>{Be.initServer(e,r,n)};loadView=async(e,r,n=[])=>{gt.init();let o=Le(e),i=g.getIn(o,d.VIEWS),s=g.getIn(o,d.NAVIGATIONS),a=g.getIn(o,d.COMPONENTS)||[];a.push(...n);let c=g.getIn(o,d.STATIC_SERVER_URL),l=g.getIn(o,d.APPLICATION_DATA);i&&_w(i),s&&bw(s),h9(l),c&&Be.initServer(c),await go(a,c),this.renderApp(o,r)};initAppShell=(e,r,n)=>{Hh(e),Bt.buildActionTargetMap(r),gt.init(n)};initRoutingTable=(e,r)=>{Hh(e,!0),gt.init(r)};setAppAlias=e=>{Be.setAppAlias(e)};getHomeRestApi=e=>{let r=gt.getServerURL(),{restApi:n}=Nc("home",{portalName:e});return`${r}${n}`};getViewRestApi=(e,r)=>{let{restApi:n}=p9(e,r);return gt.getServerURL()+n};loadRootComponent=async(e,r,n=[],o,i,s)=>{let{config:a}=r||{},c=a?.name;if(we()||Al({}),s){let h=`${d.APP.ROOT}/${c}`;QD(h),CI().deleteContainerItem(h)}(CI().getContainerItems()||[]).length>1&&!c?.startsWith("hybrid_")&&c!=="authoring-preview"&&ys(),T(Re({data:{},context:d.APP.ROOT}));let u=this.createC11nEnv({meta:r,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",...n];await go(f),$.publish(E.PUB_SUB_EVENTS.EVENT_RENDER_APP,{props:u,domContainerID:e,componentName:"RootContainer",portalTarget:o,styleSheetTarget:i})};loadViewByName=(e,r,n,o)=>{let i=this.getViewRestApi(e,n);i===gt.getServerURL()&&(i=this.getHomeRestApi(r)),this.fetchEndPointResource(i,o)};loadPortalView=(e,r)=>{let o=this.getHomeRestApi(e);Cl.loadRuntimeDataPages(),this.fetchEndPointResource(o,r,!0)};configureForBrowserBookmark=e=>{f9(e)};checkIfSemanticURL=()=>Bh();onPCoreReady=e=>{$.subscribe(E.PUB_SUB_EVENTS.EVENT_RENDER_APP,e,"renderAppCallback")};onPCoreCleanup=e=>{$.subscribe(E.PUB_SUB_EVENTS.EVENT_UNMOUNT_APP,e,"unmountAppCallback")};setFieldsDefaultConfigs=e=>{en.updateFieldDefaults(e)};setGoogleMapsAPIKey=e=>{gt.setGoogleMapsAPIKey(e)};setFetchDefaultHeaders=e=>{Jn(e)};setFetchAuthInfo=e=>{Ji(e)};getCaseApi=()=>gn;getMashupApi=()=>b_;enableAppRouting=e=>{$I(e)};initStore=()=>Al({});getBootstrapConfig=async(e,r)=>{let n=`${r.token_type} ${r.access_token}`;return fetch(`${e}/api/application/v2/data_views/D_pxBootstrapConfig`,{method:"GET",headers:new Headers({Authorization:n})}).then(o=>o.json())};getBootstrapConfigViaSB=async(e,r,n)=>{let o=n?`?dataViewParameters=${encodeURIComponent(JSON.stringify({themeID:n}))}`:"",i=`${e}/api/application/v2/data_views/D_pxBootstrapConfig${o}`;return M(i,{method:"GET",headers:new Headers(r)}).then(s=>{if(s.data)return s.data;throw Error("D_pxBootstrapConfig load failed.",{cause:s.status})})};initCoreContainers=(e={})=>{let{containerType:r="single"}=e,n=ct({meta:OH,options:{context:"root",pageReference:"",target:"root"}});return n.getPConnect().getContainerManager().initializeContainers({type:r,name:"primary",context:"app"}),{props:{getPConnect:n.getPConnect}}};loadMashup=async(e,r=!0)=>{if(r){let o=(document.querySelector(e)??document.getElementsByTagName(e)[0])?.parentNode;if(o&&!document.getElementById(xH)){let i=document.createElement("style");i.id=xH,i.textContent=Lme,o.appendChild(i)}}await this.loadRootComponent(e,OH,[d.LOAD_VIEW_STRING,"ViewContainer"]),globalThis.parent!==globalThis&&T_.init({resizing:"stretch"})};bootstrapWithAuthHeader=async(e,r,n=[],o,i)=>{let{customRendering:s=!1,onPCoreReadyCallback:a,staticContentServerUrl:c,dynamicSetCookie:l=!1,renderingMode:u,locale:p,envType:m,themeID:f,customCookies:h=!1,enableRouting:S}=e,{restServerUrl:A,authInfo:C,authorizationHeader:_,appAlias:I,theme:N={}}=e,x=e.additionalHeaders?{...e.additionalHeaders}:{},H=e.extras?.defaultPortalName;H&&(x={...x,"X-Pega-Portal-Name":H});let G=null,ne=!_&&C&&!C.authType;if(C||(e.authInfo={},C=e.authInfo),(_&&Object.keys(C).length===0||h&&!ne&&!C.authType)&&(C.authType="custom"),C.customCookies=h,!_&&C.tokenInfo?.access_token){let{tokenInfo:he}=C;_=`${he.token_type} ${he.access_token}`}if(C.tokenInfo?.csrf&&(x={...x,pzCTkn:C.tokenInfo.csrf}),I&&I.indexOf("/")===-1&&(I=`app/${I}`),m==="LAUNCHPAD"){x={...x,"X-Constellation-App":"Pega"},A=A.endsWith("/dx")?A:`${A}/dx`;let he=f?`?themeID=${f}`:"";globalThis.PCore&&(G=await this.getLPConfig(`${A}/api/application/v2/environmentInfo${he}`,_,x,h)),Object.keys(N).length===0&&G?.theme?.definition&&(N=JSON.parse(G.theme.definition).Theme)}else ne?G=await this.preInitBootstrapConfig(e,I,x,f):G=await this.getBootstrapConfigExtended(I?`${A}/${I}`:`${A}`,_,x,f,h,p);let j=G?.pyConfigJSON?JSON.parse(G.pyConfigJSON):{...G};m==="LAUNCHPAD"&&await this.applyEnvironmentInfoResponse(j),j.restServerConfig=A,j.dynamicSemanticUrl=!1,j.dynamicSetCookie=l,j.enableRouting=!1,j.serviceConfig?Object.assign(j.serviceConfig,{contextPath:"",appAlias:I}):j.serviceConfig={contextPath:"",appAlias:I,staticContentServer:c,appStaticContentServer:"no-appstatic"},j.additionalHeaders={Authorization:_,...x},j.envType=m,j.dynamicLoadComponents=!s,j.dynamicSemanticUrl=!s,j.noHistory=!0,j.theme=N??{};let oe=f&&j?.themeObject?j.themeObject:null;j.theme=oe||N,j.renderingMode=u??j.renderingMode,j.locale=p||j.locale,e.semanticUrlArgs&&(j.semanticUrlArgs=e.semanticUrlArgs);let Ie=c||j.serviceConfig.staticContentServer;if(j.isSdk?(j.enableRouting=S,j.dynamicSemanticUrl=j.enableRouting,j.environmentInfo||(j.environmentInfo={}),j.environmentInfo.pyExecutionRuntimeName=E.APP.SDK_RUNTIME,Be.initServer(c,"no-appstatic")):(j.serviceConfig.staticContentServer=Ie,j.serviceConfig.appStaticContentServer=j.serviceConfig.appStaticContentServer||"no-appstatic",Be.initServer(Ie,Ie)),j.renderingMode==="EMBED"&&C?.authentication_service&&C.authentication_service!=="pega"&&(j.routingInfo||(j.routingInfo={}),j.routingInfo.authServiceAlias=C.authentication_service),await Cl.initCoreConfig(j),a&&$.subscribe(E.PUB_SUB_EVENTS.EVENT_RENDER_APP,a,"renderAppCallback"),j.envType==="LAUNCHPAD"&&j.renderingMode==="EMBED"&&v.setIsWebEmbed(!0),C&&["OAuth2.0","custom"].includes(C?.authType)&&this.setFetchAuthInfo(C),!s){let he=v.environmentInfoObject?.pyInfinityStaticService,De=null;if(he){let Ye=await Zt.getDataAsync("D_pxGetComponentLibraryListAndMap","",{});Array.isArray(Ye.data)&&Ye.data.length>0&&(De=Ye.data)}let Fe=async(Ye,Oe)=>{try{let ft=async()=>{await this.importReactRoot(),Ye(!0)};$.subscribe("component-map-loaded",ft),"ReactRoot"in Zs.getLazyMap()&&Ye(!0)}catch(ft){Oe(ft)}};await new Promise(Fe),Cl.initCoreContainers(),await this.loadRootContainerWithHybrid(r,n,o,i),De&&await Promise.all(De.map(({pyComponentMap:Ye,pxUpdateDateTime:Oe})=>Be.importCustomComponentMap(Ye,Oe)))}};loadRootContainerWithHybrid=(e,r=[],n,o)=>(r.push(d.CONTAINER_TYPE?.HYBRID||"HybridViewContainer",d.LOAD_VIEW_STRING),this.loadRootComponent(e,kme,r,n,o));getBootstrapConfigExtended=async(e,r,n,o,i,s)=>{let a={};o&&(a.themeID=o),s&&(a.locale=s);let c=o||s?`?dataViewParameters=${encodeURIComponent(JSON.stringify(a))}`:"",l=`${e}/api/application/v2/data_views/D_pxBootstrapConfig${c}`,u=r?{Authorization:r,...n}:n;return fetch(l,{method:"GET",headers:new Headers(u),credentials:r&&!i?"same-origin":"include"}).then(p=>{if(p.ok)return p.json();throw Error("D_pxBootstrapConfig load failed.",{cause:p.status})})};getLPConfig=async(e,r,n,o)=>{let i=new Headers({...n,...r&&{Authorization:r}}),s=await fetch(e,{method:"GET",headers:i,credentials:r&&!o?"same-origin":"include"});if(!s.ok)throw new Error("environmentInfo load failed.",{cause:s.status});return s.json()};applyEnvironmentInfoResponse=async e=>{let{environmentInfo:r,pyCaseTypeList:n,theme:o,keyMapping:i}=e,{pxApplication:s,features:a,pxLocale:c}=r,l={simpleTable:{pageInstructionUUIDGeneration:!1},...a},u=Intl.DateTimeFormat().resolvedOptions().timeZone.toUpperCase(),p=u==="ETC/UNKNOWN"?"America/New_York":u;e.environmentInfo={...r,pxApplication:{...s},features:l,pyCaseTypeList:n,pxLocale:{...c,pyTimeZone:p}},e.timezone=p;let m=Object.keys(e.environmentInfo);return{isEnvInfoValid:["pxOperator","pxLocale","pxApplication"].every(S=>m.includes(S)),theme:o,keyMapping:i,features:l}};importReactRoot=async()=>{let e=[];return Zs.getComponent("ReactRoot").modules.forEach(r=>{e.push(r())}),Promise.allSettled(e)};preInitBootstrapConfig=async(e,r,n,o)=>{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:h={}}=e,S=o??null,A={restServerUrl:i,restServerConfig:i,dynamicSetCookie:c,enableRouting:!1,serviceConfig:{contextPath:"",appAlias:r,staticContentServer:a,appStaticContentServer:"no-appstatic"},additionalHeaders:{...n},envType:f,dynamicLoadComponents:!s,dynamicSemanticUrl:!s,noHistory:!0,themeIDObj:S,theme:S||h,renderingMode:u,locale:p,timezone:m,tokens:{C11NB2S:""}};return Be.initServer(a,"no-appstatic"),await Cl.init(A),l&&["OAuth2.0","custom"].includes(l?.authType)&&this.setFetchAuthInfo(l),this.getBootstrapConfigViaSB(r?`${i}/${r}`:`${i}`,n,o)}},Wr=new s$;var a$=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}},DH=a$;var c$=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;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 DH(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.requestContext=e.requestContext,this.pzencv1zzz=e.pzencv1zzz}},wH=c$;var l$="@P .viewConfig",Ume="@ROUTING_INFO",$H="runtimeEnvironmentInfo",dp=0,u$=class{#e=[];async init(e){let r=new wH(e);this.#t(),$I(r.enableRouting),Al({}),en.updateFieldDefaults(r.fieldDefaults),en.setFieldDefault("Percentage","storePercentageAsDecimal",r.storePercentageAsDecimal),this.#o(r.routingInfo,r.actionModel,{server:r.restServerConfig,reAuthUrl:r.serviceConfig.reAuthUrl});let{appAliasWithoutServlet:n,appAlias:o,googleMapKey:i,staticContentServer:s,appStaticContentServer:a}=r.serviceConfig;Be.setAppAlias(n||o),gt.setGoogleMapsAPIKey(i),Be.initServer(s,a,r.tokens.C11NB2S),ae.setRemoteCaseMapping(r.remoteCaseMapping),_s.init(r.collab),_s.subscribeToCaseEvents(),Oc.subscribeToCaseEvents(),Tt.subscribeToCaseEvents(),Tt.setConnectionConfig({messagingService:r.serviceConfig.messagingService}),r.initBroadcast&&ny.getBroadcastUtils().init();let c=this.#a(r.renderingMode);r.additionalHeaders=r.additionalHeaders||{},r.additionalHeaders[d.X_ORIGIN_CHANNEL]??=c,Ge.setDefaultHeaders(r.additionalHeaders),Ge.setRequestContext(r.requestContext),r.envType==="Infinity"&&await this.loadEnvironmentInfoFromDataPage(r);let l={...r.environmentInfo,isAnonymousUser:r.isAnonymousUser===!0,encCSRFToken:r.pzencv1zzz,renderingMode:r.renderingMode,...r.portalTemplate?{pyPortalTemplate:r.portalTemplate}:{}};l.pyCaseTypeList?.forEach(m=>{let f=m.pyWorkTypeImplementationClassName;f&&(m.localeReference=Ri(Cn.CASE,f))}),this.#c(r,l.features?.isNamespaceEnabled),this.configureTheme(r.theme),v.setCookieComplianceMethod(r.cookieComplianceMethod),v.setIsExtraCallRequiredForDefaultHome(r.isExtraCallRequiredForDefaultHome),v.setEnablePriorityAndUrgencyImprovements(r.enablePriorityAndUrgencyImprovements),v.setEnvironmentInfo(l);let p=(new URLSearchParams(globalThis.location?.search??"").get("lang")||r.locale||globalThis.navigator?.language||"en-US").replace("_","-");v.setLocale(p),typeof document<"u"&&(document.documentElement.lang=p,document.documentElement.dir=Z0(p)),Or().setTimezone(r.timezone),pt.init(),r.envType!=="Infinity"&&_H.subscribeToGlobalEvents(),__.initialize(),r.initBroadcast&&ny.getBroadcastUtils().init(),await Xd()}configureTheme=e=>{if(e){let r=e.light,n=e.dark;r!==void 0&&n!==void 0?(this.#i(r),this.#i(n,{type:"dark"})):v.setTheme(e)}};getBootstrapConfig=async(e,r)=>{let n=`${r.token_type} ${r.access_token}`,o=`${e}/api/application/v2/data_views/${P.getDefaultQualifiedName("D_pxBootstrapConfig")}`;return(await fetch(o,{method:"GET",headers:new Headers({Authorization:n})})).json()};initCoreContainers=(e={})=>{let{containerType:r="single"}=e,o=ct({meta:{type:"RootContainer",config:{renderingMode:"noPortal"},children:[{type:"ViewContainer",config:{routingInfo:"@ROUTING_INFO",name:"primary"}}]},options:{context:"root",pageReference:"",target:"root"}});return o.getPConnect().getContainerManager().initializeContainers({type:r,name:"primary",context:"app"}),{props:{getPConnect:o.getPConnect}}};importReactRoot=async()=>{let e=[];return Wr.getComponentsRegistry().getComponent("ReactRoot")?.modules?.forEach(r=>{e.push(r())}),Promise.allSettled(e)};importDesignSystemComponentMap=async(e,r,n)=>{try{iV(e)}catch(i){console.error("Design system load blocked: untrusted or malformed URL",i);return}let o=(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 o(`${e}component/project/${r}/designsystems/${n}/componentsmap.js?v=${Date.now()}`)}catch(i){console.log(i)}};buildSemanticUrl=(e,r,n,o,i)=>{let s=new URLSearchParams(r),a=n==="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 S=(e.startsWith("/")?e.substring(1):e).split("/");l=S[0]||null,u=S[1]||null,S[2]==="assignments"&&S[3]&&(p=S[3])}let m=[o];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:r,serviceConfig:n,semanticUrl:o,queryParams:i,noPortal:s,noHistory:a,viewName:c,theme:l,restServerConfig:u,dynamicLoadComponents:p=!0,dynamicSemanticUrl:m=!0,renderingMode:f="FULL_PORTAL",envType:h,extras:S}=e,{appAlias:A,contextPath:C}=n,_=globalThis.location,I=_?.origin??"",N=u??I,x={};if(C&&(N+=C),A&&h!=="LAUNCHPAD"&&(N+=`/${A}`),e.restServerConfig=N,this.#s(),m===!0){let oe=this.buildSemanticUrl(o,i,s,N,c);!a&&oe&&typeof globalThis.history<"u"&&globalThis.history.replaceState({},"home",oe)}else if(f!=="HYBRID"){let oe=_?.href??"",Ie=oe.indexOf("?");Ie>0&&typeof globalThis.history<"u"&&globalThis.history.pushState({},"home",oe.substring(0,Ie)),x.dynamicSemanticUrl=!1}else console.log(`renderingMode :${f}`);p!==!0&&(x.dynamicLoadComponents=!1);let H=null;if(A){let oe=A.indexOf("/app/");H=oe>=0?A.substring(oe+1):A}if((x.dynamicSemanticUrl===!1||x.dynamicLoadComponents===!1)&&PCore.setBehaviorOverrides(x),e.appAlias=H,l)if(typeof l=="object")e.theme=l;else try{e.theme=JSON.parse(l)}catch{e.theme={}}let ne=_?`${_.protocol}//${_.host}`:r.domain;if(f==="EMBED")try{ne=new URL(e.restServerConfig).origin}catch{}let j={...r,domain:ne,searchParams:_?_.search:"",embedQueryParams:e.semanticUrlArgs};e.routingInfo=j,e.initBroadcast=v.environmentInfoObject?.pxMashupDetails?.pyIsTraditionalCoexistence==="true",e.noPortal&&(e.noPortal==="true"||e.noPortal===!0)&&(e.renderingMode="EMBED"),S?.cspNonce&&Reflect.set(globalThis,"__webpack_nonce__",S.cspNonce),v.setCaseLabelFirstInTitle(e.extras?.useDefaultBrowserTabTitle??!0),await this.init(e)};launchViewByName=async(e,r,n,o,i,s,a,c,l=[])=>{dp+=1;let u=c||`mashup${dp}`,p={type:"RootContainer",config:{viewConfig:l$,renderingMode:"view",name:u}};await Wr.loadRootComponent(e,p,i,s,a),await this.loadCustomComponentLibrariesIfEnabled(l),Wr.loadViewByName(r,n,o,u)};launchView=(e,r,n=[],o,i,s,a)=>{dp+=1;let c;a==="hybrid"?c=`hybrid_${dp}`:a?c=a:c=`mashup${dp}`;let l={type:"RootContainer",config:{viewConfig:l$,renderingMode:"portal",name:c}};a===d.HYBRID&&dl.setRuntimeParam(d.HYRBID_ROOT_CONTAINERNAME,c),dl.setRuntimeParams(o),Wr.loadRootComponent(e,l,n,i,s).then(()=>Wr.updateStoreWithUiRoot(r,c,!1))};launchPortal=async(e,r,n=`portal${dp+=1}`,o=[],i=[])=>{let s="LoadingComponent",a={type:"RootContainer",config:{viewConfig:l$,renderingMode:"portal",skeleton:s,name:n}},c=[...o,s];v.isPortalLoaded=!0;try{return await Wr.loadRootComponent(e,a,c),await this.loadCustomComponentLibrariesIfEnabled(i),Wr.loadPortalView(r,n)}catch(l){throw console.error(`Failed to launch portal ${r}:`,l),l}};launchMashup=(e,r=!0,n=[])=>{let o={type:"RootContainer",config:{renderingMode:"noPortal"},children:[{type:"ViewContainer",config:{routingInfoAnnotation:Ume,name:"primary"}}]};if(r&&!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 Wr.loadRootComponent(e,o,[d.LOAD_VIEW_STRING,"ViewContainer"]),await this.loadCustomComponentLibrariesIfEnabled(n)))();let s=Reflect.get(globalThis,"parent"),a=Reflect.get(globalThis,"window");s&&s!==a&&import(`${Be.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 r=e.environmentInfo.pyDataPages,n=({pyLoadOnlyInRuntime:o})=>o===!0||o==="true";this.#e=r.filter(n),this.#r(r.filter(o=>!n(o))),this.#e.length>0&&$.subscribe(d.PUB_SUB_EVENTS.EVENT_POST_ACTION,({actionType:o})=>{(o===zs||o===uo||o===No)&&this.loadRuntimeDataPages()},$H)}};loadRuntimeDataPages=()=>{if(v.getRenderingMode()==="PREVIEW")return;let e=this.#e;this.#t(),this.#r(e)};#t(){this.#e=[],$.unsubscribe(d.PUB_SUB_EVENTS.EVENT_POST_ACTION,$H)}#r(e){e.length!==0&&setTimeout(()=>{this.loadDataPagesIntoEnvironmentInfo(e).catch(r=>{console.error("Error loading data pages into environment info:",r)})},d.PRIORITY.TRIVIAL)}loadDataPagesIntoEnvironmentInfo=async e=>{if(!e?.length)return;let r=v.environmentInfoObject;if(!r)return;let n=e.filter(({pyName:a,pyPath:c})=>!a||!c?(console.warn("Invalid data page configuration: missing pyName or pyPath"),!1):!0);if(n.length===0)return;let o=await Promise.allSettled(n.map(async({pyName:a,pyPath:c})=>{try{let l=await Zt.getPageDataAsync(a,"",{});return{pyPath:c,response:l}}catch(l){return console.error(`Failed to load data page ${a}:`,l),null}})),i=o.length,s=!1;for(let a=0;a<i;a+=1){let c=o[a];if(c.status==="fulfilled"&&c.value){let{pyPath:l,response:u}=c.value;this.setNestedProperty(r,l,u),s=!0}}s&&v.setEnvironmentInfo(r)};#n(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)&&Object.getPrototypeOf(e)===Object.prototype}setNestedProperty(e,r,n){let o=r.startsWith(".")?r.slice(1):r;if(!o){typeof n=="object"&&n!==null&&Object.assign(e,n);return}let i=o.split("."),s=i.length,a=e;for(let c=0;c<s-1;c+=1){let l=i[c],u=a[l];if(this.#n(u))a=u;else{let p={};a[l]=p,a=p}}a[i[s-1]]=n}start=async(e,r)=>{let n=e.extras?.defaultPortalName;n&&(e.additionalHeaders={...e.additionalHeaders||{},"X-Pega-Portal-Name":n});let{serviceConfig:{appStaticContentServer:o},ccV2LibId:i,environmentId:s,isAlternateDesignSystemEnabled:a,alternateDesignSystemName:c}=e;await this.initCoreConfig(e);let l=v.environmentInfoObject?.pyC11nDXCBDevURL,u=a==="true"&&c!=="other",p=async()=>{await this.importReactRoot();let S=[];l?S.push(Be.importCustomComponentMap("")):i&&S.push(Be.importCustomComponentMap(i)),u&&S.push(this.importDesignSystemComponentMap(o,s,c)),S.length&&await Promise.all(S),r?.()},m=Wr.getComponentsRegistry();return"ReactRoot"in m.getLazyMap()?!0:m.getComponent("ReactRoot")?(await p(),!0):new Promise(S=>{let A=async()=>{await p(),$.unsubscribe("component-map-loaded","component-map-loaded-id"),S(!0)};$.subscribeOnce("component-map-loaded",A,"component-map-loaded-id")})};registerForDebugInfo=e=>{if(v.setPreviewMode(),!e)return;let r=({debugInfo:n})=>{let o=n?.["X-Pega-App-Debug-ID"];o&&e.postMessage({appDebugID:o})};$.subscribe("fetchSuccess",r,"fetchSuccess"),$.subscribe("fetchFailure",r,"fetchFailure")};toggleTracerHeaders=e=>{e.addEventListener("message",r=>{r?.data?.enableTracer?Tr.enableTracer():Tr.disableTracer()})};loadEnvironmentInfo=async e=>{let r=Reflect.get(globalThis,"pms"),n=typeof r=="object"&&r!==null?Reflect.get(r,"device"):void 0,o=typeof n=="object"&&n!==null&&Reflect.get(n,"systemName")==="Android";if(e.theme&&!o)try{let i=JSON.parse(e.theme.definition),s=i.Branding,a=i.Theme;v.setBrandingInfo(s),v.setTheme(a)}catch{v.setBrandingInfo({}),v.setTheme({})}if(e.darkTheme&&!o){let i={type:"dark"};try{let s=JSON.parse(e.darkTheme.definition);v.setBrandingInfo(s.Branding,i),v.setTheme(s.Theme,i)}catch{v.setBrandingInfo({},i),v.setTheme(void 0,i)}}e.keyMapping&&v.setKeyMapping(e.keyMapping),v.setCookieComplianceMethod(e.cookieComplianceMethod??"none")};async loadCustomComponentLibrariesIfEnabled(e){e?.length>0&&(v.environmentInfoObject?.pyInfinityStaticService||yt())&&await this.loadCustomComponentLibraries(e)}async loadCustomComponentLibraries(e){let r=e.map(n=>this.importSingleCustomComponent(n));await Promise.all(r)}importSingleCustomComponent(e){return typeof e=="object"&&"pyComponentMap"in e?Be.importCustomComponentMap(e.pyComponentMap,e.pxUpdateDateTime):Be.importCustomComponentMap(e)}#o(e,r,n){Hh(e),Bt.buildActionTargetMap(r),gt.init(n)}#s(){document.querySelectorAll('head link[rel~="icon"], head link[rel~="apple-touch-icon"]').forEach(r=>{r.setAttribute("href",r.href)})}#i(e,r){if(e===null)return;if(typeof e=="object"){v.setTheme(e,r);return}let n;try{n=JSON.parse(e)}catch{v.setTheme(r?.type==="dark"?void 0:{},r);return}v.setTheme(n,r)}#a(e){return e===d.EMBED?d.X_ORIGIN_CHANNEL_EMBEDDED_BROWSER:d.X_ORIGIN_CHANNEL_BROWSER}#c(e,r){r&&(e.additionalHeaders.Prefer="namespaced",Ge.setDefaultHeaders(e.additionalHeaders))}},jme=new u$,Cl=jme;var zme="createViewRuleByID",Fme="getViewRuleByID",Vme="updateViewRuleByID",Bme="deleteViewRuleByID",Hme="getCalculatedFieldsInViewByID",Gme=(t,e)=>{let{restApi:r,reqType:n}=U(zme);return M(r,{method:n,body:t},e).then(o=>o.data)},qme=(t,e)=>{let{restApi:r,reqType:n}=U(Fme,{ID:t});return M(r,{method:n},e).then(o=>o.data)},Wme=(t,e,r)=>{let{restApi:n,reqType:o}=U(Vme,{ID:t});return M(n,{method:o,body:e},r).then(i=>i.data)},Kme=(t,e)=>{let{restApi:r,reqType:n}=U(Bme,{ID:t});return M(r,{method:n},e).then(o=>o.data)},Jme=(t,e,r)=>{let{restApi:n,reqType:o}=U(Hme,{caseID:t,viewID:e});return M(n,{method:o,body:{calculations:{fields:r}}}).then(i=>i.data)},MH={createViewRule:Gme,getViewRule:qme,updateViewRule:Wme,deleteViewRule:Kme,getCalculatedFields:Jme};var Yme="addCaseFollower",Zme="deleteCaseFollower",Qme="getCaseFollowers",Xme={"Content-Type":"application/json"},efe=(t,e,r)=>{let n={caseID:t},o=JSON.stringify({users:e.map(i=>({ID:i}))});return ve(Yme,{body:o,queryPayload:n,headers:Xme},r)},tfe=(t,e,r)=>ve(Zme,{queryPayload:{caseID:t,followerID:e}},r),rfe=(t,e)=>ve(Qme,{queryPayload:{caseID:t}},e).then(n=>n.data.followers),kH={addCaseFollower:efe,deleteCaseFollower:tfe,getCaseFollowers:rfe};var nfe="addRelatedCases",ofe="removeRelatedCase",ife="getRelatedCases",sfe=(t,e,r)=>{let n={caseID:t},o=JSON.stringify({cases:e});return ve(nfe,{body:o,queryPayload:n},r)},afe=(t,e,r)=>ve(ofe,{queryPayload:{caseID:t,relatedCaseID:e}},r),cfe=(t,e)=>ve(ife,{queryPayload:{caseID:t}},e).then(n=>n.data.relatedCases),LH={addRelatedCases:sfe,removeRelatedCase:afe,getRelatedCases:cfe};var d$="operatorDetails",lfe="operatorDetailsByBusinessID",ufe=(t,e=!1)=>{let{reqType:r}=U(d$,{});if(r==="GET"){let n={encodedOperatorId:encodeURIComponent(`{"opname":"${t}"}`)};return ve(d$,{queryPayload:n})}return e?ve(lfe,{body:{dataViewParameters:{BusinessID:t}}}):ve(d$,{body:{dataViewParameters:{ID:t}}})},UH={getOperatorDetails:ufe};var jH="postCustomFeedMessages",dfe="postFeedMessages",pfe="deleteFeedMessage",mfe="getFeedMessages",ffe="likeFeedMessages",gfe="unlikeFeedMessages",hfe="getMentionSuggestions",yfe="getTagSuggestions",Sfe="getFeedMessageLikes",Efe="editFeedMessage",Afe="getMentionTypes",Cfe="getViewRuleByMessageType",Ife="refreshCustomPostTypeView",pp={"Content-Type":"application/json"},p$=class{mentionsTagsCancelTokenSource;mentions;constructor(){this.mentionsTagsCancelTokenSource=[],this.mentions=[]}getFeeds=(e,r,n,o,i,s,a)=>{let c=s.getLocalizationService();a||(this.mentions=[]);let l="";o&&Array.isArray(o)&&o?.length>0&&(o.forEach(f=>{f.on&&(l=`${l}${f.id},`)}),l===""&&(l="ClearFilters"));let u="";a&&(u=s.getValue("pulse.pageLastEntry"));let p={filterForContext:r==="pyDataFeed"?encodeURIComponent(e):e,feedID:r,feedClass:n,filterBy:l,pageSize:10,olderThan:u};for(let f=0;f<i.length;f+=1)i[f].cancel();let m=Ci();return i.push(m),ve(mfe,{queryPayload:p,cancelTokenSource:m},s.getContextName()).then(async f=>{if(f.status===200&&f.data){i.pop();let h=[],S={},A=!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 _=f.data.data.FeedList?.pxResults;Array.isArray(_)&&_?.length>0&&_.forEach((I,N)=>{I.ID=I.pzInsKey!==""?I.pzInsKey:`message${N}`,h.push(I.ID),S[I.ID]=I,I?.mentions&&Array.isArray(I?.mentions)&&I.mentions?.length>0&&this.mentions.push(I.mentions),I?.pxResults&&Array.isArray(I?.pxResults)&&I.pxResults?.length>0&&I.pxResults.forEach(x=>{x?.mentions&&Array.isArray(x?.mentions)&&x.mentions?.length>0&&this.mentions.push(...x.mentions)}),!A&&!["pzPostDetails","pzPrivatePostDetails"].includes(I.pyMessageViewReference)&&(A=!0)})}if(A&&await cI({uiResources:f.data.uiResources}),!o&&(o=[{id:"All",label:c.getLocalizedText("All"),on:!0,disabled:!1}],f?.data?.data?.FeedFilters)){let _=f.data.data.FeedFilters?.pxResults,I=!0;if(_&&Array.isArray(_)&&_?.length>0){_.forEach(x=>{let H={id:x.pyFeedSourceReference,label:c.getLocalizedText(x.pyLabel),disabled:!1,on:x.pySelected==="true"};H.on||(I=!1),o.push(H)});let N=o.find(x=>x.id==="All");N&&(N.on=I)}}}if(a&&s.getValue("pulse.messageIDs")){let _=s.getValue("pulse.messages");_={..._,...S},Object.values(_).forEach(I=>{I?.mentions&&Array.isArray(I?.mentions)&&I.mentions?.length>0&&this.mentions.push(I.mentions),I?.pxResults&&Array.isArray(I?.pxResults)&&I.pxResults?.length>0&&I.pxResults.forEach(N=>{N?.mentions&&Array.isArray(N?.mentions)&&N.mentions?.length>0&&this.mentions.push(...N.mentions)})})}if(JD(s.getContextName())){s.updateState({pulse:{messages:a&&s.getValue("pulse.messageIDs")?{...s.getValue("pulse.messages"),...S}:S,messageIDs:a&&s.getValue("pulse.messageIDs")?[...s.getValue("pulse.messageIDs"),...h]:h,nextPageFirstEntry:f?.data?.nextPageFirstEntry||"",pageLastEntry:f?.data?.pageLastEntry||"",postTypes:C,pulseContext:e}});let _=[...new Map(this.mentions.flat()?.map(I=>[I.mentionsID,I])).values()].filter(I=>Object.hasOwn(I,"mentionsType")).filter(I=>!I?.mentionsType?.toLowerCase().includes("user"));return{feedFilters:o,caseMentions:_}}}else return s.reportError(`getFeeds call failed ${f.status}`,f.data),f}).catch(f=>{if(!bh(f))return s.reportError(": Error occurred during ajax call at getFeeds API : ",f.response),f.response})};postMessage=(e,r,n,o=[],i=!1,s=[])=>{let a={message:r,context:e,parentMessageId:i?e:"",attachments:o,pyRecipients:s.length?s:void 0},c=s.length===0?{body:JSON.stringify(a),headers:pp}:{body:JSON.stringify(a),queryPayload:{type:"PegaSocial-Post-Private"},headers:pp};return ve(s.length?jH:dfe,c,n.getContextName()).then(l=>{if((l.status===201||l.status===200)&&l.data){let u=l?.data;if(i){u.parentMessageID=e;let{pxResults:h,caseMentions:S}=this.buildMessageObject(u,i,n,o.length>0);return n.updateState({pulse:{messages:{[e]:{pxResults:h}}}}),S}let{messages:p,messageIDs:m,caseMentions:f}=this.buildMessageObject(u,i,n,o.length>0);return n.updateState({pulse:{messages:p,messageIDs:m}}),f}return n.reportError(`postMessage call failed with status ${l.status}`,l),""}).catch(l=>{throw n.reportError(": Error occurred during ajax call at postMessage API : ",l.response),l.response})};postCustomMessage=(e,r,n)=>ve(jH,{body:r,queryPayload:{type:e},headers:pp},n.getContextName()).then(async i=>{if(i.status===201&&i.data){let s=i.data.data,a={ID:s.ID,pzInsKey:s.ID,classID:s.classID,pyPostType:s.pyPostType,postedByUser:s.postedByUser,pyIsDeleteEnabled:s.pyIsDeleteEnabled,pyMessageViewReference:s.messageViewReference,pyFeed:{pyIconType:"user",pyCommentContext:s.pyCommentContext,pyPostedOn:s.postedTime,pyFeedTitle:s.postedByUser.name,pyIconReference:s.postedByUser.ID},...s.PostMessage};Dh(s.messageViewReference,n,r.context)||await cI({uiResources:i.data.uiResources}),n.updateState({pulse:{messages:{[a.ID]:a,...n.getValue("pulse.messages")},messageIDs:[a.ID,...n.getValue("pulse.messageIDs")]}})}return n.reportError(`postCustomMessage call failed with status ${i.status}`,i),""}).catch(i=>{throw n.reportError(": Error occurred during ajax call at postCustomMessage API : ",i.response),i.response});editMessage=({messageID:e,parentMessageID:r,message:n,pConnectObj:o,isReply:i=!1,recipients:s=[]})=>{let a=JSON.stringify({message:n,...s.length&&{pyRecipients:s}});return ve(Efe,{queryPayload:{messageID:e},body:a,headers:pp},o.getContextName()).then(l=>{if(l?.status===200&&l?.data){let u=l?.data;if(i){u.parentMessageID=r;let{pxResults:f,caseMentions:h}=this.buildMessageObject(u,i,o,!1);return o.updateState({pulse:{messages:{[r]:{pxResults:f}}}}),h}let{messages:p,caseMentions:m}=this.buildMessageObject(u,i,o,!1);return o.updateState({pulse:{messages:p}}),m}return o.reportError(`editMessage call failed with status ${l.status}`,l),""}).catch(l=>{throw o.reportError(": Error occurred during ajax call at editMessage API : ",l.response),l.response})};buildMessageObject=(e,r,n,o=!1)=>{let i={ID:e?.ID||"",classID:e?.classID||"PegaSocial-Message",tags:e?.tags||[],pyHasAttachment:o,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=n.getValue("pulse.messages");if(r){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=n.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 r=e?.filter(n=>n?.mentions&&Array.isArray(n?.mentions)&&n.mentions?.length>0)?.map(n=>n.mentions)?.concat(this.mentions);return[...new Map(r.flat()?.map(n=>[n.mentionsID,n])).values()].filter(n=>Object.hasOwn(n,"mentionsType")).filter(n=>!n?.mentionsType?.toLowerCase().includes("user"))};likeMessage=({pulseContext:e,likedBy:r,messageID:n,isReply:o,pConnectObj:i})=>{let s=r?gfe:ffe,a=JSON.stringify({ContextClass:e});ve(s,{body:a,queryPayload:{pulseContext:e},headers:pp},i.getContextName()).then(l=>{if(l.status===200)if(o){let u=i.getValue(`pulse.messages.${n}`),p=u?.pxResults&&Array.isArray(u?.pxResults)&&u.pxResults?.length>0&&u.pxResults?.map(m=>{if(m={...m},m.pzInsKey===e){let f=0,h=!1,S=m.pyLikes?m?.pyLikes?.pxLikeCount:0;r?(f=S-1,h=!1):(f=S+1,h=!0),m.pyLikes={pxLikeCount:f,pxIsLiked:h}}return m});i.updateState({pulse:{messages:{[n]:{pxResults:p}}}})}else{let u={...i.getValue(`pulse.messages.${n}`)},p=u.pyLikes?u.pyLikes.pxLikeCount:0,m=0,f=!1;r?(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,r,n,o)=>{let i=e;r&&(i=n),ve(pfe,{queryPayload:{messageID:i}},o.getContextName()).then(a=>{if(a.status===200)if(r){let c=o.getValue(`pulse.messages.${e}`),l=c?.pxResults&&Array.isArray(c?.pxResults)&&c.pxResults?.length>0&&c.pxResults?.filter(u=>u.pzInsKey!==n);o.updateState({pulse:{messages:{[e]:{pxResults:l}}}})}else{let c=o.getValue("pulse.messageIDs"),l=c&&Array.isArray(c)&&c?.length>0&&c?.filter(p=>p!==e),u={...o.getValue("pulse.messages")};delete u[e],o.updateState({pulse:{messageIDs:l,messages:u}})}else o.reportError(`deleteMessage call failed with status ${a.status}`,a)}).catch(a=>{o.reportError(": Error occurred during ajax call at deleteMessage API : ",a.response)})};getLikedUsers=(e,r)=>ve(Sfe,{queryPayload:{messageID:e}},r.getContextName());getMentionSuggestions=(e,r)=>{let{pulseContext:n,searchFor:o,mentionsType:i,listSize:s=5}=e,a={pulseContext:n,searchFor:o,mentionsType:i,listSize:s};for(let l=0;l<this.mentionsTagsCancelTokenSource.length;l+=1)this.mentionsTagsCancelTokenSource[l].cancel();let c=Ci();return this.mentionsTagsCancelTokenSource.push(c),ve(hfe,{queryPayload:a,cancelTokenSource:c},r.getContextName()).then(l=>(this.mentionsTagsCancelTokenSource=[],l.status===200&&l.data?l?.data:(r.reportError(`Get mention suggestions call failed ${l.status}`,l.data),[]))).catch(l=>{bh(l)||r.reportError(": Error occurred during ajax call at getMentionSuggestions API : ",l.response.data)})};getMentionTypes=e=>ve(Afe,{},e.getContextName());getPostTypeView=(e,r,n)=>ve(Cfe,{queryPayload:{type:e,contextID:n??""}},r.getContextName());refreshCustomPostTypeView=(e,r,n,o)=>ve(Ife,{body:r,queryPayload:{type:e,contextID:o??""},headers:pp},n.getContextName());getTagSuggestions=(e,r)=>{let{searchFor:n,listSize:o=5}=e,i={searchFor:n,listSize:o};for(let a=0;a<this.mentionsTagsCancelTokenSource.length;a+=1)this.mentionsTagsCancelTokenSource[a].cancel();let s=Ci();return this.mentionsTagsCancelTokenSource.push(s),ve(yfe,{queryPayload:i,cancelTokenSource:s},r.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}`):r.reportError(`Get tag suggestions call failed ${a.status}`,a.data),c}).catch(a=>{bh(a)||r.reportError(": Error occurred during ajax call at getTagSuggestions API : ",a.response.data)})}},zH=new p$;var _fe="addTagsToCase",bfe="deleteCaseTag",Tfe="getCaseTags",vfe=(t,e)=>{let r={caseID:t,viewID:P.getDefaultQualifiedName("pyTaggedCases")};return ve("loadView",{queryPayload:r},e.getContextName()).then(n=>n?.data).catch(n=>{e.reportError(": Error occurred during ajax call at fetchTaggedcases API : ",n.response)})},Rfe=(t,e)=>ve(Tfe,{queryPayload:{caseID:t}},e.getContextName()).then(n=>n?.data?.tagsList).catch(n=>{e.reportError(": Error occurred during ajax call at fetchTags API : ",n.response)}),Pfe=(t,e,r)=>{let n={caseID:t},o=JSON.stringify({tags:e});return ve(_fe,{body:o,queryPayload:n},r.getContextName()).then(i=>i?.data?.results).catch(i=>{r.reportError(": Error occurred during ajax call at postTags API : ",i.response)})},Nfe=(t,e,r)=>ve(bfe,{queryPayload:{caseID:t,tagID:e}},r.getContextName()).catch(o=>{r.reportError(": Error occurred during ajax call at removeTag API : ",o.response)}),Ofe=t=>{let e=P.getDefaultQualifiedName("D_pxGetTagsLandingPageURL");return Zt.getPageDataAsync(e,t.getContextName(),{},{invalidateCache:!0}).catch(r=>{t.reportError(": Error occurred during ajax call getTagsLandingPageURL API : ",r.response)})},FH={getTaggedCases:vfe,getTags:Rfe,postTags:Pfe,removeTag:Nfe,getTagsLandingPageURL:Ofe};var R_=(t,e)=>{XD(e.getContextName(),t.etag),ew(e.getContextName(),t.etag)};var xfe="getAllParticipants",Dfe="getParticipantRoles",wfe="getParticipantRoleView",$fe="getParticipant",Mfe="createParticipant",kfe="updateParticipant",Lfe="deleteParticipant",Ufe=(t,e)=>ve(xfe,{queryPayload:{caseID:t}},e.getContextName()).then(n=>n?.data?.data.content.pyParticipants).catch(n=>{e.reportError(": Error occurred during ajax call at getParticipants API : ",n.response)}),jfe=(t,e)=>ve(Dfe,{queryPayload:{caseID:t}},e.getContextName()).then(n=>n?.data?.participant_roles).catch(n=>{e.reportError(": Error occurred during ajax call at getParticipantRoles API : ",n.response)}),zfe=(t,e,r)=>ve($fe,{queryPayload:{caseID:t,participantID:e}},r.getContextName()).then(o=>o?.data).catch(o=>{r.reportError(": Error occurred during ajax call at getParticipant API : ",o.response)}),Ffe=async(t,e,r,n,o)=>{let i={caseID:t},s={...r,participantRoleID:e},a={"if-match":n.getCaseSummary().headers.etag};return new Promise((c,l)=>{ve(Mfe,{body:s,queryPayload:i,headers:a},n.getContextName()).then(u=>{R_(u.headers,n),c()}).catch(u=>{u.response.data.errorDetails?.forEach(m=>{m.erroneousInputOutputFieldInPage=m.erroneousInputOutputFieldInPage.replace(/\.pyWorkParty\([^)]*\)/,"")});let p=$c(o||n.getContextName());n.reportError(": Error occurred during ajax call at createParticipant API : ",{...u.response.data,formFields:p},o),l(u.response)})})},Vfe=async(t,e,r,n,o)=>{let i={caseID:t,participantID:e},s={"if-match":n.getCaseSummary().headers.etag};return new Promise((a,c)=>{ve(kfe,{body:r,queryPayload:i,headers:s},n.getContextName()).then(l=>{R_(l.headers,n),a()}).catch(l=>{l.response.data.errorDetails?.forEach(p=>{p.erroneousInputOutputFieldInPage=p.erroneousInputOutputFieldInPage.replace(/\.pyWorkParty\([^)]*\)/,"")});let u=$c(o||n.getContextName());n.reportError(": Error occurred during ajax call at updateParticipant API : ",{...l.response.data,formFields:u},o),c(l.response)})})},Bfe=(t,e,r)=>{let n={caseID:t,participantID:e},o={"if-match":r.getCaseSummary().headers.etag};return new Promise((i,s)=>{ve(Lfe,{queryPayload:n,headers:o},r.getContextName()).then(a=>{R_(a.headers,r),i()}).catch(a=>{r.reportError(": Error occurred during ajax call at deleteParticipant API : ",a.response),s(a.response)})})},Hfe=(t,e,r)=>ve(wfe,{queryPayload:{caseID:t,participant_roleID:e}},r.getContextName()).then(o=>o?.data).catch(o=>{r.reportError(": Error occurred during ajax call at fetchTaggedcases API : ",o.response)}),VH={getParticipants:Ufe,getRoleView:Hfe,getParticipantRoles:jfe,getParticipant:zfe,createParticipant:Ffe,updateParticipant:Vfe,deleteParticipant:Bfe};var Gfe="createListPersonalization",qfe="deleteListPersonalization",Wfe="updateListPersonalization",Kfe="getUIListPersonalizations",P_=()=>na("getDataFromSRS");function m$(t=[]){return t.reduce((e,r)=>(e[r.personalizationID]={name:r.name,personalizationState:JSON.parse(r.personalizationState||"{}")},e),{})}var f$="create",g$="update",HH="delete";function oy(t,e,r,n){let o=OI(e);if(o){switch(t){case f$:case g$:{let{markAsDefault:i,...s}=n;Object.entries(s).length>0&&(o.allPersonalizations[r]=s),i&&(o.defaultPersonalization=r);break}case HH:{delete o.allPersonalizations[r],o.defaultPersonalization===r&&(o.defaultPersonalization="");break}default:return null}return o}return null}function BH(t){return typeof t=="object"&&t!==null}function Jfe(t){if(!BH(t))return null;let e=t[P.getDefaultQualifiedName("ID")];if(typeof e!="string"||!e)return null;let r=t[P.getDefaultQualifiedName("PersonalizationState")],n=typeof r=="string"?r:JSON.stringify(r);try{let i=JSON.parse(n);if(!BH(i)||Array.isArray(i))return null}catch{return null}let o=t[P.getDefaultQualifiedName("Name")];return{personalization:{personalizationID:e,name:typeof o=="string"?o:"",personalizationState:n},isDefault:!!t[P.getDefaultQualifiedName("MarkAsDefault")]}}async function GH(t){let e=v.getOperatorIdentifier(),n=(await Zt.getDataAsync(P.getDefaultQualifiedName("InsightPersonalizationListByOperatorAndInsight"),void 0,{InsightID:t,UserID:e})).data;return(Array.isArray(n)?n:[]).reduce((i,s)=>{let a=Jfe(s);return a&&i.push(a),i},[])}async function Yfe(t){let e=await GH(t),r="",n=[];for(let o of e)o.isDefault&&(r=o.personalization.personalizationID),n.push(o.personalization);return{defaultPersonalization:r,allPersonalizations:n}}var Wa={};async function Zfe(t,e,r){let n=P.getDefaultQualifiedName("InsightPersonalization"),i=(await ve("createWork",{body:{caseTypeID:n,content:{[P.getDefaultQualifiedName("InsightID")]:t,[P.getDefaultQualifiedName("Name")]:r.name??"",[P.getDefaultQualifiedName("MarkAsDefault")]:r.markAsDefault??!1,[P.getDefaultQualifiedName("PersonalizationState")]:JSON.stringify(r.personalizationState)},processID:P.getDefaultQualifiedName("pyStartCase")},queryPayload:{viewType:"none",caseClassName:n}})).data?.ID??e;return Wa[e]=i,i}async function qH(t,e){let r=P.getDefaultQualifiedName("Edit"),{restApi:n,reqType:o}=U("caseWideActions",{caseID:t,actionID:r}),s=(await M(`${n}?viewType=form`,{method:o}))?.headers?.etag;if(!s)throw new Error(`Missing etag for personalization case ${t}`);let a={};e.markAsDefault!==void 0&&(a[P.getDefaultQualifiedName("MarkAsDefault")]=e.markAsDefault),e.name!==void 0&&(a[P.getDefaultQualifiedName("Name")]=e.name),e.personalizationState!==void 0&&(a[P.getDefaultQualifiedName("PersonalizationState")]=JSON.stringify(e.personalizationState));let{restApi:c,reqType:l}=U("executeCaseWideActions",{caseID:t,actionID:r});await M(`${c}?viewType=form`,{method:l,headers:{"if-match":s},body:{content:a,pageInstructions:[]}})}async function WH(t,e){await(await GH(t)).filter(({isDefault:o,personalization:i})=>o&&i.personalizationID!==e).reduce((o,{personalization:i})=>o.then(()=>qH(i.personalizationID,{markAsDefault:!1})),Promise.resolve())}async function Qfe(t){let e=P.getDefaultQualifiedName("MarkAsInactive"),{restApi:r,reqType:n}=U("caseWideActions",{caseID:t,actionID:e}),i=(await M(`${r}?viewType=form`,{method:n}))?.headers?.etag;if(!i)throw new Error(`Missing etag for personalization case ${t}`);let{restApi:s,reqType:a}=U("executeCaseWideActions",{caseID:t,actionID:e});await M(`${s}?viewType=form`,{method:a,headers:{"if-match":i},body:{content:{[P.getDefaultQualifiedName("ReasonForStatusUpdate")]:Or().getLocaleValue("Insight Personalization delete")},pageInstructions:[]}})}var Xfe=async t=>{if(P_()){let o=await Yfe(t);return Array.isArray(o.allPersonalizations)&&(o.allPersonalizations=m$(o.allPersonalizations)),o}let e=OI(t);if(e)return Array.isArray(e.allPersonalizations)&&(e.allPersonalizations=m$(e.allPersonalizations)),Promise.resolve(e);let{restApi:r,reqType:n}=U(Kfe,{listID:t});return M(r,{method:n,body:{}}).then(o=>{let{data:i}=o;return{allPersonalizations:m$(i.allPersonalizations),defaultPersonalization:i.defaultPersonalization}})},ege=async(t,e,r)=>{if(P_()){let i=await Zfe(t,e,r);return oy(f$,t,e,r),r.markAsDefault&&await WH(t,i),{data:i}}let{restApi:n,reqType:o}=U(Gfe,{listID:t});return oy(f$,t,e,r),M(n,{method:o,body:{...r,personalizationState:JSON.stringify(r.personalizationState)}}).then(i=>{let s=i.data;return Wa[e]=s,i})},tge=async(t,e,r)=>{let n=Wa[e]||e;if(P_()){await qH(n,r),oy(g$,t,e,r),r.markAsDefault&&await WH(t,n);return}oy(g$,t,e,r);let{restApi:o,reqType:i}=U(Wfe,{listID:t,personalizationID:n})||{};return M(o,{method:i,body:{...r,personalizationState:JSON.stringify(r.personalizationState)}})},rge=async(t,e)=>{let r=Wa[e]||e;if(oy(HH,t,e),P_()){await Qfe(r),Wa[e]&&delete Wa[e];return}let{restApi:n,reqType:o}=U(qfe,{listID:t,personalizationID:r});return M(n,{method:o,body:{}}).then(i=>(Wa[e]&&delete Wa[e],i))};function nge(t){return t?{createPersonalization:ege.bind(null,t),updatePersonalization:tge.bind(null,t),deletePersonalization:rge.bind(null,t),fetchPersonalizations:Xfe.bind(null,t)}:{createPersonalization:()=>Promise.resolve(""),updatePersonalization:()=>Promise.resolve(),deletePersonalization:()=>Promise.resolve(),fetchPersonalizations:()=>Promise.resolve({})}}var KH=nge;var wr=typeof window<"u"?window.sessionStorage:{getItem:()=>null,setItem:()=>{}},JH="getDataObjects",oge="getDataPageObjects",ige="getDataPages",sge="getListData",age="getInsightIDs",QH="getInsightByID",cge="getClassResources",lge="createInsight",uge="deleteInsight",dge="exportToExcel",pge="exportToCSV",mge="scheduleInsight",fge="updateScheduledInsight",gge="deleteScheduledInsight",hge="translateStrings",yge="updateInsight",Sge=["LocalList","RemoteList","PromptList","DataPage"],mp=null;function Ege(t=!0){if(mp)return mp;let e=ir.getAppCacheKey(oge);if(t&&wr.getItem(e))return Promise.resolve(JSON.parse(`${wr.getItem(e)}`));let r={datapageRequestType:"explorable"},{restApi:n,reqType:o}=U(ige,r);return mp=M(n,{method:o,datapageRequestType:"explorable"}),mp.then(i=>{mp=null,wr.setItem(e,JSON.stringify(i))}),mp}function Age(){let t=ir.getAppCacheKey(JH);if(wr.getItem(t))return Promise.resolve(JSON.parse(`${wr.getItem(t)}`));let{restApi:e,reqType:r}=U(JH,{}),n=M(e,{method:r});return n.then(o=>{wr.setItem(t,JSON.stringify(o))}),n}var YH=[],Cge=async t=>{let e=t.filter(i=>!YH.includes(i));if(e.length===0)return;let r={classIDs:t.join(",")},{restApi:n,reqType:o}=U(cge,r);return M(n,{method:o}).then(i=>{i.data.resources&&(YH.push(...e),ZS(i.data.resources))})};function Ige(t){let e=ir.getAppCacheKey(`DefaultColumns_${Object.values(t).join("_")}`);if(wr.getItem(e))return Promise.resolve(JSON.parse(`${wr.getItem(e)}`));let r={dataViewName:P.getDefaultQualifiedName("D_pzGetDefaultColumns")},{restApi:n,reqType:o}=U(sge,r),i=M(n,{method:o,body:{dataViewParameters:t}});return i.then(s=>{wr.setItem(e,JSON.stringify(s))}),i}function _ge(t){return"type"in t&&"classID"in t}function bge(t){let e=zr(t);if(e&&e.classID){let r=Rw(e.classID),n=e.rdFields,o=(n&&!Array.isArray(n)?n.fields:void 0)?.filter(i=>i.indexOf(".")>0);if(o&&!g.isEmpty(o)){let i=o.reduce((s,a)=>{let c=NI(a,e.classID);return c&&_ge(c)&&(s[a]=c),s},{});r={...r,...i}}if(r&&Object.keys(r).length>0){for(let i of Object.keys(r))r[i].type.startsWith("Page")?delete r[i]:r[i]?.datasource&&Sge.includes(r[i].datasource.tableType)&&(r[i].fieldType="Picklist");return{sourceFields:r,sourceMetadata:e}}}return{}}function Tge(t,e,r){if(!e){let i=zr(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 n=ir.getAppCacheKey(`RDColumns-${t}`);if(wr.getItem(n))return Promise.resolve(JSON.parse(`${wr.getItem(n)}`));let o=ir.getData(P.getDefaultQualifiedName("D_pxFieldsForDataSource"),{dataViewParameters:{DataPageName:t}},r);return o.then(i=>{wr.setItem(n,JSON.stringify(i))}),o}function vge(t="",e=""){let r=ir.getAppCacheKey(`PFColumns-${t}${e}`);if(wr.getItem(r))return Promise.resolve(JSON.parse(`${wr.getItem(r)}`));let n=ir.getData(P.getDefaultQualifiedName("D_pxGetInitialFieldsForDataSource"),{dataViewParameters:{DataPageName:t,ClassName:e}});return n.then(o=>{wr.setItem(r,JSON.stringify(o))}),n}var h$={},y$=t=>ir.getAppCacheKey(`PrimaryFields-${t}`),Rge=async(t,e,r,n,o)=>{let i=ir.getData(P.getDefaultQualifiedName("D_pxGetPrimaryFieldsForInsights"),{dataViewParameters:{...e&&{topLevelClassID:e},...n&&{joinedClassIDs:n.join(",")},...r&&{topLevelDataPageID:r}}},o).then(s=>{let a=s.data?.data||[],c={};t.forEach(l=>{c[l]=[]}),a.forEach(l=>{let u=l.classID,p=l[P.getDefaultQualifiedName("pyFieldName")];c[u].push(p)}),Object.entries(c).forEach(([l,u])=>{let p=y$(l);wr.setItem(p,JSON.stringify(u))})}).finally(()=>{t.forEach(s=>{delete h$[s]})});return t.forEach(s=>{h$[s]=i}),i};function Pge(t,e){let r=[],n=[],o=!1,i=[],s=[];return t&&s.push(t),e&&e.length>0&&s.push(...e),s.forEach(a=>{let c=y$(a);if(wr.getItem(c))return;let l=h$[a];if(l){n.push(l);return}r.push(a),a===t?o=!0:i.push(a)}),{allClasses:s,promisesToAwait:n,classesToFetch:r,isTopLevelClassPresent:o,joinedClassesToFetch:i}}async function Nge(t,e,r,n){let{allClasses:o,promisesToAwait:i,classesToFetch:s,isTopLevelClassPresent:a,joinedClassesToFetch:c}=Pge(t,r);return s.length&&i.push(Rge(s,a?t:void 0,a?e:void 0,c.length>0?c:void 0,n)),Promise.allSettled(i).then(()=>{let l={};return o.forEach(u=>{let p=y$(u);if(wr.getItem(p))try{l[u]=JSON.parse(`${wr.getItem(p)}`)}catch{}}),{data:l}})}function Oge(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 XH(t){return typeof t=="object"&&t!==null}function xge(t){return XH(t)&&typeof t.classID=="string"&&Array.isArray(t.fields)}function Dge(t){return{...t[1],fieldID:t[0],fieldType:t[1].fieldType||(t[1].isUserReference?"User reference":void 0),category:Oge(t),classID:t[1].associationClassID?t[1].associationClassID:t[1].classID}}function ZH({data:t}){let e=(i,s)=>Ri("FIELD",i,s),r=typeof t.classID=="string"?t.classID:"",n=Ri("CASE",r);t.classNameLocaleReference=n;let o=Array.isArray(t.fields)?t.fields:[];for(let i=0;i<o.length;i+=1){let s=o[i];if(XH(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=n)}Object.assign(s,a)}}return{data:t}}function wge(t,e,r){if(!e){let{sourceMetadata:o,sourceFields:i}=bge(t);if(o&&i&&Object.keys(i).length>0){let s={...o,fields:Object.entries(i).map(Dge)};if(xge(s)){let a=ZH({data:s});return Promise.resolve(a)}}}let n={dataSource:t,columns:[],parameters:{},associationFilter:r,matchPosition:"",ignoreCase:!1};return Io.init(n).then(({dataSourceMetaData:o})=>o?ZH({data:o}):{data:{classID:"",className:"",isQueryable:!1,fields:[]}})}function $ge(){let{restApi:t,reqType:e}=U(age);return M(t,{method:e})}function Mge(t){let e=vw(t);if(e)return Promise.resolve({data:{pyInsights:[e]}});let r={insightID:t},{restApi:n,reqType:o}=U(QH,r);return M(n,{method:o})}function kge(t){let e={insightID:t.join(",")},{restApi:r,reqType:n}=U(QH,e);return M(r,{method:n})}function Lge(t){let{restApi:e,reqType:r}=U(lge);return M(e,{method:r,body:JSON.stringify(t),headers:{"Content-Type":"application/json"}})}function Uge(t,e){let r={insightID:t},{restApi:n,reqType:o}=U(yge,r),i;return"UpdateDateTime"in e&&(i=e.UpdateDateTime),M(n,{method:o,body:JSON.stringify(e),headers:{"if-match":i,"Content-Type":"application/json"}})}function jge(t){let e={insightID:t},{restApi:r,reqType:n}=U(uge,e);return M(r,{method:n})}function zge(t){let{restApi:e,reqType:r}=U(dge);return M(e,{method:r,body:JSON.stringify(t)})}function Fge(t){let{restApi:e,reqType:r}=U(pge);return M(e,{method:r,body:JSON.stringify(t)})}var Vge=(t,e)=>{let r={insightID:t},{restApi:n,reqType:o}=U(mge,r);return M(n,{method:o,body:JSON.stringify(e)})},Bge=(t,e,r)=>{let n={insightID:t,scheduleID:e},{restApi:o,reqType:i}=U(fge,n);return M(o,{method:i,body:JSON.stringify(r)})},Hge=(t,e)=>{let r={insightID:t,scheduleID:e},{restApi:n,reqType:o}=U(gge,r);return M(n,{method:o})};function Gge(t){let{restApi:e,reqType:r}=U(hge);return M(e,{method:r,body:JSON.stringify(t)})}var eG={getDataObjects:Age,getDataPageObjects:Ege,getDataViewMetadata:wge,getDefaultColumns:Ige,getFieldsForDataSource:Tge,getPrimaryFieldsForDataSource:vge,getPrimaryFieldsForInsights:Nge,getInsightIDs:$ge,getInsightByID:Mge,getInsightsByID:kge,loadClassResources:Cge,createInsight:Lge,updateInsight:Uge,deleteInsight:jge,exportToExcel:zge,exportToCSV:Fge,scheduleInsight:Vge,updateScheduledInsight:Bge,deleteScheduledInsight:Hge,translateStrings:Gge};var S$=class{addRoutes=e=>g9(e)},tG=new S$;var E$=class{static registerModule(e,r,n){Object.assign(n,{[e]:()=>r})}},rG=E$;var A$=class{static getPostActionEvent=()=>E.PUB_SUB_EVENTS.EVENT_POST_ACTION;static getCaseEvent=()=>Object.freeze(E.PUB_SUB_EVENTS.CASE_EVENTS);static getDataEvent=()=>Object.freeze(E.PUB_SUB_EVENTS.DATA_EVENTS);static getTransientEvent=()=>Object.freeze(E.PUB_SUB_EVENTS.EVENT_TRANSIENT_ITEMS);static getBootstrapShellEvent=()=>Object.freeze(E.PUB_SUB_EVENTS.BOOTSTRAP_SHELL_EVENTS);static getBulkProcessEvent=()=>Object.freeze(E.PUB_SUB_EVENTS.EVENT_BULKACTION);static getLocalActionProcessEvent=()=>Object.freeze(E.PUB_SUB_EVENTS.EVENT_LOCALACTION_SUBMISSION)},nG=A$;var C$=class{genericFailedMessage;constructor(){this.genericFailedMessage="Failed to display content. Contact the application administrator."}getGenericFailedMessage(){return this.genericFailedMessage}setGenericFailedMessage(e){this.genericFailedMessage=e}},oG=new C$;var qge=t=>{Ji({tokenInfo:t}),t?.csrf&&!t?.access_token?Jn({pzCTkn:t?.csrf}):Jn({Authorization:`${t?.token_type} ${t?.access_token}`}),setTimeout(()=>$.publish("updateSession",{updateStatus:"success"}),0)},Wge=t=>GS.init(t),Kge=async()=>pU(),Jge=t=>{Jn({Authorization:t}),setTimeout(()=>$.publish("updateSession",{updateStatus:"success"}),0)},iG={setTokens:qge,revokeTokens:Kge,getAuthInstance:Wge,setAuthorizationHeader:Jge};var x$={};Wt(x$,{SDK_VERSION:()=>O$,compareSdkPCoreVersions:()=>xhe,createCustomEvent:()=>Whe,dateFormatInfoDefault:()=>mG,filterForFieldValueList:()=>jhe,getAllFields:()=>Uhe,getAutoFlexClass:()=>Hhe,getBooleanValue:()=>vhe,getCurrentTimezone:()=>Phe,getDateFormatInfo:()=>Nhe,getFilteredStages:()=>Vhe,getInitials:()=>Rhe,getInstructions:()=>zhe,getIsAssignmentView:()=>gG,getLocale:()=>fG,getOptionList:()=>khe,getReferenceList:()=>Ohe,getSDKAssignmentUtils:()=>Khe,getSDKCaseUtils:()=>Jhe,getSDKContainerUtils:()=>Yhe,getSDKDashboardUtils:()=>Zhe,getSdkVersion:()=>Dhe,getUniqueControlID:()=>bhe,getVBodyClass:()=>Bhe,handleEvent:()=>Lhe,initPConnectField:()=>Fhe,isLastStep:()=>Ghe,resetControlID:()=>The,resolveContext:()=>qhe,setVisibilityForList:()=>N$});var I$={};Wt(I$,{findCurrentIndices:()=>aG,flattenSteps:()=>sG,getAssignmentValidationMessages:()=>ehe,getRefreshProps:()=>cG,handleAssignmentButtonPress:()=>the,handleSaveActionSuccess:()=>lG,hasNavigation:()=>Yge,isVerticalNavigation:()=>Zge,parseActionButtons:()=>Xge,registerRefresh:()=>Qge});function sG(t,e=[]){for(let r of t)r.steps?sG(r.steps,e):e.push(r);return e}function aG(t,e,r){let n=0;for(let o of t)o.visited_status==="current"?(e[r]=n,o.step_status=""):o.visited_status==="success"?(n+=1,o.step_status="completed"):(n+=1,o.step_status=""),o.steps&&aG(o.steps,e,r+1);return e}function Yge(t){if(!t)return!1;let e=t.template?.toLowerCase()==="standard",r=t.steps?.length===1;return!e&&!r}function Zge(t){return t?.template?.toLowerCase()==="vertical"}function cG(t){return t?t.filter(e=>e.event==="Changes"&&e.field).map(e=>[e.field,e.field?.substring(1)??""]):[]}function Qge(t){let e=t.getCaseInfo().getActionRefreshConditions?.(),r=t.getContextName(),n=t.getPageReference();PCore.getRefreshManager().deRegisterForRefresh(r);let o=cG(e);if(o.length===0)return;let i=t.getCaseInfo().getKey(),s={autoDetectRefresh:!0,preserveClientChanges:!1},a=PCore.getRefreshManager();for(let c of o)a.registerForRefresh("PROP_CHANGE",t.getActionsApi().refreshCaseView.bind(t.getActionsApi(),i,"",n,{...s,refreshFor:c[0]}),`${n}.${c[1]}`,`${r}/${n}`,r)}function Xge(t){return{main:t?.main??[],secondary:t?.secondary??[]}}function ehe(t,e){try{return PCore.getMessageManager().getValidationErrorMessages(t,e)??[]}catch{return[]}}function lG(t,e,r){t.cancelAssignment(e,!1).then(()=>{PCore.getPubSubUtils().publish(PCore.getConstants().PUB_SUB_EVENTS.CASE_EVENTS.CREATE_STAGE_SAVED,r)})}function the(t){let{sAction:e,sButtonType:r,itemKey:n,isInModal:o,getPConnect:i,actionsApi:s,localizedVal:a,localeCategory:c,showToast:l}=t;if(r==="secondary")switch(e){case"navigateToStep":{s.navigateToStep("previous",n).then(()=>{}).catch(()=>{l(a("Navigation failed!",c))});break}case"saveAssignment":{let u=i(),p=u.getCaseInfo().getKey(),m=u.getCaseInfo().getAssignmentID();s.saveAssignment?.(n)?.then(()=>{let f=u.getCaseInfo().c11nEnv.getValue(PCore.getConstants().CASE_INFO.CASE_TYPE_ID);lG(s,n,{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(),h=m.getCaseInfo().isLocalAction()||!!(PCore.getConstants().CASE_INFO.IS_LOCAL_ACTION&&m.getValue(PCore.getConstants().CASE_INFO.IS_LOCAL_ACTION));f&&o&&!h?s.cancelCreateStageAssignment(n).then(S=>{p(u.EVENT_CANCEL,S)}).catch(()=>{l(a("Cancel failed!",c))}):s.cancelAssignment(n,!1).then(S=>{p(u.EVENT_CANCEL,S)}).catch(()=>{l(a("Cancel failed!",c))});break}case"rejectCase":{s.rejectCase?.(n)?.then(()=>{})?.catch(()=>{l(a("Rejection failed!",c))});break}default:break}else if(r==="primary")switch(e){case"finishAssignment":{s.finishAssignment(n).then(()=>{}).catch(()=>{l(a("Submit failed!",c))});break}case"approveCase":{s.approveCase?.(n)?.then(()=>{})?.catch(()=>{l(a("Approve failed!",c))});break}default:break}}var _$={};Wt(_$,{extractTabsInfo:()=>ohe,filterSummaryFields:()=>rhe,getChildRegionByName:()=>nhe,openCaseEditAction:()=>she,resolveCaseTypeIcon:()=>ihe});function rhe(t){let e=t().getRawMetadata(),r=e.children?.[0],n=e.children?.[1],o=r?.children??[],i=n?.children??[],s=o.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 nhe(t,e){for(let r of t){let n=r.props?.getPConnect?.();if(n){let o=n.getRawMetadata?.();if(o?.type?.toLowerCase()==="region"&&o?.name?.toLowerCase()===e.toLowerCase())return r}}return null}function ohe(t){let e=[],r=[],n=t?.props?.getPConnect?.()?.getChildren?.();return n?(n.forEach((o,i)=>{let s=o.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}),r.push({type:"DeferLoad",config:s}))}),{vertTabInfo:e,deferLoadInfo:r}):{vertTabInfo:e,deferLoadInfo:r}}function ihe(t,e){let r=t?t.replace("pi pi-",""):e;return!r||r.includes(".")?"polaris-solid":r}function she(t,e){let r=t.getActionsApi();r.openLocalAction.bind(r)(e.ID,{...e,containerName:"modal",type:"express"})}var v$={};Wt(v$,{addContainerItem:()=>lhe,addFlowContainerItem:()=>dhe,configureBrowserBookmark:()=>uhe,getActiveCaseActionName:()=>uG,getFirstCaseActionName:()=>yhe,getToDoAssignments:()=>hhe,getTodoVisibility:()=>T$,hasContainerItems:()=>phe,isCaseWideLocalAction:()=>b$,isContainerInitialized:()=>ahe,isRenderWithToDoWrapper:()=>She,setContainerLimit:()=>che,showBanner:()=>ghe});function ahe(t){let e=t.getContextName(),r=t.getContainerName();return PCore.getContainerUtils().isContainerInitialized(e,r)??!1}function che(t,e,r,n){let{CONTAINER_TYPE:o}=PCore.getConstants();if(r===o.MULTIPLE&&n){let i=t.getContextName();PCore.getContainerUtils().setContainerLimit(`${i}/${e}`,n)}}function lhe(t){let e=t.getContainerManager(),r=t.getContextName();e.addContainerItem({context:r,semanticURL:""})}function uhe(t){let e=p=>p,r=t.getContextName(),n=t.getContainerName(),o=PCore.getEnvironmentInfo(),{APP:i}=PCore.getConstants(),s=t.getValue(`pyPortal.${e("pyPrimaryNavPages")}`),a="",c="",l="",u=o?.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:r,containerName:n,acName:n,semanticURL:"",defaultViewLabel:l,ruleName:a,className:c})}catch{}}function dhe(t){let e=t.getContainerManager(),r=t.getContextName(),n=t.getValue("context_data.caseViewMode"),o,i;if(n!=="review"){let s=r.substring(0,r.lastIndexOf("_")),a=PCore.getContainerUtils().getActiveContainerItemName(s),c=PCore.getContainerUtils().getContainerItemData(s,a);c&&({key:o,flowName:i}=c)}e.addContainerItem({semanticURL:"",key:o,flowName:i,caseViewMode:"perform",resourceType:"ASSIGNMENT",data:t.getDataObject(r)})}function phe(t){let e=t.getContextName(),r=t.getContainerName();return!!PCore.getContainerUtils().hasContainerItems(`${e}/${r}`)}function fp(){return PCore.getConstants().CASE_INFO}function uG(t){let e=fp(),r=t.getValue(e.CASE_INFO_ACTIONS),n=t.getValue(e.ACTIVE_ACTION_ID);return r?.find(i=>i.ID===n)?.name??""}function b$(t){let e=fp(),r=t.getValue(e.ACTIVE_ACTION_ID),n=t.getValue(e.CASE_INFO_ACTIONS);return n&&r?n.find(i=>i.ID===r)?.type==="Case":!1}function dG(t){let e=fp(),r=t.getValue(e.CHILD_ASSIGNMENTS),n=[];if(r&&r.length>0){for(let{assignments:o,Name:i}of r)if(o)for(let s of o)n.push({...s,caseName:i})}return n}function mhe(t){return!!t.getValue("caseMessages")}function fhe(t){let e=fp(),r=t.getValue(e.D_CASE_ASSIGNMENTS_RESULTS),n=dG(t);return!!(r||n.length>0||b$(t))}function ghe(t){let e=t();return mhe(e)||!fhe(e)}function T$(t){return t.getValue("context_data.caseViewMode")!=="perform"}function hhe(t){let e=fp(),r=t.getValue(e.CASE_INFO_ACTIONS),n=t.getValue(e.ASSIGNMENT_LABEL),o=t.getValue(e.D_CASE_ASSIGNMENTS_RESULTS)??[],s=dG(t).map(c=>({...c,isChild:!0})),a=[...o,...s];if(r&&!T$(t)){let c=uG(t);return a.map(l=>({...l,name:c||n}))}return a}function yhe(t){let e=fp();return t.getValue(e.CASE_INFO_ACTIONS)?.[0]?.name??""}function She(t,e){let r=t(),{showWithToDo:n}=e;return!!(n&&(!b$(r)||T$(r)))}var R$={};Wt(R$,{combineFilters:()=>Ehe,convertDateToGMT:()=>Ahe,createFilter:()=>pG,getFilterExpression:()=>Ihe,getFormattedDate:()=>Che,getLayoutDataFromRegion:()=>_he});function pG(t,e,r="EQ"){return{condition:{lhs:{field:e},comparator:r,rhs:{value:t}}}}function Ehe(t,e){return t&&t.length?e?{AND:[e,...t]}:t.length>1?{AND:[...t]}:t[0]:e}function Ahe(t){let{valueAsISOString:e}=t;return e?e.substring(0,e.indexOf("T")):void 0}function Che(t){if(t)return`${t.getFullYear()}-${`0${t.getMonth()+1}`.slice(-2)}-${`0${t.getDate()}`.slice(-2)}`}function Ihe(t,e,r){if(t==="")return null;let n="EQ";return r.type==="TextInput"&&!r.isNumber&&(n="CONTAINS"),r.config.filterType==="RelativeDates"?"":pG(t,e,n)}function _he(t){let e={width:"full",fillAvailable:!0,minWidth:[300,"px"]};return t.props?.getPConnect()?.getChildren()?.map((r,n)=>{let o=r?.getPConnect();return{id:o?.getComponentName()?`${o.getComponentName()}--${n}`:`item--${n}`,content:o?.getComponent(),layoutConfig:{...e,...o?.getConfigProps().layoutConfig}}})}var O$="0.1.0",mG={dateFormatString:"MM/DD/YYYY",dateFormatStringLong:"MMM DD, YYYY",dateFormatStringLC:"mm/dd/yyyy",dateFormatMask:"__/__/____"},P$=0;function bhe(){return P$+=1,`control-${P$}`}function The(){P$=0}function vhe(t){if(typeof t=="string"){let e=t.toLowerCase();return e==="true"||e==="on"||e===""}return!!t}function Rhe(t){if(!t)return"";let e=t.charAt(0),r=t.lastIndexOf(" "),n=t.lastIndexOf(".");return r>0?e+=t.substring(r+1).charAt(0):n>0&&(e+=t.substring(n+1).charAt(0)),e.toUpperCase()}function fG(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 Phe(t){if(t)return t;let e=PCore.getLocaleUtils().getTimeZoneInUse?.();return e||Intl.DateTimeFormat().resolvedOptions().timeZone}function Nhe(){let t=PCore.getLocaleUtils(),e={...mG},r=fG(),n=new Date(Date.parse("30 November 2023 12:00:00 GMT")),o=new Intl.DateTimeFormat(r).format(n),i=o.indexOf("11"),s=o.indexOf("30"),a=o.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:o[i+2]},{loc:s,format:"DD",longFormat:"DD",placeholder:c?t.getLocaleValue("day_placeholder","CosmosFields"):"dd",mask:"__",separator:o[s+2]},{loc:a,format:"YYYY",longFormat:"YYYY",placeholder:c?t.getLocaleValue("year_placeholder","CosmosFields"):"yyyy",mask:"____",separator:o[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 Ohe(t){let e=t.getComponentConfig(),r=String(e.referenceList??"").replace("@P ","");if(r.includes("D_")){let n=t.resolveDatasourceReference?.(r);n!=null&&(typeof n=="object"&&"pxResults"in n?r=n.pxResults:typeof n=="string"&&n.startsWith("D_")&&!n.endsWith(".pxResults")&&(r=`${n}.pxResults`))}return r}function xhe(){console.warn(`Using Constellation version ${PCore.getPCoreVersion()}. SDK version: ${O$}. Ensure the Constellation version matches your Infinity server.`)}function Dhe(){return O$}function whe(t){if(typeof t=="string")return t;if(t)return String(t)}function $he(t){return typeof t.datasource=="object"&&Array.isArray(t.datasource)?t.datasource:[]}function Mhe(t,e){let r=t.datasource;if(typeof r=="string"&&e[r])return[];let n=t.listOutput;if(typeof r=="object"&&!Array.isArray(n)){let o=r.source;n=Array.isArray(o)?o:[]}return(n??[]).forEach(o=>{o.value=o.text??o.value}),n??[]}function khe(t,e={}){let r=t.listType;return r?r.toLowerCase()==="associated"?$he(t):r.toLowerCase()==="datapage"?Mhe(t,e):[]:[]}function Lhe(t,e,r,n){switch(e){case"change":t.updateFieldValue(r,n);break;case"blur":t.triggerFieldChange(r,n);break;case"changeNblur":t.updateFieldValue(r,n),t.triggerFieldChange(r,n);break;default:break}}function Uhe(t){let e=t.getRawMetadata()?.children;return Array.isArray(e)?e.map(r=>(Array.isArray(r.children)?r.children:[]).map(o=>o.config??{})):[]}function jhe(t){return t.filter(({visibility:e})=>e!==!1).map(({value:e,label:r})=>({id:(r??"").toLowerCase(),name:r??"",value:e}))}function gG(t){let e=String(t.getValue(E.CASE_INFO.CASE_INFO_CLASSID)??""),n=`${String(t.getValue(E.CASE_INFO.ASSIGNMENTACTION_ID)??"")}!${e}`,o=`${t.getCurrentView()}!${t.getCurrentClassID()}`;return n===o}function zhe(t,e="casestep"){let r=whe(t.getValue(E.CASE_INFO.INSTRUCTIONS)),n=gG(t);switch(e){case"casestep":return n&&r?.length?r:void 0;case"none":return;default:return e.startsWith("@PARAGRAPH")?void 0:e}}function N$(t,e){let{selectionMode:r,selectionList:n,renderMode:o,referenceList:i}=t.getComponentConfig(),s=E.LIST_SELECTION_MODE;(r===s.MULTI&&n||o==="Editable"&&i)&&t.getListActions()?.setVisibility(e)}function Fhe(t){if(t.isEditable()){let e=t.getActionsApi();e&&(t.setAction?.("onChange",r=>{e.changeHandler?.(t,r)}),t.setAction?.("onBlur",r=>{e.eventHandler?.(t,r)}))}return t.addFormField(),N$(t,!0),()=>{t.removeFormField?.(),N$(t,!1),t.removeNode()}}function Vhe(t){return Array.isArray(t)?t.filter(e=>e.type!=="Alternate"||e.type==="Alternate"&&e.visited_status==="active"):[]}function Bhe(t,e){let r="psdk-vertical-step-body";return t<e-1?`${r} psdk-vertical-step-line`:r}function Hhe(t,e){let r=e.length,n=e[r-1],o=e.findIndex(a=>a.ID===t?.ID),i=t.visited_status==="current",s=o===r-2&&n?.visited_status==="current";return i||s?"flex-auto":""}function Ghe(t,e){return t===e-1}function qhe(t){return t?t.replace(/\((\d+)\)/g,(e,r)=>`[${parseInt(r,10)-1}]`):null}function Whe(t,e){return typeof window<"u"?new CustomEvent(t,{detail:{additionalData:e}}):null}function Khe(){return I$}function Jhe(){return _$}function Yhe(){return v$}function Zhe(){return R$}var D$=class{getDebouncedSubject(e){return new Xs().pipe(Cm(e))}},hG=new D$;var Qhe=(()=>{let t="[!#-'*+/0-9=?A-Z\\^_`a-z{|}~\\-]+",e="\\\\[\\x00-\\x7f]",r=`"(?:[^\\r"\\\\\\x80-\\xff]|${e})*"`,n=`\\[(?:[^\\r\\[\\]\\\\\\x80-\\xff]|${e})*\\]`,o=`(?:${t}|${r})`,i=`(?:${t}|${n})`,s=`${o}(?:\\.${o})*`,a=`${i}(?:\\.${i})*`;return new RegExp(`^${s}@${a}$`)})();function Xhe(t){return Qhe.test(t)}var eye=(()=>{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 tye(t){return eye.test(t)}Dt.register("email",(t,{useRFC822Validation:e})=>{let r=null,n=e?Xhe(t):tye(t);return t&&!n&&(r="Enter a valid email address"),r});Dt.register("integer",t=>{let e=null;return t&&!/^(-)?\d+$/.test(t)&&(e="Invalid number"),e});Dt.register("required",t=>Array.isArray(t)&&t.length===0||t==null||t===""?"Cannot be blank":null);function rye(t){if(Be.isStaticContentReference(t))return!0;try{let e=new URL(t);return e.protocol==="http:"||e.protocol==="https:"||e.protocol==="ftp:"}catch{return!1}}Dt.register("url",t=>{let e=null;return t&&!rye(t)&&(e="Enter a valid url"),e});var N_={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 w$(t,e,r){var n=Array.prototype.slice.call(e);n.push(N_);var o=t.apply(this,n);return r&&o&&Object.setPrototypeOf(o,r),o}function $$(t,e){t=t.split("-"),e=e.split("-");for(var r=t[0].split("."),n=e[0].split("."),o=0;o<3;o++){var i=Number(r[o]),s=Number(n[o]);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 nye={}.constructor;function Di(t){return t!=null&&t.constructor===nye}var oye=/^\d+$/;function M$(t){return oye.test(t)}var iye="1.2.0",sye="1.7.35",yG=" ext. ",St=class{constructor(e){U$(e),this.metadata=e,AG.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 r=this.countryCallingCodes()[e];if(r&&r.length===1&&r[0]==="001")return!0}}isNonGeographicCallingCode(e){return this.nonGeographic()?!!this.nonGeographic()[e]:!this.getCountryCodesForCallingCode(e)}country(e){return this.selectNumberingPlan(e)}selectNumberingPlan(e,r){let n,o;if(e&&(M$(e)?o=e:n=e),r&&(o=r),n&&n!=="001"){let i=this.getCountryMetadata(n);if(!i)throw new Error(`Unknown country: ${n}`);this.numberingPlan=new O_(i,this)}else if(o){if(!this.hasCallingCode(o))throw new Error(`Unknown calling code: ${o}`);this.numberingPlan=new O_(this.getNumberingPlanMetadata(o),this)}else this.numberingPlan=void 0;return this}getCountryCodesForCallingCode(e){let r=this.countryCallingCodes()[e];if(r)return r.length===1&&r[0].length===3?void 0:r}getCountryCodeForCallingCode(e){let r=this.getCountryCodesForCallingCode(e);if(r)return r[0]}getNumberingPlanMetadata(e){let r=this.getCountryCodeForCallingCode(e);if(r)return this.getCountryMetadata(r);if(this.nonGeographic()){let n=this.nonGeographic()[e];if(n)return n}else{let n=this.countryCallingCodes()[e];if(n&&n.length===1&&n[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}},O_=class{constructor(e,r){this.globalMetadataObject=r,this.metadata=e,AG.call(this,r.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(r=>new k$(r,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()&&SG(this.types(),e))return new L$(SG(this.types(),e),this)}ext(){return this.v1||this.v2?yG:this.metadata[13]||yG}},k$=class{constructor(e,r){this._format=e,this.metadata=r}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()&&!aye.test(this.nationalPrefixFormattingRule()))}internationalFormat(){return this._format[5]||this.format()}},aye=/^\(?\$1\)?$/,L$=class{constructor(e,r){this.type=e,this.metadata=r}pattern(){return this.metadata.v1?this.type:this.type[0]}possibleLengths(){if(!this.metadata.v1)return this.type[1]||this.metadata.possibleLengths()}};function SG(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 U$(t){if(!t)throw new Error("[libphonenumber-js] `metadata` argument not passed. Check your arguments.");if(!Di(t)||!Di(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 ${Di(t)?"an object of shape: { "+Object.keys(t).join(", ")+" }":"a "+cye(t)+": "+t}.`)}var cye=t=>typeof t;function iy(t,e){let r=new St(e);if(r.hasCountry(t))return r.selectNumberingPlan(t).countryCallingCode();throw new Error(`Unknown country: ${t}`)}function EG(t,e){return e.countries.hasOwnProperty(t)}function AG(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?$$(e,iye)===-1?this.v2=!0:$$(e,sye)===-1?this.v3=!0:this.v4=!0:this.v1=!0}function j$(t,e){let r=t.slice();for(let n of e)t.indexOf(n)<0&&r.push(n);return r.sort((n,o)=>n-o)}function Il(t,e,r){return CG(t,void 0,e,r)}function CG(t,e,r,n){r&&(n=new St(n.metadata),n.selectNumberingPlan(r));let o=n.type(e),i=o&&o.possibleLengths()||n.possibleLengths();if(!i)return"IS_POSSIBLE";if(e==="FIXED_LINE_OR_MOBILE"){if(!n.type("FIXED_LINE"))return CG(t,"MOBILE",r,n);let c=n.type("MOBILE");c&&(i=j$(i,c.possibleLengths()))}else if(e&&!o)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 z$(t,e,r){e===void 0&&(e={});let n=new St(r);if(e.v2){if(!t.countryCallingCode)throw new Error("Invalid phone number object passed");n.selectNumberingPlan(t.country||t.countryCallingCode)}else{if(!t.phone)return!1;if(t.country){if(!n.hasCountry(t.country))throw new Error(`Unknown country: ${t.country}`);n.selectNumberingPlan(t.country)}else{if(!t.countryCallingCode)throw new Error("Invalid phone number object passed");n.selectNumberingPlan(t.countryCallingCode)}}if(n.possibleLengths())return F$(t.phone||t.nationalNumber,n);if(t.countryCallingCode&&n.isNonGeographicCallingCode(t.countryCallingCode))return!0;throw new Error('Missing "possibleLengths" in metadata. Perhaps the metadata has been generated before v1.0.18.')}function F$(t,e){return Il(t,void 0,e)==="IS_POSSIBLE"}function cn(t,e){return t=t||"",new RegExp("^(?:"+e+")$").test(t)}var lye=["MOBILE","PREMIUM_RATE","TOLL_FREE","SHARED_COST","VOIP","PERSONAL_NUMBER","PAGER","UAN","VOICEMAIL"];function _l(t,e,r){if(e=e||{},!t.country&&!t.countryCallingCode)return;let n=new St(r);n.selectNumberingPlan(t.country||t.countryCallingCode);let o=e.v2?t.nationalNumber:t.phone;if(cn(o,n.nationalNumberPattern())){if(V$(o,"FIXED_LINE",n))return n.type("MOBILE")&&n.type("MOBILE").pattern()===""||!n.type("MOBILE")||V$(o,"MOBILE",n)?"FIXED_LINE_OR_MOBILE":"FIXED_LINE";for(let i of lye)if(V$(o,i,n))return i}}function V$(t,e,r){let n=r.type(e);return!n||!n.pattern()||n.possibleLengths()&&n.possibleLengths().indexOf(t.length)<0?!1:cn(t,n.pattern())}function B$(t,e,r){e=e||{};let n=new St(r);if(n.selectNumberingPlan(t.country||t.countryCallingCode),n.hasTypes())return _l(t,e,n.metadata)!==void 0;let o=e.v2?t.nationalNumber:t.phone;return cn(o,n.nationalNumberPattern())}var uye=/^[A-Z]{2}$/;function H$(t){return uye.test(t)}var dye=!1;function G$(t,e){let r,n,o=new St(e);return H$(t)?(r=t,o.selectNumberingPlan(r),n=o.countryCallingCode()):(n=t,dye&&o.isNonGeographicCallingCode(n)&&(r="001")),{country:r,callingCode:n}}function q$(t,e,r){let o=new St(r).getCountryCodesForCallingCode(t);return o?o.filter(i=>pye(e,i,r)):[]}function pye(t,e,r){let n=new St(r);return n.selectNumberingPlan(e),n.numberingPlan.possibleLengths().indexOf(t.length)>=0}var ln="0-90-9٠-٩۰-۹",mye="-‐-―−ー-";var fye=" ",gye="()()[]\\[\\]",hye="~⁓∼~",gp=`${mye}//..${fye}${gye}${hye}`,sy="++";var yye=new RegExp("(["+ln+"])");function W$(t,e,r,n){if(!e)return;let o=new St(n);o.selectNumberingPlan(e||r);let i=new RegExp(o.IDDPrefix());if(t.search(i)!==0)return;t=t.slice(t.match(i)[0].length);let s=t.match(yye);if(!(s&&s[1]!=null&&s[1].length>0&&s[1]==="0"))return t}function K$(t,e){if(t&&e.numberingPlan.nationalPrefixForParsing()){let r=new RegExp("^(?:"+e.numberingPlan.nationalPrefixForParsing()+")"),n=r.exec(t);if(n){let o,i,s=n.length-1,a=s>0&&n[s];if(e.nationalPrefixTransformRule()&&a)o=t.replace(r,e.nationalPrefixTransformRule()),s>1&&(i=n[1]);else{let l=n[0];o=t.slice(l.length),a&&(i=n[1])}let c;if(a){let l=t.indexOf(n[1]);t.slice(0,l)===e.numberingPlan.nationalPrefix()&&(c=e.numberingPlan.nationalPrefix())}else c=n[0];return{nationalNumber:o,nationalPrefix:c,carrierCode:i}}}return{nationalNumber:t}}function J$(t,e,r){let n=new St(r);for(let o of e)if(n.selectNumberingPlan(o),n.leadingDigits()){if(t&&t.search(n.leadingDigits())===0)return o}else if(_l({phone:t,country:o},void 0,n.metadata))return o}var Sye=!1;function ay(t,{nationalNumber:e,metadata:r}){if(Sye&&r.isNonGeographicCallingCode(t))return"001";let n=r.getCountryCodesForCallingCode(t);if(n)return n.length===1?n[0]:J$(e,n,r.metadata)}function hp(t,e,r){let{carrierCode:n,nationalNumber:o}=K$(t,r);if(o!==t){if(!Eye(t,o,r))return{nationalNumber:t};if(r.numberingPlan.possibleLengths()&&(e||(e=ay(r.numberingPlan.callingCode(),{nationalNumber:o,metadata:r})),!Aye(o,e,r)))return{nationalNumber:t}}return{nationalNumber:o,carrierCode:n}}function Eye(t,e,r){return!(cn(t,r.nationalNumberPattern())&&!cn(e,r.nationalNumberPattern()))}function Aye(t,e,r){switch(Il(t,e,r)){case"TOO_SHORT":case"INVALID_LENGTH":return!1;default:return!0}}function Y$(t,e,r,n,o){if(!(e||r||n))return{number:t};let i=e||r?iy(e||r,o):n;if(t.indexOf(i)===0){let s=new St(o);s.selectNumberingPlan(e||r||n);let a=t.slice(i.length),{nationalNumber:c}=hp(a,void 0,s),{nationalNumber:l}=hp(t,void 0,s);if(!cn(l,s.nationalNumberPattern())&&cn(c,s.nationalNumberPattern())||Il(l,void 0,s)==="TOO_LONG")return{countryCallingCode:i,number:a}}return{number:t}}function cy(t,e,r,n,o){if(!t)return{};let i;if(t[0]!=="+"){let c=W$(t,e||r,n,o);if(c&&c!==t)i=!0,t="+"+c;else{if(e||r||n){let{countryCallingCode:l,number:u}=Y$(t,e,r,n,o);if(l)return{countryCallingCodeSource:"FROM_NUMBER_WITHOUT_PLUS_SIGN",countryCallingCode:l,number:u}}return{number:t}}}if(t[1]==="0")return{};let s=new St(o),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 Z$(t){return t.replace(new RegExp(`[${gp}]+`,"g")," ").trim()}var Cye=/(\$\d)/;function Q$(t,e,{useInternationalFormat:r,withNationalPrefix:n,carrierCode:o,metadata:i}){let s=t.replace(new RegExp(e.pattern()),r?e.internationalFormat():n&&e.nationalPrefixFormattingRule()?e.format().replace(Cye,e.nationalPrefixFormattingRule()):e.format());return r?Z$(s):s}var Iye=/^[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?$/;function X$(t,e,r){let n=new St(r);if(n.selectNumberingPlan(t||e),n.defaultIDDPrefix())return n.defaultIDDPrefix();if(Iye.test(n.IDDPrefix()))return n.IDDPrefix()}var _ye=";ext=",yp=t=>`([${ln}]{1,${t}})`;function ly(t){var e="20",r="15",n="9",o="6",i="[ \\t,]*",s="[:\\..]?[ \\t,-]*",a="#?",c="(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)",l="(?:[xx##~~]|int|int)",u="[- ]+",p="[ \\t]*",m="(?:,{2}|;)",f=_ye+yp(e),h=i+c+s+yp(e)+a,S=i+l+s+yp(n)+a,A=u+yp(o)+"#",C=p+m+s+yp(r)+a,_=p+"(?:,)+"+s+yp(n)+a;return f+"|"+h+"|"+S+"|"+A+"|"+C+"|"+_}var bye="["+ln+"]{"+2+"}",Tye="["+sy+"]{0,1}(?:["+gp+"]*["+ln+"]){3,}["+gp+ln+"]*",vye=new RegExp("^["+sy+"]{0,1}(?:["+gp+"]*["+ln+"]){1,2}$","i"),Rye=Tye+"(?:"+ly()+")?",Pye=new RegExp("^"+bye+"$|^"+Rye+"$","i");function eM(t){return t.length>=2&&Pye.test(t)}function IG(t){return vye.test(t)}function _G({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 bG={formatExtension:(t,e,r)=>`${t}${r.ext()}${e}`};function rM(t,e,r,n){r?r=xye({},bG,r):r=bG;let o=new St(n);if(t.country&&t.country!=="001"){if(!o.hasCountry(t.country))throw new Error(`Unknown country: ${t.country}`);o.selectNumberingPlan(t.country)}else if(t.countryCallingCode)o.selectNumberingPlan(t.countryCallingCode);else return t.phone||"";let i=o.countryCallingCode(),s=r.v2?t.nationalNumber:t.phone,a;switch(e){case"NATIONAL":return s?(a=D_(s,t.carrierCode,"NATIONAL",o,r),tM(a,t.ext,o,r.formatExtension)):"";case"INTERNATIONAL":return s?(a=D_(s,null,"INTERNATIONAL",o,r),a=`+${i} ${a}`,tM(a,t.ext,o,r.formatExtension)):`+${i}`;case"E.164":return`+${i}${s}`;case"RFC3966":return _G({number:`+${i}${s}`,ext:t.ext});case"IDD":if(!r.fromCountry)return;let c=Oye(s,t.carrierCode,i,r.fromCountry,o);return c?tM(c,t.ext,o,r.formatExtension):void 0;default:throw new Error(`Unknown "format" argument passed to "formatNumber()": "${e}"`)}}function D_(t,e,r,n,o){let i=Nye(n.formats(),t);return i?Q$(t,i,{useInternationalFormat:r==="INTERNATIONAL",withNationalPrefix:!(i.nationalPrefixIsOptionalWhenFormattingInNationalFormat()&&o&&o.nationalPrefix===!1),carrierCode:e,metadata:n}):t}function Nye(t,e){return Dye(t,r=>{if(r.leadingDigitsPatterns().length>0){let n=r.leadingDigitsPatterns()[r.leadingDigitsPatterns().length-1];if(e.search(n)!==0)return!1}return cn(e,r.pattern())})}function tM(t,e,r,n){return e?n(t,e,r):t}function Oye(t,e,r,n,o){if(iy(n,o.metadata)===r){let a=D_(t,e,"NATIONAL",o);return r==="1"?r+" "+a:a}let s=X$(n,void 0,o.metadata);if(s)return`${s} ${r} ${D_(t,null,"INTERNATIONAL",o)}`}function xye(...t){let e=1;for(;e<t.length;){if(t[e])for(let r in t[e])t[0][r]=t[e][r];e++}return t[0]}function Dye(t,e){let r=0;for(;r<t.length;){if(e(t[r]))return t[r];r++}}function nM(){return nM=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},nM.apply(null,arguments)}var Ka=class{constructor(e,r,n){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]==="+"&&!r)throw new TypeError("`metadata` argument not passed");if(Di(r)&&Di(r.countries)){n=r;let s=e;if(!wye.test(s))throw new Error('Invalid `number` argument passed: must consist of a "+" followed by digits');let{countryCallingCode:a,number:c}=cy(s,void 0,void 0,void 0,n);if(r=c,e=a,!r)throw new Error("Invalid `number` argument passed: too short")}if(!r)throw new TypeError("`nationalNumber` argument is required");if(typeof r!="string")throw new TypeError("`nationalNumber` argument must be a string");U$(n);let{country:o,callingCode:i}=G$(e,n);this.country=o,this.countryCallingCode=i,this.nationalNumber=r,this.number="+"+this.countryCallingCode+this.nationalNumber,this.getMetadata=()=>n}setExt(e){this.ext=e}getPossibleCountries(){return this.country?[this.country]:q$(this.countryCallingCode,this.nationalNumber,this.getMetadata())}isPossible(){return z$(this,{v2:!0},this.getMetadata())}isValid(){return B$(this,{v2:!0},this.getMetadata())}isNonGeographic(){return new St(this.getMetadata()).isNonGeographicCallingCode(this.countryCallingCode)}isEqual(e){return this.number===e.number&&this.ext===e.ext}getType(){return _l(this,{v2:!0},this.getMetadata())}format(e,r){return rM(this,e,r?nM({},r,{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)}},wye=/^\+\d+$/;var In=class t extends Error{constructor(e){super(e),Object.setPrototypeOf(this,t.prototype),this.name=this.constructor.name}};var TG=new RegExp("(?:"+ly()+")$","i");function oM(t){let e=t.search(TG);if(e<0)return{};let r=t.slice(0,e),n=t.match(TG),o=1;for(;o<n.length;){if(n[o])return{number:r,ext:n[o]};o++}}var $ye={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 vG(t){return $ye[t]}function w_(t){let e="";for(let r of t.split(""))e+=Mye(r,e)||"";return e}function Mye(t,e,r){if(t==="+"){if(e){typeof r=="function"&&r("end");return}return"+"}return vG(t)}var sM="+",kye="[\\-\\.\\(\\)]?",RG="(["+ln+"]|"+kye+")",Lye="^\\"+sM+RG+"*["+ln+"]"+RG+"*$",Uye=new RegExp(Lye,"g"),iM=ln,jye="["+iM+"]+((\\-)*["+iM+"])*",zye="a-zA-Z",Fye="["+zye+"]+((\\-)*["+iM+"])*",Vye="^("+jye+"\\.)*"+Fye+"\\.?$",Bye=new RegExp(Vye,"g"),aM="tel:",$_=";phone-context=",PG=";isub=";function cM(t){let e=t.indexOf($_);if(e<0)return null;let r=e+$_.length;if(r>=t.length)return"";let n=t.indexOf(";",r);return n>=0?t.substring(r,n):t.substring(r)}function NG(t){return t===null?!0:t.length===0?!1:Uye.test(t)||Bye.test(t)}function lM(t,{extractFormattedPhoneNumber:e}){let r=cM(t);if(!NG(r))throw new In("NOT_A_NUMBER");let n;if(r===null)n=e(t)||"";else{n="",r.charAt(0)===sM&&(n+=r);let i=t.indexOf(aM),s;i>=0?s=i+aM.length:s=0;let a=t.indexOf($_);n+=t.substring(s,a)}let o=n.indexOf(PG);if(o>0&&(n=n.substring(0,o)),n!=="")return n}var Gye=250,qye=new RegExp("["+sy+ln+"]"),Wye=new RegExp("[^"+ln+"#]+$"),Kye=!1;function uM(t,e,r){e=e||{};let n=new St(r);if(e.defaultCountry&&!n.hasCountry(e.defaultCountry))throw e.v2?new In("INVALID_COUNTRY"):new Error(`Unknown country: ${e.defaultCountry}`);let{number:o,ext:i,error:s}=Yye(t,e.v2,e.extract);if(!o){if(e.v2)throw s==="TOO_SHORT"?new In("TOO_SHORT"):new In("NOT_A_NUMBER");return{}}let{country:a,nationalNumber:c,countryCallingCode:l,countryCallingCodeSource:u,carrierCode:p}=Qye(o,e.defaultCountry,e.defaultCallingCode,n);if(!n.hasSelectedNumberingPlan()){if(e.v2)throw new In("INVALID_COUNTRY");return{}}if(!c||c.length<2){if(e.v2)throw new In("TOO_SHORT");return{}}if(c.length>17){if(e.v2)throw new In("TOO_LONG");return{}}if(e.v2){let f=new Ka(l,c,n.metadata);return a&&(f.country=a),p&&(f.carrierCode=p),i&&(f.ext=i),f.__countryCallingCodeSource=u,f}let m=(e.extended?n.hasSelectedNumberingPlan():a)?cn(c,n.nationalNumberPattern()):!1;return e.extended?{country:a,countryCallingCode:l,carrierCode:p,valid:m,possible:m?!0:!!(e.extended===!0&&n.possibleLengths()&&F$(c,n)),phone:c,ext:i}:m?Zye(a,c,i):{}}function Jye(t,e,r){if(!t)return;if(t.length>Gye){if(r)throw new In("TOO_LONG");return}if(e===!1)return t;let n=t.search(qye);if(!(n<0))return t.slice(n).replace(Wye,"")}function Yye(t,e,r){let n=lM(t,{extractFormattedPhoneNumber:i=>Jye(i,r,e)});if(!n)return{};if(!eM(n))return IG(n)?{error:"TOO_SHORT"}:{};let o=oM(n);return o.ext?o:{number:n}}function Zye(t,e,r){let n={country:t,phone:e};return r&&(n.ext=r),n}function Qye(t,e,r,n){let{countryCallingCodeSource:o,countryCallingCode:i,number:s}=cy(w_(t),void 0,e,r,n.metadata),a;if(i)n.selectNumberingPlan(i);else if(s&&(e||r))e?(a=e,n.selectNumberingPlan(e),i=n.numberingPlan.callingCode()):(n.selectNumberingPlan(r),i=r,Kye&&n.isNonGeographicCallingCode(i)&&(a="001"));else return{};if(!s)return{countryCallingCodeSource:o,countryCallingCode:i};let{nationalNumber:c,carrierCode:l}=hp(w_(s),void 0,n),u=ay(i,{nationalNumber:c,metadata:n});return u&&(a=u,u==="001"||n.selectNumberingPlan(a)),{country:a,countryCallingCode:i,countryCallingCodeSource:o,nationalNumber:c,carrierCode:l}}function dM(){return dM=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},dM.apply(null,arguments)}function pM(t,e,r){return uM(t,dM({},e,{v2:!0}),r)}function mM(){return mM=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},mM.apply(null,arguments)}function fM(t){let[e,r,n,o]=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(!r||typeof r=="string")o?(s=n,a=o):(s=void 0,a=n),r&&(s=mM({defaultCountry:r},s));else if(Di(r))n?(s=r,a=n):a=r;else throw new Error(`Invalid second argument: ${r}`);return{text:i,options:s,metadata:a}}function gM(){return gM=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},gM.apply(null,arguments)}function hM(t,e,r){e&&e.defaultCountry&&!EG(e.defaultCountry,r)&&(e=gM({},e,{defaultCountry:void 0}));try{return pM(t,e,r)}catch(n){if(!(n instanceof In))throw n}}function uy(){let{text:t,options:e,metadata:r}=fM(arguments);return hM(t,e,r)}var M_=class extends Ka{constructor(e){super(e,N_)}};function k_(){return w$(uy,arguments,M_.prototype)}var OG="Enter a valid phone number";Dt.register("phone",t=>{let e=null;t&&!/^\+?\d+$/.test(t)&&(e=OG);let n=t?.startsWith("+");if(t&&n){let o=k_(t);(!o||!o.isPossible()||t!==o.number)&&(e=OG)}return e});var xG="",DG="",Xye=t=>{if(t&&t.startsWith(xG)&&t.endsWith(xG))return"invalid";if(t&&t.startsWith(DG)&&t.endsWith(DG))return"incomplete"},yM=(t,e)=>{switch(Xye(e)??e){case"invalid":return`Incorrect ${t}`;case"incomplete":return`Incomplete ${t}`;default:return null}};Dt.register("datetime",t=>yM("date and time",t));Dt.register("date",t=>yM("date",t));Dt.register("time",t=>yM("time",t));var wG=t=>{let e="Error with one or more files";for(let r of t)if(r?.error)return e;return null};Dt.register("attachment",t=>{let e=null,r="Error with one or more files";return t&&("pyCount"in t&&Array.isArray(t.pxResults)?e=wG(t.pxResults):Array.isArray(t)?e=wG(t):"error"in t&&t.error&&(e=r)),e});var bl=()=>{let t={},e=typeof Intl<"u"?Intl.DateTimeFormat().resolvedOptions().timeZone:void 0;e&&(t["user-timezone"]=e);let r=typeof navigator<"u"?navigator.language:void 0;return r&&(t["user-locale"]=r),t},MG="createConversation",L_="sendMessage",kG="getConversations",LG="getMessages",UG="createConversationForAgent",$G="sendMessageForAgent",eSe="getConversationsForAgent",tSe="getMessagesForAgent",rSe="likeAgentMessage",nSe="dislikeAgentMessage",oSe="getAgent",jG="getCoach",zG=(t,e,r,n,o,i,s)=>{for(let c of s)c?.cancel&&typeof c.cancel=="function"&&c.cancel();let a=Ci();return s.push(a),ve(t,{queryPayload:kG===t?{assistantID:e,contextID:r,pageSize:n,pageIndex:o}:{agentID:e,contextID:r,pageSize:n,pageIndex:o},cancelTokenSource:a,headers:bl()},i).finally(()=>{let c=s.indexOf(a);c!==-1&&s.splice(c,1)})},FG=(t,e,r,n,o)=>{for(let s of o)s?.cancel&&typeof s.cancel=="function"&&s.cancel();let i=Ci();return o.push(i),ve(t,{queryPayload:LG===t?{assistantID:e,conversationID:r}:{agentID:e,conversationID:r},cancelTokenSource:i,headers:bl()},n).then(s=>(o.pop(),s))},VG=(t,e,r,n,o,i,s=!1)=>{for(let c of o)c?.cancel&&typeof c.cancel=="function"&&c.cancel();let a=Ci();return o.push(a),ve(t,{body:JSON.stringify({contextID:e,executeStarterQuestion:!1,...i&&i.isManualConfirmationSupported&&{capabilities:{tools:{isManualConfirmationSupported:!0}}},...t===UG&&s&&{showAgentRecommendations:s}}),cancelTokenSource:a,queryPayload:t===MG?{assistantID:r}:{agentID:r},headers:bl()},n).then(c=>(o.pop(),c))},BG=(t,e,r,n,o,i,s)=>{let a={...n&&{request:n},...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 ve(t,{body:JSON.stringify(a),queryPayload:t===L_?{assistantID:e,conversationID:r}:{agentID:e,conversationID:r},headers:bl()},o)},HG=(t,e,r,n,o,i,s,a)=>{let c={...n&&{request:n},...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===L_?{assistantID:e,conversationID:r}:{agentID:e,conversationID:r},{restApi:u,reqType:p}=U(t,l),m={method:p,headers:{Accept:"text/event-stream",...bl()},body:JSON.stringify(c),responseType:"stream",adapter:"fetch",...a&&{signal:a.token}};return M(u,m,o)},GG=(t,e,r,n,o)=>{for(let s of n)s?.cancel&&typeof s.cancel=="function"&&s.cancel();let i=Ci();return n.push(i),ve(t,{queryPayload:t===jG?{assistantID:e,...o&&{contextID:o}}:{agentID:e,...o&&{contextID:o}},cancelTokenSource:i},r).then(s=>(n.pop(),s)).catch(s=>{throw n.pop(),s})},iSe=(t,e,r,n,o,i=[])=>zG(kG,t,e,r,n,o,i),sSe=(t,e,r,n,o,i=[])=>zG(eSe,t,e,r,n,o,i),aSe=(t,e,r,n=[])=>FG(LG,t,e,r,n),cSe=(t,e,r,n=[])=>FG(tSe,t,e,r,n),lSe=(t,e,r,n=[])=>VG(MG,t,e,r,n),uSe=(t,e,r,n=[],o,i)=>VG(UG,t,e,r,n,o,i),dSe=(t,e,r,n,o)=>o?.enableStreaming?HG(L_,t,e,r,n,void 0,o):BG(L_,t,e,r,n),pSe=(t,e,r,n,o,i)=>i?.enableStreaming?HG($G,t,e,r,n,o,i,i.cancelTokenSource):BG($G,t,e,r,n,o,i),mSe=(t,e,r,n=[])=>GG(oSe,t,e,n,r),fSe=(t,e,r,n=[])=>GG(jG,t,e,n,r),gSe=(t,e,r,n)=>{let o={queryPayload:{agentID:t,conversationID:e,messageID:r},headers:bl()};return ve(rSe,o,n)},hSe=(t,e,r,n,o="")=>{let i={queryPayload:{agentID:t,conversationID:e,messageID:r},body:JSON.stringify({feedbackText:o}),headers:bl()};return ve(nSe,i,n)},qG={createConversation:lSe,sendMessage:dSe,createConversationForAgent:uSe,sendMessageForAgent:pSe,getAgent:mSe,getCoach:fSe,likeAgentMessage:gSe,unLikeAgentMessage:hSe,getConversations:iSe,getConversationsForAgent:sSe,getMessages:aSe,getMessagesForAgent:cSe};var SM=class{async rewriteText(e){let{originalText:r,rewriteAction:n,additionalInstructions:o,context:i}=e,s=v.isInfinityRuntime(),a=v.getRewriteGenAIDP()??P.getDefaultQualifiedName("D_RewriteWithAI"),c={OriginalText:r,RewriteAction:n,AdditionalInstructions:o||""};try{let l,u;if(s){let p=await Zt.getPageDataAsync(a,i,c),f=Object.fromEntries(Object.entries(p)).pyResponseData;l=typeof f=="string"?f:void 0}else{let m=(await Zt.getDataAsync(a,i,c)).data[0],f=m[P.getDefaultQualifiedName("Content")];l=typeof f=="string"?f:void 0;let h=m[P.getDefaultQualifiedName("ErrorMessage")];u=typeof h=="string"?h: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"}}}},WG=new SM;var EM=class{classAccessMap=new Map;static instance;constructor(){let e=v.getClassesAccessList();e.length!==0?this.classAccessMap=e.reduce((r,n)=>(r.set(n.pyClassName,n.pyHasCreateAccess),r),new Map):this.classAccessMap=v.getCaseTypeList().reduce((r,n)=>(r.set(n.pyWorkTypeImplementationClassName,n.hasCreateAccess??!0),r),new Map)}hasCreateAccess(e){return this.classAccessMap.get(e)}static getInstance(){return this.instance||(this.instance=new this),this.instance}},KG=EM;var AM=class{static AUTOSAVE_SAVE_STATUS=Kd;static isAutosaveEnabledForContext(e){return Es(e)}static subscribeAutosaveStatus(e,r){return p6(e,r)}static notifyChange(e,r,n){Es(e)&&(u6(e,r,n),Yd(e))}},JG=AM;var CM=class t{static behaviorOverrides={};getPersonalizationUtils=KH;constructor(){t.behaviorOverrides={}}getPCoreVersion=()=>"27.1.0";onPCoreReady=e=>Wr.onPCoreReady(e);onPCoreCleanup=e=>Wr.onPCoreCleanup(e);getComponentsRegistry=()=>Wr.getComponentsRegistry();checkIfSemanticURL=()=>Wr.checkIfSemanticURL();isValidSemanticURL=()=>m9();getRoutingUtils=()=>tG;getViewResources=()=>ED;configureForBrowserBookmark=e=>Wr.configureForBrowserBookmark(e);getStore=()=>we();resetStore=()=>ys();getMessageManager=()=>$u;getCoexistenceManager=()=>ny;getStoreValue=(e,r,n)=>re(e,r,n);getContainerUtils=()=>ca;getAnnotationUtils=()=>Ir;getFieldUtils=()=>oi;getFieldDefaultUtils=()=>en;getAssetLoader=()=>Be;getAttachmentUtils=()=>gu;getViewRuleApi=()=>MH;getFeedUtils=()=>zH;getTagUtils=()=>FH;getGenAIAssistantUtils=()=>qG;getGenAIUtils=()=>WG;getStakeholderUtils=()=>VH;getUserApi=()=>UH;getCaseFollowerApi=()=>kH;getCaseUtils=()=>B;getStateUtils=()=>$n;getRelatedCasesApi=()=>LH;getDataApi=()=>Io;getDataApiUtils=()=>ir;getAnalyticsUtils=()=>eG;getLocaleUtils=e=>{let r=e??v.getLocale()??"en-US";return vi(r)};registerLocaleManager=e=>{let r=this.getLocaleUtils();Object.keys(e).forEach(n=>{r[n]=e[n]})};setBehaviorOverrides=e=>{t.behaviorOverrides=e};setBehaviorOverride=(e,r)=>{t.behaviorOverrides[e]=r};getBehaviorOverrides=()=>t.behaviorOverrides;getBehaviorOverride=e=>t.behaviorOverrides[e];getAsynchronousUtils=()=>hG;createPConnect=e=>ct(e);getPubSubUtils=()=>$;registerComponentCreator=e=>{JV(e)};getConstants=()=>Object.freeze(E);getResolvedConstantValue=e=>d.getProperty(e);getEvents=()=>nG;getRestClient=()=>QC;getMashupApi=()=>b_;getEnvironmentInfo=()=>v;switchLocale=e=>IH(e);getRuntimeParamsAPI=()=>dl;getSemanticUrlUtils=()=>Eu;getRemoteCaseUtils=()=>ae;getNavigationUtils=()=>pt;getSDKUtils=()=>x$;registerModule=(e,r)=>rG.registerModule(e,r,this);getErrorHandler=()=>oG;getFormUtils=()=>nn;getAutosaveUtils=()=>JG;getMessagingServiceManager=()=>Tt;getMetadataUtils=()=>Zn;getDataPageUtils=()=>Zt;getDataTypeUtils=()=>_i;getCascadeManager=()=>Cr;isDeepEqual=(e,r)=>lo(e,r);getAuthUtils=()=>iG;getDebugger=()=>Tr;getDeferLoadManager=()=>Hd;getExpressionEngine=()=>zD;getActionsSequencer=()=>Ct;getRefreshManager=()=>Ti;getInitialiser=()=>Cl;getBootstrapUtils=()=>Wr;getContextTreeManager=()=>be;getAccessPrivilege=()=>KG.getInstance();getObjectTransformer=()=>Ve;getAllStateMachines=(e,r,n)=>!r||!n?ke.getAllStateMachinesByContext(e):ke.getAllStateMachines(e,r,n);isNamespaceEnabled=()=>P.isNamespaceEnabled();getQualifiedName=(e,r)=>P.getQualifiedName(e,r);getDefaultQualifiedName=e=>this.getQualifiedName(e,"PegaPlatform");getNameSpaceUtils=()=>P;getNetworkUtils=()=>Mo;getMashupBridge=()=>v_;getConfirmDialogService=()=>li;getBrowserNotificationService=()=>__;getMCPClient=()=>Ah},YG=new CM;globalThis.PCore=YG;var Mbt=YG;export{Mbt as default};
|
|
64
64
|
/*! Bundled license information:
|
|
65
65
|
|
|
66
66
|
@modelcontextprotocol/client/dist/src-DDAAhLnO.mjs:
|