@finos/legend-application-pure-ide-deployment 9.1.0 → 9.2.0
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/ide/index.html +1 -1
- package/dist/ide/static/index.17480da4.js +2 -0
- package/dist/ide/static/index.17480da4.js.map +1 -0
- package/dist/ide/static/{index.72ae5f8d.css → index.9938d8bb.css} +5 -5
- package/dist/ide/static/{index.72ae5f8d.css.map → index.9938d8bb.css.map} +1 -1
- package/dist/ide/version.json +1 -1
- package/package.json +2 -2
- package/dist/ide/static/index.a674d23f.js +0 -2
- package/dist/ide/static/index.a674d23f.js.map +0 -1
@@ -1,2 +0,0 @@
|
|
1
|
-
(()=>{"use strict";var e,t,s,i,n,a={43002:(e,t,s)=>{const i=JSON.parse('{"i8":"8.0.0","Rw":{"k":"@finos/legend-logger-plugin-web-console"}}');var n,a=s(91004);class r{name;version;signature;uuid}class o{name;version;uuid=(0,a.Z)();constructor(e,t){this.name=e,this.version=t}getName(){return this.name}getVersion(){return this.version}getSignature(){return`${this.getName()}@${this.getVersion()}`}getUUID(){return this.uuid}getInfo(){const e=new r;return e.name=this.getName(),e.version=this.getVersion(),e.signature=this.getSignature(),e.uuid=this.getUUID(),e}configure(e){return this}}class l{name;version;signature;uuid;plugins=[]}class c{name;version;uuid=(0,a.Z)();plugins=[];constructor(e,t,s){this.name=e,this.version=t,this.plugins=s}getName(){return this.name}getVersion(){return this.version}getSignature(){return`${this.getName()}@${this.getVersion()}`}getUUID(){return this.uuid}getPlugins(){return[...this.plugins]}getInfo(){const e=new l;return e.name=this.getName(),e.version=this.getVersion(),e.signature=this.getSignature(),e.uuid=this.getUUID(),e.plugins=this.plugins.map((e=>e.getInfo())).sort(((e,t)=>e.name.localeCompare(t.name))),e}configure(e){return this}install(e){this.plugins.forEach((t=>t.install(e)))}}class d{plugins=[];presets=[];usePlugins(e){return this.plugins=e,this}usePresets(e){return this.presets=e,this}configure(e){Object.keys(e).forEach((t=>{const s=e[t];this.presets.forEach((e=>{e.getName()===t&&e.configure(s)})),this.plugins.forEach((e=>{e.getName()===t&&e.configure(s)}))}))}install(){this.plugins.forEach((e=>e.install(this))),this.presets.forEach((e=>e.install(this)))}getInfo(){return{plugins:this.plugins.filter((e=>!this.getHiddenPluginNames().includes(e.getName()))).map((e=>e.getInfo())).sort(((e,t)=>e.name.localeCompare(t.name))),presets:this.presets.filter((e=>!this.getHiddenPresetNames().includes(e.getName()))).map((e=>e.getInfo())).sort(((e,t)=>e.name.localeCompare(t.name)))}}getHiddenPluginNames(){return[]}getHiddenPresetNames(){return[]}}!function(e){e[e.DEBUG=1]="DEBUG",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.ERROR=4]="ERROR",e[e.SILENT=5]="SILENT"}(n=n||(n={}));class h{channel;name;timestamp=Date.now();static create(e){const t=new h;return t.name=e,t}}class u extends o{level=n.DEBUG;setLevel(e){this.level=e}install(e){e.registerLoggerPlugin(this)}debug(e,...t){this.level<=n.DEBUG&&this._debug(e,...t)}info(e,...t){this.level<=n.INFO&&this._info(e,...t)}warn(e,...t){this.level<=n.WARN&&this._warn(e,...t)}error(e,...t){this.level<=n.ERROR&&this._error(e,...t)}}class p{loggers=[];registerPlugins(e){this.loggers=e}debug(e,...t){this.loggers.forEach((s=>s.debug(e,...t)))}info(e,...t){this.loggers.forEach((s=>s.info(e,...t)))}warn(e,...t){this.loggers.forEach((s=>s.warn(e,...t)))}error(e,...t){this.loggers.forEach((s=>s.error(e,...t)))}}const{debug:m,info:_,warn:g,error:E}=console;class f extends u{constructor(){super(i.Rw.k,i.i8)}_debug(e,...t){m(`[${e.timestamp}] ${e.name} ${t.length?":":""}`,...t)}_info(e,...t){_(`[${e.timestamp}] ${e.name} ${t.length?":":""}`,...t)}_warn(e,...t){g(`[${e.timestamp}] ${e.name} ${t.length?":":""}`,...t)}_error(e,...t){E(`[${e.timestamp}] ${e.name} ${t.length?":":""}`,...t)}}var T=s(52322),C=s(17029),x=s(80075),S=s(90361);const N="Roboto Mono";var A,v;!function(e){e.LEGEND="LEGEND",e.TEMPORARY__VSCODE_LIGHT="vs"}(A=A||(A={})),function(e){e.TEXT="plaintext",e.PURE="pure",e.JSON="json",e.JAVA="java",e.MARKDOWN="markdown",e.SQL="sql",e.XML="xml",e.YAML="yaml",e.GRAPHQL="graphql"}(v=v||(v={}));var I=s(85928),O=s(21112);const y=e=>e.constructor,R=()=>()=>{},P=e=>e.length?e[0]:void 0,w=e=>e.length?e[e.length-1]:void 0,L=e=>new Promise(((t,s)=>setTimeout((()=>{try{t(e())}catch(e){s(e)}}),0))),b=(e,t,s=((e,t)=>e===t))=>!e.find((e=>s(e,t)))&&(e.push(t),!0),D=(e,t,s,i=((e,t)=>e===t))=>{const n=e.findIndex((e=>i(e,t))),a=e.findIndex((e=>i(e,s)));return-1!==n&&-1!==a&&(e[n]=s,e[a]=t,!0)},M=(e,t,s=((e,t)=>e===t))=>{const i=e.findIndex((e=>s(e,t)));return-1!==i&&(e.splice(i,1),!0)};class F extends Error{uuid=(0,a.Z)();constructor(e){super(),this.message=void 0===e||""===e?"(no error message)":e}get detail(){return this.message}}class j extends Error{constructor(e,t,s){if(super(s||(t instanceof Error?t.message:t)),this.name=e,t instanceof Error){const e=(this.message.match(/\n/g)??[]).length+1;this.stack=`${(this.stack??"").split("\n").slice(0,e+1).join("\n")}\nCaused by: ${t.stack}`}else"function"==typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error(t).stack}}class k extends j{constructor(e){super("Illegal State Error [PLEASE NOTIFY DEVELOPER]",e)}}class U extends j{constructor(e,t){super("Unsupported Operation Error",e||t?`${e}${t?`\n${((e,t)=>{const s=(i={printFunctionName:!1,maxDepth:t?.deep?void 0:1},(0,I.Z)(i,(e=>void 0!==e)));var i;return(0,O.WU)(e,s).replace(/.*\s\{/g,"{").replace(/\[.*\]/g,(e=>["[Array]","[Function]"].includes(e)?e:"[Object]"))})(t)}`:""}`:void 0)}}function G(e){if(!(e instanceof Error))throw new k("Expected error to be thrown")}const V=e=>{try{return e()}catch{return}};class B extends j{constructor(e,t){super("Assertion Error",e,t)}}const $=e=>null!=e;function z(e,t=""){if(null==e)throw new B(t||"Value is nullable")}const H=(e,t="")=>(z(e,t),e),Y=e=>t=>((e,t)=>e instanceof t)(t,e);function W(e,t,s=""){if(!(e instanceof t))throw new B(s||`Value is expected to be of type '${t.name}'`)}const K=(e,t,s="")=>(W(e,t,s),e);function X(e,t=""){if(""===H(e,t))throw new B(t||"Expected string value to be non-empty")}function Z(e,t=""){return X(e,t),e}function q(e,t=""){if(!e)throw new B(t||"Expected predicate to be truthy")}const J=e=>"string"==typeof e,Q=e=>"object"==typeof e&&null!==e,ee=(e,t="")=>(function(e,t=""){if(!(e=>"number"==typeof e&&!isNaN(e))(e))throw new B(t||"Value is expected to be a number")}(e,t),e);var te=s(39391),se=s(33654),ie=s(18247);s(72659);const ne=te.W,ae="charset=utf-8";var re,oe,le;!function(e){e.CONTENT_TYPE="Content-Type",e.ACCEPT="Accept"}(re=re||(re={})),function(e){e.APPLICATION_JSON="application/json",e.APPLICATION_XML="application/xml",e.APPLICATION_ZLIB="application/zlib",e.TEXT_PLAIN="text/plain",e.TEXT_CSV="text/csv",e.ALL="*/*"}(oe=oe||(oe={})),function(e){e.GET="GET",e.PUT="PUT",e.POST="POST",e.DELETE="DELETE"}(le=le||(le={}));const ce={mode:"cors",credentials:"include",redirect:"manual"},de=(e,t)=>{const s={};return e&&Object.entries(e).forEach((([e,t])=>{s[e]=t})),t&&Object.entries(t).forEach((([e,t])=>{s[e]=t})),s};class he extends Error{response;payload;constructor(e,t){super(),"function"==typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.name="Network Client Error",this.response=e;const{status:s,statusText:i,url:n}=e,a=`Received response with status ${s} (${i}) for ${n}`;this.message=(t?(e=>{if(Q(e))return J(e.message)?e.message:JSON.stringify(e);let t;try{t=JSON.parse(e)}catch{}return t&&J(t.message)?t.message:e})(t).substring(0,5e3):"")||a,this.payload=t}}const ue=async(e,t,s)=>{if(s?.preprocess?.(e),!e.ok){let t;try{t=await e.text(),t=JSON.parse(t)}catch{}return Promise.reject(new he(e,t))}if(s?.skipProcessing)return Promise.resolve(e);if(e.status===ne.NO_CONTENT)return Promise.resolve(void 0);const i=t.headers.Accept;switch(i){case oe.APPLICATION_JSON:return e.json();case oe.TEXT_PLAIN:return e.text();default:return Promise.reject(new he(e,`Can't process response for request with Content-Type '${i}'`))}},pe=async(e,t,s)=>s?.autoReAuthenticateUrl?(e=>new Promise((t=>{const s="AUTO_AUTHENTICATION_IFRAME",i=document.getElementById(s);i?.remove();const n=document.createElement("iframe");n.id=s,n.src=e,n.style.display="none",n.addEventListener("load",(()=>{n.remove(),t()})),document.body.appendChild(n)})))(s.autoReAuthenticateUrl).then((()=>fetch(e,t))).then((e=>ue(e,t,s))):fetch(e,t).then((e=>ue(e,t,s))),me=(e,t)=>{const s={};return s.Accept=oe.APPLICATION_JSON,e!==le.GET&&(s[re.CONTENT_TYPE]=`${oe.APPLICATION_JSON};${ae}`),de(s,t)};class _e{options={};baseUrl;constructor(e){this.baseUrl=e?.baseUrl,this.options={...ce,...e?.options??{}}}async get(e,t={},s,i,n,a){return this.request(le.GET,e,void 0,t,s,i,n,a)}async put(e,t={},s={},i,n,a,r){return this.request(le.PUT,e,t,s,i,n,a,r)}async post(e,t={},s={},i,n,a,r){return this.request(le.POST,e,t,s,i,n,a,r)}async delete(e,t={},s={},i,n,a,r){return this.request(le.DELETE,e,t,s,i,n,a,r)}async request(e,t,s,i,n,a,r,o){const l=((e,t,s)=>{if(!e&&!V((()=>new URL(t))))throw new Error(`Can't build URL string: base URL is not specified and the provided URL '${t}' is not absolute`);const i=new URL(t,e);return s instanceof Object&&Object.entries(s).forEach((([e,t])=>{void 0!==t&&(Array.isArray(t)?t.filter($).forEach((t=>i.searchParams.append(e,t.toString()))):i.searchParams.append(e,t.toString()))})),i.toString()})(this.baseUrl,t,a??{});let c;if((J(s)||Q(s))&&r?.enableCompression&&(q(e!==le.GET," GET request should not have any request payload"),s=(e=>new Blob([(0,se.Wt)(Q(e)?JSON.stringify(e):e)]))(s),n=de(n,{[re.CONTENT_TYPE]:`${oe.APPLICATION_ZLIB};${ae}`})),void 0!==s)if(J(s)||s instanceof Blob)c=s;else{if(!Q(s))throw new B("Request body can only be either a 'string' or an 'object'");c=JSON.stringify(s)}const d={...this.options,...i,method:e,body:c,headers:me(e,n)};return fetch(l,d).then((e=>(e=>0===e.status||e.status===ne.UNAUTHORIZED)(e)?pe(l,d,o):ue(e,d,o))).catch((e=>(e=>e instanceof TypeError&&"Failed to fetch"===e.message)(e)?pe(l,d,o):Promise.reject(e)))}}const ge=(e,t,s)=>{const i=new Blob([t],{type:s}),n=URL.createObjectURL(i),a=document.createElement("a");"string"==typeof a.download?(document.body.appendChild(a),a.download=e,a.href=n,a.click(),document.body.removeChild(a)):location.replace(n)};var Ee;!function(e){e.LOAD_TEXT_EDITOR_FONT__SUCCESS="application.load.font.success",e.APPLICATION_SETUP__FAILURE="application.setup.failure",e.ILLEGAL_APPLICATION_STATE_OCCURRED="application.error.illegal-state",e.APPLICATION_CONFIGURATION__FAILURE="application.configuration.failure",e.APPLICATION_IDENTITY_AUTO_FETCH__FAILURE="application.identity.auto-fetch.failure",e.APPLICATION_DOCUMENTATION_FETCH__FAILURE="application.fetch.documentation.failure",e.APPLICATION_DOCUMENTATION_LOAD__SKIP="application.load.documentation.skip",e.APPLICATION_DOCUMENTATION_REQUIREMENT_CHECK__FAILURE="application.load.documentation.requirement-check.failure",e.APPLICATION_TERMINAL_COMMAND_CONFIGURATION_CHECK__FAILURE="application.load.terminal-command.configuration-check.failure",e.APPLICATION_CONTEXTUAL_DOCUMENTATION_LOAD__SKIP="application.load.contextual-documentation.skip",e.APPLICATION_COMMAND_CENTER_REGISTRATION__FAILURE="application.command-center.registration.failure",e.APPLICATION_LOAD__SUCCESS="application.load.success",e.APPLICATION_LOAD__FAILURE="application.load.failure",e.DEVELOPMENT_ISSUE="development.issue",e.APPLICATION_CONTEXT__ACCESS="application.context.access",e.APPLICATION_USAGE__INTERRUPT="application.usage.interrupt",e.VIRTUAL_ASSISTANT_DOCUMENTATION_ENTRY__ACCESS="application.virtual-assistant.documentation-entry.access"}(Ee=Ee||(Ee={}));const fe="::",Te="###",Ce=["$implicit"];var xe,Se,Ne,Ae,ve;(ve=xe=xe||(xe={})).CORE="CORE",ve.MAIN="ROOT",ve.MODEL_GENERATION="MODEL_GENERATION_ROOT",ve.SYSTEM="SYSTEM_ROOT",ve.PROJECT_DEPENDENCY_ROOT="PROJECT_DEPENDENCY_ROOT",(Ae=Se=Se||(Se={})).STRING="String",Ae.BOOLEAN="Boolean",Ae.BINARY="Binary",Ae.NUMBER="Number",Ae.INTEGER="Integer",Ae.FLOAT="Float",Ae.DECIMAL="Decimal",Ae.DATE="Date",Ae.STRICTDATE="StrictDate",Ae.DATETIME="DateTime",Ae.STRICTTIME="StrictTime",Ae.LATESTDATE="LatestDate",function(e){e.Service_Test="serviceTest",e.Mapping_Test="mappingTest"}(Ne=Ne||(Ne={}));const Ie=["meta::pure::metamodel::type","meta::pure::functions::date","meta::pure::profiles"];var Oe,ye,Re,Pe,we,Le,be,De,Me,Fe;(ye=Oe=Oe||(Oe={})).ANY="meta::pure::metamodel::type::Any",ye.NIL="meta::pure::metamodel::type::Nil",ye.PROFILE_DOC="meta::pure::profiles::doc",ye.PROFILE_TEMPORAL="meta::pure::profiles::temporal",ye.PROFILE="meta::pure::metamodel::extension::Profile",ye.ENUMERATION="meta::pure::metamodel::type::Enumeration",ye.MEASURE="meta::pure::metamodel::type::Measure",ye.CLASS="meta::pure::metamodel::type::Class",ye.ASSOCIATION="meta::pure::metamodel::relationship::Association",ye.FUNCTION="meta::pure::metamodel::function::ConcreteFunctionDefinition",ye.FLAT_DATA="meta::flatData::metamodel::FlatData",ye.DATABASE="meta::relational::metamodel::Database",ye.MAPPING="meta::pure::mapping::Mapping",ye.SERVICE="meta::legend::service::metamodel::Service",ye.CONNECTION="meta::pure::runtime::PackageableConnection",ye.RUNTIME="meta::pure::runtime::PackageableRuntime",ye.FILE_GENERATION="meta::pure::generation::metamodel::GenerationConfiguration",ye.GENERATION_SPECIFICATION="meta::pure::generation::metamodel::GenerationSpecification",ye.SECTION_INDEX="meta::pure::metamodel::section::SectionIndex",ye.DATA_ELEMENT="meta::pure::data::DataElement",ye.TDS_ROW="meta::pure::tds::TDSRow",ye.TDS_TABULARDATASET="meta::pure::tds::TabularDataSet",ye.TDS_COLUMN="meta::pure::tds::TDSColumn",(Le=Re=Re||(Re={})).BUSINESS_TEMPORAL="businesstemporal",Le.PROCESSING_TEMPORAL="processingtemporal",Le.BITEMPORAL="bitemporal",(we=Pe=Pe||(Pe={})).ALL_VERSIONS="AllVersions",we.ALL_VERSIONS_IN_RANGE="AllVersionsInRange",(De=be=be||(be={})).STORE="STORE",De.MAPPING="MAPPING",De.RUNTIME="RUNTIME",De.FILE_GENERATION="FILE_GENERATION",De.SERVICE="SERVICE",(Fe=Me=Me||(Me={})).TODAY="meta::pure::functions::date::today",Fe.NOW="meta::pure::functions::date::now",Fe.FIRST_DAY_OF_WEEK="meta::pure::functions::date::firstDayOfThisWeek",Fe.FIRST_DAY_OF_MONTH="meta::pure::functions::date::firstDayOfThisMonth",Fe.FIRST_DAY_OF_QUARTER="meta::pure::functions::date::firstDayOfThisQuarter",Fe.FIRST_DAY_OF_YEAR="meta::pure::functions::date::firstDayOfThisYear",Fe.PREVIOUS_DAY_OF_WEEK="meta::pure::functions::date::previousDayOfWeek",Fe.IS_ON_DAY="meta::pure::functions::date::isOnDay",Fe.IS_ON_OR_AFTER_DAY="meta::pure::functions::date::isOnOrAfterDay",Fe.IS_AFTER_DAY="meta::pure::functions::date::isAfterDay",Fe.IS_ON_OR_BEFORE_DAY="meta::pure::functions::date::isOnOrBeforeDay",Fe.IS_BEFORE_DAY="meta::pure::functions::date::isBeforeDay",Fe.MINUS="meta::pure::functions::math::minus",Fe.ADJUST="meta::pure::functions::date::adjust",Fe.LET="meta::pure::functions::lang::letFunction";const je="yyyy-MM-dd'T'HH:mm:ssxxxx";var ke,Ue,Ge;!function(e){e.PROFILE="Profile",e.CLASS="Class",e.ENUMERATION="Enum",e.MEASURE="Measure",e.ASSOCIATION="Association",e.FUNCTION="function",e.MAPPING="Mapping",e.FLAT_DATA="FlatData",e.DATABASE="Database",e.SERVICE="Service",e.RUNTIME="Runtime",e.CONNECTION="Connection",e.FILE_GENERATION="FileGeneration",e.GENERATION_SPECIFICATION="GenerationSpecification",e.DATA_ELEMENT="Data"}(ke=ke||(ke={})),function(e){e.JSON_MODEL_CONNECTION="JsonModelConnection",e.XML_MODEL_CONNECTION="XmlModelConnection",e.MODEL_CHAIN_CONNECTION="ModelChainConnection",e.RELATIONAL_DATABASE_CONNECTION="RelationalDatabaseConnection",e.FLAT_DATA_CONNECTION="FlatDataConnection"}(Ue=Ue||(Ue={})),function(e){e.PURE="Pure",e.CONNECTION="Connection",e.RUNTIME="Runtime",e.MAPPING="Mapping",e.SERVICE="Service",e.FLATDATA="FlatData",e.RELATIONAL="Relational",e.GENERATION_SPECIFICATION="GenerationSpecification",e.FILE_GENERATION_SPECIFICATION="FileGeneration",e.DATA="Data"}(Ge=Ge||(Ge={}));const Ve=(e,t)=>e===t?e.toString():0===e&&void 0===t?"*":`${e}..${t??"*"}`;var Be;!function(e){e.WHITESPACE="",e.KEYWORD="keyword",e.IDENTIFIER="identifier",e.OPERATOR="operator",e.DELIMITER="delimiter",e.PARSER="parser",e.NUMBER="number",e.DATE="date",e.COLOR="color",e.PACKAGE="package",e.STRING="string",e.COMMENT="comment",e.LANGUAGE_STRUCT="language-struct",e.MULTIPLICITY="multiplicity",e.GENERICS="generics",e.PROPERTY="property",e.PARAMETER="property",e.VARIABLE="variable",e.TYPE="type",e.INVALID="invalid"}(Be=Be||(Be={}));const $e={base:"vs-dark",inherit:!0,colors:{},rules:[{token:Be.IDENTIFIER,foreground:"dcdcaa"},{token:Be.NUMBER,foreground:"b5cea8"},{token:Be.DATE,foreground:"b5cea8"},{token:Be.COLOR,foreground:"b5cea8"},{token:Be.PACKAGE,foreground:"808080"},{token:Be.PARSER,foreground:"c586c0"},{token:Be.LANGUAGE_STRUCT,foreground:"c586c0"},{token:Be.MULTIPLICITY,foreground:"2d796b"},{token:Be.GENERICS,foreground:"2d796b"},{token:Be.PROPERTY,foreground:"9cdcfe"},{token:Be.PARAMETER,foreground:"9cdcfe"},{token:Be.VARIABLE,foreground:"4fc1ff"},{token:Be.TYPE,foreground:"3dc9b0"},{token:`${Be.STRING}.escape`,foreground:"d7ba7d"}]},ze={wordPattern:/(-?\d*\.\d\w*)|([^`~!@#%^$&*()\-=+[{\]}\\|;:'",.<>/?\s][^`~!@#%^&*()\-=+[{\]}\\|;:'",.<>/?\s]*)/,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"<",close:">"},{open:"<<",close:">>"}],folding:{markers:{start:new RegExp("^\\s*//\\s*(?:(?:#?region\\b)|(?:<editor-fold\\b))"),end:new RegExp("^\\s*//\\s*(?:(?:#?endregion\\b)|(?:</editor-fold>))")}}};var He=s(79013);class Ye{schema;deserializeNullAsUndefined;constructor(e,t){this.schema=e,this.deserializeNullAsUndefined=Boolean(t?.deserializeNullAsUndefined)}toJson(e){return(0,He.qC)(this.schema,e)}fromJson(e){return(0,He.vB)(this.schema,this.deserializeNullAsUndefined?(t=e,(0,I.Z)(t,(e=>null!==e))):e);var t}}const We=e=>(0,He.PG)((t=>void 0===t?He.AM:(0,He.qC)(e,t)),(t=>(0,He.vB)(e,t))),Ke=(e,t,s)=>Array.isArray(e)?e.map(t):s?.skipIfEmpty?He.AM:[],Xe=(e,t,s)=>Array.isArray(e)?e.length?e.map((e=>t(e))):s?.skipIfEmpty?He.AM:[]:He.AM,Ze=e=>(0,He.PG)((()=>e),(()=>e));var qe=s(4e4);class Je{_documentationKey;markdownText;title;text;url;related;static serialization=new Ye((0,He.yu)(Je,{markdownText:(0,He.PG)((e=>e),(e=>e.value?e:void 0)),related:(0,He.jt)((0,He.pb)((0,He.Ru)())),title:(0,He.jt)((0,He.Ru)()),text:(0,He.jt)((0,He.Ru)()),url:(0,He.jt)((0,He.Ru)())}));static create(e,t){const s=Je.serialization.fromJson(e);return s._documentationKey=t,s}}const Qe=e=>Object.entries(e).map((e=>({key:e[0],content:Je.create(e[1],e[0])})));class et{url;docRegistry=new Map;contextualDocIndex=new Map;constructor(e){this.url=e.config.documentationUrl,e.pluginManager.getApplicationPlugins().flatMap((e=>e.getExtraKeyedDocumentationEntries?.()??[])).forEach((t=>{this.hasDocEntry(t.key)?e.logService.warn(h.create(Ee.APPLICATION_DOCUMENTATION_LOAD__SKIP),t.key):this.docRegistry.set(t.key,t.content)})),e.config.keyedDocumentationEntries.forEach((e=>this.docRegistry.set(e.key,e.content)));const t=e.pluginManager.getApplicationPlugins().flatMap((e=>e.getExtraContextualDocumentationEntries?.()??[])),s=[];(0,qe.Z)(e.pluginManager.getApplicationPlugins().flatMap((e=>e.getExtraRequiredDocumentationKeys?.()??[])).concat(t.map((e=>e.documentationKey)))).forEach((e=>{this.docRegistry.has(e)||s.push(e)})),s.length&&e.logService.warn(h.create(Ee.APPLICATION_DOCUMENTATION_REQUIREMENT_CHECK__FAILURE),`Can't find corresponding documentation entry for keys:\n${s.map((e=>`- ${e}`)).join("\n")}`),t.forEach((t=>{if(this.hasContextualDocEntry(t.context))e.logService.warn(h.create(Ee.APPLICATION_CONTEXTUAL_DOCUMENTATION_LOAD__SKIP),t.context);else{const e=this.getDocEntry(t.documentationKey);e&&this.contextualDocIndex.set(t.context,e)}})),e.config.contextualDocEntries.forEach((e=>{const t=this.getDocEntry(e.documentationKey);t&&this.contextualDocIndex.set(e.context,t)}))}getDocEntry(e){return this.docRegistry.get(e)}hasDocEntry(e){return this.docRegistry.has(e)}getContextualDocEntry(e){return this.contextualDocIndex.get(e)}hasContextualDocEntry(e){return this.contextualDocIndex.has(e)}getAllDocEntries(){return Array.from(this.docRegistry.values())}publishDocRegistry(){const e={};return this.docRegistry.forEach(((t,s)=>{e[s]=Je.serialization.toJson(t)})),e}publishContextualDocIndex(){const e={};return this.contextualDocIndex.forEach(((t,s)=>{e[s]=t._documentationKey})),e}}class tt{}class st extends tt{debug(e,...t){console.debug(`[${e.timestamp}] ${e.name} ${t.length?":":""}`,...t)}info(e,...t){console.info(`[${e.timestamp}] ${e.name} ${t.length?":":""}`,...t)}warn(e,...t){console.warn(`[${e.timestamp}] ${e.name} ${t.length?":":""}`,...t)}error(e,...t){console.error(`[${e.timestamp}] ${e.name} ${t.length?":":""}`,...t)}}class it{config;logger;pluginManager;basePresets=[];basePlugins=[];baseUrl;pluginRegister;_isConfigured=!1;constructor(e){this.pluginManager=e,this.logger=new st}setup(e){return this.baseUrl=Z(e.baseUrl,"Can't setup application: 'baseUrl' is missing or empty"),this.pluginRegister=e.pluginRegister,this._isConfigured=!0,this}withBasePresets(e){return this.basePresets=e,this.withPresets([])}withBasePlugins(e){return this.basePlugins=e,this.withPlugins([])}withPresets(e){return this.pluginManager.usePresets([...this.basePresets,...e]),this}withPlugins(e){return this.pluginManager.usePlugins([...this.basePlugins,...e]),this}async fetchApplicationConfiguration(e){const t=new _e;let s,i;try{s=await t.get(`${window.location.origin}${e}config.json`)}catch(e){G(e),this.logger.error(h.create(Ee.APPLICATION_CONFIGURATION__FAILURE),e)}z(s,"Can't fetch Legend application configuration");try{i=await t.get(`${window.location.origin}${e}version.json`)}catch(e){G(e),this.logger.error(h.create(Ee.APPLICATION_CONFIGURATION__FAILURE),e)}return z(i,"Can't fetch Legend application version"),[await this.configureApplication({configData:s,versionData:i,baseUrl:e}),s.extensions??{}]}async loadDocumentationRegistryData(e){const t={};await Promise.all([...e.documentationRegistryEntries,...this.pluginManager.getApplicationPlugins().flatMap((e=>e.getExtraDocumentationRegistryEntries?.()??[]))].map((async e=>{try{const s=new _e(e.simple?{options:{credentials:"omit"}}:{}),i=await s.get(Z(e.url,"Can't load documentation registry: 'url' field is missing or empty"));z(i.entries,"Can't load documentation registry data: 'entries' field is missing");const n=e.includes?.map((e=>new RegExp(`^${e.trim().replace(/[\^$\\.+?()[\]{}|]/g,"\\$&").replace(/\*/g,".*")}$`)));Object.entries(i.entries).forEach((([e,s])=>{n&&!n.some((t=>t.test(e)))||t[e]||(t[e]=s)}))}catch(e){G(e),this.logger.warn(h.create(Ee.APPLICATION_DOCUMENTATION_FETCH__FAILURE),e)}}))),e.keyedDocumentationEntries=[...Qe(t),...e.keyedDocumentationEntries]}async start(){z(this._isConfigured,"Legend application has not been configured properly. Make sure to run setup() before start()");try{const[e,t]=await this.fetchApplicationConfiguration(this.baseUrl);this.config=e,this.pluginRegister?.(this.pluginManager,this.config),this.pluginManager.configure(t),this.pluginManager.install(),await Promise.all([this.loadDocumentationRegistryData(e)]),await this.loadApplication(),await Promise.all(this.pluginManager.getApplicationPlugins().flatMap((e=>e.getExtraApplicationSetups?.()??[])).map((e=>e(this.pluginManager)))),this.logger.info(h.create(Ee.APPLICATION_LOAD__SUCCESS),"Legend application loaded")}catch(e){throw G(e),this.logger.error(h.create(Ee.APPLICATION_LOAD__FAILURE),"Failed to load Legend application"),e}}}var nt=s(74926),at=s(34309),rt=s(2784);class ot{historyAPI;_isNavigationBlocked=!1;_forceBypassNavigationBlocking=!1;_blockCheckers=[];_beforeUnloadListener=e=>{this._forceBypassNavigationBlocking||this._blockCheckers.some((e=>e()))&&(e.returnValue="")};onBlock;onNativePlatformNavigationBlock;constructor(e){(0,x.rC)(this,{_isNavigationBlocked:x.LO,isNavigationBlocked:x.Fl,blockNavigation:x.aD,unblockNavigation:x.aD}),this.historyAPI=e}get window(){return H(window,"Window object is not available in non-web environment")}goToLocation(e,t){t?.ignoreBlocking&&(this._forceBypassNavigationBlocking=!0);const s=()=>{this._forceBypassNavigationBlocking=!0,this.window.location.href=this.generateAddress(e)};!this._forceBypassNavigationBlocking&&this._blockCheckers.some((e=>e()))?this.onBlock?.(s):s()}reload(e){e?.ignoreBlocking&&(this._forceBypassNavigationBlocking=!0);const t=()=>{this._forceBypassNavigationBlocking=!0,this.window.location.reload()};!this._forceBypassNavigationBlocking&&this._blockCheckers.some((e=>e()))?this.onBlock?.(t):t()}goToAddress(e,t){t?.ignoreBlocking&&(this._forceBypassNavigationBlocking=!0);const s=()=>{this._forceBypassNavigationBlocking=!0,this.window.location.href=e};!this._forceBypassNavigationBlocking&&this._blockCheckers.some((e=>e()))?this.onBlock?.(s):s()}visitAddress(e){this.window.open(e,"_blank")}updateCurrentLocation(e){this.historyAPI.push(e)}getCurrentAddress(){return this.window.location.href}getCurrentLocation(){return this.historyAPI.location.pathname}generateAddress(e){return this.window.location.origin+this.historyAPI.createHref({pathname:e})}blockNavigation(e,t,s){this._isNavigationBlocked=!0,this.onBlock=t,this.onNativePlatformNavigationBlock=s,this.window.history.pushState(null,"",this.getCurrentAddress()),this.window.onpopstate=()=>{window.history.forward(),this.onNativePlatformNavigationBlock?.()},this._blockCheckers=e,this.window.removeEventListener("beforeunload",this._beforeUnloadListener),this.window.addEventListener("beforeunload",this._beforeUnloadListener)}unblockNavigation(){this._isNavigationBlocked=!1,this.onBlock=void 0,this.window.onpopstate=null,this._blockCheckers=[],this.window.removeEventListener("beforeunload",this._beforeUnloadListener)}get isNavigationBlocked(){return this._isNavigationBlocked}}var lt=s(40979);const ct=(0,rt.createContext)(void 0),dt=({children:e})=>{const t=(0,lt.k6)(),s=(0,at.fv)((()=>new ot(t)));return(0,T.jsx)(ct.Provider,{value:s,children:e})};var ht;!function(e){e.USER="user",e.ENV="env",e.RESULT="result",e.ERROR="error",e.HTTP_STATUS="status",e.HTTP_REQUEST_METHOD="method",e.HTTP_REQUEST_URL="url"}(ht=ht||(ht={}));class ut{traceEntries=[];setup(e){this.traceEntries=e}bootstrap(e){this.traceEntries.forEach((t=>{t.plugin.bootstrap(t.clientSpan,e)}))}reportSuccess(){this.traceEntries.forEach((e=>{e.plugin.concludeClientSpan(e.clientSpan,void 0)}))}reportError(e){this.traceEntries.forEach((t=>{t.plugin.concludeClientSpan(t.clientSpan,e)}))}close(){this.traceEntries.forEach((e=>{e.plugin.concludeServerSpan(e.serverSpan)}))}}class pt{plugins=[];registerPlugins(e){this.plugins=e}createTrace(e,t,s,i){const n=new ut;return e&&n.setup(this.plugins.map((n=>{const a=n.createClientSpan(e);return{clientSpan:a,serverSpan:n.createServerSpan(a,t,s,i),plugin:n}}))),n}}var mt,_t,gt,Et=s(94174);!function(e){e.INITIAL="INITIAL",e.IN_PROGRESS="IN_PROGRESS",e.SUCCEEDED="SUCEEDED",e.FAILED="FAILED"}(mt||(mt={}));class ft{state;_message;_messageFormatter;constructor(){this.state=mt.INITIAL}setMessage(e){this._message=e}setMessageFormatter(e){this._messageFormatter=e}reset(){return this.state=mt.INITIAL,this}inProgress(){return this.state=mt.IN_PROGRESS,this}fail(){return this.state=mt.FAILED,this}pass(){return this.state=mt.SUCCEEDED,this}complete(e=!0){return e?this.pass():this.fail(),this}sync(e){const t=e.exportData();this.state=t.state,this._message=t.message}exportData(){return{state:this.state,message:this._message}}get isInInitialState(){return this.state===mt.INITIAL}get isInProgress(){return this.state===mt.IN_PROGRESS}get hasFailed(){return this.state===mt.FAILED}get hasSucceeded(){return this.state===mt.SUCCEEDED}get message(){return this._message?this._messageFormatter?this._messageFormatter(this._message):this._message:void 0}get hasCompleted(){return this.hasFailed||this.hasSucceeded}static create(){return(0,x.rC)(new ft,{state:x.LO,_message:x.LO,reset:x.aD,inProgress:x.aD,pass:x.aD,fail:x.aD,complete:x.aD,setMessage:x.aD,sync:x.aD,isInInitialState:x.Fl,isInProgress:x.Fl,hasFailed:x.Fl,hasSucceeded:x.Fl,hasCompleted:x.Fl,message:x.Fl})}}!function(e){e.STANDARD="standard",e.INCLUDE="include match",e.EXACT="exact match",e.INVERSE="excludes exact match"}(_t=_t||(_t={}));class Tt{currentMode=_t.STANDARD;onSearchModeChange;constructor(e){(0,x.rC)(this,{currentMode:x.LO,isAdvancedSearchActive:x.Fl,setCurrentMode:x.aD}),this.onSearchModeChange=e}get isAdvancedSearchActive(){return this.currentMode!==_t.STANDARD}generateSearchText(e){switch(this.currentMode){case _t.INCLUDE:return`'"${e}"`;case _t.EXACT:return`="${e}"`;case _t.INVERSE:return`!"${e}"`;default:return e}}setCurrentMode(e){this.currentMode=e,this.onSearchModeChange()}}!function(e){e.SEARCH="SEARCH",e.CONTEXTUAL_SUPPORT="CONTEXTUAL_SUPPORT"}(gt=gt||(gt={}));class Ct{uuid=(0,a.Z)();documentationKey;title;content;url;isOpen=!1;constructor(e){(0,x.rC)(this,{isOpen:x.LO,setIsOpen:x.aD}),this.documentationKey=e._documentationKey,this.title=Z(e.title),this.content=e.markdownText??e.text,this.url=e.url}setIsOpen(e){this.isOpen=e}}class xt{uuid=(0,a.Z)();context;title;content;url;related;constructor(e,t,s){this.context=e,this.title=t.title,this.content=t.markdownText??t.text,this.url=t.url,this.related=s}}const St=e=>Boolean(e.title&&(e.url??e.text??e.markdownText));class Nt{applicationStore;panelRenderingKey=(0,a.Z)();isHidden=!1;isOpen=!1;selectedTab=gt.SEARCH;currentDocumentationEntry;searchEngine;searchConfigurationState;searchState=ft.create();searchText="";searchResults=[];showSearchConfigurationMenu=!1;isOverSearchLimit=!1;constructor(e){(0,x.rC)(this,{isHidden:x.LO,isOpen:x.LO,panelRenderingKey:x.LO,isOverSearchLimit:x.LO,selectedTab:x.LO,searchText:x.LO,searchResults:x.LO,currentDocumentationEntry:x.LO,showSearchConfigurationMenu:x.LO,currentContextualDocumentationEntry:x.Fl,setIsHidden:x.aD,setIsOpen:x.aD,setSelectedTab:x.aD,setSearchText:x.aD,resetSearch:x.aD,search:x.aD,openDocumentationEntry:x.aD,refreshPanelRendering:x.aD,setShowSearchConfigurationMenu:x.aD}),this.applicationStore=e,this.searchEngine=new Et.Fuse(this.applicationStore.documentationService.getAllDocEntries().filter(St),{includeScore:!0,shouldSort:!0,ignoreLocation:!0,threshold:.2,keys:[{name:"title",weight:4},{name:"text",weight:1},{name:"markdownText.value",weight:1}],useExtendedSearch:!0}),this.searchConfigurationState=new Tt((()=>{this.search()}))}get currentContextualDocumentationEntry(){if(!this.applicationStore.navigationContextService.currentContext)return;const e=this.applicationStore.navigationContextService.currentContext.key,t=this.applicationStore.documentationService.getContextualDocEntry(e);return t?new xt(e,t,(t.related??[]).map((e=>this.applicationStore.documentationService.getDocEntry(e))).filter($).filter(St).map((e=>new Ct(e)))):void 0}openDocumentationEntry(e){const t=this.applicationStore.documentationService.getAllDocEntries().find((t=>t._documentationKey===e));t&&(this.setIsOpen(!0),this.setIsHidden(!1),this.currentDocumentationEntry=new Ct(t),this.currentDocumentationEntry.setIsOpen(!0),this.resetSearch())}setIsHidden(e){this.isHidden=e}hideAssistant(){this.setIsHidden(!0),this.setIsOpen(!1)}toggleAssistant(){this.isHidden?this.setIsHidden(!1):this.hideAssistant()}setIsOpen(e){this.isOpen=e}setSelectedTab(e){this.selectedTab=e}refreshPanelRendering(){this.panelRenderingKey=(0,a.Z)()}setSearchText(e){this.searchText=e}resetSearch(){this.searchText="",this.searchResults=[],this.searchState.complete()}search(){this.searchText?(this.currentDocumentationEntry=void 0,this.searchState.inProgress(),this.searchResults=Array.from(this.searchEngine.search(this.searchConfigurationState.generateSearchText(this.searchText),{limit:101}).values()).map((e=>new Ct(e.item))),this.searchResults.length>100?(this.isOverSearchLimit=!0,this.searchResults=this.searchResults.slice(0,100)):this.isOverSearchLimit=!1,this.searchState.complete()):this.searchResults=[]}setShowSearchConfigurationMenu(e){this.showSearchConfigurationMenu=e}}class At{notifierPlugins=[];registerEventNotifierPlugins(e){this.notifierPlugins=e}notify(e,t){this.notifierPlugins.forEach((s=>s.notify(e,t)))}}var vt;!function(e){e.GRAPH_BUILDER_DESERIALIZE_ELEMENTS__SUCCESS="graph-manager.graph-builder.deserialization.success",e.GRAPH_BUILDER_INDEX_ELEMENTS__SUCCESS="graph-manager.graph-builder.indexing.success",e.GRAPH_BUILDER_BUILD_SECTION_INDICES__SUCCESS="graph-manager.graph-builder.build-section-indices.success",e.GRAPH_BUILDER_BUILD_DOMAIN_MODELS__SUCCESS="graph-manager.graph-builder.build-domain-models.success",e.GRAPH_BUILDER_BUILD_STORES__SUCCESS="graph-manager.graph-builder.build-store.success",e.GRAPH_BUILDER_BUILD_MAPPINGS__SUCCESS="graph-manager.graph-builder.build-mappings.success",e.GRAPH_BUILDER_BUILD_CONNECTIONS_AND_RUNTIMES__SUCCESS="graph-manager.graph-builder.build-connections-and-runtimes.success",e.GRAPH_BUILDER_BUILD_SERVICES__SUCCESS="graph-manager.graph-builder.build-services.success",e.GRAPH_BUILDER_BUILD_DATA_ELEMENTS__SUCCESS="graph-manager.graph-builder.build-data.success",e.GRAPH_BUILDER_BUILD_OTHER_ELEMENTS__SUCCESS="graph-manager.graph-builder.build-other-elements.success",e.GRAPH_BUILDER_BUILD_GRAPH__SUCCESS="graph-manager.graph-builder.success",e.INITIALIZE_GRAPH__SUCCESS="graph-manager.graph-initialization.success",e.INITIALIZE_GRAPH_SYSTEM__SUCCESS="graph-manager.system-initialization.success",e.FETCH_GRAPH_DEPENDENCIES__SUCCESS="graph-manager.fetch-dependencies.success",e.FETCH_GRAPH_ENTITIES__SUCCESS="graph-manager.entities-dependencies.success",e.TRANSFORM_GRAPH_META_MODEL_TO_PROTOCOL__SUCCESS="graph-manager.transformation.success",e.COLLECT_GRAPH_COMPILE_CONTEXT__SUCCESS="graph-manager.build-graph-compile-context.success",e.SERIALIZE_GRAPH_PROTOCOL__SUCCESS="graph-manager.graph-serialization.success",e.SERIALIZE_GRAPH_CONTEXT_PROTOCOL__SUCCESS="graph-manager.graph-context-serialization.success",e.UPDATE_AND_REBUILD_GRAPH__SUCCESS="graph-manager.rebuild.success",e.TRANSFORM_GRAPH_META_MODEL_TO_GRAMMAR__SUCCESS="graph-manager.grammar.composing.success",e.TRANSOFMR_GRAPH_GRAMMAR_TO_META_MODEL__SUCCESS="graph-manager.grammar.parsing.success",e.V1_ENGINE_OPERATION_SERVER_CALL__SUCCESS="graph-manager.v1.engine-operation.server-call.success",e.V1_ENGINE_OPERATION_INPUT__SUCCESS="graph-manager.v1.engine-operation.graph.collect-input.success",e.GRAPH_BUILDER_FAILURE="graph-manager.graph-builder.failure",e.EXECUTION_FAILURE="graph-manager.execution.failure",e.COMPILATION_FAILURE="graph-manager.compilation.failure",e.PARSING_FAILURE="graph-manager.grammar.parsing.failure",e.GRAPH_MANAGER_FAILURE="graph-manager.failure",e.CACHE_MANAGER_FAILURE="graph-manager.cache.failure"}(vt=vt||(vt={}));class It{static logEvent_ApplicationInitializationSucceeded(e,t){e.logEvent(Ee.APPLICATION_LOAD__SUCCESS,{application:{name:t.config.appName,version:t.config.appVersion,env:t.config.env},browser:{userAgent:navigator.userAgent},screen:{height:window.screen.height,width:window.screen.width}})}static logEvent_ApplicationContextAccessed(e,t){e.logEvent(Ee.APPLICATION_CONTEXT__ACCESS,t)}static logEvent_VirtualAssistantDocumentationEntryAccessed(e,t){e.logEvent(Ee.VIRTUAL_ASSISTANT_DOCUMENTATION_ENTRY__ACCESS,t)}static logEvent_GraphInitializationSucceeded(e,t){e.logEvent(vt.INITIALIZE_GRAPH__SUCCESS,t)}static logEvent_ApplicationUsageInterrupted(e){e.logEvent(Ee.APPLICATION_USAGE__INTERRUPT,{})}}class Ot{applicationStore;contextStack=[];constructor(e){(0,x.rC)(this,{contextStack:x.LO,currentContext:x.Fl,push:x.aD,pop:x.aD}),this.applicationStore=e}get currentContext(){return this.contextStack.length?this.contextStack[this.contextStack.length-1]:void 0}push(e){const t=this.contextStack.filter((e=>!e.isTransient));if(t.find((t=>t.key===e.key)))throw new k(`Found multiple context '${e.key}' in application navigation context stack`);t.push(e),this.applicationStore.pluginManager.getApplicationPlugins().flatMap((e=>e.getExtraAccessEventLoggingApplicationContextKeys?.()??[])).includes(e.key)&&It.logEvent_ApplicationContextAccessed(this.applicationStore.telemetryService,{key:e.key}),this.contextStack=t}pop(e){const t=this.contextStack.find((t=>t.key===e.key));if(!t)return;const s=this.contextStack.indexOf(t);-1!==s&&(this.contextStack=this.contextStack.slice(0,s).filter((e=>!e.isTransient)))}}class yt{applicationStore;commandRegistry=new Map;constructor(e){(0,x.rC)(this,{commandRegistry:x.LO,registerCommand:x.aD,deregisterCommand:x.aD}),this.applicationStore=e}registerCommand(e){const t=e.key;this.commandRegistry.has(t)?this.applicationStore.logService.warn(h.create(Ee.APPLICATION_COMMAND_CENTER_REGISTRATION__FAILURE),"Can't register command: command is already registered"):this.commandRegistry.set(t,e)}deregisterCommand(e){this.commandRegistry.delete(e)}runCommand(e,t){const s=this.commandRegistry.get(e);return!(!s||s.trigger&&!s.trigger()||(s.action?.(t),0))}}class Rt{applicationStore;keyMap=new Map;commandKeyMap=new Map;isHotkeysBlocked=!1;constructor(e){(0,x.rC)(this,{keyMap:x.LO,commandKeyMap:x.LO,isHotkeysBlocked:x.LO,addHotkey:x.aD,blockGlobalHotkeys:x.aD,unblockGlobalHotkeys:x.aD}),this.applicationStore=e,this.applicationStore.pluginManager.getApplicationPlugins().flatMap((e=>e.getExtraKeyedCommandConfigEntries?.()??[])).forEach((e=>{const t=[e.content.defaultKeyboardShortcut,...e.content.additionalKeyboardShortcuts??[]].filter($);t.length?t.forEach((t=>this.addHotkey(e.key,t))):this.commandKeyMap.has(e.key)||this.commandKeyMap.set(e.key,[])}))}blockGlobalHotkeys(){this.isHotkeysBlocked=!0}unblockGlobalHotkeys(){this.isHotkeysBlocked=!1}addHotkey(e,t){this.commandKeyMap.set(e,[...this.commandKeyMap.get(e)??[],t]),this.keyMap.set(t,[...(this.keyMap.get(t)??[]).filter((t=>t!==e)),e])}dispatch(e){if(this.isHotkeysBlocked)return;const t=this.keyMap.get(e)??[];for(const e of t)if(this.applicationStore.commandService.runCommand(e))return}}var Pt,wt=s(77289),Lt=s(73678),bt=s(78440),Dt=s(51919),Mt=s(85399),Ft=s(89358);!function(e){e.RESET="[0m",e.BOLD="[1m",e.DIM="[2m",e.ITALIC="[3m",e.UNDERLINE="[4m",e.BLINKING="[5m",e.STRIKETHROUGH="[9m",e.BLACK="[30m",e.RED="[31m",e.GREEN="[32m",e.YELLOW="[33m",e.BLUE="[34m",e.MAGENTA="[35m",e.CYAN="[36m",e.WHITE="[37m",e.BRIGHT_BLACK="[1;30m",e.BRIGHT_RED="[1;31m",e.BRIGHT_GREEN="[1;32m",e.BRIGHT_YELLOW="[1;33m",e.BRIGHT_BLUE="[1;34m",e.BRIGHT_MAGENTA="[1;35m",e.BRIGHT_CYAN="[1;36m",e.BRIGHT_WHITE="[1;37m",e.DIMMED_BLACK="[2;30m",e.DIMMED_RED="[2;31m",e.DIMMED_GREEN="[2;32m",e.DIMMED_YELLOW="[2;33m",e.DIMMED_BLUE="[2;34m",e.DIMMED_MAGENTA="[2;35m",e.DIMMED_CYAN="[2;36m",e.DIMMED_WHITE="[2;37m",e.BLACK_BG="[40m",e.RED_BG="[41m",e.GREEN_BG="[42m",e.YELLOW_BG="[43m",e.BLUE_BG="[44m",e.MAGENTA_BG="[45m",e.CYAN_BG="[46m",e.WHITE_BG="[47m",e.BRIGHT_BLACK_BG="[1;40m",e.BRIGHT_RED_BG="[1;41m",e.BRIGHT_GREEN_BG="[1;42m",e.BRIGHT_YELLOW_BG="[1;43m",e.BRIGHT_BLUE_BG="[1;44m",e.BRIGHT_MAGENTA_BG="[1;45m",e.BRIGHT_CYAN_BG="[1;46m",e.BRIGHT_WHITE_BG="[1;47m",e.DIMMED_BLACK_BG="[2;40m",e.DIMMED_RED_BG="[2;41m",e.DIMMED_GREEN_BG="[2;42m",e.DIMMED_YELLOW_BG="[2;43m",e.DIMMED_BLUE_BG="[2;44m",e.DIMMED_MAGENTA_BG="[2;45m",e.DIMMED_CYAN_BG="[2;46m",e.DIMMED_WHITE_BG="[2;47m"}(Pt=Pt||(Pt={}));const jt=(e,t)=>`[${e};${t}H`;class kt{searchInput;searchText="";useRegex=!1;matchWholeWord=!1;matchCaseSensitive=!1;resultCount;currentResultIndex;constructor(){(0,x.rC)(this,{searchText:x.LO,useRegex:x.LO,matchWholeWord:x.LO,matchCaseSensitive:x.LO,resultCount:x.LO,currentResultIndex:x.LO})}setSearchInput(e){this.searchInput=e}focus(){this.searchInput?.focus()}}class Ut{applicationStore;searchConfig=new kt;constructor(e){(0,x.rC)(this,{setSearchText:x.aD,setSearchRegex:x.aD,setSearchWholeWord:x.aD,setSearchCaseSensitive:x.aD,setSearchResultCount:x.aD,setSearchCurrentResultIndex:x.aD}),this.applicationStore=e}setSearchText(e){this.searchConfig.searchText=e}setSearchRegex(e){this.searchConfig.useRegex=e}setSearchWholeWord(e){this.searchConfig.matchWholeWord=e}setSearchCaseSensitive(e){this.searchConfig.matchCaseSensitive=e}setSearchResultCount(e){this.searchConfig.resultCount=e}setSearchCurrentResultIndex(e){this.searchConfig.currentResultIndex=e}}class Gt extends Ut{preserveLog=!1;commandRegistry=new Map;constructor(e){super(e),(0,x.rC)(this,{preserveLog:x.LO,setPreserveLog:x.aD})}setPreserveLog(e){this.preserveLog=e}showHelp(){}showCommonANSIEscapeSequences(){}}var Vt=s(1367),Bt=s(67295),$t=s(72531);s(90286);const zt=e=>e.length>=1?`${e[0].toUpperCase()}${e.substring(1,e.length)}`:e,Ht=e=>(e??"").trim().replace(/^(?:\w+)\b/u,(e=>zt(e))),Yt=["a","an","the","but","by","nor","and","or","so","as","yet","for","in","nor","of","on","at","out","to","up"],Wt=["Id","ID"],Kt=e=>{try{return((e,t=2)=>{try{return((e,t,s)=>{const i=(0,Bt.P)(e,void 0,s);return z(i,"Can't stringify lossless JSON value"),i})((0,$t.Qc)(e),0,t)}catch{return e}})(e,0)}catch{return e.replace(/\n\s*/g,"")}};var Xt;function Zt(e){return e.trim().split(" ").map((e=>{const t=e.split(/\b\+/),s=H(t.pop(),"Can't parse key binding: last part must be a non-modifier key");return{modifiers:t,key:s}}))}!function(e){e.TAB="Tab",e.CAPSLOCK="CapsLock",e.SHIFT="Shift",e.META="Meta",e.ALT="Alt",e.CONTROL="Control",e.SPACE="Space",e.ESC="Escape",e.LEFT="ArrowLeft",e.RIGHT="ArrowRight",e.UP="ArrowUp",e.DOWN="ArrowDown",e.ENTER="Enter",e.DELETE="Delete",e.BACKSPACE="Backspace",e.BACKQUOTE="Backquote"}(Xt=Xt||(Xt={}));const qt=(e,t)=>t.key===e.code&&t.modifiers.every((t=>e.getModifierState(t)))&&![Xt.SHIFT,Xt.META,Xt.ALT,Xt.CONTROL].find((s=>t.key!==s&&e.getModifierState(s)&&!t.modifiers.includes(s))),Jt=(e,t)=>qt(e,H(Zt(t)[0]));var Qt=s(4707),es=s(3493),ts=s(53908);const ss=(0,Qt.Z)({transitions:{create:()=>"none"}}),is=e=>{const{children:t}=e;return(0,T.jsx)(es.Z,{injectFirst:!0,children:(0,T.jsx)(ts.Z,{theme:ss,children:t})})};var ns=s(83820),as=s(96242),rs=s(12238),os=s(78683),ls=s(81934),cs=s(6277);const ds=(e,t)=>{const s=e=>{const{children:s,className:i}=e;return(0,T.jsx)("div",{className:(0,cs.clsx)(t,i),children:s})};return s.displayName=e,s},hs=e=>{const{children:t,darkMode:s,className:i}=e;return(0,T.jsx)("div",{className:(0,cs.clsx)("modal",{"modal--dark":s},i),children:t})},us=e=>{const{title:t,icon:s,className:i}=e;return(0,T.jsxs)("div",{className:(0,cs.clsx)("modal__title",i),children:[s&&(0,T.jsx)("div",{className:"modal__title__icon",children:s}),(0,T.jsx)("div",{className:"modal__title__label",children:(n=t,(n??"").trim().replace(/\b(?:\w+)\b/gu,(e=>Yt.includes(e.toLowerCase())?e.toLowerCase():zt(e))).replace(/^(?:\w+)\b/u,(e=>zt(e))).replace(/\b(?:\w+)$/u,(e=>zt(e))))})]});var n},ps=e=>{const{title:t,children:s,className:i}=e;return!s&&t?(0,T.jsx)("div",{className:(0,cs.clsx)("modal__header",i),children:(0,T.jsx)(us,{title:t})}):(0,T.jsx)("div",{className:(0,cs.clsx)("modal__header",i),children:s})},ms=(ds("ModalHeaderActions","modal__header__actions"),ds("ModalBody","modal__body")),_s=ds("ModalFooter","modal__footer");var gs,Es;ds("ModalFooterStatus","modal__footer__status"),function(e){e.STANDARD="STANDARD",e.CAUTION="CAUTION"}(gs=gs||(gs={})),function(e){e.STANDARD="STANDARD",e.PROCEED_WITH_CAUTION="PROCEED_WITH_CAUTION",e.PROCEED="PROCEED"}(Es=Es||(Es={}));class fs{applicationStore;blockingAlertInfo;actionAlertInfo;constructor(e){(0,x.rC)(this,{blockingAlertInfo:x.LO,actionAlertInfo:x.LO,setBlockingAlert:x.aD,setActionAlertInfo:x.aD}),this.applicationStore=e}setBlockingAlert(e){e?this.applicationStore.keyboardShortcutsService.blockGlobalHotkeys():this.applicationStore.keyboardShortcutsService.unblockGlobalHotkeys(),this.blockingAlertInfo=e}setActionAlertInfo(e){this.actionAlertInfo&&e&&this.applicationStore.notificationService.notifyIllegalState("Action alert is stacked: new alert is invoked while another one is being displayed"),e?this.applicationStore.keyboardShortcutsService.blockGlobalHotkeys():this.applicationStore.keyboardShortcutsService.unblockGlobalHotkeys(),this.actionAlertInfo=e}}const Ts=e=>{switch(e){case Es.PROCEED_WITH_CAUTION:return"btn--caution";case Es.PROCEED:case Es.STANDARD:default:return"btn--dark"}},Cs=(0,at.Pi)((e=>{const{info:t}=e,s=yi(),{title:i,message:n,prompt:a,type:r,onClose:o,onEnter:l,actions:c}=t,d=()=>{o?.(),s.alertService.setActionAlertInfo(void 0)};return(0,T.jsx)(ls.Z,{open:Boolean(s.alertService.actionAlertInfo),onClose:R,TransitionProps:{onEnter:()=>l?.()},children:(0,T.jsxs)("form",{onSubmit:e=>{e.preventDefault(),c.find((e=>e.default))?.handler?.(),d()},className:`modal search-modal modal--dark blocking-alert blocking-alert--${(r??gs.STANDARD).toLowerCase()}`,children:[i&&(0,T.jsx)(ps,{title:i}),(0,T.jsxs)(ms,{children:[(0,T.jsx)("div",{className:"blocking-alert__summary-text",children:n}),(0,T.jsx)("div",{className:"blocking-alert__prompt-text",children:a})]}),(0,T.jsxs)(_s,{children:[c.map(((e,t)=>(0,T.jsx)("button",{type:e.default?"submit":"button",className:`btn btn--dark ${Ts(e.type??Es.STANDARD)}`,onClick:t=>{t.preventDefault(),e.handler?.(),d()},autoFocus:Boolean(e.default),children:e.label},t))),!c.length&&(0,T.jsx)("button",{type:"button",className:"btn btn--dark blocking-alert__action--standard",onClick:d,children:"Cancel"})]})]})})})),xs=(0,at.Pi)((()=>{const e=yi().alertService.actionAlertInfo;return e?(0,T.jsx)(Cs,{info:e}):null})),Ss=e=>{const{isLoading:t}=e,s=(0,rt.useRef)(null);return(0,rt.useEffect)((()=>{s.current&&(t?s.current.parentElement?.classList.add("panel-loading-indicator__container"):s.current.parentElement?.classList.remove("panel-loading-indicator__container"))}),[t]),(0,T.jsx)("div",{ref:s,className:"panel-loading-indicator"+(t?"":"--disabled")})},Ns=(0,at.Pi)((()=>{const e=yi().alertService.blockingAlertInfo;return e?(0,T.jsx)(ls.Z,{open:Boolean(e),onClose:R,classes:{root:"blocking-alert__root-container",container:"blocking-alert__container"},children:(0,T.jsxs)(hs,{darkMode:!0,className:"blocking-alert",children:[(0,T.jsx)(Ss,{isLoading:Boolean(e.showLoading)}),(0,T.jsxs)(ms,{children:[(0,T.jsx)("div",{className:"blocking-alert__message",children:e.message}),e.prompt&&(0,T.jsx)("div",{className:"blocking-alert__message__prompt",children:e.prompt})]})]})}):null}));var As=s(12889),vs=s(73882),Is=s(53083);const Os=6e3;var ys;!function(e){e.ILEGAL_STATE="ILEGAL_STATE",e.ERROR="ERROR",e.WARNING="WARNING",e.SUCCESS="SUCCESS",e.INFO="INFO"}(ys=ys||(ys={}));class Rs{severity;message;actions;autoHideDuration;constructor(e,t,s,i){this.severity=e,this.message=t,this.actions=s,this.autoHideDuration=i}}class Ps{notification;constructor(){(0,x.rC)(this,{notification:x.LO,setNotification:x.aD,notify:x.aD,notifySuccess:x.aD,notifyWarning:x.aD,notifyIllegalState:x.aD,notifyError:x.aD})}setNotification(e){this.notification=e}notify(e,t,s){this.setNotification(new Rs(ys.INFO,e,t??[],null===s?void 0:s??Os))}notifySuccess(e,t,s){this.setNotification(new Rs(ys.SUCCESS,e,t??[],null===s?void 0:s??Os))}notifyWarning(e,t,s){this.setNotification(new Rs(ys.WARNING,e instanceof Error?e.message:e,t??[],null===s?void 0:s??Os))}notifyError(e,t){let s;e instanceof F?s=e.detail:e instanceof Error?s=e.message:(q(J(e),"Can't display error"),s=e),s&&this.setNotification(new Rs(ys.ERROR,s,t??[],void 0))}notifyIllegalState(e,t,s){this.setNotification(new Rs(ys.ILEGAL_STATE,J(e)?`[PLEASE NOTIFY DEVELOPER] ${e}`:e,t??[],null===s?void 0:s??Os))}notifyUnsupportedFeature(e){this.notifyWarning(`Unsupported feature: ${e}`)}notifyAndReturnAlternativeOnError=(e,t)=>{try{return e()}catch(e){return G(e),this.notifyIllegalState(e.message),t}}}const ws=(0,at.Pi)((()=>{const e=yi(),t=e.notificationService.notification,s=Boolean(t),i=t?.message??"",n=t?.severity??ys.INFO,[a,r]=(0,rt.useState)(!1);let o=(0,T.jsx)("div",{className:"notification__message__content__icon notification__message__content__icon--info",children:(0,T.jsx)(As.uMt,{})});switch(n){case ys.ILEGAL_STATE:o=(0,T.jsx)("div",{className:"notification__message__content__icon notification__message__content__icon--error",children:(0,T.jsx)(As.nnZ,{})});break;case ys.ERROR:o=(0,T.jsx)("div",{className:"notification__message__content__icon notification__message__content__icon--error",children:(0,T.jsx)(As.xDH,{})});break;case ys.WARNING:o=(0,T.jsx)("div",{className:"notification__message__content__icon notification__message__content__icon--warning",children:(0,T.jsx)(As.LPM,{})});break;case ys.SUCCESS:o=(0,T.jsx)("div",{className:"notification__message__content__icon notification__message__content__icon--success",children:(0,T.jsx)(As.rE2,{})})}const l=()=>{e.notificationService.setNotification(void 0),r(!1)},c=e.guardUnhandledError((()=>e.clipboardService.copyTextToClipboard(i)));return(0,T.jsx)(vs.Z,{classes:{root:"notification",anchorOriginBottomRight:"notification__position"},anchorOrigin:{vertical:"bottom",horizontal:"right"},open:s,autoHideDuration:t?t.autoHideDuration??null:Os,onClose:(e,t)=>{"timeout"===t&&l()},children:(0,T.jsx)(Is.Z,{classes:{root:"notification__content",message:"notification__message",action:"notification__actions"},message:(0,T.jsxs)("div",{className:"notification__message__content",children:[o,(0,T.jsx)("div",{className:(0,cs.clsx)("notification__message__content__text",{"notification__message__content__text--expanded":a}),onClick:c,title:"Click to Copy",children:i})]}),action:[(0,T.jsx)("button",{className:"notification__action",id:"expand_button",onClick:()=>r(!a),tabIndex:-1,title:a?"Collapse":"Expand",children:a?(0,T.jsx)(As.v4q,{}):(0,T.jsx)(As.g8U,{})},"expand"),(0,T.jsx)("button",{className:"notification__action",onClick:l,tabIndex:-1,title:"Dismiss",children:(0,T.jsx)(As.q1B,{})},"close")]})},"string"==typeof i||"number"==typeof i?i:"")}));var Ls=s(17954);const bs=e=>{const{children:t,classes:s,...i}=e;return(0,T.jsx)(Ls.Z,{classes:{...s??{},paper:"mui-menu__paper",list:"mui-menu__list"},transitionDuration:0,...i,children:e.children})},Ds=e=>{const{className:t,children:s,menuProps:i,content:n,disabled:a,onClose:r,onOpen:o}=e,l=(0,rt.useRef)(null),[c,d]=(0,rt.useState)(!1),[h,u]=(0,rt.useState)(),[p,m]=(0,rt.useState)(0),[_,g]=(0,rt.useState)(0),E=()=>{u(void 0),d(!1),g(0),m(0)},f=e=>{e.stopPropagation(),e.preventDefault(),E(),r?.()},C=e=>{if(e.stopPropagation(),e.preventDefault(),!a&&(o?.(),l.current)){const t=l.current.getBoundingClientRect(),s=t.left+(window.scrollX||document.documentElement.scrollLeft),i=t.top+(window.scrollY||document.documentElement.scrollTop),{clientX:n,clientY:a,target:o}=e,c=o;if(h!==c&&!(document.elementsFromPoint(n,a).some((e=>e===c))&&s<=n&&n<=s+t.width&&i<=a&&a<=i+t.height))return E(),void r?.();u(c),d(!0),g(a),m(n)}};return(0,T.jsxs)("div",{ref:l,className:t,onContextMenu:C,children:[s,(0,T.jsx)(bs,{open:c,anchorPosition:{left:p,top:_},onClose:f,anchorReference:"anchorPosition",BackdropProps:{invisible:!0,onContextMenu:C},disableRestoreFocus:!0,transitionDuration:0,onClick:f,...i,children:n},`${p}, ${_}`)]})},Ms=(0,rt.forwardRef)((function(e,t){const{className:s,children:i,...n}=e;return(0,T.jsx)("div",{ref:t,className:(0,cs.clsx)("menu",s),...n,children:i})})),Fs=e=>{const{className:t,onClick:s,title:i,disabled:n,children:a,...r}=e;return(0,T.jsx)("button",{className:(0,cs.clsx)("menu__item",t),disabled:Boolean(n),title:i,onClick:s,...r,children:a})},js=ds("MenuContentDivider","menu__divider");ds("MenuContentItemIcon","menu__item__icon"),ds("MenuContentItemLabel","menu__item__label");var ks=s(95081),Us=s(53019);const Gs=e=>(0,T.jsx)(ks.D,{className:(0,cs.clsx)("markdown-content",e.className),remarkPlugins:[Us.Z],children:e.value.value});var Vs=s(62515);const Bs=e=>{const{children:t}=e,{ref:s,width:i,height:n}=(0,Vs.NB)({refreshMode:"throttle",refreshRate:50,refreshOptions:{trailing:!0}}),[a,r]=(0,rt.useState)(!1),{ref:o,width:l,height:c}=(0,Vs.NB)({refreshMode:"throttle",refreshRate:50,refreshOptions:{trailing:!0}});return(0,rt.useEffect)((()=>{r((l??0)>(i??0)+40&&(c??0)>(n??0)+40)}),[l,c,i,n]),(0,T.jsx)("div",{ref:o,className:"panel__content__blank",children:(0,T.jsx)("div",{ref:s,className:(0,cs.clsx)("panel__content__blank__content",{"panel__content__blank__content--hide":!a}),children:t})})};var $s=s(33207);const zs=e=>{const{children:t,...s}=e;return(0,T.jsx)($s.ZP,{classes:{paper:"mui-popover__paper"},transitionDuration:0,...s,children:e.children})};var Hs=s(13474),Ys=s(65068),Ws=s(41327),Ks=s(85688),Xs=s(28019),Zs=s(8978);const qs=e=>{const{children:t,options:s,size:i,className:n,...a}=e,r=((e,t)=>{const s=[];for(let i=0;i<e.length;i+=t)s.push(e.slice(i,i+t));return s})(s,i);return(0,T.jsxs)("div",{className:(0,cs.clsx)("mui-radio-group",n),children:[r.map(((e,t)=>(0,T.jsx)("div",{children:(0,T.jsx)(Ks.Z,{className:"mui-radio-group__group",...a,children:e.map((e=>(0,T.jsx)(Xs.Z,{className:"mui-radio-group__group__column",style:{width:100/i+"%"},value:e,control:(0,T.jsx)(Zs.Z,{className:"mui-radio-group__group__item__radio-btn"}),label:(0,T.jsx)("div",{className:"mui-radio-group__group__item__label",children:e})},e)))})},t))),t]})};var Js;!function(e){e.TUTORIAL_QUERY_BUILDER="tutorial.query.builder",e.QUESTION_HOW_TO_USE_ADVANCED_SEARCH_SYNTAX="question.how-to-use-advanced-search-syntax",e.QUESTION_WHEN_TO_CONFIGURE_PLATFORM_VERSIONS="question.when-to-configure-project-platform-dependencies-versions",e.QUESTION_HOW_TO_WRITE_A_SERVICE_TEST="question.how-to-write-a-service-test",e.QUESTION_WHY_DO_I_SEE_ERROR_WITH_ASSOCIATION_PROPERTY_TYPE="question.why-do-i-see-error-with-association-property-type",e.QUESTION_HOW_TO_ADD_PARAMETERS_TO_QUERY="question.how-to-add-parameters-to-query",e.QUESTION_HOW_TO_ADD_CONSTANTS_TO_QUERY="question.how-to-add-constants-to-query",e.QUESTION_HOW_TO_WRITE_SERVICE_CONNECTION_TEST_DATA="question.how-to-write-service-connection-test-data",e.QUESTION_HOW_TO_CREATE_A_DATA_ELEMENT="question.how-to-create-a-data-element"}(Js=Js||(Js={}));const Qs=(0,at.Pi)((e=>{const{configState:t}=e,s=yi();return(0,T.jsxs)("div",{className:"text-search-advanced-config__panel",children:[(0,T.jsxs)("div",{className:"text-search-advanced-config__panel__header__label",children:["search config",(0,T.jsx)("button",{className:"text-search-advanced-config__panel__header__hint",tabIndex:-1,onClick:()=>s.assistantService.openDocumentationEntry(Js.QUESTION_HOW_TO_USE_ADVANCED_SEARCH_SYNTAX),title:"Click to see more details on advanced search",children:(0,T.jsx)(As.uMt,{})})]}),(0,T.jsx)("div",{children:(0,T.jsx)(qs,{className:"text-search-advanced-config__options",value:t.currentMode,onChange:e=>{const s=e.target.value;t.setCurrentMode(s)},row:!1,options:[_t.STANDARD,_t.INCLUDE,_t.EXACT,_t.INVERSE],size:1})})]})})),ei=(0,at.Pi)((e=>{const{entry:t}=e,s=yi(),i=()=>{t.isOpen||It.logEvent_VirtualAssistantDocumentationEntryAccessed(s.telemetryService,{key:t.documentationKey}),t.setIsOpen(!t.isOpen)},n=s.guardUnhandledError((()=>s.clipboardService.copyTextToClipboard(t.documentationKey)));return(0,T.jsx)(Ds,{className:"virtual-assistant__doc-entry",menuProps:{elevation:7,classes:{root:"virtual-assistant__context-menu"}},content:(0,T.jsx)(Ms,{children:(0,T.jsx)(Fs,{onClick:n,children:"Copy Documentation Key"})}),children:(0,T.jsxs)("div",{className:"virtual-assistant__doc-entry",children:[(0,T.jsxs)("div",{className:"virtual-assistant__doc-entry__header",children:[(0,T.jsx)("button",{className:(0,cs.clsx)("virtual-assistant__doc-entry__expand-icon",{"virtual-assistant__doc-entry__expand-icon--disabled":!t.content}),disabled:!t.content,tabIndex:-1,onClick:i,children:t.isOpen?(0,T.jsx)(As.v4q,{}):(0,T.jsx)(As.XCv,{})}),t.url?(0,T.jsx)("a",{className:"virtual-assistant__doc-entry__title virtual-assistant__doc-entry__title--link",rel:"noopener noreferrer",target:"_blank",href:t.url,onClick:()=>{It.logEvent_VirtualAssistantDocumentationEntryAccessed(s.telemetryService,{key:t.documentationKey})},title:"Click to see external documentation",children:t.title}):(0,T.jsx)("div",{className:"virtual-assistant__doc-entry__title",onClick:i,children:t.title})]}),t.isOpen&&t.content&&(0,T.jsx)("div",{className:"virtual-assistant__doc-entry__content",children:J(t.content)?(0,T.jsx)("div",{className:"virtual-assistant__doc-entry__content__text",children:t.content}):(0,T.jsx)(Gs,{className:"virtual-assistant__doc-entry__content__markdown-text",value:t.content})})]})})})),ti=(0,at.Pi)((()=>{const e=yi(),t=e.assistantService.currentContextualDocumentationEntry,s=e.guardUnhandledError((()=>e.clipboardService.copyTextToClipboard(t?.context??""))),i=e.guardUnhandledError((()=>e.clipboardService.copyTextToClipboard(e.navigationContextService.currentContext?.key??""))),n=e.guardUnhandledError((()=>e.clipboardService.copyTextToClipboard(e.navigationContextService.contextStack.map((e=>e.key)).join(" > "))));return(0,T.jsxs)(Ds,{className:"virtual-assistant__contextual-support",disabled:!t,menuProps:{elevation:7,classes:{root:"virtual-assistant__context-menu"}},content:(0,T.jsxs)(Ms,{children:[(0,T.jsx)(Fs,{onClick:s,children:"Copy Context ID"}),(0,T.jsx)(Fs,{onClick:i,children:"Copy Current Context ID"}),(0,T.jsx)(Fs,{onClick:n,children:"Copy Context Stack"})]}),children:[t&&(0,T.jsxs)("div",{className:"virtual-assistant__contextual-support__content",children:[t.title&&(0,T.jsx)("div",{className:"virtual-assistant__contextual-support__title",children:t.title}),t.content&&(0,T.jsx)(T.Fragment,{children:J(t.content)?(0,T.jsx)("div",{className:"virtual-assistant__contextual-support__text",children:t.content}):(0,T.jsx)(Gs,{className:"virtual-assistant__contextual-support__markdown-text",value:t.content})}),t.related.length&&(0,T.jsxs)("div",{className:"virtual-assistant__contextual-support__relevant-entries",children:[(0,T.jsxs)("div",{className:"virtual-assistant__contextual-support__relevant-entries__title",children:["Related entries (",t.related.length,")"]}),t.related.map((e=>(0,T.jsx)(ei,{entry:e},e.uuid)))]})]}),!t&&(0,T.jsx)(Bs,{children:(0,T.jsxs)("div",{className:"virtual-assistant__panel__placeholder",children:[(0,T.jsx)(As.jZm,{className:"virtual-assistant__panel__placeholder__icon"}),(0,T.jsx)("div",{className:"virtual-assistant__panel__placeholder__message",children:"No contextual documentation found!"}),(0,T.jsx)("div",{className:"virtual-assistant__panel__placeholder__instruction",children:"Keep using the app. When contextual help is available, we will let you know!"})]})})]})})),si=(0,at.Pi)((()=>{const e=yi(),t=(0,rt.useRef)(null),s=(0,rt.useRef)(null),i=e.assistantService,n=i.searchText,a=(0,rt.useMemo)((()=>(0,Hs.Z)((()=>i.search()),100)),[i]);return(0,rt.useEffect)((()=>{t.current?.focus()}),[]),(0,T.jsxs)("div",{className:"virtual-assistant__search",children:[(0,T.jsxs)("div",{className:"virtual-assistant__search__header",children:[(0,T.jsx)("input",{ref:t,onClick:()=>{document.querySelectorAll('[role="dialog"]').length&&t.current!==document.activeElement&&i.refreshPanelRendering()},className:(0,cs.clsx)("virtual-assistant__search__input input--dark",{"virtual-assistant__search__input--searching":n}),spellCheck:!1,onChange:e=>{i.setSearchText(e.target.value),a()},value:n,placeholder:"Ask me a question"}),n&&(0,T.jsx)("div",{className:"virtual-assistant__search__input__search__count",children:i.searchResults.length+(i.isOverSearchLimit?"+":"")}),(0,T.jsx)("button",{ref:s,className:(0,cs.clsx)("virtual-assistant__search__input__config__trigger",{"virtual-assistant__search__input__config__trigger--toggled":i.showSearchConfigurationMenu,"virtual-assistant__search__input__config__trigger--active":i.searchConfigurationState.isAdvancedSearchActive}),tabIndex:-1,onClick:()=>i.setShowSearchConfigurationMenu(!i.showSearchConfigurationMenu),title:(i.searchConfigurationState.isAdvancedSearchActive?"Advanced search is currently active\n":"")+"Click to toggle search config menu",children:(0,T.jsx)(As.IEm,{})}),n?(0,T.jsx)("button",{className:"virtual-assistant__search__input__clear-btn",tabIndex:-1,onClick:()=>{i.resetSearch(),i.currentDocumentationEntry=void 0,t.current?.focus()},title:"Clear",children:(0,T.jsx)(As.q1B,{})}):(0,T.jsx)("div",{className:"virtual-assistant__search__input__search__icon",children:(0,T.jsx)(As.W1M,{})})]}),(0,T.jsxs)("div",{className:"virtual-assistant__search__content",children:[(0,T.jsx)(Ss,{isLoading:i.searchState.isInProgress}),(0,T.jsx)("div",{className:(0,cs.clsx)("virtual-assistant__search__input__config__panel",{"virtual-assistant__search__input__config__panel--toggled":i.showSearchConfigurationMenu}),children:(0,T.jsx)(Qs,{configState:i.searchConfigurationState})}),i.currentDocumentationEntry&&(0,T.jsx)("div",{className:"virtual-assistant__search__results",children:(0,T.jsx)(ei,{entry:i.currentDocumentationEntry},i.currentDocumentationEntry.uuid)}),!i.currentDocumentationEntry&&(0,T.jsxs)(T.Fragment,{children:[Boolean(i.searchResults.length)&&(0,T.jsx)("div",{className:"virtual-assistant__search__results",children:i.searchResults.map((e=>(0,T.jsx)(ei,{entry:e},e.uuid)))}),n&&!i.searchResults.length&&(0,T.jsx)(Bs,{children:(0,T.jsxs)("div",{className:"virtual-assistant__panel__placeholder",children:[(0,T.jsx)(As.DXi,{className:"virtual-assistant__panel__placeholder__icon"}),(0,T.jsx)("div",{className:"virtual-assistant__panel__placeholder__message",children:"No result..."})]})}),!n&&!i.searchResults.length&&(0,T.jsx)(Ds,{className:"virtual-assistant__character__container",menuProps:{elevation:7,classes:{root:"virtual-assistant__context-menu"}},content:(0,T.jsxs)(Ms,{children:[(0,T.jsx)(Fs,{onClick:()=>{ge(`documentation-registry_${(0,Ys.Z)(new Date(Date.now()),je)}.json`,JSON.stringify(e.documentationService.publishDocRegistry(),void 0,2),oe.APPLICATION_JSON)},children:"Download documentation registry"}),(0,T.jsx)(Fs,{onClick:()=>{ge(`documentation-registry_${(0,Ys.Z)(new Date(Date.now()),je)}.json`,JSON.stringify(e.documentationService.publishContextualDocIndex(),void 0,2),oe.APPLICATION_JSON)},children:"Download contextual documentation mapping"})]}),children:(0,T.jsxs)("div",{className:"virtual-assistant__character",children:[(0,T.jsxs)("div",{className:"virtual-assistant__character__figure",children:[(0,T.jsx)(As.Oag,{className:"virtual-assistant__character__hat"}),(0,T.jsx)(As.ce8,{className:"virtual-assistant__character__glasses"}),(0,T.jsx)(As.dRK,{className:"virtual-assistant__character__beard"})]}),(0,T.jsx)("div",{className:"virtual-assistant__character__greeting",children:"Bonjour, It's Pierre!"}),(0,T.jsx)("div",{className:"virtual-assistant__character__question",children:"How can I help today?"})]})})]})]})]})})),ii=(0,at.Pi)((e=>{const{triggerElement:t}=e,s=yi().assistantService,i=s.currentContextualDocumentationEntry,n=s.selectedTab;return(0,T.jsx)(zs,{open:s.isOpen,className:"virtual-assistant__panel__container",anchorEl:t,hideBackdrop:!0,PaperProps:{classes:{root:"virtual-assistant__panel__container__root"}},disableEnforceFocus:!0,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"right"},children:(0,T.jsxs)("div",{className:"virtual-assistant__panel",tabIndex:0,onKeyDown:e=>{"Tab"===e.key&&(e.preventDefault(),e.stopPropagation())},children:[(0,T.jsxs)("div",{className:"virtual-assistant__panel__header",children:[(0,T.jsxs)("div",{className:"virtual-assistant__panel__header__tabs",children:[(0,T.jsx)("div",{className:(0,cs.clsx)("virtual-assistant__panel__header__tab",{"virtual-assistant__panel__header__tab--active":n===gt.SEARCH}),onClick:()=>s.setSelectedTab(gt.SEARCH),title:"Search",children:(0,T.jsx)("div",{className:"virtual-assistant__panel__header__tab__content",children:(0,T.jsx)(As.W1M,{})})}),(0,T.jsx)("div",{className:(0,cs.clsx)("virtual-assistant__panel__header__tab",{"virtual-assistant__panel__header__tab--active":n===gt.CONTEXTUAL_SUPPORT}),onClick:()=>s.setSelectedTab(gt.CONTEXTUAL_SUPPORT),title:"Contextual Support",children:(0,T.jsxs)("div",{className:"virtual-assistant__panel__header__tab__content",children:[(0,T.jsx)(As.kdY,{}),i&&(0,T.jsx)("div",{className:"virtual-assistant__panel__header__tab__indicator",title:"Contextual support available"})]})})]}),(0,T.jsx)("div",{className:"virtual-assistant__panel__header__actions",children:(0,T.jsx)("button",{className:"virtual-assistant__panel__header__action",tabIndex:-1,onClick:()=>s.setIsOpen(!1),title:"Close panel",children:(0,T.jsx)(As.Two,{className:"virtual-assistant__panel__icon__close"})})})]}),(0,T.jsxs)("div",{className:"virtual-assistant__panel__content",children:[n===gt.SEARCH&&(0,T.jsx)(si,{}),n===gt.CONTEXTUAL_SUPPORT&&(0,T.jsx)(ti,{})]})]})},s.panelRenderingKey)})),ni=(0,at.Pi)((()=>{const[e,t]=(0,rt.useState)(!1),[s,i]=(0,rt.useState)((0,a.Z)()),n=yi(),r=(0,rt.useRef)(null),o=n.assistantService,l=o.currentContextualDocumentationEntry;return(0,rt.useEffect)((()=>{o.isHidden&&i((0,a.Z)())}),[o.isHidden]),(0,T.jsx)(Ws,{bounds:"parent",onStart:()=>t(!0),onStop:()=>t(!1),handle:".virtual-assistant__station__drag-handle",children:(0,T.jsxs)("div",{className:"virtual-assistant",ref:r,children:[(0,T.jsxs)("div",{className:(0,cs.clsx)("virtual-assistant__station",{"virtual-assistant__station--hidden":o.isHidden,"virtual-assistant__station--active":Boolean(l)}),children:[(0,T.jsx)("button",{className:"virtual-assistant__station__trigger",tabIndex:-1,onClick:()=>{!o.isOpen&&l&&o.setSelectedTab(gt.CONTEXTUAL_SUPPORT),o.setIsOpen(!o.isOpen)},title:o.isOpen?"Click to close assistant panel":(l?"Contextual support available.\n":"")+"Click to open assistant panel...",children:o.isOpen?(0,T.jsx)(As.Two,{className:"virtual-assistant__station__trigger__close"}):l?(0,T.jsx)(As.J$M,{className:"virtual-assistant__station__trigger__circle"}):null}),(0,T.jsx)(Ds,{className:(0,cs.clsx)("virtual-assistant__station__drag-handle",{"virtual-assistant__station__drag-handle--dragging":e}),menuProps:{elevation:7,classes:{root:"virtual-assistant__context-menu"}},content:(0,T.jsxs)(Ms,{children:[(0,T.jsx)(Fs,{onClick:()=>{o.setIsOpen(!1),i((0,a.Z)())},children:"Reset Position"}),(0,T.jsx)(Fs,{onClick:()=>n.assistantService.hideAssistant(),children:"Hide Assistant"})]}),children:(0,T.jsx)("div",{className:"virtual-assistant__station__drag-handle__content",title:e?void 0:"Grab to drag assistant",children:(0,T.jsx)(As.POq,{})})})]},l?.uuid??""),!e&&o.isOpen&&!o.isHidden&&r.current&&(0,T.jsx)(ii,{triggerElement:r.current})]})},s)})),ai="app.container",ri="app.backdrop-container",oi=["Meta+KeyP","Control+KeyP","Meta+KeyS","Control+KeyS","F8","F10","F11","Meta+Shift+KeyP","Control+Backquote","Control+Shift+KeyN","Control+Shift+KeyP","Meta+KeyB","Control+KeyB","F7","Alt+F7","Control+Shift+KeyB","Alt+KeyZ"],li=e=>(0,T.jsx)("div",{className:"backdrop__container",id:e.elementID}),ci=(0,at.Pi)((e=>{const{children:t}=e,s=yi(),i=s.layoutService.backdropContainerElementID?document.getElementById(s.layoutService.backdropContainerElementID)??document.getElementById(ri):document.getElementById(ri),n=((e,t)=>{const s={};return e.forEach(((e,i)=>{e.length&&(s[i]={combinations:e,handler:t})})),s.INTERNAL__PLATFORM_NATIVE_KEYBOARD_COMMAND={combinations:oi,handler:(e,t)=>{t.preventDefault()}},s})(s.keyboardShortcutsService.commandKeyMap,((e,t)=>{oi.includes(e)&&t.preventDefault(),s.keyboardShortcutsService.dispatch(e)}));return(0,rt.useEffect)((()=>{const e=function(e){const t=new Map;let s=null;return i=>{i instanceof KeyboardEvent&&((0,Vt.Z)(Object.values(e).flatMap((e=>e.combinations.map((t=>({combination:t,handler:e.handler}))))).filter((e=>e.combination.length)),(e=>e.combination)).forEach((e=>{const s=e.combination,n=Zt(e.combination);if(!n.length)return;const a=t.get(s)??n,r=H(a[0]);qt(i,r)?a.length>1?t.set(s,a.slice(1)):(t.delete(s),e.handler(s,i)):i.getModifierState(i.key)||t.delete(s)})),s&&clearTimeout(s),s=setTimeout(t.clear.bind(t),1e3))}}(n);return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}}),[n]),(0,rt.useEffect)((()=>{const e=()=>{document.hidden&&(It.logEvent_ApplicationUsageInterrupted(s.telemetryService),s.timeService.recordUsageInterruption())};return document.addEventListener("visibilitychange",e),()=>{document.removeEventListener("visibilitychange",e)}}),[s]),(0,T.jsxs)(is,{children:[(0,T.jsx)(Ns,{}),(0,T.jsx)(xs,{}),(0,T.jsx)(ws,{}),s.layoutService.showBackdrop&&(0,T.jsx)(ns.Z,{container:i,children:(0,T.jsx)(as.Z,{className:"backdrop",open:s.layoutService.showBackdrop})}),(0,T.jsx)(rs.W,{backend:os.PD,children:(0,T.jsxs)("div",{className:"app__container",id:ai,onContextMenu:e=>{e.stopPropagation(),e.preventDefault()},children:[(0,T.jsx)(li,{elementID:ri}),(0,T.jsx)(ni,{}),t]})})]})})),di={foreground:"#cccccc",background:"#1e1e1e",cursor:"#cccccc",selectionBackground:"#264f78",black:"#000000",red:"#cd3131",green:"#0dbc79",yellow:"#e5e510",blue:"#2472c8",magenta:"#bc3fbc",cyan:"#11a8cd",white:"#e5e5e5",brightBlack:"#666666",brightRed:"#f14c4c",brightGreen:"#23d18b",brightYellow:"#f5f543",brightBlue:"#3b8eea",brightMagenta:"#d670d6",brightCyan:"#29b8db",brightWhite:"#e5e5e5"},hi={matchOverviewRuler:"#d186167e",activeMatchColorOverviewRuler:"#A0A0A0CC",matchBackground:"#62331c",activeMatchBackground:"#515C6A"},ui=`\n${Pt.BOLD}${Pt.BRIGHT_BLUE}$purist${Pt.RESET}\n${Pt.BOLD}${Pt.MAGENTA}❯${Pt.RESET} `,pi="❯ ";class mi extends Gt{instance;resizer;renderer;searcher;webLinkProvider;_TEMPORARY__onKeyListener;_TEMPORARY__onDataListener;command="";commandHistory=[];currentCommandSearchString="";commandHistoryNavigationIdx=void 0;isRunningCommand=!1;setupState=ft.create();constructor(e){super(e),this.instance=new wt.Terminal({allowProposedApi:!0,fontSize:12,letterSpacing:2,fontWeight:400,fontWeightBold:700,fontFamily:`"${N}", Menlo, Consolas, monospace`,tabStopWidth:2,theme:di,overviewRulerWidth:14,scrollback:1e5,convertEol:!0,scrollOnUserInput:!1}),this.resizer=new bt.FitAddon,this.searcher=new Dt.SearchAddon,this.renderer=new Ft.WebglAddon}setup(e){if(this.setupState.hasCompleted)throw new k("Terminal is already set up");this.setupState.complete(),this.renderer.onContextLoss((()=>{this.renderer.dispose()})),this.instance.loadAddon(this.resizer),this.instance.loadAddon(this.searcher),this.instance.loadAddon(this.renderer),this.instance.loadAddon(new Mt.Unicode11Addon),this.instance.unicode.activeVersion="11",this.instance.attachCustomKeyEventHandler((e=>Jt(e,"Control+KeyF")||Jt(e,"Meta+KeyF")?(e.preventDefault(),e.stopPropagation(),this.searchConfig.focus(),!1):!(Jt(e,"Control+KeyC")&&this.instance.hasSelection()||Jt(e,"Control+KeyV")))),this.webLinkProvider=e?.webLinkProvider?new Lt.WebLinksAddon(e.webLinkProvider.handler,{urlRegex:e.webLinkProvider.regex}):new Lt.WebLinksAddon,this.instance.loadAddon(this.webLinkProvider),(e?.commands??[]).forEach((e=>{[e.command,...e.aliases??[]].forEach((t=>{this.commandRegistry.has(t)?this.applicationStore.logService.warn(h.create(Ee.APPLICATION_TERMINAL_COMMAND_CONFIGURATION_CHECK__FAILURE),`Found multiple duplicated terminal commands '${t}'`):this.commandRegistry.set(t,e)}))})),this.searcher.onDidChangeResults((e=>{e?(this.setSearchResultCount(e.resultCount),this.setSearchCurrentResultIndex(e.resultIndex)):(this.setSearchResultCount(void 0),this.setSearchCurrentResultIndex(void 0))})),this._TEMPORARY__onKeyListener=this.instance.onKey((({key:e,domEvent:t})=>{var s;if("ArrowUp"!==t.code)if("ArrowDown"!==t.code)if(this.commandHistoryNavigationIdx=void 0,"Enter"===t.code){if(this.command.trim()){const e=this.command,[t,...s]=e.replaceAll(/\s+/g," ").split(" ");if(this.addCommandToHistory(this.command),!t)return;const i=this.commandRegistry.get(t);if(!i)return void this.fail(`command not found: ${t}`);if(this.isRunningCommand)return;this.isRunningCommand=!0,i.handler(s.map((e=>e.trim())),t,e).finally((()=>{this.isRunningCommand=!1,this.isFlushed||this.abort()}))}}else if(Jt(t,"Control+KeyD")||Jt(t,"Control+KeyC")&&!this.instance.hasSelection())this.abort();else if("Backspace"===t.code)this.deleteFromCommand(t.altKey||t.ctrlKey?this.computeCursorJumpMovement(!0):-1);else if("Delete"===t.code)this.deleteFromCommand(t.altKey||t.ctrlKey?this.computeCursorJumpMovement(!1):1);else if("ArrowLeft"===t.code){const e=this.computeCursorMovement(t.altKey||t.ctrlKey?this.computeCursorJumpMovement(!0):-1);this.instance.scrollLines(e.scroll),this.instance.write(e.seq)}else if("ArrowRight"===t.code){const e=this.computeCursorMovement(t.altKey||t.ctrlKey?this.computeCursorJumpMovement(!1):1);this.instance.scrollLines(e.scroll),this.instance.write(e.seq)}else e.match(/^[A-Za-z0-9!@#$%^&*()\-_=+"':;,.<>/?[\]{}|\\~` ]$/)?this.writeToCommand(e):(s=t,document.getElementById(ai)?.dispatchEvent(new KeyboardEvent(s.type,s)));else void 0!==this.commandHistoryNavigationIdx&&this.setCommandFromHistory(0===this.commandHistoryNavigationIdx?void 0:this.commandHistoryNavigationIdx-1);else this.setCommandFromHistory(void 0!==this.commandHistoryNavigationIdx?this.commandHistoryNavigationIdx+1:0)})),this._TEMPORARY__onDataListener=this.instance.onData((e=>{e.length>1&&!e.startsWith("")&&this.writeToCommand(e.replaceAll(/[^A-Za-z0-9!@#$%^&*()\-_=+"':;,.<>/?[\]{}|\\~` ]/g,"").trimEnd())}))}getCommandRange(){const e=this.instance.buffer.active,t=this.instance.cols,s=`${pi}${this.command}`,i=`${pi}${this.command.substring(0,t-pi.length)}${this.command.length<t-pi.length?" ".repeat(t-this.command.length-pi.length):""}`;let n=0,a=0;for(let s=e.baseY+e.cursorY;s>-1;--s){if(H(e.getLine(s)).translateToString()===i){n=s,a+=(s===e.baseY+e.cursorY?e.cursorX:t)-pi.length;break}a+=s===e.baseY+e.cursorY?e.cursorX:t}return{startY:n,startX:pi.length,endY:n+(s.length-s.length%t)/t,endX:s.length%t,cursorIdx:a}}computeCursorJumpMovement(e){const t=this.getCommandRange();let s,i=!1;if(e){for(let e=t.cursorIdx-1;e>-1;--e)if(this.command.charAt(e).match(/\w/))i||(i=!0);else if(i){s=t.cursorIdx-e-1;break}}else for(let e=t.cursorIdx+1;e<this.command.length;++e)if(this.command.charAt(e).match(/\w/))i||(i=!0);else if(i){s=e-t.cursorIdx-1;break}return void 0===s&&(s=e?t.cursorIdx:this.command.length-t.cursorIdx),e?-s:s}computeCursorMovement(e,t=!0){const s=this.instance.buffer.active,i=this.instance.cols,n=this.instance.rows,a=this.getCommandRange(),r=t?e<0?a.cursorIdx:this.command.length-a.cursorIdx:e,o=Math.min(Math.abs(e),r);let l=s.cursorX,c=s.cursorY,d=s.baseY+s.cursorY;e<0?(l=(i+(s.cursorX-o)%i)%i,c=s.cursorY-(o>s.cursorX?Math.ceil(o/i):0),d=c+s.baseY,c=Math.max(c,-1)):e>0&&(l=(s.cursorX+o)%i,c=s.cursorY+(s.cursorX+o>=i?Math.floor((s.cursorX+o)/i):0),d=c+s.baseY,c=Math.min(c,n-1));const h=d>s.viewportY+n?d-(s.viewportY+n):d<s.viewportY?d-s.viewportY:0;return{seq:jt(c+1,l+1),scroll:h}}writeToCommand(e){const t=this.getCommandRange(),s=this.command.slice(0,t.cursorIdx),i=this.command.slice(t.cursorIdx),n=this.computeCursorMovement(e.length,!1);this.instance.scrollLines(n.scroll),this.instance.write(e+i+n.seq),this.setCommand(s+e+i)}deleteFromCommand(e){const t=this.getCommandRange(),s=e<0?t.cursorIdx:this.command.length-t.cursorIdx,i=Math.min(Math.abs(e),s);let n,a,r;if(0===e)return;e<0?(n=this.command.slice(0,t.cursorIdx-i),a=this.command.slice(t.cursorIdx,this.command.length),r=-i):(n=this.command.slice(0,t.cursorIdx),a=this.command.slice(t.cursorIdx+i,this.command.length),r=0);const o=this.computeCursorMovement(r);this.instance.scrollLines(o.scroll),this.instance.write(jt(t.startY+1,t.startX+1)+n+a+" ".repeat(i)+o.seq),this.setCommand(n+a)}get isSetup(){return this.setupState.hasCompleted}isFocused(){return document.activeElement===this.instance.textarea}mount(e){if(!this.setupState.hasCompleted)throw new k("XTerm terminal has not been set up yet");this.instance.open(e)}dispose(){this.searcher.dispose(),this.resizer.dispose(),this.renderer.dispose(),this.webLinkProvider?.dispose(),this._TEMPORARY__onKeyListener?.dispose(),this._TEMPORARY__onDataListener?.dispose(),this.instance.dispose()}autoResize(){this.resizer.fit()}focus(){this.instance.focus()}addCommandToHistory(e){e!==this.commandHistory.at(0)&&this.commandHistory.unshift(e)}setCommandFromHistory(e){const t=void 0===e?this.currentCommandSearchString:this.commandHistory.filter((e=>e.startsWith(this.currentCommandSearchString))).at(e);if(void 0!==t){let s=this.getCommandRange();this.instance.write(jt(s.startY+1,s.startX+1)+t.padEnd(this.command.length)),this.command=t,s=this.getCommandRange(),this.instance.write(jt(s.endY+1,s.endX+1)),this.commandHistoryNavigationIdx=e}}setCommand(e){this.command=e,this.currentCommandSearchString=e,this.commandHistoryNavigationIdx=void 0}newCommand(){this.instance.write(ui),this.setCommand("")}newSystemCommand(e){this.isRunningCommand||(this.command&&(this.abort(),this.newCommand()),this.instance.write(`${Pt.DIM}(system: ${e})\n${Pt.RESET}`))}flushScreen(){this.instance.write("c"),this.instance.reset()}get isFlushed(){const e=this.instance.buffer.active;let t=!0;for(let s=e.baseY+e.cursorY;s>-1;--s){const i=H(e.getLine(s)).translateToString();if(i.trim()){t=i!==pi;break}}return""===this.command&&t}clear(){this.flushScreen(),this.instance.scrollToTop(),this.newCommand()}resetANSIStyling(){this.instance.write(Pt.RESET)}showHelp(){var e;this.resetANSIStyling(),this.instance.scrollToBottom(),this.isFlushed||this.isRunningCommand||this.abort(),this.instance.write((e=this.commandRegistry,`\n${Pt.BRIGHT_BLACK}+-------------------------------------------------------+${Pt.RESET}\n${Pt.BRIGHT_BLACK}|${Pt.RESET} ${Pt.BRIGHT_GREEN}[@@]${Pt.RESET} "Hi! Welcome to the HELP menu of Pure IDE" ${Pt.BRIGHT_BLACK}|${Pt.RESET}\n${Pt.BRIGHT_BLACK}|${Pt.RESET} ${Pt.BRIGHT_GREEN}/|__|\\${Pt.RESET} ${Pt.BRIGHT_BLACK}|${Pt.RESET}\n${Pt.BRIGHT_BLACK}+--${Pt.RESET} ${Pt.BRIGHT_GREEN}d b${Pt.RESET} ${Pt.BRIGHT_BLACK}-----------------------------------------------+${Pt.RESET}\n\nFollowing is the list of supported commands:\n\n${(0,Vt.Z)(Array.from(e.values()),(e=>e.command)).map((e=>`${Pt.BRIGHT_GREEN}${e.command.padEnd(30)}${Pt.RESET}${e.description}${e.aliases?.length?`\n${"".padEnd(30)}Aliases: ${e.aliases.join(", ")}`:""}\n${"".padEnd(30)}Usage: ${Pt.DIM}${e.usage}${Pt.RESET}`)).join("\n")}`)),this.abort()}showCommonANSIEscapeSequences(){this.resetANSIStyling(),this.instance.scrollToBottom(),this.isFlushed||this.isRunningCommand||this.abort(),this.instance.write(`\nCommon ANSI Escape Sequences for Styling:\n\n${Object.entries(Pt).map((([e,t])=>`${t}${(e=>{if(!e)return"";const t=e.slice(-2),s=Wt.includes(t);let i=s?e.slice(0,e.length-2):e;const n=Ht(i.toLowerCase()).replace(/_(?:\w)/gu,(e=>e.toUpperCase())).replace(/_/gu," ").trim();return i=(e=>void 0!==e&&""!==e&&Boolean(e.match(/^(?:[a-z])*(?:[A-Z][a-z]+)+$/u)))(i)?(e=>Ht(e).replace(/(?:[A-Z])/gu,(e=>` ${e}`)).trim())(i):n,s?`${i} ID`.trim():n})(e).padEnd(20)}${Pt.RESET} ${t.replace("","\\u001b")}`)).join("\n")}`),this.abort()}abort(){this.resetANSIStyling(),this.instance.write("\n"),this.newCommand(),this.instance.scrollToBottom(),this.isRunningCommand=!1}fail(e,t){t?.systemCommand&&this.newSystemCommand(t.systemCommand),this.instance.write(`\n${Pt.RED}${e}${Pt.RED}`),this.abort()}output(e,t){this.resetANSIStyling(),t?.clear&&!this.preserveLog||!t?.systemCommand||this.newSystemCommand(t.systemCommand),!this.preserveLog&&t?.clear?this.flushScreen():(this.preserveLog||this.isRunningCommand)&&this.instance.write("\n"),this.instance.write(e),this.resetANSIStyling(),this.instance.write("\n"),this.instance.scrollToBottom(),this.newCommand()}search(e){this.searcher.findNext(e,{decorations:hi,regex:this.searchConfig.useRegex,wholeWord:this.searchConfig.matchWholeWord,caseSensitive:this.searchConfig.matchCaseSensitive,incremental:!0})}clearSearch(){this.searcher.clearDecorations(),this.instance.clearSelection(),this.setSearchText(""),this.setSearchResultCount(void 0),this.setSearchCurrentResultIndex(void 0)}findPrevious(){this.searcher.findPrevious(this.searchConfig.searchText,{decorations:hi,regex:this.searchConfig.useRegex,wholeWord:this.searchConfig.matchWholeWord,caseSensitive:this.searchConfig.matchCaseSensitive})}findNext(){this.searcher.findNext(this.searchConfig.searchText,{decorations:hi,regex:this.searchConfig.useRegex,wholeWord:this.searchConfig.matchWholeWord,caseSensitive:this.searchConfig.matchCaseSensitive})}getContent(){const e=this.instance.buffer.active,t=[];for(let s=0;s<e.length;++s){const i=H(e.getLine(s));t.push(i.translateToString())}return t.join("\n").trimEnd()}copy(){this.instance.hasSelection()?this.applicationStore.clipboardService.copyTextToClipboard(this.instance.getSelection()).catch(this.applicationStore.alertUnhandledError):this.applicationStore.notificationService.notifyWarning("Ther terminal has no selection to copy")}copyAll(){this.applicationStore.clipboardService.copyTextToClipboard(this.getContent()).catch(this.applicationStore.alertUnhandledError)}}class _i{applicationStore;terminal;constructor(e){this.applicationStore=e,this.terminal=new mi(e)}}class gi{applicationStore;currentUser="(unknown)";constructor(e){(0,x.rC)(this,{currentUser:x.LO,setCurrentUser:x.aD}),this.applicationStore=e}setCurrentUser(e){this.currentUser=e}}class Ei{get localStorage(){return H(window.localStorage,"'window.localStorage' object is not available in non-web environment")}setItem(e,t){this.localStorage.setItem(e,t)}getItem(e){return this.localStorage.getItem(e)}removeItem(e){this.localStorage.removeItem(e)}clear(){this.localStorage.clear()}hasItem(e){return this.localStorage.hasItem(e)}}class fi{storeIndex;storageService;data;constructor(e,t){this.storageService=e,this.storeIndex=t;const s=this.storageService.storage.getItem(this.storeIndex);if(s){const e=JSON.parse(s);this.data=e}else this.data={}}getValue(e,t){return this.data[e]??t}getNumberValue(e,t){return ee(this.getValue(e,t))}getStringValue(e,t){return((e,t="")=>(function(e,t=""){if(!J(e))throw new B(t||"Value is expected to be a string")}(e,t),e))(this.getValue(e,t))}getBooleanValue(e,t){return((e,t="")=>(function(e,t=""){if(!(e=>"boolean"==typeof e)(e))throw new B(t||"Value is expected to be a boolean")}(e,t),e))(this.getValue(e,t))}getObjectValue(e,t){return((e,t="")=>(function(e,t=""){if(!Q(e))throw new B(t||"Value is expected to be a object")}(e,t),e))(this.getValue(e,t))}persist(e,t){this.data[e]=t,this.storageService.storage.setItem(this.storeIndex,JSON.stringify(this.data))}}class Ti{applicationStore;storage;settingsStore;constructor(e){this.applicationStore=e,this.storage=new Ei,this.settingsStore=new fi(this,"application-settings-storage")}}class Ci{applicationStore;plugins=[];constructor(e){this.applicationStore=e}registerPlugins(e){this.plugins=e}setup(){const e={userId:this.applicationStore.identityService.currentUser,appName:this.applicationStore.config.appName,appEnv:this.applicationStore.config.env,appVersion:this.applicationStore.config.appVersion,appSessionId:this.applicationStore.uuid,appStartTime:this.applicationStore.timeService.timestamp};this.plugins.forEach((t=>t.setup(e)))}logEvent(e,t){this.plugins.forEach((s=>s.logEvent(e,t)))}}class xi{timestamp=Date.now();interruptions=[];recordUsageInterruption(){this.interruptions.push(Date.now())}finalizeTimingsRecord(e,t){const s=e.elapsed,i=e.startTime,n=i+s,a={...t??{},...Object.fromEntries(e.records),total:s};let r=0;for(const e of this.interruptions)if(e>=i&&e<=n)r++;else if(e>n)break;return r>0?{...a,__numberOfInteruptions:r}:a}}class Si{backdropContainerElementID;showBackdrop=!1;TEMPORARY__isLightThemeEnabled=!1;constructor(){(0,x.rC)(this,{TEMPORARY__isLightThemeEnabled:x.LO,backdropContainerElementID:x.LO,showBackdrop:x.LO,setBackdropContainerElementID:x.aD,setShowBackdrop:x.aD,TEMPORARY__setIsLightThemeEnabled:x.aD})}TEMPORARY__setIsLightThemeEnabled(e){this.TEMPORARY__isLightThemeEnabled=e}setBackdropContainerElementID(e){this.backdropContainerElementID=e}setShowBackdrop(e){this.showBackdrop=e}}class Ni{applicationStore;constructor(e){this.applicationStore=e}async copyTextToClipboard(e){await navigator.clipboard.writeText(e).catch((e=>{this.applicationStore.notificationService.notifyError(e)}))}}class Ai{navigator;constructor(e){this.navigator=e}}class vi{uuid=(0,a.Z)();config;pluginManager;identityService;storageService;timeService=new xi;commandService;keyboardShortcutsService;layoutService=new Si;clipboardService;terminalService;logService=new p;navigationService;navigationContextService;documentationService;assistantService;alertService;notificationService;eventService;telemetryService;tracerService;constructor(e,t,s){this.config=e,this.pluginManager=s,this.timeService=new xi,this.layoutService=new Si,this.logService=new p,this.logService.registerPlugins(s.getLoggerPlugins()),this.identityService=new gi(this),this.storageService=new Ti(this),this.clipboardService=new Ni(this),this.terminalService=new _i(this),this.commandService=new yt(this),this.keyboardShortcutsService=new Rt(this),this.navigationService=new Ai(t),this.navigationContextService=new Ot(this),this.documentationService=new et(this),this.assistantService=new Nt(this),this.alertService=new fs(this),this.notificationService=new Ps,this.eventService=new At,this.eventService.registerEventNotifierPlugins(s.getEventNotifierPlugins()),this.telemetryService=new Ci(this),this.telemetryService.registerPlugins(s.getTelemetryServicePlugins()),this.telemetryService.setup(),this.tracerService=new pt,this.tracerService.registerPlugins(s.getTracerServicePlugins())}alertUnhandledError=e=>{this.logService.error(h.create(Ee.ILLEGAL_APPLICATION_STATE_OCCURRED),"Encountered unhandled error in component tree",e),this.notificationService.notifyIllegalState(e.message)};guardUnhandledError=e=>()=>{e().catch(this.alertUnhandledError)}}const Ii=(0,rt.createContext)(void 0),Oi=({children:e,config:t,pluginManager:s})=>{const i=H((0,rt.useContext)(ct),"Can't find web application navigator in context"),n=(0,at.fv)((()=>new vi(t,i,s)));return(0,T.jsx)(Ii.Provider,{value:n,children:e})},yi=()=>H((0,rt.useContext)(Ii),"Can't find application store in context");class Ri{appName;baseUrl;env;documentationUrl;documentationRegistryEntries=[];keyedDocumentationEntries=[];contextualDocEntries=[];appVersion;appVersionBuildTime;appVersionCommitId;constructor(e){var t;this.baseUrl=e.baseUrl,this.appName=Z(e.configData.appName,"Can't configure application: 'appName' field is missing or empty"),this.env=Z(e.configData.env,"Can't configure application: 'env' field is missing or empty"),this.documentationUrl=e.configData.documentation?.url,this.documentationRegistryEntries=e.configData.documentation?.registry??[],this.keyedDocumentationEntries=Qe(e.configData.documentation?.entries??{}),this.contextualDocEntries=(t=e.configData.documentation?.contextualEntries??{},Object.entries(t).map((e=>({context:e[0],documentationKey:e[1]})))),this.appVersion=H(e.versionData.version,"Can't collect application version: 'version' field is missing"),this.appVersionBuildTime=H(e.versionData.buildTime,"Can't collect application version: 'buildTime' field is missing"),this.appVersionCommitId=H(e.versionData.commitSHA,"Can't collect application version: 'commitSHA' field is missing")}}class Pi extends Ri{pureUrl;useDynamicPureServer=!1;constructor(e){super(e),z(e.configData.pure,"Can't configure application: 'pure' field is missing"),this.pureUrl=Z(e.configData.pure.url,"Can't configure application: 'pure.url' field is missing or empty"),void 0!==e.configData.pure.dynamic&&(this.useDynamicPureServer=Boolean(e.configData.pure.dynamic))}}class wi extends d{loggerPlugins=[];telemetryServicePlugins=[];tracerServicePlugins=[];eventNotifierPlugins=[];applicationPlugins=[];registerLoggerPlugin(e){this.loggerPlugins.push(e)}registerTelemetryServicePlugin(e){this.telemetryServicePlugins.push(e)}registerTracerServicePlugin(e){this.tracerServicePlugins.push(e)}registerEventNotifierPlugin(e){this.eventNotifierPlugins.push(e)}registerApplicationPlugin(e){this.applicationPlugins.push(e)}getLoggerPlugins(){return[...this.loggerPlugins]}getTelemetryServicePlugins(){return[...this.telemetryServicePlugins]}getTracerServicePlugins(){return[...this.tracerServicePlugins]}getEventNotifierPlugins(){return[...this.eventNotifierPlugins]}getApplicationPlugins(){return[...this.applicationPlugins]}}class Li extends wi{pureProtocolProcessorPlugins=[];pureGraphManagerPlugins=[];pureGraphPlugins=[];constructor(){super()}static create(){return new Li}registerPureProtocolProcessorPlugin(e){this.pureProtocolProcessorPlugins.push(e)}registerPureGraphManagerPlugin(e){this.pureGraphManagerPlugins.push(e)}registerPureGraphPlugin(e){this.pureGraphPlugins.push(e)}getPureGraphManagerPlugins(){return[...this.pureGraphManagerPlugins]}getPureProtocolProcessorPlugins(){return[...this.pureProtocolProcessorPlugins]}getPureGraphPlugins(){return[...this.pureGraphPlugins]}}const bi=JSON.parse('{"i8":"7.1.38","Rw":{"NA":"@finos/legend-graph-manager-preset-dsl-diagram","zE":"@finos/legend-pure-protocol-processor-plugin-dsl-diagram","LW":"@finos/legend-pure-graph-manager-plugin-dsl-diagram","f1":"@finos/legend-pure-graph-plugin-dsl-diagram"}}');class Di extends o{_$nominalTypeBrand;install(e){e.registerPureGraphManagerPlugin(this)}}const Mi=e=>t=>(0,x.bi)(t)?t:e(t),Fi=e=>(t,s)=>(0,x.bi)(t)?t:e(t,s),ji=e=>{(0,x.rC)(e,{_isDeleted:x.LO,_isDisposed:x.LO,name:x.LO,package:x.LO,isDeleted:x.Fl,path:x.Fl,_elementHashCode:x.Fl,hashCode:x.Fl,setIsDeleted:x.aD,dispose:x.aD})},ki=Mi((e=>(0,x.rC)(e,{value:x.LO,valueForSerialization:x.Fl})));var Ui=s(34485),Gi=s(3096);const Vi=e=>Ui.sha1().update(e).digest("hex"),Bi=e=>Vi(e.map((e=>"string"==typeof e||"boolean"==typeof e||"number"==typeof e?Vi(e):e.hashCode)).join(","));var $i,zi;(zi=$i=$i||($i={})).PACKAGE="PACKAGE",zi.PACKAGEABLE_ELEMENT="PACKAGEABLE_ELEMENT",zi.PACKAGEABLE_ELEMENT_POINTER="PACKAGEABLE_ELEMENT_POINTER",zi.PROFILE="PROFILE",zi.TAG_POINTER="TAG_POINTER",zi.STEREOTYPE_POINTER="STEREOTYPE_POINTER",zi.TAGGED_VALUE="TAGGED_VALUE",zi.ENUMERATION="ENUMERATION",zi.ENUM_VALUE="ENUM_VALUE",zi.CLASS="CLASS",zi.PROPERTY="PROPERTY",zi.PROPERTY_POINTER="PROPERTY_POINTER",zi.MULTIPLICITY="MULTIPLICITY",zi.CONSTRAINT="CONSTRAINT",zi.DERIVED_PROPERTY="DERIVED_PROPERTY",zi.ASSOCIATION="ASSOCIATION",zi.FUNCTION="FUNCTION",zi.MEASURE="MEASURE",zi.UNIT="UNIT",zi.RUNTIME="RUNTIME",zi.PACKAGEABLE_RUNTIME="PACKAGEABLE_RUNTIME",zi.ENGINE_RUNTIME="ENGINE_RUNTIME",zi.LEGACY_RUNTIME="LEGACY_RUNTIME",zi.RUNTIME_POINTER="RUNTIME_POINTER",zi.STORE_CONNECTIONS="STORE_CONNECTIONS",zi.IDENTIFIED_CONNECTION="IDENTIFIED_CONNECTION",zi.PACKAGEABLE_CONNECTION="PACKAGEABLE_CONNECTION",zi.CONNECTION_POINTER="CONNECTION_POINTER",zi.XML_MODEL_CONNECTION="XML_MODEL_CONNECTION",zi.JSON_MODEL_CONNECTION="JSON_MODEL_CONNECTION",zi.MODEL_CHAIN_CONNECTION="MODEL_CHAIN_CONNECTION",zi.FLAT_DATA_CONNECTION="FLAT_DATA_CONNECTION",zi.RELATIONAL_DATABASE_CONNECTION="RELATIONAL_DATABASE_CONNECTION",zi.FLAT_DATA="FLAT_DATA",zi.FLAT_DATA_SECTION="FLAT_DATA_SECTION",zi.FLAT_DATA_PROPERTY="FLAT_DATA_PROPERTY",zi.FLAT_DATA_ROOT_RECORD_TYPE="FLAT_DATA_ROOT_RECORD_TYPE",zi.FLAT_DATA_RECORD_TYPE="FLAT_DATA_RECORD_TYPE",zi.FLAT_DATA_RECORD_FIELD="FLAT_DATA_RECORD_FIELD",zi.FLAT_DATA_STRING="FLAT_DATA_STRING",zi.FLAT_DATA_BOOLEAN="FLAT_DATA_BOOLEAN",zi.FLAT_DATA_NUMBER="FLAT_DATA_NUMBER",zi.FLAT_DATA_INTEGER="FLAT_DATA_INTEGER",zi.FLAT_DATA_FLOAT="FLAT_DATA_FLOAT",zi.FLAT_DATA_DECIMAL="FLAT_DATA_DECIMAL",zi.FLAT_DATA_DATE="FLAT_DATA_DATE",zi.FLAT_DATA_DATE_TIME="FLAT_DATA_DATE_TIME",zi.FLAT_DATA_STRICT_DATE="FLAT_DATA_STRICT_DATE",zi.FLAT_DATA_INSTANCE_SET_IMPLEMENTATION="FLAT_DATA_INSTANCE_SET_IMPLEMENTATION",zi.FLAT_DATA_PROPERTY_MAPPING="FLAT_DATA_PROPERTY_MAPPING",zi.FLAT_DATA_ASSOCIATION_IMPLEMENTATION="FLAT_DATA_ASSOCIATION_IMPLEMENTATION",zi.FLAT_DATA_ASSOCIATION_PROPERTY_MAPPING="FLAT_DATA_ASSOCIATION_PROPERTY_MAPPING",zi.EMBEDDED_FLAT_DATA_PROPERTY_MAPPING="EMBEDDED_FLAT_DATA_PROPERTY_MAPPING",zi.FLAT_DATA_SECTION_POINTER="FLAT_DATA_SECTION_POINTER",zi.DATABASE="DATABASE",zi.DATABASE_SCHEMA="DATABASE_SCHEMA",zi.DATABASE_JOIN="DATABASE_JOIN",zi.DATABASE_FILTER="DATABASE_FILTER",zi.DATBASE_VIEW="DATBASE_VIEW",zi.DATABASE_SCHEMA_TABLE="DATABASE_SCHEMA_TABLE",zi.DATABASE_TABLE_COLUMN="DATABASE_TABLE_COLUMN",zi.RELATIONAL="RELATIONAL",zi.RELATIONAL_OPERATION_DYNA_FUNC="RELATIONAL_OPERATION_DYNA_FUNC",zi.RELATIONAL_OPERATION_ELEMENTS_WITH_JOINS="RELATIONAL_OPERATION_ELEMENTS_WITH_JOINS",zi.RELATIONAL_OPERATION_LITERAL="RELATIONAL_OPERATION_LITERAL",zi.RELATIONAL_OPERATION_LITERAL_LIST="RELATIONAL_OPERATION_LITERAL_LIST",zi.RELATIONAL_OPERATION_TABLE_ALIAS_COLUMN="RELATIONAL_OPERATION_TABLE_ALIAS_COLUMN",zi.RELATIONAL_OPERATION_TABLE_POINTER="RELATIONAL_OPERATION_TABLE_POINTER",zi.RELATIONAL_OPERATION_JOIN_POINTER="RELATIONAL_OPERATION_JOIN_POINTER",zi.RELATIONAL_DATATYPE_VARCHAR="RELATIONAL_DATATYPE_VARCHAR",zi.RELATIONAL_DATATYPE_CHAR="RELATIONAL_DATATYPE_CHAR",zi.RELATIONAL_DATATYPE_VARBINARY="RELATIONAL_DATATYPE_VARBINARY",zi.RELATIONAL_DATATYPE_BINARY="RELATIONAL_DATATYPE_BINARY",zi.RELATIONAL_DATATYPE_BIT="RELATIONAL_DATATYPE_BIT",zi.RELATIONAL_DATATYPE_INTEGER="RELATIONAL_DATATYPE_INTEGER",zi.RELATIONAL_DATATYPE_BIGINT="RELATIONAL_DATATYPE_BIGINT",zi.RELATIONAL_DATATYPE_SMALLINT="RELATIONAL_DATATYPE_SMALLINT",zi.RELATIONAL_DATATYPE_TINYINT="RELATIONAL_DATATYPE_TINYINT",zi.RELATIONAL_DATATYPE_NUMERIC="RELATIONAL_DATATYPE_NUMERIC",zi.RELATIONAL_DATATYPE_DECIMAL="RELATIONAL_DATATYPE_DECIMAL",zi.RELATIONAL_DATATYPE_DOUBLE="RELATIONAL_DATATYPE_DOUBLE",zi.RELATIONAL_DATATYPE_FLOAT="RELATIONAL_DATATYPE_FLOAT",zi.RELATIONAL_DATATYPE_REAL="RELATIONAL_DATATYPE_REAL",zi.RELATIONAL_DATATYPE_DATE="RELATIONAL_DATATYPE_DATE",zi.RELATIONAL_DATATYPE_TIMESTAMP="RELATIONAL_DATATYPE_TIMESTAMP",zi.RELATIONAL_DATATYPE_OTHER="RELATIONAL_DATATYPE_OTHER",zi.RELATIONAL_DATATYPE_SEMISTRUCTURED="RELATIONAL_DATATYPE_SEMISTRUCTURED",zi.ROOT_RELATIONAL_INSTANCE_SET_IMPLEMENTATION="ROOT_RELATIONAL_INSTANCE_SET_IMPLEMENTATION",zi.RELATIONAL_INSTANCE_SET_IMPLEMENTATION="RELATIONAL_INSTANCE_SET_IMPLEMENTATION",zi.REALTIONAL_PROPERTY_MAPPING="REALTIONAL_PROPERTY_MAPPING",zi.EMBEDDED_REALTIONAL_PROPERTY_MAPPING="EMBEDDED_REALTIONAL_PROPERTY_MAPPING",zi.INLINE_EMBEDDED_REALTIONAL_PROPERTY_MAPPING="INLINE_EMBEDDED_REALTIONAL_PROPERTY_MAPPING",zi.OTHERWISE_EMBEDDED_REALTIONAL_PROPERTY_MAPPING="OTHERWISE_EMBEDDED_REALTIONAL_PROPERTY_MAPPING",zi.AGGREGATION_AWARE_MAPPING="AGGREGATION_AWARE_MAPPING",zi.AGGREGATION_AWARE_SPECIFICATION="AGGREGATION_AWARE_SPECIFICATION",zi.AGGREGATION_AWARE_SET_IMPLEMENTATION_CONTAINER="AGGREGATION_AWARE_SET_IMPLEMENTATION_CONTAINER",zi.AGGREGATE_FUNCTION="AGGREGATE_FUNCTION",zi.GROUP_BY_FUNCTION="GROUP_BY_FUNCTION",zi.BUSINESS_MILESTONING="BUSINESS_MILESTONING",zi.BUSINESS_SNAPSHOT_MILESTONING="BUSINESS_SNAPSHOT_MILESTONING",zi.PROCESSING_MILESTONING="PROCESSING_MILESTONING",zi.STATIC_DATASOURCE_SPECIFICATION="STATIC_DATASOURCE_SPECIFICATION",zi.LOCAL_H2_DATASOURCE_SPECIFICATION="LOCAL_H2_DATASOURCE_SPECIFICATION",zi.EMBEDDED_H2_DATASOURCE_SPECIFICATION="EMBEDDED_H2_DATASOURCE_SPECIFICATION",zi.SNOWFLAKE_DATASOURCE_SPECIFICATION="SNOWFLAKE_DATASOURCE_SPECIFICATION",zi.REDSHIFT_DATASOURCE_SPECIFICATION="REDSHIFT_DATASOURCE_SPECIFICATION",zi.BIGQUERY_DATASOURCE_SPECIFICATION="BIGQUERY_DATASOURCE_SPECIFICATION",zi.DATABRICKS_DATASOURCE_SPECIFICATION="DATABRICKS_DATASOURCE_SPECIFICATION",zi.SPANNER_DATASOURCE_SPECIFICATION="SPANNER_DATASOURCE_SPECIFICATION",zi.DELEGRATED_KEREBEROS_AUTHENTICATION_STRATEGY="DELEGRATED_KEREBEROS_AUTHENTICATION_STRATEGY",zi.DEFAULT_H2_AUTHENTICATION_STRATEGY="DEFAULT_H2_AUTHENTICATION_STRATEGY",zi.SNOWFLAKE_PUBLIC_AUTHENTICATION_STRATEGY="SNOWFLAKE_PUBLIC_AUTHENTICATION_STRATEGY",zi.API_TOKEN_AUTHENTICATION_STRATEGY="API_TOKEN_AUTHENTICATION_STRATEGY",zi.GCP_APPLICATION_DEFAULT_CREDENTIALS_AUTHENTICATION_STRATEGY="GCP_APPLICATION_DEFAULT_CREDENTIALS_AUTHENTICATION_STRATEGY",zi.USERNAME_PASSWORD_AUTHENTICATION_STRATEGY="USERNAME_PASSWORD_AUTHENTICATION_STRATEGY",zi.OAUTH_AUTHENTICATION_STRATEGY="OAUTH_AUTHENTICATION_STRATEGY",zi.GCP_WORKLOAD_IDENTITY_FEDERATION_AUTHENTICATION_STRATEGY="GCP_WORKLOAD_IDENTITY_FEDERATION_AUTHENTICATION_STRATEGY",zi.MIDDLE_TIER_USERNAME_PASSWORD_AUTHENTICATION_STRATEGY="MIDDLE_TIER_USERNAME_PASSWORD_AUTHENTICATION_STRATEGY",zi.MAPPER_POST_PROCESSOR="MAPPER_POST_PROCESSOR",zi.SCHEMA_MAPPER="SCHEMA_MAPPER",zi.TABLE_MAPPER="TABLE_MAPPER",zi.MAPPING="MAPPING",zi.MAPPING_INCLUDE="MAPPING_INCLUDE",zi.ASSOCIATION_IMPLEMENTATION="ASSOCIATION_IMPLEMENTATION",zi.RELATIONAL_ASSOCIATION_IMPLEMENTATION="RELATIONAL_ASSOCIATION_IMPLEMENTATION",zi.XSTORE_ASSOCIATION_IMPLEMENTATION="XSTORE_ASSOCIATION_IMPLEMENTATION",zi.ENUMERATION_MAPPING="ENUMERATION_MAPPING",zi.ENUM_VALUE_MAPPING="ENUM_VALUE_MAPPING",zi.SET_IMPLEMENTATION="SET_IMPLEMENTATION",zi.OPERATION_SET_IMPLEMENTATION="OPERATION_SET_IMPLEMENTATION",zi.PURE_INSTANCE_SET_IMPLEMENTATION="PURE_INSTANCE_SET_IMPLEMENTATION",zi.PROPERTY_MAPPING="PROPERTY_MAPPING",zi.LOCAL_MAPPING_PROPERTY="LOCAL_MAPPING_PROPERTY",zi.PURE_PROPERTY_MAPPING="PURE_PROPERTY_MAPPING",zi.XSTORE_PROPERTY_MAPPING="XSTORE_PROPERTY_MAPPING",zi.MAPPING_TEST_LEGACY="MAPPING_TEST_LEGACY",zi.MAPPING_TEST_SUITE="MAPPING_TEST_SUITE",zi.MAPPING_TEST="MAPPING_TEST",zi.STORE_TEST_DATA="STORE_TEST_DATA",zi.INPUT_DATA="INPUT_DATA",zi.FLAT_DATA_INPUT_DATA="FLAT_DATA_INPUT_DATA",zi.RELATIONAL_INPUT_DATA="RELATIONAL_INPUT_DATA",zi.OBJECT_INPUT_DATA="OBJECT_INPUT_DATA",zi.MAPPING_TEST_ASSERT="MAPPING_TEST_ASSERT",zi.EXPECTED_OUTPUT_MAPPING_TEST_ASSERT="EXPECTED_OUTPUT_MAPPING_TEST_ASSERT",zi.FILTER_MAPPING="FILTER_MAPPING",zi.COLUMN_MAPPING="COLUMN_MAPPING",zi.GROUP_BY_MAPPING="GROUP_BY_MAPPING",zi.SERVICE="SERVICE",zi.SERVICE_PURE_EXECUTION="SERVICE_PURE_EXECUTION",zi.SERVICE_PURE_SINGLE_EXECUTION="SERVICE_PURE_SINGLE_EXECUTION",zi.SERVICE_KEYED_EXECUTION_PARAMETER="SERVICE_KEYED_EXECUTION_PARAMETER",zi.SERVICE_PURE_MULTI_EXECUTION="SERVICE_PURE_MULTI_EXECUTION",zi.SERVICE_TEST_CONTAINER="SERVICE_TEST_CONTAINER",zi.SERVICE_LEGACY_SINGLE_EXECUTION_TEST="SERVICE_LEGACY_SINGLE_EXECUTION_TEST",zi.SERVICE_LEGACY_KEYED_SINGLE_EXECUTION_TEST="SERVICE_LEGACY_KEYED_SINGLE_EXECUTION_TEST",zi.SERVICE_LEGACY_MULTI_EXECUTION_TEST="SERVICE_LEGACY_MULTI_EXECUTION_TEST",zi.SERVICE_CONNECTION_TEST_DATA="SERVICE_CONNECTION_TEST_DATA",zi.SERVICE_TEST_DATA="SERVICE_TEST_DATA",zi.SERVICE_TEST_SUITE="SERVICE_TEST_SUITE",zi.SERVICE_TEST="SERVICE_TEST",zi.SERVICE_PARAMETER_VALUE="SERVICE_PARAMETER_VALUE",zi.SERVICE_POST_VALIDATION="SERVICE_POST_VALIDATION",zi.SERVICE_POST_VALIDATION_ASSERTION="SERVICE_POST_VALIDATION_ASSERTION",zi.GENERATION_TREE="GENERATION_TREE",zi.GENERATION_TREE_NODE="GENERATION_TREE_NODE",zi.FILE_GENERATION="FILE_GENERATION",zi.CONFIGURATION_PROPERTY="CONFIGURATION_PROPERTY",zi.SECTION_INDEX="SECTION_INDEX",zi.SECTION="SECTION",zi.IMPORT_AWARE_CODE_SECTION="IMPORT_AWARE_CODE_SECTION",zi.DEFAULT_CODE_SECTION="DEFAULT_CODE_SECTION",zi.RAW_LAMBDA="RAW_LAMBDA",zi.RAW_VARIABLE="RAW_VARIABLE",zi.RAW_INSTANCE_VALUE="RAW_INSTANCE_VALUE",zi.BINDING_TRANSFORMER="BINDING_TRANSFORMER",zi.ASSERT_FAIL="ASSERT_FAIL",zi.ASSERT_PASS="ASSERT_PASS",zi.EQUAL_TO_JSON_ASSERT_FAIL="EQUAL_TO_JSON_ASSERT_FAIL",zi.EQUAL_TO="EQUAL_TO",zi.EQUAL_TO_JSON="EQUAL_TO_JSON",zi.EQUAL_TO_TDS="EQUAL_TO_TDS",zi.TEST_RESULT="TEST_RESULT",zi.TEST_ERROR="TEST_ERROR",zi.TEST_FAILED="TEST_FAILED",zi.TEST_PASSED="TEST_PASSED",zi.ATOMIC_TEST_ID="ATOMIC_TEST_ID",zi.EXTERNAL_FORMAT_DATA="EXTERNAL_FORMAT_DATA",zi.MODEL_STORE_DATA="MODEL_STORE_DATA",zi.DATA_ELEMENT_REFERENCE="DATA_ELEMENT_REFERENCE",zi.DATA_ELEMENT="DATA_ELEMENT",zi.RELATIONAL_CSV_DATA="RELATIONAL_CSV_DATA",zi.RELATIONAL_TDS="RELATIONAL_TDS",zi.RELATIONAL_CSV_DATA_TABLE="RELATIONAL_CSV_DATA_TABLE",zi.INTERNAL_UNKNOWN_VALUE_SPECIFICATION="INTERNAL_UNKNOWN_VALUE_SPECIFICATION",zi.VARIABLE_EXPRESSION="VARIABLE_EXPRESSION",zi.EXPRESSION="EXPRESSION",zi.FUNCTION_EXPRESSION="FUNCTION_EXPRESSION",zi.SIMPLE_FUNCTION_EXPRESSION="SIMPLE_FUNCTION_EXPRESSION",zi.ABSTRACT_PROPERTY_EXPRESSION="ABSTRACT_PROPERTY_EXPRESSION",zi.INSTANCE_VALUE="INSTANCE_VALUE",zi.PRIMITIVE_INSTANCE_VALUE="PRIMITIVE_INSTANCE_VALUE",zi.ENUM_INSTANCE_VALUE="ENUM_INSTANCE_VALUE",zi.RUNTIME_INSTANCE_VALUE="RUNTIME_INSTANCE_VALUE",zi.PAIR_INSTANCE_VALUE="PAIR_INSTANCE_VALUE",zi.MAPPING_INSTANCE_VALUE="MAPPING_INSTANCE_VALUE",zi.PURE_LIST_INSTANCE_VALUE="PURE_LIST_INSTANCE_VALUE",zi.COLLECTION_INSTANCE_VALUE="COLLECTION_INSTANCE_VALUE",zi.LAMBDA_FUNCTION_INSTANCE_VALUE="LAMBDA_FUNCTION_INSTANCE_VALUE",zi.FUNCTION_TYPE="FUNCTION_TYPE",zi.LAMBDA_FUNCTION="LAMBDA_FUNCTION",zi.ALLOY_SERIALIZATION_CONFIG_INSTANCE_VALUE="ALLOY_SERIALIZATION_CONFIG_INSTANCE_VALUE",zi.ALLOY_SERIALIZATION_CONFIG="ALLOY_SERIALIZATION_CONFIG",zi.ROOT_GRAPH_FETCH_TREE="ROOT_GRAPH_FETCH_TREE",zi.PROPERTY_GRAPH_FETCH_TREE="PROPERTY_GRAPH_FETCH_TREE",zi.PROPERTY_GRAPH_FETCH_TREE_INSTANCE_VALUE="PROEPRTY_GRAPH_FETCH_TREE_INSTANCE_VALUE",zi.ROOT_GRAPH_FETCH_TREE_INSTANCE_VALUE="ROOT_GRAPH_FETCH_TREE_INSTANCE_VALUE",zi.INTERNAL_PROPAGATED_VALUE="INTERNAL_PROPAGATED_VALUE";const Hi=e=>{return s={excludeKeys:e=>e.toLowerCase().endsWith("sourceInformation".toLowerCase())},q(Q(t=e),"Can't hash non-object value"),Gi(t,s);var t,s},Yi=(e,t)=>Bi([e?Hi(e):"",t?Hi(t):""]),Wi=(e,t)=>[$i.PACKAGEABLE_ELEMENT_POINTER,e,t].map(Vi).join(",");class Ki{stereotypes=[];taggedValues=[]}class Xi extends Ki{name}class Zi extends Xi{_UUID=(0,a.Z)();_isDeleted=!1;_isDisposed=!1;package;constructor(e){super(),this.name=e}get isDeleted(){return this._isDeleted}setIsDeleted(e){this._isDeleted=e}get path(){if(!this.package)return this.name;const e=this.package.path;return e?`${e}${fe}${this.name}`:this.name}dispose(){this._isDisposed=!0;try{this.hashCode}catch{}}get _elementHashCode(){return Bi([$i.PACKAGEABLE_ELEMENT,this.path])}get hashCode(){if(this._isDisposed)throw new k(`Element '${this.path}' is already disposed`);return this._elementHashCode}}class qi extends Zi{}class Ji extends qi{_subclasses=[];_generatedMilestonedProperties=[];properties=[];propertiesFromAssociations=[];derivedProperties=[];generalizations=[];constraints=[];dispose(){super.dispose(),this._subclasses=[],this.generalizations.forEach((e=>{const t=e.value.rawType;t._isDisposed||(t._subclasses=t._subclasses.filter((e=>!e._isDisposed)))}))}get _elementHashCode(){return Bi([$i.CLASS,this.path,Bi(this.properties),Bi(this.derivedProperties),Bi(this.generalizations.map((e=>e.ownerReference.valueForSerialization??""))),Bi(this.constraints),Bi(this.stereotypes.map((e=>e.pointerHashCode))),Bi(this.taggedValues)])}accept_PackageableElementVisitor(e){return e.visit_Class(this)}}class Qi extends qi{}class en extends Qi{values=[];get _elementHashCode(){return Bi([$i.ENUMERATION,this.path,Bi(this.values),Bi(this.stereotypes.map((e=>e.pointerHashCode))),Bi(this.taggedValues)])}accept_PackageableElementVisitor(e){return e.visit_Enumeration(this)}}class tn extends Qi{measure;conversionFunction;constructor(e,t,s){super(e),this.measure=t,this.conversionFunction=s}get hashCode(){return Bi([$i.UNIT,this.measure.path,this.conversionFunction??""])}accept_PackageableElementVisitor(e){throw new U}}class sn extends qi{canonicalUnit;nonCanonicalUnits=[];get _elementHashCode(){return Bi([$i.MEASURE,this.path,this.canonicalUnit??"",Bi(this.nonCanonicalUnits)])}accept_PackageableElementVisitor(e){return e.visit_Measure(this)}}class nn extends Zi{children=[];get path(){return this.package?super.path:""}get hashCode(){return""}accept_PackageableElementVisitor(e){return e.visit_Package(this)}}class an{_OWNER;parserName;elements=[];constructor(e,t){this.parserName=e,this._OWNER=t}get hashCode(){return Bi([$i.SECTION,this.parserName,Bi(this.elements.map((e=>e.valueForSerialization??"")))])}}class rn extends an{imports=[];get hashCode(){return Bi([$i.IMPORT_AWARE_CODE_SECTION,super.hashCode,Bi(this.imports.map((e=>e.valueForSerialization??"")))])}}class on extends an{get hashCode(){return Bi([$i.DEFAULT_CODE_SECTION,super.hashCode])}}class ln{_UUID=(0,a.Z)()}class cn extends ln{ownerReference;constructor(e){super(),this.ownerReference=e}}class dn extends ln{value;constructor(e){super(),this.value=e}}class hn extends dn{constructor(e){super(e)}static create(e){return new hn(e)}get valueForSerialization(){return this.value.path}}const un=Mi((e=>(0,x.rC)(e,{name:x.LO,value:x.LO.ref,hashCode:x.Fl}))),pn=Mi((e=>(ji(e),(0,x.rC)(e,{type:x.LO,generationOutputPath:x.LO,scopeElements:x.LO,configurationProperties:x.LO,_elementHashCode:x.KG}),e.scopeElements.forEach((e=>{e instanceof dn&&ki(e)})),e.configurationProperties.forEach(un),e))),mn=Mi((e=>((0,x.rC)(e,{id:x.LO,hashCode:x.Fl}),ki(e.generationElement),e))),_n=Mi((e=>(ji(e),(0,x.rC)(e,{generationNodes:x.LO,fileGenerations:x.LO,_elementHashCode:x.KG}),e.generationNodes.forEach(mn),e.fileGenerations.forEach(ki),e)));class gn{}class En extends gn{expectedOutput;constructor(e){super(),this.expectedOutput=Kt(e)}get hashCode(){return Bi([$i.EXPECTED_OUTPUT_MAPPING_TEST_ASSERT,this.expectedOutput])}}class fn{}class Tn extends fn{mappings=[];connections=[];get hashCode(){return Bi([$i.ENGINE_RUNTIME,Bi(this.mappings.map((e=>Wi(be.MAPPING,e.valueForSerialization??"")))),Bi(this.connections.filter((e=>e.storeConnections.length)))])}}class Cn extends fn{packageableRuntime;constructor(e){super(),this.packageableRuntime=e}get hashCode(){return Bi([$i.RUNTIME_POINTER,this.packageableRuntime.valueForSerialization??""])}}class xn{}class Sn extends xn{sourceFlatData;data;constructor(e,t){super(),this.sourceFlatData=e,this.data=t}get hashCode(){return Bi([$i.FLAT_DATA_INPUT_DATA,Wi(be.STORE,this.sourceFlatData.valueForSerialization??""),this.data])}}var Nn,An,vn;(vn=Nn=Nn||(Nn={})).JSON="JSON",vn.XML="XML";class In extends xn{sourceClass;inputType;data;constructor(e,t,s){super(),this.sourceClass=e,this.inputType=t,this.data=t===Nn.JSON?Kt(s):s}get hashCode(){return Bi([$i.OBJECT_INPUT_DATA,this.sourceClass.valueForSerialization??"",this.inputType,this.data])}}!function(e){e.SQL="SQL",e.CSV="CSV"}(An=An||(An={}));class On extends xn{database;data;inputType;constructor(e,t,s){super(),this.database=e,this.data=t,this.inputType=s}get hashCode(){return Bi([$i.RELATIONAL_INPUT_DATA,this.database.valueForSerialization??"",this.data,this.inputType])}}const yn=Mi((e=>((0,x.rC)(e,{value:x.LO,hashCode:x.Fl}),ki(e.type),e))),Rn=Mi((e=>(0,x.rC)(e,{body:x.LO.ref,parameters:x.LO.ref,hashCode:x.Fl}))),Pn=Mi((e=>((0,x.rC)(e,{name:x.LO,multiplicity:x.LO,hashCode:x.Fl}),ki(e.type),e)));class wn{observerContext;constructor(e){this.observerContext=e}visit_RawLambda(e){Rn(e)}visit_RawVariableExpression(e){Pn(e)}visit_RawPrimitiveInstanceValue(e){yn(e)}}Fi(((e,t)=>(e.accept_RawValueSpecificationVisitor(new wn(t)),e)));class Ln{_correspondingPrimitiveType;constructor(e){this._correspondingPrimitiveType=e}}class bn extends Ln{trueString;falseString;get hashCode(){return Bi([$i.FLAT_DATA_BOOLEAN,this.trueString??"",this.falseString??""])}}class Dn extends Ln{get hashCode(){return Bi([$i.FLAT_DATA_STRING])}}class Mn extends Ln{get hashCode(){return Bi([$i.FLAT_DATA_NUMBER])}}class Fn extends Ln{dateFormat;timeZone;get hashCode(){return Bi([$i.FLAT_DATA_DATE,this.dateFormat?Bi(this.dateFormat):"",this.timeZone??""])}}class jn extends Ln{fields=[];get hashCode(){return Bi([$i.FLAT_DATA_RECORD_TYPE,Bi(this.fields)])}}const kn=Fi(((e,t)=>(gl(e,t),(0,x.rC)(e,{flatData:x.LO,sectionName:x.LO,hashCode:x.Fl}),e))),Un=Mi((e=>((0,x.rC)(e,{label:x.LO,flatDataDataType:x.LO,optional:x.LO,address:x.LO,hashCode:x.Fl}),(e=>{e instanceof bn?(0,x.rC)(e,{trueString:x.LO,falseString:x.LO,hashCode:x.Fl}):e instanceof Dn||e instanceof Mn?(0,x.rC)(e,{hashCode:x.Fl}):e instanceof Fn?(0,x.rC)(e,{dateFormat:x.LO,timeZone:x.LO,hashCode:x.Fl}):e instanceof jn&&Mi(Gn)(e)})(e.flatDataDataType),e)));function Gn(e){return(0,x.rC)(e,{fields:x.LO,hashCode:x.Fl}),e.fields.forEach(Un),e}Mi(Gn);const Vn=Mi(Gn),Bn=Mi((e=>((0,x.rC)(e,{name:x.LO,value:x.LO,hashCode:x.Fl}),e))),$n=Mi((e=>((0,x.rC)(e,{driverId:x.LO,name:x.LO,sectionProperties:x.LO,recordType:x.LO,hashCode:x.Fl}),e.sectionProperties.forEach(Bn),e.recordType&&Vn(e.recordType),e))),zn=(Mi((e=>((0,x.rC)(e,{value:x.LO,pointerHashCode:x.Fl}),ki(e.ownerReference),e))),Mi((e=>(ji(e),(0,x.rC)(e,{sections:x.LO,_elementHashCode:x.KG}),e.sections.forEach($n),e)))),Hn=Mi((e=>((0,x.rC)(e,{value:x.LO}),ki(e.ownerReference),e))),Yn=Fi(((e,t)=>(Al(e,t),(0,x.rC)(e,{filter:x.LO,hashCode:x.Fl}),Hn(e.sourceRootRecordType),e.filter&&Rn(e.filter),e))),Wn=Fi(((e,t)=>(gl(e,t),Al(e,t),(0,x.rC)(e,{rootInstanceSetImplementation:x.LO,hashCode:x.Fl}),e))),Kn=Fi(((e,t)=>(gl(e,t),(0,x.rC)(e,{transformer:x.LO,transform:x.LO,hashCode:x.Fl}),Rn(e.transform),e))),Xn=Mi((e=>((0,x.rC)(e,{data:x.LO,hashCode:x.Fl}),ki(e.sourceFlatData),e))),Zn=Mi((e=>((0,x.rC)(e,{url:x.LO,hashCode:x.Fl}),e)));class qn{}class Jn extends qn{serverPrincipal;get hashCode(){return Bi([$i.DELEGRATED_KEREBEROS_AUTHENTICATION_STRATEGY,this.serverPrincipal?.toString()??""])}}class Qn extends qn{get hashCode(){return Bi([$i.DEFAULT_H2_AUTHENTICATION_STRATEGY])}}class ea extends qn{apiToken;constructor(e){super(),this.apiToken=e}get hashCode(){return Bi([$i.API_TOKEN_AUTHENTICATION_STRATEGY,this.apiToken])}}class ta extends qn{oauthKey;scopeName;constructor(e,t){super(),this.oauthKey=e,this.scopeName=t}get hashCode(){return Bi([$i.OAUTH_AUTHENTICATION_STRATEGY,this.oauthKey,this.scopeName])}}class sa extends qn{privateKeyVaultReference;passPhraseVaultReference;publicUserName;constructor(e,t,s){super(),this.privateKeyVaultReference=e,this.passPhraseVaultReference=t,this.publicUserName=s}get hashCode(){return Bi([$i.SNOWFLAKE_PUBLIC_AUTHENTICATION_STRATEGY,this.privateKeyVaultReference,this.passPhraseVaultReference,this.publicUserName])}}class ia extends qn{get hashCode(){return Bi([$i.GCP_APPLICATION_DEFAULT_CREDENTIALS_AUTHENTICATION_STRATEGY])}}class na extends qn{serviceAccountEmail;additionalGcpScopes=[];constructor(e,t=[]){super(),this.serviceAccountEmail=e,this.additionalGcpScopes=t}get hashCode(){return Bi([$i.GCP_WORKLOAD_IDENTITY_FEDERATION_AUTHENTICATION_STRATEGY,this.serviceAccountEmail,Bi(this.additionalGcpScopes)])}}class aa extends qn{baseVaultReference;userNameVaultReference;passwordVaultReference;constructor(e,t){super(),this.userNameVaultReference=e,this.passwordVaultReference=t}get hashCode(){return Bi([$i.USERNAME_PASSWORD_AUTHENTICATION_STRATEGY,this.baseVaultReference?.toString()??"",this.userNameVaultReference,this.passwordVaultReference])}}class ra extends qn{vaultReference;constructor(e){super(),this.vaultReference=e}get hashCode(){return Bi([$i.MIDDLE_TIER_USERNAME_PASSWORD_AUTHENTICATION_STRATEGY,this.vaultReference])}}class oa{}class la extends oa{host;port;databaseName;constructor(e,t,s){super(),this.host=e,this.port=t,this.databaseName=s}get hashCode(){return Bi([$i.STATIC_DATASOURCE_SPECIFICATION,this.host,this.port.toString(),this.databaseName])}}class ca extends oa{hostname;port;protocol;httpPath;constructor(e,t,s,i){super(),this.hostname=e,this.port=t,this.protocol=s,this.httpPath=i}get hashCode(){return Bi([$i.DATABRICKS_DATASOURCE_SPECIFICATION,this.hostname,this.port,this.protocol,this.httpPath])}}class da extends oa{databaseName;directory;autoServerMode;constructor(e,t,s){super(),this.databaseName=e,this.directory=t,this.autoServerMode=s}get hashCode(){return Bi([$i.EMBEDDED_H2_DATASOURCE_SPECIFICATION,this.databaseName,this.directory,this.autoServerMode.toString()])}}class ha extends oa{testDataSetupCsv;testDataSetupSqls=[];get hashCode(){return Bi([$i.LOCAL_H2_DATASOURCE_SPECIFICATION,this.testDataSetupCsv??"",Bi(this.testDataSetupSqls)])}}class ua extends oa{accountName;region;warehouseName;databaseName;cloudType;quotedIdentifiersIgnoreCase;proxyHost;proxyPort;nonProxyHosts;organization;accountType;role;constructor(e,t,s,i){super(),this.region=t,this.warehouseName=s,this.databaseName=i,this.accountName=e}get hashCode(){return Bi([$i.SNOWFLAKE_DATASOURCE_SPECIFICATION,this.accountName,this.region,this.warehouseName,this.databaseName,this.cloudType??"",this.proxyHost??"",this.proxyPort??"",this.nonProxyHosts??"",this.organization??"",this.accountType??"",this.role??"",this.quotedIdentifiersIgnoreCase?.toString()??""])}}class pa extends oa{clusterID;databaseName;host;port;region;endpointURL;constructor(e,t,s,i,n,a){super(),this.clusterID=n,this.region=a,this.host=i,this.databaseName=e,this.endpointURL=t,this.port=s}get hashCode(){return Bi([$i.REDSHIFT_DATASOURCE_SPECIFICATION,this.databaseName,this.endpointURL,this.port.toString(),this.clusterID,this.host,this.region])}}class ma extends oa{projectId;defaultDataset;proxyHost;proxyPort;constructor(e,t){super(),this.projectId=e,this.defaultDataset=t}get hashCode(){return Bi([$i.BIGQUERY_DATASOURCE_SPECIFICATION,this.projectId,this.defaultDataset,this.proxyHost??"",this.proxyPort??""])}}class _a extends oa{projectId;instanceId;databaseId;proxyHost;proxyPort;constructor(e,t,s,i,n){super(),this.projectId=e,this.instanceId=t,this.databaseId=s,this.proxyHost=i,this.proxyPort=n}get hashCode(){return Bi([$i.SPANNER_DATASOURCE_SPECIFICATION,this.projectId,this.instanceId,this.databaseId,this.proxyHost??"",this.proxyPort??""])}}class ga{_UUID=(0,a.Z)()}class Ea extends ga{mappers=[];get hashCode(){return Bi([$i.MAPPER_POST_PROCESSOR,Bi(this.mappers)])}}const fa="{target}",Ta="default";class Ca{}class xa extends Ca{}class Sa extends xa{}class Na extends Sa{name;parameters=[];constructor(e){super(),this.name=e}get hashCode(){return Bi([$i.RELATIONAL_OPERATION_DYNA_FUNC,this.name,Bi(this.parameters)])}}var Aa;!function(e){e.INNER="INNER",e.LEFT_OUTER="LEFT_OUTER",e.RIGHT_OUTER="RIGHT_OUTER",e.OUTER="OUTER"}(Aa=Aa||(Aa={}));const va=e=>[e].concat(e.children.length?va(e.children[0]):[]);class Ia extends Ca{relationalOperationElement;joinTreeNode;get hashCode(){return Bi([$i.RELATIONAL_OPERATION_ELEMENTS_WITH_JOINS,Bi(this.joinTreeNode?va(this.joinTreeNode):[]),this.relationalOperationElement??""])}}class Oa extends Ca{relation;name;database;isSelfJoinTarget=!1;get hashCode(){throw new U}}class ya extends Ca{alias;column;columnName;get hashCode(){return Bi([$i.RELATIONAL_OPERATION_TABLE_ALIAS_COLUMN,this.alias.isSelfJoinTarget?this.alias.relation.selfJoinPointerHashCode:this.alias.relation.pointerHashCode,this.alias.isSelfJoinTarget?fa:this.alias.name,this.column.value.name])}}class Ra extends Ca{value;constructor(e){super(),this.value=e}get hashCode(){return Bi([$i.RELATIONAL_OPERATION_LITERAL,"number"==typeof this.value?this.value.toString():this.value])}}class Pa extends Ca{values=[];get hashCode(){return Bi([$i.RELATIONAL_OPERATION_LITERAL_LIST,Bi(this.values)])}}class wa extends Ca{owner;name;type;nullable;get hashCode(){return Bi([$i.DATABASE_TABLE_COLUMN,this.name,this.nullable?.toString()??"",this.type])}}class La{}class ba extends La{infinityDate}class Da{}class Ma extends Da{get hashCode(){return Bi([$i.RELATIONAL_DATATYPE_BIGINT])}}class Fa extends Da{get hashCode(){return Bi([$i.RELATIONAL_DATATYPE_SMALLINT])}}class ja extends Da{get hashCode(){return Bi([$i.RELATIONAL_DATATYPE_TINYINT])}}class ka extends Da{get hashCode(){return Bi([$i.RELATIONAL_DATATYPE_INTEGER])}}class Ua extends Da{get hashCode(){return Bi([$i.RELATIONAL_DATATYPE_FLOAT])}}class Ga extends Da{get hashCode(){return Bi([$i.RELATIONAL_DATATYPE_DOUBLE])}}class Va extends Da{size;constructor(e){super(),this.size=e}get hashCode(){return Bi([$i.RELATIONAL_DATATYPE_VARCHAR,this.size.toString()])}}class Ba extends Da{size;constructor(e){super(),this.size=e}get hashCode(){return Bi([$i.RELATIONAL_DATATYPE_CHAR,this.size.toString()])}}class $a extends Da{size;constructor(e){super(),this.size=e}get hashCode(){return Bi([$i.RELATIONAL_DATATYPE_VARBINARY,this.size.toString()])}}class za extends Da{precision;scale;constructor(e,t){super(),this.precision=e,this.scale=t}get hashCode(){return Bi([$i.RELATIONAL_DATATYPE_DECIMAL,this.precision.toString(),this.scale.toString()])}}class Ha extends Da{precision;scale;constructor(e,t){super(),this.precision=e,this.scale=t}get hashCode(){return Bi([$i.RELATIONAL_DATATYPE_NUMERIC,this.precision.toString(),this.scale.toString()])}}class Ya extends Da{get hashCode(){return Bi([$i.RELATIONAL_DATATYPE_TIMESTAMP])}}class Wa extends Da{get hashCode(){return Bi([$i.RELATIONAL_DATATYPE_VARCHAR])}}class Ka extends Da{get hashCode(){return Bi([$i.RELATIONAL_DATATYPE_BIT])}}class Xa extends Da{size;constructor(e){super(),this.size=e}get hashCode(){return Bi([$i.RELATIONAL_DATATYPE_BINARY,this.size.toString()])}}class Za extends Da{get hashCode(){return Bi([$i.RELATIONAL_DATATYPE_REAL])}}class qa extends Da{get hashCode(){return Bi([$i.RELATIONAL_DATATYPE_SEMISTRUCTURED])}}class Ja extends cn{ownerReference;constructor(e){super(e),this.ownerReference=e}}class Qa extends Ja{value;constructor(e,t){super(e),this.value=t}get pointerHashCode(){return[$i.RELATIONAL_OPERATION_TABLE_POINTER,this.ownerReference.valueForSerialization??"",this.value.schema.name,this.value.name].map(Vi).join(",")}get selfJoinPointerHashCode(){return[$i.RELATIONAL_OPERATION_TABLE_POINTER,this.ownerReference.valueForSerialization??"",Ta,fa].map(Vi).join(",")}}class er extends Ja{value;constructor(e,t){super(e),this.value=t}get pointerHashCode(){return[$i.RELATIONAL_OPERATION_TABLE_POINTER,this.ownerReference.valueForSerialization??"",this.value.schema.name,this.value.name].map(Vi).join(",")}get selfJoinPointerHashCode(){return[$i.RELATIONAL_OPERATION_TABLE_POINTER,this.ownerReference.valueForSerialization??"",Ta,fa].map(Vi).join(",")}}class tr{}class sr extends tr{_UUID=(0,a.Z)();from;to;constructor(e,t){super(),this.from=e,this.to=t}get hashCode(){return Bi([this.from,this.to])}}class ir extends sr{get hashCode(){return Bi([super.hashCode,$i.SCHEMA_MAPPER])}}class nr extends sr{schema;constructor(e,t,s){super(e,t),this.schema=s}get hashCode(){return Bi([super.hashCode,$i.TABLE_MAPPER,this.schema])}}const ar=Mi((e=>((0,x.rC)(e,{packageableElementIncludes:x.LO,packageableElementExcludes:x.LO,hashCode:x.Fl}),e.packageableElementIncludes.forEach(ki),e.packageableElementExcludes.forEach(ki),e))),rr=(Mi((e=>(cl(e),(0,x.rC)(e,{schemaSet:x.LO,schemaId:x.LO,contentType:x.LO,modelUnit:x.LO,_elementHashCode:x.KG}),e.schemaSet&&ki(e.schemaSet),ar(e.modelUnit),e))),Mi((e=>((0,x.rC)(e,{binding:x.LO,hashCode:x.Fl}),ki(e.binding),e)))),or=Mi((e=>((0,x.rC)(e,{url:x.LO,hashCode:x.Fl}),e))),lr=(Mi((e=>(Bl(e),(0,x.rC)(e,{externalSource:x.LO,hashCode:x.Fl}),or(e.externalSource),e))),Mi((e=>(0,x.rC)(e,{id:x.LO,location:x.LO,content:x.LO,hashCode:x.Fl})))),cr=(Mi((e=>(ji(e),(0,x.rC)(e,{format:x.LO,schemas:x.LO,_elementHashCode:x.KG}),e.schemas.forEach(lr),e))),Mi((e=>e instanceof Ma||e instanceof Fa||e instanceof ja||e instanceof ka||e instanceof Ua||e instanceof Ga||e instanceof Ya||e instanceof Date||e instanceof Wa||e instanceof Ka||e instanceof Za||e instanceof qa?(0,x.rC)(e,{hashCode:x.Fl}):e instanceof Va||e instanceof Ba||e instanceof $a||e instanceof Xa?(0,x.rC)(e,{size:x.LO,hashCode:x.Fl}):e instanceof za||e instanceof Ha?(0,x.rC)(e,{precision:x.LO,scale:x.LO,hashCode:x.Fl}):e))),dr=Mi((e=>((0,x.rC)(e,{name:x.LO,type:x.LO,nullable:x.LO,hashCode:x.Fl}),cr(e.type),e))),hr=Mi((e=>((0,x.rC)(e,{value:x.LO,pointerHashCode:x.Fl,selfJoinPointerHashCode:x.Fl}),ki(e.ownerReference),e))),ur=Mi((e=>((0,x.rC)(e,{value:x.LO,pointerHashCode:x.Fl,selfJoinPointerHashCode:x.Fl}),ki(e.ownerReference),e))),pr=Mi((e=>((0,x.rC)(e,{relation:x.LO,name:x.LO,database:x.LO,isSelfJoinTarget:x.LO}),(e=>{e instanceof er?ur(e):e instanceof Qa&&hr(e)})(e.relation),e))),mr=Mi((e=>((0,x.rC)(e,{name:x.LO,parameters:x.LO,hashCode:x.Fl}),e.parameters.forEach(Sr),e))),_r=Mi((e=>((0,x.rC)(e,{value:x.LO}),ki(e.ownerReference),e))),gr=Mi((e=>((0,x.rC)(e,{alias:x.LO,column:x.LO,columnName:x.LO,hashCode:x.Fl}),pr(e.alias),_r(e.column),e))),Er=Mi((e=>((0,x.rC)(e,{value:x.LO}),ki(e.ownerReference),e))),fr=Mi((e=>((0,x.rC)(e,{alias:x.LO,children:x.LO,joinType:x.LO,hashCode:x.Fl}),e.alias&&pr(e.alias),e.children.forEach(fr),Er(e.join),e))),Tr=Mi((e=>((0,x.rC)(e,{relationalOperationElement:x.LO,joinTreeNode:x.LO,hashCode:x.Fl}),e.relationalOperationElement&&Sr(e.relationalOperationElement),e.joinTreeNode&&fr(e.joinTreeNode),e))),Cr=Mi((e=>((0,x.rC)(e,{value:x.LO,hashCode:x.Fl}),e.value instanceof Ca&&Sr(e.value),e))),xr=Mi((e=>((0,x.rC)(e,{values:x.LO,hashCode:x.Fl}),e.values.forEach(Cr),e)));function Sr(e){return e instanceof Na?mr(e):e instanceof Oa?pr(e):e instanceof ya?gr(e):e instanceof wa?dr(e):e instanceof Ra?Cr(e):e instanceof Pa?xr(e):e instanceof Ia?Tr(e):e}const Nr=Mi((e=>e)),Ar=Fi(((e,t)=>{if(e instanceof ba)return Nr(e);const s=t.plugins.flatMap((e=>e.getExtraMilestoningObservers?.()??[]));for(const i of s){const s=i(e,t);if(s)return s}return e})),vr=Mi((e=>((0,x.rC)(e,{columnName:x.LO,relationalOperationElement:x.LO,hashCode:x.Fl}),Sr(e.relationalOperationElement),e))),Ir=Mi((e=>((0,x.rC)(e,{value:x.LO}),ki(e.ownerReference),e))),Or=Mi((e=>((0,x.rC)(e,{joinTreeNode:x.LO,database:x.LO,filterName:x.LO,hashCode:x.Fl}),e.joinTreeNode&&fr(e.joinTreeNode),Ir(e.filter),e))),yr=Mi((e=>((0,x.rC)(e,{columns:x.LO}),e.columns.forEach(Sr),e))),Rr=e=>{(0,x.rC)(e,{columns:x.LO,name:x.LO})},Pr=Fi(((e,t)=>(Rr(e),(0,x.rC)(e,{primaryKey:x.LO,hashCode:x.Fl}),e.primaryKey.forEach(dr),e.milestoning.forEach((e=>Ar(e,t))),e))),wr=Fi(((e,t)=>(Rr(e),(0,x.rC)(e,{primaryKey:x.LO,columnMappings:x.LO,filter:x.LO,distinct:x.LO,groupBy:x.LO,hashCode:x.Fl}),e.primaryKey.forEach(dr),e.columnMappings.forEach(vr),e.filter&&Or(e.filter),e.groupBy&&yr(e.groupBy),e))),Lr=Fi(((e,t)=>((0,x.rC)(e,{name:x.LO,tables:x.LO,views:x.LO,hashCode:x.Fl}),e.tables.forEach((e=>Pr(e,t))),e.views.forEach((e=>wr(e,t))),e))),br=Mi((e=>((0,x.rC)(e,{name:x.LO,operation:x.LO,hashCode:x.Fl}),Sr(e.operation),e))),Dr=Mi((e=>((0,x.rC)(e,{name:x.LO,target:x.LO,aliases:x.LO,operation:x.LO,hashCode:x.Fl}),e.target&&pr(e.target),Sr(e.operation),e))),Mr=Fi(((e,t)=>(ji(e),(0,x.rC)(e,{schemas:x.LO,joins:x.LO,filters:x.LO,_elementHashCode:x.KG}),e.schemas.forEach((e=>Lr(e,t))),e.joins.forEach(Dr),e.filters.forEach(br),e))),Fr=Fi(((e,t)=>(gl(e,t),(0,x.rC)(e,{transformer:x.LO,relationalOperation:x.LO.ref,bindingTransformer:x.LO,hashCode:x.Fl}),e.bindingTransformer&&rr(e.bindingTransformer),e))),jr=(e,t)=>(Al(e,t),gl(e,t),(0,x.rC)(e,{id:x.LO,rootInstanceSetImplementation:x.LO,primaryKey:x.LO}),e.primaryKey.forEach(Sr),e),kr=Fi(jr),Ur=Fi(((e,t)=>(jr(e,t),(0,x.rC)(e,{inlineSetImplementation:x.LO}),wl(e.inlineSetImplementation,t),e))),Gr=Fi(((e,t)=>(jr(e,t),(0,x.rC)(e,{otherwisePropertyMapping:x.LO,hashCode:x.Fl}),Tl(e.otherwisePropertyMapping,t),e))),Vr=Fi(((e,t)=>(Al(e,t),(0,x.rC)(e,{primaryKey:x.LO}),e.primaryKey.forEach(Sr),e))),Br=Fi(((e,t)=>(Al(e,t),(0,x.rC)(e,{columnMappings:x.LO,filter:x.LO,distinct:x.LO,groupBy:x.LO,mainTableAlias:x.LO,superSetImplementationId:x.LO,hashCode:x.Fl}),e.columnMappings.forEach(vr),e.filter&&Or(e.filter),e.groupBy&&yr(e.groupBy),e.mainTableAlias&&pr(e.mainTableAlias),e))),$r=Mi((e=>((0,x.rC)(e,{data:x.LO,inputType:x.LO,hashCode:x.Fl}),ki(e.database),e))),zr=Mi((e=>(0,x.rC)(e,{host:x.LO,port:x.LO,databaseName:x.LO,hashCode:x.Fl}))),Hr=Mi((e=>(0,x.rC)(e,{hostname:x.LO,port:x.LO,protocol:x.LO,httpPath:x.LO,hashCode:x.Fl}))),Yr=Mi((e=>(0,x.rC)(e,{databaseName:x.LO,directory:x.LO,autoServerMode:x.LO,hashCode:x.Fl}))),Wr=Mi((e=>(0,x.rC)(e,{testDataSetupCsv:x.LO,testDataSetupSqls:x.LO,hashCode:x.Fl}))),Kr=Mi((e=>(0,x.rC)(e,{accountName:x.LO,region:x.LO,warehouseName:x.LO,databaseName:x.LO,cloudType:x.LO,quotedIdentifiersIgnoreCase:x.LO,proxyHost:x.LO,proxyPort:x.LO,nonProxyHosts:x.LO,organization:x.LO,accountType:x.LO,role:x.LO,hashCode:x.Fl}))),Xr=Mi((e=>(0,x.rC)(e,{databaseName:x.LO,endpointURL:x.LO,port:x.LO,region:x.LO,clusterID:x.LO,host:x.LO,hashCode:x.Fl}))),Zr=Mi((e=>(0,x.rC)(e,{projectId:x.LO,defaultDataset:x.LO,proxyHost:x.LO,proxyPort:x.LO,hashCode:x.Fl}))),qr=Mi((e=>(0,x.rC)(e,{projectId:x.LO,instanceId:x.LO,databaseId:x.LO,proxyHost:x.LO,proxyPort:x.LO,hashCode:x.Fl}))),Jr=Mi((e=>(0,x.rC)(e,{serverPrincipal:x.LO,hashCode:x.Fl}))),Qr=Mi((e=>(0,x.rC)(e,{hashCode:x.Fl}))),eo=Mi((e=>(0,x.rC)(e,{apiToken:x.LO,hashCode:x.Fl}))),to=Mi((e=>(0,x.rC)(e,{oauthKey:x.LO,scopeName:x.LO,hashCode:x.Fl}))),so=Mi((e=>(0,x.rC)(e,{privateKeyVaultReference:x.LO,passPhraseVaultReference:x.LO,publicUserName:x.LO,hashCode:x.Fl}))),io=Mi((e=>(0,x.rC)(e,{hashCode:x.Fl}))),no=Mi((e=>(0,x.rC)(e,{hashCode:x.Fl,userNameVaultReference:x.LO,passwordVaultReference:x.LO,baseVaultReference:x.LO}))),ao=Mi((e=>(0,x.rC)(e,{hashCode:x.Fl,serviceAccountEmail:x.LO,additionalGcpScopes:x.LO}))),ro=Mi((e=>(0,x.rC)(e,{hashCode:x.Fl,vaultReference:x.LO}))),oo=e=>{(0,x.rC)(e,{from:x.LO,to:x.LO,hashCode:x.Fl})},lo=Mi((e=>(oo(e),e))),co=Mi((e=>(oo(e),(0,x.rC)(e,{schema:x.LO}),lo(e.schema),e))),ho=Fi(((e,t)=>((e=>{Bl(e),(0,x.rC)(e,{type:x.LO,timeZone:x.LO,quoteIdentifiers:x.LO})})(e),(0,x.rC)(e,{datasourceSpecification:x.LO,authenticationStrategy:x.LO,postProcessors:x.LO,hashCode:x.Fl}),((e,t)=>{if(e instanceof la)return zr(e);if(e instanceof ca)return Hr(e);if(e instanceof da)return Yr(e);if(e instanceof ha)return Wr(e);if(e instanceof ua)return Kr(e);if(e instanceof pa)return Xr(e);if(e instanceof ma)return Zr(e);if(e instanceof _a)return qr(e);const s=t.plugins.flatMap((e=>e.getExtraDatasourceSpecificationObservers?.()??[]));for(const i of s){const s=i(e,t);if(s)return s}})(e.datasourceSpecification,t),((e,t)=>{if(e instanceof Jn)return Jr(e);if(e instanceof Qn)return Qr(e);if(e instanceof ea)return eo(e);if(e instanceof ta)return to(e);if(e instanceof sa)return so(e);if(e instanceof ia)return io(e);if(e instanceof aa)return no(e);if(e instanceof na)return ao(e);if(e instanceof ra)return ro(e);const s=t.plugins.flatMap((e=>e.getExtraAuthenticationStrategyObservers?.()??[]));for(const i of s){const s=i(e,t);if(s)return s}})(e.authenticationStrategy,t),e.postProcessors.forEach((e=>{((e,t)=>{if(e instanceof Ea)return(e=>((e=>{(0,x.rC)(e,{hashCode:x.Fl})})(e),(0,x.rC)(e,{mappers:x.LO}),e.mappers.forEach((e=>{(e=>{e instanceof ir?lo(e):e instanceof nr&&co(e)})(e)})),e))(e);const s=t.plugins.flatMap((e=>e.getExtraPostProcessorObservers?.()??[]));for(const i of s){const s=i(e,t);if(s)return s}})(e,t)})),e)));class uo{id}class po extends uo{__parent;assertions=[]}class mo extends uo{__parent;tests=[]}class _o extends po{serializationFormat;parameters=[];keys=[];get hashCode(){return Bi([$i.SERVICE_TEST,this.id,Bi(this.assertions),Bi(this.parameters),Bi(this.keys),this.serializationFormat??""])}}class go extends po{query;get hashCode(){return Bi([$i.MAPPING_TEST,this.query,this.id,Bi(this.assertions)])}}class Eo extends mo{mappingStoreTestDatas=[];get hashCode(){return Bi([$i.MAPPING_TEST_SUITE,Bi(this.mappingStoreTestDatas),this.id,Bi(this.tests)])}}class fo extends mo{testData;get hashCode(){return Bi([$i.SERVICE_TEST_SUITE,this.id,Bi(this.tests),this.testData])}}class To{id;parentTest}class Co extends To{expected;get hashCode(){return Bi([$i.EQUAL_TO,this.id,Hi(this.expected)])}accept_TestAssertionVisitor(e){return e.visit_EqualTo(this)}}class xo extends To{expected;get hashCode(){return Bi([$i.EQUAL_TO_JSON,this.id,this.expected])}accept_TestAssertionVisitor(e){return e.visit_EqualToJSON(this)}}class So extends To{expected;get hashCode(){return Bi([$i.EQUAL_TO_TDS,this.id,this.expected])}accept_TestAssertionVisitor(e){return e.visit_EqualToTDS(this)}}class No{}class Ao extends No{dataElement;get hashCode(){return Bi([$i.DATA_ELEMENT_REFERENCE,this.dataElement.valueForSerialization??""])}accept_EmbeddedDataVisitor(e){return e.visit_DataElementReference(this)}}class vo extends No{contentType;data;get hashCode(){return Bi([$i.EXTERNAL_FORMAT_DATA,this.contentType,this.data])}accept_EmbeddedDataVisitor(e){return e.visit_ExternalFormatData(this)}}class Io extends No{instances;get hashCode(){return Bi([$i.MODEL_STORE_DATA,Bi(Array.from(this.instances.keys()).map((e=>e.path))),Hi(Array.from(this.instances.values()))])}accept_EmbeddedDataVisitor(e){return e.visit_ModelStoreData(this)}}class Oo extends No{tables=[];accept_EmbeddedDataVisitor(e){return e.visit_RelationalCSVData(this)}get hashCode(){return Bi([$i.RELATIONAL_CSV_DATA_TABLE,Bi(this.tables)])}}const yo=Mi((e=>((0,x.rC)(e,{contentType:x.LO,data:x.LO,hashCode:x.Fl}),e))),Ro=Mi((e=>((0,x.rC)(e,{dataElement:x.LO,hashCode:x.Fl}),e))),Po=Mi((e=>((0,x.rC)(e,{instances:x.LO,hashCode:x.Fl}),e))),wo=Mi((e=>((0,x.rC)(e,{values:x.LO,table:x.LO,schema:x.LO,hashCode:x.Fl}),e))),Lo=Mi((e=>((0,x.rC)(e,{tables:x.LO,hashCode:x.Fl}),e.tables.forEach(wo),e)));function bo(e,t){if(e instanceof Ao)return Ro(e);if(e instanceof vo)return yo(e);if(e instanceof Io)return Po(e);if(e instanceof Oo)return Lo(e);const s=t.plugins.flatMap((e=>e.getExtraEmbeddedDataObservers?.()??[]));for(const i of s){const s=i(e,t);if(s)return s}return e}const Do=Fi(((e,t)=>(ji(e),(0,x.rC)(e,{stereotypes:x.LO,taggedValues:x.LO,data:x.LO,_elementHashCode:x.KG}),e.stereotypes.forEach(ac),e.taggedValues.forEach(oc),bo(e.data,t),e)));class Mo{}class Fo extends Mo{_OWNER;func;constructor(e,t){super(),this.func=e,this._OWNER=t}get hashCode(){return Bi([$i.SERVICE_PURE_EXECUTION,this.func])}}class jo extends Fo{mapping;runtime;constructor(e,t,s,i){super(e,t),this.mapping=s,this.runtime=i}get hashCode(){return Bi([$i.SERVICE_PURE_SINGLE_EXECUTION,super.hashCode,this.mapping?.valueForSerialization??"",this.runtime??""])}}class ko extends Fo{executionKey;executionParameters=[];constructor(e,t,s){super(t,s),this.executionKey=e}get hashCode(){return Bi([$i.SERVICE_PURE_MULTI_EXECUTION,super.hashCode,this.executionKey,Bi(this.executionParameters)])}}class Uo{_OWNER;constructor(e){this._OWNER=e}}class Go extends Uo{data;asserts=[];constructor(e,t){super(e),this.data=t}get hashCode(){return Bi([$i.SERVICE_LEGACY_SINGLE_EXECUTION_TEST,this.data,Bi(this.asserts)])}}class Vo extends Uo{tests=[];get hashCode(){return Bi([$i.SERVICE_LEGACY_MULTI_EXECUTION_TEST,Bi(this.tests)])}}const Bo=Fi(((e,t)=>((0,x.rC)(e,{connectionId:x.LO,testData:x.LO,hashCode:x.Fl}),bo(e.testData,t),e))),$o=Mi((e=>((0,x.rC)(e,{name:x.LO,value:x.LO.ref,hashCode:x.Fl}),e))),zo=Mi((e=>((0,x.rC)(e,{assertion:x.LO,hashCode:x.Fl,id:x.LO}),Rn(e.assertion),e))),Ho=Mi((e=>((0,x.rC)(e,{assertions:x.LO,description:x.LO,parameters:x.LO,hashCode:x.Fl}),e.assertions.forEach(zo),e.parameters.forEach(Rn),e))),Yo=Fi(((e,t)=>((0,x.rC)(e,{connectionsTestData:x.LO,hashCode:x.Fl}),e.connectionsTestData.forEach((e=>Bo(e,t))),e))),Wo=Mi((e=>((0,x.rC)(e,{id:x.LO,serializationFormat:x.LO,assertions:x.LO,parameters:x.LO,keys:x.LO,hashCode:x.Fl}),e.parameters.forEach($o),e.assertions.forEach(ll),e))),Ko=Fi(((e,t)=>((0,x.rC)(e,{id:x.LO,tests:x.LO,testData:x.LO,hashCode:x.Fl}),e.tests.forEach((e=>ol(e,t))),Yo(e.testData,t),e))),Xo=Mi((e=>((0,x.rC)(e,{parametersValues:x.LO,assert:x.LO,singleExecutionTestParent:x.LO,hashCode:x.Fl}),Rn(e.assert),e))),Zo=Mi((e=>((0,x.rC)(e,{data:x.LO,asserts:x.LO,hashCode:x.Fl}),e.asserts.forEach(Xo),e))),qo=Mi((e=>(Zo(e),(0,x.rC)(e,{key:x.LO}),e))),Jo=Mi((e=>((0,x.rC)(e,{tests:x.LO,hashCode:x.Fl}),e.tests.forEach(qo),e))),Qo=e=>{(0,x.rC)(e,{func:x.LO}),Rn(e.func)},el=Fi(((e,t)=>(Qo(e),(0,x.rC)(e,{runtime:x.LO,hashCode:x.Fl}),e.mapping&&ki(e.mapping),e.runtime&&ec(e.runtime,t),e))),tl=Fi(((e,t)=>((0,x.rC)(e,{key:x.LO,runtime:x.LO,hashCode:x.Fl}),ki(e.mapping),ec(e.runtime,t),e))),sl=Fi(((e,t)=>(Qo(e),(0,x.rC)(e,{executionKey:x.LO,executionParameters:x.LO,hashCode:x.Fl}),e.executionParameters.forEach((e=>tl(e,t))),e))),il=Fi(((e,t)=>(ji(e),(0,x.rC)(e,{pattern:x.LO,owners:x.LO,documentation:x.LO,autoActivateUpdates:x.LO,execution:x.LO,test:x.LO,tests:x.LO,postValidations:x.LO,patternParameters:x.Fl,_elementHashCode:x.KG}),e.stereotypes.forEach(ac),e.taggedValues.forEach(oc),((e,t)=>{e instanceof jo?el(e,t):e instanceof ko&&sl(e,t)})(e.execution,t),e.test&&(e=>{e instanceof Go?Zo(e):e instanceof Vo&&Jo(e)})(e.test),e.tests.forEach((e=>Ko(e,t))),e.postValidations.forEach((e=>Ho(e))),e))),nl=Mi((e=>((0,x.rC)(e,{id:x.LO,expected:x.LO,hashCode:x.Fl}),e))),al=Mi((e=>((0,x.rC)(e,{id:x.LO,expected:x.LO,hashCode:x.Fl}),yo(e.expected),e))),rl=Mi((e=>((0,x.rC)(e,{id:x.LO,expected:x.LO,hashCode:x.Fl}),yo(e.expected),e)));function ol(e,t){if(e instanceof _o)return Wo(e);if(e instanceof go)return hl(e);const s=t.plugins.flatMap((e=>e.getExtraAtomicTestObservers?.()??[]));for(const i of s){const s=i(e,t);if(s)return s}return e}function ll(e){return e instanceof Co?nl(e):e instanceof xo?rl(e):e instanceof So?al(e):e}const cl=e=>{ji(e),(0,x.rC)(e,{includes:x.LO}),e.includes.forEach(ki)},dl=Fi(((e,t)=>((0,x.rC)(e,{store:x.LO,data:x.LO,hashCode:x.Fl}),bo(e.data,t),e))),hl=Mi((e=>((0,x.rC)(e,{id:x.LO,query:x.LO,assertions:x.LO,hashCode:x.Fl}),e.assertions.forEach(ll),e))),ul=Fi(((e,t)=>((0,x.rC)(e,{id:x.LO,tests:x.LO,mappingStoreTestDatas:x.LO,hashCode:x.Fl}),e.tests.forEach((e=>ol(e,t))),e.mappingStoreTestDatas.forEach((e=>dl(e,t))),e))),pl=Mi((e=>((0,x.rC)(e,{value:x.LO,valueForSerialization:x.Fl}),ki(e.ownerReference),e))),ml=Mi((e=>((0,x.rC)(e,{value:x.LO}),ki(e.ownerReference),e))),_l=Mi((e=>((0,x.rC)(e,{localMappingProperty:x.LO,localMappingPropertyType:x.LO,localMappingPropertyMultiplicity:x.LO,hashCode:x.Fl}),ki(e.localMappingPropertyType),e))),gl=(e,t)=>{(0,x.rC)(e,{sourceSetImplementation:x.LO,targetSetImplementation:x.LO}),Sc(e.property),ml(e.sourceSetImplementation),e.targetSetImplementation&&ml(e.targetSetImplementation),e.localMappingProperty&&_l(e.localMappingProperty)},El=Fi(((e,t)=>(gl(e,t),(0,x.rC)(e,{transformer:x.LO,transform:x.LO,explodeProperty:x.LO,hashCode:x.Fl}),e.transformer&&pl(e.transformer),Rn(e.transform),e)));class fl{observerContext;constructor(e){this.observerContext=e}visit_PropertyMapping(e){const t=this.observerContext.plugins.flatMap((e=>e.getExtraPropertyMappingObservers?.()??[]));for(const s of t)if(s(e,this.observerContext))return}visit_PurePropertyMapping(e){El(e,this.observerContext)}visit_FlatDataPropertyMapping(e){Kn(e,this.observerContext)}visit_EmbeddedFlatDataPropertyMapping(e){Wn(e,this.observerContext)}visit_RelationalPropertyMapping(e){Fr(e,this.observerContext)}visit_FlatDataAssociationPropertyMapping(e){kn(e,this.observerContext)}visit_EmbeddedRelationalPropertyMapping(e){kr(e,this.observerContext)}visit_InlineEmbeddedRelationalPropertyMapping(e){Ur(e,this.observerContext)}visit_OtherwiseEmbeddedRelationalPropertyMapping(e){Gr(e,this.observerContext)}visit_AggregationAwarePropertyMapping(e){}visit_XStorePropertyMapping(e){}}const Tl=(e,t)=>(e.accept_PropertyMappingVisitor(new fl(t)),e),Cl=Mi((e=>(0,x.rC)(e,{isDefault:x.Fl,valueForSerialization:x.Fl}))),xl=Mi((e=>(0,x.rC)(e,{valueForSerialization:x.Fl}))),Sl=e=>{(0,x.rC)(e,{root:x.LO}),ki(e.class),Cl(e.id),xl(e.root)},Nl=Mi((e=>((0,x.rC)(e,{setImplementation:x.LO,class:x.LO,properties:x.LO}),e))),Al=(e,t)=>{Sl(e),(0,x.rC)(e,{mappingClass:x.LO,propertyMappings:x.LO}),e.mappingClass&&Nl(e.mappingClass),e.propertyMappings.forEach((e=>Tl(e,t)))},vl=Mi((e=>((0,x.rC)(e,{}),ml(e.setImplementation),e))),Il=e=>{Sl(e),(0,x.rC)(e,{parameters:x.LO,operation:x.LO,hashCode:x.Fl}),e.parameters.forEach(vl)},Ol=Mi((e=>(Il(e),e))),yl=Mi((e=>(Il(e),(0,x.rC)(e,{validationFunction:x.LO}),Rn(e.validationFunction),e))),Rl=Fi(((e,t)=>(Al(e,t),(0,x.rC)(e,{filter:x.LO,hashCode:x.Fl}),e.srcClass&&ki(e.srcClass),e.filter&&Rn(e.filter),e)));class Pl{observerContext;constructor(e){this.observerContext=e}visit_SetImplementation(e){const t=this.observerContext.plugins.flatMap((e=>e.getExtraSetImplementationObservers?.()??[]));for(const s of t)if(s(e,this.observerContext))return}visit_MergeOperationSetImplementation(e){yl(e)}visit_OperationSetImplementation(e){Ol(e)}visit_PureInstanceSetImplementation(e){Rl(e,this.observerContext)}visit_FlatDataInstanceSetImplementation(e){Yn(e,this.observerContext)}visit_EmbeddedFlatDataSetImplementation(e){}visit_RelationalInstanceSetImplementation(e){Vr(e,this.observerContext)}visit_RootRelationalInstanceSetImplementation(e){Br(e,this.observerContext)}visit_AggregationAwareSetImplementation(e){}visit_TEMPORARY__UnresolvedSetImplementation(e){}}const wl=(e,t)=>(e.accept_SetImplementationVisitor(new Pl(t)),e),Ll=Mi((e=>((0,x.rC)(e,{original:x.LO,substitute:x.LO}),ki(e.original),ki(e.substitute),e))),bl=Mi((e=>((0,x.rC)(e,{included:x.LO,storeSubstitutions:x.LO}),ki(e.included),e.storeSubstitutions.forEach(Ll),e))),Dl=Mi((e=>(0,x.rC)(e,{value:x.LO}))),Ml=Mi((e=>((0,x.rC)(e,{sourceValues:x.LO,hashCode:x.Fl}),gc(e.enum),e.sourceValues.forEach(Dl),e))),Fl=Mi((e=>((0,x.rC)(e,{sourceType:x.LO,enumValueMappings:x.LO,hashCode:x.Fl}),ki(e.enumeration),Cl(e.id),e.sourceType&&ki(e.sourceType),e.enumValueMappings.forEach(Ml),e))),jl=Fi(((e,t)=>((0,x.rC)(e,{id:x.LO,stores:x.LO,propertyMappings:x.LO,hashCode:x.Fl}),ki(e.association),Cl(e.id),e.stores.forEach(ki),e.propertyMappings.forEach((e=>Tl(e,t))),e))),kl=Mi((e=>((0,x.rC)(e,{inputType:x.LO,data:x.LO,hashCode:x.Fl}),ki(e.sourceClass),e))),Ul=Mi((e=>(0,x.rC)(e,{expectedOutput:x.LO,hashCode:x.Fl}))),Gl=Fi(((e,t)=>((0,x.rC)(e,{name:x.LO,query:x.LO,inputData:x.LO,assert:x.LO,hashCode:x.Fl}),Rn(e.query),e.inputData.forEach((e=>((e,t)=>{if(e instanceof In)return kl(e);if(e instanceof Sn)return Xn(e);if(e instanceof On)return $r(e);const s=t.plugins.flatMap((e=>e.getExtraMappingTestInputDataObservers?.()??[]));for(const i of s){const s=i(e,t);if(s)return s}return e})(e,t))),((e,t)=>{e instanceof En&&Ul(e)})(e.assert),e))),Vl=Fi(((e,t)=>(ji(e),(0,x.rC)(e,{includes:x.LO,classMappings:x.LO,enumerationMappings:x.LO,associationMappings:x.LO,test:x.LO,tests:x.LO,_elementHashCode:x.KG}),e.includes.forEach(bl),e.classMappings.forEach((e=>wl(e,t))),e.enumerationMappings.forEach(Fl),e.associationMappings.forEach((e=>jl(e,t))),e.test.forEach((e=>Gl(e,t))),e.tests.forEach((e=>function(e,t){return e instanceof fo?Ko(e,t):e instanceof Eo?ul(e,t):e}(e,t))),e))),Bl=e=>{(0,x.rC)(e,{store:x.LO}),ki(e.store)},$l=Mi((e=>(Bl(e),(0,x.rC)(e,{hashCode:x.Fl}),e))),zl=Mi((e=>(Bl(e),(0,x.rC)(e,{url:x.LO,hashCode:x.Fl}),ki(e.class),e))),Hl=Mi((e=>(Bl(e),(0,x.rC)(e,{url:x.LO,hashCode:x.Fl}),ki(e.class),e))),Yl=Mi((e=>(Bl(e),(0,x.rC)(e,{mappings:x.LO,hashCode:x.Fl}),e.mappings.forEach(ki),e)));class Wl{observerContext;constructor(e){this.observerContext=e}visit_Connection(e){const t=this.observerContext.plugins.flatMap((e=>e.getExtraConnectionObservers?.()??[]));for(const s of t)if(s(e,this.observerContext))return}visit_ConnectionPointer(e){$l(e)}visit_ModelChainConnection(e){Yl(e)}visit_JsonModelConnection(e){zl(e)}visit_XmlModelConnection(e){Hl(e)}visit_FlatDataConnection(e){Zn(e)}visit_RelationalDatabaseConnection(e){ho(e,this.observerContext)}}const Kl=(e,t)=>(e.accept_ConnectionVisitor(new Wl(t)),e),Xl=Fi(((e,t)=>(ji(e),(0,x.rC)(e,{connectionValue:x.LO,_elementHashCode:x.KG}),Kl(e.connectionValue,t),e))),Zl=Fi(((e,t)=>((0,x.rC)(e,{id:x.LO,connection:x.LO,hashCode:x.Fl}),Kl(e.connection,t),e))),ql=Fi(((e,t)=>((0,x.rC)(e,{storeConnections:x.LO,hashCode:x.Fl}),ki(e.store),e.storeConnections.forEach((e=>Zl(e,t))),e))),Jl=Fi(((e,t)=>((0,x.rC)(e,{mappings:x.LO,connections:x.LO,hashCode:x.Fl}),e.mappings.forEach(ki),e.connections.forEach((e=>ql(e,t))),e))),Ql=Mi((e=>((0,x.rC)(e,{hashCode:x.Fl}),ki(e.packageableRuntime),e))),ec=(e,t)=>e instanceof Cn?Ql(e):e instanceof Tn?Jl(e,t):e,tc=Fi(((e,t)=>(ji(e),(0,x.rC)(e,{runtimeValue:x.LO,_elementHashCode:x.KG}),Jl(e.runtimeValue,t),e)));class sc{observerContext;constructor(e){this.observerContext=e}visit_PackageableElement(e){const t=this.observerContext.plugins.flatMap((e=>e.getExtraElementObservers?.()??[]));for(const s of t)if(s(e,this.observerContext))return}visit_Package(e){nc(e,this.observerContext)}visit_SectionIndex(e){hc(e)}visit_PrimitiveType(e){}visit_Profile(e){mc(e)}visit_Enumeration(e){Ec(e)}visit_Measure(e){Tc(e)}visit_Class(e){Ac(e)}visit_Association(e){vc(e)}visit_ConcreteFunctionDefinition(e){Ic(e)}visit_FlatData(e){zn(e)}visit_Database(e){Mr(e,this.observerContext)}visit_Mapping(e){Vl(e,this.observerContext)}visit_Service(e){il(e,this.observerContext)}visit_PackageableRuntime(e){tc(e,this.observerContext)}visit_PackageableConnection(e){Xl(e,this.observerContext)}visit_FileGenerationSpecification(e){pn(e)}visit_GenerationSpecification(e){_n(e)}visit_DataElement(e){Do(e,this.observerContext)}}const ic=Fi(((e,t)=>(e.accept_PackageableElementVisitor(new sc(t)),e))),nc=Fi(((e,t)=>((e=>{ji(e),(0,x.rC)(e,{children:x.LO,hashCode:x.KG})})(e),e.children.forEach((e=>{e instanceof nn?nc(e,t):ic(e,t)})),e))),ac=Mi((e=>((0,x.rC)(e,{value:x.LO,pointerHashCode:x.Fl}),ki(e.ownerReference),e))),rc=Mi((e=>((0,x.rC)(e,{value:x.LO,pointerHashCode:x.Fl}),e))),oc=Mi((e=>((0,x.rC)(e,{value:x.LO,hashCode:x.Fl}),rc(e.tag),e))),lc=Mi((e=>(0,x.rC)(e,{rawType:x.LO}))),cc=Mi((e=>((0,x.rC)(e,{value:x.LO}),lc(e.value),ki(e.ownerReference),e))),dc=Mi((e=>((0,x.rC)(e,{parserName:x.LO,elements:x.LO}),e instanceof rn?(0,x.rC)(e,{imports:x.LO,hashCode:x.Fl}):e instanceof on&&(0,x.rC)(e,{hashCode:x.Fl}),e))),hc=Mi((e=>(ji(e),(0,x.rC)(e,{sections:x.LO,_elementHashCode:x.KG}),e.sections.forEach(dc),e))),uc=Mi((e=>(0,x.rC)(e,{value:x.LO}))),pc=Mi((e=>(0,x.rC)(e,{value:x.LO}))),mc=Mi((e=>(ji(e),(0,x.rC)(e,{p_stereotypes:x.LO,p_tags:x.LO,_elementHashCode:x.KG}),e.p_stereotypes.forEach(uc),e.p_tags.forEach(pc),e))),_c=Mi((e=>((0,x.rC)(e,{name:x.LO,stereotypes:x.LO,taggedValues:x.LO,hashCode:x.Fl}),e.stereotypes.forEach(ac),e.taggedValues.forEach(oc),e))),gc=Mi((e=>((0,x.rC)(e,{value:x.LO}),ki(e.ownerReference),e))),Ec=Mi((e=>(ji(e),(0,x.rC)(e,{values:x.LO,stereotypes:x.LO,taggedValues:x.LO,_elementHashCode:x.KG}),e.values.forEach(_c),e.stereotypes.forEach(ac),e.taggedValues.forEach(oc),e))),fc=Mi((e=>((0,x.rC)(e,{measure:x.LO,conversionFunction:x.LO,hashCode:x.Fl}),e.conversionFunction&&Rn(e.conversionFunction),e))),Tc=Mi((e=>(ji(e),(0,x.rC)(e,{canonicalUnit:x.LO,nonCanonicalUnits:x.LO,_elementHashCode:x.KG}),e.canonicalUnit&&fc(e.canonicalUnit),e.nonCanonicalUnits.forEach(fc),e))),Cc=Mi((e=>((0,x.rC)(e,{name:x.LO,multiplicity:x.LO,stereotypes:x.LO,taggedValues:x.LO,hashCode:x.Fl}),cc(e.genericType),e.stereotypes.forEach(ac),e.taggedValues.forEach(oc),e))),xc=Mi((e=>((0,x.rC)(e,{name:x.LO,multiplicity:x.LO,stereotypes:x.LO,taggedValues:x.LO,body:x.LO.ref,parameters:x.LO.ref,hashCode:x.Fl}),cc(e.genericType),e.stereotypes.forEach(ac),e.taggedValues.forEach(oc),e))),Sc=Mi((e=>((0,x.rC)(e,{value:x.LO,pointerHashCode:x.Fl}),ki(e.ownerReference),e))),Nc=Mi((e=>((0,x.rC)(e,{name:x.LO,functionDefinition:x.LO,externalId:x.LO,enforcementLevel:x.LO,messageFunction:x.LO,hashCode:x.Fl}),Rn(e.functionDefinition),e.messageFunction&&Rn(e.messageFunction),e))),Ac=Mi((e=>(ji(e),(0,x.rC)(e,{_subclasses:x.LO,properties:x.LO,propertiesFromAssociations:x.LO,derivedProperties:x.LO,generalizations:x.LO,constraints:x.LO,stereotypes:x.LO,taggedValues:x.LO,dispose:x.KG,_elementHashCode:x.KG}),e.properties.forEach(Cc),e.propertiesFromAssociations.forEach(Cc),e.derivedProperties.forEach(xc),e.generalizations.forEach(cc),e.constraints.forEach(Nc),e.stereotypes.forEach(ac),e.taggedValues.forEach(oc),e))),vc=Mi((e=>(ji(e),(0,x.rC)(e,{properties:x.LO,stereotypes:x.LO,taggedValues:x.LO,derivedProperties:x.LO,_elementHashCode:x.KG}),e.properties.forEach(Cc),e.derivedProperties.forEach(xc),e.stereotypes.forEach(ac),e.taggedValues.forEach(oc),e))),Ic=Mi((e=>(ji(e),(0,x.rC)(e,{functionName:x.LO,returnMultiplicity:x.LO,parameters:x.LO.shallow,expressionSequence:x.LO.ref,stereotypes:x.LO,taggedValues:x.LO,_elementHashCode:x.KG}),e.parameters.forEach(Pn),ki(e.returnType),e.stereotypes.forEach(ac),e.taggedValues.forEach(oc),e))),Oc=Mi((e=>e instanceof en?Ec(e):e instanceof tn?fc(e):e instanceof Ji?Ac(e):e instanceof sn?Tc(e):e)),yc=(Mi((e=>e instanceof en?Ec(e):e instanceof tn?fc(e):e)),Mi((e=>(0,x.rC)(e,{_dummyObservable:x.LO})))),Rc=Mi((e=>((0,x.rC)(e,{value:x.LO}),ki(e.ownerReference),e))),Pc=Mi((e=>(yc(e),(0,x.rC)(e,{id:x.LO,hideProperties:x.LO,hideTaggedValues:x.LO,hideStereotypes:x.LO,hashCode:x.Fl}),ki(e.class),e))),wc=Mi((e=>(Rc(e.classView),e))),Lc=Mi((e=>((0,x.rC)(e,{path:x.LO,pathForSerialization:x.Fl}),wc(e.from),wc(e.to),e))),bc=Mi((e=>(Lc(e),(0,x.rC)(e,{hashCode:x.Fl}),e))),Dc=Mi((e=>(Lc(e),(0,x.rC)(e,{hashCode:x.Fl}),Sc(e.property),ki(e.association),e))),Mc=Mi((e=>(Lc(e),(0,x.rC)(e,{hashCode:x.Fl}),Sc(e.property),e))),Fc=Mi((e=>(ji(e),(0,x.rC)(e,{classViews:x.LO,associationViews:x.LO,generalizationViews:x.LO,propertyViews:x.LO,_elementHashCode:x.KG}),e.classViews.forEach(Pc),e.associationViews.forEach(Dc),e.generalizationViews.forEach(bc),e.propertyViews.forEach(Mc),e)));var jc;!function(e){e.DIAGRAM="DIAGRAM",e.CLASS_VIEW="CLASS_VIEW",e.PROPERTY_VIEW="PROPERTY_VIEW",e.ASSOCIATION_VIEW="ASSOCIATION_VIEW",e.PROPERTY_HOLDER_VIEW="PROPERTY_HOLDER_VIEW",e.GENERALIZATION_VIEW="GENERALIZATION_VIEW",e.RELATIONSHIP_VIEW="RELATIONSHIP_VIEW",e.POINT="POINT",e.RECTANGLE="RECTANGLE",e.POSITIONED_RECTANGLE="POSITIONED_RECTANGLE"}(jc=jc||(jc={}));class kc extends Zi{classViews=[];associationViews=[];generalizationViews=[];propertyViews=[];get _elementHashCode(){return Bi([jc.DIAGRAM,this.path,Bi(this.classViews),Bi(this.generalizationViews),Bi(this.propertyViews)])}accept_PackageableElementVisitor(e){return e.visit_PackageableElement(this)}}const Uc="Diagram";class Gc extends Di{constructor(){super(bi.Rw.LW,bi.i8)}getExtraPureGrammarParserNames(){return["Diagram"]}getExtraPureGrammarKeywords(){return[Uc]}getExtraPureGrammarElementLabelers(){return[e=>{if(e instanceof kc)return Uc}]}getExtraElementObservers(){return[(e,t)=>{if(e instanceof kc)return Fc(e)}]}}class Vc{package;name;get path(){return`${this.package}${fe}${this.name}`}get hashCode(){return Bi([$i.PACKAGEABLE_ELEMENT,this.path])}}class Bc extends Vc{classViews=[];propertyViews=[];generalizationViews=[];get hashCode(){return Bi([jc.DIAGRAM,this.path,Bi(this.classViews),Bi(this.generalizationViews),Bi(this.propertyViews)])}accept_PackageableElementVisitor(e){return e.visit_PackageableElement(this)}}class $c{rectangle;position;get hashCode(){return Bi([jc.POSITIONED_RECTANGLE,this.position,this.rectangle])}}class zc extends $c{id;class;hideProperties;hideTaggedValues;hideStereotypes;get hashCode(){return Bi([jc.CLASS_VIEW,super.hashCode,this.id,this.class,this.hideProperties?.toString()??"",this.hideTaggedValues?.toString()??"",this.hideStereotypes?.toString()??""])}}class Hc{x;y;get hashCode(){return Bi([jc.POINT,this.x.toString(),this.y.toString()])}}class Yc{width;height;get hashCode(){return Bi([jc.RECTANGLE,this.width.toString(),this.height.toString()])}}class Wc{points=[]}class Kc{sourceView;targetView;line;get hashCode(){return Bi([jc.RELATIONSHIP_VIEW,this.sourceView,this.targetView,Bi(this.line.points)])}}class Xc extends Kc{property;get hashCode(){return Bi([jc.PROPERTY_HOLDER_VIEW,super.hashCode,this.property])}}class Zc extends Xc{get hashCode(){return Bi([jc.PROPERTY_VIEW,super.hashCode])}}class qc extends Kc{get hashCode(){return Bi([jc.GENERALIZATION_VIEW,super.hashCode])}}class Jc{lowerBound=0;upperBound;constructor(e,t){this.lowerBound=e,this.upperBound=t}get hashCode(){return Bi([$i.MULTIPLICITY,this.lowerBound.toString(),this.upperBound?.toString()??""])}static ZERO=new Jc(0,0);static ZERO_ONE=new Jc(0,1);static ZERO_MANY=new Jc(0,void 0);static ONE=new Jc(1,1);static ONE_MANY=new Jc(1,void 0)}new Ye((0,He.yu)(class{sourceId;startLine;startColumn;endLine;endColumn},{sourceId:(0,He.Ru)(),startLine:(0,He.Ru)(),startColumn:(0,He.Ru)(),endLine:(0,He.Ru)(),endColumn:(0,He.Ru)()})),(0,He.yu)(class{type;path;constructor(e,t){this.type=e,this.path=t}get hashCode(){return Bi([$i.PACKAGEABLE_ELEMENT_POINTER,this.type,this.path])}},{path:(0,He.Ru)(),type:(0,He.Ru)()});const Qc=(0,He.yu)(Jc,{lowerBound:(0,He.Ru)(),upperBound:(0,He.jt)((0,He.Ru)())});class ed{class;property;get hashCode(){return Bi([$i.PROPERTY_POINTER,this.property,this.class??""])}}class td{}class sd{queryTimeOutInSeconds=null;enableConstraints=!0}var id,nd;!function(e){e.BASE_EXECUTION_CONTEXT="BaseExecutionContext"}(id||(id={})),function(e){e.LAMBDA="lambda",e.VARIABLE="var",e.CINTEGER="integer",e.CDECIMAL="decimal",e.CSTRING="string",e.CBOOLEAN="boolean",e.CFLOAT="float",e.CDATETIME="dateTime",e.CSTRICTDATE="strictDate",e.CSTRICTTIME="strictTime",e.CLATESTDATE="latestDate"}(nd=nd||(nd={})),(0,He.yu)(class extends sd{},{_type:Ze(id.BASE_EXECUTION_CONTEXT),queryTimeOutInSeconds:(0,He.Ru)(),enableConstraints:(0,He.Ru)()});const ad=(0,He.yu)(class extends td{body;parameters;get hashCode(){return Bi([$i.RAW_LAMBDA,Yi(this.parameters,this.body)])}accept_RawValueSpecificationVisitor(e){return e.visit_Lambda(this)}},{_type:Ze(nd.LAMBDA),body:(0,He.LZ)(),parameters:(0,He.LZ)()}),rd=(0,He.yu)(class extends td{class;name;multiplicity;get hashCode(){return Bi([$i.RAW_VARIABLE,this.class,this.name,this.multiplicity])}accept_RawValueSpecificationVisitor(e){return e.visit_Variable(this)}},{_type:Ze(nd.VARIABLE),class:(0,He.Ru)(),multiplicity:We(Qc),name:(0,He.Ru)()});(0,He.yu)(class extends td{multiplicity=Jc.ONE;type;value;get hashCode(){return Bi([$i.RAW_INSTANCE_VALUE,this.type,this.multiplicity,this.value??""])}accept_RawValueSpecificationVisitor(e){return e.visit_PrimitiveInstanceValue(this)}},{type:(0,He.bm)("_type",(0,He.PG)((e=>{switch(e){case Se.INTEGER:return nd.CINTEGER;case Se.DECIMAL:return nd.CDECIMAL;case Se.STRING:return nd.CSTRING;case Se.BOOLEAN:return nd.CBOOLEAN;case Se.FLOAT:return nd.CFLOAT;case Se.DATETIME:return nd.CDATETIME;case Se.STRICTDATE:return nd.CSTRICTDATE;case Se.STRICTTIME:return nd.CSTRICTTIME;case Se.LATESTDATE:return nd.CLATESTDATE;default:throw new U(`Can't serialize raw instance value type '${e}'`)}}),(e=>{switch(e){case nd.CINTEGER:return Se.INTEGER;case nd.CDECIMAL:return Se.DECIMAL;case nd.CSTRING:return Se.STRING;case nd.CBOOLEAN:return Se.BOOLEAN;case nd.CFLOAT:return Se.FLOAT;case nd.CDATETIME:return Se.DATETIME;case nd.CSTRICTDATE:return Se.STRICTDATE;case nd.CSTRICTTIME:return Se.STRICTTIME;case nd.CLATESTDATE:return Se.LATESTDATE;default:throw new U(`Can't deserialize raw value instance value type '${e}'`)}}))),value:(0,He.jt)((0,He.Ru)())});const od=(0,He.yu)(ed,{class:(0,He.jt)((0,He.Ru)()),property:(0,He.Ru)()}),ld=(0,He.yu)(class{profile;value;get hashCode(){return Bi([$i.STEREOTYPE_POINTER,this.value,this.profile])}},{profile:(0,He.Ru)(),value:(0,He.Ru)()}),cd=(0,He.yu)(class{profile;value;get hashCode(){return Bi([$i.TAG_POINTER,this.value,this.profile])}},{profile:(0,He.Ru)(),value:(0,He.Ru)()}),dd=(0,He.yu)(class{tag;value;get hashCode(){return Bi([$i.TAGGED_VALUE,this.tag,this.value])}},{tag:We(cd),value:(0,He.Ru)()}),hd=((0,He.yu)(class extends Vc{stereotypes=[];tags=[];get hashCode(){return Bi([$i.PROFILE,this.path,Bi(this.stereotypes),Bi(this.tags)])}accept_PackageableElementVisitor(e){return e.visit_Profile(this)}},{_type:Ze("profile"),name:(0,He.Ru)(),package:(0,He.Ru)(),stereotypes:(0,He.pb)((0,He.Ru)()),tags:(0,He.pb)((0,He.Ru)())}),(0,He.yu)(class{value;stereotypes=[];taggedValues=[];get hashCode(){return Bi([$i.ENUM_VALUE,this.value,Bi(this.stereotypes),Bi(this.taggedValues)])}},{stereotypes:(0,He.PG)((e=>Xe(e,(e=>(0,He.qC)(ld,e)),{skipIfEmpty:!0,INTERNAL__forceReturnEmptyInTest:!0})),(e=>Ke(e,(e=>(0,He.vB)(ld,e)),{skipIfEmpty:!1}))),taggedValues:(0,He.PG)((e=>Xe(e,(e=>(0,He.qC)(dd,e)),{skipIfEmpty:!0,INTERNAL__forceReturnEmptyInTest:!0})),(e=>Ke(e,(e=>(0,He.vB)(dd,e)),{skipIfEmpty:!1}))),value:(0,He.Ru)()})),ud=((0,He.yu)(class extends Vc{values=[];stereotypes=[];taggedValues=[];get hashCode(){return Bi([$i.ENUMERATION,this.path,Bi(this.values),Bi(this.stereotypes),Bi(this.taggedValues)])}accept_PackageableElementVisitor(e){return e.visit_Enumeration(this)}},{_type:Ze("Enumeration"),name:(0,He.Ru)(),package:(0,He.Ru)(),stereotypes:(0,He.PG)((e=>Xe(e,(e=>(0,He.qC)(ld,e)),{skipIfEmpty:!0,INTERNAL__forceReturnEmptyInTest:!0})),(e=>Ke(e,(e=>(0,He.vB)(ld,e)),{skipIfEmpty:!1}))),taggedValues:(0,He.PG)((e=>Xe(e,(e=>(0,He.qC)(dd,e)),{skipIfEmpty:!0,INTERNAL__forceReturnEmptyInTest:!0})),(e=>Ke(e,(e=>(0,He.vB)(dd,e)),{skipIfEmpty:!1}))),values:(0,He.pb)(We(hd))}),(0,He.yu)(class extends Vc{measure;conversionFunction;get hashCode(){return Bi([$i.UNIT,this.measure,this.conversionFunction??""])}accept_PackageableElementVisitor(e){throw new U}},{_type:Ze("unit"),conversionFunction:(0,He.jt)(We(ad)),measure:(0,He.Ru)(),name:(0,He.Ru)(),package:(0,He.Ru)()})),pd=((0,He.yu)(class extends Vc{canonicalUnit;nonCanonicalUnits=[];get hashCode(){return Bi([$i.MEASURE,this.path,this.canonicalUnit??"",Bi(this.nonCanonicalUnits)])}accept_PackageableElementVisitor(e){return e.visit_Measure(this)}},{_type:Ze("measure"),canonicalUnit:(0,He.jt)(We(ud)),name:(0,He.Ru)(),nonCanonicalUnits:(0,He.pb)(We(ud)),package:(0,He.Ru)()}),(0,He.yu)(class{name;type;multiplicity;aggregation;stereotypes=[];taggedValues=[];get hashCode(){return Bi([$i.PROPERTY,this.name,this.multiplicity,this.type,this.aggregation??"",Bi(this.stereotypes),Bi(this.taggedValues)])}},{aggregation:(0,He.jt)((0,He.Ru)()),multiplicity:We(Qc),name:(0,He.Ru)(),stereotypes:(0,He.PG)((e=>Xe(e,(e=>(0,He.qC)(ld,e)),{skipIfEmpty:!0,INTERNAL__forceReturnEmptyInTest:!0})),(e=>Ke(e,(e=>(0,He.vB)(ld,e)),{skipIfEmpty:!1}))),taggedValues:(0,He.PG)((e=>Xe(e,(e=>(0,He.qC)(dd,e)),{skipIfEmpty:!0,INTERNAL__forceReturnEmptyInTest:!0})),(e=>Ke(e,(e=>(0,He.vB)(dd,e)),{skipIfEmpty:!1}))),type:(0,He.Ru)()})),md=(0,He.yu)(class{name;returnType;returnMultiplicity;stereotypes=[];taggedValues=[];body;parameters;get hashCode(){return Bi([$i.DERIVED_PROPERTY,this.name,this.returnMultiplicity,this.returnType,Bi(this.stereotypes),Bi(this.taggedValues),Yi(this.parameters,this.body)])}},{body:(0,He.LZ)(),name:(0,He.Ru)(),parameters:(0,He.LZ)(),returnMultiplicity:We(Qc),returnType:(0,He.Ru)(),stereotypes:(0,He.PG)((e=>Xe(e,(e=>(0,He.qC)(ld,e)),{skipIfEmpty:!0,INTERNAL__forceReturnEmptyInTest:!0})),(e=>Ke(e,(e=>(0,He.vB)(ld,e)),{skipIfEmpty:!1}))),taggedValues:(0,He.PG)((e=>Xe(e,(e=>(0,He.qC)(dd,e)),{skipIfEmpty:!0,INTERNAL__forceReturnEmptyInTest:!0})),(e=>Ke(e,(e=>(0,He.vB)(dd,e)),{skipIfEmpty:!1})))}),_d=(0,He.yu)(class{name;functionDefinition;externalId;enforcementLevel;messageFunction;get hashCode(){return Bi([$i.CONSTRAINT,this.name,this.functionDefinition,this.externalId??"",this.enforcementLevel??"",this.messageFunction??""])}},{enforcementLevel:(0,He.jt)((0,He.Ru)()),externalId:(0,He.jt)((0,He.Ru)()),functionDefinition:We(ad),messageFunction:(0,He.jt)(We(ad)),name:(0,He.Ru)()}),gd=((0,He.yu)(class extends Vc{superTypes=[];properties=[];derivedProperties=[];stereotypes=[];taggedValues=[];constraints=[];get hashCode(){return Bi([$i.CLASS,this.path,Bi(this.properties),Bi(this.derivedProperties),Bi(this.superTypes),Bi(this.constraints),Bi(this.stereotypes),Bi(this.taggedValues)])}accept_PackageableElementVisitor(e){return e.visit_Class(this)}},{_type:Ze("class"),constraints:(0,He.PG)((e=>Xe(e,(e=>(0,He.qC)(_d,e)),{skipIfEmpty:!0,INTERNAL__forceReturnEmptyInTest:!0})),(e=>Ke(e,(e=>(0,He.vB)(_d,e)),{skipIfEmpty:!1}))),name:(0,He.Ru)(),originalMilestonedProperties:(0,He.PG)((e=>Xe(e,(e=>He.AM),{skipIfEmpty:!0,INTERNAL__forceReturnEmptyInTest:!0})),(e=>Ke(e,(e=>He.AM),{skipIfEmpty:!1}))),package:(0,He.Ru)(),properties:(0,He.PG)((e=>Xe(e,(e=>(0,He.qC)(pd,e)),{skipIfEmpty:!0,INTERNAL__forceReturnEmptyInTest:!0})),(e=>Ke(e,(e=>(0,He.vB)(pd,e)),{skipIfEmpty:!1}))),derivedProperties:(0,He.bm)("qualifiedProperties",(0,He.PG)((e=>Xe(e,(e=>(0,He.qC)(md,e)),{skipIfEmpty:!0,INTERNAL__forceReturnEmptyInTest:!0})),(e=>Ke(e,(e=>(0,He.vB)(md,e)),{skipIfEmpty:!1})))),stereotypes:(0,He.PG)((e=>Xe(e,(e=>(0,He.qC)(ld,e)),{skipIfEmpty:!0,INTERNAL__forceReturnEmptyInTest:!0})),(e=>Ke(e,(e=>(0,He.vB)(ld,e)),{skipIfEmpty:!1}))),superTypes:(0,He.PG)((e=>Xe(e,(e=>e),{skipIfEmpty:!0,INTERNAL__forceReturnEmptyInTest:!0})),(e=>Ke(e,(e=>e),{skipIfEmpty:!1}))),taggedValues:(0,He.PG)((e=>Xe(e,(e=>(0,He.qC)(dd,e)),{skipIfEmpty:!0,INTERNAL__forceReturnEmptyInTest:!0})),(e=>Ke(e,(e=>(0,He.vB)(dd,e)),{skipIfEmpty:!1})))}),(0,He.yu)(class extends Vc{properties=[];derivedProperties=[];stereotypes=[];taggedValues=[];get hashCode(){return Bi([$i.ASSOCIATION,this.path,Bi(this.properties),Bi(this.derivedProperties),Bi(this.stereotypes),Bi(this.taggedValues)])}accept_PackageableElementVisitor(e){return e.visit_Association(this)}},{_type:Ze("association"),name:(0,He.Ru)(),originalMilestonedProperties:(0,He.PG)((e=>Xe(e,(e=>He.AM),{skipIfEmpty:!0,INTERNAL__forceReturnEmptyInTest:!0})),(e=>Ke(e,(e=>He.AM),{skipIfEmpty:!1}))),package:(0,He.Ru)(),properties:(0,He.pb)(We(pd)),derivedProperties:(0,He.bm)("qualifiedProperties",(0,He.PG)((e=>Xe(e,(e=>(0,He.qC)(md,e)),{skipIfEmpty:!0,INTERNAL__forceReturnEmptyInTest:!0})),(e=>Ke(e,(e=>(0,He.vB)(md,e)),{skipIfEmpty:!1})))),stereotypes:(0,He.PG)((e=>Xe(e,(e=>(0,He.qC)(ld,e)),{skipIfEmpty:!0,INTERNAL__forceReturnEmptyInTest:!0})),(e=>Ke(e,(e=>(0,He.vB)(ld,e)),{skipIfEmpty:!1}))),taggedValues:(0,He.PG)((e=>Xe(e,(e=>(0,He.qC)(dd,e)),{skipIfEmpty:!0,INTERNAL__forceReturnEmptyInTest:!0})),(e=>Ke(e,(e=>(0,He.vB)(dd,e)),{skipIfEmpty:!1})))}),(0,He.yu)(class extends Vc{parameters=[];body=[];preConstraints=[];postConstraints=[];returnType;returnMultiplicity;taggedValues=[];stereotypes=[];get hashCode(){return Bi([$i.FUNCTION,this.path,Bi(this.parameters),this.returnType,Bi(this.taggedValues),Bi(this.stereotypes),Yi(void 0,this.body)])}accept_PackageableElementVisitor(e){return e.visit_ConcreteFunctionDefinition(this)}},{_type:Ze("function"),body:(0,He.pb)((0,He.LZ)()),name:(0,He.Ru)(),package:(0,He.Ru)(),parameters:(0,He.pb)(We(rd)),postConstraints:(0,He.pb)((0,He.Ru)()),preConstraints:(0,He.pb)((0,He.Ru)()),returnMultiplicity:We(Qc),returnType:(0,He.Ru)(),stereotypes:(0,He.PG)((e=>Xe(e,(e=>(0,He.qC)(ld,e)),{skipIfEmpty:!0,INTERNAL__forceReturnEmptyInTest:!0})),(e=>Ke(e,(e=>(0,He.vB)(ld,e)),{skipIfEmpty:!1}))),taggedValues:(0,He.PG)((e=>Xe(e,(e=>(0,He.qC)(dd,e)),{skipIfEmpty:!0,INTERNAL__forceReturnEmptyInTest:!0})),(e=>Ke(e,(e=>(0,He.vB)(dd,e)),{skipIfEmpty:!1})))}),"diagram"),Ed=(0,He.yu)(Hc,{x:(0,He.Ru)(),y:(0,He.Ru)()}),fd=(0,He.yu)(Yc,{height:(0,He.Ru)(),width:(0,He.Ru)()}),Td=(0,He.yu)(Wc,{points:(0,He.pb)(We(Ed))}),Cd=(0,He.yu)(zc,{class:(0,He.Ru)(),hideProperties:(0,He.jt)((0,He.Ru)()),hideStereotypes:(0,He.jt)((0,He.Ru)()),hideTaggedValues:(0,He.jt)((0,He.Ru)()),id:(0,He.Ru)(),position:We(Ed),rectangle:We(fd)}),xd=(0,He.yu)(Zc,{line:We(Td),property:We(od),sourceView:(0,He.Ru)(),targetView:(0,He.Ru)()}),Sd=(0,He.yu)(qc,{line:We(Td),sourceView:(0,He.Ru)(),targetView:(0,He.Ru)()}),Nd=(0,He.yu)(Bc,{_type:Ze(gd),classViews:(0,He.pb)(We(Cd)),generalizationViews:(0,He.pb)(We(Sd)),name:(0,He.Ru)(),package:(0,He.Ru)(),propertyViews:(0,He.pb)(We(xd))});class Ad extends o{_$nominalTypeBrand;install(e){e.registerPureProtocolProcessorPlugin(this)}}var vd=s(95903);const Id=e=>H((0,vd.Z)(e.split(fe))),Od=e=>{const t=e.lastIndexOf(fe);return-1===t?void 0:e.substring(0,t)},yd=(e,t)=>{const s=e.lastIndexOf(fe);return-1===s?[t??"",e]:[e.substring(0,s),e.substring(s+fe.length,e.length)]},Rd=(e,t)=>`${e?`${e}${fe}`:""}${t}`,Pd=(e,t)=>{e.children.push(t),t.package=e},wd=(e,t)=>{e.children=e.children.filter((e=>e!==t))},Ld=(e,t,s,i)=>{const n=t.indexOf(fe),a=-1===n?t:t.substring(0,n);let r;if(r=e.children.find((e=>e instanceof nn&&e.name===a)),!r){if(!s)throw new B(`Can't find child package '${a}' in package '${e.path}'`);q(!Ce.includes(a),`Can't create package with reserved name '${a}'`),r=new nn(a),r.package=e,e.children.push(r)}return i&&i.set(Rd(e.path,a),r),-1!==n?Ld(r,t.substring(n+fe.length),s,i):r},bd=(e,t,s,i)=>{if(i){const n=i.get(Rd(e.path,t));if(n)return n;let a=t;for(;""!==a;){const n=Rd(e.path,a),r=i.get(n);if(r)return Ld(r,t.substring(a.length+fe.length,t.length),s,i);const o=a.lastIndexOf(fe);a=-1!==o?a.substring(0,o):""}}return Ld(e,t,s,i)},Dd=(e,t,s)=>(X(t,"Package path is required"),bd(e.root,t,!0,s)),Md=(e,t)=>K(e.rawType,t),Fd=e=>{const t=new Set;t.add(e);const s=e=>{e.generalizations.forEach((e=>{const i=Md(e.value,Ji);t.has(i)||(t.add(i),s(i))}))};return s(e),t.delete(e),Array.from(t)},jd=e=>e.properties.concat(e.propertiesFromAssociations).concat(e.derivedProperties),kd=(e,t)=>e===t?e.toString():0===e&&void 0===t?"MANY":`$${e}_${t??"MANY"}$`,Ud=(e,t)=>`${H(e,"Package path is required")}${fe}${H(t,"Name is required")}`;class Gd{elementClassName;_class;prerequisites=[];firstPass;secondPass;thirdPass;fourthPass;fifthPass;constructor(e){this.elementClassName=e.elementClassName,this._class=e._class,this.prerequisites=e.prerequisites??[],this.firstPass=e.firstPass,this.secondPass=e.secondPass,this.thirdPass=e.thirdPass,this.fourthPass=e.fourthPass,this.fifthPass=e.fifthPass}getElementProtocolClass(){return this._class}getPrerequisiteElementProtocolClasses(){return this.prerequisites}runFirstPass(e,t,s,i){X(e.package,"Element 'package' field is missing or empty"),X(e.name,"Element 'name' field is missing or empty"),((e,t,s)=>{if(s){if(s.has(e))throw new B(`Element '${e}' already exists`);s.add(e)}else q(!t.graph.getNullableElement(e),`Element '${e}' already exists`)})(Ud(e.package,e.name),t,i);const n=this.firstPass(e,t);return Pd(Dd(t.currentSubGraph,e.package,s),n),n}runSecondPass(e,t){this.secondPass?.(e,t)}runThirdPass(e,t){this.thirdPass?.(e,t)}runFourthPass(e,t){this.fourthPass?.(e,t)}runFifthPass(e,t){this.fifthPass?.(e,t)}}const Vd=e=>e.classView.value.id,Bd=e=>{const t=new Zc,s=new Wc;return s.points=e.pathForSerialization,t.line=s,t.property=((e,t)=>{const s=new ed;return s.class=t?.isTransformingEmbeddedPropertyMapping||t?.isTransformingLocalPropertyMapping?void 0:e.ownerReference.valueForSerialization??"",s.property=e.value.name,s})(e.property),t.sourceView=Vd(e.from),t.targetView=Vd(e.to),t},$d=e=>{const t=new qc,s=new Wc;return s.points=e.pathForSerialization,t.line=s,t.sourceView=Vd(e.from),t.targetView=Vd(e.to),t},zd=e=>{const t=new zc;return t.class=e.class.valueForSerialization??"",t.hideProperties=e.hideProperties,t.hideStereotypes=e.hideStereotypes,t.hideTaggedValues=e.hideTaggedValues,t.id=e.id,t.position=((e,t)=>{const s=new Hc;return s.x=e,s.y=t,s})(e.position.x,e.position.y),t.rectangle=((e,t)=>{const s=new Yc;return s.height=e,s.width=t,s})(e.rectangle.height,e.rectangle.width),t};class Hd{x;y;constructor(e,t){this.x=e,this.y=t}get hashCode(){return Bi([jc.POINT,this.x.toString(),this.y.toString()])}}class Yd{width;height;constructor(e,t){this.width=e,this.height=t}get hashCode(){return Bi([jc.RECTANGLE,this.width.toString(),this.height.toString()])}}class Wd{_dummyObservable={};position;rectangle;constructor(e,t){this.position=e,this.rectangle=t}center=()=>new Hd(this.position.x+this.rectangle.width/2,this.position.y+this.rectangle.height/2);contains(e,t){const s=this.normalizeBox(this);return e>s.position.x&&e<s.position.x+s.rectangle.width&&t>s.position.y&&t<s.position.y+s.rectangle.height}normalizeBox(e){let t=e;return e.rectangle.width<0&&(t=new Wd(new Hd(e.position.x+e.rectangle.width,e.position.y),new Yd(-e.rectangle.width,e.rectangle.height))),e.rectangle.height<0&&(t=new Wd(new Hd(e.position.x,e.position.y+e.rectangle.height),new Yd(e.rectangle.width,-e.rectangle.height))),t}get hashCode(){return this._dummyObservable,Bi([jc.POSITIONED_RECTANGLE,this.position,this.rectangle])}}class Kd extends Wd{_OWNER;class;id;hideProperties;hideTaggedValues;hideStereotypes;constructor(e,t,s){super(new Hd(0,0),new Yd(0,0)),this._OWNER=e,this.id=t,this.class=s}get hashCode(){return Bi([jc.CLASS_VIEW,super.hashCode,this.id,this.class.valueForSerialization??"",this.hideProperties?.toString()??"",this.hideTaggedValues?.toString()??"",this.hideStereotypes?.toString()??""])}}class Xd{_offsetX;_offsetY;classView;constructor(e){this.classView=e}}class Zd extends cn{ownerReference;value;constructor(e,t){super(e),this.ownerReference=e,this.value=t}}class qd extends Zd{ownerReference;constructor(e){const t=hn.create(e._OWNER);super(t,e),this.ownerReference=t}static create(e){return new qd(e)}}class Jd{_OWNER;from;to;path=[];constructor(e,t,s){this._OWNER=e,this.from=new Xd(qd.create(t)),this.to=new Xd(qd.create(s))}computeEdgeEndpoint(e,t=!0){const s=e.classView.value,i=e.classView.value.center(),n=i.x+(e._offsetX??0),a=i.y+(e._offsetY??0);return s.contains(n,a)?new Hd(n,a):(t&&(e._offsetX=0,e._offsetY=0),new Hd(i.x,i.y))}buildFullPath(e=!0){return[this.computeEdgeEndpoint(this.from,e),...this.path,this.computeEdgeEndpoint(this.to,e)]}static pruneUnnecessaryInsidePoints=(e,t,s)=>{if(!e.length)return[];let i=0,n=e[i];for(;i<e.length-1&&t.contains(n.x,n.y);)i++,n=e[i];let a=e.length-1,r=e[a];for(;a>0&&s.contains(r.x,r.y);)a--,r=e[a];return e.slice(i-1,a+2)};get pathForSerialization(){return Jd.pruneUnnecessaryInsidePoints(this.buildFullPath(),this.from.classView.value,this.to.classView.value)}get hashCode(){return Bi([jc.RELATIONSHIP_VIEW,this.from.classView.value.id,this.to.classView.value.id,Bi(this.pathForSerialization)])}}class Qd extends Jd{property;constructor(e,t,s,i){super(e,s,i),this.property=t}get hashCode(){return Bi([jc.PROPERTY_HOLDER_VIEW,super.hashCode,this.property.pointerHashCode])}}class eh extends Qd{get hashCode(){return Bi([jc.PROPERTY_VIEW,super.hashCode])}}class th extends Jd{get hashCode(){return Bi([jc.GENERALIZATION_VIEW,super.hashCode])}}class sh{x;y;constructor(e,t){this.x=e,this.y=t}static fromPoints(e,t){return new sh(t.x-e.x,t.y-e.y)}unit(){const e=Math.sqrt(this.x*this.x+this.y*this.y);return new sh(this.x/e,this.y/e)}normal(e){return new sh(e.y-this.y,-(e.x-this.x))}dotProduct(e){return this.x*e.x+this.y*e.y}}const ih=(e,t)=>e.classViews.find((e=>e.id===t)),nh=(e,t)=>{e.path=t},ah=e=>{const t=e.buildFullPath(),s=Jd.pruneUnnecessaryInsidePoints(t,e.from.classView.value,e.to.classView.value);if(s[0]!==t[0]){const t=e.from.classView.value.center();e.from._offsetX=s[0].x-t.x,e.from._offsetY=s[0].y-t.y}if(s[s.length-1]!==t[t.length-1]){const t=e.to.classView.value.center();e.to._offsetX=s[s.length-1].x-t.x,e.to._offsetY=s[s.length-1].y-t.y}const i=[];for(let e=0;e<s.length-2;e++){const t=sh.fromPoints(s[e+1],s[e]).unit(),n=sh.fromPoints(s[e+1],s[e+2]).unit(),a=t.dotProduct(n),r=180*Math.acos(a)/Math.PI;Math.abs(r-180)>5&&i.push(s[e+1])}nh(e,i)},rh=(e,t)=>e.x*Math.cos(t)-e.y*Math.sin(t),oh=(e,t)=>e.x*Math.sin(t)+e.y*Math.cos(t),lh=e=>new Hd(e.position.x+e.rectangle.width,e.position.y+e.rectangle.height),ch=e=>{const t=lh(e);return new Wd(new Hd(t.x-5,t.y-5),new Yd(10,10))},dh=(e,t)=>(t=e.normalizeBox(t),e.contains(t.position.x,t.position.y)||e.contains(t.position.x+t.rectangle.width,t.position.y)||e.contains(t.position.x,t.position.y+t.rectangle.height)||e.contains(t.position.x+t.rectangle.width,t.position.y+t.rectangle.height)),hh=e=>{const t=H(e.x,"Point 'x' coordinate is missing"),s=H(e.y,"Point 'y' coordinate is missing");return new Hd(t,s)};class uh extends Ad{constructor(){super(bi.Rw.zE,bi.i8)}V1_getExtraElementBuilders(){return[new Gd({elementClassName:"Diagram",_class:Bc,firstPass:(e,t)=>{W(e,Bc);const s=new kc(e.name),i=Ud(e.package,e.name);return t.currentSubGraph.setOwnElementInExtension(i,s,kc),s},secondPass:(e,t)=>{W(e,Bc);const s=(i=Ud(e.package,e.name),n=t.currentSubGraph,H(n.getOwnNullableExtensionElement(i,kc),`Can't find diagram '${i}'`));var i,n;s.classViews=e.classViews.map((e=>((e,t,s)=>{X(e.class,"Class view 'class' field is missing or empty"),X(e.id,"Class view 'id' field is missing or empty"),z(e.rectangle,"Class view 'rectangle' field is missing"),z(e.position,"Class view 'position' field is missing");const i=new Kd(s,e.id,t.resolveClass(e.class));return i.hideProperties=e.hideProperties,i.hideTaggedValues=e.hideTaggedValues,i.hideStereotypes=e.hideStereotypes,i.rectangle=(e=>{const t=H(e.width,"Rectangle 'width' is missing"),s=H(e.height,"Rectangle 'height' is missing");return new Yd(t,s)})(e.rectangle),i.position=hh(e.position),i})(e,t,s))),s.propertyViews=e.propertyViews.map((e=>((e,t,s)=>{z(e.property,"Property view 'property' field is missing"),z(e.line,"Property view 'line' field is missing");const i=H(ih(s,H(e.sourceView)),"Property view 'sourceView' field is missing"),n=H(ih(s,H(e.targetView)),"Property view 'targetView' field is missing"),a=t.resolveOwnProperty(e.property),r=new eh(s,a,i,n);return r.path=e.line.points.map((e=>hh(e))),ah(r),r})(e,t,s))),s.generalizationViews=e.generalizationViews.map((e=>((e,t)=>{z(e.line,"Generalization view 'line' field is missing");const s=H(ih(t,H(e.sourceView)),"Generalization view 'sourceView' field is missing"),i=H(ih(t,H(e.targetView)),"Generalization view 'targetView' field is missing"),n=new th(t,s,i);return n.path=e.line.points.map((e=>hh(e))),ah(n),n})(e,s)))}})]}V1_getExtraElementClassifierPathGetters(){return[e=>{if(e instanceof Bc)return"meta::pure::metamodel::diagram::Diagram"}]}V1_getExtraElementProtocolSerializers(){return[(e,t)=>{if(e instanceof Bc)return(0,He.qC)(Nd,e)}]}V1_getExtraElementProtocolDeserializers(){return[(e,t)=>{if(e._type===gd)return(0,He.vB)(Nd,e)}]}V1_getExtraElementTransformers(){return[(e,t)=>{if(e instanceof kc)return(e=>{const t=new Bc;return((e,t)=>{e.name=t.name,e.package=t.package?.path??""})(t,e),t.classViews=e.classViews.map(zd),t.generalizationViews=e.generalizationViews.map($d),t.propertyViews=e.propertyViews.map(Bd),t})(e)}]}}class ph extends o{_$nominalTypeBrand;install(e){e.registerPureGraphPlugin(this)}}class mh extends ph{constructor(){super(bi.Rw.f1,bi.i8)}getExtraPureGraphExtensionClasses(){return[kc]}getExtraDeadReferencesCleaners(){return[e=>{e.getExtensionForElementClass(kc).elements.forEach((t=>((e,t)=>{e.propertyViews.filter((e=>!(e.property.ownerReference.value instanceof Ji?jd(e.property.ownerReference.value):e.property.ownerReference.value.properties).map((e=>e.name)).includes(e.property.value.name))).forEach((t=>M(e.propertyViews,t))),e.classViews.filter((e=>!t.getNullableClass(e.class.value.path))).forEach((t=>M(e.classViews,t))),e.generalizationViews.filter((e=>{const s=e.from.classView.value.class.value,i=e.to.classView.value.class.value;return!t.getNullableClass(s.path)||!t.getNullableClass(i.path)||0===s.generalizations.filter((e=>e.value.rawType===i)).length})).forEach((t=>M(e.generalizationViews,t)))})(t,e)))}]}}class _h extends c{constructor(){super(bi.Rw.NA,bi.i8,[new mh,new Gc,new uh])}}class gh{applicationStore;pluginManager;constructor(e){this.applicationStore=e,this.pluginManager=e.pluginManager,this.applicationStore.assistantService.hideAssistant()}}const Eh=(0,rt.createContext)(void 0),fh=({children:e})=>{const t=yi(),s=(0,at.fv)((()=>new gh(t)));return(0,T.jsx)(Eh.Provider,{value:s,children:e})},Th="/welcome.pure",Ch="/",xh="::";var Sh,Nh;!function(e){e.CONCEPT_EXPLORER="CONCEPT_EXPLORER",e.FILE_EXPLORER="FILE_EXPLORER"}(Sh=Sh||(Sh={})),function(e){e.TERMINAL="TERMINAL",e.SEARCH="SEARCH",e.REFERENCES="REFERNECES",e.TEST_RUNNER="TEST_RUNNER",e.CODE_FIX_SUGGESTION="CODE_FIX_SUGGESTION"}(Nh=Nh||(Nh={}));const Ah=(e,t)=>{e.hasTextFocus()||e.focus(),e.revealPositionInCenter(t,0),e.setPosition(t)},vh="dummy_problem_marker_owner";var Ih;!function(e){e.PACKAGE="Package",e.PROFILE="Profile",e.TAG="Tag",e.STEREOTYPE="Stereotype",e.CLASS="Class",e.ASSOCIATION="Association",e.PROPERTY="Property",e.QUALIFIED_PROPERTY="QualifiedProperty",e.ENUMERATION="Enumeration",e.ENUM_VALUE="Enum",e.MEASURE="Measure",e.UNIT="Unit",e.FUNCTION="ConcreteFunctionDefinition",e.NATIVE_FUNCTION="NativeFunction",e.DIAGRAM="Diagram",e.DATABASE="Database",e.MAPPING="Mapping"}(Ih=Ih||(Ih={}));class Oh{pureId;pureType;pureName;get id(){return this.pureId}}class yh extends Oh{deprecated}(0,He.yu)(yh,{pureId:(0,He.Ru)(),pureType:(0,He.Ru)(),deprecated:(0,He.Ru)()});class Rh extends Oh{RO;classPath;file;line;column;get id(){return`${this.classPath}.${this.pureId}`}}(0,He.yu)(Rh,{pureId:(0,He.Ru)(),pureName:(0,He.Ru)(),pureType:(0,He.Ru)(),RO:(0,He.Ru)(),classPath:(0,He.Ru)(),file:(0,He.Ru)(),line:(0,He.Ru)(),column:(0,He.Ru)()});class Ph extends Oh{RO;notpublic;user;file;line;column}(0,He.yu)(Ph,{pureId:(0,He.Ru)(),pureName:(0,He.jt)((0,He.Ru)()),pureType:(0,He.Ru)(),RO:(0,He.Ru)(),notpublic:(0,He.Ru)(),user:(0,He.Ru)(),file:(0,He.Ru)(),line:(0,He.Ru)(),column:(0,He.Ru)()});class wh{li_attr;id;text;icon;children;state;getNodeAttribute(e){return K(this.li_attr,e,`Expected concept node attribute to be of type '${e.name}'`)}}(0,He.yu)(wh,{li_attr:(0,He.PG)((()=>He.AM),(e=>e.classPath?(0,He.vB)(Rh,e):e.file?(0,He.vB)(Ph,e):(0,He.vB)(yh,e))),id:(0,He.Ru)(),text:(0,He.Ru)(),icon:(0,He.Ru)(),children:(0,He.Ru)(),state:(0,He.Ru)()});const Lh=e=>e.startsWith("/")?e.substring(1,e.length):e;class bh{content;RO;constructor(){(0,x.rC)(this,{content:x.LO,hashCode:x.Fl,setContent:x.aD})}setContent(e){this.content=e}get hashCode(){return Vi(this.content)}}(0,He.yu)(bh,{content:(0,He.Ru)(),RO:(0,He.Ru)()});class Dh{file;line;column;constructor(e,t,s){this.file=e,this.line=t,this.column=s}}class Mh extends Dh{error;constructor(e,t,s,i){super(e,t??1,s??1),this.error=i}}var Fh;!function(e){e.ENUM="meta::pure::ide::findusages::findUsagesForEnum_String_1__String_1__SourceInformation_MANY_",e.PROPERTY="meta::pure::ide::findusages::findUsagesForProperty_String_1__String_1__SourceInformation_MANY_",e.ELEMENT="meta::pure::ide::findusages::findUsagesForPath_String_1__SourceInformation_MANY_",e.MULTIPLE_PATHS="meta::pure::ide::findusages::findUsagesForMultiplePaths_String_1__Pair_MANY_"}(Fh=Fh||(Fh={}));const jh=e=>`'${e.path}'${e.owner?` of '${e.owner}'`:""}`;class kh{source;line;column;startLine;startColumn;endLine;endColumn}(0,He.yu)(kh,{source:(0,He.Ru)(),line:(0,He.Ru)(),column:(0,He.Ru)(),startLine:(0,He.Ru)(),startColumn:(0,He.Ru)(),endLine:(0,He.Ru)(),endColumn:(0,He.Ru)()});class Uh{first;second}(0,He.yu)(Uh,{first:(0,He.Ru)(),second:(0,He.pb)((0,He.Ry)(kh))});class Gh{uuid=(0,a.Z)();get description(){}match(e){return this===e}onOpen(){}onClose(){}}class Vh{currentTab;tabs=[];constructor(){(0,x.rC)(this,{currentTab:x.LO,tabs:x.LO,setCurrentTab:x.aD,closeTab:x.aD,closeAllTabs:x.aD,closeAllOtherTabs:x.aD,openTab:x.aD,swapTabs:x.aD})}setCurrentTab(e){this.currentTab=e}closeAllOtherTabs(e){z(this.tabs.find((t=>t===e)),"Specified tab should be currently opened"),this.setCurrentTab(e),this.tabs=[e]}closeAllTabs(){this.setCurrentTab(void 0),this.tabs=[]}swapTabs(e,t){D(this.tabs,e,t)}openTab(e){if(!this.tabs.find((t=>t.match(e))))if(this.currentTab){const t=this.tabs.findIndex((e=>e===this.currentTab));this.tabs.splice(t+1,0,e)}else this.tabs.push(e);this.setCurrentTab(e),e.onOpen()}closeTab(e){const t=this.tabs.findIndex((t=>t.match(e)));if(q(-1!==t,"Can't close a tab which is not opened"),this.tabs.splice(t,1),this.currentTab===e)if(this.tabs.length){const e=t-1;this.setCurrentTab(e>=0?this.tabs[e]:this.tabs[0])}else this.setCurrentTab(void 0);e.onClose()}}class Bh extends Gh{editorStore;constructor(e){super(),this.editorStore=e}}class $h extends Vh{editorStore;constructor(e){super(),this.editorStore=e}get dndType(){return"editor.tab-manager.tab"}closeTab(e){e instanceof Qh&&e.hasChanged?this.editorStore.applicationStore.alertService.setActionAlertInfo({message:"Unsaved changes will be lost if you continue. Do you still want to proceed?",prompt:"To save changes, abort and compile",type:gs.CAUTION,actions:[{label:"Proceed",type:Es.PROCEED_WITH_CAUTION,handler:()=>super.closeTab(e)},{label:"Save changes",type:Es.PROCEED_WITH_CAUTION,handler:()=>{(0,x.fl)(this.editorStore.executeGo()).then((()=>{super.closeTab(e)})).catch(this.editorStore.applicationStore.alertUnhandledError)}},{label:"Abort",type:Es.PROCEED,default:!0}]}):super.closeTab(e)}}var zh;!function(e){e.SEARCH_FILE="editor.search.file",e.SEARCH_TEXT="editor.search.text",e.GO_TO_FILE="editor.go-to-file",e.TOGGLE_TERMINAL_PANEL="editor.toggle-auxiliary-panel",e.EXECUTE="editor.execute",e.FULL_RECOMPILE="editor.full-compile",e.FULL_RECOMPILE_WITH_FULL_INIT="editor.full-compile.with-init",e.RUN_ALL_TESTS="editor.run-all-tests",e.RUN_RELAVANT_TESTS="editor.run-relavant-tests"}(zh=zh||(zh={}));const Hh={[zh.SEARCH_FILE]:{title:"Search for file",defaultKeyboardShortcut:"Control+Shift+KeyN",additionalKeyboardShortcuts:["Control+KeyP","Meta+KeyP"]},[zh.SEARCH_TEXT]:{title:"Search text",defaultKeyboardShortcut:"Control+Shift+KeyF",additionalKeyboardShortcuts:["Meta+Shift+KeyF"]},[zh.GO_TO_FILE]:{title:"Go to file",defaultKeyboardShortcut:"Control+F1"},[zh.TOGGLE_TERMINAL_PANEL]:{title:"Toggle terminal",defaultKeyboardShortcut:"Control+Backquote"},[zh.EXECUTE]:{title:"Execute",defaultKeyboardShortcut:"F9"},[zh.FULL_RECOMPILE]:{title:"Run full re-compilation",defaultKeyboardShortcut:"F11"},[zh.FULL_RECOMPILE_WITH_FULL_INIT]:{title:"Run full re-compilation",defaultKeyboardShortcut:"Shift+F11"},[zh.RUN_ALL_TESTS]:{title:"Run all tests",defaultKeyboardShortcut:"F10"},[zh.RUN_RELAVANT_TESTS]:{title:"Run relavant tests",defaultKeyboardShortcut:"Shift+F10"}};var Yh;!function(e){e.RECENTER="editor.diagram-editor.recenter",e.USE_ZOOM_TOOL="editor.diagram-editor.use-zoom-tool",e.USE_VIEW_TOOL="editor.diagram-editor.use-view-tool",e.USE_PAN_TOOL="editor.diagram-editor.use-pan-tool"}(Yh=Yh||(Yh={}));const Wh={[Yh.RECENTER]:{title:"Diagram Editor: Recenter",defaultKeyboardShortcut:"KeyR"},[Yh.USE_ZOOM_TOOL]:{title:"Diagram Editor: Use zoom tool",defaultKeyboardShortcut:"KeyZ"},[Yh.USE_VIEW_TOOL]:{title:"Diagram Editor: Use view tool",defaultKeyboardShortcut:"KeyV"},[Yh.USE_PAN_TOOL]:{title:"Diagram Editor: Use pan tool",defaultKeyboardShortcut:"KeyM"}};var Kh;!function(e){e.TOGGLE_TEXT_WRAP="editor.file-editor.toggle-text-wrap",e.REVEAL_CONCEPT_IN_TREE="editor.file-editor.reveal-concept-in-tree",e.GO_TO_DEFINITION="editor.file-editor.go-to-definition",e.GO_BACK="editor.file-editor.go-back",e.FIND_USAGES="editor.file-editor.find-usage",e.RENAME_CONCEPT="editor.file-editor.rename-concept",e.GO_TO_LINE="editor.file-editor.go-to-line",e.DELETE_LINE="editor.file-editor.delete-line"}(Kh=Kh||(Kh={}));const Xh={[Kh.TOGGLE_TEXT_WRAP]:{title:"Toggle Text-wrap (File)",defaultKeyboardShortcut:"Alt+KeyZ"},[Kh.REVEAL_CONCEPT_IN_TREE]:{title:"Reveal Concept in Tree (File)",defaultKeyboardShortcut:"Control+Shift+KeyB"},[Kh.GO_TO_DEFINITION]:{title:"Go to Definition (File)",defaultKeyboardShortcut:"Control+KeyB"},[Kh.GO_BACK]:{title:"Go Back (File)",defaultKeyboardShortcut:"Control+Alt+KeyB"},[Kh.FIND_USAGES]:{title:"Find Usages (File)",defaultKeyboardShortcut:"Alt+F7"},[Kh.RENAME_CONCEPT]:{title:"Rename Concept (File)",defaultKeyboardShortcut:"F2"},[Kh.GO_TO_LINE]:{title:"Go to Line (File)",defaultKeyboardShortcut:"Control+KeyG"},[Kh.DELETE_LINE]:{title:"Delete Line (File)",defaultKeyboardShortcut:"Control+KeyD"}};var Zh;!function(e){e.GO="go",e.TEST="test",e.REMOVE="rm",e.MOVE="mv",e.NEW_DIRECTORY="mkdir",e.NEW_FILE="touch",e.OPEN_FILE="open",e.OPEN_DIRECTORY="cd",e.LIST_DIRECTORY="ls",e.WELCOME="welcome",e.ECHO="echo",e.CLEAR="clear",e.ANSI="ansi",e.HELP="help"}(Zh=Zh||(Zh={}));class qh{model;editor;_dummyCursorObservable={};language;viewState;forcedCursorPosition;wrapText=!1;constructor(e){(0,x.rC)(this,{viewState:x.LO.ref,editor:x.LO.ref,_dummyCursorObservable:x.LO.ref,forcedCursorPosition:x.LO.ref,wrapText:x.LO,cursorObserver:x.Fl,notifyCursorObserver:x.aD,setViewState:x.aD,setEditor:x.aD,setForcedCursorPosition:x.aD,setWrapText:x.aD}),this.language=(e=>{switch(w(e.split("."))){case"pure":return v.PURE;case"java":return v.JAVA;case"md":return v.MARKDOWN;case"sql":return v.SQL;case"json":return v.JSON;case"xml":return v.XML;case"yml":case"yaml":return v.YAML;case"graphql":return v.GRAPHQL;default:return v.TEXT}})(e.filePath),this.model=S.editor.createModel(e.uuid,this.language),this.model.setValue(e.file.content)}notifyCursorObserver(){this._dummyCursorObservable={}}get cursorObserver(){return this._dummyCursorObservable,this.editor?{position:this.editor.getPosition()??void 0,selection:this.editor.getSelection()??void 0}:void 0}setViewState(e){this.viewState=e}setEditor(e){this.editor=e}setForcedCursorPosition(e){this.forcedCursorPosition=e}setWrapText(e){const t=this.wrapText;this.wrapText=e,t!==e&&this.editor&&(this.editor.updateOptions({wordWrap:e?"on":"off"}),this.editor.focus())}}class Jh{fileEditorState;concept;coordinate;constructor(e,t,s){this.fileEditorState=e,this.concept=t,this.coordinate=s}}class Qh extends Bh{filePath;textEditorState;_currentHashCode;file;renameConceptState;showGoToLinePrompt=!1;constructor(e,t,s){super(e),(0,x.rC)(this,{_currentHashCode:x.LO,file:x.LO,renameConceptState:x.LO,showGoToLinePrompt:x.LO,hasChanged:x.Fl,resetChangeDetection:x.aD,setFile:x.aD,setShowGoToLinePrompt:x.aD,setConceptToRenameState:x.ls}),this.file=t,this._currentHashCode=t.hashCode,this.filePath=s,this.textEditorState=new qh(this)}get label(){return Lh(this.filePath)}get description(){return`File: ${Lh(this.filePath)}${this.file.RO?" (readonly)":""}`}get fileName(){return H(w(this.filePath.split("/")))}match(e){return e instanceof Qh&&this.filePath===e.filePath}onClose(){this.textEditorState.model.dispose()}get hasChanged(){return this._currentHashCode!==this.file.hashCode}resetChangeDetection(){this._currentHashCode=this.file.hashCode}setFile(e){this.file=e,this.textEditorState.model.setValue(e.content),this.resetChangeDetection()}setShowGoToLinePrompt(e){this.showGoToLinePrompt=e}*setConceptToRenameState(e){if(!e)return void(this.renameConceptState=void 0);if(this.hasChanged)return void this.editorStore.applicationStore.notificationService.notifyWarning("Can't rename concept: source is not compiled");const t=yield this.editorStore.getConceptInfo(e);this.renameConceptState=t?new Jh(this,t,e):void 0}showError(e){var t,s,i;t=this.textEditorState.model,s=[{message:e.error.message,startLineNumber:e.line,startColumn:e.column,endLineNumber:e.line,endColumn:e.column}],i=this.uuid,S.editor.setModelMarkers(t,i??vh,s.map((e=>({startLineNumber:e.startLineNumber,startColumn:e.startColumn,endLineNumber:e.endLineNumber,endColumn:e.endColumn+1,message:""===e.message?"(no error message)":e.message,severity:S.MarkerSeverity.Error}))))}clearError(){var e;e=this.uuid,S.editor.removeAllMarkers(e??vh)}registerCommands(){this.textEditorState.language===v.PURE&&(this.editorStore.applicationStore.commandService.registerCommand({key:Kh.GO_TO_DEFINITION,trigger:()=>this.editorStore.tabManagerState.currentTab===this&&Boolean(this.textEditorState.editor?.hasTextFocus()),action:()=>{const e=this.textEditorState.editor?.getPosition();e&&(0,x.fl)(this.editorStore.executeNavigation(new Dh(this.filePath,e.lineNumber,e.column))).catch(this.editorStore.applicationStore.alertUnhandledError)}}),this.editorStore.applicationStore.commandService.registerCommand({key:Kh.GO_BACK,action:()=>{(0,x.fl)(this.editorStore.navigateBack()).catch(this.editorStore.applicationStore.alertUnhandledError)}}),this.editorStore.applicationStore.commandService.registerCommand({key:Kh.REVEAL_CONCEPT_IN_TREE,trigger:()=>this.editorStore.tabManagerState.currentTab===this&&Boolean(this.textEditorState.editor?.hasTextFocus()),action:()=>{const e=this.textEditorState.editor?.getPosition();e&&this.editorStore.revealConceptInTree(new Dh(this.filePath,e.lineNumber,e.column)).catch(this.editorStore.applicationStore.alertUnhandledError)}}),this.editorStore.applicationStore.commandService.registerCommand({key:Kh.FIND_USAGES,trigger:()=>this.editorStore.tabManagerState.currentTab===this&&Boolean(this.textEditorState.editor?.hasTextFocus()),action:()=>{const e=this.textEditorState.editor?.getPosition();if(e){const t=new Dh(this.filePath,e.lineNumber,e.column);this.findConceptUsages(t)}}}),this.editorStore.applicationStore.commandService.registerCommand({key:Kh.RENAME_CONCEPT,trigger:()=>this.editorStore.tabManagerState.currentTab===this&&Boolean(this.textEditorState.editor?.hasTextFocus()),action:()=>{const e=this.textEditorState.editor?.getPosition();if(e){if(!this.textEditorState.model.getWordAtPosition(e))return;const t=new Dh(this.filePath,e.lineNumber,e.column);(0,x.fl)(this.setConceptToRenameState(t)).catch(this.editorStore.applicationStore.alertUnhandledError)}}})),this.editorStore.applicationStore.commandService.registerCommand({key:Kh.DELETE_LINE,trigger:()=>this.editorStore.tabManagerState.currentTab===this&&Boolean(this.textEditorState.editor?.hasTextFocus()),action:()=>{const e=this.textEditorState.editor?.getPosition();e&&this.textEditorState.model.pushEditOperations([],[{range:{startLineNumber:e.lineNumber,startColumn:1,endLineNumber:e.lineNumber+1,endColumn:1},text:"",forceMoveMarkers:!0}],(()=>null))}}),this.editorStore.applicationStore.commandService.registerCommand({key:Kh.GO_TO_LINE,trigger:()=>this.editorStore.tabManagerState.currentTab===this,action:()=>{this.setShowGoToLinePrompt(!0)}}),this.editorStore.applicationStore.commandService.registerCommand({key:Kh.TOGGLE_TEXT_WRAP,trigger:()=>this.editorStore.tabManagerState.currentTab===this,action:()=>{this.textEditorState.setWrapText(!this.textEditorState.wrapText)}})}findConceptUsages(e){const t=()=>{(0,x.fl)(this.editorStore.findUsagesFromCoordinate(e)).catch(this.editorStore.applicationStore.alertUnhandledError)};this.hasChanged?this.editorStore.applicationStore.alertService.setActionAlertInfo({message:"Source is not compiled, finding concept usages might be inaccurate. Do you want compile to proceed?",type:gs.CAUTION,actions:[{label:"Compile and Proceed",type:Es.PROCEED_WITH_CAUTION,handler:()=>{(0,x.fl)(this.editorStore.executeGo()).then(t).catch(this.editorStore.applicationStore.alertUnhandledError)}},{label:"Abort",type:Es.PROCEED,default:!0}]}):t()}async renameConcept(e){if(!this.renameConceptState)return;const t=this.renameConceptState.concept;try{this.editorStore.applicationStore.alertService.setBlockingAlert({message:"Finding concept usages...",showLoading:!0});const s=await this.editorStore.findConceptUsages(t.pureType===Ih.ENUM_VALUE?Fh.ENUM:t.pureType===Ih.PROPERTY||t.pureType===Ih.QUALIFIED_PROPERTY?Fh.PROPERTY:Fh.ELEMENT,(t.owner?[`'${t.owner}'`]:[]).concat(`'${t.path}'`));await(0,x.fl)(this.editorStore.renameConcept(t.pureName,e,t.pureType,s)),this.textEditorState.setForcedCursorPosition({lineNumber:this.renameConceptState.coordinate.line,column:this.renameConceptState.coordinate.column})}catch(e){G(e),this.editorStore.applicationStore.notificationService.notifyError(e)}finally{this.editorStore.applicationStore.alertService.setBlockingAlert(void 0)}}deregisterCommands(){this.textEditorState.language===v.PURE&&[Kh.GO_TO_DEFINITION,Kh.GO_BACK,Kh.REVEAL_CONCEPT_IN_TREE,Kh.FIND_USAGES,Kh.RENAME_CONCEPT].forEach((e=>this.editorStore.applicationStore.commandService.deregisterCommand(e))),[Kh.GO_TO_LINE,Kh.TOGGLE_TEXT_WRAP].forEach((e=>this.editorStore.applicationStore.commandService.deregisterCommand(e)))}}class eu{editorStore;treeData;selectedNode;loadInitialDataState=ft.create();refreshDataState=ft.create();constructor(e){(0,x.rC)(this,{treeData:x.LO.ref,loadInitialDataState:x.LO,refreshDataState:x.LO,initialize:x.ls,expandNode:x.ls,openNode:x.ls,refreshTreeData:x.ls,setTreeData:x.aD,setSelectedNode:x.aD}),this.editorStore=e}getTreeData(){return H(this.treeData,"Tree data has not been initialized")}*initialize(){if(this.loadInitialDataState.isInProgress)this.editorStore.applicationStore.notificationService.notifyWarning("Tree state initialization is in progress");else{this.loadInitialDataState.inProgress();try{this.treeData=this.buildTreeData(yield this.getRootNodes()),this.loadInitialDataState.pass()}catch(e){G(e),this.editorStore.applicationStore.notificationService.notifyError(e),this.loadInitialDataState.fail()}}}setSelectedNode(e){e!==this.selectedNode&&(this.selectedNode&&(this.selectedNode.isSelected=!1),e&&(e.isSelected=!0),this.selectedNode=e,this.refreshTree())}setTreeData(e){this.treeData=e}refreshTree(){this.setTreeData({...H(this.treeData)})}*expandNode(e){if(!e.isLoading)if(this.getTreeData().nodes.has(e.id)&&e.childrenIds)e.isLoading=!1,e.isOpen=!0,this.refreshTree();else{e.isLoading=!0;try{const t=yield this.getChildNodes(e);this.processChildNodes(e,t),e.isOpen=!0,this.refreshTree()}catch(e){G(e),this.editorStore.applicationStore.notificationService.notifyError(e)}finally{e.isLoading=!1}}}*refreshTreeData(){if(!this.treeData)return;const e=new Set(Array.from(this.getTreeData().nodes.values()).filter((e=>e.isOpen)).map((e=>e.id))),t=this.selectedNode?.id;this.refreshDataState.inProgress();try{this.treeData=this.buildTreeData(yield this.getRootNodes())}catch(e){return G(e),this.editorStore.applicationStore.notificationService.notifyError(e),void this.refreshDataState.fail()}const s=this.getTreeData().rootIds.map((e=>H(this.getTreeData().nodes.get(e)))).filter((t=>e.has(t.id)));yield this.refreshOpenNodes(s,e),t&&this.getTreeData().nodes.has(t)&&this.setSelectedNode(H(this.getTreeData().nodes.get(t)))}async refreshOpenNodes(e,t){return await Promise.all(e.map((e=>(t.delete(e.id),(0,x.fl)(this.expandNode(e)).catch((()=>{})))))),(e=e.flatMap((e=>e.childrenIds??[])).map((e=>H(this.getTreeData().nodes.get(e)))).filter((e=>t.has(e.id)))).length?this.refreshOpenNodes(e,t):Promise.resolve()}}class tu{id;path;RO}class su extends tu{file;statusType}(0,He.yu)(su,{id:(0,He.Ru)(),path:(0,He.Ru)(),file:(0,He.Ru)(),statusType:(0,He.Ru)(),RO:(0,He.Ru)()});class iu extends tu{repo}(0,He.yu)(iu,{id:(0,He.Ru)(),path:(0,He.Ru)(),repo:(0,He.Ru)(),RO:(0,He.Ru)()});class nu{li_attr;text;icon;children;state;get isFolderNode(){return this.li_attr instanceof iu}get isFileNode(){return this.li_attr instanceof su}get isRepoNode(){return this.li_attr instanceof iu&&Boolean(this.li_attr.repo)}getNodeAttribute(e){return K(this.li_attr,e,`Expected directory node attribute to be of type '${e.name}'`)}}(0,He.yu)(nu,{li_attr:(0,He.PG)((()=>He.AM),(e=>e.file?(0,He.vB)(su,e):(0,He.vB)(iu,e))),text:(0,He.Ru)(),icon:(0,He.Ru)(),children:(0,He.Ru)(),state:(0,He.Ru)()});const au=e=>{const t=e.trim(),s=t.lastIndexOf("/");if(!(s<=0))return t.substring(0,s)},ru=e=>`file_${e}`;class ou extends eu{nodeForCreateNewFile;nodeForCreateNewDirectory;nodeForRenameFile;constructor(e){super(e),(0,x.rC)(this,{nodeForCreateNewFile:x.LO,nodeForCreateNewDirectory:x.LO,nodeForRenameFile:x.LO,setNodeForCreateNewFile:x.aD,setNodeForCreateNewDirectory:x.aD,setNodeForRenameFile:x.aD,revealPath:x.ls})}setNodeForCreateNewFile=e=>{q(!e||e.data.isFolderNode,"Node selected for creating a new file from must be a directory"),this.nodeForCreateNewFile=e};setNodeForCreateNewDirectory=e=>{q(!e||e.data.isFolderNode,"Node selected for creating a new directory from must be a directory"),this.nodeForCreateNewDirectory=e};setNodeForRenameFile=e=>{q(!e||e.data.isFileNode,"Node selected for renaming must be a file"),this.nodeForRenameFile=e};async getRootNodes(){return(await this.editorStore.client.getDirectoryChildren()).map((e=>(0,He.vB)(nu,e)))}buildTreeData(e){const t=[],s=new Map;return e.forEach((e=>{const i=e.li_attr.id;t.push(i),s.set(i,{data:e,id:i,label:e.text,isLoading:!1})})),{rootIds:t,nodes:s}}async getChildNodes(e){return(await this.editorStore.client.getDirectoryChildren(e.data.li_attr.path)).map((e=>(0,He.vB)(nu,e)))}processChildNodes(e,t){const s=this.getTreeData(),i=[];t.forEach((e=>{const t=e.li_attr.id;i.push(t),s.nodes.set(t,{data:e,id:t,label:e.text,isLoading:!1})})),e.childrenIds=i}*openNode(e){e.data.isFileNode&&(yield(0,x.fl)(this.editorStore.loadFile(e.data.li_attr.path)))}*revealPath(e,t){t?.forceOpenExplorerPanel&&this.editorStore.setActiveActivity(Sh.FILE_EXPLORER,{keepShowingIfMatchedCurrent:!0});const s=[];let i=e;for(;i;)s.unshift(i),i=au(i);for(const e of s){const s=H(this.getTreeData().nodes.get(ru(e)),`Can't find node with path '${e}'`);if(s.data.isFolderNode)yield(0,x.fl)(this.expandNode(s));else{if(t?.directoryOnly)throw new Error("Can't reveal non-directory path");yield(0,x.fl)(this.editorStore.loadFile(e,t?.coordinate))}}this.setSelectedNode(H(this.getTreeData().nodes.get(ru(e)),`Can't find node with path '${e}'`))}}const lu=e=>{const t=e.trim(),s=t.lastIndexOf(fe);if(!(s<=0))return t.substring(0,s)};class cu extends eu{loadConceptActivity=ft.create();statusText;nodeForRenameConcept;nodeForMoveElement;constructor(e){super(e),(0,x.rC)(this,{statusText:x.LO,nodeForRenameConcept:x.LO,nodeForMoveElement:x.LO,setStatusText:x.aD,setNodeForRenameConcept:x.aD,setNodeForMoveElement:x.aD,pullConceptsActivity:x.aD,pollConceptsActivity:x.ls,revealConcept:x.ls})}setStatusText(e){this.statusText=e}setNodeForRenameConcept(e){this.nodeForRenameConcept=e}setNodeForMoveElement(e){this.nodeForMoveElement=e}async getRootNodes(){return await(0,x.fl)(this.pollConceptsActivity()),(await this.editorStore.client.getConceptChildren()).map((e=>(0,He.vB)(wh,e)))}buildTreeData(e){const t=[],s=new Map;return e.forEach((e=>{const i=e.li_attr.id;t.push(i),s.set(i,{data:e,id:i,label:e.text,isLoading:!1})})),{rootIds:t,nodes:s}}async getChildNodes(e){return(await this.editorStore.client.getConceptChildren(e.data.li_attr.pureId)).map((e=>(0,He.vB)(wh,e)))}processChildNodes(e,t){const s=this.getTreeData(),i=[];t.forEach((t=>{const n=t.li_attr.id;i.push(n),s.nodes.set(n,{data:t,id:n,label:t.text,isLoading:!1,parent:e})})),e.childrenIds=i}*openNode(e){(e.data.li_attr instanceof Rh||e.data.li_attr instanceof Ph)&&("Diagram"===e.data.li_attr.pureType?yield(0,x.fl)(this.editorStore.loadDiagram(e.data.li_attr.file,e.data.li_attr.pureId,Number.parseInt(e.data.li_attr.line,10),Number.parseInt(e.data.li_attr.column,10))):yield(0,x.fl)(this.editorStore.loadFile(e.data.li_attr.file,new Dh(e.data.li_attr.file,Number.parseInt(e.data.li_attr.line,10),Number.parseInt(e.data.li_attr.column,10)))))}*pollConceptsActivity(){if(this.loadConceptActivity.isInInitialState){this.loadConceptActivity.inProgress(),this.setStatusText("Loading concepts activity...");try{yield this.pullConceptsActivity()}finally{this.setStatusText(void 0),this.loadConceptActivity.reset()}}}async pullConceptsActivity(){const e=await this.editorStore.client.getConceptActivity();return e.text&&this.setStatusText(`Preparing - ${e.text}`),e.initializing?new Promise(((e,t)=>setTimeout((()=>{try{e(this.pullConceptsActivity())}catch(e){t(e)}}),1e3))):Promise.resolve()}*revealConcept(e,t){t?.forceOpenExplorerPanel&&this.editorStore.setActiveActivity(Sh.CONCEPT_EXPLORER,{keepShowingIfMatchedCurrent:!0});const s=[];let i=e;for(;i;)s.unshift(i),i=lu(i);for(const e of s){const s=H(this.getTreeData().nodes.get(e),`Can't find node with path '${e}'`);if(s.data.li_attr instanceof yh)yield(0,x.fl)(this.expandNode(s));else if(t?.packageOnly)throw new Error("Can't reveal non-package path")}this.setSelectedNode(H(this.getTreeData().nodes.get(e),`Can't find node with path '${e}'`))}async movePackageableElements(e,t){let s=[];try{s=(await this.editorStore.client.getPackageableElementsUsage(e.map((e=>e.pureId)))).map((e=>(0,He.vB)(Uh,e)))}catch{return void this.editorStore.applicationStore.notificationService.notifyError("Can't find usage for child packageable elements")}finally{this.editorStore.applicationStore.alertService.setBlockingAlert(void 0)}const i=[];q(s.length===e.length,"Can't find matching usages for packageable elements");for(let n=0;n<s.length;++n){const a=H(e[n]);i.push({pureName:a.pureName,pureType:a.pureType,sourcePackage:H(Od(a.pureId)),destinationPackage:t,usages:H(s[n]).second})}await(0,x.fl)(this.editorStore.movePackageableElements(i))}async renameConcept(e,t){const s=e.data.li_attr,i=s.pureName??s.pureId;let n=[];try{switch(this.editorStore.applicationStore.alertService.setBlockingAlert({message:"Finding concept usages...",showLoading:!0}),s.pureType){case Ih.PROPERTY:case Ih.QUALIFIED_PROPERTY:W(s,Rh),n=await this.editorStore.findConceptUsages(Fh.PROPERTY,[`'${s.classPath}'`,`'${s.pureId}'`]);break;case Ih.PACKAGE:{let e=[],s=[];try{s=await this.editorStore.client.getChildPackageableElements(i),e=(await this.editorStore.client.getPackageableElementsUsage(s.map((e=>e.pureId)))).map((e=>(0,He.vB)(Uh,e)))}catch{return void this.editorStore.applicationStore.notificationService.notifyError("Can't find usage for child packageable elements")}finally{this.editorStore.applicationStore.alertService.setBlockingAlert(void 0)}const n=[];q(e.length===s.length,"Can't find matching usages for child packageable elements");const a=Od(i)?.concat(fe).concat(t)??t;for(let t=0;t<e.length;++t){const r=H(s[t]),o=H(Od(r.pureId)),l=a.concat(o.substring(o.indexOf(i)+i.length));n.push({pureName:r.pureName,pureType:r.pureType,sourcePackage:o,destinationPackage:l,usages:H(e[t]).second})}return void await(0,x.fl)(this.editorStore.movePackageableElements(n))}default:n=await this.editorStore.findConceptUsages(Fh.ELEMENT,[`'${s.pureId}'`])}}catch(e){return G(e),void this.editorStore.applicationStore.notificationService.notifyError(e)}finally{this.editorStore.applicationStore.alertService.setBlockingAlert(void 0)}await(0,x.fl)(this.editorStore.renameConcept(i,t,s.pureType,n))}}class du{cached;datamarts;text}(0,He.yu)(du,{cached:(0,He.Ru)(),datamarts:(0,He.pb)((0,He.Ru)()),text:(0,He.Ru)()});class hu extends du{error;sessionError}(0,He.yu)(hu,{cached:(0,He.Ru)(),datamarts:(0,He.pb)((0,He.Ru)()),text:(0,He.Ru)(),error:(0,He.Ru)(),sessionError:(0,He.Ru)()});class uu extends hu{RO;line;column;source}(0,He.yu)(uu,{cached:(0,He.Ru)(),datamarts:(0,He.pb)((0,He.Ru)()),text:(0,He.Ru)(),RO:(0,He.Ru)(),line:(0,He.Ru)(),column:(0,He.Ru)(),source:(0,He.Ru)(),error:(0,He.Ru)(),sessionError:(0,He.Ru)()});class pu{text;reinit}class mu extends pu{cache;modifiedFiles=[]}(0,He.yu)(mu,{text:(0,He.Ru)(),cache:(0,He.Ru)(),modifiedFiles:(0,He.pb)((0,He.Ru)()),reinit:(0,He.Ru)()});class _u extends pu{RO;line;column;source;error;sessionError}(0,He.yu)(_u,{text:(0,He.Ru)(),RO:(0,He.Ru)(),line:(0,He.jt)((0,He.Ru)()),column:(0,He.jt)((0,He.Ru)()),source:(0,He.jt)((0,He.Ru)()),error:(0,He.Ru)(),sessionError:(0,He.Ru)()});class gu{RO;line;column;source}(0,He.yu)(gu,{RO:(0,He.Ru)(),line:(0,He.Ru)(),column:(0,He.Ru)(),source:(0,He.Ru)()});class Eu extends pu{jumpTo}(0,He.yu)(Eu,{text:(0,He.Ru)(),jumpTo:(0,He.Ry)(gu)});class fu{uuid=(0,a.Z)();sourceID;line;column;foundName}(0,He.yu)(fu,{sourceID:(0,He.Ru)(),line:(0,He.Ru)(),column:(0,He.Ru)(),foundName:(0,He.Ru)()});class Tu{uuid=(0,a.Z)();sourceID;line;column;foundName;add;messageToBeModified;fileToBeModified;lineToBeModified;columnToBeModified}(0,He.yu)(Tu,{sourceID:(0,He.Ru)(),line:(0,He.Ru)(),column:(0,He.Ru)(),foundName:(0,He.Ru)(),add:(0,He.Ru)(),messageToBeModified:(0,He.Ru)(),fileToBeModified:(0,He.Ru)(),lineToBeModified:(0,He.Ru)(),columnToBeModified:(0,He.Ru)()});class Cu extends _u{candidateName;candidatesWithPackageImported=[];candidatesWithPackageNotImported=[]}(0,He.yu)(Cu,{candidateName:(0,He.Ru)(),candidatesWithPackageImported:(0,He.pb)((0,He.Ry)(fu)),candidatesWithPackageNotImported:(0,He.pb)((0,He.Ry)(Tu))});class xu extends _u{candidateName;candidates=[]}(0,He.yu)(xu,{candidateName:(0,He.Ru)(),candidates:(0,He.pb)((0,He.Ry)(Tu))});class Su{id;parentId;file;line;column}(0,He.yu)(Su,{id:(0,He.Ru)(),parentId:(0,He.Ru)(),file:(0,He.Ru)(),line:(0,He.Ru)(),column:(0,He.Ru)()});class Nu{children=[];li_attr;text;type}(0,He.yu)(Nu,{children:(0,He.pb)((0,He.Ry)(Nu)),li_attr:(0,He.Ry)(Su),text:(0,He.Ru)(),type:(0,He.Ru)()});class Au extends pu{count;filterPaths=[];path;relevantTestsOnly;runnerId;tests=[]}(0,He.yu)(Au,{count:(0,He.Ru)(),filterPaths:(0,He.pb)((0,He.Ru)()),path:(0,He.Ru)(),relevantTestsOnly:(0,He.Ru)(),runnerId:(0,He.Ru)(),tests:(0,He.pb)((0,He.Ry)(Nu))});class vu{uuid=(0,a.Z)()}class Iu{before;found;after}(0,He.yu)(Iu,{after:(0,He.Ru)(),before:(0,He.Ru)(),found:(0,He.Ru)()});class Ou{uuid=(0,a.Z)();sourceId;startLine;startColumn;endLine;endColumn;preview;constructor(e,t,s,i,n){this.sourceId=e,this.startLine=t,this.startColumn=s,this.endLine=i,this.endColumn=n}}(0,He.yu)(Ou,{sourceId:(0,He.Ru)(),startLine:(0,He.Ru)(),startColumn:(0,He.Ru)(),endLine:(0,He.Ru)(),endColumn:(0,He.Ru)(),preview:(0,He.jt)((0,He.Ry)(Iu))});class yu extends vu{sourceId;coordinates=[];isExpanded=!0;constructor(){super(),(0,x.rC)(this,{coordinates:x.LO,isExpanded:x.LO,setIsExpanded:x.aD,dismissCoordinate:x.aD})}setCoordinates(e){this.coordinates=e}setIsExpanded(e){this.isExpanded=e}dismissCoordinate(e){M(this.coordinates,e)}}var Ru,Pu,wu;(0,He.yu)(yu,{sourceId:(0,He.Ru)(),coordinates:(0,He.pb)((0,He.Ry)(Ou))}),function(e){e.PASSED="Success",e.FAILED="AssertFail",e.ERROR="Error",e.NOT_RUN="notRan"}(Ru=Ru||(Ru={}));class Lu{status;test}class bu extends Lu{test=[]}(0,He.yu)(bu,{status:(0,He.Ru)(),test:(0,He.pb)((0,He.Ru)())});class Du{text;RO;line;column;source;error}(0,He.yu)(Du,{text:(0,He.Ru)(),RO:(0,He.Ru)(),line:(0,He.Ru)(),column:(0,He.Ru)(),source:(0,He.Ru)(),error:(0,He.Ru)()});class Mu extends Lu{test=[];error}(0,He.yu)(Mu,{status:(0,He.Ru)(),test:(0,He.pb)((0,He.Ru)()),error:(0,He.Ry)(Du)});class Fu{}class ju extends Fu{finished;tests=[]}(0,He.yu)(ju,{finished:(0,He.Ru)(),tests:(0,He.pb)((0,He.PG)((()=>He.AM),(e=>e.error?(0,He.vB)(Mu,e):(0,He.vB)(bu,e))))});class ku extends Fu{error;text}(0,He.yu)(ku,{error:(0,He.Ru)(),text:(0,He.Ru)()}),function(e){e.PASSED="PASSED",e.FAILED="FAILED",e.NONE="NONE"}(Pu=Pu||(Pu={})),function(e){e.PASSED="PASSED",e.FAILED="FAILED",e.ERROR="ERROR",e.RUNNING="RUNNING"}(wu=wu||(wu={}));class Uu{_START_TIME;total;time=0;passedTests=new Set;failedTests=new Map;testsWithError=new Map;notRunTests;results=new Map;constructor(e){(0,x.rC)(this,{total:x.LO,time:x.LO,passedTests:x.LO,failedTests:x.LO,testsWithError:x.LO,notRunTests:x.LO,results:x.LO,passed:x.Fl,error:x.Fl,failed:x.Fl,passedTestIds:x.Fl,failedTestIds:x.Fl,testWithErrorIds:x.Fl,notRunTestIds:x.Fl,numberOfTestsRun:x.Fl,runPercentage:x.Fl,suiteStatus:x.Fl,setTime:x.aD,addResult:x.aD}),this._START_TIME=Date.now(),this.total=e.size,this.notRunTests=new Set(e)}get passed(){return this.passedTests.size}get error(){return this.testsWithError.size}get failed(){return this.failedTests.size}get passedTestIds(){return Array.from(this.passedTests.values())}get failedTestIds(){return Array.from(this.failedTests.keys())}get testWithErrorIds(){return Array.from(this.testsWithError.keys())}get notRunTestIds(){return Array.from(this.notRunTests.values())}get numberOfTestsRun(){return this.passed+this.error+this.failed}get runPercentage(){return Math.floor(100*this.numberOfTestsRun/this.total)}get suiteStatus(){return this.failed+this.error?Pu.FAILED:this.passed?Pu.PASSED:Pu.NONE}setTime(e){this.time=e}addResult(e,t){switch(this.results.set(t,e),this.notRunTests.delete(t),e.status){case Ru.PASSED:this.passedTests.add(t);break;case Ru.FAILED:this.failedTests.set(t,K(e,Mu));break;case Ru.ERROR:this.testsWithError.set(t,K(e,Mu));break;default:throw new U(`Unsupported test result status '${e.status}'`)}this.time=Date.now()-this._START_TIME}}class Gu{editorStore;testExecutionResult;checkTestRunnerState=ft.create();testResultInfo;allTests=new Map;selectedTestId;treeBuildingState=ft.create();treeData;viewAsList=!1;constructor(e,t){(0,x.rC)(this,{testResultInfo:x.LO.ref,allTests:x.LO,selectedTestId:x.LO,treeData:x.LO.ref,viewAsList:x.LO,setViewAsList:x.aD,setSelectedTestId:x.aD,setTestResultInfo:x.aD,setTreeData:x.aD,refreshTree:x.aD,collapseTree:x.aD,expandTree:x.aD,buildTreeDataByLayer:x.aD,pullTestRunnerResult:x.aD,buildTestTreeData:x.ls,pollTestRunnerResult:x.ls,rerunTestSuite:x.ls,cancelTestRun:x.ls}),this.editorStore=e,this.testExecutionResult=t}getTreeData(){return H(this.treeData,"Test tree data has not been initialized")}setViewAsList(e){this.viewAsList=e}setSelectedTestId(e){this.selectedTestId=e}setTestResultInfo(e){this.testResultInfo=e}setTreeData(e){this.treeData=e}refreshTree(){this.setTreeData({...H(this.treeData)})}*buildTestTreeData(){if(this.treeBuildingState.isInProgress)return;this.treeBuildingState.inProgress();const e=this.testExecutionResult.tests.map((e=>{const t=e.li_attr.id;return e.type&&this.allTests.set(t,e),t})),t=new Map;this.treeData={rootIds:e,nodes:t},yield this.buildTreeDataByLayer(this.testExecutionResult.tests),this.treeBuildingState.reset()}collapseTree(){this.getTreeData().nodes.forEach((e=>{e.isOpen=!1})),this.refreshTree()}expandTree(){this.getTreeData().nodes.forEach((e=>{e.isOpen=!0})),this.refreshTree()}async buildTreeDataByLayer(e){const t=this.getTreeData(),s=[];return await Promise.all(e.map((e=>new Promise(((i,n)=>setTimeout((()=>{const a=e.li_attr.id,r={id:a,label:e.text,data:e,childrenIds:e.type?void 0:[],isLoading:!1};if(e.type&&this.allTests.set(a,e),t.nodes.set(a,r),"Root"!==e.li_attr.parentId)try{const s=H(t.nodes.get((o=e,`test${this.testExecutionResult.runnerId}_${o.li_attr.parentId}`)),`Can't find parent test node with ID '${e.li_attr.parentId}'`);s.childrenIds?b(s.childrenIds,a):s.childrenIds=[a]}catch(e){return void n(e)}var o;s.push(...e.children),i()}),0)))))),s.length?this.buildTreeDataByLayer(s):Promise.resolve()}*pollTestRunnerResult(){if(this.checkTestRunnerState.isInInitialState){this.checkTestRunnerState.inProgress();try{q(this.allTests.size===this.testExecutionResult.count,`Number of tests scanned in tree (${this.allTests.size}) does not match the number of total reported tests (${this.testExecutionResult.count})`);const e=new Uu(new Set(this.allTests.keys()));this.testResultInfo=e,yield this.pullTestRunnerResult(e)}finally{this.checkTestRunnerState.reset()}}}async pullTestRunnerResult(e){const t=(s=await this.editorStore.client.checkTestRunner(this.testExecutionResult.runnerId)).error?(0,He.vB)(ku,s):(0,He.vB)(ju,s);var s;return t instanceof ju?(await Promise.all(t.tests.map((t=>L((()=>{return e.addResult(t,(s=t,`test${this.testExecutionResult.runnerId}_${s.test.join("_")}`));var s}))))),t.finished?Promise.resolve():new Promise(((t,s)=>setTimeout((()=>{try{t(this.pullTestRunnerResult(e))}catch(e){G(e),this.editorStore.applicationStore.notificationService.notifyWarning("Failed to run test"+(e.message?`: ${e.message}`:"")),s(e)}}),1e3)))):(this.setTestResultInfo(void 0),Promise.resolve())}*rerunTestSuite(){this.editorStore.testRunState.isInProgress||(yield(0,x.fl)(this.editorStore.executeTests(this.testExecutionResult.path,this.testExecutionResult.relevantTestsOnly)))}*cancelTestRun(){this.editorStore.testRunState.isInProgress&&(yield this.editorStore.client.cancelTestRunner(this.testExecutionResult.runnerId),this.editorStore.applicationStore.notificationService.notifyWarning(`Stopped running test (id: ${this.testExecutionResult.runnerId}) successfully!`))}}class Vu{}class Bu extends Vu{error;errorDialog;text}(0,He.yu)(Bu,{error:(0,He.Ru)(),errorDialog:(0,He.Ru)(),text:(0,He.Ru)()});class $u{networkClient;userId="localuser";sessionId=`${this.userId}@${Date.now()}@abcd`;compilerMode;mode;constructor(e){this.networkClient=e}get baseUrl(){return H(this.networkClient.baseUrl,"Pure client has not been configured properly")}initialize=e=>this.networkClient.get(`${this.baseUrl}/initialize`,void 0,void 0,{requestCache:e,sessionId:this.sessionId,mode:this.mode,fastCompile:this.compilerMode});getInitializationActivity=()=>this.networkClient.get(`${this.baseUrl}/initializationActivity`,void 0,void 0,{sessionId:this.sessionId});getConceptActivity=()=>this.networkClient.get(`${this.baseUrl}/conceptsActivity`,void 0,void 0,{sessionId:this.sessionId});execute=(e,t,s)=>this.networkClient.post(`${this.baseUrl}/${t}`,{extraParams:s,openFiles:e},void 0,void 0,{sessionId:this.sessionId,mode:this.mode,fastCompile:this.compilerMode});getExecutionActivity=()=>this.networkClient.get(`${this.baseUrl}/executionActivity`,void 0,void 0,{sessionId:this.sessionId});findFiles=(e,t)=>this.networkClient.get(`${this.baseUrl}/findPureFiles`,void 0,void 0,{file:e,regex:t});searchText=(e,t,s,i=2e3)=>this.networkClient.get(`${this.baseUrl}/findInSources`,void 0,void 0,{string:e,caseSensitive:t,regex:s,limit:i});getTextSearchPreview=e=>this.networkClient.post(`${this.baseUrl}/getTextSearchPreview`,e);checkTestRunner=e=>this.networkClient.get(`${this.baseUrl}/testRunnerCheck`,void 0,void 0,{sessionId:this.sessionId,testRunnerId:e});cancelTestRunner=e=>this.networkClient.get(`${this.baseUrl}/testRunnerCancel`,void 0,void 0,{sessionId:this.sessionId,testRunnerId:e});getConceptChildren=e=>this.networkClient.get(`${this.baseUrl}/execute`,void 0,void 0,{func:"meta::pure::ide::display_ide(String[1]):String[1]",param:e?`'${e}'`:`'${xh}'`,format:"raw",mode:this.mode,sessionId:this.sessionId});getConceptInfo=async(e,t,s)=>{const i=await this.networkClient.get(`${this.baseUrl}/getConceptInfo`,void 0,void 0,{file:e,line:t,column:s});if(i.error)throw new Error(i.text);return i};getUsages=async(e,t)=>{const s=await this.networkClient.get(`${this.baseUrl}/execute`,void 0,void 0,{func:e,param:t});return Array.isArray(s)?s:[s]};renameConcept=e=>this.networkClient.put(`${this.baseUrl}/renameConcept`,e);movePackageableElements=e=>this.networkClient.put(`${this.baseUrl}/movePackageableElements`,e);getPackageableElementsUsage=async e=>{const t=await this.networkClient.get(`${this.baseUrl}/execute`,void 0,void 0,{func:Fh.MULTIPLE_PATHS,param:[`'${e.join(",")}'`]});return Array.isArray(t)?t:[t]};getChildPackageableElements=async e=>{const t=await this.networkClient.get(`${this.baseUrl}/execute`,void 0,void 0,{func:"meta::pure::ide::getChildPackageableElements_String_1__String_MANY_",param:[`'${e}'`]});return(Array.isArray(t)?t:[t]).map((e=>JSON.parse(e)))};getFile=e=>this.networkClient.get(`${this.baseUrl}/fileAsJson/${e}`,void 0,void 0,{sessionId:this.sessionId,mode:this.mode,fastCompile:this.compilerMode});getDirectoryChildren=e=>this.networkClient.get(`${this.baseUrl}/dir`,void 0,void 0,{parameters:e??"/",mode:this.mode,sessionId:this.sessionId});updateSource=e=>this.networkClient.put(`${this.baseUrl}/updateSource`,e);createFile=e=>this.networkClient.post(`${this.baseUrl}/newFile/${e}`,void 0,void 0,void 0,{sessionId:this.sessionId,mode:this.mode,fastCompile:this.compilerMode});createFolder=e=>this.networkClient.post(`${this.baseUrl}/newFolder/${e}`,void 0,void 0,void 0,{sessionId:this.sessionId,mode:this.mode,fastCompile:this.compilerMode});renameFile=(e,t)=>this.networkClient.put(`${this.baseUrl}/renameFile`,{oldPath:e,newPath:t},void 0);deleteDirectoryOrFile=e=>this.networkClient.delete(`${this.baseUrl}/deleteFile/${e}`,void 0,void 0,void 0,{sessionId:this.sessionId});getDiagramInfo=async e=>JSON.parse(await this.networkClient.get(`${this.baseUrl}/execute`,void 0,void 0,{func:"meta::pure::ide::diagram::getDiagramInfo_String_1__String_1_",param:[`'${e}'`]}));getDiagramClassInfo=async e=>JSON.parse(await this.networkClient.get(`${this.baseUrl}/execute`,void 0,void 0,{func:"meta::pure::ide::diagram::getDiagramClassInfo_String_1__String_1_",param:[`'${e}'`]}));getSuggestionsForIncompletePath=(e,t)=>this.networkClient.post(`${this.baseUrl}/suggestion/incompletePath`,{path:e,types:t});getSuggestionsForIdentifier=(e,t)=>this.networkClient.post(`${this.baseUrl}/suggestion/identifier`,{importPaths:e,types:t});getSuggestionsForAttribute=(e,t)=>this.networkClient.post(`${this.baseUrl}/suggestion/attribute`,{importPaths:e,path:t});getSuggestionsForClass=e=>this.networkClient.post(`${this.baseUrl}/suggestion/class`,{importPaths:e});getSuggestionsForVariable=(e,t,s)=>this.networkClient.post(`${this.baseUrl}/suggestion/variable`,{sourceId:e,line:t,column:s})}class zu{_initialDefaultSize;_tempSize;size;defaultSize;snapSize;maxSize;constructor(e){this.size=e.initial,this._tempSize=e.default,this.defaultSize=e.default,this._initialDefaultSize=e.default,this.snapSize=e.snap,(0,x.rC)(this,{_tempSize:x.LO,size:x.LO,defaultSize:x.LO,snapSize:x.LO,maxSize:x.LO,isOpen:x.Fl,isMaximizable:x.Fl,isMaximized:x.Fl,setSize:x.aD,open:x.aD,close:x.aD,toggle:x.aD,setMaxSize:x.aD,maximize:x.aD,minimize:x.aD,toggleMaximize:x.aD})}get isOpen(){return 0!==this.size}get isMaximizable(){return void 0!==this.maxSize}get isMaximized(){return void 0!==this.maxSize&&this.size===this.maxSize}setSize(e){e=Math.max(e,0),this.maxSize&&(e=Math.min(e,this.maxSize)),this.size!==e&&(void 0!==this.snapSize?e>this.size?this.maxSize&&e>this.maxSize-this.snapSize?this.size=this.maxSize:this.size=e<this.snapSize?this.defaultSize:e:this.size=e<this.snapSize?0:e:this.size=e)}open(){0===this.size&&(this.size=this._tempSize)}close(){0!==this.size&&(this._tempSize=this.size||this.defaultSize,this.size=0)}toggle(){0===this.size?this.open():this.close()}setMaxSize(e){this._tempSize=Math.min(this._tempSize,e),this.size=Math.min(this.size,e),this.defaultSize=Math.min(this._initialDefaultSize,e),this.maxSize=e}maximize(){void 0!==this.maxSize&&this.size!==this.maxSize&&(this._tempSize=this.size,this.size=this.maxSize)}minimize(){void 0!==this.maxSize&&this.size===this.maxSize&&(this.size=this._tempSize===this.maxSize?this.defaultSize:this._tempSize)}toggleMaximize(){void 0!==this.maxSize&&(this.size===this.maxSize?this.minimize():this.maximize())}}class Hu{_UUID=(0,a.Z)();_OWNER;name;genericType;multiplicity;stereotypes=[];taggedValues=[];body;parameters;constructor(e,t,s,i){this.name=e,this.multiplicity=t,this.genericType=s,this._OWNER=i}get hashCode(){return Bi([$i.DERIVED_PROPERTY,this.name,this.multiplicity,this.genericType.ownerReference.valueForSerialization??"",Bi(this.stereotypes.map((e=>e.pointerHashCode))),Bi(this.taggedValues),Yi(this.parameters,this.body)])}}class Yu extends cn{ownerReference;value;constructor(e,t){super(e),this.ownerReference=e,this.value=t}}class Wu extends Yu{ownerReference;constructor(e){const t=hn.create(e.rawType);super(t,e),this.ownerReference=t}static create(e){return new Wu(e)}}class Ku{_UUID=(0,a.Z)();rawType;constructor(e){this.rawType=e}}class Xu{_UUID=(0,a.Z)();_OWNER;name;multiplicity;genericType;aggregation;stereotypes=[];taggedValues=[];constructor(e,t,s,i){this.name=e,this.multiplicity=t,this.genericType=s,this._OWNER=i}get hashCode(){return Bi([$i.PROPERTY,this.name,this.multiplicity,this.genericType.ownerReference.valueForSerialization??"",this.aggregation??"",Bi(this.stereotypes.map((e=>e.pointerHashCode))),Bi(this.taggedValues)])}}class Zu{lowerBound;upperBound;constructor(e,t){this.lowerBound=e,this.upperBound=t}get hashCode(){return Bi([$i.MULTIPLICITY,this.lowerBound.toString(),this.upperBound?.toString()??""])}static ZERO=new Zu(0,0);static ZERO_ONE=new Zu(0,1);static ZERO_MANY=new Zu(0,void 0);static ONE=new Zu(1,1);static ONE_MANY=new Zu(1,void 0)}class qu extends cn{ownerReference;value;constructor(e,t){super(e),this.ownerReference=e,this.value=t}get pointerHashCode(){return[$i.PROPERTY_POINTER,this.value.name,this.ownerReference.valueForSerialization??""].map(Vi).join(",")}}class Ju extends qu{ownerReference;constructor(e){const t=hn.create(e._OWNER);super(t,e),this.ownerReference=t}static create(e){return new Ju(e)}}class Qu extends Qi{accept_PackageableElementVisitor(e){return e.visit_PrimitiveType(this)}static STRING=new Qu(Se.STRING);static BOOLEAN=new Qu(Se.BOOLEAN);static BINARY=new Qu(Se.BINARY);static NUMBER=new Qu(Se.NUMBER);static INTEGER=new Qu(Se.INTEGER);static FLOAT=new Qu(Se.FLOAT);static DECIMAL=new Qu(Se.DECIMAL);static DATE=new Qu(Se.DATE);static STRICTDATE=new Qu(Se.STRICTDATE);static DATETIME=new Qu(Se.DATETIME);static STRICTTIME=new Qu(Se.STRICTTIME);static LATESTDATE=new Qu(Se.LATESTDATE)}var ep;!function(e){e.NONE="NONE",e.SHARED="SHARED",e.COMPOSITE="COMPOSITE"}(ep=ep||(ep={}));class tp extends Qd{association;constructor(e,t,s,i,n){super(e,s,i,n),this.association=t}get hashCode(){return Bi([jc.ASSOCIATION_VIEW,super.hashCode,this.association.valueForSerialization??""])}}const sp=()=>new Ji(""),ip=(e,t)=>new Xu("",Zu.ONE,Wu.create(new Ku(e)),t),np=(0,x.aD)(((e,t)=>{e.value=t})),ap=((0,x.aD)(((e,t)=>{M(e.properties,t)})),(0,x.aD)(((e,t)=>{b(e.properties,Cc(t))}))),rp=((0,x.aD)(((e,t,s)=>{D(e.properties,t,s)})),(0,x.aD)(((e,t)=>{M(e.derivedProperties,t)})),(0,x.aD)(((e,t)=>{b(e.derivedProperties,xc(t))})),(0,x.aD)(((e,t,s)=>{D(e.derivedProperties,t,s)})),(0,x.aD)(((e,t)=>{b(e.constraints,Nc(t))})),(0,x.aD)(((e,t)=>{M(e.constraints,t)})),(0,x.aD)(((e,t,s)=>{D(e.constraints,t,s)})),(0,x.aD)(((e,t)=>{b(e.generalizations,cc(t))}))),op=((0,x.aD)(((e,t)=>{M(e.generalizations,t)})),(0,x.aD)(((e,t,s)=>{D(e.generalizations,t,s)})),(0,x.aD)(((e,t)=>{b(e._subclasses,t)})),(0,x.aD)(((e,t)=>{M(e._subclasses,t)})),(0,x.aD)(((e,t)=>{cc(e),lc(t),e.value=t,e.ownerReference.value=t.rawType}))),lp=((0,x.aD)(((e,t)=>{e.name=t})),(0,x.aD)(((e,t)=>{op(e.genericType,lc(t))})),(0,x.aD)(((e,t)=>{e.multiplicity=t})),(0,x.aD)(((e,t)=>{e.aggregation=t})),(0,x.aD)(((e,t)=>{e.value=uc(t),np(e.ownerReference,t._OWNER)})),(0,x.aD)(((e,t)=>{b(e.taggedValues,oc(t))})),(0,x.aD)(((e,t)=>{M(e.taggedValues,t)})),(0,x.aD)(((e,t)=>{b(e.stereotypes,ac(t))})),(0,x.aD)(((e,t)=>{M(e.stereotypes,t)})),(0,x.aD)(((e,t)=>{e.tag.value=pc(t),e.tag.ownerReference.value=t._OWNER})),(0,x.aD)(((e,t)=>{e.value=t})),(0,x.aD)(((e,t)=>{e.value=t})),(0,x.aD)(((e,t,s)=>{D(e.taggedValues,t,s)})),(0,x.aD)(((e,t,s)=>{D(e.stereotypes,t,s)})),(0,x.aD)(((e,t)=>{e.name=t})),(0,x.aD)(((e,t)=>{e.functionDefinition=Rn(t)})),(0,x.aD)(((e,t)=>{b(e.p_tags,pc(t))})),(0,x.aD)(((e,t)=>{M(e.p_tags,t)})),(0,x.aD)(((e,t)=>{b(e.p_stereotypes,uc(t))})),(0,x.aD)(((e,t)=>{M(e.p_stereotypes,t)})),(0,x.aD)(((e,t,s)=>{D(e.p_tags,t,s)})),(0,x.aD)(((e,t,s)=>{D(e.p_stereotypes,t,s)})),(0,x.aD)(((e,t)=>{M(e.parameters,t)})),(0,x.aD)(((e,t)=>{b(e.parameters,Pn(t))})),(0,x.aD)(((e,t)=>{np(e.returnType,Oc(t))})),(0,x.aD)(((e,t)=>{e.returnMultiplicity=t})),(0,x.aD)(((e,t,s)=>{D(e.parameters,t,s)})),(0,x.aD)(((e,t)=>{e.name=t})),(0,x.aD)(((e,t)=>{b(e.values,_c(t))})),(0,x.aD)(((e,t)=>{M(e.values,t)})),(0,x.aD)(((e,t,s)=>{D(e.values,t,s)})),(0,x.aD)(((e,t)=>{e.value=_c(t),np(e.ownerReference,t._OWNER)})),(0,x.aD)(((e,t,s)=>{const i=((e,t)=>{const s=e.properties.findIndex((e=>e===t));return q(-1!==s,`Can't find property '${t.name}' in association '${e.path}'`),H(e.properties[(s+1)%2])})(e,t),n=K(t.genericType.ownerReference.value,Ji,`Association property '${t.name}' must be of type 'class'`);var a;((a=n).package||a.name)&&q(M(n.propertiesFromAssociations,i),`Can't find property '${i.name}' from association '${e.path}' in associated class '${n.path}'`),b(s.propertiesFromAssociations,i);const r=new Ku(s);t.genericType.value=r,t.genericType.ownerReference.value=r.rawType})),(0,x.aD)(((e,t)=>{e.canonicalUnit=fc(t)})),(0,x.aD)(((e,t)=>{e.conversionFunction=Rn(t)})),(0,x.aD)(((e,t)=>{e.classViews=t.map(Pc)}))),cp=(0,x.aD)(((e,t)=>{b(e.classViews,Pc(t))})),dp=(0,x.aD)(((e,t)=>{M(e.classViews,t)})),hp=(0,x.aD)(((e,t)=>{e.associationViews=t.map(Dc)})),up=(0,x.aD)(((e,t)=>{M(e.associationViews,t)})),pp=(0,x.aD)(((e,t)=>{e.generalizationViews=t.map(bc)})),mp=(0,x.aD)(((e,t)=>{b(e.generalizationViews,bc(t))})),_p=(0,x.aD)(((e,t)=>{M(e.generalizationViews,t)})),gp=(0,x.aD)(((e,t)=>{e.propertyViews=t.map(Mc)})),Ep=(0,x.aD)(((e,t)=>{b(e.propertyViews,Mc(t))})),fp=(0,x.aD)(((e,t)=>{M(e.propertyViews,t)})),Tp=(0,x.aD)(((e,t)=>{e.hideProperties=t})),Cp=(0,x.aD)(((e,t)=>{e.hideStereotypes=t})),xp=(0,x.aD)(((e,t)=>{e.hideTaggedValues=t})),Sp=(0,x.aD)(((e,t)=>{e._offsetX=t})),Np=(0,x.aD)(((e,t)=>{e._offsetY=t})),Ap=(0,x.aD)(((e,t,s)=>{((e,t,s,i=((e,t)=>e===t))=>{const n=e.findIndex((e=>i(e,t)));-1!==n&&(e[n]=s)})(e.path,t,s)})),vp=(0,x.aD)(ah),Ip=(0,x.aD)(((e,t,s,i,n)=>{for(const n of e.path)if(Math.sqrt((t-n.x)*(t-n.x)+(s-n.y)*(s-n.y))<10/i)return n;const a=e.buildFullPath(n),r=[];let o;for(let e=0;e<a.length-1;e++){const n=a[e],l=a[e+1],c=new sh(n.x,n.y).normal(new sh(l.x,l.y)).unit(),d=sh.fromPoints(n,new Hd(t,s));if(Math.abs(c.dotProduct(d))<5/i){const e=(n.x<l.x?n.x:l.x)-5/i,a=(n.x<l.x?l.x:n.x)+5/i,c=(n.y<l.y?n.y:l.y)-5/i,d=(n.y<l.y?l.y:n.y)+5/i;e<=t&&t<=a&&c<=s&&s<=d&&(o=new Hd(t,s),r.push(o))}e<a.length-2&&r.push(a[e+1])}return o&&n&&nh(e,r),o})),Op=(0,x.aD)(nh),yp=(0,x.aD)(((e,t)=>{e.rectangle=t})),Rp=(0,x.aD)(((e,t)=>{e.position=t})),Pp=(0,x.aD)((e=>{e._dummyObservable={}}));var wp,Lp,bp;!function(e){e[e.LAYOUT=0]="LAYOUT",e[e.PAN=1]="PAN",e[e.ZOOM_IN=2]="ZOOM_IN",e[e.ZOOM_OUT=3]="ZOOM_OUT",e[e.ADD_RELATIONSHIP=4]="ADD_RELATIONSHIP",e[e.ADD_CLASS=5]="ADD_CLASS"}(wp=wp||(wp={})),function(e){e[e.PROPERTY=0]="PROPERTY",e[e.INHERITANCE=1]="INHERITANCE",e[e.NONE=2]="NONE"}(Lp=Lp||(Lp={})),function(e){e[e.ALIGN_LEFT=0]="ALIGN_LEFT",e[e.ALIGN_CENTER=1]="ALIGN_CENTER",e[e.ALIGN_RIGHT=2]="ALIGN_RIGHT",e[e.ALIGN_TOP=3]="ALIGN_TOP",e[e.ALIGN_MIDDLE=4]="ALIGN_MIDDLE",e[e.ALIGN_BOTTOM=5]="ALIGN_BOTTOM",e[e.SPACE_HORIZONTALLY=6]="SPACE_HORIZONTALLY",e[e.SPACE_VERTICALLY=7]="SPACE_VERTICALLY"}(bp=bp||(bp={}));const Dp=.05,Mp=[50,75,90,100,110,125,150,200,250,300,400],Fp=e=>(e instanceof Hu?"/ ":"")+e.name;class jp{diagram;isReadOnly;div;canvas;ctx;canvasDimension;canvasCenter;virtualScreen;screenOffset;zoom;interactionMode;relationshipMode;triangle;diamond;fontFamily;fontSize;lineHeight;truncateText;maxLineLength;screenPadding;classViewSpaceX;classViewSpaceY;propertySpacing;showScreenGrid;showScreenBoxGuide;screenGridAxisTickLength;screenGridSpacingX;screenGridSpacingY;screenGridLineWidth;screenGridLineColor;screenGridLabelTextColor;screenGuideLineColor;screenGuideLabelTextColor;showCanvasGrid;showCanvasBoxGuide;showScreenOffsetGuide;canvasGridAxisTickLength;canvasGridSpacingX;canvasGridSpacingY;canvasGridLineWidth;canvasGridLineColor;canvasGridLabelTextColor;canvasGuideLineColor;canvasGuideLabelTextColor;screenOffsetGuideLineColor;screenOffsetGuideLabelTextColor;defaultLineWidth;defaultLineColor;canvasColor;backgroundColor;classViewFillColor;classViewHeaderTextColor;classViewPropertyTextColor;classViewPrimitivePropertyTextColor;classViewDerivedPropertyTextColor;relationshipViewTextColor;propertyViewOwnedDiamondColor;propertyViewSharedDiamondColor;generalizationViewInheritanceTriangeFillColor;selectionBoxBorderColor;selection;selectionStart;selectedClassCorner;selectedClassProperty;selectedClasses;selectedPropertyOrAssociation;selectedInheritance;selectedPoint;_selectedClassesInitialPositions;startClassView;handleAddRelationship;mouseOverClassCorner;mouseOverClassName;mouseOverClassView;mouseOverClassProperty;mouseOverPropertyHolderViewLabel;cursorPosition;leftClick;middleClick;rightClick;clickX;clickY;positionBeforeLastMove;onAddClassViewClick=()=>{};onClassViewRightClick=()=>{};onBackgroundDoubleClick;onClassViewDoubleClick;onClassNameDoubleClick;onClassPropertyDoubleClick;handleEditClassView=()=>{};handleEditProperty=()=>{};handleAddSimpleProperty=()=>{};constructor(e,t){(0,x.rC)(this,{isReadOnly:x.LO,interactionMode:x.LO,relationshipMode:x.LO,zoom:x.LO,mouseOverClassView:x.LO,mouseOverClassName:x.LO,mouseOverClassCorner:x.LO,mouseOverClassProperty:x.LO,mouseOverPropertyHolderViewLabel:x.LO,selectionStart:x.LO,selectedClassCorner:x.LO,selectedClasses:x.LO,selectedPropertyOrAssociation:x.LO,selectedInheritance:x.LO,leftClick:x.LO,middleClick:x.LO,rightClick:x.LO,changeMode:x.aD,setIsReadOnly:x.aD,setMouseOverClassView:x.aD,setMouseOverClassName:x.aD,setMouseOverClassCorner:x.aD,setMouseOverClassProperty:x.aD,setMouseOverPropertyHolderViewLabel:x.aD,setSelectionStart:x.aD,setSelectedClassCorner:x.aD,setSelectedClasses:x.aD,setSelectedPropertyOrAssociation:x.aD,setSelectedInheritance:x.aD,setLeftClick:x.aD,setMiddleClick:x.aD,setRightClick:x.aD,setZoomLevel:x.aD,align:x.aD}),this.diagram=t,this.div=e,this.div.childNodes.forEach((e=>this.div.removeChild(e))),this.canvas=document.createElement("canvas"),this.canvasDimension=new Yd(this.div.offsetWidth,this.div.offsetHeight),this.canvasCenter=new Hd(this.canvasDimension.width/2,this.canvasDimension.height/2),this.canvas.width=this.canvasDimension.width,this.canvas.height=this.canvasDimension.height,this.canvas.style.position="absolute",this.canvas.style.left="0",this.canvas.style.top="0",this.div.appendChild(this.canvas),this.ctx=this.canvas.getContext("2d"),this.screenOffset=new Hd(0,0),this.virtualScreen=new Wd(new Hd(0,0),new Yd(0,0)),this.zoom=1,this.triangle=[new Hd(0,0),new Hd(-15,-10),new Hd(-15,10)],this.diamond=[new Hd(0,0),new Hd(-10,-5),new Hd(-20,0),new Hd(-10,5)],this.fontFamily="Arial",this.fontSize=12,this.lineHeight=14,this.truncateText=!0,this.maxLineLength=40,this.showScreenGrid=!1,this.showScreenBoxGuide=!0,this.screenGridAxisTickLength=50,this.screenGridSpacingX=100,this.screenGridSpacingY=100,this.screenGridLineWidth=.5,this.showCanvasGrid=!1,this.showCanvasBoxGuide=!0,this.showScreenOffsetGuide=!0,this.canvasGridAxisTickLength=50,this.canvasGridSpacingX=100,this.canvasGridSpacingY=100,this.canvasGridLineWidth=.5,this.defaultLineWidth=1,this.screenGridLineColor="rgba(61,126,154,0.56)",this.screenGridLabelTextColor="rgba(61,126,154,0.56)",this.screenGuideLineColor="red",this.screenGuideLabelTextColor="red",this.canvasGridLineColor="green",this.canvasGridLabelTextColor="green",this.canvasGuideLineColor="orange",this.canvasGuideLabelTextColor="orange",this.screenOffsetGuideLineColor="purple",this.screenOffsetGuideLabelTextColor="purple",this.defaultLineColor="rgb(0,0,0)",this.canvasColor="rgb(220,220,220)",this.backgroundColor="rgb(255,255,255)",this.classViewFillColor="rgb(185,185,185)",this.classViewHeaderTextColor="rgb(0,0,0)",this.classViewPropertyTextColor="rgb(0,0,0)",this.classViewPrimitivePropertyTextColor="rgb(255,255,255)",this.classViewDerivedPropertyTextColor="rgb(100,100,100)",this.relationshipViewTextColor="rgb(0,0,0)",this.propertyViewSharedDiamondColor="rgb(255,255,255)",this.propertyViewOwnedDiamondColor="rgb(0,0,0)",this.generalizationViewInheritanceTriangeFillColor="rgb(255,255,255)",this.selectionBoxBorderColor="rgba(0,0,0, 0.02)",this.interactionMode=wp.LAYOUT,this.relationshipMode=Lp.NONE,this.isReadOnly=!1,this.screenPadding=20,this.classViewSpaceX=10,this.classViewSpaceY=4,this.propertySpacing=10,this.selectionStart=void 0,this.selection=void 0,this.selectedClasses=[],this._selectedClassesInitialPositions=[],this.cursorPosition=new Hd(0,0),this.leftClick=!1,this.middleClick=!1,this.rightClick=!1,this.clickX=0,this.clickY=0,this.positionBeforeLastMove=new Hd(0,0),this.div.onwheel=this.mousewheel.bind(this),this.div.onmousedown=this.mousedown.bind(this),this.div.onkeydown=this.keydown.bind(this),this.div.ondblclick=this.mousedblclick.bind(this),this.div.onmouseup=this.mouseup.bind(this),this.div.onmousemove=this.mousemove.bind(this)}setIsReadOnly(e){this.isReadOnly=e}setMouseOverClassView(e){this.mouseOverClassView=e}setMouseOverClassName(e){this.mouseOverClassName=e}setMouseOverClassCorner(e){this.mouseOverClassCorner=e}setMouseOverClassProperty(e){this.mouseOverClassProperty=e}setMouseOverPropertyHolderViewLabel(e){this.mouseOverPropertyHolderViewLabel=e}setSelectionStart(e){this.selectionStart=e}setSelectedClassCorner(e){this.selectedClassCorner=e}setSelectedClasses(e){this.selectedClasses=e}setSelectedPropertyOrAssociation(e){this.selectedPropertyOrAssociation=e}setSelectedInheritance(e){this.selectedInheritance=e}setLeftClick(e){this.leftClick=e}setMiddleClick(e){this.middleClick=e}setRightClick(e){this.rightClick=e}setZoomLevel(e){this.zoom=e}render(){this.diagram.classViews.forEach((e=>this.ensureClassViewMeetMinDimensions(e))),this.refresh()}refresh(){this.refreshCanvas(),this.drawScreen()}refreshCanvas(){this.canvasDimension=new Yd(this.div.offsetWidth,this.div.offsetHeight),this.canvasCenter=new Hd(this.canvasDimension.width/2,this.canvasDimension.height/2),this.canvas.width=this.canvasDimension.width,this.canvas.height=this.canvasDimension.height}clearScreen(){this.ctx.fillStyle=this.canvasColor,this.ctx.fillRect(0,0,this.canvasDimension.width,this.canvasDimension.height)}drawScreen(){this.manageVirtualScreen(),this.clearScreen(),this.drawAll()}autoRecenter(){this.center(this.virtualScreen.position.x+this.virtualScreen.rectangle.width/2,this.virtualScreen.position.y+this.virtualScreen.rectangle.height/2)}center(e,t){this.screenOffset=new Hd(-e+this.canvasCenter.x,-t+this.canvasCenter.y),this.refresh()}changeMode(e,t){switch(e){case wp.LAYOUT:case wp.PAN:case wp.ZOOM_IN:case wp.ZOOM_OUT:case wp.ADD_CLASS:if(t!==Lp.NONE)throw new k(`Can't change to '${e}' mode: relationship mode should not be specified in layout mode`);break;case wp.ADD_RELATIONSHIP:if(t===Lp.NONE)throw new k("Can't switch to relationship mode: relationship mode is not specified");break;default:throw new U(`Can't switch to mode '${e}': unsupported mode`)}if(this.interactionMode=e,this.relationshipMode=t,e===wp.ADD_RELATIONSHIP)switch(t){case Lp.INHERITANCE:this.handleAddRelationship=(e,t)=>{if(e.class.value===t.class.value||Fd(e.class.value).includes(t.class.value)||Fd(t.class.value).includes(e.class.value)||rp(e.class.value,Wu.create(new Ku(t.class.value))),e.class.value.generalizations.find((e=>e.value.rawType===t.class.value))){const s=new th(this.diagram,e,t);return mp(this.diagram,s),s}};break;case Lp.PROPERTY:this.handleAddRelationship=(e,t)=>{const s=new Xu(`property_${e.class.value.properties.length+1}`,Zu.ONE,Wu.create(new Ku(t.class.value)),e.class.value);if(ap(e.class.value,s),e!==t){const i=new eh(this.diagram,Ju.create(s),e,t);return Ep(this.diagram,i),i}};break;default:throw new U(`Can't switch to relationship mode '${t}': unsupported mode`)}}align(e){if(!(this.selectedClasses.length<2)){switch(e){case bp.ALIGN_LEFT:{const e=this.selectedClasses.reduce(((e,t)=>Math.min(e,t.position.x)),Number.MAX_SAFE_INTEGER);this.selectedClasses.forEach((t=>Rp(t,new Hd(e,t.position.y))));break}case bp.ALIGN_CENTER:{const e=this.selectedClasses.reduce(((e,t)=>e+t.position.x+t.rectangle.width/2),0)/this.selectedClasses.length;this.selectedClasses.forEach((t=>Rp(t,new Hd(e-t.rectangle.width/2,t.position.y))));break}case bp.ALIGN_RIGHT:{const e=this.selectedClasses.reduce(((e,t)=>Math.max(e,t.position.x+t.rectangle.width)),-Number.MAX_SAFE_INTEGER);this.selectedClasses.forEach((t=>Rp(t,new Hd(e-t.rectangle.width,t.position.y))));break}case bp.ALIGN_TOP:{const e=this.selectedClasses.reduce(((e,t)=>Math.min(e,t.position.y)),Number.MAX_SAFE_INTEGER);this.selectedClasses.forEach((t=>Rp(t,new Hd(t.position.x,e))));break}case bp.ALIGN_MIDDLE:{const e=this.selectedClasses.reduce(((e,t)=>e+t.position.y+t.rectangle.height/2),0)/this.selectedClasses.length;this.selectedClasses.forEach((t=>Rp(t,new Hd(t.position.x,e-t.rectangle.height/2))));break}case bp.ALIGN_BOTTOM:{const e=this.selectedClasses.reduce(((e,t)=>Math.max(e,t.position.y+t.rectangle.height)),-Number.MAX_SAFE_INTEGER);this.selectedClasses.forEach((t=>Rp(t,new Hd(t.position.x,e-t.rectangle.height))));break}case bp.SPACE_HORIZONTALLY:{const e=this.selectedClasses.slice().sort(((e,t)=>e.position.x-t.position.x));if(2===e.length){const t=e[0],s=e[1];Rp(s,new Hd(t.position.x+t.rectangle.width,s.position.y))}else{const t=[];for(let s=1;s<e.length;s++){const i=e[s-1],n=e[s];t.push(n.position.x-(i.position.x+i.rectangle.width))}const s=t.reduce(((e,t)=>e+t),0)/t.length;for(let t=1;t<e.length;t++){const i=e[t-1],n=e[t];Rp(n,new Hd(i.position.x+i.rectangle.width+s,n.position.y))}}break}case bp.SPACE_VERTICALLY:{const e=this.selectedClasses.slice().sort(((e,t)=>e.position.y-t.position.y));if(2===e.length){const t=e[0],s=e[1];Rp(s,new Hd(s.position.x,t.position.y+t.rectangle.height))}else{const t=[];for(let s=1;s<e.length;s++){const i=e[s-1],n=e[s];t.push(n.position.y-(i.position.y+i.rectangle.height))}const s=t.reduce(((e,t)=>e+t),0)/t.length;for(let t=1;t<e.length;t++){const i=e[t-1],n=e[t];Rp(n,new Hd(n.position.x,i.position.y+i.rectangle.height+s))}}break}}this.drawScreen()}}truncateTextWithEllipsis(e,t=this.maxLineLength){return e.length>t?`${e.substring(0,t+1-"...".length)}...`:e}canvasCoordinateToModelCoordinate(e){return new Hd((e.x-this.canvasCenter.x)/this.zoom-this.screenOffset.x+this.canvasCenter.x,(e.y-this.canvasCenter.y)/this.zoom-this.screenOffset.y+this.canvasCenter.y)}modelCoordinateToCanvasCoordinate(e){return new Hd((e.x-this.canvasCenter.x+this.screenOffset.x)*this.zoom+this.canvasCenter.x,(e.y-this.canvasCenter.y+this.screenOffset.y)*this.zoom+this.canvasCenter.y)}eventCoordinateToCanvasCoordinate(e){return new Hd(e.x-this.divPosition.x+this.div.scrollLeft,e.y-this.divPosition.y+this.div.scrollTop)}canvasCoordinateToEventCoordinate(e){return new Hd(e.x-this.div.scrollLeft+this.divPosition.x,e.y-this.div.scrollTop+this.divPosition.y)}hasPropertyView(e,t){return this.diagram.propertyViews.filter((s=>s.property.value===t&&s.from.classView.value===e)).length>0}get divPosition(){return(e=>{let t=0,s=0;for(;e.offsetParent;)t+=e.offsetLeft-e.scrollLeft+e.clientLeft,s+=e.offsetTop-e.scrollTop+e.clientTop,e=e.offsetParent;return new Hd(t,s)})(this.div)}manageVirtualScreen(){if(this.diagram.classViews.length){const e=H(this.diagram.classViews[0]);let t=e.position.x,s=e.position.y,i=e.position.x+e.rectangle.width,n=e.position.y+e.rectangle.height;for(const e of this.diagram.classViews)t=Math.min(t,e.position.x),s=Math.min(s,e.position.y),i=Math.max(i,e.position.x+e.rectangle.width),n=Math.max(n,e.position.y+e.rectangle.height);const a=this.diagram.associationViews.concat(this.diagram.generalizationViews).concat(this.diagram.propertyViews);for(const e of a){const a=Jd.pruneUnnecessaryInsidePoints(e.buildFullPath(),e.from.classView.value,e.to.classView.value);if(e instanceof eh){const r=this.drawLinePropertyText(a[a.length-2],a[a.length-1],e.to.classView.value,e.property.value,!1);t=Math.min(t,r.position.x),s=Math.min(s,r.position.y),i=Math.max(i,lh(r).x),n=Math.max(n,lh(r).y)}for(const a of e.path)t=Math.min(t,a.x),s=Math.min(s,a.y),i=Math.max(i,a.x),n=Math.max(n,a.y)}this.virtualScreen=new Wd(new Hd(t,s),new Yd(i-t,n-s))}else this.setZoomLevel(1),this.screenOffset=new Hd(0,0),this.virtualScreen=new Wd(new Hd(this.canvasDimension.width/2,this.canvasDimension.height/2),new Yd(0,0))}executeZoom(e,t){e=Math.max(e,Dp);const s=this.canvasCoordinateToModelCoordinate(this.eventCoordinateToCanvasCoordinate(t)),i=this.zoom;this.setZoomLevel(e),this.screenOffset=new Hd(((s.x-this.canvasCenter.x)*(i-e)+this.screenOffset.x*i)/e,((s.y-this.canvasCenter.y)*(i-e)+this.screenOffset.y*i)/e),this.clearScreen(),this.drawAll()}zoomPoint(e,t){this.executeZoom(e,t)}zoomCenter(e){this.setZoomLevel(Math.max(e,Dp)),this.clearScreen(),this.drawAll()}zoomToFit(){this.autoRecenter(),this.zoomCenter(Math.max(Math.min(this.canvas.width/(this.virtualScreen.rectangle.width+2*this.screenPadding+20),this.canvas.height/(this.virtualScreen.rectangle.height+2*this.screenPadding+20)),Dp))}addClassView(e,t){if(!this.isReadOnly){const s=this.diagram.classViews.map((e=>e.id));let i=(0,a.Z)();for(;s.includes(i);)i=(0,a.Z)();const n=new Kd(this.diagram,i,hn.create(e));return Rp(n,t??this.canvasCoordinateToModelCoordinate(new Hd(this.virtualScreen.position.x+this.virtualScreen.rectangle.width/2,this.virtualScreen.position.y+this.virtualScreen.rectangle.height/2))),cp(this.diagram,n),Pp(n),this.diagram.classViews.filter((t=>t.class.value!==e)).forEach((t=>{const s=t.class.value;e.generalizations.map((e=>e.value.rawType)).includes(s)&&mp(this.diagram,new th(this.diagram,n,t)),s.generalizations.map((e=>e.value.rawType)).includes(e)&&mp(this.diagram,new th(this.diagram,t,n)),jd(e).forEach((e=>{e.genericType.value.rawType===s&&Ep(this.diagram,new eh(this.diagram,Ju.create(e),n,t))})),jd(s).forEach((s=>{s.genericType.value.rawType===e&&Ep(this.diagram,new eh(this.diagram,Ju.create(s),t,n))}))})),this.drawClassView(n),this.drawScreen(),n}}drawBoundingBox(){this.ctx.fillStyle=this.backgroundColor,this.ctx.lineWidth=1,this.ctx.fillRect((this.virtualScreen.position.x+this.screenOffset.x-this.canvasCenter.x-this.screenPadding)*this.zoom+this.canvasCenter.x,(this.virtualScreen.position.y+this.screenOffset.y-this.canvasCenter.y-this.screenPadding)*this.zoom+this.canvasCenter.y,(this.virtualScreen.rectangle.width+2*this.screenPadding)*this.zoom,(this.virtualScreen.rectangle.height+2*this.screenPadding)*this.zoom),this.ctx.strokeRect((this.virtualScreen.position.x+this.screenOffset.x-this.canvasCenter.x-this.screenPadding)*this.zoom+this.canvasCenter.x,(this.virtualScreen.position.y+this.screenOffset.y-this.canvasCenter.y-this.screenPadding)*this.zoom+this.canvasCenter.y,(this.virtualScreen.rectangle.width+2*this.screenPadding)*this.zoom,(this.virtualScreen.rectangle.height+2*this.screenPadding)*this.zoom)}drawDiagram(){this.diagram.associationViews.forEach((e=>this.drawPropertyOrAssociation(e))),this.diagram.generalizationViews.forEach((e=>this.drawInheritance(e))),this.diagram.propertyViews.forEach((e=>this.drawPropertyOrAssociation(e))),this.diagram.classViews.forEach((e=>this.drawClassView(e))),this.showCanvasGrid&&this.drawCanvasGrid(),this.showScreenGrid&&this.drawScreenGrid()}drawAll(){this.drawBoundingBox(),this.drawDiagram()}drawScreenGrid(){const e=(this.virtualScreen.position.x+this.screenOffset.x-this.canvasCenter.x)*this.zoom+this.canvasCenter.x,t=(this.virtualScreen.position.y+this.screenOffset.y-this.canvasCenter.y)*this.zoom+this.canvasCenter.y,s=(this.virtualScreen.rectangle.width+2*this.screenPadding)*this.zoom,i=(this.virtualScreen.rectangle.height+2*this.screenPadding)*this.zoom;this.ctx.beginPath(),this.ctx.fillStyle=this.screenGridLabelTextColor,this.ctx.strokeStyle=this.screenGridLineColor,this.ctx.lineWidth=this.screenGridLineWidth,this.ctx.font=`${(this.fontSize-1)*this.zoom}px ${this.fontFamily}`;let n=0;for(let a=e;a<e+s-2*this.screenPadding;a+=this.screenGridSpacingX*this.zoom)this.ctx.fillText(`${n}`,a+5*this.zoom,t-(this.screenGridAxisTickLength+this.screenPadding)*this.zoom),this.ctx.fillText(`[${Math.round(this.virtualScreen.position.x+n)}]`,a+5*this.zoom,t-(this.screenGridAxisTickLength+this.screenPadding-this.lineHeight)*this.zoom),this.ctx.moveTo(a,t-(this.screenGridAxisTickLength+this.screenPadding)*this.zoom),this.ctx.lineTo(a,t+i-this.screenPadding*this.zoom),this.ctx.stroke(),n+=this.screenGridSpacingX;let a=0;for(let n=t;n<t+i-2*this.screenPadding;n+=this.screenGridSpacingY*this.zoom)this.ctx.fillText(`${a}`,e-(this.screenGridAxisTickLength+this.screenPadding)*this.zoom,n+5*this.zoom),this.ctx.fillText(`[${Math.round(this.virtualScreen.position.y+a)}]`,e-(this.screenGridAxisTickLength+this.screenPadding)*this.zoom,n+(5+this.lineHeight)*this.zoom),this.ctx.moveTo(e-(this.screenGridAxisTickLength+this.screenPadding)*this.zoom,n),this.ctx.lineTo(e+s-this.screenPadding*this.zoom,n),this.ctx.stroke(),a+=this.screenGridSpacingY;this.showScreenBoxGuide&&(this.ctx.beginPath(),this.ctx.fillStyle=this.screenGuideLabelTextColor,this.ctx.strokeStyle=this.screenGuideLineColor,this.ctx.moveTo(e,t),this.ctx.lineTo(e,t+i-2*this.screenPadding*this.zoom),this.ctx.stroke(),this.ctx.lineTo(e,t+i-2*this.screenPadding*this.zoom),this.ctx.lineTo(e+s-2*this.screenPadding*this.zoom,t+i-2*this.screenPadding*this.zoom),this.ctx.stroke(),this.ctx.lineTo(e+s-2*this.screenPadding*this.zoom,t+i-2*this.screenPadding*this.zoom),this.ctx.lineTo(e+s-2*this.screenPadding*this.zoom,t),this.ctx.stroke(),this.ctx.lineTo(e+s-2*this.screenPadding*this.zoom,t),this.ctx.lineTo(e,t),this.ctx.stroke(),this.ctx.fillText(`${Math.round(this.virtualScreen.rectangle.width/2)}`,e+s/2-(this.screenPadding-5)*this.zoom,t+5*this.zoom),this.ctx.fillText(`[${Math.round(this.virtualScreen.position.x+this.virtualScreen.rectangle.width/2)}]`,e+s/2-(this.screenPadding-5)*this.zoom,t+(5+this.lineHeight)*this.zoom),this.ctx.lineTo(e+s/2-this.screenPadding*this.zoom,t),this.ctx.lineTo(e+s/2-this.screenPadding*this.zoom,t+i-2*this.screenPadding*this.zoom),this.ctx.stroke(),this.ctx.fillText(`${Math.round(this.virtualScreen.rectangle.height/2)}`,e+5*this.zoom,t+i/2-(this.screenPadding-5)*this.zoom),this.ctx.fillText(`[${Math.round(this.virtualScreen.position.y+this.virtualScreen.rectangle.height/2)}]`,e+5*this.zoom,t+i/2-(this.screenPadding-5-this.lineHeight)*this.zoom),this.ctx.lineTo(e,t+i/2-this.screenPadding*this.zoom),this.ctx.lineTo(e+s-2*this.screenPadding*this.zoom,t+i/2-this.screenPadding*this.zoom),this.ctx.stroke()),this.ctx.strokeStyle=this.defaultLineColor,this.ctx.lineWidth=this.defaultLineWidth}drawCanvasGrid(){const e=-this.canvasCenter.x*this.zoom+this.canvasCenter.x,t=-this.canvasCenter.y*this.zoom+this.canvasCenter.y,s=this.canvasDimension.width,i=this.canvasDimension.height;this.ctx.setLineDash([5,5]),this.ctx.fillStyle=this.canvasGridLabelTextColor,this.ctx.strokeStyle=this.canvasGridLineColor,this.ctx.lineWidth=this.canvasGridLineWidth,this.ctx.font=`${(this.fontSize-1)*this.zoom}px ${this.fontFamily}`,this.ctx.beginPath();let n=0;for(let t=e;t<s;t+=this.canvasGridSpacingX*this.zoom)0!==t&&this.ctx.fillText(`[${Math.round(n)}]`,t+5*this.zoom,5*this.zoom),this.ctx.moveTo(t,0),this.ctx.lineTo(t,i),this.ctx.stroke(),n+=this.canvasGridSpacingX;let a=0;for(let e=t;e<i;e+=this.canvasGridSpacingY*this.zoom)0!==e&&this.ctx.fillText(`[${Math.round(a)}]`,5*this.zoom,e+5*this.zoom),this.ctx.moveTo(0,e),this.ctx.lineTo(s,e),this.ctx.stroke(),a+=this.canvasGridSpacingY;if(this.showCanvasBoxGuide&&(this.ctx.beginPath(),this.ctx.fillStyle=this.canvasGuideLabelTextColor,this.ctx.strokeStyle=this.canvasGuideLineColor,this.ctx.fillText(`[${Math.round(s/2)}]`,s/2+5*this.zoom,5*this.zoom),this.ctx.moveTo(s/2,0),this.ctx.lineTo(s/2,i),this.ctx.stroke(),this.ctx.fillText(`[${Math.round(i/2)}]`,5*this.zoom,i/2+5*this.zoom),this.ctx.moveTo(0,i/2),this.ctx.lineTo(s,i/2),this.ctx.stroke()),this.showScreenOffsetGuide){const s=5,i=35;this.ctx.beginPath(),this.ctx.setLineDash([]),this.ctx.fillStyle=this.screenOffsetGuideLabelTextColor,this.ctx.strokeStyle=this.screenOffsetGuideLineColor,this.ctx.arc(e+this.screenOffset.x*this.zoom,t+this.screenOffset.y*this.zoom,s*this.zoom,0,2*Math.PI),this.ctx.moveTo(e+(this.screenOffset.x-s)*this.zoom,t+this.screenOffset.y*this.zoom),this.ctx.lineTo(e+(this.screenOffset.x+2*s)*this.zoom,t+this.screenOffset.y*this.zoom),this.ctx.moveTo(e+this.screenOffset.x*this.zoom,t+(this.screenOffset.y-s)*this.zoom),this.ctx.lineTo(e+this.screenOffset.x*this.zoom,t+(this.screenOffset.y+2*s)*this.zoom),this.ctx.stroke(),this.ctx.setLineDash([5,5]),this.ctx.moveTo(e,t+this.screenOffset.y*this.zoom),this.ctx.lineTo(e+(this.screenOffset.x-s)*this.zoom,t+this.screenOffset.y*this.zoom),this.ctx.moveTo(e+this.screenOffset.x*this.zoom,t+0),this.ctx.lineTo(e+this.screenOffset.x*this.zoom,t+(this.screenOffset.y-s)*this.zoom),this.ctx.stroke(),this.ctx.beginPath(),this.screenOffset.x>=i&&this.screenOffset.y>=i?(this.ctx.fillText(`[${Math.round(this.screenOffset.x)}]`,e+(this.screenOffset.x+5)*this.zoom,t+5*this.zoom),this.ctx.fillText(`[${Math.round(this.screenOffset.y)}]`,e+5*this.zoom,t+(this.screenOffset.y+5)*this.zoom)):this.screenOffset.x>=0&&this.screenOffset.y>=0?this.ctx.fillText(`Δ [${Math.round(this.screenOffset.x)},${Math.round(this.screenOffset.y)}]`,e+(this.screenOffset.x+s+5)*this.zoom,t+(this.screenOffset.y+s+5)*this.zoom):this.ctx.fillText(`Δ [${Math.round(this.screenOffset.x)},${Math.round(this.screenOffset.y)}]`,e+(s+5)*this.zoom,t+(s+5)*this.zoom)}this.ctx.setLineDash([]),this.ctx.strokeStyle=this.defaultLineColor,this.ctx.lineWidth=this.defaultLineWidth}drawClassViewProperty(e,t,s,i,n){this.ctx.font=this.mouseOverClassView===e&&this.mouseOverClassProperty===t?`bold ${(this.fontSize-1)*(n?1:this.zoom)}px ${this.fontFamily}`:`${n?"bold":""} ${(this.fontSize-1)*(n?1:this.zoom)}px ${this.fontFamily}`;const a=Fp(t);let r=this.ctx.measureText(`${a} : `).width;n||(this.ctx.fillText(`${a} : `,s,i),this.ctx.fillText(t.genericType.value.rawType.name,s+r,i),t.genericType.value.rawType instanceof en&&(this.ctx.beginPath(),this.ctx.moveTo(s+r,i+(this.fontSize-1)*this.zoom),this.ctx.lineTo(s+r+this.ctx.measureText(t.genericType.value.rawType.name).width,i+(this.fontSize-1)*this.zoom),this.ctx.stroke())),r+=this.ctx.measureText(t.genericType.value.rawType.name).width,this.ctx.font=`${(this.fontSize-1)*(n?1:this.zoom)}px ${this.fontFamily}`;const o=Ve(t.multiplicity.lowerBound,t.multiplicity.upperBound);return n||this.ctx.fillText(`[${o}]`,s+r,i),r+=this.ctx.measureText(`[${o}]`).width,r}computeClassNameWidth(e){return this.ctx.font=`bold ${this.fontSize}px ${this.fontFamily}`,this.ctx.textBaseline="top",this.ctx.measureText(this.truncateTextWithEllipsis(e.class.value.name)).width}ensureClassViewMeetMinDimensions(e){let t=this.computeClassNameWidth(e),s=this.lineHeight+2*this.classViewSpaceY;if(!e.hideStereotypes){this.ctx.font=`${this.fontSize}px ${this.fontFamily}`;for(const i of e.class.value.stereotypes){const e=`<< ${this.truncateTextWithEllipsis(i.value.value,this.maxLineLength-6)} >>`,n=this.ctx.measureText(e).width;t=Math.max(t,n),s+=this.lineHeight}}if(!e.hideTaggedValues){this.ctx.font=`${this.fontSize}px ${this.fontFamily}`,this.ctx.textBaseline="top";for(const i of e.class.value.taggedValues){const e=`{ ${this.truncateTextWithEllipsis(`${i.tag.value.value} = ${i.value}`,this.maxLineLength-4)} }`,n=this.ctx.measureText(e).width;t=Math.max(t,n),s+=this.lineHeight}}if(e.hideProperties||(jd(e.class.value).forEach((i=>{if(!this.hasPropertyView(e,i)){const n=this.drawClassViewProperty(e,i,0,0,!0);t=Math.max(t,n),s+=this.lineHeight}})),s+=2*this.classViewSpaceY),t+=2*this.classViewSpaceX,!this.isReadOnly){const i=e.rectangle.width&&e.rectangle.width>t?e.rectangle.width:t,n=e.rectangle.height&&e.rectangle.height>s?e.rectangle.height:s;yp(e,new Yd(i,n))}}drawClassView(e){const t=this.computeClassNameWidth(e);this.ensureClassViewMeetMinDimensions(e),this.ctx.fillStyle=this.classViewFillColor;const s=this.modelCoordinateToCanvasCoordinate(e.position);this.ctx.fillRect(s.x,s.y,e.rectangle.width*this.zoom,e.rectangle.height*this.zoom),this.ctx.lineWidth=0!==this.selectedClasses.length&&-1!==this.selectedClasses.indexOf(e)?2:1,this.ctx.strokeRect(s.x,s.y,e.rectangle.width*this.zoom,e.rectangle.height*this.zoom);const i=e.position.x,n=e.position.y;this.ctx.lineWidth=1,this.ctx.fillStyle=this.classViewHeaderTextColor;let a=n;if(this.ctx.font=`${this.fontSize*this.zoom}px ${this.fontFamily}`,!e.hideStereotypes)for(const t of e.class.value.stereotypes){this.ctx.font=`${this.fontSize}px ${this.fontFamily}`;const s=`<< ${this.truncateTextWithEllipsis(t.value.value,this.maxLineLength-6)} >>`,n=this.ctx.measureText(s).width;this.ctx.font=`${this.fontSize*this.zoom}px ${this.fontFamily}`,this.ctx.fillText(s,(i+this.screenOffset.x+(e.rectangle.width-n)/2-this.canvasCenter.x)*this.zoom+this.canvasCenter.x,(a+this.screenOffset.y+this.classViewSpaceY-this.canvasCenter.y)*this.zoom+this.canvasCenter.y),a+=this.lineHeight}this.ctx.font=`bold ${this.fontSize*this.zoom}px ${this.fontFamily}`;const r=this.truncateTextWithEllipsis(e.class.value.name);if(this.ctx.fillText(r,(i+this.screenOffset.x+(e.rectangle.width-t)/2-this.canvasCenter.x)*this.zoom+this.canvasCenter.x,(a+this.screenOffset.y+this.classViewSpaceY-this.canvasCenter.y)*this.zoom+this.canvasCenter.y),a+=this.lineHeight,!e.hideTaggedValues)for(const t of e.class.value.taggedValues){this.ctx.font=`${this.fontSize}px ${this.fontFamily}`;const s=`{ ${this.truncateTextWithEllipsis(`${t.tag.value.value} = ${t.value}`,this.maxLineLength-4)} }`,n=this.ctx.measureText(s).width;this.ctx.font=`${this.fontSize*this.zoom}px ${this.fontFamily}`,this.ctx.fillText(s,(i+this.screenOffset.x+(e.rectangle.width-n)/2-this.canvasCenter.x)*this.zoom+this.canvasCenter.x,(a+this.screenOffset.y+this.classViewSpaceY-this.canvasCenter.y)*this.zoom+this.canvasCenter.y),a+=this.lineHeight}if(a+=3*this.classViewSpaceY,!e.hideProperties){this.ctx.beginPath();const t=(n+this.screenOffset.y+this.lineHeight+(e.hideStereotypes?0:e.class.value.stereotypes.length*this.lineHeight)+(e.hideTaggedValues?0:e.class.value.taggedValues.length*this.lineHeight)+this.classViewSpaceY-this.canvasCenter.y)*this.zoom+this.canvasCenter.y;this.ctx.moveTo((i+this.screenOffset.x-this.canvasCenter.x)*this.zoom+this.canvasCenter.x,t),this.ctx.lineTo((i+this.screenOffset.x+e.rectangle.width-this.canvasCenter.x)*this.zoom+this.canvasCenter.x,t),this.ctx.stroke();for(const t of jd(e.class.value))if(!this.hasPropertyView(e,t)){this.ctx.fillStyle=t instanceof Hu?this.classViewDerivedPropertyTextColor:t.genericType.value.rawType instanceof Qu?this.classViewPrimitivePropertyTextColor:this.classViewPropertyTextColor;const s=(i+this.screenOffset.x+this.classViewSpaceX-this.canvasCenter.x)*this.zoom+this.canvasCenter.x,n=(a+this.screenOffset.y-this.canvasCenter.y)*this.zoom+this.canvasCenter.y;this.drawClassViewProperty(e,t,s,n,!1),a+=this.lineHeight}}Pp(e)}drawLinePropertyNameAndMultiplicity(e,t,s,i,n,a){this.ctx.font=`${this.fontSize}px ${this.fontFamily}`;const r=Fp(e),o=Ve(e.multiplicity.lowerBound,e.multiplicity.upperBound),l=this.ctx.measureText(r).width,c=this.ctx.measureText(o).width;this.ctx.font=`${this.fontSize*this.zoom}px ${this.fontFamily}`;const d=t(l),h=s(l),u=this.modelCoordinateToCanvasCoordinate(new Hd(t(l),s(l)));a||this.ctx.fillText(r,u.x,u.y);const p=i(c),m=n(c),_=this.modelCoordinateToCanvasCoordinate(new Hd(i(c),n(c)));a||this.ctx.fillText(o,_.x,_.y);const g=new Hd(Math.min(d,p),Math.min(h,m));return new Wd(g,new Yd(Math.max(d,p)+Math.max(l,c)-g.x,Math.max(h,m)+this.lineHeight-g.y))}drawLinePropertyText(e,t,s,i,n){this.ctx.textBaseline="top",this.ctx.fillStyle=this.relationshipViewTextColor;const a=e.x,r=e.y,o=t.x,l=t.y,c=s.rectangle;if(r<l){const e=a+(o-a)/(l-r)*(s.position.y-r);if(e>s.position.x&&e<s.position.x+c.width)return this.drawLinePropertyNameAndMultiplicity(i,(t=>e<s.position.x+c.width/2?e+this.propertySpacing:e-t-this.propertySpacing),(e=>s.position.y-this.lineHeight-this.propertySpacing),(t=>e<s.position.x+c.width/2?e-t-this.propertySpacing:e+this.propertySpacing),(e=>s.position.y-this.lineHeight-this.propertySpacing),n)}else{const e=a+(o-a)/(l-r)*(s.position.y+c.height-r);if(e>s.position.x&&e<s.position.x+c.width)return this.drawLinePropertyNameAndMultiplicity(i,(t=>e<s.position.x+c.width/2?e+this.propertySpacing:e-t-this.propertySpacing),(e=>s.position.y+c.height+this.propertySpacing),(t=>e<s.position.x+c.width/2?e-t-this.propertySpacing:e+this.propertySpacing),(e=>s.position.y+c.height+this.propertySpacing),n)}if(a<o){const e=r+(l-r)/(o-a)*(s.position.x-a);if(e>s.position.y&&e<s.position.y+c.height)return this.drawLinePropertyNameAndMultiplicity(i,(e=>s.position.x-e-this.propertySpacing),(t=>e<s.position.y+s.rectangle.height/2?e+this.propertySpacing:e-this.lineHeight-this.propertySpacing),(e=>s.position.x-e-this.propertySpacing),(t=>e<s.position.y+s.rectangle.height/2?e-this.lineHeight-this.propertySpacing:e+this.propertySpacing),n)}else{const e=r+(l-r)/(o-a)*(s.position.x+s.rectangle.width-a);if(e>s.position.y&&e<s.position.y+s.rectangle.height)return this.drawLinePropertyNameAndMultiplicity(i,(e=>s.position.x+s.rectangle.width+this.propertySpacing),(t=>e<s.position.y+s.rectangle.height/2?e+this.propertySpacing:e-this.lineHeight-this.propertySpacing),(e=>s.position.x+s.rectangle.width+this.propertySpacing),(t=>e<s.position.y+s.rectangle.height/2?e-this.lineHeight-this.propertySpacing:e+this.propertySpacing),n)}return new Wd(new Hd(0,0),new Yd(0,0))}drawPropertyOrAssociation(e){const t=Jd.pruneUnnecessaryInsidePoints(e.buildFullPath(),e.from.classView.value,e.to.classView.value),s=e.property.value;if(this.drawLinePropertyText(t[t.length-2],t[t.length-1],e.to.classView.value,s,!1),this.ctx.beginPath(),this.ctx.lineWidth=e===this.selectedPropertyOrAssociation?2:1,t.forEach(((e,t)=>{const s=this.modelCoordinateToCanvasCoordinate(e);0===t?this.ctx.moveTo(s.x,s.y):this.ctx.lineTo(s.x,s.y)})),this.ctx.stroke(),this.ctx.lineWidth=1,s instanceof Xu){const i=t[1],n=t[0],a=i.x,r=i.y,o=n.x,l=n.y,c=e.from;let d=0,h=0;if(l>r){const e=a+(o-a)/(l-r)*(c.classView.value.position.y-r);e>c.classView.value.position.x&&e<c.classView.value.position.x+c.classView.value.rectangle.width&&(d=(e-this.canvasCenter.x)*this.zoom+this.canvasCenter.x,h=(c.classView.value.position.y-this.canvasCenter.y)*this.zoom+this.canvasCenter.y)}else{const e=a+(o-a)/(l-r)*(c.classView.value.position.y+c.classView.value.rectangle.height-r);e>c.classView.value.position.x&&e<c.classView.value.position.x+c.classView.value.rectangle.width&&(d=(e-this.canvasCenter.x)*this.zoom+this.canvasCenter.x,h=(c.classView.value.position.y+c.classView.value.rectangle.height-this.canvasCenter.y)*this.zoom+this.canvasCenter.y)}if(o>a){const e=r+(l-r)/(o-a)*(c.classView.value.position.x-a);e>c.classView.value.position.y&&e<c.classView.value.position.y+c.classView.value.rectangle.height&&(d=(c.classView.value.position.x-this.canvasCenter.x)*this.zoom+this.canvasCenter.x,h=(e-this.canvasCenter.y)*this.zoom+this.canvasCenter.y)}else{const e=r+(l-r)/(o-a)*(c.classView.value.position.x+c.classView.value.rectangle.width-a);e>c.classView.value.position.y&&e<c.classView.value.position.y+c.classView.value.rectangle.height&&(d=(c.classView.value.position.x+c.classView.value.rectangle.width-this.canvasCenter.x)*this.zoom+this.canvasCenter.x,h=(e-this.canvasCenter.y)*this.zoom+this.canvasCenter.y)}if(s.aggregation===ep.COMPOSITE||s.aggregation===ep.SHARED){let e=Math.atan((l-r)/(o-a));e=o>=a?e:e+Math.PI,this.ctx.beginPath(),this.ctx.moveTo(d+(this.screenOffset.x+rh(this.diamond[0],e))*this.zoom,h+(this.screenOffset.y+oh(this.diamond[0],e))*this.zoom),this.ctx.lineTo(d+(this.screenOffset.x+rh(this.diamond[1],e))*this.zoom,h+(this.screenOffset.y+oh(this.diamond[1],e))*this.zoom),this.ctx.lineTo(d+(this.screenOffset.x+rh(this.diamond[2],e))*this.zoom,h+(this.screenOffset.y+oh(this.diamond[2],e))*this.zoom),this.ctx.lineTo(d+(this.screenOffset.x+rh(this.diamond[3],e))*this.zoom,h+(this.screenOffset.y+oh(this.diamond[3],e))*this.zoom),this.ctx.lineTo(d+(this.screenOffset.x+rh(this.diamond[0],e))*this.zoom,h+(this.screenOffset.y+oh(this.diamond[0],e))*this.zoom),s.aggregation===ep.SHARED&&(this.ctx.fillStyle=this.propertyViewSharedDiamondColor),s.aggregation===ep.COMPOSITE&&(this.ctx.fillStyle=this.propertyViewOwnedDiamondColor),this.ctx.fill(),this.ctx.stroke(),this.ctx.lineWidth=1}}}drawInheritance(e){const t=e.to.classView.value.rectangle,s=Jd.pruneUnnecessaryInsidePoints(e.buildFullPath(),e.from.classView.value,e.to.classView.value),i=s[s.length-2].x,n=s[s.length-2].y,a=s[s.length-1].x,r=s[s.length-1].y;let o=0,l=0;if(r>n){const s=i+(a-i)/(r-n)*(e.to.classView.value.position.y-n);s>e.to.classView.value.position.x&&s<e.to.classView.value.position.x+t.width&&(o=(s-this.canvasCenter.x)*this.zoom+this.canvasCenter.x,l=(e.to.classView.value.position.y-this.canvasCenter.y)*this.zoom+this.canvasCenter.y)}else{const s=i+(a-i)/(r-n)*(e.to.classView.value.position.y+t.height-n);s>e.to.classView.value.position.x&&s<e.to.classView.value.position.x+t.width&&(o=(s-this.canvasCenter.x)*this.zoom+this.canvasCenter.x,l=(e.to.classView.value.position.y+t.height-this.canvasCenter.y)*this.zoom+this.canvasCenter.y)}if(a>i){const s=n+(r-n)/(a-i)*(e.to.classView.value.position.x-i);s>e.to.classView.value.position.y&&s<e.to.classView.value.position.y+t.height&&(o=(e.to.classView.value.position.x-this.canvasCenter.x)*this.zoom+this.canvasCenter.x,l=(s-this.canvasCenter.y)*this.zoom+this.canvasCenter.y)}else{const s=n+(r-n)/(a-i)*(e.to.classView.value.position.x+t.width-i);s>e.to.classView.value.position.y&&s<e.to.classView.value.position.y+t.height&&(o=(e.to.classView.value.position.x+t.width-this.canvasCenter.x)*this.zoom+this.canvasCenter.x,l=(s-this.canvasCenter.y)*this.zoom+this.canvasCenter.y)}this.ctx.beginPath(),this.ctx.lineWidth=e===this.selectedInheritance?2:1,s.forEach(((e,t)=>{const s=this.modelCoordinateToCanvasCoordinate(e);0===t?this.ctx.moveTo(s.x,s.y):this.ctx.lineTo(s.x,s.y)})),this.ctx.stroke();let c=Math.atan((r-n)/(a-i));c=a>=i?c:c+Math.PI,this.ctx.beginPath(),this.ctx.moveTo(o+(this.screenOffset.x+rh(this.triangle[0],c))*this.zoom,l+(this.screenOffset.y+oh(this.triangle[0],c))*this.zoom),this.ctx.lineTo(o+(this.screenOffset.x+rh(this.triangle[1],c))*this.zoom,l+(this.screenOffset.y+oh(this.triangle[1],c))*this.zoom),this.ctx.lineTo(o+(this.screenOffset.x+rh(this.triangle[2],c))*this.zoom,l+(this.screenOffset.y+oh(this.triangle[2],c))*this.zoom),this.ctx.lineTo(o+(this.screenOffset.x+rh(this.triangle[0],c))*this.zoom,l+(this.screenOffset.y+oh(this.triangle[0],c))*this.zoom),this.ctx.fillStyle=this.generalizationViewInheritanceTriangeFillColor,this.ctx.fill(),this.ctx.stroke(),this.ctx.lineWidth=1}reorderDiagramDomain(e,t){const s=t.classViews.filter((t=>t!==e));return s.push(e),s}potentiallyShiftRelationships(e,t,s,i){e.forEach((e=>{-1!==t.indexOf(e.from.classView.value)&&-1!==t.indexOf(e.to.classView.value)&&Op(e,e.path.map((e=>new Hd(e.x-s,e.y-i))))}))}recenter(){if(0!==this.selectedClasses.length){const e=P(this.selectedClasses);e&&this.center(e.position.x+e.rectangle.width/2,e.position.y+e.rectangle.height/2)}else this.autoRecenter()}switchToZoomMode(){this.changeMode(this.interactionMode!==wp.ZOOM_IN?wp.ZOOM_IN:wp.ZOOM_OUT,Lp.NONE)}switchToViewMode(){this.changeMode(wp.LAYOUT,Lp.NONE)}switchToPanMode(){this.changeMode(wp.PAN,Lp.NONE)}switchToAddPropertyMode(){this.isReadOnly||this.changeMode(wp.ADD_RELATIONSHIP,Lp.PROPERTY)}switchToAddInheritanceMode(){this.isReadOnly||this.changeMode(wp.ADD_RELATIONSHIP,Lp.INHERITANCE)}switchToAddClassMode(){this.isReadOnly||this.changeMode(wp.ADD_CLASS,Lp.NONE)}ejectProperty(){this.isReadOnly||(this.mouseOverClassProperty?this.mouseOverClassProperty.genericType.value.rawType instanceof Ji&&this.addClassView(this.mouseOverClassProperty.genericType.value.rawType,this.canvasCoordinateToModelCoordinate(this.eventCoordinateToCanvasCoordinate(new Hd(this.cursorPosition.x,this.cursorPosition.y)))):this.selectedClassProperty&&(this.selectedClassProperty.property.genericType.value.rawType instanceof Ji&&this.addClassView(this.selectedClassProperty.property.genericType.value.rawType,this.selectedClassProperty.selectionPoint),this.selectedClassProperty=void 0))}keydown(e){if("Delete"===e.code)this.isReadOnly||(this.selectedClasses.forEach((e=>{dp(this.diagram,e),hp(this.diagram,this.diagram.associationViews.filter((t=>!(t.from.classView.value===e||t.to.classView.value===e)))),pp(this.diagram,this.diagram.generalizationViews.filter((t=>!(t.from.classView.value===e||t.to.classView.value===e)))),gp(this.diagram,this.diagram.propertyViews.filter((t=>!(t.from.classView.value===e||t.to.classView.value===e))))})),this.selectedPropertyOrAssociation instanceof tp?up(this.diagram,this.selectedPropertyOrAssociation):this.selectedPropertyOrAssociation instanceof eh&&fp(this.diagram,this.selectedPropertyOrAssociation),this.selectedInheritance&&this.diagram.generalizationViews.find((e=>e===this.selectedInheritance))&&_p(this.diagram,this.selectedInheritance),this.setSelectedClasses([]),this.drawScreen());else if("KeyE"===e.code)this.selectedClassProperty?(this.handleEditProperty(this.selectedClassProperty.property,this.selectedClassProperty.selectionPoint,void 0),e.preventDefault()):this.selectedPropertyOrAssociation?(this.handleEditProperty(this.selectedPropertyOrAssociation.property.value,this.selectedPoint??(this.selectedPropertyOrAssociation.path.length?this.selectedPropertyOrAssociation.path[0]:this.selectedPropertyOrAssociation.from.classView.value.center()),this.selectedPropertyOrAssociation),e.preventDefault()):1===this.selectedClasses.length&&this.handleEditClassView(this.selectedClasses[0]);else if(e.altKey&&"KeyP"===e.code)this.isReadOnly||0!==this.selectedClasses.length&&(this.selectedClasses.forEach((e=>{Tp(e,!e.hideProperties)})),this.drawScreen());else if(e.altKey&&"KeyS"===e.code)this.isReadOnly||0!==this.selectedClasses.length&&(this.selectedClasses.forEach((e=>{Cp(e,!e.hideStereotypes)})),this.drawScreen());else if(e.altKey&&"KeyT"===e.code)this.isReadOnly||0!==this.selectedClasses.length&&(this.selectedClasses.forEach((e=>{xp(e,!e.hideTaggedValues)})),this.drawScreen());else if(e.altKey&&"ArrowDown"===e.code)this.isReadOnly||1!==this.selectedClasses.length||this.handleAddSimpleProperty(this.selectedClasses[0]);else if("ArrowUp"===e.code){const e=this.getSuperTypeLevels(this.selectedClasses,this.diagram,0,1),t=this.layoutTaxonomy(e,this.diagram,!1,!0);t[0].forEach((e=>cp(this.diagram,e))),t[1].forEach((e=>mp(this.diagram,e))),this.drawScreen()}else if("ArrowDown"===e.code){const e=(0,Vt.Z)(this.selectedClasses.flatMap((e=>e.class.value._subclasses.flatMap((e=>new Kd(this.diagram,(0,a.Z)(),hn.create(e)))))),(e=>e.class.value));if(e.length>0){e.forEach((e=>this.ensureClassViewMeetMinDimensions(e)));const t=this.layoutTaxonomy([e,this.selectedClasses],this.diagram,!1,!1);t[0].forEach((e=>cp(this.diagram,e))),t[1].forEach((e=>mp(this.diagram,e)))}this.drawScreen()}}mouseup(e){if(!this.isReadOnly)switch(this.interactionMode){case wp.LAYOUT:this.diagram.generalizationViews.forEach((e=>vp(e))),this.diagram.associationViews.forEach((e=>vp(e))),this.diagram.propertyViews.forEach((e=>vp(e)));break;case wp.ADD_CLASS:{const t=this.canvasCoordinateToModelCoordinate(this.eventCoordinateToCanvasCoordinate(new Hd(e.x,e.y)));this.onAddClassViewClick(t),this.changeMode(wp.LAYOUT,Lp.NONE);break}case wp.ZOOM_IN:{const t=Math.round(100*this.zoom);let s;s=t<=Mp[0]-10?10*Math.floor(t/10)+10:t>=Mp[Mp.length-1]?100*Math.floor(t/100)+100:H(Mp.find((e=>e>t))),this.zoomPoint(s/100,new Hd(e.x,e.y));break}case wp.ZOOM_OUT:{const t=Math.round(100*this.zoom);let s;s=t<=Mp[0]?10*Math.ceil(t/10)-10:t>=Mp[Mp.length-1]+100?100*Math.ceil(t/100)-100:H((0,vd.Z)(Mp,(e=>e<t))),this.zoomPoint(s/100,new Hd(e.x,e.y));break}case wp.ADD_RELATIONSHIP:if(this.startClassView&&this.selectionStart&&this.handleAddRelationship){const t=this.canvasCoordinateToModelCoordinate(this.eventCoordinateToCanvasCoordinate(new Hd(e.x,e.y)));for(let e=this.diagram.classViews.length-1;e>=0;e--){const s=this.diagram.classViews[e];if(s.contains(t.x,t.y)){const e=this.handleAddRelationship(this.startClassView,s);e&&(Sp(e.from,-(this.startClassView.position.x+this.startClassView.rectangle.width/2-this.selectionStart.x)),Np(e.from,-(this.startClassView.position.y+this.startClassView.rectangle.height/2-this.selectionStart.y)),Sp(e.to,-(s.position.x+s.rectangle.width/2-t.x)),Np(e.to,-(s.position.y+s.rectangle.height/2-t.y)))}}this.changeMode(wp.LAYOUT,Lp.NONE)}}this.setLeftClick(!1),this.setMiddleClick(!1),this.setRightClick(!1),this.setSelectedClassCorner(void 0),this.setSelectionStart(void 0),this.drawScreen()}mousedblclick(e){if([wp.ADD_RELATIONSHIP,wp.ADD_CLASS,wp.ZOOM_IN,wp.ZOOM_OUT].includes(this.interactionMode))return;const t=this.canvasCoordinateToModelCoordinate(this.eventCoordinateToCanvasCoordinate(new Hd(e.x,e.y)));if(this.mouseOverClassProperty&&this.onClassPropertyDoubleClick)return void this.onClassPropertyDoubleClick(this.mouseOverClassProperty,t,void 0);if(this.mouseOverClassName&&this.onClassNameDoubleClick)return void this.onClassNameDoubleClick(this.mouseOverClassName,t);const s=this.diagram.classViews.find((e=>e.contains(t.x,t.y)));s&&this.onClassViewDoubleClick?this.onClassViewDoubleClick(s,t):this.mouseOverPropertyHolderViewLabel&&this.onClassPropertyDoubleClick?this.onClassPropertyDoubleClick(this.mouseOverPropertyHolderViewLabel.property.value,t,this.mouseOverPropertyHolderViewLabel):this.onBackgroundDoubleClick&&this.onBackgroundDoubleClick(t)}mousedown(e){this.setSelectionStart(void 0),this.setSelectedClassCorner(void 0),this.setSelectedPropertyOrAssociation(void 0),this.setSelectedInheritance(void 0),this.selection=void 0,this.selectedClassProperty=void 0,this.selectedPoint=void 0,this.startClassView=void 0;const t=this.eventCoordinateToCanvasCoordinate(new Hd(e.x,e.y)),s=this.canvasCoordinateToModelCoordinate(t);if(0===e.button)switch(this.setLeftClick(!0),this.interactionMode){case wp.PAN:return void(this.positionBeforeLastMove=new Hd(e.x,e.y));case wp.LAYOUT:for(let e=this.diagram.classViews.length-1;e>=0;e--){const t=this.diagram.classViews[e];if(ch(t).contains(s.x,s.y)){this.setSelectedClasses([]),this.setSelectedClassCorner(this.diagram.classViews[e]),this.isReadOnly||lp(this.diagram,this.reorderDiagramDomain(H(this.selectedClassCorner),this.diagram));break}}if(!this.selectedClassCorner)if(this.mouseOverClassProperty)this.selectedClassProperty={property:this.mouseOverClassProperty,selectionPoint:s},this.setSelectedClasses([]);else{let e=!1;for(let i=this.diagram.classViews.length-1;i>=0;i--){const n=this.diagram.classViews[i];if(n.contains(s.x,s.y)){0!==this.selectedClasses.length&&-1!==this.selectedClasses.indexOf(n)||this.setSelectedClasses([n]),this.isReadOnly||lp(this.diagram,this.reorderDiagramDomain(this.selectedClasses[0],this.diagram)),this.clickX=t.x/this.zoom-this.screenOffset.x,this.clickY=t.y/this.zoom-this.screenOffset.y,this._selectedClassesInitialPositions=this.selectedClasses.map((e=>({classView:e,oldPos:new Hd(e.position.x,e.position.y)}))),e=!0;break}}if(e||this.setSelectedClasses([]),!this.selectedClasses.length){for(const e of this.diagram.generalizationViews){const t=Ip(e,s.x,s.y,this.zoom,!this.isReadOnly);if(t){this.selectedPoint=t,this.setSelectedInheritance(e);break}}if(!this.selectedPoint)for(const e of this.diagram.associationViews){const t=Ip(e,s.x,s.y,this.zoom,!this.isReadOnly);if(t){this.selectedPoint=t,this.setSelectedPropertyOrAssociation(e);break}}if(!this.selectedPoint)for(const e of this.diagram.propertyViews){const t=Ip(e,s.x,s.y,this.zoom,!this.isReadOnly);if(t){this.selectedPoint=t,this.setSelectedPropertyOrAssociation(e);break}}this.selectedPoint||this.setSelectionStart(s)}}break;case wp.ADD_RELATIONSHIP:this.setSelectionStart(s),this.startClassView=void 0;for(let e=this.diagram.classViews.length-1;e>=0;e--){const t=this.diagram.classViews[e];t.contains(s.x,s.y)&&(this.startClassView=t)}this.startClassView||this.changeMode(wp.LAYOUT,Lp.NONE)}else{if(1===e.button)return this.setMiddleClick(!0),void(this.positionBeforeLastMove=new Hd(e.x,e.y));if(2===e.button)return this.setRightClick(!0),this.positionBeforeLastMove=new Hd(e.x,e.y),void(this.mouseOverClassView&&(this.onClassViewRightClick(this.mouseOverClassView,s),this.setRightClick(!1)))}this.clearScreen(),this.drawAll()}mousewheel(e){if(e.preventDefault(),e.stopImmediatePropagation(),Math.abs(e.deltaY)<=Math.abs(e.deltaX))return;const t=this.zoom-e.deltaY/120*.05;this.executeZoom(t,new Hd(e.x,e.y))}mousemove(e){if(this.cursorPosition=new Hd(e.x,e.y),this.rightClick||this.middleClick||this.leftClick&&this.interactionMode===wp.PAN)this.screenOffset=new Hd(this.screenOffset.x+(e.x-this.positionBeforeLastMove.x)/this.zoom,this.screenOffset.y+(e.y-this.positionBeforeLastMove.y)/this.zoom),this.positionBeforeLastMove=new Hd(e.x,e.y),this.clearScreen(),this.drawAll();else if(this.leftClick){const t=this.eventCoordinateToCanvasCoordinate(new Hd(e.x,e.y)),s=this.canvasCoordinateToModelCoordinate(t);switch(this.interactionMode){case wp.LAYOUT:if(this.selectedClassCorner&&(yp(this.selectedClassCorner,new Yd(s.x-this.selectedClassCorner.position.x,s.y-this.selectedClassCorner.position.y)),Pp(this.selectedClassCorner),this.drawClassView(this.selectedClassCorner),this.drawScreen()),!this.selectionStart&&this.selectedClasses.length&&!this.isReadOnly){let e=0,s=0;this.selectedClasses.forEach(((i,n)=>{const a=this._selectedClassesInitialPositions.length>n?this._selectedClassesInitialPositions[n]:void 0;if(a){const n=t.x/this.zoom-this.screenOffset.x-(this.clickX-a.oldPos.x),r=t.y/this.zoom-this.screenOffset.y-(this.clickY-a.oldPos.y);e=i.position.x-n,s=i.position.y-r,Rp(i,new Hd(n,r)),Pp(i)}})),this.potentiallyShiftRelationships(this.diagram.associationViews,this.selectedClasses,e,s),this.potentiallyShiftRelationships(this.diagram.propertyViews,this.selectedClasses,e,s),this.potentiallyShiftRelationships(this.diagram.generalizationViews,this.selectedClasses,e,s),this.drawScreen()}if(this.selectedPoint&&(this.selectedPropertyOrAssociation?Ap(this.selectedPropertyOrAssociation,this.selectedPoint,s):this.selectedInheritance&&Ap(this.selectedInheritance,this.selectedPoint,s),this.selectedPoint=s,this.drawScreen()),this.selectionStart){this.clearScreen(),this.drawAll();const e=this.modelCoordinateToCanvasCoordinate(this.selectionStart);this.ctx.fillStyle=this.selectionBoxBorderColor,this.ctx.fillRect(e.x,e.y,t.x-e.x,t.y-e.y),this.ctx.strokeRect(e.x,e.y,t.x-e.x,t.y-e.y);const s=(t.x-e.x)/this.zoom,i=(t.y-e.y)/this.zoom;this.selection=new Wd(new Hd(s>0?this.selectionStart.x:this.selectionStart.x+s,i>0?this.selectionStart.y:this.selectionStart.y+i),new Yd(Math.abs(s),Math.abs(i))),this.setSelectedClasses([]);for(const e of this.diagram.classViews)(dh(this.selection,e)||dh(e,this.selection))&&this.setSelectedClasses([...this.selectedClasses,e])}break;case wp.ADD_RELATIONSHIP:if(this.selectionStart&&this.startClassView){this.clearScreen(),this.drawBoundingBox();const e=this.modelCoordinateToCanvasCoordinate(this.selectionStart);this.ctx.moveTo(e.x,e.y),this.ctx.lineTo(t.x,t.y),this.ctx.stroke(),this.drawDiagram()}}}else{this.drawScreen();const t=this.eventCoordinateToCanvasCoordinate(new Hd(e.x,e.y)),s=this.canvasCoordinateToModelCoordinate(t);this.setMouseOverClassView(void 0),this.setMouseOverClassName(void 0),this.setMouseOverClassCorner(void 0),this.setMouseOverClassProperty(void 0),this.setMouseOverPropertyHolderViewLabel(void 0);for(const e of this.diagram.classViews.slice().reverse())if(e.contains(s.x,s.y)){this.setMouseOverClassView(e),ch(e).contains(s.x,s.y)&&this.setMouseOverClassCorner(e);const i=e.class.value;let n=e.position.y+this.classViewSpaceY;n+=e.hideStereotypes?0:i.stereotypes.length*this.lineHeight;const a=this.computeClassNameWidth(e);new Wd(this.modelCoordinateToCanvasCoordinate(new Hd(e.position.x+(e.rectangle.width-a)/2,n)),new Yd(a,this.lineHeight)).contains(t.x,t.y)&&this.setMouseOverClassName(e),n+=this.lineHeight,n+=e.hideTaggedValues?0:i.taggedValues.length*this.lineHeight,n+=2*this.classViewSpaceY;for(const s of jd(i))this.hasPropertyView(e,s)||(this.ctx.font=`${(this.fontSize-1)*this.zoom}px ${this.fontFamily}`,new Wd(this.modelCoordinateToCanvasCoordinate(new Hd(e.position.x+this.classViewSpaceX,n)),new Yd(this.drawClassViewProperty(e,s,0,0,!0)*this.zoom,this.lineHeight*this.zoom)).contains(t.x,t.y)&&this.setMouseOverClassProperty(s),n+=this.lineHeight);break}const i=[...this.diagram.propertyViews,...this.diagram.associationViews];for(const e of i){const t=Jd.pruneUnnecessaryInsidePoints(e.buildFullPath(),e.from.classView.value,e.to.classView.value);if(this.drawLinePropertyText(t[t.length-2],t[t.length-1],e.to.classView.value,e.property.value,!1).contains(s.x,s.y)){this.setMouseOverPropertyHolderViewLabel(e);break}}}}getSuperTypeLevels(e,t,s,i){if(e.length){const n=(0,Vt.Z)(e.flatMap((e=>e.class.value.generalizations.map((e=>new Kd(t,(0,a.Z)(),hn.create(Md(e.value,Ji))))))),(e=>e.class.value));if(n.forEach((e=>this.ensureClassViewMeetMinDimensions(e))),-1===i||s<i){const a=this.getSuperTypeLevels(n,t,s+1,i);return a.push(e),a}return[e]}return[]}layoutTaxonomy(e,t,s,i){return e.reverse(),[e.flatMap(((t,n)=>{let a=0,r=0,o=0,l=0;if(n>0){const t=e[n-1];if(t.length){const e=[...t].sort(((e,t)=>e.position.x-t.position.x));o=e[0].position.x,a=e[e.length-1].position.x+e[e.length-1].rectangle.width-e[0].position.x;const s=[...t].sort(((e,t)=>e.position.y-t.position.y));l=s[0].position.y,r=s[s.length-1].position.y+s[s.length-1].rectangle.height-s[0].position.y}}const c=Math.max(...t.map((e=>e.rectangle.height))),d=o+a/2-t.map((e=>e.rectangle.width)).reduce(((e,t)=>e+t+10))/2,h=i?l-c-30:l+r+30;return(s||n>0)&&(Rp(t[0],new Hd(d,h)),t.forEach(((e,s)=>{if(s>0){const i=t[s-1];Rp(e,new Hd(i.position.x+i.rectangle.width+10,h))}}))),t})),(i?e:e.slice().reverse()).slice(0,e.length-1).flatMap(((s,i)=>s.flatMap((s=>e[i+1].flatMap((e=>s.class.value.generalizations.map((e=>e.value.rawType)).includes(e.class.value)?new th(t,s,e):[]))))))]}}class kp{_UUID=(0,a.Z)();tag;value;constructor(e,t){this.tag=e,this.value=t}get hashCode(){return Bi([$i.TAGGED_VALUE,this.tag.pointerHashCode,this.value])}}class Up extends cn{ownerReference;value;constructor(e,t){super(e),this.ownerReference=e,this.value=t}get pointerHashCode(){return[$i.TAG_POINTER,this.value.value,this.ownerReference.valueForSerialization??""].map(Vi).join(",")}}class Gp extends Up{ownerReference;constructor(e){const t=hn.create(e._OWNER);super(t,e),this.ownerReference=t}static create(e){return new Gp(e)}}class Vp extends cn{ownerReference;value;constructor(e,t){super(e),this.ownerReference=e,this.value=t}get pointerHashCode(){return[$i.STEREOTYPE_POINTER,this.value.value,this.ownerReference.valueForSerialization??""].map(Vi).join(",")}}class Bp extends Vp{ownerReference;constructor(e){const t=hn.create(e._OWNER);super(t,e),this.ownerReference=t}static create(e){return new Bp(e)}}class $p extends Zi{_generatedMilestonedProperties=[];properties;derivedProperties=[];constructor(e){super(e);const t=[ip(sp(),sp()),ip(sp(),sp())];t[0]._OWNER=this,t[1]._OWNER=this,this.properties=t}dispose(){super.dispose();const[e,t]=this.properties;if(e.genericType.value.rawType instanceof Ji&&t.genericType.value.rawType instanceof Ji){const s=K(e.genericType.value.rawType,Ji),i=K(t.genericType.value.rawType,Ji);s.propertiesFromAssociations=s.propertiesFromAssociations.filter((e=>e!==t)),i.propertiesFromAssociations=i.propertiesFromAssociations.filter((t=>t!==e))}}get _elementHashCode(){return Bi([$i.ASSOCIATION,this.path,Bi(this.properties),Bi(this.derivedProperties),Bi(this.stereotypes.map((e=>e.pointerHashCode))),Bi(this.taggedValues)])}accept_PackageableElementVisitor(e){return e.visit_Association(this)}}class zp extends Zi{includes=[];classMappings=[];enumerationMappings=[];associationMappings=[];test=[];tests=[];get _elementHashCode(){return Bi([$i.MAPPING,this.path,Bi(this.classMappings),Bi(this.enumerationMappings),Bi(this.associationMappings),Bi(this.test),Bi(this.includes),Bi(this.tests)])}accept_PackageableElementVisitor(e){return e.visit_Mapping(this)}}class Hp extends Zi{p_stereotypes=[];p_tags=[];get _elementHashCode(){return Bi([$i.PROFILE,this.path,Bi(this.p_stereotypes.map((e=>e.value))),Bi(this.p_tags.map((e=>e.value)))])}accept_PackageableElementVisitor(e){return e.visit_Profile(this)}}class Yp extends Zi{pattern="/";owners=[];documentation="";autoActivateUpdates=!0;execution;test;tests=[];postValidations=[];get patternParameters(){return(0,qe.Z)((this.pattern.match(/\{\w+\}/gu)??[]).map((e=>e.substring(1,e.length-1))))}get _elementHashCode(){return Bi([$i.SERVICE,Bi(this.stereotypes.map((e=>e.pointerHashCode))),Bi(this.taggedValues),this.path,this.pattern,Bi(this.owners),this.documentation,this.autoActivateUpdates.toString(),this.execution,this.test??"",Bi(this.tests),Bi(this.postValidations)])}accept_PackageableElementVisitor(e){return e.visit_Service(this)}}class Wp extends Zi{functionName;constructor(e){super(e),this.functionName=e}}class Kp extends Wp{}class Xp extends Kp{returnType;returnMultiplicity;parameters=[];expressionSequence=[];constructor(e,t,s){super(e),this.returnType=t,this.returnMultiplicity=s}get _elementHashCode(){return Bi([$i.FUNCTION,this.path,Bi(this.parameters),this.returnType.valueForSerialization??"",Bi(this.taggedValues),Bi(this.stereotypes.map((e=>e.pointerHashCode))),Yi(void 0,this.expressionSequence)])}accept_PackageableElementVisitor(e){return e.visit_ConcreteFunctionDefinition(this)}}class Zp extends Zi{includes=[]}class qp extends Zp{sections=[];get _elementHashCode(){return Bi([$i.FLAT_DATA,this.path,Bi(this.includes.map((e=>e.valueForSerialization??""))),Bi(this.sections)])}accept_PackageableElementVisitor(e){return e.visit_FlatData(this)}}class Jp extends Zi{runtimeValue;get _elementHashCode(){return Bi([$i.PACKAGEABLE_RUNTIME,this.path,this.runtimeValue])}accept_PackageableElementVisitor(e){return e.visit_PackageableRuntime(this)}}class Qp extends Zi{connectionValue;get _elementHashCode(){return Bi([$i.PACKAGEABLE_CONNECTION,this.path,this.connectionValue])}accept_PackageableElementVisitor(e){return e.visit_PackageableConnection(this)}}class em extends Zi{}class tm extends em{type;generationOutputPath;scopeElements=[];configurationProperties=[];get _elementHashCode(){return Bi([$i.FILE_GENERATION,this.path,this.type,this.generationOutputPath??"",Bi(this.scopeElements.map((e=>e instanceof dn?e.valueForSerialization??"":e))),Bi(this.configurationProperties)])}accept_PackageableElementVisitor(e){return e.visit_FileGenerationSpecification(this)}}class sm extends Zi{generationNodes=[];fileGenerations=[];findGenerationElementById(e){return this.generationNodes.find((t=>t.id===e))?.generationElement.value}get _elementHashCode(){return Bi([$i.GENERATION_TREE,this.path,Bi(this.generationNodes),Bi(this.fileGenerations.map((e=>Wi(be.FILE_GENERATION,e.valueForSerialization??""))))])}accept_PackageableElementVisitor(e){return e.visit_GenerationSpecification(this)}}class im extends Zp{schemas=[];joins=[];filters=[];get _elementHashCode(){return Bi([$i.DATABASE,this.path,Bi(this.includes.map((e=>e.valueForSerialization??""))),Bi(this.schemas),Bi(this.joins),Bi(this.filters)])}accept_PackageableElementVisitor(e){return e.visit_Database(this)}}class nm{_class;index=new Map;constructor(e){this._class=e}getElementClass(){return this._class}get elements(){return Array.from(this.index.values())}getElement(e){return this.index.get(e)}setElement(e,t){this.index.set(e,t)}deleteElement(e){this.index.delete(e)}renameElement(e,t){const s=this.getElement(e);s&&(this.deleteElement(e),this.setElement(t,s))}}class am extends Zi{data;get hashCode(){return Bi([$i.DATA_ELEMENT,this.path,Bi(this.stereotypes.map((e=>e.pointerHashCode))),Bi(this.taggedValues),this.data])}accept_PackageableElementVisitor(e){return e.visit_DataElement(this)}}const rm=new Set([Zi,qi,Qi,Qu,Ji,$p,en,Xp,Hp,sn,tn,class extends Zi{sections=[];get _elementHashCode(){return Bi([$i.SECTION_INDEX,this.path,Bi(this.sections)])}accept_PackageableElementVisitor(e){return e.visit_SectionIndex(this)}},Zp,zp,Qp,Jp,Yp,sm,tm,am]);class om{root;_origin;extensions=[];elementSectionIndex=new Map;sectionIndicesIndex=new Map;profilesIndex=new Map;typesIndex=new Map;associationsIndex=new Map;functionsIndex=new Map;storesIndex=new Map;mappingsIndex=new Map;connectionsIndex=new Map;runtimesIndex=new Map;servicesIndex=new Map;generationSpecificationsIndex=new Map;fileGenerationsIndex=new Map;dataElementsIndex=new Map;constructor(e,t,s){this.root=new nn(e),this.extensions=this.createGraphExtensions(t),this._origin=s}createGraphExtensions(e){return e.map((e=>{if(rm.has(e))throw new k("Pure graph extension not allowed for the specified class. Consider removing this extension from plugins.");return new nm(e)}))}get ownSectionIndices(){return Array.from(this.sectionIndicesIndex.values())}get ownProfiles(){return Array.from(this.profilesIndex.values())}get ownEnumerations(){return Array.from(this.typesIndex.values()).filter(Y(en))}get ownMeasures(){return Array.from(this.typesIndex.values()).filter(Y(sn))}get ownClasses(){return Array.from(this.typesIndex.values()).filter(Y(Ji))}get ownTypes(){return Array.from(this.typesIndex.values())}get ownAssociations(){return Array.from(this.associationsIndex.values())}get ownFunctions(){return Array.from(this.functionsIndex.values())}get ownStores(){return Array.from(this.storesIndex.values())}get ownFlatDatas(){return Array.from(this.storesIndex.values()).filter(Y(qp))}get ownDatabases(){return Array.from(this.storesIndex.values()).filter(Y(im))}get ownMappings(){return Array.from(this.mappingsIndex.values())}get ownServices(){return Array.from(this.servicesIndex.values())}get ownRuntimes(){return Array.from(this.runtimesIndex.values())}get ownConnections(){return Array.from(this.connectionsIndex.values())}get ownFileGenerations(){return Array.from(this.fileGenerationsIndex.values())}get ownDataElements(){return Array.from(this.dataElementsIndex.values())}get ownGenerationSpecifications(){return Array.from(this.generationSpecificationsIndex.values())}get ownTestables(){return[...this.ownServices,...this.ownMappings]}get origin(){return this._origin}setOrigin(e){if(this._origin)throw new k("SDLC pointer has already been set for model.");this._origin=e}getExtensionElements(e){return this.getExtensionForElementClass(e).elements}getExtensionForElementClass(e){const t=this.extensions.filter((t=>t.getElementClass()===e));if(0===t.length)throw new U("Can't find graph extension for the specified element class: no compatible graph extensions available from plugins");if(t.length>1)throw new k("Found multiple extensions for the specified element class");return t[0]}getOwnNullableSection=e=>this.elementSectionIndex.get(e);getOwnNullableSectionIndex=e=>this.sectionIndicesIndex.get(e);getOwnNullableProfile=e=>this.profilesIndex.get(e);getOwnNullableType=e=>this.typesIndex.get(e);getOwnNullableClass=e=>{const t=this.getOwnNullableType(e);return t instanceof Ji?t:void 0};getOwnNullableEnumeration=e=>{const t=this.getOwnNullableType(e);return t instanceof en?t:void 0};getOwnNullableMeasure=e=>{const t=this.getOwnNullableType(e);return t instanceof sn?t:void 0};getOwnNullableAssociation=e=>this.associationsIndex.get(e);getOwnNullableFunction=e=>this.functionsIndex.get(e);getOwnNullableStore=e=>this.storesIndex.get(e);getOwnNullableMapping=e=>this.mappingsIndex.get(e);getOwnNullableConnection=e=>this.connectionsIndex.get(e);getOwnNullableRuntime=e=>this.runtimesIndex.get(e);getOwnNullableService=e=>this.servicesIndex.get(e);getOwnNullableGenerationSpecification=e=>this.generationSpecificationsIndex.get(e);getOwnNullableFileGeneration=e=>this.fileGenerationsIndex.get(e);getOwnNullableDataElement=e=>this.dataElementsIndex.get(e);getOwnSectionIndex=e=>H(this.getOwnNullableSectionIndex(e),`Can't find section index '${e}'`);getOwnProfile=e=>H(this.getOwnNullableProfile(e),`Can't find profile '${e}'`);getOwnType=e=>H(this.getOwnNullableType(e),`Can't find type '${e}'`);getOwnClass=e=>H(this.getOwnNullableClass(e),`Can't find class '${e}'`);getOwnEnumeration=e=>H(this.getOwnNullableEnumeration(e),`Can't find enumeration '${e}'`);getOwnMeasure=e=>H(this.getOwnNullableMeasure(e),`Can't find measure '${e}'`);getOwnAssociation=e=>H(this.getOwnNullableAssociation(e),`Can't find association '${e}'`);getOwnFunction=e=>H(this.getOwnNullableFunction(e),`Can't find function '${e}'`);getOwnStore=e=>H(this.getOwnNullableStore(e),`Can't find store '${e}'`);getOwnDatabase=e=>K(this.getOwnNullableStore(e),im,`Can't find database '${e}'`);getOwnFlatDataStore=e=>K(this.getOwnNullableStore(e),qp,`Can't find flat-data store '${e}'`);getOwnMapping=e=>H(this.getOwnNullableMapping(e),`Can't find mapping '${e}'`);getOwnConnection=e=>H(this.getOwnNullableConnection(e),`Can't find connection '${e}'`);getOwnRuntime=e=>H(this.getOwnNullableRuntime(e),`Can't find runtime '${e}'`);getOwnService=e=>H(this.getOwnNullableService(e),`Can't find service '${e}'`);getOwnGenerationSpecification=e=>H(this.getOwnNullableGenerationSpecification(e),`Can't find generation specification '${e}'`);getOwnFileGeneration=e=>H(this.getOwnNullableFileGeneration(e),`Can't find file generation '${e}'`);getOwnDataElement=e=>H(this.getOwnNullableDataElement(e),`Can't find data element '${e}'`);getOwnNullableExtensionElement(e,t){return this.getExtensionForElementClass(t).getElement(e)}setOwnSection(e,t){this.elementSectionIndex.set(e,t)}setOwnSectionIndex(e,t){this.sectionIndicesIndex.set(e,t)}setOwnProfile(e,t){this.profilesIndex.set(e,t)}setOwnType(e,t){this.typesIndex.set(e,t)}setOwnAssociation(e,t){this.associationsIndex.set(e,t)}setOwnFunction(e,t){this.functionsIndex.set(e,t)}setOwnStore(e,t){this.storesIndex.set(e,t)}setOwnMapping(e,t){this.mappingsIndex.set(e,t)}setOwnConnection(e,t){this.connectionsIndex.set(e,t)}setOwnRuntime(e,t){this.runtimesIndex.set(e,t)}setOwnService(e,t){this.servicesIndex.set(e,t)}setOwnGenerationSpecification(e,t){this.generationSpecificationsIndex.set(e,t)}setOwnFileGeneration(e,t){this.fileGenerationsIndex.set(e,t)}setOwnDataElement(e,t){this.dataElementsIndex.set(e,t)}setOwnElementInExtension(e,t,s){this.getExtensionForElementClass(s).setElement(e,t)}get allOwnElements(){return[...this.ownProfiles,...this.ownEnumerations,...this.ownMeasures,...this.ownClasses,...this.ownAssociations,...this.ownFunctions,...this.ownStores,...this.ownMappings,...this.ownServices,...this.ownRuntimes,...this.ownConnections,...this.ownGenerationSpecifications,...this.ownFileGenerations,...this.ownDataElements,...this.extensions.flatMap((e=>e.elements))]}async dispose(){this.allOwnElements.length&&await Promise.all(this.allOwnElements.map((e=>L((()=>{e.dispose()})))))}getNullablePackage=e=>e?V((()=>bd(this.root,e,!1,void 0))):this.root;getOwnNullableElement(e,t){let s=this.sectionIndicesIndex.get(e)??this.typesIndex.get(e)??this.profilesIndex.get(e)??this.associationsIndex.get(e)??this.functionsIndex.get(e)??this.storesIndex.get(e)??this.mappingsIndex.get(e)??this.servicesIndex.get(e)??this.runtimesIndex.get(e)??this.connectionsIndex.get(e)??this.fileGenerationsIndex.get(e)??this.dataElementsIndex.get(e)??this.generationSpecificationsIndex.get(e);if(!s)for(const t of this.extensions){const i=t.getElement(e);if(i){s=i;break}}return t&&!s?this.getNullablePackage(e):s}addOwnElement(e,t){Pd(t?Dd(this,t,void 0):this.root,e),e instanceof zp?this.setOwnMapping(e.path,e):e instanceof Zp?this.setOwnStore(e.path,e):e instanceof qi?this.setOwnType(e.path,e):e instanceof $p?this.setOwnAssociation(e.path,e):e instanceof Hp?this.setOwnProfile(e.path,e):e instanceof Xp?this.setOwnFunction(e.path,e):e instanceof Yp?this.setOwnService(e.path,e):e instanceof Qp?this.setOwnConnection(e.path,e):e instanceof Jp?this.setOwnRuntime(e.path,e):e instanceof tm?this.setOwnFileGeneration(e.path,e):e instanceof sm?this.setOwnGenerationSpecification(e.path,e):e instanceof am?this.setOwnDataElement(e.path,e):e instanceof nn||this.getExtensionForElementClass(y(e)).setElement(e.path,e)}deleteOwnElement(e){e.package&&wd(e.package,e),e instanceof zp?this.mappingsIndex.delete(e.path):e instanceof Zp?this.storesIndex.delete(e.path):e instanceof qi?(this.typesIndex.delete(e.path),e instanceof sn&&(e.canonicalUnit&&this.typesIndex.delete(e.canonicalUnit.path),e.nonCanonicalUnits.forEach((e=>this.typesIndex.delete(e.path))))):e instanceof $p?this.associationsIndex.delete(e.path):e instanceof Hp?this.profilesIndex.delete(e.path):e instanceof Xp?this.functionsIndex.delete(e.path):e instanceof Yp?this.servicesIndex.delete(e.path):e instanceof Jp?this.runtimesIndex.delete(e.path):e instanceof Qp?this.connectionsIndex.delete(e.path):e instanceof tm?this.fileGenerationsIndex.delete(e.path):e instanceof sm?this.generationSpecificationsIndex.delete(e.path):e instanceof am?this.dataElementsIndex.delete(e.path):e instanceof nn?e.children.forEach((e=>this.deleteOwnElement(e))):this.getExtensionForElementClass(y(e)).deleteElement(e.path)}renameOwnElement(e,t,s){if(t===s)return;if(!s)throw new U(`Can't rename element '${t} to '${s}': path is empty'`);if(e instanceof nn&&!Boolean(s.match(/^(?:\w[\w$_-]*)(?:::\w[\w$_-]*)*$/))||!(e instanceof nn)&&!Boolean(s.match(/^(?:\w[\w$_-]*)(?:::\w[\w$_-]*)+$/)))throw new U(`Can't rename element '${t} to '${s}': invalid path'`);if(this.getOwnNullableElement(s,!0))throw new U(`Can't rename element '${t} to '${s}': another element with the same path already existed'`);const[i,n]=yd(s);if(!(e instanceof nn)){const t=this.getNullablePackage(i)??(""!==i?Dd(this,i,void 0):this.root);e.name=n,e instanceof Xp&&(e.functionName=(a=e,(r=e.name).substring(0,r.indexOf((e=>`_${e.parameters.map((e=>`${e.type.value.name}_${kd(e.multiplicity.lowerBound,e.multiplicity.upperBound)}_`)).join("_")}_${e.returnType.value.name}_${kd(e.returnMultiplicity.lowerBound,e.returnMultiplicity.upperBound)}_`)(a))))),e.package!==t&&(e.package&&wd(e.package,e),Pd(t,e))}var a,r;if(e instanceof zp)this.mappingsIndex.delete(t),this.mappingsIndex.set(s,e);else if(e instanceof Zp)this.storesIndex.delete(t),this.storesIndex.set(s,e);else if(e instanceof qi)this.typesIndex.delete(t),this.typesIndex.set(s,e),e instanceof sn&&(e.canonicalUnit&&(this.typesIndex.delete(e.canonicalUnit.path),this.typesIndex.set(e.canonicalUnit.path.replace(t,s),e.canonicalUnit)),e.nonCanonicalUnits.forEach((e=>{this.typesIndex.delete(e.path),this.typesIndex.set(e.path.replace(t,s),e)})));else if(e instanceof $p)this.associationsIndex.delete(t),this.associationsIndex.set(s,e);else if(e instanceof Hp)this.profilesIndex.delete(t),this.profilesIndex.set(s,e);else if(e instanceof Xp)this.functionsIndex.delete(t),this.functionsIndex.set(s,e);else if(e instanceof Yp)this.servicesIndex.delete(t),this.servicesIndex.set(s,e);else if(e instanceof Jp)this.runtimesIndex.delete(t),this.runtimesIndex.set(s,e);else if(e instanceof Qp)this.connectionsIndex.delete(t),this.connectionsIndex.set(s,e);else if(e instanceof tm)this.fileGenerationsIndex.delete(t),this.fileGenerationsIndex.set(s,e);else if(e instanceof am)this.dataElementsIndex.delete(t),this.dataElementsIndex.set(s,e);else if(e instanceof sm)this.generationSpecificationsIndex.delete(t),this.generationSpecificationsIndex.set(s,e);else if(e instanceof nn){const a=new Map;if(e.children.forEach((e=>{a.set(e.path,e)})),e.name=n,!e.package)throw new k("Can't rename root package");const r=e.package;if(r!==this.getNullablePackage(i)){wd(r,e);const t=""!==i?Dd(this,i,void 0):this.root;Pd(t,e)}a.forEach(((e,i)=>{this.renameOwnElement(e,i,i.replace(t,s))}))}else this.getExtensionForElementClass(y(e)).renameElement(t,s)}TEMPORARY__deleteOwnSectionIndex(){this.sectionIndicesIndex.forEach((e=>{e.setIsDeleted(!0),this.sectionIndicesIndex.delete(e.path)})),this.sectionIndicesIndex=new Map,this.elementSectionIndex=new Map}}class lm{}class cm extends lm{groupId;artifactId;versionId;constructor(e,t,s){super(),this.groupId=e,this.artifactId=t,this.versionId=s}}class dm extends om{constructor(e,t,s){super(t.name,e,s),this.root=t}}const hm=(e,t)=>s=>{for(const i of e.dependencyGraphs){const e=t(i,s);if(e)return e}};class um{roots=[];projectDependencyModelsIndex=new Map;extensionElementClasses;constructor(e){this.extensionElementClasses=e}initialize(e){Array.from(e.entries()).forEach((([e,t])=>{const s=new nn(e);this.roots.push(s),this.projectDependencyModelsIndex.set(e,new dm(this.extensionElementClasses,s,new cm(t.groupId,t.artifactId,t.versionId)))}))}get numberOfDependencies(){return this.projectDependencyModelsIndex.size}get hasDependencies(){return Boolean(this.projectDependencyModelsIndex.size)}get dependencyGraphs(){return Array.from(this.projectDependencyModelsIndex.values())}get allOwnElements(){return this.dependencyGraphs.flatMap((e=>e.allOwnElements))}getOwnNullableSectionIndex=hm(this,((e,t)=>e.getOwnNullableSectionIndex(t)));getOwnNullableProfile=hm(this,((e,t)=>e.getOwnNullableProfile(t)));getOwnNullableType=hm(this,((e,t)=>e.getOwnNullableType(t)));getOwnNullableClass=hm(this,((e,t)=>e.getOwnNullableClass(t)));getOwnNullableEnumeration=hm(this,((e,t)=>e.getOwnNullableEnumeration(t)));getOwnNullableMeasure=hm(this,((e,t)=>e.getOwnNullableMeasure(t)));getOwnNullableAssociation=hm(this,((e,t)=>e.getOwnNullableAssociation(t)));getOwnNullableFunction=hm(this,((e,t)=>e.getOwnNullableFunction(t)));getOwnNullableStore=hm(this,((e,t)=>e.getOwnNullableStore(t)));getOwnNullableMapping=hm(this,((e,t)=>e.getOwnNullableMapping(t)));getOwnNullableConnection=hm(this,((e,t)=>e.getOwnNullableConnection(t)));getOwnNullableRuntime=hm(this,((e,t)=>e.getOwnNullableRuntime(t)));getOwnNullableService=hm(this,((e,t)=>e.getOwnNullableService(t)));getOwnNullableGenerationSpecification=hm(this,((e,t)=>e.getOwnNullableGenerationSpecification(t)));getOwnNullableFileGeneration=hm(this,((e,t)=>e.getOwnNullableFileGeneration(t)));getOwnNullableDataElement=hm(this,((e,t)=>e.getOwnNullableDataElement(t)));getOwnNullableExtensionElement(e,t){for(const s of this.dependencyGraphs){const i=s.getExtensionForElementClass(t).getElement(e);if(i)return i}}get sectionIndices(){return this.dependencyGraphs.flatMap((e=>e.ownSectionIndices))}get profiles(){return this.dependencyGraphs.flatMap((e=>e.ownProfiles))}get enumerations(){return this.dependencyGraphs.flatMap((e=>e.ownEnumerations))}get measures(){return this.dependencyGraphs.flatMap((e=>e.ownMeasures))}get classes(){return this.dependencyGraphs.flatMap((e=>e.ownClasses))}get types(){return this.dependencyGraphs.flatMap((e=>e.ownTypes))}get associations(){return this.dependencyGraphs.flatMap((e=>e.ownAssociations))}get functions(){return this.dependencyGraphs.flatMap((e=>e.ownFunctions))}get stores(){return this.dependencyGraphs.flatMap((e=>e.ownStores))}get databases(){return this.dependencyGraphs.flatMap((e=>e.ownDatabases))}get mappings(){return this.dependencyGraphs.flatMap((e=>e.ownMappings))}get services(){return this.dependencyGraphs.flatMap((e=>e.ownServices))}get runtimes(){return this.dependencyGraphs.flatMap((e=>e.ownRuntimes))}get connections(){return this.dependencyGraphs.flatMap((e=>e.ownConnections))}get dataElements(){return this.dependencyGraphs.flatMap((e=>e.ownDataElements))}get generationSpecifications(){return this.dependencyGraphs.flatMap((e=>e.ownGenerationSpecifications))}get fileGenerations(){return this.dependencyGraphs.flatMap((e=>e.ownFileGenerations))}getExtensionElements(e){return this.dependencyGraphs.flatMap((t=>t.getExtensionElements(e)))}getModel(e){return H(this.projectDependencyModelsIndex.get(e),`Can't find dependency model with project ID '${e}'`)}getNullableElement(e,t){const s=this.dependencyGraphs.find((s=>Boolean(s.getOwnNullableElement(e,t))));return s?.getOwnNullableElement(e,t)}}class pm extends Zp{static NAME="ModelStore";static INSTANCE=new pm;constructor(){super(pm.NAME)}accept_PackageableElementVisitor(e){throw new U}}class mm extends om{primitiveTypesIndex=new Map;get primitiveTypes(){return Array.from(this.primitiveTypesIndex.values())}constructor(e){super(xe.CORE,e),this.initializePrimitiveTypes(),this.setOwnStore(pm.NAME,pm.INSTANCE)}get allOwnElements(){return[...super.allOwnElements,...this.primitiveTypes]}initializePrimitiveTypes(){[Qu.STRING,Qu.BOOLEAN,Qu.BINARY,Qu.NUMBER,Qu.INTEGER,Qu.FLOAT,Qu.DECIMAL,Qu.DATE,Qu.STRICTDATE,Qu.DATETIME,Qu.STRICTTIME,Qu.LATESTDATE].forEach((e=>{this.primitiveTypesIndex.set(e.path,e),this.setOwnType(e.path,e)}))}}class _m extends om{autoImports=[];constructor(e){super(xe.SYSTEM,e)}initializeAutoImports(){this.autoImports=Ie.map((e=>K(this.getOwnNullableElement(e,!0),nn,`Can't find auto-import package '${e}'`)))}}class gm extends om{constructor(e){super(xe.MODEL_GENERATION,e)}}class Em extends om{coreModel;systemModel;generationModel;dependencyManager;graphPlugins=[];constructor(e,t,s){const i=s.flatMap((e=>e.getExtraPureGraphExtensionClasses?.()??[]));super(xe.MAIN,i),this.graphPlugins=s,this.coreModel=e,this.systemModel=t,this.generationModel=new gm(i),this.dependencyManager=new um(i)}get autoImports(){return this.systemModel.autoImports}get primitiveTypes(){return this.coreModel.primitiveTypes}get sectionIndices(){return[...this.coreModel.ownSectionIndices,...this.systemModel.ownSectionIndices,...this.dependencyManager.sectionIndices,...this.ownSectionIndices,...this.generationModel.ownSectionIndices]}get profiles(){return[...this.coreModel.ownProfiles,...this.systemModel.ownProfiles,...this.dependencyManager.profiles,...this.ownProfiles,...this.generationModel.ownProfiles]}get enumerations(){return[...this.coreModel.ownEnumerations,...this.systemModel.ownEnumerations,...this.dependencyManager.enumerations,...this.ownEnumerations,...this.generationModel.ownEnumerations]}get measures(){return[...this.coreModel.ownMeasures,...this.systemModel.ownMeasures,...this.dependencyManager.measures,...this.ownMeasures,...this.generationModel.ownMeasures]}get classes(){return[...this.coreModel.ownClasses,...this.systemModel.ownClasses,...this.dependencyManager.classes,...this.ownClasses,...this.generationModel.ownClasses]}get types(){return[...this.coreModel.ownTypes,...this.systemModel.ownTypes,...this.dependencyManager.types,...this.ownTypes,...this.generationModel.ownTypes]}get associations(){return[...this.coreModel.ownAssociations,...this.systemModel.ownAssociations,...this.dependencyManager.associations,...this.ownAssociations,...this.generationModel.ownAssociations]}get functions(){return[...this.coreModel.ownFunctions,...this.systemModel.ownFunctions,...this.dependencyManager.functions,...this.ownFunctions,...this.generationModel.ownFunctions]}get stores(){return[...this.coreModel.ownStores,...this.systemModel.ownStores,...this.dependencyManager.stores,...this.ownStores,...this.generationModel.ownStores]}get databases(){return[...this.coreModel.ownDatabases,...this.systemModel.ownDatabases,...this.dependencyManager.databases,...this.ownDatabases,...this.generationModel.ownDatabases]}get mappings(){return[...this.coreModel.ownMappings,...this.systemModel.ownMappings,...this.dependencyManager.mappings,...this.ownMappings,...this.generationModel.ownMappings]}get services(){return[...this.coreModel.ownServices,...this.systemModel.ownServices,...this.dependencyManager.services,...this.ownServices,...this.generationModel.ownServices]}get runtimes(){return[...this.coreModel.ownRuntimes,...this.systemModel.ownRuntimes,...this.dependencyManager.runtimes,...this.ownRuntimes,...this.generationModel.ownRuntimes]}get connections(){return[...this.coreModel.ownConnections,...this.systemModel.ownConnections,...this.dependencyManager.connections,...this.ownConnections,...this.generationModel.ownConnections]}get dataElements(){return[...this.coreModel.ownDataElements,...this.systemModel.ownDataElements,...this.dependencyManager.dataElements,...this.ownDataElements,...this.generationModel.ownDataElements]}get generationSpecifications(){return[...this.coreModel.ownGenerationSpecifications,...this.systemModel.ownGenerationSpecifications,...this.dependencyManager.generationSpecifications,...this.ownGenerationSpecifications,...this.generationModel.ownGenerationSpecifications]}get fileGenerations(){return[...this.coreModel.ownFileGenerations,...this.systemModel.ownFileGenerations,...this.dependencyManager.fileGenerations,...this.ownFileGenerations,...this.generationModel.ownFileGenerations]}get allElements(){return[...this.coreModel.allOwnElements,...this.systemModel.allOwnElements,...this.dependencyManager.allOwnElements,...this.allOwnElements,...this.generationModel.allOwnElements]}get allOwnTestables(){const e=this.graphPlugins.flatMap((e=>e.getExtraTestablesCollectors?.()??[])).map((e=>e(this)));return[...this.ownTestables].concat(...e)}getPrimitiveType=e=>H(this.coreModel.primitiveTypesIndex.get(e),`Can't find primitive type '${e}'`);getType=e=>H(this.getOwnNullableType(e)??this.generationModel.getOwnNullableType(e)??this.dependencyManager.getOwnNullableType(e)??this.systemModel.getOwnNullableType(e)??this.coreModel.getOwnNullableType(e),`Can't find type '${e}'`);getProfile=e=>H(this.getOwnNullableProfile(e)??this.generationModel.getOwnNullableProfile(e)??this.dependencyManager.getOwnNullableProfile(e)??this.systemModel.getOwnNullableProfile(e),`Can't find profile '${e}'`);getEnumeration=e=>K(this.getType(e),en,`Can't find enumeration '${e}'`);getMeasure=e=>K(this.getType(e),sn,`Can't find measure '${e}'`);getUnit=e=>K(this.getType(e),tn,`Can't find unit '${e}'`);getClass=e=>K(this.getType(e),Ji,`Can't find class '${e}'`);getAssociation=e=>H(this.getOwnNullableAssociation(e)??this.generationModel.getOwnNullableAssociation(e)??this.dependencyManager.getOwnNullableAssociation(e)??this.systemModel.getOwnNullableAssociation(e),`Can't find association '${e}'`);getPropertyOwner=e=>H(this.getOwnNullableAssociation(e)??this.generationModel.getOwnNullableAssociation(e)??this.dependencyManager.getOwnNullableAssociation(e)??this.systemModel.getOwnNullableAssociation(e)??K(this.getType(e),Ji),`Can't find property owner '${e}'`);getFunction=e=>K(this.getOwnNullableFunction(e)??this.generationModel.getOwnNullableFunction(e)??this.dependencyManager.getOwnNullableFunction(e)??this.systemModel.getOwnNullableFunction(e),Xp,`Can't find function '${e}'`);getStore=e=>H(this.getOwnNullableStore(e)??this.generationModel.getOwnNullableStore(e)??this.dependencyManager.getOwnNullableStore(e)??this.systemModel.getOwnNullableStore(e)??this.coreModel.getOwnNullableStore(e),`Can't find store '${e}'`);getFlatDataStore=e=>K(this.getStore(e),qp,`Can't find flat-data store '${e}'`);getDatabase=e=>K(this.getStore(e),im,`Can't find database store '${e}'`);getMapping=e=>H(this.getOwnNullableMapping(e)??this.generationModel.getOwnNullableMapping(e)??this.dependencyManager.getOwnNullableMapping(e)??this.systemModel.getOwnNullableMapping(e),`Can't find mapping '${e}'`);getService=e=>H(this.getOwnNullableService(e)??this.generationModel.getOwnNullableService(e)??this.dependencyManager.getOwnNullableService(e)??this.systemModel.getOwnNullableService(e),`Can't find service '${e}'`);getConnection=e=>H(this.getOwnNullableConnection(e)??this.generationModel.getOwnNullableConnection(e)??this.dependencyManager.getOwnNullableConnection(e)??this.systemModel.getOwnNullableConnection(e),`Can't find connection '${e}'`);getRuntime=e=>H(this.getOwnNullableRuntime(e)??this.generationModel.getOwnNullableRuntime(e)??this.dependencyManager.getOwnNullableRuntime(e)??this.systemModel.getOwnNullableRuntime(e),`Can't find runtime '${e}'`);getGenerationSpecification=e=>H(this.getOwnNullableGenerationSpecification(e)??this.generationModel.getOwnNullableGenerationSpecification(e)??this.dependencyManager.getOwnNullableGenerationSpecification(e)??this.systemModel.getOwnNullableGenerationSpecification(e),`Can't find generation specification '${e}'`);getFileGeneration=e=>H(this.getOwnNullableFileGeneration(e)??this.generationModel.getOwnNullableFileGeneration(e)??this.dependencyManager.getOwnNullableFileGeneration(e)??this.systemModel.getOwnNullableFileGeneration(e),`Can't find file generation '${e}'`);getDataElement=e=>H(this.getOwnNullableDataElement(e)??this.generationModel.getOwnNullableDataElement(e)??this.dependencyManager.getOwnNullableDataElement(e)??this.systemModel.getOwnNullableDataElement(e),`Can't find data element '${e}'`);getExtensionElement(e,t,s){return H(this.getOwnNullableExtensionElement(e,t)??this.generationModel.getOwnNullableExtensionElement(e,t)??this.dependencyManager.getOwnNullableExtensionElement(e,t)??this.systemModel.getOwnNullableExtensionElement(e,t),s??`Can't find element '${e}'`)}getElement=(e,t)=>H(this.getNullableElement(e,t),`Can't find element '${e}'`);getNullableClass=e=>V((()=>this.getClass(e)));getNullableMapping=e=>V((()=>this.getMapping(e)));getNullableService=e=>V((()=>this.getService(e)));getNullableRuntime=e=>V((()=>this.getRuntime(e)));getNullableFileGeneration=e=>V((()=>this.getFileGeneration(e)));getNullableElement(e,t){const s=super.getOwnNullableElement(e)??this.dependencyManager.getNullableElement(e)??this.generationModel.getOwnNullableElement(e)??this.systemModel.getOwnNullableElement(e)??this.coreModel.getOwnNullableElement(e);return t&&!s?this.getNullablePackage(e)??this.dependencyManager.getNullableElement(e,!0)??this.generationModel.getNullablePackage(e)??this.systemModel.getNullablePackage(e):s}getMultiplicity(e,t){let s;return 1===e&&1===t?s=Zu.ONE:0===e&&1===t?s=Zu.ZERO_ONE:0===e&&void 0===t?s=Zu.ZERO_MANY:1===e&&void 0===t?s=Zu.ONE_MANY:0===e&&0===t&&(s=Zu.ZERO),s??new Zu(e,t)}addElement(e,t){const s=Rd(t??"",e.name);if(this.getNullableElement(s,!1))throw new k(`Can't create element '${s}': another element with the same path already existed`);super.addOwnElement(e,t)}deleteElement(e){super.deleteOwnElement(e);const t=this.graphPlugins.flatMap((e=>e.getExtraDeadReferencesCleaners?.()??[]));for(const e of t)e(this)}renameElement(e,t){if(this.getNullableElement(t,!1))throw new k(`Can't rename element '${e.path}' to '${t}': another element with the same path already existed`);super.renameOwnElement(e,e.path,t)}}class fm{_UUID=(0,a.Z)();_OWNER;value;constructor(e,t){this._OWNER=e,this.value=t}}class Tm{_UUID=(0,a.Z)();_OWNER;value;constructor(e,t){this._OWNER=e,this.value=t}}class Cm{sourceId;line;column;startLine;startColumn;endLine;endColumn}(0,He.yu)(Cm,{column:(0,He.Ru)(),endLine:(0,He.Ru)(),endColumn:(0,He.Ru)(),line:(0,He.Ru)(),sourceId:(0,He.Ru)(),startLine:(0,He.Ru)(),startColumn:(0,He.Ru)()});const xm=(0,He.PG)((()=>He.AM),(e=>(e.sourceId=e.source,(0,He.vB)(Cm,e))));class Sm{package;name;tags=[];stereotypes=[]}(0,He.yu)(Sm,{name:(0,He.Ru)(),package:(0,He.Ru)(),stereotypes:(0,He.pb)((0,He.Ru)()),tags:(0,He.pb)((0,He.Ru)())});class Nm{profile;value}(0,He.yu)(Nm,{profile:(0,He.Ru)(),value:(0,He.Ru)()});class Am{profile;value}(0,He.yu)(Am,{profile:(0,He.Ru)(),value:(0,He.Ru)()});class vm{tag;value}(0,He.yu)(vm,{tag:(0,He.Ry)(Am),value:(0,He.Ru)()});class Im{rawType;typeParameter}(0,He.yu)(Im,{rawType:(0,He.jt)((0,He.Ru)()),typeParameter:(0,He.jt)((0,He.Ru)())});class Om{name;stereotypes=[];taggedValues=[];aggregation;multiplicity;genericType}(0,He.yu)(Om,{aggregation:(0,He.Ru)(),genericType:(0,He.Ry)(Im),multiplicity:(0,He.Ru)(),name:(0,He.Ru)(),stereotypes:(0,He.pb)((0,He.Ry)(Nm)),taggedValues:(0,He.pb)((0,He.Ry)(vm))});class ym{package;name;sourceInformation}(0,He.yu)(ym,{name:(0,He.Ru)(),package:(0,He.Ru)(),sourceInformation:xm});class Rm{package;name;sourceInformation;stereotypes=[];taggedValues=[];generalizations=[];properties=[];qualifiedProperties=[]}(0,He.yu)(Rm,{generalizations:(0,He.pb)((0,He.Ry)(Im)),name:(0,He.Ru)(),package:(0,He.Ru)(),properties:(0,He.pb)((0,He.Ry)(Om)),qualifiedProperties:(0,He.pb)((0,He.Ry)(Om)),sourceInformation:xm,stereotypes:(0,He.pb)((0,He.Ry)(Nm)),taggedValues:(0,He.pb)((0,He.Ry)(vm))});class Pm{package;name;enumValues=[]}(0,He.yu)(Pm,{name:(0,He.Ru)(),package:(0,He.Ru)(),enumValues:(0,He.pb)((0,He.Ru)())});class wm{x;y}(0,He.yu)(wm,{x:(0,He.Ru)(),y:(0,He.Ru)()});class Lm{height;width}(0,He.yu)(Lm,{height:(0,He.Ru)(),width:(0,He.Ru)()});class bm{points=[]}(0,He.yu)(bm,{points:(0,He.pb)((0,He.Ry)(wm))});class Dm{id;source;target;geometry}(0,He.yu)(Dm,{geometry:(0,He.Ry)(bm),id:(0,He.Ru)(),source:(0,He.Ru)(),target:(0,He.Ru)()});class Mm{name;owningType}(0,He.yu)(Mm,{name:(0,He.Ru)(),owningType:(0,He.Ru)()});class Fm{id;source;target;property;geometry}(0,He.yu)(Fm,{geometry:(0,He.Ry)(bm),id:(0,He.Ru)(),property:(0,He.Ry)(Mm),source:(0,He.Ru)(),target:(0,He.Ru)()});class jm{id;type;position;rectangleGeometry}(0,He.yu)(jm,{id:(0,He.Ru)(),position:(0,He.Ry)(wm),rectangleGeometry:(0,He.Ry)(Lm),type:(0,He.Ru)()});class km{package;name;stereotypes=[];taggedValues=[];generalizationViews=[];propertyViews=[];typeViews=[];sourceInformation}(0,He.yu)(km,{name:(0,He.Ru)(),generalizationViews:(0,He.pb)((0,He.Ry)(Dm)),package:(0,He.Ru)(),propertyViews:(0,He.pb)((0,He.Ry)(Fm)),sourceInformation:xm,stereotypes:(0,He.pb)((0,He.Ry)(Nm)),taggedValues:(0,He.pb)((0,He.Ry)(vm)),typeViews:(0,He.pb)((0,He.Ry)(jm))});class Um{classes=[];enumerations=[];profiles=[]}(0,He.yu)(Um,{classes:(0,He.pb)((0,He.Ry)(Rm)),enumerations:(0,He.pb)((0,He.Ry)(Pm)),profiles:(0,He.pb)((0,He.Ry)(Sm))});class Gm{name;diagram;domainInfo}(0,He.yu)(Gm,{diagram:(0,He.Ry)(km),name:(0,He.Ru)(),domainInfo:(0,He.jt)((0,He.Ry)(Um))});class Vm{class;enumerations=[];profiles=[];specializations=[]}(0,He.yu)(Vm,{class:(0,He.Ry)(Rm),enumerations:(0,He.pb)((0,He.Ry)(Pm)),profiles:(0,He.pb)((0,He.Ry)(Sm)),specializations:(0,He.pb)((0,He.Ry)(ym))});const Bm=e=>{const t=e.classViews.map((e=>` TypeView ${e.id}(\n type=${e.class.value.path},\n position=(${e.position.x.toFixed(5)}, ${e.position.y.toFixed(5)}),\n width=${e.rectangle.width.toFixed(5)},\n height=${e.rectangle.height.toFixed(5)},\n stereotypesVisible=true,\n attributesVisible=true,\n attributeStereotypesVisible=true,\n attributeTypesVisible=true,\n color=#FFFFCC,\n lineWidth=1.0)`)),s=e.generalizationViews.map(((e,t)=>` GeneralizationView gview_${t}(\n source=${e.from.classView.value.id},\n target=${e.to.classView.value.id},\n points=[${e.buildFullPath().map((e=>`(${e.x.toFixed(5)},${e.y.toFixed(5)})`)).join(",")}],\n label='',\n color=#000000,\n lineWidth=-1.0,\n lineStyle=SIMPLE)`)),i=e.propertyViews.map(((e,t)=>` PropertyView pview_${t}(\n property=${e.property.value._OWNER.path}.${e.property.value.name},\n source=${e.from.classView.value.id},\n target=${e.to.classView.value.id},\n points=[${e.buildFullPath().map((e=>`(${e.x.toFixed(5)},${e.y.toFixed(5)})`)).join(",")}],\n label='',\n propertyPosition=(0.0,0.0),\n multiplicityPosition=(0.0,0.0),\n color=#000000,\n lineWidth=-1.0,\n stereotypesVisible=true,\n nameVisible=true,\n lineStyle=SIMPLE)`));return`Diagram ${e.path}(width=0.0, height=0.0)\n{\n${[...t,...s,...i].join("\n\n")}\n}`},$m=(e,t,s,i)=>{const n=t.getOwnNullableClass(e);if(!n){const[n,a]=yd(e),r=new Ji(a);return Pd(bd(t.root,n,!0,new Map),r),t.setOwnType(e,r),s.set(e,{isStubbed:!0,sourceInformation:i}),r}return n},zm=e=>{if("*"===e)return new Zu(0,void 0);{const t=e.split("..");if(1===t.length)return new Zu(parseInt(H(t[0]),10),parseInt(H(t[0]),10));if(2===t.length)return new Zu(parseInt(H(t[0]),10),"*"===t[1]?void 0:parseInt(H(t[1]),10));throw new Error(`Can't parse multiplicity value '${e}'`)}},Hm=(e,t,s,i)=>{t.taggedValues.forEach((t=>{var i,n;b(e.taggedValues,new kp(Gp.create((i=s.getProfile(t.tag.profile),n=t.tag.value,H(i.p_tags.find((e=>e.value===n)),`Can't find tag '${n}' in profile '${i.path}'`))),t.value))})),t.stereotypes.forEach((t=>{var i,n;b(e.stereotypes,Bp.create((i=s.getProfile(t.profile),n=t.value,H(i.p_stereotypes.find((e=>e.value===n)),`Can't find stereotype '${n}' in profile '${i.path}'`))))})),t.generalizations.filter((e=>Boolean(e.rawType))).forEach((t=>{const n=$m(H(t.rawType),s,i,void 0);b(e.generalizations,Wu.create(new Ku(n))),b(n._subclasses,e)})),t.properties.filter((e=>Boolean(e.genericType.rawType))).forEach((t=>{const n=new Xu(t.name,zm(t.multiplicity),Wu.create(new Ku(s.getOwnNullableEnumeration(H(t.genericType.rawType))??$m(H(t.genericType.rawType),s,i,void 0))),e);n.aggregation="Composite"===t.aggregation?ep.COMPOSITE:"Shared"===t.aggregation?ep.SHARED:void 0,b(e.properties,n)})),t.qualifiedProperties.filter((e=>e.genericType.rawType)).forEach((t=>{b(e.derivedProperties,new Hu(t.name,zm(t.multiplicity),Wu.create(new Ku(s.getOwnNullableEnumeration(H(t.genericType.rawType))??$m(H(t.genericType.rawType),s,i,void 0))),e))}))},Ym=e=>{const t=new Em(new mm([]),new _m([]),[]),s=new Map;if(e.domainInfo){const i=e.domainInfo;i.classes.forEach((e=>{const i=new Ji(e.name);Pd(bd(t.root,e.package,!0,new Map),i),t.setOwnType(i.path,i),s.set(i.path,{sourceInformation:e.sourceInformation,isStubbed:!1})})),i.profiles.forEach((e=>{const s=new Hp(e.name);Pd(bd(t.root,e.package,!0,new Map),s),t.setOwnProfile(s.path,s),e.tags.forEach((e=>b(s.p_tags,new fm(s,e)))),e.stereotypes.forEach((e=>b(s.p_stereotypes,new Tm(s,e))))})),i.enumerations.forEach((e=>{const s=new en(e.name);Pd(bd(t.root,e.package,!0,new Map),s),t.setOwnType(s.path,s)})),i.classes.forEach((e=>{const i=`${e.package}${""===e.package?"":fe}${e.name}`,n=t.getClass(i);Hm(n,e,t,s)}))}const i=e.diagram,n=new kc(i.name);return Pd(bd(t.root,i.package,!0,new Map),n),i.typeViews.forEach((e=>{const s=new Kd(n,e.id,hn.create(t.getClass(e.type)));s.position=new Hd(e.position.x,e.position.y),s.rectangle=new Yd(e.rectangleGeometry.width,e.rectangleGeometry.height),b(n.classViews,s)})),i.propertyViews.forEach((e=>{const s=new eh(n,Ju.create((i=t.getClass(e.property.owningType),a=e.property.name,H(i instanceof Ji?jd(i).find((e=>e.name===a)):i.properties.find((e=>e.name===a)),`Can't find property '${a}' of '${i.path}'`))),H(n.classViews.find((t=>t.id===e.source))),H(n.classViews.find((t=>t.id===e.target))));var i,a;s.path=e.geometry.points.map((e=>new Hd(e.x,e.y))),ah(s),b(n.propertyViews,s)})),i.generalizationViews.forEach((e=>{const t=new th(n,H(n.classViews.find((t=>t.id===e.source))),H(n.classViews.find((t=>t.id===e.target))));t.path=e.geometry.points.map((e=>new Hd(e.x,e.y))),ah(t),b(n.generalizationViews,t)})),[n,t,s]};class Wm extends Bh{diagramInfo;_renderer;diagram;diagramClasses;graph;diagramPath;filePath;fileLine;fileColumn;constructor(e,t,s,i,n,a){super(e),(0,x.rC)(this,{_renderer:x.LO,diagram:x.LO,diagramInfo:x.LO,diagramName:x.Fl,diagramCursorClass:x.Fl,addClassView:x.ls,rebuild:x.aD,setRenderer:x.aD}),this.diagramPath=s,this.filePath=i,this.fileLine=n,this.fileColumn=a,this.diagramInfo=t;const[r,o,l]=Ym(t);this.diagram=r,this.graph=o,this.diagramClasses=l}get label(){return Lh(this.diagramPath)}get description(){return`Diagram: ${Lh(this.diagramPath)}`}get diagramName(){return Id(this.diagramPath)}match(e){return e instanceof Wm&&this.diagramPath===e.diagramPath}get renderer(){return H(this._renderer,"Diagram renderer must be initialized (this is likely caused by calling this method at the wrong place)")}get isDiagramRendererInitialized(){return Boolean(this._renderer)}get diagramCursorClass(){if(!this.isDiagramRendererInitialized)return"";if(this.renderer.middleClick||this.renderer.rightClick)return"diagram-editor__cursor--grabbing";switch(this.renderer.interactionMode){case wp.PAN:return this.renderer.leftClick?"diagram-editor__cursor--grabbing":"diagram-editor__cursor--grab";case wp.ZOOM_IN:return"diagram-editor__cursor--zoom-in";case wp.ZOOM_OUT:return"diagram-editor__cursor--zoom-out";case wp.LAYOUT:return this.renderer.selectionStart?"diagram-editor__cursor--crosshair":this.renderer.mouseOverClassCorner||this.renderer.selectedClassCorner?"diagram-editor__cursor--resize":this.renderer.mouseOverClassView?"diagram-editor__cursor--pointer":"";default:return""}}rebuild(e){this.diagramInfo=e;const[t,s,i]=Ym(e);this.diagram=t,this.graph=s,this.diagramClasses=i,this.fileLine=e.diagram.sourceInformation.line,this.fileColumn=e.diagram.sourceInformation.column}setupRenderer(){this.renderer.onClassViewDoubleClick=e=>{const t=this.diagramClasses.get(e.class.value.path)?.sourceInformation;if(t){const e=new Dh(t.sourceId,t.startLine,t.startColumn);(0,x.fl)(this.editorStore.executeNavigation(e)).catch(this.editorStore.applicationStore.alertUnhandledError)}}}setRenderer(e){this._renderer=e}*addClassView(e,t){const s=((e,t,s)=>{e.profiles.forEach((e=>{const s=`${e.package}${""===e.package?"":fe}${e.name}`;if(!t.getOwnNullableProfile(s)){const s=new Hp(e.name);Pd(bd(t.root,e.package,!0,new Map),s),t.setOwnProfile(s.path,s),e.tags.forEach((e=>b(s.p_tags,new fm(s,e)))),e.stereotypes.forEach((e=>b(s.p_stereotypes,new Tm(s,e))))}})),e.enumerations.forEach((e=>{const s=`${e.package}${""===e.package?"":fe}${e.name}`;if(!t.getOwnNullableEnumeration(s)){const s=new en(e.name);Pd(bd(t.root,e.package,!0,new Map),s),t.setOwnType(s.path,s)}}));const i=e.class,n=`${i.package}${""===i.package?"":fe}${i.name}`;let a=t.getOwnNullableClass(n);a||(a=new Ji(i.name),Pd(bd(t.root,i.package,!0,new Map),a),t.setOwnType(a.path,a));const r=s.get(a.path)?.isStubbed??!0;return s.set(a.path,{sourceInformation:i.sourceInformation,isStubbed:!1}),e.specializations.forEach((e=>{const i=H(a),n=$m(H(`${e.package}${""===e.package?"":fe}${e.name}`),t,s,e.sourceInformation);b(i._subclasses,n),n.generalizations.map((e=>e.value.rawType)).includes(i)||b(n.generalizations,Wu.create(new Ku(i)))})),r&&Hm(a,i,t,s),a})((0,He.vB)(Vm,yield this.editorStore.client.getDiagramClassInfo(e)),this.graph,this.diagramClasses),i=this.renderer.addClassView(s,t);i&&(i.id=((e,t)=>{if(!t.match(/^[\w_-]+$/))throw new Error("Token must only contain digits, letters, or special characters _ and -");const s=e.map((e=>{const s=e.match(new RegExp(`^${t}_(?<count>\\d+)$`));return s?.groups?.count?parseInt(s.groups.count,10):0})).reduce(((e,t)=>Math.max(e,t)),0);return`${t}_${s+1}`})(this.diagram.classViews.map((e=>e.id)),"cview"))}registerCommands(){const e=()=>this.editorStore.tabManagerState.currentTab===this&&this.isDiagramRendererInitialized;this.editorStore.applicationStore.commandService.registerCommand({key:Yh.RECENTER,trigger:e,action:()=>this.renderer.recenter()}),this.editorStore.applicationStore.commandService.registerCommand({key:Yh.USE_ZOOM_TOOL,trigger:e,action:()=>this.renderer.switchToZoomMode()}),this.editorStore.applicationStore.commandService.registerCommand({key:Yh.USE_VIEW_TOOL,trigger:e,action:()=>this.renderer.switchToViewMode()}),this.editorStore.applicationStore.commandService.registerCommand({key:Yh.USE_PAN_TOOL,trigger:e,action:()=>this.renderer.switchToPanMode()})}deregisterCommands(){[Yh.RECENTER,Yh.USE_ZOOM_TOOL,Yh.USE_VIEW_TOOL,Yh.USE_PAN_TOOL].forEach((e=>this.editorStore.applicationStore.commandService.deregisterCommand(e)))}}class Km{text="";isCaseSensitive=!1;isRegExp=!1;constructor(){(0,x.rC)(this,{text:x.LO,isCaseSensitive:x.LO,isRegExp:x.LO,reset:x.aD,setText:x.aD,setCaseSensitive:x.aD,setRegExp:x.aD})}reset(){this.setText(""),this.setCaseSensitive(!1),this.setRegExp(!1)}setText(e){this.text=e}setCaseSensitive(e){this.isCaseSensitive=e}setRegExp(e){this.isRegExp=e}}class Xm extends F{}const Zm=/^(?:(?:\w[\w$]*)::)*\w[\w$]*$/,qm=/^\/?(?:\w+\/)*\w+(?:\.\w+)*$/,Jm=/(?:(?<url>https?:[/]{2}[^\s"'!*(){}|\\^<>`]*[^\s"':,.!?{}|\\^~[\]`()<>])|(?<path>resource:(?<path_sourceId>\/?(?:\w+\/)*\w+(?:\.\w+)*) (?:line:(?<path_line>\d+)) (?:column:(?<path_column>\d+))))/;class Qm{editorStore;constructor(e){this.editorStore=e}}class e_ extends Qm{result;constructor(e,t){super(e),this.result=t}}class t_ extends Qm{result;constructor(e,t){super(e),this.result=t}}class s_{editorStore;usageConcept;searchEntries=[];constructor(e,t,s,i){(0,x.rC)(this,{searchEntries:x.LO,numberOfFiles:x.Fl,numberOfResults:x.Fl}),this.editorStore=e,this.usageConcept=t;const n=new Map;s.forEach(((e,t)=>{let s;n.has(e.source)?s=H(n.get(e.source)):(s=new yu,s.sourceId=e.source,n.set(e.source,s));const a=new Ou(e.source,e.startLine,e.startColumn,e.endLine,e.endColumn);a.preview=i.find((t=>t.sourceId===e.source&&t.startLine===e.startLine&&t.startColumn===e.startColumn&&t.endLine===e.endLine&&t.endColumn===e.endColumn))?.preview,s.coordinates.push(a)})),this.searchEntries=Array.from(n.keys()).sort(((e,t)=>e.localeCompare(t))).map((e=>{const t=H(n.get(e));return t.setCoordinates(t.coordinates.sort(((e,t)=>e.startColumn-t.startColumn)).sort(((e,t)=>e.startLine-t.startLine))),t}))}dismissSearchEntry(e){M(this.searchEntries,e),this.searchEntries.length||this.editorStore.setReferenceUsageResult(void 0)}get numberOfFiles(){return this.searchEntries.length}get numberOfResults(){return this.searchEntries.flatMap((e=>e.coordinates)).length}}class i_{searchState;searchEntries=[];constructor(e,t){(0,x.rC)(this,{searchEntries:x.LO,numberOfFiles:x.Fl,numberOfResults:x.Fl}),this.searchState=e,this.searchEntries=t}dismissSearchEntry(e){M(this.searchEntries,e),this.searchEntries.length||this.searchState.setResult(void 0)}get numberOfFiles(){return this.searchEntries.length}get numberOfResults(){return this.searchEntries.flatMap((e=>e.coordinates)).length}}class n_{editorStore;loadState=ft.create();searchInput;text="";isCaseSensitive=!1;isRegExp=!1;result;constructor(e){(0,x.rC)(this,{text:x.LO,isCaseSensitive:x.LO,isRegExp:x.LO,result:x.LO,setText:x.aD,setCaseSensitive:x.aD,setRegExp:x.aD,setResult:x.aD,search:x.ls}),this.editorStore=e}setSearchInput(e){this.searchInput=e}focus(){this.searchInput?.focus()}select(){this.searchInput?.select()}*search(){if(!this.loadState.isInProgress){this.loadState.inProgress();try{const e=(yield this.editorStore.client.searchText(this.text,this.isCaseSensitive,this.isRegExp)).map((e=>(e=>(0,He.vB)(yu,e))(e)));this.setResult(new i_(this,e)),this.loadState.pass()}catch(e){G(e),this.editorStore.applicationStore.notificationService.notifyError(e),this.loadState.fail()}}}setText(e){this.text=e}setCaseSensitive(e){this.isCaseSensitive=e}setRegExp(e){this.isRegExp=e}setResult(e){this.result=e}}class a_{applicationStore;initState=ft.create();directoryTreeState;conceptTreeState;client;isMaxAuxPanelSizeSet=!1;activeAuxPanelMode=Nh.TERMINAL;auxPanelDisplayState=new zu({initial:0,default:300,snap:100});activeActivity=Sh.CONCEPT_EXPLORER;sideBarDisplayState=new zu({initial:300,default:300,snap:150});tabManagerState=new $h(this);executionState=ft.create();navigationStack=[];fileSearchCommandLoadState=ft.create();fileSearchCommandState=new Km;openFileSearchCommand=!1;fileSearchCommandResults=[];codeFixSuggestion;referenceUsageLoadState=ft.create();referenceUsageResult;textSearchState;testRunState=ft.create();testRunnerState;constructor(e){var t;(0,x.rC)(this,{isMaxAuxPanelSizeSet:x.LO,activeAuxPanelMode:x.LO,activeActivity:x.LO,navigationStack:x.LO,openFileSearchCommand:x.LO,fileSearchCommandResults:x.LO,fileSearchCommandState:x.LO,codeFixSuggestion:x.LO,referenceUsageResult:x.LO,testRunnerState:x.LO,setCodeFixSuggestion:x.aD,setReferenceUsageResult:x.aD,setOpenFileSearchCommand:x.aD,setActiveAuxPanelMode:x.aD,setActiveActivity:x.aD,setTestRunnerState:x.aD,pullInitializationActivity:x.aD,pullExecutionStatus:x.aD,initialize:x.ls,checkIfSessionWakingUp:x.ls,loadDiagram:x.ls,loadFile:x.ls,execute:x.ls,executeGo:x.ls,manageExecuteGoResult:x.ls,executeTests:x.ls,executeFullTestSuite:x.ls,executeNavigation:x.ls,navigateBack:x.ls,fullReCompile:x.ls,command:x.ls,findUsagesFromCoordinate:x.ls,findUsages:x.ls,renameConcept:x.ls,movePackageableElements:x.ls,updateFileUsingSuggestionCandidate:x.ls,updateFile:x.ls,searchFile:x.ls,createNewDirectory:x.ls,createNewFile:x.ls,renameFile:x.ls,deleteDirectoryOrFile:x.ls}),this.applicationStore=e,this.textSearchState=new n_(this),this.directoryTreeState=new ou(this),this.conceptTreeState=new cu(this),this.client=new $u(new _e({baseUrl:this.applicationStore.config.useDynamicPureServer?window.location.origin:this.applicationStore.config.pureUrl})),(t=this).applicationStore.terminalService.terminal.setup({webLinkProvider:{handler:(e,s)=>{const i=s.match(Jm);i?.groups?.url?t.applicationStore.navigationService.navigator.visitAddress(i.groups.url):i?.groups?.path&&i.groups.path_sourceId&&i.groups.path_column&&i.groups.path_line&&(0,x.fl)(t.loadFile(i.groups.path_sourceId,new Dh(i.groups.path_sourceId,Number.parseInt(i.groups.path_line,10),Number.parseInt(i.groups.path_column,10)))).catch(t.applicationStore.alertUnhandledError)},regex:Jm},commands:[{command:Zh.GO,description:"Run the go() function in welcome file",usage:"go",aliases:["compile","executeGo"],handler:async e=>(0,x.fl)(t.executeGo()).catch(t.applicationStore.alertUnhandledError)},{command:Zh.TEST,description:"Run the test suite (by path if specified)",usage:"test [/some/path]",handler:async e=>{const s=P(e);!s||s.match(Zm)?await(0,x.fl)(t.executeTests(s??xh)).catch(t.applicationStore.alertUnhandledError):t.applicationStore.terminalService.terminal.fail("command requires a valid package/concept path")}},{command:Zh.REMOVE,description:"Remove a file or directory",usage:"rm /some/path",handler:async e=>{const s=P(e);s?.match(qm)?await(0,x.fl)(t.deleteDirectoryOrFile(s,void 0,void 0)).catch(t.applicationStore.alertUnhandledError):t.applicationStore.terminalService.terminal.fail("rm command requires a valid file/directory path")}},{command:Zh.MOVE,description:"Move a file",usage:"mv /old/path /new/path",handler:async e=>{const s=e[0];if(!s?.match(qm))return void t.applicationStore.terminalService.terminal.fail("command requires a valid old file path");const i=e[1];i?.match(qm)?await(0,x.fl)(t.renameFile(s,i)).catch(t.applicationStore.alertUnhandledError):t.applicationStore.terminalService.terminal.fail("command requires a valid new file path")}},{command:Zh.NEW_DIRECTORY,description:"Create a new directory",usage:"mkdir /some/path",handler:async e=>{const s=e[0];s?.match(qm)?await(0,x.fl)(t.createNewDirectory(s)).catch(t.applicationStore.alertUnhandledError):t.applicationStore.terminalService.terminal.fail("command requires a valid directory path")}},{command:Zh.NEW_FILE,description:"Create a new file",usage:"touch /some/path",handler:async e=>{const s=e[0];s?.match(qm)?await(0,x.fl)(t.createNewDirectory(s)).catch(t.applicationStore.alertUnhandledError):t.applicationStore.terminalService.terminal.fail("command requires a valid path")}},{command:Zh.WELCOME,description:"Open the welcome file",usage:"welcome",aliases:["start"],handler:async()=>{await(0,x.fl)(t.loadFile(Th)).catch(t.applicationStore.alertUnhandledError)}},{command:Zh.OPEN_FILE,description:"Open a file",usage:"open /some/file/path",aliases:["edit","code","vi"],handler:async e=>{const s=e[0];s?.match(Zm)?await(0,x.fl)(t.loadFile(s)).catch(t.applicationStore.alertUnhandledError):t.applicationStore.terminalService.terminal.fail("command requires a valid file path")}},{command:Zh.OPEN_DIRECTORY,description:"Open a directory or a package",usage:"cd /some/directory/path | cd some::package::path",handler:async e=>{const s=e[0];if(s&&(s.match(qm)||s.match(Zm)))try{s.match(Zm)?await(0,x.fl)(t.conceptTreeState.revealConcept(s,{forceOpenExplorerPanel:!0,packageOnly:!0})):await(0,x.fl)(t.directoryTreeState.revealPath(s,{forceOpenExplorerPanel:!0,directoryOnly:!0}))}catch(e){G(e),t.applicationStore.terminalService.terminal.fail(e.message)}else t.applicationStore.terminalService.terminal.fail("command requires a valid directory or concept path")}},{command:Zh.LIST_DIRECTORY,description:"List children of a directory or package",usage:"cd /some/directory/path | cd some::package::path | cd ::",handler:async e=>{const s=e[0];if(s&&(s.match(qm)||s.match(Zm)||[Ch,xh].includes(s)))try{s.match(Zm)||s===xh?t.applicationStore.terminalService.terminal.output((await t.client.getConceptChildren(s)).map((e=>(0,He.vB)(wh,e))).map((e=>e.li_attr instanceof yh?`${Pt.BRIGHT_CYAN}${e.text}${Pt.RESET}`:e.text)).join("\n")):t.applicationStore.terminalService.terminal.output((await t.client.getDirectoryChildren(s)).map((e=>(0,He.vB)(nu,e))).map((e=>e.isFolderNode?`${Pt.BRIGHT_CYAN}${e.text}${Pt.RESET}`:e.text)).join("\n"))}catch(e){G(e),t.applicationStore.terminalService.terminal.fail(e.message)}else t.applicationStore.terminalService.terminal.fail("command requires a valid directory or package path")}},{command:Zh.CLEAR,description:"Clear the terminal",usage:"clear",handler:async e=>{t.applicationStore.terminalService.terminal.clear()}},{command:Zh.ECHO,description:"Print text",usage:"echo 'some string'",handler:async(e,s,i)=>{const n=i.substring(i.indexOf(s)+s.length).trim();t.applicationStore.terminalService.terminal.output(n.replaceAll(/\\u001b/g,""))}},{command:Zh.ANSI,description:"Show common ANSI escape sequences used for styling",usage:"ansi",handler:async e=>(t.applicationStore.terminalService.terminal.showCommonANSIEscapeSequences(),Promise.resolve())},{command:Zh.HELP,description:"Show help",usage:"help",handler:async e=>(t.applicationStore.terminalService.terminal.showHelp(),Promise.resolve())}]})}setOpenFileSearchCommand(e){this.openFileSearchCommand=e}setActiveAuxPanelMode(e){this.activeAuxPanelMode=e}setCodeFixSuggestion(e){this.codeFixSuggestion=e}setReferenceUsageResult(e){this.referenceUsageResult=e}setTestRunnerState(e){this.testRunnerState=e}cleanUp(){this.applicationStore.alertService.setBlockingAlert(void 0),this.applicationStore.alertService.setActionAlertInfo(void 0),this.applicationStore.terminalService.terminal.dispose()}*initialize(e,t,s,i){if(this.initState.isInInitialState){this.client.mode=s,this.client.compilerMode=i,this.initState.inProgress();try{this.applicationStore.alertService.setBlockingAlert({message:"Loading Pure IDE...",prompt:"Please be patient as we are building the initial application state",showLoading:!0});const s=this.client.initialize(!e).catch((e=>{G(e),this.applicationStore.notificationService.notifyError(e),this.initState.fail(),this.applicationStore.alertService.setBlockingAlert({message:"Failed to initialize IDE",prompt:"Before debugging, make sure the server is running then restart the application"})}));yield this.pullInitializationActivity(),this.applicationStore.alertService.setBlockingAlert(void 0);const i=(0,x.fl)(this.loadFile(Th)),a=this.directoryTreeState.initialize(),r=this.conceptTreeState.initialize(),o=(n=yield s).error?n.source?(0,He.vB)(uu,n):(0,He.vB)(hu,n):(0,He.vB)(du,n);o.text&&(this.applicationStore.terminalService.terminal.output(o.text,{systemCommand:"initialize application"}),this.setActiveAuxPanelMode(Nh.TERMINAL),this.auxPanelDisplayState.open()),o instanceof hu?o.sessionError?this.applicationStore.alertService.setBlockingAlert({message:"Session corrupted",prompt:o.sessionError}):o instanceof uu&&(yield(0,x.fl)(this.loadFile(o.source,new Mh(o.source,o.line,o.column,new Xm((o.text??"").split("\n").filter(Boolean)[0]))))):(t&&(yield t()),yield Promise.all([i,a,r])),this.initState.pass()}catch(e){G(e),this.applicationStore.notificationService.notifyError(e),this.initState.fail(),this.applicationStore.alertService.setActionAlertInfo({message:"Failed to initialize IDE",prompt:"This can either due to an internal server error, which you would need to manually resolve; or a compilation, which you can proceed to debug",type:gs.CAUTION,actions:[{label:"Compile to debug",type:Es.PROCEED_WITH_CAUTION,default:!0,handler:()=>{(0,x.fl)(this.executeGo()).catch(this.applicationStore.alertUnhandledError)}}]})}finally{this.applicationStore.terminalService.terminal.clear()}var n}else this.applicationStore.notificationService.notifyIllegalState("Editor store is re-initialized")}*checkIfSessionWakingUp(e){this.applicationStore.alertService.setBlockingAlert({message:e??"Checking IDE session...",showLoading:!0}),yield this.pullInitializationActivity((t=>{t.text&&this.applicationStore.alertService.setBlockingAlert({message:e??"Checking IDE session...",prompt:t.text,showLoading:!0})})),this.applicationStore.alertService.setBlockingAlert(void 0)}async pullInitializationActivity(e){return(await this.client.getInitializationActivity()).initializing?new Promise(((e,t)=>setTimeout((()=>{try{e(this.pullInitializationActivity())}catch(e){t(e)}}),1e3))):Promise.resolve()}registerCommands(){this.applicationStore.commandService.registerCommand({key:zh.SEARCH_FILE,action:()=>this.setOpenFileSearchCommand(!0)}),this.applicationStore.commandService.registerCommand({key:zh.SEARCH_TEXT,action:()=>{this.setActiveAuxPanelMode(Nh.SEARCH),this.auxPanelDisplayState.open(),this.textSearchState.focus(),this.textSearchState.select()}}),this.applicationStore.commandService.registerCommand({key:zh.GO_TO_FILE,action:()=>{this.tabManagerState.currentTab instanceof Qh&&this.directoryTreeState.revealPath(this.tabManagerState.currentTab.filePath,{forceOpenExplorerPanel:!0})}}),this.applicationStore.commandService.registerCommand({key:zh.TOGGLE_TERMINAL_PANEL,action:()=>{this.auxPanelDisplayState.isOpen?this.activeAuxPanelMode!==Nh.TERMINAL?(this.setActiveAuxPanelMode(Nh.TERMINAL),this.applicationStore.terminalService.terminal.focus()):this.applicationStore.terminalService.terminal.isFocused()?this.auxPanelDisplayState.close():this.applicationStore.terminalService.terminal.focus():(this.setActiveAuxPanelMode(Nh.TERMINAL),this.auxPanelDisplayState.open())}}),this.applicationStore.commandService.registerCommand({key:zh.EXECUTE,action:()=>{(0,x.fl)(this.executeGo()).catch(this.applicationStore.alertUnhandledError)}}),this.applicationStore.commandService.registerCommand({key:zh.FULL_RECOMPILE,action:()=>{(0,x.fl)(this.fullReCompile(!1)).catch(this.applicationStore.alertUnhandledError)}}),this.applicationStore.commandService.registerCommand({key:zh.FULL_RECOMPILE_WITH_FULL_INIT,action:()=>{(0,x.fl)(this.fullReCompile(!0)).catch(this.applicationStore.alertUnhandledError)}}),this.applicationStore.commandService.registerCommand({key:zh.RUN_ALL_TESTS,action:()=>{(0,x.fl)(this.executeFullTestSuite(!1)).catch(this.applicationStore.alertUnhandledError)}}),this.applicationStore.commandService.registerCommand({key:zh.RUN_RELAVANT_TESTS,action:()=>{(0,x.fl)(this.executeFullTestSuite(!0)).catch(this.applicationStore.alertUnhandledError)}})}deregisterCommands(){[zh.SEARCH_FILE,zh.SEARCH_TEXT,zh.GO_TO_FILE,zh.TOGGLE_TERMINAL_PANEL,zh.EXECUTE,zh.FULL_RECOMPILE,zh.FULL_RECOMPILE_WITH_FULL_INIT,zh.RUN_ALL_TESTS,zh.RUN_RELAVANT_TESTS].forEach((e=>this.applicationStore.commandService.deregisterCommand(e)))}setActiveActivity(e,t){this.sideBarDisplayState.isOpen?e!==this.activeActivity||t?.keepShowingIfMatchedCurrent||this.sideBarDisplayState.close():this.sideBarDisplayState.open(),this.activeActivity=e}*loadDiagram(e,t,s,i){let n=this.tabManagerState.tabs.find((e=>e instanceof Wm&&e.diagramPath===t));n||(yield(0,x.fl)(this.checkIfSessionWakingUp()),n=new Wm(this,(0,He.vB)(Gm,yield this.client.getDiagramInfo(t)),t,e,s,i)),this.tabManagerState.openTab(n)}*loadFile(e,t){try{let s=this.tabManagerState.tabs.find((t=>t instanceof Qh&&t.filePath===e));s||(yield(0,x.fl)(this.checkIfSessionWakingUp()),s=new Qh(this,(0,He.vB)(bh,yield this.client.getFile(e)),e)),this.tabManagerState.openTab(s),t&&(s.textEditorState.setForcedCursorPosition({lineNumber:t.line,column:t.column}),t instanceof Mh&&s.showError(t))}catch(t){G(t),this.applicationStore.terminalService.terminal.fail(t.message,{systemCommand:`load file ${e}`})}}async reloadFile(e){const t=[];await Promise.all(this.tabManagerState.tabs.map((async s=>{if(s instanceof Qh&&s.filePath===e)s.setFile((0,He.vB)(bh,await this.client.getFile(e)));else if(s instanceof Wm&&s.filePath===e)try{s.rebuild((0,He.vB)(Gm,await this.client.getDiagramInfo(s.diagramPath)))}catch{t.push(s)}}))),t.forEach((e=>this.tabManagerState.closeTab(e)))}*execute(e,t,s,i,n,a){if(!this.initState.hasCompleted)return void this.applicationStore.notificationService.notifyWarning("Can't execute while initializing application");if(this.executionState.isInProgress)return void this.applicationStore.notificationService.notifyWarning("Another execution is already in progress!");this.setCodeFixSuggestion(void 0),this.executionState.inProgress();const r=this.tabManagerState.tabs.filter(Y(Qh)).map((e=>e.filePath));try{const l=this.tabManagerState.tabs.map((e=>e instanceof Qh?{path:e.filePath,code:e.file.content}:e instanceof Wm?{diagram:e.diagramPath,code:Bm(e.diagram)}:void 0)).filter($),c=this.client.execute(l,e,t),d=1e3;let h,u=!1;yield Promise.all([c.then((e=>{u=!0,h=e})),new Promise(((e,t)=>setTimeout((()=>{!u&&s&&(this.applicationStore.alertService.setBlockingAlert({message:"Executing...",prompt:"Please do not refresh the application",showLoading:!0}),e(this.pullExecutionStatus().finally((()=>{this.applicationStore.alertService.setBlockingAlert(void 0)})))),e()}),d,!0)))]);const p=(o=H(h)).error?o.candidateName&&o.PureUnmatchedFunctionException?(0,He.vB)(Cu,o):o.candidateName&&o.candidates?(0,He.vB)(xu,o):(0,He.vB)(_u,o):o.jumpTo?(0,He.vB)(Eu,o):o.tests?(0,He.vB)(Au,o):(0,He.vB)(mu,o);this.applicationStore.alertService.setBlockingAlert(void 0),p instanceof _u?(this.applicationStore.notificationService.notifyError("Execution failed"+(p.text?`: ${p.text}`:"")),this.applicationStore.terminalService.terminal.fail(p.text,{systemCommand:n??"execute"}),p.sessionError?this.applicationStore.alertService.setBlockingAlert({message:"Session corrupted",prompt:p.sessionError}):yield(0,x.fl)(i(p,r))):(a?.silentTerminalOnSuccess||this.applicationStore.terminalService.terminal.output(p.text??"",{clear:a?.clearTerminal,systemCommand:n??"execute"}),p instanceof mu?(this.applicationStore.notificationService.notifySuccess("Execution succeeded!"),p.reinit?(this.applicationStore.alertService.setBlockingAlert({message:"Reinitializing...",prompt:"Please do not refresh the application",showLoading:!0}),this.initState.reset(),yield(0,x.fl)(this.initialize(!1,(()=>(0,x.fl)(this.execute(e,t,s,i,n))),this.client.mode,this.client.compilerMode))):yield(0,x.fl)(i(p,r))):yield(0,x.fl)(i(p,r)))}catch(e){G(e),this.applicationStore.notificationService.notifyError(e),this.applicationStore.terminalService.terminal.fail(e.message,{systemCommand:n??"execute"})}finally{this.applicationStore.alertService.setBlockingAlert(void 0),this.executionState.reset()}var o}async pullExecutionStatus(){const e=await this.client.getExecutionActivity();return this.applicationStore.alertService.setBlockingAlert({message:"Executing...",prompt:e.text?e.text:"Please do not refresh the application",showLoading:!0}),e.executing?new Promise(((e,t)=>setTimeout((()=>{try{e(this.pullExecutionStatus())}catch(e){t(e)}}),500))):(this.applicationStore.alertService.setBlockingAlert({message:"Executing...",prompt:"Please do not refresh the application",showLoading:!0}),Promise.resolve())}*executeGo(){yield(0,x.fl)(this.execute("executeGo",{},!0,((e,t)=>(0,x.fl)(this.manageExecuteGoResult(e,t))),Zh.GO,{clearTerminal:!0}))}*manageExecuteGoResult(e,t){const s=this.refreshTrees();if(this.tabManagerState.tabs.filter(Y(Qh)).filter((e=>t.includes(e.filePath))).forEach((e=>e.clearError())),e instanceof _u)e.source&&(yield(0,x.fl)(this.loadFile(e.source,new Mh(e.source,e.line,e.column,new Xm(e.text.split("\n").filter(Boolean)[0]))))),e instanceof Cu?(this.setCodeFixSuggestion(new e_(this,e)),this.setActiveAuxPanelMode(Nh.CODE_FIX_SUGGESTION),this.auxPanelDisplayState.open()):e instanceof xu&&(this.setCodeFixSuggestion(new t_(this,e)),this.setActiveAuxPanelMode(Nh.CODE_FIX_SUGGESTION),this.auxPanelDisplayState.open()),this.resetChangeDetection(t);else if(e instanceof mu){if(e.modifiedFiles.length)for(const t of e.modifiedFiles)yield this.reloadFile(t);this.resetChangeDetection(t.concat(e.modifiedFiles)),!this.initState.hasFailed&&this.conceptTreeState.treeData||(yield(0,x.fl)(this.conceptTreeState.initialize()),this.initState.pass())}yield s}*executeTests(e,t){t?this.applicationStore.notificationService.notifyUnsupportedFeature("Run relevant tests! (reason: VCS required)"):this.testRunState.isInProgress?this.applicationStore.notificationService.notifyWarning("Test runner is working. Please try again later"):(this.testRunState.inProgress(),yield(0,x.fl)(this.execute("executeTests",{path:e,relevantTestsOnly:t},!1,(async(e,t)=>{const s=this.refreshTrees();if(e instanceof _u)e.source&&await(0,x.fl)(this.loadFile(e.source,new Mh(e.source,e.line,e.column,new Xm(e.text.split("\n").filter(Boolean)[0])))),this.setActiveAuxPanelMode(Nh.TERMINAL),this.auxPanelDisplayState.open(),this.testRunState.fail();else if(e instanceof Au){this.setActiveAuxPanelMode(Nh.TEST_RUNNER),this.auxPanelDisplayState.open();const t=new Gu(this,e);this.setTestRunnerState(t),await(0,x.fl)(t.buildTestTreeData()),t.refreshTree(),await(0,x.fl)(t.pollTestRunnerResult()),this.testRunState.pass()}this.resetChangeDetection(t),await s}),`${Zh.TEST} ${e}`)))}*executeFullTestSuite(e){yield(0,x.fl)(this.executeTests(xh,e))}*executeNavigation(e){this.navigationStack.push(e),yield(0,x.fl)(this.execute("getConcept",{file:e.file,line:e.line,column:e.column},!1,(async(e,t)=>{e instanceof Eu&&await(0,x.fl)(this.loadFile(e.jumpTo.source,new Dh(e.jumpTo.source,e.jumpTo.line,e.jumpTo.column))),this.resetChangeDetection(t)}),"navigate",{silentTerminalOnSuccess:!0}))}*navigateBack(){if(0!==this.navigationStack.length){if(this.navigationStack.length>0){const e=this.navigationStack.pop();e&&(yield(0,x.fl)(this.loadFile(e.file,e)))}}else this.applicationStore.notificationService.notifyWarning("Can't navigate back any further - navigation stack is empty")}*fullReCompile(e){this.applicationStore.alertService.setActionAlertInfo({message:"Are you sure you want to perform a full re-compile?",prompt:"This may take a long time to complete",type:gs.CAUTION,actions:[{label:"Perform full re-compile",type:Es.PROCEED_WITH_CAUTION,handler:()=>{(0,x.fl)(this.execute("executeSaveAndReset",{},!0,(async(t,s)=>{this.initState.reset(),await(0,x.fl)(this.initialize(e,void 0,this.client.mode,this.client.compilerMode)),this.resetChangeDetection(s),this.setActiveActivity(Sh.CONCEPT_EXPLORER,{keepShowingIfMatchedCurrent:!0})}),"recompile")).catch(this.applicationStore.alertUnhandledError)}},{label:"Abort",type:Es.PROCEED,default:!0}]})}resetChangeDetection(e){this.tabManagerState.tabs.filter(Y(Qh)).filter((t=>e.includes(t.filePath))).forEach((e=>e.resetChangeDetection()))}async refreshTrees(){await Promise.all([this.directoryTreeState.refreshTreeData(),this.conceptTreeState.refreshTreeData()])}async revealConceptInTree(e){let t;try{t=await this.client.getConceptInfo(e.file,e.line,e.column)}catch{return void this.applicationStore.notificationService.notifyWarning("Can't find concept info. Please make sure that the code compiles and that you are looking for references of non primitive types!")}if(t.path){this.applicationStore.alertService.setBlockingAlert({message:"Revealing concept in tree...",showLoading:!0});try{this.activeActivity!==Sh.CONCEPT_EXPLORER&&this.setActiveActivity(Sh.CONCEPT_EXPLORER);const e=t.path.split(fe);let s=H(e[0]),i=H(this.conceptTreeState.getTreeData().nodes.get(s));for(let t=1;t<e.length;++t)s=`${s}${fe}${e[t]}`,this.conceptTreeState.getTreeData().nodes.get(s)||await(0,x.fl)(this.conceptTreeState.expandNode(i)),i=H(this.conceptTreeState.getTreeData().nodes.get(s));this.conceptTreeState.setSelectedNode(i)}catch{this.applicationStore.notificationService.notifyWarning("Error revealing concept. Please make sure that the code compiles and that you are looking for a valid concept")}finally{this.applicationStore.alertService.setBlockingAlert(void 0)}}}*command(e,t){try{const i=(s=yield e()).error?(0,He.vB)(Bu,s):new Vu;return!(i instanceof Bu&&(i.errorDialog?this.applicationStore.notificationService.notifyWarning(`Can't run command '${t}': ${i.text}`):this.applicationStore.terminalService.terminal.output(i.text,{systemCommand:t}),1))}catch(e){return G(e),this.applicationStore.notificationService.notifyError(e),this.applicationStore.terminalService.terminal.fail(e.message,{systemCommand:t}),!1}var s}async getConceptInfo(e){try{return await this.client.getConceptInfo(e.file,e.line,e.column)}catch{return void this.applicationStore.notificationService.notifyWarning("Can't find concept info. Please make sure that the code compiles and that you are looking for references of non primitive types!")}}async findConceptUsages(e,t){return(await this.client.getUsages(e,t)).map((e=>(0,He.vB)(kh,e)))}*findUsagesFromCoordinate(e){const t=yield this.getConceptInfo(e);t&&(yield(0,x.fl)(this.findUsages(t)))}*findUsages(e){try{this.referenceUsageLoadState.inProgress(),this.applicationStore.alertService.setBlockingAlert({message:"Finding concept usages...",prompt:`Finding references of ${jh(e)}`,showLoading:!0});const t=yield this.findConceptUsages(e.pureType===Ih.ENUM_VALUE?Fh.ENUM:e.pureType===Ih.PROPERTY||e.pureType===Ih.QUALIFIED_PROPERTY?Fh.PROPERTY:Fh.ELEMENT,(e.owner?[`'${e.owner}'`]:[]).concat(`'${e.path}'`)),s=(yield this.client.getTextSearchPreview(t.map((e=>(0,He.qC)(Ou,new Ou(e.source,e.startLine,e.startColumn,e.endLine,e.endColumn)))))).map((e=>(0,He.vB)(Ou,e)));this.setReferenceUsageResult(new s_(this,e,t,s)),this.setActiveAuxPanelMode(Nh.REFERENCES),this.auxPanelDisplayState.open()}catch(e){G(e),this.applicationStore.notificationService.notifyError(e)}finally{this.applicationStore.alertService.setBlockingAlert(void 0),this.referenceUsageLoadState.complete()}}*renameConcept(e,t,s,i){try{yield this.client.renameConcept({oldName:e,newName:t,pureType:s,sourceInformations:i.map((e=>({sourceId:e.source,line:e.line,column:e.column})))});const n=i.map((e=>e.source));for(const e of n)yield this.reloadFile(e);yield this.refreshTrees(),this.applicationStore.notificationService.notifyWarning("Please re-compile the code after refacting")}catch(t){G(t),this.applicationStore.notificationService.notifyError(`Can't rename concept '${e}'`)}}*movePackageableElements(e){try{yield this.client.movePackageableElements(e.map((e=>({pureName:e.pureName,pureType:e.pureType,sourcePackage:e.sourcePackage,destinationPackage:e.destinationPackage,sourceInformations:e.usages.map((e=>({sourceId:e.source,line:e.line,column:e.column})))}))));const t=(0,qe.Z)(e.flatMap((e=>e.usages.map((e=>e.source)))));for(const e of t)yield this.reloadFile(e);yield this.refreshTrees(),this.applicationStore.notificationService.notifyWarning("Please re-compile the code after refacting")}catch(e){G(e),this.applicationStore.notificationService.notifyError(`Can't move packageable elements:\n${e.message}`)}}*updateFileUsingSuggestionCandidate(e){this.setCodeFixSuggestion(void 0),yield(0,x.fl)(this.updateFile(e.fileToBeModified,e.lineToBeModified,e.columnToBeModified,e.add,e.messageToBeModified)),this.setActiveAuxPanelMode(Nh.TERMINAL),this.auxPanelDisplayState.open()}*updateFile(e,t,s,i,n){try{const a=yield this.client.updateSource([{path:e,line:t,column:s,message:n,add:i}]);if(a.modifiedFiles.length)for(const e of a.modifiedFiles)yield this.reloadFile(e);this.applicationStore.notificationService.notifyWarning("Please re-compile the code after refacting")}catch(t){G(t),this.applicationStore.notificationService.notifyError(`Can't update file '${e}'`)}}*searchFile(){this.fileSearchCommandLoadState.isInProgress||(this.fileSearchCommandLoadState.inProgress(),this.fileSearchCommandResults=yield this.client.findFiles(this.fileSearchCommandState.text,this.fileSearchCommandState.isRegExp),this.fileSearchCommandLoadState.pass())}*createNewDirectory(e){try{yield(0,x.fl)(this.command((()=>this.client.createFolder(Lh(e))),Zh.NEW_DIRECTORY)),yield(0,x.fl)(this.directoryTreeState.refreshTreeData())}catch(e){G(e),this.applicationStore.notificationService.notifyError(e)}}*createNewFile(e){try{const t=yield(0,x.fl)(this.command((()=>this.client.createFile(Lh(e))),Zh.NEW_FILE));yield(0,x.fl)(this.directoryTreeState.refreshTreeData()),t&&(yield(0,x.fl)(this.loadFile(e)))}catch(e){G(e),this.applicationStore.notificationService.notifyError(e)}}*renameFile(e,t){try{yield(0,x.fl)(this.command((()=>this.client.renameFile(e,t)),Zh.MOVE)),yield(0,x.fl)(this.directoryTreeState.refreshTreeData());const s=this.tabManagerState.tabs.find((t=>t instanceof Qh&&t.filePath===e));s&&this.tabManagerState.closeTab(s)}catch(e){G(e),this.applicationStore.notificationService.notifyError(e)}}*deleteDirectoryOrFile(e,t,s){const i=async()=>{await(0,x.fl)(this.command((()=>this.client.deleteDirectoryOrFile(Lh(e))),Zh.REMOVE)),this.tabManagerState.tabs.filter((s=>s instanceof Qh&&(void 0===t||t?s.filePath.startsWith(`${e}/`):s.filePath===e))).forEach((e=>this.tabManagerState.closeTab(e))),await(0,x.fl)(this.directoryTreeState.refreshTreeData())};void 0===t||void 0===s?i().catch(this.applicationStore.alertUnhandledError):this.applicationStore.alertService.setActionAlertInfo({message:`Are you sure you would like to delete this ${t?"directory":"file"}?`,prompt:s?"Beware! This directory is not empty, this action is not undo-able, you have to manually revert using VCS":"Beware! This action is not undo-able, you have to manually revert using VCS",type:gs.CAUTION,actions:[{label:"Delete anyway",type:Es.PROCEED_WITH_CAUTION,handler:()=>{i().catch(this.applicationStore.alertUnhandledError)}},{label:"Abort",type:Es.PROCEED,default:!0}]})}}const r_=(0,rt.createContext)(void 0),o_=({children:e})=>{const t=yi(),s=(0,at.fv)((()=>new a_(t)));return(0,T.jsx)(r_.Provider,{value:s,children:e})},l_=()=>H((0,rt.useContext)(r_),"Can't find editor store in context"),c_=(0,at.Pi)((()=>{const e=l_(),t=yi().terminalService.terminal,s=(0,rt.useRef)(null),{ref:i,width:n,height:a}=(0,Vs.NB)();(0,rt.useEffect)((()=>(s.current&&t.searchConfig.setSearchInput(s.current),()=>t.searchConfig.setSearchInput(void 0))),[t]),(0,rt.useEffect)((()=>{i.current&&t.mount(i.current)}),[t,i]),(0,rt.useEffect)((()=>{e.auxPanelDisplayState.isOpen&&e.activeAuxPanelMode===Nh.TERMINAL&&t.focus()}),[t,e.auxPanelDisplayState.isOpen,e.activeAuxPanelMode]),(0,rt.useEffect)((()=>{t.autoResize()}),[t,n,a]);const r=()=>{t.clear(),t.focus()},o=()=>t.copyAll();return t.isSetup?(0,T.jsxs)("div",{className:"terminal-panel",children:[(0,T.jsxs)("div",{className:"terminal-panel__header",children:[(0,T.jsxs)("div",{className:"terminal-panel__header__group",children:[(0,T.jsxs)("div",{className:"terminal-panel__header__searcher__input__container",children:[(0,T.jsx)("input",{ref:s,className:"terminal-panel__header__searcher__input input--dark",spellCheck:!1,value:t.searchConfig.searchText,onChange:e=>{const s=e.target.value;t.setSearchText(s),t.search(s)},onKeyDown:e=>{"Enter"===e.code?e.shiftKey?t.findPrevious():t.findNext():"Escape"===e.code&&(t.clearSearch(),t.focus())},placeholder:"Find"}),(0,T.jsxs)("div",{className:"terminal-panel__header__searcher__input__actions",children:[(0,T.jsx)("button",{className:"terminal-panel__header__searcher__input__action",tabIndex:-1,title:"Clear Search",onClick:()=>t.clearSearch(),children:(0,T.jsx)(As.Two,{})}),(0,T.jsx)("button",{className:(0,cs.clsx)("terminal-panel__header__searcher__input__action",{"terminal-panel__header__searcher__input__action--active":t.searchConfig.matchCaseSensitive}),tabIndex:-1,title:"Match Case",onClick:()=>t.setSearchCaseSensitive(!t.searchConfig.matchCaseSensitive),children:(0,T.jsx)(As.a2g,{})}),(0,T.jsx)("button",{className:(0,cs.clsx)("terminal-panel__header__searcher__input__action",{"terminal-panel__header__searcher__input__action--active":t.searchConfig.matchWholeWord}),tabIndex:-1,title:"Match Whole Word",onClick:()=>t.setSearchWholeWord(!t.searchConfig.matchWholeWord),children:(0,T.jsx)(As.Xj8,{})}),(0,T.jsx)("button",{className:(0,cs.clsx)("terminal-panel__header__searcher__input__action",{"terminal-panel__header__searcher__input__action--active":t.searchConfig.useRegex}),tabIndex:-1,title:"Use Regular Expression",onClick:()=>t.setSearchRegex(!t.searchConfig.useRegex),children:(0,T.jsx)(As.x47,{})})]})]}),(0,T.jsx)("div",{className:"terminal-panel__header__searcher__result",children:t.searchConfig.resultCount?`${void 0!==t.searchConfig.currentResultIndex?t.searchConfig.currentResultIndex+1:0} of ${t.searchConfig.resultCount}`:"No results"}),(0,T.jsx)("button",{className:"terminal-panel__header__action terminal-panel__header__group__action",title:"Previous Match (Shift+Enter)",disabled:!t.searchConfig.resultCount,tabIndex:-1,onClick:()=>{t.findPrevious()},children:(0,T.jsx)(As.Hf3,{className:"terminal-panel__header__action__icon"})}),(0,T.jsx)("button",{className:"terminal-panel__header__action terminal-panel__header__group__action",title:"Next Match (Enter)",disabled:!t.searchConfig.resultCount,tabIndex:-1,onClick:()=>{t.findNext()},children:(0,T.jsx)(As.veu,{className:"terminal-panel__header__action__icon"})})]}),(0,T.jsx)("div",{className:"terminal-panel__header__group__separator"}),(0,T.jsxs)("div",{className:"terminal-panel__header__group",children:[(0,T.jsx)("button",{className:(0,cs.clsx)("terminal-panel__header__action terminal-panel__header__group__action",{"terminal-panel__header__action--active":t.preserveLog}),title:"Toggle Preserve Console",tabIndex:-1,onClick:()=>t.setPreserveLog(!t.preserveLog),children:(0,T.jsx)(As.F_y,{className:"terminal-panel__header__action__icon"})}),(0,T.jsx)("button",{className:"terminal-panel__header__action terminal-panel__header__group__action",title:"Copy Text Content",tabIndex:-1,onClick:o,children:(0,T.jsx)(As.TIy,{className:"terminal-panel__header__action__icon"})}),(0,T.jsx)("button",{className:"terminal-panel__header__action terminal-panel__header__group__action",title:"Clear Console",tabIndex:-1,onClick:r,children:(0,T.jsx)(As.XHJ,{className:"terminal-panel__header__action__icon"})}),(0,T.jsx)("button",{className:"terminal-panel__header__action terminal-panel__header__group__action",title:"Show Help",tabIndex:-1,onClick:()=>{t.showHelp(),t.focus()},children:(0,T.jsx)(As.pTE,{className:"terminal-panel__header__action__icon"})})]})]}),(0,T.jsx)(Ds,{className:"terminal-panel__content",content:(0,T.jsxs)(Ms,{children:[(0,T.jsx)(Fs,{onClick:()=>t.copy(),children:"Copy"}),(0,T.jsx)(Fs,{onClick:o,children:"Copy All"}),(0,T.jsx)(Fs,{onClick:r,children:"Clear"})]}),menuProps:{elevation:7},children:(0,T.jsx)("div",{ref:i,className:"terminal-panel__container"})})]}):(0,T.jsx)("div",{className:"terminal-panel",children:(0,T.jsx)(Bs,{children:"Terminal is not set up yet"})})})),d_=(0,at.Pi)((e=>{const{searchResult:t,result:s}=e,i=l_(),n=yi(),a=e=>()=>(0,x.fl)(i.loadFile(s.sourceId,new Dh(s.sourceId,e.startLine,e.startColumn))).catch(n.alertUnhandledError),r=e=>()=>{s.dismissCoordinate(e),s.coordinates.length||t.dismissSearchEntry(s)};return(0,T.jsxs)("div",{className:"text-search-panel__entry",children:[(0,T.jsxs)("div",{className:"text-search-panel__entry__header",onClick:()=>s.setIsExpanded(!s.isExpanded),children:[(0,T.jsxs)("div",{className:"text-search-panel__entry__header__title",children:[(0,T.jsx)("div",{className:"text-search-panel__entry__header__title__expander",children:s.isExpanded?(0,T.jsx)(As.v4q,{}):(0,T.jsx)(As.XCv,{})}),(0,T.jsx)("div",{className:"text-search-panel__entry__header__title__label",children:(0,T.jsx)(As.QqN,{})}),(0,T.jsx)("div",{className:"text-search-panel__entry__header__title__content",children:Lh(s.sourceId)})]}),(0,T.jsxs)("div",{className:"text-search-panel__entry__header__actions",children:[(0,T.jsx)("div",{className:"text-search-panel__entry__header__action text-search-panel__entry__header__action--with-counter",children:(0,T.jsx)("div",{className:"text-search-panel__entry__header__action__counter",children:s.coordinates.length})}),(0,T.jsx)("button",{className:"text-search-panel__entry__header__action text-search-panel__entry__header__action--hidden",tabIndex:-1,title:"Dismiss",onClick:()=>t.dismissSearchEntry(s),children:(0,T.jsx)(As.q1B,{})})]})]}),s.isExpanded&&(0,T.jsx)("div",{className:"text-search-panel__entry__content",children:s.coordinates.map((e=>(0,T.jsxs)("div",{className:"text-search-panel__entry__content__item",children:[(0,T.jsxs)("div",{className:"text-search-panel__entry__content__item__label text-search-panel__entry__content__item__label--full",title:e.preview?`${e.preview.before}${e.preview.found.replaceAll(/\n/g,"↵")}${e.preview.after}`:"Go To Result",onClick:a(e),children:[e.preview&&(0,T.jsxs)("div",{className:"text-search-panel__entry__content__item__label__content",children:[(0,T.jsx)("div",{className:"text-search-panel__entry__content__item__label__coordinates",children:`[${e.startLine}:${e.startColumn}]`}),(0,T.jsxs)("div",{className:"text-search-panel__entry__content__item__label__preview",children:[(0,T.jsx)("span",{className:"text-search-panel__entry__content__item__label__preview__text",children:e.preview.before}),(0,T.jsx)("span",{className:"text-search-panel__entry__content__item__label__preview__text text-search-panel__entry__content__item__label__preview__text--found",children:e.preview.found.replaceAll(/\n/g,"↵")}),(0,T.jsx)("span",{className:"text-search-panel__entry__content__item__label__preview__text",children:e.preview.after})]})]}),!e.preview&&(0,T.jsx)(T.Fragment,{children:`line: ${e.startLine} - column: ${e.startColumn}`})]}),(0,T.jsx)("div",{className:"text-search-panel__entry__content__item__actions",children:(0,T.jsx)("button",{className:"text-search-panel__entry__content__item__action text-search-panel__entry__content__item__action--hidden",tabIndex:-1,title:"Dismiss",onClick:r(e),children:(0,T.jsx)(As.q1B,{})})})]},e.uuid)))})]})})),h_=(0,at.Pi)((e=>{const{searchResult:t}=e,s=l_(),i=yi(),n=t.searchEntries.some((e=>!e.isExpanded));return(0,T.jsxs)("div",{className:"text-search-panel__content",children:[(0,T.jsxs)("div",{className:"text-search-panel__content__header",children:[(0,T.jsx)("div",{className:"text-search-panel__content__header__title",children:t.searchEntries.length?`${t.numberOfResults} result(s) in ${t.numberOfFiles} files`:"No result"}),(0,T.jsxs)("div",{className:"text-search-panel__content__header__actions",children:[(0,T.jsx)("button",{className:"text-search-panel__content__header__action",tabIndex:-1,title:"Refresh",onClick:()=>{(0,x.fl)(s.textSearchState.search()).catch(i.alertUnhandledError)},children:(0,T.jsx)(As.DuK,{})}),(0,T.jsx)("button",{className:"text-search-panel__content__header__action",tabIndex:-1,title:"Clear",onClick:()=>{s.textSearchState.setText(""),s.textSearchState.setResult(void 0)},children:(0,T.jsx)(As.Two,{})}),!n&&(0,T.jsx)("button",{className:"text-search-panel__content__header__action",tabIndex:-1,title:"Collapse All",onClick:()=>{t.searchEntries.forEach((e=>e.setIsExpanded(!1)))},children:(0,T.jsx)(As.S9M,{})}),n&&(0,T.jsx)("button",{className:"text-search-panel__content__header__action",tabIndex:-1,title:"Expand All",onClick:()=>{t.searchEntries.forEach((e=>e.setIsExpanded(!0)))},children:(0,T.jsx)(As.U9q,{})})]})]}),(0,T.jsx)("div",{className:"text-search-panel__content__results",children:t.searchEntries.map((e=>(0,T.jsx)(d_,{searchResult:t,result:e},e.uuid)))})]})})),u_=(0,at.Pi)((()=>{const e=l_(),t=(0,rt.useRef)(null),s=e.textSearchState,i=(0,rt.useMemo)((()=>(0,Hs.Z)((()=>s.search()),300)),[s]);return(0,rt.useEffect)((()=>(t.current&&s.setSearchInput(t.current),()=>s.setSearchInput(void 0))),[s]),(0,rt.useEffect)((()=>{e.auxPanelDisplayState.isOpen&&e.activeAuxPanelMode===Nh.SEARCH&&s.focus()}),[s,e.auxPanelDisplayState.isOpen,e.activeAuxPanelMode]),(0,T.jsxs)("div",{className:"text-search-panel",children:[(0,T.jsx)(Ss,{isLoading:e.textSearchState.loadState.isInProgress}),(0,T.jsx)("div",{className:"text-search-panel__header",children:(0,T.jsxs)("div",{className:"text-search-panel__searcher__input__container",children:[(0,T.jsx)("input",{ref:t,autoFocus:!0,className:"text-search-panel__searcher__input input--dark",onChange:e=>{const t=e.target.value;s.setText(t),i.cancel(),t?i():s.setResult(void 0)},onKeyDown:e=>{"Enter"===e.code?(i.cancel(),s.text&&i()):"Escape"===e.code&&t.current?.select()},value:s.text,placeholder:"Search"}),(0,T.jsxs)("div",{className:"text-search-panel__searcher__input__actions",children:[(0,T.jsx)("button",{className:(0,cs.clsx)("text-search-panel__searcher__input__action",{"text-search-panel__searcher__input__action--active":s.isCaseSensitive}),tabIndex:-1,title:"Match Case",onClick:()=>s.setCaseSensitive(!s.isCaseSensitive),children:(0,T.jsx)(As.a2g,{})}),(0,T.jsx)("button",{className:(0,cs.clsx)("text-search-panel__searcher__input__action",{"text-search-panel__searcher__input__action--active":s.isRegExp}),tabIndex:-1,title:"Use Regular Expression",onClick:()=>s.setRegExp(!s.isRegExp),children:(0,T.jsx)(As.x47,{})})]})]})}),e.textSearchState.result&&(0,T.jsx)(h_,{searchResult:e.textSearchState.result})]})})),p_=e=>{const{node:t,level:s,stepPaddingInRem:i,classPrefix:n,onNodeSelect:a}=e;return(0,T.jsxs)("div",{className:(0,cs.clsx)("tree-view__node__container",{[`${n}__tree-view__node__container`]:n}),onClick:()=>a?.(t),style:{paddingLeft:(s-1)*(i??1)+"rem",display:"flex"},children:[(0,T.jsx)("div",{className:(0,cs.clsx)("tree-view__node__icon",{[`${n}__tree-view__node__icon`]:n}),children:Boolean(t.childrenIds?.length)&&(t.isOpen?(0,T.jsx)(As.v4q,{}):(0,T.jsx)(As.XCv,{}))}),(0,T.jsx)("div",{className:(0,cs.clsx)("tree-view__node__label",{[`${n}__tree-view__node__label`]:n}),children:t.label})]})},m_=e=>{const{node:t,level:s,onNodeSelect:i,getChildNodes:n,classPrefix:a,components:r,stepPaddingInRem:o,innerProps:l}=e,c={TreeNodeView:m_,TreeNodeContainer:p_},d=r?{...c,...r}:c;return(0,T.jsxs)("div",{className:(0,cs.clsx)("tree-view__node__block",{[`${a}__tree-view__node__block`]:a}),children:[(0,T.jsx)(d.TreeNodeContainer,{node:t,level:s+1,stepPaddingInRem:o,classPrefix:a,onNodeSelect:i,innerProps:l}),t.isOpen&&n(t).map((e=>(0,T.jsx)(d.TreeNodeView,{node:e,level:s+1,components:r,classPrefix:a,onNodeSelect:i,getChildNodes:n,innerProps:l},e.id)))]})},__=e=>{const{treeData:t,className:s,classPrefix:i,components:n,onNodeSelect:a,getChildNodes:r,getRootNodes:o,innerProps:l}=e,c=o?.(t)??t.rootIds.map((e=>t.nodes.get(e))).filter($),d={TreeNodeView:m_,TreeNodeContainer:p_},h=n?{...d,...n}:d;return(0,T.jsx)("div",{className:(0,cs.clsx)("tree-view__node__root",s??"",{[`${i}__tree-view__node__root`]:i}),children:c.map((e=>(0,T.jsx)(h.TreeNodeView,{level:0,node:e,getChildNodes:r,components:h,onNodeSelect:a,classPrefix:i,innerProps:l},e.id)))})};var g_=s(410);const E_=g_.gs,f_="resizable-panel--collapsed",T_=(e,t)=>({collapsiblePanel:{className:(0,cs.clsx)(...t?.classes??[],{[f_]:e}),onStartResize:e=>{e.domElement.classList.remove(f_),t?.onStartResize?.(e)},onStopResize:e=>{const s=Number(e.domElement.style.flexGrow);s<=.01?e.domElement.style.flexGrow="0":s>=.99&&(e.domElement.style.flexGrow="1"),t?.onStopResize?.(e)},size:!e&&t?.size?t.size:0,flex:e?0:void 0},remainingPanel:{flex:e?1:void 0}}),C_=g_.jW,x_=g_.nN,S_=e=>(0,T.jsx)("div",{className:"resizable-panel__splitter-line",style:{background:e.color}});var N_=s(48845);const A_=(0,at.Pi)((e=>{const{node:t,level:s,stepPaddingInRem:i,onNodeSelect:n,innerProps:a}=e,{testRunnerState:r,onNodeOpen:o,onNodeExpand:l,onNodeCompress:c,renderNodeLabel:d}=a,h=l_(),u=yi(),p=r.testResultInfo,m=!t.data.type,_=t.id===r.selectedTestId;let g;switch(p?((e,t)=>{const s=e.id;return Boolean(e.data.type)?((e,t)=>t.passedTests.has(e)?wu.PASSED:t.failedTests.has(e)?wu.FAILED:t.testsWithError.has(e)?wu.ERROR:wu.RUNNING)(s,t):t.failedTestIds.some((e=>e.startsWith(`${s}_`)))||t.testWithErrorIds.some((e=>e.startsWith(`${s}_`)))?wu.FAILED:t.notRunTestIds.some((e=>e.startsWith(`${s}_`)))?wu.RUNNING:wu.PASSED})(t,p):void 0){case wu.PASSED:g=(0,T.jsx)("div",{className:"test-runner-panel__explorer__package-tree__status test-runner-panel__explorer__package-tree__status--passed",children:(0,T.jsx)(As.rE2,{})});break;case wu.FAILED:g=(0,T.jsx)("div",{className:"test-runner-panel__explorer__package-tree__status test-runner-panel__explorer__package-tree__status--failed",children:(0,T.jsx)(As.$Ow,{})});break;case wu.ERROR:g=(0,T.jsx)("div",{className:"test-runner-panel__explorer__package-tree__status test-runner-panel__explorer__package-tree__status--error",children:(0,T.jsx)(As.xDH,{})});break;case wu.RUNNING:g=(0,T.jsx)("div",{className:"test-runner-panel__explorer__package-tree__status test-runner-panel__explorer__package-tree__status--running",children:(0,T.jsx)(As.VRP,{})});break;default:g=(0,T.jsx)(As.pTE,{})}const E=()=>{t.isOpen?c(t):l(t)};return(0,T.jsxs)("div",{className:(0,cs.clsx)("tree-view__node__container explorer__package-tree__node__container",{"explorer__package-tree__node__container--selected":_}),onClick:e=>{e.stopPropagation(),e.preventDefault(),n?.(t),m?E():o(t)},onDoubleClick:()=>{m?E():(0,x.fl)(h.loadFile(t.data.li_attr.file,new Dh(t.data.li_attr.file,Number.parseInt(t.data.li_attr.line,10),Number.parseInt(t.data.li_attr.column,10)))).catch(u.alertUnhandledError)},style:{paddingLeft:s*(i??1)+"rem",display:"flex"},children:[(0,T.jsxs)("div",{className:"tree-view__node__icon explorer__package-tree__node__icon",children:[(0,T.jsx)("div",{className:"explorer__package-tree__node__icon__expand",onClick:e=>{e.stopPropagation(),E()},children:m?t.isOpen?(0,T.jsx)(As.v4q,{}):(0,T.jsx)(As.XCv,{}):(0,T.jsx)("div",{})}),(0,T.jsx)("div",{className:"explorer__package-tree__node__icon__type",children:g})]}),(0,T.jsx)("button",{className:"tree-view__node__label explorer__package-tree__node__label",tabIndex:-1,children:d?.(t)??t.label})]})})),v_=(0,at.Pi)((e=>{const{testRunnerState:t}=e,s=t.getTreeData(),i=e=>t.setSelectedTestId(e.id),n=e=>{let t=e.id.split("__")[0];if(!t)return e.label;const s=t.split("_");return t=s.slice(1,s.length).join(fe),(0,T.jsxs)("div",{className:"test-runner-list__item__label",children:[(0,T.jsx)("div",{className:"test-runner-list__item__label__name",children:e.label}),(0,T.jsx)("div",{className:"test-runner-list__item__label__path",children:t})]})};return(0,T.jsx)("div",{className:"explorer__content",children:Array.from(t.allTests.keys()).map((e=>s.nodes.get(e))).filter($).map((e=>(0,T.jsx)(A_,{node:e,level:0,onNodeSelect:()=>{},innerProps:{testRunnerState:t,onNodeOpen:i,renderNodeLabel:n,onNodeExpand:()=>{},onNodeCompress:()=>{}}},e.id)))})})),I_=(0,at.Pi)((e=>{const{testRunnerState:t}=e,s=t.getTreeData(),i=0===s.nodes.size;return(0,T.jsxs)("div",{className:"explorer__content",children:[i&&(0,T.jsx)(Bs,{children:"No tests found"}),!i&&(0,T.jsx)(__,{components:{TreeNodeContainer:A_},treeData:s,onNodeSelect:()=>{},getChildNodes:e=>e.isLoading||!e.childrenIds?[]:e.childrenIds.map((e=>s.nodes.get(e))).filter($),innerProps:{testRunnerState:t,onNodeOpen:e=>t.setSelectedTestId(e.id),onNodeExpand:e=>{e.isOpen=!0,t.refreshTree()},onNodeCompress:e=>{e.isOpen=!1,t.refreshTree()}}})]})})),O_=/(?<path>resource:(?<path_sourceId>\/?(?:\w+\/)*\w+(?:\.\w+)*) (?:line:(?<path_line>\d+)) (?:column:(?<path_column>\d+)))/g,y_=e=>{const{wrapText:t,result:s}=e,i=l_(),n=yi(),[a,r]=(0,rt.useState)(),o=(0,rt.useRef)(void 0),l=(0,rt.useRef)(null),{ref:c,width:d,height:h}=(0,Vs.NB)();return(0,rt.useEffect)((()=>{void 0!==d&&void 0!==h&&a?.layout({width:d,height:h})}),[a,d,h]),(0,rt.useEffect)((()=>{if(!a&&l.current){const e=l.current,t=S.editor.create(e,{contextmenu:!1,copyWithSyntaxHighlighting:!1,fontSize:14,fontFamily:"Roboto Mono",fontLigatures:!0,fixedOverflowWidgets:!0,detectIndentation:!1,tabSize:2,"bracketPairColorization.enabled":!1,fontSize:12,extraEditorClassName:"monaco-editor--small-font",readOnly:!0,glyphMargin:!1,folding:!1,lineNumbers:"off",lineDecorationsWidth:10,lineNumbersMinChars:0,minimap:{enabled:!1},guides:{bracketPairs:!1,bracketPairsHorizontal:!1,highlightActiveBracketPair:!1,indentation:!1,highlightActiveIndentation:!1},renderLineHighlight:"none",theme:A.LEGEND,language:v.TEXT});r(t)}}),[n,a]),o.current?.dispose(),o.current=S.languages.registerLinkProvider(v.TEXT,{provideLinks:e=>{const t=[];for(let s=1;s<=e.getLineCount();++s)Array.from(e.getLineContent(s).matchAll(O_)).forEach((e=>{void 0!==e.index&&e.groups?.path&&e.groups.path_sourceId&&e.groups.path_column&&e.groups.path_line&&t.push({range:{startLineNumber:s,startColumn:e.index+1,endLineNumber:s,endColumn:e.index+1+e.groups.path.length},tooltip:"Click to go to location",sourceId:e.groups.path_sourceId,line:e.groups.path_line,column:e.groups.path_column})}));return{links:t}},resolveLink:e=>{const t=e;(0,x.fl)(i.loadFile(t.sourceId,new Dh(t.sourceId,Number.parseInt(t.line,10),Number.parseInt(t.column,10)))).catch(i.applicationStore.alertUnhandledError)}}),(0,rt.useEffect)((()=>{void 0!==d&&void 0!==h&&a?.layout({width:d,height:h})}),[a,d,h]),(0,rt.useEffect)((()=>{if(a){const e=s instanceof bu?"Test passed!":s instanceof Mu?s.error.text:"Running...";a.setValue(e),(s instanceof bu||s instanceof Mu)&&a.createDecorationsCollection([{range:{startLineNumber:1,startColumn:1,endLineNumber:Number.MAX_SAFE_INTEGER,endColumn:Number.MAX_SAFE_INTEGER},options:{inlineClassName:s instanceof bu?"test-runner-panel__result__content--success":"test-runner-panel__result__content--failure"}}])}}),[a,s]),(0,rt.useEffect)((()=>{a&&a.updateOptions({wordWrap:t?"on":"off"})}),[a,t]),(0,rt.useEffect)((()=>()=>{a&&(e=>{e.dispose(),e.getModel()?.dispose()})(a),o.current?.dispose()}),[a]),(0,T.jsx)("div",{ref:c,className:"text-editor__container",children:(0,T.jsx)("div",{className:"text-editor__body",ref:l})})},R_=(0,at.Pi)((e=>{const{testRunnerState:t,selectedTestId:s,testResultInfo:i}=e,n=l_(),a=yi(),[r,o]=(0,rt.useState)(!1),l=i.results.get(s),c=H(t.allTests.get(s),`Can't find info for test with ID '${s}'`);return(0,T.jsxs)("div",{className:"panel",children:[(0,T.jsxs)("div",{className:"panel__header",children:[(0,T.jsx)("div",{className:"panel__header__title",children:(0,T.jsx)("div",{className:"panel__header__title__label",children:c.text})}),(0,T.jsxs)("div",{className:"panel__header__actions",children:[(0,T.jsx)("button",{className:(0,cs.clsx)("panel__header__action",{"panel__header__action--active":r}),tabIndex:-1,onClick:()=>o(!r),title:"Toggle Text Wrap",children:(0,T.jsx)(As.NK0,{className:"test-runner-panel__result__header__icon--text-wrap"})}),(0,T.jsx)("button",{className:"panel__header__action",tabIndex:-1,title:"Open File",onClick:()=>{(0,x.fl)(n.loadFile(c.li_attr.file,new Dh(c.li_attr.file,Number.parseInt(c.li_attr.line,10),Number.parseInt(c.li_attr.column,10)))).catch(a.alertUnhandledError)},children:(0,T.jsx)(As.qdB,{})})]})]}),(0,T.jsx)("div",{className:"panel__content test-runner-panel__result",children:(0,T.jsx)(y_,{result:l,wrapText:r})})]})})),P_=(0,at.Pi)((e=>{const{testRunnerState:t}=e,s=l_(),i=yi(),n=t.testExecutionResult.count,a=t.testResultInfo,r=a?.suiteStatus??Pu.NONE,o=a?.runPercentage??0;return(0,T.jsx)("div",{className:"test-runner-panel__content",children:(0,T.jsxs)(E_,{orientation:"vertical",children:[(0,T.jsx)(C_,{minSize:400,children:(0,T.jsxs)("div",{className:"panel test-runner-panel__explorer",children:[(0,T.jsx)(Ss,{isLoading:t.treeBuildingState.isInProgress}),(0,T.jsxs)("div",{className:"panel__header",children:[(0,T.jsx)("div",{className:"panel__header__title",children:(0,T.jsxs)("div",{className:"panel__header__title__content test-runner-panel__explorer__report",children:[(0,T.jsxs)("div",{className:"test-runner-panel__explorer__report__overview",children:[(0,T.jsxs)("div",{className:"test-runner-panel__explorer__report__overview__stat test-runner-panel__explorer__report__overview__stat--total",children:[n," total"]}),(0,T.jsxs)("div",{className:"test-runner-panel__explorer__report__overview__stat test-runner-panel__explorer__report__overview__stat--passed",children:[a?.passed??0," ",(0,T.jsx)(As.rE2,{})]}),(0,T.jsxs)("div",{className:"test-runner-panel__explorer__report__overview__stat test-runner-panel__explorer__report__overview__stat--failed",children:[a?.failed??0," ",(0,T.jsx)(As.$Ow,{})]}),(0,T.jsxs)("div",{className:"test-runner-panel__explorer__report__overview__stat test-runner-panel__explorer__report__overview__stat--error",children:[a?.error??0," ",(0,T.jsx)(As.xDH,{})]})]}),a&&(0,T.jsxs)("div",{className:"test-runner-panel__explorer__report__time",children:[a.time,"ms"]})]})}),(0,T.jsxs)("div",{className:"panel__header__actions",children:[(0,T.jsx)("button",{className:"panel__header__action",onClick:()=>t.setViewAsList(!t.viewAsList),title:t.viewAsList?"View As Tree":"View As List",children:t.viewAsList?(0,T.jsx)(As.NEI,{className:"test-runner-panel__icon--tree-view"}):(0,T.jsx)(As.VjU,{className:"test-runner-panel__icon--list-view"})}),(0,T.jsx)("button",{className:"panel__header__action",onClick:()=>t.expandTree(),title:"Expand All",children:(0,T.jsx)(As.Qq,{})}),(0,T.jsx)("button",{className:"panel__header__action",onClick:()=>t.collapseTree(),title:"Collapse All",children:(0,T.jsx)(As.jG4,{})}),(0,T.jsx)("button",{className:"panel__header__action",tabIndex:-1,disabled:!s.testRunState.isInProgress,onClick:()=>{(0,x.fl)(t.cancelTestRun()).catch(i.alertUnhandledError)},title:"Stop",children:(0,T.jsx)(As.SCS,{})}),(0,T.jsx)("button",{className:"panel__header__action",tabIndex:-1,onClick:()=>{(0,x.fl)(t.rerunTestSuite()).catch(i.alertUnhandledError)},disabled:s.testRunState.isInProgress,title:"Run Suite",children:(0,T.jsx)(As.o1U,{})}),(0,T.jsx)("button",{className:"panel__header__action",tabIndex:-1,onClick:()=>{(0,x.fl)(t.cancelTestRun()).catch(i.alertUnhandledError).finally((()=>{s.setTestRunnerState(void 0)}))},title:"Reset",children:(0,T.jsx)(As.q1B,{})})]})]}),(0,T.jsx)("div",{className:"test-runner-panel__header__status",children:(0,T.jsx)(N_.Z,{className:`test-runner-panel__progress-bar test-runner-panel__progress-bar--${r.toLowerCase()}`,classes:{bar:`test-runner-panel__progress-bar__bar test-runner-panel__progress-bar__bar--${r.toLowerCase()}`},variant:"determinate",value:o})}),(0,T.jsx)("div",{className:"panel__content",children:t.treeData&&(0,T.jsxs)(T.Fragment,{children:[!t.viewAsList&&(0,T.jsx)(I_,{testRunnerState:t}),t.viewAsList&&(0,T.jsx)(v_,{testRunnerState:t})]})})]})}),(0,T.jsx)(x_,{children:(0,T.jsx)(S_,{color:s.auxPanelDisplayState.isMaximized?"transparent":"var(--color-dark-grey-250)"})}),(0,T.jsxs)(C_,{minSize:400,children:[t.selectedTestId&&!a&&(0,T.jsx)("div",{}),t.selectedTestId&&a&&(0,T.jsx)(R_,{testRunnerState:t,selectedTestId:t.selectedTestId,testResultInfo:a}),!t.selectedTestId&&(0,T.jsxs)("div",{className:"panel",children:[(0,T.jsx)("div",{className:"panel__header"}),(0,T.jsx)("div",{className:"panel__content",children:(0,T.jsx)(Bs,{children:"No test selected"})})]}),(0,T.jsx)("div",{})]})]})})})),w_=(0,at.Pi)((()=>{const e=l_().testRunnerState;return(0,T.jsxs)("div",{className:"test-runner-panel",children:[!e&&(0,T.jsx)(Bs,{children:(0,T.jsx)("div",{className:"auxiliary-panel__splash-screen",children:(0,T.jsxs)("div",{className:"auxiliary-panel__splash-screen__content",children:[(0,T.jsxs)("div",{className:"auxiliary-panel__splash-screen__content__item",children:[(0,T.jsx)("div",{className:"auxiliary-panel__splash-screen__content__item__label",children:"Run full test suite"}),(0,T.jsx)("div",{className:"auxiliary-panel__splash-screen__content__item__hot-keys",children:(0,T.jsx)("div",{className:"hotkey__key",children:"F10"})})]}),(0,T.jsxs)("div",{className:"auxiliary-panel__splash-screen__content__item",children:[(0,T.jsx)("div",{className:"auxiliary-panel__splash-screen__content__item__label",children:"Run relevant tests only"}),(0,T.jsxs)("div",{className:"auxiliary-panel__splash-screen__content__item__hot-keys",children:[(0,T.jsx)("div",{className:"hotkey__key",children:"Shift"}),(0,T.jsx)("div",{className:"hotkey__plus",children:(0,T.jsx)(As.pOD,{})}),(0,T.jsx)("div",{className:"hotkey__key",children:"F10"})]})]})]})})}),e&&(0,T.jsx)(P_,{testRunnerState:e})]})})),L_=(0,at.Pi)((e=>{const{candidate:t}=e,s=l_(),i=yi(),n=()=>{(0,x.fl)(s.loadFile(t.sourceID,new Dh(t.sourceID,t.line,t.column))).catch(i.alertUnhandledError)};return(0,T.jsxs)("div",{className:"suggestions-panel__entry__content__item",children:[(0,T.jsxs)("div",{className:"suggestions-panel__entry__content__item__label__candidate",title:"Go to Result",onClick:n,children:[(0,T.jsx)("div",{className:"suggestions-panel__entry__content__item__label__candidate-name",children:t.foundName}),(0,T.jsx)("div",{className:"suggestions-panel__entry__content__item__label__candidate-location",children:`${Lh(t.sourceID)} [${t.line}:${t.column}]`})]}),(0,T.jsx)("div",{className:"suggestions-panel__entry__content__item__actions",children:(0,T.jsx)("button",{className:"suggestions-panel__entry__content__item__action",tabIndex:-1,title:"Go to Result",onClick:n,children:(0,T.jsx)(As.bK4,{})})})]})})),b_=(0,at.Pi)((e=>{const{candidate:t}=e,s=l_(),i=yi();return(0,T.jsxs)("div",{className:"suggestions-panel__entry__content__item",children:[(0,T.jsxs)("div",{className:"suggestions-panel__entry__content__item__label__candidate",title:"Add Suggested Import",onClick:()=>{(0,x.fl)(s.updateFileUsingSuggestionCandidate(t)).catch(i.alertUnhandledError)},children:[(0,T.jsx)("div",{className:"suggestions-panel__entry__content__item__label__candidate-name",children:t.foundName}),(0,T.jsx)("div",{className:"suggestions-panel__entry__content__item__label__candidate-location",children:`${Lh(t.sourceID)} [${t.line}:${t.column}]`})]}),(0,T.jsx)("div",{className:"suggestions-panel__entry__content__item__actions",children:(0,T.jsx)("button",{className:"suggestions-panel__entry__content__item__action",tabIndex:-1,title:"Go to Result",onClick:()=>{(0,x.fl)(s.loadFile(t.sourceID,new Dh(t.sourceID,t.line,t.column))).catch(i.alertUnhandledError)},children:(0,T.jsx)(As.bK4,{})})})]})})),D_=(0,at.Pi)((e=>{const{suggestionState:t}=e,s=t.result;return(0,T.jsxs)("div",{className:"suggestions-panel__content",children:[!s.candidatesWithPackageImported.length&&(0,T.jsx)("div",{className:"suggestions-panel__content__header",children:`No functions, in packages already imported, match the function '${s.candidateName}'`}),Boolean(s.candidatesWithPackageImported.length)&&(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)("div",{className:"suggestions-panel__content__header",children:`These functions, in packages already imported, would match the function '${s.candidateName}' if you changed the parameters`}),(0,T.jsx)("div",{className:"suggestions-panel__entry",children:s.candidatesWithPackageImported.map((e=>(0,T.jsx)(L_,{candidate:e},e.uuid)))})]}),!s.candidatesWithPackageNotImported.length&&(0,T.jsx)("div",{className:"suggestions-panel__content__header",children:`No functions, in packages not imported, match the function '${s.candidateName}'`}),Boolean(s.candidatesWithPackageNotImported.length)&&(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)("div",{className:"suggestions-panel__content__header",children:`These functions, in packages not imported, match the function '${s.candidateName}'. Click on result to import the necessary package`}),(0,T.jsx)("div",{className:"suggestions-panel__entry",children:s.candidatesWithPackageNotImported.map((e=>(0,T.jsx)(b_,{candidate:e},e.uuid)))})]})]})})),M_=(0,at.Pi)((e=>{const{suggestionState:t}=e,s=t.result;return(0,T.jsxs)("div",{className:"suggestions-panel__content",children:[!s.candidates.length&&(0,T.jsx)("div",{className:"suggestions-panel__content__header",children:`No possible matches found for '${s.candidateName}'`}),Boolean(s.candidates.length)&&(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)("div",{className:"suggestions-panel__content__header",children:`Found possible matches for '${s.candidateName}'. Click on result to import the necessary package`}),(0,T.jsx)("div",{className:"suggestions-panel__entry",children:s.candidates.map((e=>(0,T.jsx)(b_,{candidate:e},e.uuid)))})]})]})})),F_=(0,at.Pi)((()=>{const e=l_();return(0,T.jsxs)("div",{className:"suggestions-panel",children:[e.codeFixSuggestion instanceof e_&&(0,T.jsx)(D_,{suggestionState:e.codeFixSuggestion}),e.codeFixSuggestion instanceof t_&&(0,T.jsx)(M_,{suggestionState:e.codeFixSuggestion})]})})),j_=(0,at.Pi)((e=>{const{referenceUsageResult:t,result:s}=e,i=l_(),n=yi(),a=e=>()=>(0,x.fl)(i.loadFile(s.sourceId,new Dh(s.sourceId,e.startLine,e.startColumn))).catch(n.alertUnhandledError),r=e=>()=>{s.dismissCoordinate(e),s.coordinates.length||t.dismissSearchEntry(s)};return(0,T.jsxs)("div",{className:"references-panel__entry",children:[(0,T.jsxs)("div",{className:"references-panel__entry__header",onClick:()=>s.setIsExpanded(!s.isExpanded),children:[(0,T.jsxs)("div",{className:"references-panel__entry__header__title",children:[(0,T.jsx)("div",{className:"references-panel__entry__header__title__expander",children:s.isExpanded?(0,T.jsx)(As.v4q,{}):(0,T.jsx)(As.XCv,{})}),(0,T.jsx)("div",{className:"references-panel__entry__header__title__label",children:(0,T.jsx)(As.QqN,{})}),(0,T.jsx)("div",{className:"references-panel__entry__header__title__content",children:Lh(s.sourceId)})]}),(0,T.jsxs)("div",{className:"references-panel__entry__header__actions",children:[(0,T.jsx)("div",{className:"references-panel__entry__header__action references-panel__entry__header__action--with-counter",children:(0,T.jsx)("div",{className:"references-panel__entry__header__action__counter",children:s.coordinates.length})}),(0,T.jsx)("button",{className:"references-panel__entry__header__action references-panel__entry__header__action--hidden",tabIndex:-1,title:"Dismiss",onClick:()=>t.dismissSearchEntry(s),children:(0,T.jsx)(As.q1B,{})})]})]}),s.isExpanded&&(0,T.jsx)("div",{className:"references-panel__entry__content",children:s.coordinates.map((e=>(0,T.jsxs)("div",{className:"references-panel__entry__content__item",children:[(0,T.jsxs)("div",{className:"references-panel__entry__content__item__label references-panel__entry__content__item__label--full",title:e.preview?`${e.preview.before}${e.preview.found.replaceAll(/\n/g,"↵")}${e.preview.after}`:"Go To Result",onClick:a(e),children:[e.preview&&(0,T.jsxs)("div",{className:"references-panel__entry__content__item__label__content",children:[(0,T.jsx)("div",{className:"references-panel__entry__content__item__label__coordinates",children:`[${e.startLine}:${e.startColumn}]`}),(0,T.jsxs)("div",{className:"references-panel__entry__content__item__label__preview",children:[(0,T.jsx)("span",{className:"references-panel__entry__content__item__label__preview__text",children:e.preview.before}),(0,T.jsx)("span",{className:"references-panel__entry__content__item__label__preview__text references-panel__entry__content__item__label__preview__text--found",children:e.preview.found.replaceAll(/\n/g,"↵")}),(0,T.jsx)("span",{className:"references-panel__entry__content__item__label__preview__text",children:e.preview.after})]})]}),!e.preview&&(0,T.jsx)(T.Fragment,{children:`line: ${e.startLine} - column: ${e.startColumn}`})]}),(0,T.jsx)("div",{className:"references-panel__entry__content__item__actions",children:(0,T.jsx)("button",{className:"references-panel__entry__content__item__action references-panel__entry__content__item__action--hidden",tabIndex:-1,title:"Dismiss",onClick:r(e),children:(0,T.jsx)(As.q1B,{})})})]},e.uuid)))})]})})),k_=(0,at.Pi)((e=>{const{referenceUsageState:t}=e,s=l_(),i=yi(),n=t.searchEntries.some((e=>!e.isExpanded));return(0,T.jsxs)("div",{className:"references-panel__content",children:[(0,T.jsxs)("div",{className:"references-panel__content__header",children:[(0,T.jsx)("div",{className:"references-panel__content__header__title",children:t.searchEntries.length?`${t.numberOfResults} usages(s) in ${t.numberOfFiles} files for ${jh(t.usageConcept)}`:`No usages found for ${jh(t.usageConcept)}`}),(0,T.jsxs)("div",{className:"references-panel__content__header__actions",children:[(0,T.jsx)("button",{className:"references-panel__content__header__action",tabIndex:-1,title:"Refresh",onClick:()=>{(0,x.fl)(s.findUsages(t.usageConcept)).catch(i.alertUnhandledError)},children:(0,T.jsx)(As.DuK,{})}),(0,T.jsx)("button",{className:"references-panel__content__header__action",tabIndex:-1,title:"Clear",onClick:()=>s.setReferenceUsageResult(void 0),children:(0,T.jsx)(As.Two,{})}),!n&&(0,T.jsx)("button",{className:"references-panel__content__header__action",tabIndex:-1,title:"Collapse All",onClick:()=>{t.searchEntries.forEach((e=>e.setIsExpanded(!1)))},children:(0,T.jsx)(As.S9M,{})}),n&&(0,T.jsx)("button",{className:"references-panel__content__header__action",tabIndex:-1,title:"Expand All",onClick:()=>{t.searchEntries.forEach((e=>e.setIsExpanded(!0)))},children:(0,T.jsx)(As.U9q,{})})]})]}),(0,T.jsx)("div",{className:"references-panel__content__results",children:t.searchEntries.map((e=>(0,T.jsx)(j_,{referenceUsageResult:t,result:e},e.uuid)))})]})})),U_=(0,at.Pi)((()=>{const e=l_();return(0,T.jsxs)("div",{className:"references-panel",children:[(0,T.jsx)(Ss,{isLoading:e.referenceUsageLoadState.isInProgress}),!e.referenceUsageResult&&(0,T.jsx)(Bs,{children:(0,T.jsx)("div",{className:"auxiliary-panel__splash-screen",children:(0,T.jsx)("div",{className:"auxiliary-panel__splash-screen__content",children:(0,T.jsxs)("div",{className:"auxiliary-panel__splash-screen__content__item",children:[(0,T.jsx)("div",{className:"auxiliary-panel__splash-screen__content__item__label",children:"Find Concept References"}),(0,T.jsxs)("div",{className:"auxiliary-panel__splash-screen__content__item__hot-keys",children:[(0,T.jsx)("div",{className:"hotkey__key",children:"Alt"}),(0,T.jsx)("div",{className:"hotkey__plus",children:(0,T.jsx)(As.pOD,{})}),(0,T.jsx)("div",{className:"hotkey__key",children:"F7"})]})]})})})}),e.referenceUsageResult&&(0,T.jsx)(k_,{referenceUsageState:e.referenceUsageResult})]})})),G_=(0,at.Pi)((()=>{const e=l_(),t={[Nh.TERMINAL]:{mode:Nh.TERMINAL,name:"TERMINAL",icon:(0,T.jsx)(As.FxN,{className:"auxiliary-panel__header__tab__icon--terminal"}),isVisible:!0},[Nh.SEARCH]:{mode:Nh.SEARCH,name:"SEARCH",icon:(0,T.jsx)(As.W1M,{className:"auxiliary-panel__header__tab__icon--search"}),isVisible:!0},[Nh.TEST_RUNNER]:{mode:Nh.TEST_RUNNER,name:"TEST",icon:(0,T.jsx)(As.Vzd,{className:"auxiliary-panel__header__tab__icon--test"}),isVisible:!0},[Nh.REFERENCES]:{mode:Nh.REFERENCES,name:"REFERENCES",icon:(0,T.jsx)(As.IMP,{className:"auxiliary-panel__header__tab__icon--references"}),isVisible:!0},[Nh.CODE_FIX_SUGGESTION]:{mode:Nh.CODE_FIX_SUGGESTION,name:"SUGGESTIONS",icon:(0,T.jsx)(As.uuU,{className:"auxiliary-panel__header__tab__icon--suggestion"}),isVisible:Boolean(e.codeFixSuggestion)}},s=Object.values(Nh).filter((e=>$(t[e])&&t[e].isVisible)),i=t=>e.activeAuxPanelMode===t&&s.includes(t);return(0,rt.useEffect)((()=>{s.includes(e.activeAuxPanelMode)||e.setActiveAuxPanelMode(Nh.TERMINAL)}),[e,s,e.activeAuxPanelMode]),(0,T.jsxs)("div",{className:"panel auxiliary-panel",children:[(0,T.jsxs)("div",{className:"panel__header",children:[(0,T.jsx)("div",{className:"auxiliary-panel__header__tabs",children:s.map((e=>t[e])).filter($).map((t=>{return(0,T.jsxs)("button",{tabIndex:-1,className:(0,cs.clsx)("auxiliary-panel__header__tab",{"auxiliary-panel__header__tab--active":e.activeAuxPanelMode===t.mode}),onClick:(s=t.mode,()=>e.setActiveAuxPanelMode(s)),children:[(0,T.jsx)("div",{className:"auxiliary-panel__header__tab__icon",children:t.icon}),(0,T.jsx)("div",{className:"auxiliary-panel__header__tab__title",children:t.name})]},t.mode);var s}))}),(0,T.jsxs)("div",{className:"auxiliary-panel__header__actions",children:[(0,T.jsx)("button",{className:"auxiliary-panel__header__action",onClick:()=>e.auxPanelDisplayState.toggleMaximize(),tabIndex:-1,title:"Toggle Expand/Collapse",children:e.auxPanelDisplayState.isMaximized?(0,T.jsx)(As.v4q,{}):(0,T.jsx)(As.g8U,{})}),(0,T.jsx)("button",{className:"auxiliary-panel__header__action",onClick:()=>e.auxPanelDisplayState.toggle(),tabIndex:-1,title:"Close",children:(0,T.jsx)(As.b0D,{})})]})]}),(0,T.jsxs)("div",{className:"panel__content",children:[i(Nh.TERMINAL)&&(0,T.jsx)("div",{className:"auxiliary-panel__content__tab",children:(0,T.jsx)(c_,{})}),i(Nh.SEARCH)&&(0,T.jsx)("div",{className:"auxiliary-panel__content__tab",children:(0,T.jsx)(u_,{})}),i(Nh.TEST_RUNNER)&&(0,T.jsx)("div",{className:"auxiliary-panel__content__tab",children:(0,T.jsx)(w_,{})}),i(Nh.CODE_FIX_SUGGESTION)&&(0,T.jsx)("div",{className:"auxiliary-panel__content__tab",children:(0,T.jsx)(F_,{})}),i(Nh.REFERENCES)&&(0,T.jsx)("div",{className:"auxiliary-panel__content__tab",children:(0,T.jsx)(U_,{})})]})]})}));var V_=s(42689);const B_=()=>(0,T.jsx)("div",{className:"icon color--package",children:(0,T.jsx)(As.jtq,{})}),$_=()=>(0,T.jsx)("div",{className:"icon color--class",children:"C"}),z_=()=>(0,T.jsx)("div",{className:"icon color--enumeration",children:"E"}),H_=()=>(0,T.jsx)("div",{className:"icon color--measure",children:"M"}),Y_=()=>(0,T.jsx)("div",{className:"icon color--unit",children:"u"}),W_=()=>(0,T.jsx)("div",{className:"icon color--profile",children:"P"}),K_=()=>(0,T.jsx)("div",{className:"icon icon--function color--function",children:(0,T.jsx)(As.eid,{})}),X_=()=>(0,T.jsx)("div",{className:"icon color--mapping",children:(0,T.jsx)(As.Zlt,{})}),Z_=()=>(0,T.jsx)("div",{children:(0,T.jsx)(As.UOT,{})}),q_=()=>(0,T.jsx)("div",{className:"icon icon--function color--native-function",children:(0,T.jsx)(As.eid,{})}),J_=()=>(0,T.jsx)("div",{className:"icon icon--property color--property",children:(0,T.jsx)(As.HXR,{})}),Q_=()=>(0,T.jsx)("div",{className:"icon color--diagram",children:(0,T.jsx)(As.oF7,{})}),eg=()=>(0,T.jsx)("div",{className:"icon icon--database",children:(0,T.jsx)(As.VHe,{})}),tg=()=>(0,T.jsx)("div",{className:"icon color--association color--pure-association",children:"A"}),sg=e=>{switch(e){case Ih.PACKAGE:return(0,T.jsx)(B_,{});case Ih.PROFILE:return(0,T.jsx)(W_,{});case Ih.CLASS:return(0,T.jsx)($_,{});case Ih.ASSOCIATION:return(0,T.jsx)(tg,{});case Ih.PROPERTY:case Ih.QUALIFIED_PROPERTY:return(0,T.jsx)(J_,{});case Ih.ENUMERATION:return(0,T.jsx)(z_,{});case Ih.MEASURE:return(0,T.jsx)(H_,{});case Ih.UNIT:return(0,T.jsx)(Y_,{});case Ih.FUNCTION:return(0,T.jsx)(K_,{});case Ih.NATIVE_FUNCTION:return(0,T.jsx)(q_,{});case Ih.DIAGRAM:return(0,T.jsx)(Q_,{});case Ih.DATABASE:return(0,T.jsx)(eg,{});case Ih.MAPPING:return(0,T.jsx)(X_,{});default:return(0,T.jsx)(Z_,{})}},ig=/^\w[\w$]*$/,ng=/^(?:(?:\w[\w$]*)::)*\w[\w$]*$/,ag=(0,at.Pi)((e=>{const{node:t}=e,s=l_(),i=yi(),n=t.data.li_attr.pureName??t.data.li_attr.pureId,a=t.data.li_attr.pureType===Ih.PACKAGE,[r,o]=(0,rt.useState)(a?Id(n):n),l=(0,rt.useRef)(null),c=Boolean(r.match(a?ng:ig)),d=(a?Id(n):n)===r,h=c?void 0:"Invalid path",u=()=>s.conceptTreeState.setNodeForRenameConcept(void 0),p=e=>{e.preventDefault(),d||s.conceptTreeState.renameConcept(t,r).catch(i.alertUnhandledError).finally((()=>u()))};return(0,T.jsx)(ls.Z,{open:!0,onClose:u,TransitionProps:{onEnter:()=>l.current?.focus()},classes:{container:"command-modal__container"},PaperProps:{classes:{root:"command-modal__inner-container"}},children:(0,T.jsxs)("div",{className:"modal modal--dark command-modal",children:[(0,T.jsx)("div",{className:"modal__title",children:"Rename concept"}),(0,T.jsxs)("div",{className:"command-modal__content",children:[(0,T.jsx)("form",{className:"command-modal__content__form",onSubmit:p,children:(0,T.jsxs)("div",{className:"input-group command-modal__content__input",children:[(0,T.jsx)("input",{ref:l,className:"input input--dark",onChange:e=>o(e.target.value),value:r,spellCheck:!1}),h&&(0,T.jsx)("div",{className:"input-group__error-message",children:h})]})}),(0,T.jsx)("button",{className:"command-modal__content__submit-btn btn--dark",disabled:Boolean(h),onClick:p,children:"Rename"})]})]})})})),rg=/^(?:(?:\w[\w$]*)::)*\w[\w$]*$/,og=(0,at.Pi)((e=>{const{node:t}=e,s=l_(),i=yi(),n=Od(t.data.li_attr.pureId)??"",[a,r]=(0,rt.useState)(n),o=(0,rt.useRef)(null),l=Boolean(a.match(rg)),c=n===a,d=l?void 0:"Invalid path",h=()=>s.conceptTreeState.setNodeForMoveElement(void 0),u=e=>{e.preventDefault(),c||s.conceptTreeState.movePackageableElements([K(t.data.li_attr,Ph)],a).catch(i.alertUnhandledError).finally((()=>h()))};return(0,T.jsx)(ls.Z,{open:!0,onClose:h,TransitionProps:{onEnter:()=>o.current?.focus()},classes:{container:"command-modal__container"},PaperProps:{classes:{root:"command-modal__inner-container"}},children:(0,T.jsxs)("div",{className:"modal modal--dark command-modal",children:[(0,T.jsx)("div",{className:"modal__title",children:"Move element"}),(0,T.jsxs)("div",{className:"command-modal__content",children:[(0,T.jsx)("form",{className:"command-modal__content__form",onSubmit:u,children:(0,T.jsxs)("div",{className:"input-group command-modal__content__input",children:[(0,T.jsx)("input",{ref:o,className:"input input--dark",onChange:e=>r(e.target.value),value:a,spellCheck:!1}),d&&(0,T.jsx)("div",{className:"input-group__error-message",children:d})]})}),(0,T.jsx)("button",{className:"command-modal__content__submit-btn btn--dark",disabled:Boolean(d),onClick:u,children:"Move"})]})]})})})),lg=(0,at.Pi)((0,rt.forwardRef)((function(e,t){const{node:s,viewConceptSource:i}=e,n=s.data.li_attr,a=n.pureType,r=l_(),o=yi();return(0,T.jsxs)(Ms,{ref:t,children:[n.pureType!==Ih.PROPERTY&&n.pureType!==Ih.QUALIFIED_PROPERTY&&(0,T.jsx)(Fs,{onClick:()=>{o.clipboardService.copyTextToClipboard(n.pureId).catch(o.alertUnhandledError)},children:"Copy Path"}),a===Ih.PACKAGE&&(0,T.jsx)(Fs,{onClick:()=>{(0,x.fl)(r.executeTests(s.data.li_attr.pureId)).catch(o.alertUnhandledError)},children:"Run Tests"}),a===Ih.FUNCTION&&(0,T.jsx)(Fs,{onClick:()=>{window.open(`${r.client.baseUrl}/execute?func=${n.pureId}&mode=${r.client.mode}`,"_blank")},children:"Service (JSON)"}),(n instanceof Rh||n instanceof Ph)&&(0,T.jsx)(Fs,{onClick:()=>{(n instanceof Ph||n instanceof Rh)&&r.findUsagesFromCoordinate(new Dh(n.file,Number.parseInt(n.line,10),Number.parseInt(n.column,10)))},children:"Find Usages"}),a!==Ih.PACKAGE&&(0,T.jsx)(Fs,{onClick:()=>i(s),children:"View Source"}),(0,T.jsx)(js,{}),(0,T.jsx)(Fs,{onClick:()=>r.conceptTreeState.setNodeForRenameConcept(s),children:"Rename"}),n instanceof Ph&&(0,T.jsx)(Fs,{onClick:()=>r.conceptTreeState.setNodeForMoveElement(s),children:"Move"})]})})));var cg;!function(e){e.UNSUPPORTED="UNSUPPORTED",e.CLASS="CLASS"}(cg=cg||(cg={}));const dg=e=>{const{node:t,level:s,stepPaddingInRem:i,onNodeSelect:n,innerProps:a}=e,[r,o]=(0,rt.useState)(!1),{onNodeOpen:l,onNodeExpand:c,onNodeCompress:d,viewConceptSource:h}=a,u=t.parent&&t.data.li_attr instanceof Rh&&t.data.li_attr.classPath!==t.parent.id,p=[Ih.PACKAGE,Ih.CLASS].includes(t.data.li_attr.pureType),m=t.data.li_attr.pureType===Ih.QUALIFIED_PROPERTY?(0,T.jsxs)(T.Fragment,{children:[t.label,(0,T.jsx)("span",{className:"explorer__package-tree__node__label__tag",children:"(...)"})]}):u?(0,T.jsxs)(T.Fragment,{children:[t.label,(0,T.jsx)("span",{className:"explorer__package-tree__node__label__tag",children:Id(K(t.data.li_attr,Rh).classPath)})]}):t.label.includes("(")?(0,T.jsxs)(T.Fragment,{children:[t.label.substring(0,t.label.indexOf("(")),(0,T.jsx)("span",{className:"explorer__package-tree__node__label__tag",children:t.label.substring(t.label.indexOf("("))})]}):t.label,_=()=>{t.isLoading||(t.isOpen?d(t):c(t))},[,g]=(0,V_.c)((()=>({type:"Class"===t.data.li_attr.pureType?cg.CLASS:cg.UNSUPPORTED,item:t.data})),[t]);return(0,T.jsx)(Ds,{content:(0,T.jsx)(lg,{node:t,viewConceptSource:h}),menuProps:{elevation:7},onOpen:()=>o(!0),onClose:()=>o(!1),children:(0,T.jsxs)("div",{className:(0,cs.clsx)("tree-view__node__container explorer__package-tree__node__container",{"explorer__package-tree__node__container--selected-from-context-menu":!t.isSelected&&r},{"explorer__package-tree__node__container--selected":t.isSelected}),onClick:e=>{e.stopPropagation(),e.preventDefault(),n?.(t)},ref:g,onDoubleClick:()=>{t.isLoading||(p&&_(),n?.(t),l(t))},style:{paddingLeft:s*(i??1)+"rem",display:"flex"},children:[(0,T.jsxs)("div",{className:"tree-view__node__icon explorer__package-tree__node__icon",children:[t.isLoading&&(0,T.jsx)("div",{className:"explorer__package-tree__node__icon__expand explorer__package-tree__node__icon__expand--is-loading",children:(0,T.jsx)(As.VRP,{})}),!t.isLoading&&(0,T.jsx)("div",{className:"explorer__package-tree__node__icon__expand",onClick:_,children:p?t.isOpen?(0,T.jsx)(As.v4q,{}):(0,T.jsx)(As.XCv,{}):(0,T.jsx)("div",{})}),(0,T.jsx)("div",{className:(0,cs.clsx)("explorer__package-tree__node__icon__type",{"explorer__package-tree__node__icon__type--property-from-association":u}),children:sg(t.data.li_attr.pureType)})]}),(0,T.jsx)("button",{className:"tree-view__node__label explorer__package-tree__node__label",tabIndex:-1,children:m})]})})},hg=(0,at.Pi)((()=>{const e=l_(),t=yi(),s=e.conceptTreeState,i=e.conceptTreeState.getTreeData();return(0,T.jsxs)("div",{className:"explorer__content",onClick:()=>s.setSelectedNode(void 0),children:[(0,T.jsx)(__,{components:{TreeNodeContainer:dg},treeData:i,onNodeSelect:e=>s.setSelectedNode(e),getChildNodes:e=>e.isLoading||!e.childrenIds?[]:e.childrenIds.map((e=>i.nodes.get(e))).filter($),innerProps:{onNodeOpen:e=>{(0,x.fl)(s.openNode(e)).catch(t.alertUnhandledError)},onNodeExpand:e=>{(0,x.fl)(s.expandNode(e)).catch(t.alertUnhandledError)},onNodeCompress:e=>{e.isOpen=!1,s.refreshTree()},viewConceptSource:s=>{const i=s.data.li_attr;(i instanceof Ph||i instanceof Rh)&&(0,x.fl)(e.directoryTreeState.revealPath(i.file,{forceOpenExplorerPanel:!0,coordinate:new Dh(i.file,Number.parseInt(i.line,10),Number.parseInt(i.column,10))})).catch(t.alertUnhandledError)}}}),s.nodeForRenameConcept&&(0,T.jsx)(ag,{node:s.nodeForRenameConcept}),s.nodeForMoveElement&&(0,T.jsx)(og,{node:s.nodeForMoveElement})]})})),ug=(0,at.Pi)((()=>{const e=l_(),t=yi(),s=e.conceptTreeState;return(0,T.jsxs)("div",{className:"panel explorer",children:[(0,T.jsx)("div",{className:"panel__header side-bar__header",children:(0,T.jsx)("div",{className:"panel__header__title",children:(0,T.jsx)("div",{className:"panel__header__title__content side-bar__header__title__content",children:"CONCEPTS"})})}),(0,T.jsx)("div",{className:"panel__content side-bar__content",children:(0,T.jsxs)("div",{className:"panel explorer",children:[(0,T.jsxs)("div",{className:"panel__header explorer__header",children:[(0,T.jsx)("div",{className:"panel__header__title"}),(0,T.jsxs)("div",{className:"panel__header__actions",children:[(0,T.jsx)("button",{className:"panel__header__action explorer__btn__refresh",onClick:()=>{(0,x.fl)(s.refreshTreeData()).catch(t.alertUnhandledError)},title:"Refresh Tree",children:(0,T.jsx)(As.DuK,{})}),(0,T.jsx)("button",{className:"panel__header__action",onClick:()=>{s.getTreeData().nodes.forEach((e=>{e.isOpen=!1})),s.setSelectedNode(void 0),s.refreshTree()},title:"Collapse All",children:(0,T.jsx)(As.jG4,{})})]})]}),(0,T.jsxs)("div",{className:"panel__content explorer__content__container",children:[(0,T.jsx)(Ss,{isLoading:s.loadInitialDataState.isInProgress}),s.loadInitialDataState.hasSucceeded&&(0,T.jsx)(hg,{}),!s.loadInitialDataState.hasSucceeded&&s.statusText&&(0,T.jsx)("div",{className:"explorer__content__container__message",children:s.statusText}),s.loadInitialDataState.hasFailed&&(0,T.jsx)(Bs,{children:"Failed to build concept tree. Make sure graph compiles"})]})]})})]})})),pg=/^\w+(?:\.\w+)*$/,mg=(0,at.Pi)((e=>{const{node:t}=e,s=l_(),i=yi(),[n,a]=(0,rt.useState)("untitled.pure"),r=(0,rt.useRef)(null),o=Boolean(n.match(pg)),l=!t.childrenIds?.map((e=>s.directoryTreeState.getTreeData().nodes.get(e))).filter((e=>e?.data.text===n)).length,c=o?l?void 0:"Already existed":"Invalid file name",d=()=>s.directoryTreeState.setNodeForCreateNewFile(void 0),h=e=>{e.preventDefault(),d(),(0,x.fl)(s.createNewFile(`${t.data.li_attr.path}/${n}`)).catch(i.alertUnhandledError)};return(0,T.jsx)(ls.Z,{open:!0,onClose:d,TransitionProps:{onEnter:()=>r.current?.focus()},classes:{container:"command-modal__container"},PaperProps:{classes:{root:"command-modal__inner-container"}},children:(0,T.jsxs)("div",{className:"modal modal--dark command-modal",children:[(0,T.jsx)("div",{className:"modal__title",children:"Create a new file"}),(0,T.jsxs)("div",{className:"command-modal__content",children:[(0,T.jsx)("form",{className:"command-modal__content__form",onSubmit:h,children:(0,T.jsxs)("div",{className:"input-group command-modal__content__input",children:[(0,T.jsx)("input",{ref:r,className:"input input--dark",onChange:e=>a(e.target.value),value:n,spellCheck:!1}),c&&(0,T.jsx)("div",{className:"input-group__error-message",children:c})]})}),(0,T.jsx)("button",{className:"command-modal__content__submit-btn btn--dark",disabled:Boolean(c),onClick:h,children:"Create"})]})]})})})),_g=/^\w+$/,gg=(0,at.Pi)((e=>{const{node:t}=e,s=l_(),i=yi(),[n,a]=(0,rt.useState)("untitled"),r=(0,rt.useRef)(null),o=Boolean(n.match(_g)),l=!t.childrenIds?.map((e=>s.directoryTreeState.getTreeData().nodes.get(e))).filter((e=>e?.data.text===n)).length,c=o?l?void 0:"Already existed":"Invalid directory name",d=()=>s.directoryTreeState.setNodeForCreateNewDirectory(void 0),h=e=>{e.preventDefault(),d(),(0,x.fl)(s.createNewDirectory(`${t.data.li_attr.path}/${n}`)).catch(i.alertUnhandledError)};return(0,T.jsx)(ls.Z,{open:!0,onClose:d,TransitionProps:{onEnter:()=>r.current?.focus()},classes:{container:"command-modal__container"},PaperProps:{classes:{root:"command-modal__inner-container"}},children:(0,T.jsxs)("div",{className:"modal modal--dark command-modal",children:[(0,T.jsx)("div",{className:"modal__title",children:"Create a new directory"}),(0,T.jsxs)("div",{className:"command-modal__content",children:[(0,T.jsx)("form",{className:"command-modal__content__form",onSubmit:h,children:(0,T.jsxs)("div",{className:"input-group command-modal__content__input",children:[(0,T.jsx)("input",{ref:r,className:"input input--dark",onChange:e=>a(e.target.value),value:n,spellCheck:!1}),c&&(0,T.jsx)("div",{className:"input-group__error-message",children:c})]})}),(0,T.jsx)("button",{className:"command-modal__content__submit-btn btn--dark",disabled:Boolean(c),onClick:h,children:"Create"})]})]})})})),Eg=/^\/?(?:\w+\/)*\w+(?:\.\w+)*$/,fg=(0,at.Pi)((e=>{const{node:t}=e,s=l_(),i=yi(),[n,a]=(0,rt.useState)(t.data.li_attr.path),r=(0,rt.useRef)(null),o=Boolean(n.match(Eg)),l=t.data.li_attr.path===n,c=o?void 0:"Invalid path",d=()=>s.directoryTreeState.setNodeForRenameFile(void 0),h=e=>{e.preventDefault(),l||(d(),(0,x.fl)(s.renameFile(t.data.li_attr.path,n)).catch(i.alertUnhandledError))};return(0,T.jsx)(ls.Z,{open:!0,onClose:d,TransitionProps:{onEnter:()=>r.current?.focus()},classes:{container:"command-modal__container"},PaperProps:{classes:{root:"command-modal__inner-container"}},children:(0,T.jsxs)("div",{className:"modal modal--dark command-modal",children:[(0,T.jsx)("div",{className:"modal__title",children:"Rename file"}),(0,T.jsxs)("div",{className:"command-modal__content",children:[(0,T.jsx)("form",{className:"command-modal__content__form",onSubmit:h,children:(0,T.jsxs)("div",{className:"input-group command-modal__content__input",children:[(0,T.jsx)("input",{ref:r,className:"input input--dark",onChange:e=>a(e.target.value),value:n,spellCheck:!1}),c&&(0,T.jsx)("div",{className:"input-group__error-message",children:c})]})}),(0,T.jsx)("button",{className:"command-modal__content__submit-btn btn--dark",disabled:Boolean(c),onClick:h,children:"Rename"})]})]})})})),Tg=(0,at.Pi)((0,rt.forwardRef)((function(e,t){const{node:s}=e,i=yi(),n=l_(),a=s.data.isFolderNode,r=Boolean(s.data.children);return(0,T.jsxs)(Ms,{ref:t,children:[(0,T.jsx)(Fs,{onClick:()=>{i.clipboardService.copyTextToClipboard(s.data.li_attr.path).catch(i.alertUnhandledError)},children:"Copy Path"}),(0,T.jsx)(js,{}),a&&(0,T.jsx)(Fs,{onClick:()=>n.directoryTreeState.setNodeForCreateNewFile(s),children:"New File"}),a&&(0,T.jsx)(Fs,{onClick:()=>n.directoryTreeState.setNodeForCreateNewDirectory(s),children:"New Directory"}),!a&&(0,T.jsx)(Fs,{onClick:()=>n.directoryTreeState.setNodeForRenameFile(s),children:"Rename"}),(0,T.jsx)(Fs,{disabled:Boolean(s.data instanceof nu&&s.data.children),onClick:()=>{(0,x.fl)(n.deleteDirectoryOrFile(s.data.li_attr.path,a,r)).catch(i.alertUnhandledError)},children:"Delete"})]})}))),Cg=e=>{const{node:t,level:s,stepPaddingInRem:i,onNodeSelect:n,innerProps:a}=e,[r,o]=(0,rt.useState)(!1),{onNodeOpen:l,onNodeExpand:c,onNodeCompress:d}=a,h=t.data instanceof nu&&t.data.isRepoNode&&"/platform"===t.data.li_attr.path,u=t.data.li_attr.RO,p=t.data.isFolderNode,m=t.data instanceof nu&&!t.data.children,_=h||t.data.isRepoNode&&t.data.li_attr.path.startsWith("/platform_")?(0,T.jsx)(As.R0,{className:"explorer__icon--readonly"}):p?m?(0,T.jsx)(As.ROc,{className:(0,cs.clsx)("explorer__icon--folder",{"explorer__icon--readonly":u})}):t.isOpen?(0,T.jsx)(As.ry,{className:(0,cs.clsx)("explorer__icon--folder",{"explorer__icon--readonly":u})}):(0,T.jsx)(As.ROc,{className:(0,cs.clsx)("explorer__icon--folder",{"explorer__icon--readonly":u})}):(0,T.jsx)(As.QqN,{className:(0,cs.clsx)("explorer__icon--file",{"explorer__icon--readonly":u})}),g=()=>{m||t.isLoading||(t.isOpen?d(t):c(t))};return(0,T.jsx)(Ds,{content:(0,T.jsx)(Tg,{node:t}),menuProps:{elevation:7},onOpen:()=>o(!0),onClose:()=>o(!1),children:(0,T.jsxs)("div",{className:(0,cs.clsx)("tree-view__node__container explorer__package-tree__node__container",{"explorer__package-tree__node__container--selected-from-context-menu":!t.isSelected&&r},{"explorer__package-tree__node__container--selected":t.isSelected}),onClick:e=>{e.stopPropagation(),e.preventDefault(),n?.(t)},onDoubleClick:()=>{t.isLoading||(p?g():l(t))},style:{paddingLeft:s*(i??1)+"rem",display:"flex"},children:[(0,T.jsxs)("div",{className:"tree-view__node__icon explorer__package-tree__node__icon",children:[t.isLoading&&(0,T.jsx)("div",{className:"explorer__package-tree__node__icon__expand explorer__package-tree__node__icon__expand--is-loading",children:(0,T.jsx)(As.VRP,{})}),!t.isLoading&&(0,T.jsx)("div",{className:"explorer__package-tree__node__icon__expand",onClick:g,children:!p||m?(0,T.jsx)("div",{}):t.isOpen?(0,T.jsx)(As.v4q,{}):(0,T.jsx)(As.XCv,{})}),(0,T.jsx)("div",{className:"explorer__package-tree__node__icon__type",children:_})]}),(0,T.jsx)("button",{className:"tree-view__node__label explorer__package-tree__node__label",tabIndex:-1,children:h?"platform":t.label})]})})},xg=(0,at.Pi)((()=>{const e=l_(),t=yi(),s=e.directoryTreeState,i=e.directoryTreeState.getTreeData();return(0,T.jsxs)("div",{className:"explorer__content",onClick:()=>s.setSelectedNode(void 0),children:[(0,T.jsx)(__,{components:{TreeNodeContainer:Cg},treeData:i,onNodeSelect:e=>s.setSelectedNode(e),getChildNodes:e=>e.isLoading||!e.childrenIds?[]:e.childrenIds.map((e=>i.nodes.get(e))).filter($),innerProps:{onNodeOpen:e=>{(0,x.fl)(s.openNode(e)).catch(t.alertUnhandledError)},onNodeExpand:e=>{(0,x.fl)(s.expandNode(e)).catch(t.alertUnhandledError)},onNodeCompress:e=>{e.isOpen=!1,s.refreshTree()}}}),s.nodeForCreateNewFile&&(0,T.jsx)(mg,{node:s.nodeForCreateNewFile}),s.nodeForCreateNewDirectory&&(0,T.jsx)(gg,{node:s.nodeForCreateNewDirectory}),s.nodeForRenameFile&&(0,T.jsx)(fg,{node:s.nodeForRenameFile})]})})),Sg=(0,at.Pi)((()=>{const e=l_(),t=yi(),s=e.directoryTreeState;return(0,T.jsxs)("div",{className:"panel explorer",children:[(0,T.jsx)("div",{className:"panel__header side-bar__header",children:(0,T.jsx)("div",{className:"panel__header__title",children:(0,T.jsx)("div",{className:"panel__header__title__content side-bar__header__title__content",children:"FILES"})})}),(0,T.jsx)("div",{className:"panel__content side-bar__content",children:(0,T.jsxs)("div",{className:"panel explorer",children:[(0,T.jsxs)("div",{className:"panel__header explorer__header",children:[(0,T.jsx)("div",{className:"panel__header__title"}),(0,T.jsxs)("div",{className:"panel__header__actions",children:[(0,T.jsx)("button",{className:"panel__header__action explorer__btn__refresh",onClick:()=>{(0,x.fl)(s.refreshTreeData()).catch(t.alertUnhandledError)},title:"Refresh Tree",children:(0,T.jsx)(As.DuK,{})}),(0,T.jsx)("button",{className:"panel__header__action",onClick:()=>{const i=e.tabManagerState.currentTab;i instanceof Qh&&(0,x.fl)(s.revealPath(i.filePath)).catch(t.alertUnhandledError)},title:"Focus",children:(0,T.jsx)(As.cOE,{})}),(0,T.jsx)("button",{className:"panel__header__action",onClick:()=>{s.getTreeData().nodes.forEach((e=>{e.isOpen=!1})),s.setSelectedNode(void 0),s.refreshTree()},title:"Collapse All",children:(0,T.jsx)(As.jG4,{})})]})]}),(0,T.jsxs)("div",{className:"panel__content explorer__content__container",children:[(0,T.jsx)(Ss,{isLoading:s.loadInitialDataState.isInProgress}),s.loadInitialDataState.hasSucceeded&&(0,T.jsx)(xg,{}),s.loadInitialDataState.hasFailed&&(0,T.jsx)(Bs,{children:"Failed to build directory tree"})]})]})})]})})),Ng=(0,at.Pi)((()=>{const e=l_();return(0,T.jsx)("div",{className:"side-bar",children:(0,T.jsx)("div",{className:(0,cs.clsx)("side-bar__view","side-bar__view--active"),children:(()=>{switch(e.activeActivity){case Sh.CONCEPT_EXPLORER:return(0,T.jsx)(ug,{});case Sh.FILE_EXPLORER:return(0,T.jsx)(Sg,{});default:return null}})()},e.activeActivity)})})),Ag=e=>{const{className:t}=e;return(0,T.jsx)("div",{className:(0,cs.clsx)("logo",t),children:(0,T.jsxs)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",width:"1em",height:"1em",viewBox:"0 0 215 215",xmlns:"https://www.w3.org/2000/svg",children:[(0,T.jsx)("g",{transform:"matrix(1.0246,0,0,0.999998,1.03751,2.43115)",children:(0,T.jsx)("path",{d:"M141.9,86.5L141.9,68.1C141.9,66.5 140.7,65.2 139.1,65.2L66.5,65.2C64.9,65.2 63.7,66.5 63.7,68.1L63.7,86.5C63.7,88.1 64.9,89.4 66.5,89.4L139.1,89.4C140.7,89.4 141.9,88.1 141.9,86.5Z"})}),(0,T.jsx)("g",{transform:"matrix(1.0246,0,0,0.999998,1.03751,2.43115)",children:(0,T.jsx)("path",{d:"M118.4,116.9L118.4,98.5C118.4,96.9 117.5,95.6 116.4,95.6L65.7,95.6C64.6,95.6 63.7,96.9 63.7,98.5L63.7,116.9C63.7,118.5 64.6,119.8 65.7,119.8L116.5,119.8C117.6,119.8 118.4,118.6 118.4,116.9Z"})}),(0,T.jsx)("g",{transform:"matrix(1.0246,0,0,0.999998,1.03751,2.43115)",children:(0,T.jsx)("path",{d:"M141.9,147.3L141.9,129C141.9,127.4 140.7,126.1 139.1,126.1L66.5,126.1C64.9,126.1 63.7,127.4 63.7,129L63.7,147.4C63.7,149 64.9,150.3 66.5,150.3L139.1,150.3C140.7,150.3 141.9,149 141.9,147.3Z"})}),(0,T.jsx)("g",{transform:"matrix(1.0246,0,0,0.999998,1.03751,2.43115)",children:(0,T.jsx)("path",{d:"M205,170.7L152.7,139.1C150,137.4 147.7,138.7 147.7,141.9L147.7,157.9L55.8,157.9L55.8,59.4L67.2,59.4C70.4,59.4 71.7,57.2 70,54.4L38.4,2.1C36.7,-0.6 34.1,-0.6 32.4,2.1L0.7,54.4C-1,57.1 0.3,59.4 3.5,59.4L15.6,59.4L15.6,185.5C15.6,188.5 18,190.9 21,190.9L147.7,190.9L147.7,205.7C147.7,208.9 149.9,210.1 152.7,208.5L205,176.9C207.7,175.1 207.7,172.4 205,170.7Z"})})]})})},vg=(0,at.Pi)((()=>{const e=l_(),t=t=>()=>e.setActiveActivity(t),s=[{mode:Sh.CONCEPT_EXPLORER,title:"Concept Explorer",icon:(0,T.jsx)(As.DE2,{})},{mode:Sh.FILE_EXPLORER,title:"File Explorer",icon:(0,T.jsx)(As.QqN,{})}].filter((e=>Boolean(e)));return(0,T.jsxs)("div",{className:"activity-bar",children:[(0,T.jsx)("div",{className:"activity-bar__logo",children:(0,T.jsx)(Ag,{})}),(0,T.jsx)("div",{className:"activity-bar__items",children:s.map((s=>(0,T.jsx)("button",{className:(0,cs.clsx)("activity-bar__item",{"activity-bar__item--active":e.sideBarDisplayState.isOpen&&e.activeActivity===s.mode}),onClick:t(s.mode),tabIndex:-1,title:`${s.title}${s.info?` - ${s.info}`:""}`,children:s.icon},s.mode)))})]})})),Ig=(0,at.Pi)((e=>{const{fileEditorState:t}=e,s=t.textEditorState.cursorObserver,i=s?.selection?t.textEditorState.model.getValueInRange(s.selection).length:0;return(0,T.jsx)("div",{className:"file-editor__status-bar",children:s?.position&&(0,T.jsx)("button",{className:"editor__status-bar__action file-editor__status-bar__cursor-info",onClick:()=>t.setShowGoToLinePrompt(!0),tabIndex:-1,title:"Go to Line/Column",children:`Ln ${s.position.lineNumber}, Col ${s.position.column} ${i?` (${i} selected)`:""}`})})})),Og=(0,at.Pi)((()=>{const e=l_(),t=yi();return(0,T.jsxs)("div",{className:"editor__status-bar",children:[(0,T.jsx)("div",{className:"editor__status-bar__left",children:(0,T.jsx)("div",{className:"editor__status-bar__workspace"})}),(0,T.jsxs)("div",{className:"editor__status-bar__right",children:[e.tabManagerState.currentTab instanceof Qh&&(0,T.jsx)(Ig,{fileEditorState:e.tabManagerState.currentTab}),(0,T.jsx)("button",{className:(0,cs.clsx)("editor__status-bar__action editor__status-bar__compile-btn",{"editor__status-bar__compile-btn--wiggling":e.executionState.isInProgress}),disabled:e.initState.isInInitialState||e.executionState.isInProgress,onClick:()=>{(0,x.fl)(e.executeGo()).catch(t.alertUnhandledError)},tabIndex:-1,title:"Execute (F9)",children:(0,T.jsx)(As.pgN,{})}),(0,T.jsx)("button",{className:(0,cs.clsx)("editor__status-bar__action editor__status-bar__action__toggler",{"editor__status-bar__action__toggler--active":Boolean(e.auxPanelDisplayState.isOpen)}),onClick:()=>e.auxPanelDisplayState.toggle(),tabIndex:-1,title:"Toggle auxiliary panel",children:(0,T.jsx)(As.FxN,{})}),(0,T.jsx)("button",{className:(0,cs.clsx)("editor__status-bar__action editor__status-bar__action__toggler",{"editor__status-bar__action__toggler--active":!t.assistantService.isHidden}),onClick:()=>t.assistantService.toggleAssistant(),tabIndex:-1,title:"Toggle assistant",children:(0,T.jsx)(As.UHp,{})})]})]})})),yg=e=>{(0,rt.useEffect)((()=>(e.registerCommands(),()=>e.deregisterCommands())),[e])},Rg=/[0-9]+(?::[0-9]+)?/,Pg=(0,at.Pi)((e=>{const{fileEditorState:t}=e,[s,i]=(0,rt.useState)(""),n=(0,rt.useRef)(null),a=Boolean(s.match(Rg)),r=t.textEditorState.editor?.getPosition(),[o,l]=(e=>{const t=e.split(":");return t.length<1||t.length>2?[1,void 0]:[V((()=>parseInt(H(P(t)))))??1,V((()=>parseInt(H(w(t)))))]})(s),c=1<=o&&o<=t.textEditorState.model.getLineCount(),d=a?c?void 0:"Invalid line number":"Invalid value (format [line:column] - e.g. 123:45)",h=()=>t.setShowGoToLinePrompt(!1),u=e=>{e.preventDefault(),h(),t.textEditorState.setForcedCursorPosition({lineNumber:o,column:l??1})};return(0,T.jsx)(ls.Z,{open:!0,onClose:h,TransitionProps:{onEnter:()=>n.current?.focus()},classes:{container:"command-modal__container"},PaperProps:{classes:{root:"command-modal__inner-container"}},children:(0,T.jsxs)("div",{className:"modal modal--dark command-modal",children:[(0,T.jsx)("div",{className:"modal__title",children:"Go to..."}),(0,T.jsxs)("div",{className:"command-modal__content",children:[(0,T.jsx)("form",{className:"command-modal__content__form",onSubmit:u,children:(0,T.jsxs)("div",{className:"input-group command-modal__content__input",children:[(0,T.jsx)("input",{ref:n,className:"input input--dark",onChange:e=>i(e.target.value),placeholder:r?`Current Line: ${r.lineNumber}, Col: ${r.column}. Type a line between 1 and ${t.textEditorState.model.getLineCount()} to navigate to`:void 0,value:s,spellCheck:!1}),""!==s&&d&&(0,T.jsx)("div",{className:"input-group__error-message",children:d})]})}),(0,T.jsx)("button",{className:"command-modal__content__submit-btn btn--dark",disabled:""===s||Boolean(d),onClick:u,children:"Go"})]})]})})})),wg=(0,at.Pi)((e=>{const{editorState:t}=e,s=l_(),i=yi(),n=(0,rt.useRef)(null),[a,r]=(0,rt.useState)(),{ref:o,width:l,height:c}=(0,Vs.NB)();return(0,rt.useEffect)((()=>{if(!a&&n.current){const e=n.current,s=S.editor.create(e,{contextmenu:!1,copyWithSyntaxHighlighting:!1,fontSize:14,fontFamily:"Roboto Mono",fontLigatures:!0,fixedOverflowWidgets:!0,detectIndentation:!1,tabSize:2,"bracketPairColorization.enabled":!1,theme:A.LEGEND,wordWrap:t.textEditorState.wrapText?"on":"off",readOnly:t.file.RO});s.onDidChangeModelContent((()=>{const e=s.getValue();e!==t.file.content&&t.clearError(),t.file.setContent(e)})),s.onDidChangeCursorPosition((()=>{t.textEditorState.notifyCursorObserver()})),s.onDidChangeCursorSelection((()=>{t.textEditorState.notifyCursorObserver()})),s.setModel(t.textEditorState.model),t.textEditorState.viewState&&s.restoreViewState(t.textEditorState.viewState),s.focus(),t.textEditorState.setEditor(s),r(s)}}),[s,i,t,a]),yg(t),(0,rt.useEffect)((()=>{void 0!==l&&void 0!==c&&a?.layout({width:l,height:c})}),[a,l,c]),(0,rt.useEffect)((()=>{a&&t.textEditorState.forcedCursorPosition&&(Ah(a,t.textEditorState.forcedCursorPosition),t.textEditorState.setForcedCursorPosition(void 0))}),[a,t,t.textEditorState.forcedCursorPosition]),(0,rt.useEffect)((()=>()=>{a&&(t.textEditorState.setViewState(a.saveViewState()??void 0),a.dispose())}),[t,a]),(0,T.jsxs)("div",{className:"panel edit-panel file-editor",children:[(0,T.jsx)("div",{className:"panel__header file-editor__header",children:(0,T.jsxs)("div",{className:"file-editor__header__actions",children:[(0,T.jsx)("button",{className:(0,cs.clsx)("file-editor__header__action",{"file-editor__header__action--active":t.textEditorState.wrapText}),tabIndex:-1,onClick:()=>t.textEditorState.setWrapText(!t.textEditorState.wrapText),title:"Toggle Text Wrap",children:(0,T.jsx)(As.NK0,{className:"file-editor__icon--text-wrap"})}),t.showGoToLinePrompt&&(0,T.jsx)(Pg,{fileEditorState:t})]})}),(0,T.jsx)("div",{className:"panel__content file-editor__content",children:(0,T.jsx)("div",{ref:o,className:"text-editor__container",children:(0,T.jsx)("div",{className:"text-editor__body",ref:n})})})]})})),Lg=(e,t,s=!1)=>{if(s)return t.map((e=>`${e}.pure`)).includes(e);const i=H(P(e.split(".")));return t.includes(i)};class bg{pureType;pureId;pureName;text;requiredClassProperties=[]}(0,He.yu)(bg,{pureType:(0,He.Ru)(),pureId:(0,He.Ru)(),pureName:(0,He.Ru)(),text:(0,He.Ru)(),requiredClassProperties:(0,He.jt)((0,He.pb)((0,He.Ru)()))});class Dg{pureType;pureName;owner;ownerPureType}(0,He.yu)(Dg,{pureType:(0,He.Ru)(),pureName:(0,He.Ru)(),owner:(0,He.Ru)(),ownerPureType:(0,He.Ru)()});class Mg{pureId;pureName;requiredClassProperties=[]}(0,He.yu)(Mg,{pureId:(0,He.Ru)(),pureName:(0,He.Ru)(),requiredClassProperties:(0,He.jt)((0,He.pb)((0,He.Ru)()))});class Fg{name}(0,He.yu)(Fg,{name:(0,He.Ru)()});const jg="Diagram",kg="Diagram",Ug=()=>{const e=[];return e.push({label:{label:"/copyright",description:"(copyright header)"},kind:S.languages.CompletionItemKind.Snippet,insertTextRules:S.languages.CompletionItemInsertTextRule.InsertAsSnippet,insertText:`// Copyright \${1:${(new Date).getFullYear()}} Goldman Sachs\n//\n// Licensed under the Apache License, Version 2.0 (the "License");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an "AS IS" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n`,range:{startLineNumber:1,startColumn:1,endLineNumber:1,endColumn:1e3}}),e},Gg=e=>({label:{label:e.pureName,description:e.pureId},kind:S.languages.CompletionItemKind.Class,filterText:e.pureName,insertTextRules:S.languages.CompletionItemInsertTextRule.InsertAsSnippet,insertText:`${e.pureName}(${e.requiredClassProperties.map(((e,t)=>`${e}=\${${t+1}:}`)).join(",")})`}),Vg=(e,t)=>{const s=e.pureType,i=s===Ih.FUNCTION||s===Ih.NATIVE_FUNCTION?((e,t,s)=>{const i=Id(t),n=V((()=>i.substring(i.indexOf("_"),i.length-1))),a=n?.split("__")??[];return a.pop(),s&&a.shift(),`${e}(${a.map(((e,t)=>`\${${t+1}:}`)).join(",")})`})(e.pureName,e.pureId,Boolean(t?.preferArrowFunctionForm)):e.pureName,n=s===Ih.PACKAGE?S.languages.CompletionItemKind.Folder:s===Ih.CLASS?S.languages.CompletionItemKind.Class:s===Ih.FUNCTION?S.languages.CompletionItemKind.Function:s===Ih.ENUMERATION?S.languages.CompletionItemKind.Enum:s===Ih.PROFILE?S.languages.CompletionItemKind.Module:s===Ih.ASSOCIATION?S.languages.CompletionItemKind.Interface:S.languages.CompletionItemKind.Value;return{label:{label:e.pureName,description:e.text},kind:n,filterText:e.pureName,insertTextRules:S.languages.CompletionItemInsertTextRule.InsertAsSnippet,insertText:i,sortText:s===Ih.PACKAGE?`zzzz_${e.text}`:e.text}},Bg=/(?<incompletePath>(?:\w[\w$]*::)+$)/,$g=/->\s*(?:\w[\w$]*::)+$/,zg=/\^\s*(?:\w[\w$]*::)+$/,Hg=/^\s*import\s+(?:(?<importPath>(?:(?:\w[\w$]*)::)*\w[\w$]*)::*)/,Yg=(e,t)=>{const s=t.getValueInRange({startLineNumber:1,startColumn:1,endLineNumber:e.lineNumber,endColumn:e.column}),i=`${Te}${Ge.PURE}\n${s}`.split("\n");return i.slice(i.map((e=>e.startsWith(Te))).lastIndexOf(!0)).map((e=>e.match(Hg)?.groups?.importPath)).filter($)},Wg=/->\s*(?:\w[\w$]*)?$/,Kg=/\^\s*(?:\w[\w$]*)?$/,Xg=/^(?<owner>(?:(?:\w[\w$]*)::)*\w[\w$]*)\s*.$/,Zg=(e,t)=>({label:e.name,kind:S.languages.CompletionItemKind.Variable,insertTextRules:S.languages.CompletionItemInsertTextRule.InsertAsSnippet,sortText:t?e.name:`zzzz_${e.name}`,insertText:e.name}),qg=/^\w[\w$]*$/,Jg=(0,at.Pi)((e=>{const{renameConceptState:t}=e,s=yi(),i=t.fileEditorState,n=t.concept.pureName,[a,r]=(0,rt.useState)(n),o=(0,rt.useRef)(null),l=Boolean(a.match(qg)),c=n===a,d=l?void 0:"Invalid concept name",h=()=>{(0,x.fl)(i.setConceptToRenameState(void 0)).catch(s.alertUnhandledError)},u=e=>{e.preventDefault(),c||i.renameConcept(a).catch(s.alertUnhandledError).finally((()=>h()))};return(0,T.jsx)(ls.Z,{open:!0,onClose:h,TransitionProps:{onEnter:()=>o.current?.focus()},classes:{container:"command-modal__container"},PaperProps:{classes:{root:"command-modal__inner-container"}},children:(0,T.jsxs)("div",{className:"modal modal--dark command-modal",children:[(0,T.jsx)("div",{className:"modal__title",children:"Rename concept"}),(0,T.jsxs)("div",{className:"command-modal__content",children:[(0,T.jsx)("form",{className:"command-modal__content__form",onSubmit:u,children:(0,T.jsxs)("div",{className:"input-group command-modal__content__input",children:[(0,T.jsx)("input",{ref:o,className:"input input--dark",onChange:e=>r(e.target.value),value:a,spellCheck:!1}),d&&(0,T.jsx)("div",{className:"input-group__error-message",children:d})]})}),(0,T.jsx)("button",{className:"command-modal__content__submit-btn btn--dark",disabled:Boolean(d),onClick:u,children:"Rename"})]})]})})})),Qg=(0,at.Pi)((e=>{const{editorState:t}=e,s=(0,rt.useRef)(void 0),i=(0,rt.useRef)(void 0),n=(0,rt.useRef)(void 0),a=(0,rt.useRef)(null),[r,o]=(0,rt.useState)(),[l,c]=(0,rt.useState)(!1),d=l_(),h=yi(),{ref:u,width:p,height:m}=(0,Vs.NB)();return(0,rt.useEffect)((()=>{if(!r&&a.current){const e=a.current,s=S.editor.create(e,{contextmenu:!1,copyWithSyntaxHighlighting:!1,fontSize:14,fontFamily:"Roboto Mono",fontLigatures:!0,fixedOverflowWidgets:!0,detectIndentation:!1,tabSize:2,"bracketPairColorization.enabled":!1,language:v.PURE,theme:A.LEGEND,wordSeparators:"`~!@#%^&*()-=+[{]}\\|;:'\",.<>/?",wordWrap:t.textEditorState.wrapText?"on":"off",readOnly:t.file.RO,contextmenu:!0,useShadowDOM:!1});s._codeEditorService.openCodeEditor=async()=>{const e=s.getPosition();e&&(0,x.fl)(d.executeNavigation(new Dh(t.filePath,e.lineNumber,e.column))).catch(h.alertUnhandledError)},s.updateOptions({gotoLocation:{multiple:"goto",multipleDefinitions:"goto",alternativeDefinitionCommand:"DUMMY"}}),s.onContextMenu((()=>c(!0))),s.addAction({id:Kh.FIND_USAGES,label:"Find Usages",contextMenuGroupId:"navigation",contextMenuOrder:1e3,run:function(e){const s=e.getPosition();if(s){const e=new Dh(t.filePath,s.lineNumber,s.column);t.findConceptUsages(e)}}}),s.addAction({id:Kh.REVEAL_CONCEPT_IN_TREE,label:"Reveal Concept",contextMenuGroupId:"navigation",contextMenuOrder:1e3,run:function(e){const s=e.getPosition();s&&d.revealConceptInTree(new Dh(t.filePath,s.lineNumber,s.column)).catch(h.alertUnhandledError)}}),s.addAction({id:Kh.RENAME_CONCEPT,label:"Rename",contextMenuGroupId:"navigation",contextMenuOrder:1e3,run:function(e){const s=e.getPosition();if(s){if(!t.textEditorState.model.getWordAtPosition(s))return;const e=new Dh(t.filePath,s.lineNumber,s.column);(0,x.fl)(t.setConceptToRenameState(e)).catch(d.applicationStore.alertUnhandledError)}}}),s.onDidChangeModelContent((()=>{const e=s.getValue();e!==t.file.content&&t.clearError(),t.file.setContent(e)})),s.onDidChangeCursorPosition((()=>{t.textEditorState.notifyCursorObserver()})),s.onDidChangeCursorSelection((()=>{t.textEditorState.notifyCursorObserver()})),s.setModel(t.textEditorState.model),t.textEditorState.viewState&&s.restoreViewState(t.textEditorState.viewState),s.focus(),t.textEditorState.setEditor(s),o(s)}}),[d,h,t,r]),s.current?.dispose(),s.current=S.languages.registerDefinitionProvider(v.PURE,{provideDefinition:(e,s)=>{const i=e.getLineContent(s.lineNumber),n=S.editor.tokenize(i,v.PURE)[0];if(!n)return[];let a,r;for(let e=1;e<=n.length;++e){const t=e===n.length?i.length:H(n[e]).offset;if(t+1>s.column){a=H(n[e-1]),r={startLineNumber:s.lineNumber,startColumn:a.offset+1,endLineNumber:s.lineNumber,endColumn:t+1};break}}return a&&r&&Lg(a.type,[Be.TYPE,Be.VARIABLE,Be.PROPERTY,Be.PARAMETER,Be.IDENTIFIER])?[{uri:t.textEditorState.model.uri,range:r}]:[]}}),i.current?.dispose(),i.current=S.languages.registerCompletionItemProvider(v.PURE,{triggerCharacters:["/","#",":",">",".","@","^","$"],provideCompletionItems:async(e,s,i)=>{let n=[];if(i.triggerKind===S.languages.CompletionTriggerKind.TriggerCharacter)switch(i.triggerCharacter){case"/":n=n.concat(Ug());break;case"#":n=n.concat(((e,t,s)=>{const i=[],n=t.getWordUntilPosition(e),a={startLineNumber:e.lineNumber,startColumn:1,endLineNumber:e.lineNumber,endColumn:n.endColumn};var r;return r=t.getValueInRange(a).trim(),Boolean(r.match(/\s/))||s.forEach((e=>{i.push({label:{label:`${Te}${e.text}`,description:e.description},kind:S.languages.CompletionItemKind.Keyword,insertText:`${Te}${e.insertText}\n`,range:a,documentation:e.documentation?e.documentation.markdownText?{value:e.documentation.markdownText.value}:e.documentation.text:void 0})})),i})(s,e,[{text:Ge.PURE,description:"(core Pure)",insertText:Ge.PURE},{text:Ge.MAPPING,description:"(dsl)",insertText:Ge.MAPPING},{text:Ge.CONNECTION,description:"(dsl)",insertText:Ge.CONNECTION},{text:Ge.RUNTIME,description:"(dsl)",insertText:Ge.RUNTIME},{text:Ge.RELATIONAL,description:"(external store)",insertText:Ge.RELATIONAL},{text:jg,description:"(dsl)",insertText:kg}]));break;case":":n=n.concat(await(async(e,t,s)=>{const i=t.getLineContent(e.lineNumber).substring(0,e.column-1).match(Bg);if(i?.groups?.incompletePath){const n=Boolean(t.getLineContent(e.lineNumber).substring(0,e.column-1).match($g)),a=Boolean(t.getLineContent(e.lineNumber).substring(0,e.column-1).match(zg));let r=[];try{r=(await s.client.getSuggestionsForIncompletePath(i.groups.incompletePath.substring(0,i.groups.incompletePath.length-fe.length),a?[Ih.CLASS]:n?[Ih.FUNCTION,Ih.NATIVE_FUNCTION]:[])).map((e=>(0,He.vB)(bg,e)))}catch{}return r.map((e=>a?Gg(e):Vg(e,{preferArrowFunctionForm:n})))}return[]})(s,e,d));break;case">":n=n.concat(await(async(e,t,s)=>{const i=Yg(e,t);let n=[];try{n=(await s.client.getSuggestionsForIdentifier(i,[Ih.FUNCTION,Ih.NATIVE_FUNCTION])).map((e=>(0,He.vB)(bg,e)))}catch{}return n.map((e=>Vg(e,{preferArrowFunctionForm:!0})))})(s,e,d));break;case".":n=n.concat(await(async(e,t,s)=>{const i=t.getLineContent(e.lineNumber).substring(0,e.column-1).match(Xg),n=Yg(e,t);if(i?.groups?.owner){let e=[];try{e=(await s.client.getSuggestionsForAttribute(n,i.groups.owner)).map((e=>(0,He.vB)(Dg,e)))}catch{}return e.map((e=>(e=>{const t=e.pureType,s=t===Ih.PROPERTY||t===Ih.QUALIFIED_PROPERTY?`${e.pureName}(\${1:})`:e.pureName,i=t===Ih.PROPERTY?S.languages.CompletionItemKind.Property:t===Ih.QUALIFIED_PROPERTY?S.languages.CompletionItemKind.Method:t===Ih.TAG?S.languages.CompletionItemKind.Constant:t===Ih.STEREOTYPE?S.languages.CompletionItemKind.Value:t===Ih.ENUM_VALUE?S.languages.CompletionItemKind.Enum:S.languages.CompletionItemKind.Value;return{label:{label:e.pureName,description:`${e.owner}.${e.pureName}`},kind:i,filterText:e.pureName,insertTextRules:S.languages.CompletionItemInsertTextRule.InsertAsSnippet,insertText:s}})(e)))}return[]})(s,e,d));break;case"^":n=n.concat(await(async(e,t,s)=>{const i=Yg(e,t);let n=[];try{n=(await s.client.getSuggestionsForClass(i)).map((e=>(0,He.vB)(Mg,e)))}catch{}return n.map((e=>Gg(e)))})(s,e,d));break;case"@":n=n.concat(await(async(e,t,s)=>{const i=Yg(e,t);let n=[];try{n=(await s.client.getSuggestionsForClass(i)).map((e=>(0,He.vB)(Mg,e)))}catch{}return n.map((e=>(e=>({label:{label:e.pureName,description:e.pureId},kind:S.languages.CompletionItemKind.Class,filterText:e.pureName,insertTextRules:S.languages.CompletionItemInsertTextRule.InsertAsSnippet,insertText:e.pureName}))(e)))})(s,e,d));break;case"$":n=n.concat(await(async(e,t,s,i)=>{let n=[];try{n=(await i.client.getSuggestionsForVariable(s,e.lineNumber,e.column)).map((e=>(0,He.vB)(Fg,e)))}catch{}const a=new Set;let r=!1;for(let s=e.lineNumber-1;s>Math.max(0,e.lineNumber-1-10)&&!r;--s){const i=t.getLineContent(s+1);(i.match(/^\s*function\s+/)||i.match(/^\s*###\w+/))&&(r=!0);const n=H(S.editor.tokenize(t.getLineContent(s+1),v.PURE)[0]);n.forEach(((i,r)=>{(s!==e.lineNumber-1||i.offset<e.column)&&Lg(i.type,[Be.VARIABLE,Be.PARAMETER],!0)&&a.add(t.getValueInRange({startLineNumber:s+1,startColumn:i.offset+1,endLineNumber:s+1,endColumn:r===n.length-1?Number.MAX_SAFE_INTEGER:H(n[r+1]).offset+1}))}))}const o=n.map((e=>e.name));return n.map((e=>Zg(e,!0))).concat(Array.from(a).filter((e=>!o.includes(e))).map((e=>{const t=new Fg;return t.name=e,t})).map((e=>Zg(e,!1))))})(s,e,t.filePath,d))}return{suggestions:n}}}),n.current?.dispose(),n.current=S.languages.registerCompletionItemProvider(v.PURE,{triggerCharacters:[],provideCompletionItems:async(e,t,s)=>{let i=[];return s.triggerKind===S.languages.CompletionTriggerKind.Invoke&&(i=i.concat(Ug()),i=i.concat(((e,t,s)=>{const i=[],n=t.getWordUntilPosition(e),a=t.getValueInRange({startLineNumber:1,startColumn:1,endLineNumber:e.lineNumber,endColumn:e.column}),r=`${Te}${Ge.PURE}\n${a}`.split("\n").filter((e=>e.startsWith(Te))),o=(e=>{if(e.startsWith(Te))return e.substring(Te.length).split(" ")[0]})(r[r.length-1]??"");return o&&s(o).forEach((t=>{i.push({label:{label:t.text,description:t.description},kind:S.languages.CompletionItemKind.Snippet,insertTextRules:S.languages.CompletionItemInsertTextRule.InsertAsSnippet,insertText:`${t.insertText}\n`,range:{startLineNumber:e.lineNumber,startColumn:n.startColumn,endLineNumber:e.lineNumber,endColumn:n.endColumn},documentation:t.documentation?t.documentation.markdownText?{value:t.documentation.markdownText.value}:t.documentation.text:void 0})})),i})(t,e,(e=>(e=>{switch(e){case Ge.PURE:return[{text:ke.CLASS,description:"(blank)",insertText:"Class ${1:model::NewClass}\n// example of a constraint\n// [\n// SomeConstraint: true\n// ]\n{\n ${2:// example of a standard property\n // prop1: String[1];\n\n // example of a derived property\n // derivation1() {''\\}: String[1];}\n}"},{text:ke.CLASS,description:"with property",insertText:"Class ${1:model::NewClass}\n{\n ${2:prop1}: ${3:String[1]};\n}"},{text:ke.CLASS,description:"with inheritance",insertText:"Class ${1:model::NewClass} extends ${2:model::ParentClass}\n{\n ${3:// class content}\n}"},{text:ke.CLASS,description:"with constraint",insertText:"Class ${1:model::NewClass}\n[\n ${3:SomeConstraint: true}\n]\n{\n ${2:// class content}\n}"},{text:ke.PROFILE,insertText:"Profile ${1:model::NewProfile}\n{\n stereotypes: [${2:}];\n tags: [${3:}];\n}"},{text:ke.ENUMERATION,insertText:"Enum ${1:model::NewEnumeration}\n{\n ${2:VALUE_1,\n VALUE_2}\n}"},{text:ke.ASSOCIATION,insertText:"Association ${1:model::NewAssociation}\n{\n ${2:prop1}: ${3:model::Type1[1]};\n ${4:prop2}: ${5:model::Type2[1]};\n}"},{text:ke.FUNCTION,description:"(blank)",insertText:"function ${1:model::NewEnumeration}(${2:param1: String[1]}): ${3:String[1]}\n{\n ${4:''; // function content}\n}"},{text:ke.FUNCTION,insertText:"function ${1:model::NewEnumeration}(): String[1]\n{\n ''\n}"}];case Ge.MAPPING:return[{text:ke.MAPPING,description:"(blank)",insertText:"Mapping ${1:model::NewMapping}\n(\n ${2:// mapping content}\n)"},{text:ke.MAPPING,description:"with model-to-model mapping",insertText:"Mapping ${1:model::NewMapping}\n(\n ${2:model::TargetClass}: Pure\n {\n ~src ${3:model::SourceClass}\n // example of property mappings\n // prop1: $src.prop1\n }\n)"},{text:ke.MAPPING,description:"with relational mapping",insertText:"Mapping ${1:model::NewMapping}\n(\n ${2:model::TargetClass}: Relational {\n ~mainTable ${3:[model::SomeDatabase]SomeTable}\n // example of property mappings\n // prop1: [model::SomeDatabase]SomeTable.col1,\n }\n)"},{text:ke.MAPPING,description:"with enumeration mapping",insertText:"Mapping ${1:model::NewMapping}\n(\n ${2:model::TargetEnumeration}: EnumerationMapping ${3:EnumerationMappingID}\n {\n // example of enum-value mapping\n // VAL_1: ['val1'],\n // VAL_2: ['val2', 'val_2']\n }\n)"}];case Ge.RELATIONAL:return[{text:ke.DATABASE,description:"(blank)",insertText:"Database ${1:model::NewDatabase}\n(\n // example database schema\n // Schema SOME_SCHEMA\n // (\n // Table TABLE_1\n // (\n // COL_1 VARCHAR(200)\n // )\n // Table TABLE_2\n // (\n // COL_2 VARCHAR(200) PRIMARY_KEY\n // )\n // )\n\n // example database join\n // Join SomeJoin(SOME_SCHEMA.TABLE_1.COL_1 = SCHEMA1.TABLE_2.COL_2)\n\n ${2:// database content}\n)"}];case jg:return[{text:kg,description:"(blank)",insertText:"Diagram ${1:model::NewDiagram}(width=0.0, height=0.0)\n(\n // NOTE: it is recommended to use diagram visual editor\n // to edit diagram: double-click on the diagram in\n // the concept explorer tree to open the editor\n)"}];default:return[]}})(e)))),i=i.concat(((e,t,s=[])=>{const i=t.getWordUntilPosition(e);return[{text:"let",description:"new variable",insertText:"let ${1:} = ${2:};"},{text:"let",description:"new collection",insertText:"let ${1:} = [${2:}];"},{text:"cast",description:"type casting",insertText:"cast(@${1:model::SomeClass})"},{text:"if",description:"(conditional)",insertText:"if(${1:'true'}, | ${2:/* if true do this */}, | ${3:/* if false do this */})"},{text:"case",description:"(conditional)",insertText:"case(${1:}, ${2:'true'}, ${3:'false'})"},{text:"match",description:"(conditional)",insertText:"match([x:${1:String[1]}, ${2:''}])"},{text:"map",description:"(collection)",insertText:"map(x|${1:})"},{text:"filter",description:"(collection)",insertText:"filter(x|${1:})"},{text:"fold",description:"(collection)",insertText:"fold({a, b| ${1:$a + $b}}, ${2:0})"},{text:"filter",description:"(collection)",insertText:"filter(x|${1:})"},{text:"sort",description:"(collection)",insertText:"sort()"},{text:"in",description:"(collection)",insertText:"in()"},{text:"slice",description:"(collection)",insertText:"slice(${1:1},${2:2})"},{text:"removeDuplicates",description:"(collection)",insertText:"removeDuplicates()"},{text:"toOne",description:"(collection)",insertText:"toOne(${1:})"},{text:"toOneMany",description:"(collection)",insertText:"toOneMany(${1:})"},{text:"isEmpty",description:"(collection)",insertText:"isEmpty()"},{text:"endsWith",description:"(string)",insertText:"endsWith()"},{text:"startsWith",description:"(string)",insertText:"startsWith()"},...s].map((t=>({label:{label:t.text,description:t.description},kind:S.languages.CompletionItemKind.Snippet,insertTextRules:S.languages.CompletionItemInsertTextRule.InsertAsSnippet,insertText:t.insertText,range:{startLineNumber:e.lineNumber,startColumn:i.startColumn,endLineNumber:e.lineNumber,endColumn:i.endColumn},documentation:t.documentation?t.documentation.markdownText?{value:t.documentation.markdownText.value}:t.documentation.text:void 0})))})(t,e,[{text:"print",description:"(io)",insertText:"print(${1:})"},{text:"println",description:"(io)",insertText:"println(${1:})"},{text:"NULL",description:"(nullish value)",insertText:"[]"}])),i=i.concat(await(async(e,t,s)=>{const i=Yg(e,t),n=Boolean(t.getLineContent(e.lineNumber).substring(0,e.column-1).match(Wg)),a=Boolean(t.getLineContent(e.lineNumber).substring(0,e.column-1).match(Kg));let r=[];try{r=(await s.client.getSuggestionsForIdentifier(i,a?[Ih.CLASS]:n?[Ih.FUNCTION,Ih.NATIVE_FUNCTION]:[])).map((e=>(0,He.vB)(bg,e)))}catch{}return r.map((e=>a?Gg(e):Vg(e,{preferArrowFunctionForm:n})))})(t,e,d))),{suggestions:i}}}),yg(t),(0,rt.useEffect)((()=>{if(l){if(document.querySelector(".file-editor .monaco-menu")){const e=["Peek"];Array.from(document.querySelectorAll(".file-editor .monaco-menu .action-label")).filter((t=>e.includes(t.innerHTML))).forEach((e=>{const t=e.parentElement?.parentElement;t&&(t.classList.add("disabled"),t.style.opacity="0.3",t.style.pointerEvents="none")}))}c(!1)}}),[l]),(0,rt.useEffect)((()=>{void 0!==p&&void 0!==m&&r?.layout({width:p,height:m})}),[r,p,m]),(0,rt.useEffect)((()=>{r&&t.textEditorState.forcedCursorPosition&&(Ah(r,t.textEditorState.forcedCursorPosition),t.textEditorState.setForcedCursorPosition(void 0))}),[r,t,t.textEditorState.forcedCursorPosition]),(0,rt.useEffect)((()=>()=>{r&&(t.textEditorState.setViewState(r.saveViewState()??void 0),r.dispose()),s.current?.dispose(),i.current?.dispose(),n.current?.dispose()}),[t,r]),(0,T.jsxs)("div",{className:"panel edit-panel file-editor",children:[(0,T.jsx)("div",{className:"panel__header file-editor__header",children:(0,T.jsxs)("div",{className:"file-editor__header__actions",children:[(0,T.jsx)("button",{className:(0,cs.clsx)("file-editor__header__action",{"file-editor__header__action--active":t.textEditorState.wrapText}),tabIndex:-1,onClick:()=>t.textEditorState.setWrapText(!t.textEditorState.wrapText),title:"Toggle Text Wrap",children:(0,T.jsx)(As.NK0,{className:"file-editor__icon--text-wrap"})}),t.renameConceptState&&(0,T.jsx)(Jg,{renameConceptState:t.renameConceptState}),t.showGoToLinePrompt&&(0,T.jsx)(Pg,{fileEditorState:t})]})}),(0,T.jsx)("div",{className:"panel__content file-editor__content",children:(0,T.jsx)("div",{ref:u,className:"text-editor__container",children:(0,T.jsx)("div",{className:"text-editor__body",ref:a})})})]})}));var eE=s(8533);const tE=e=>{const{open:t,className:s,children:i,menuProps:n,content:a,title:r,disabled:o,onClose:l,onOpen:c}=e,d=(0,rt.useRef)(null),[h,u]=(0,rt.useState)(null);return(0,rt.useEffect)((()=>{void 0!==t&&(t&&!h&&d.current?u(d.current):!t&&h&&u(null))}),[h,t]),(0,T.jsxs)("button",{ref:d,className:s,disabled:o,onClick:e=>{e.stopPropagation(),e.preventDefault(),o||(h?(l?.(),u(null)):d.current&&(c?.(),u(d.current)))},tabIndex:-1,title:r,children:[i,(0,T.jsx)(bs,{anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},anchorEl:h,open:(void 0===t||Boolean(t))&&Boolean(h),BackdropProps:{invisible:!0},elevation:0,marginThreshold:0,disableRestoreFocus:!0,...n,children:a})]})},sE=(0,at.Pi)((0,rt.forwardRef)((function(e,t){const{diagramEditorState:s}=e,i=yi(),n=s.diagram,a=t,{width:r,height:o}=(0,Vs.NB)({refreshMode:"debounce",refreshRate:50,targetRef:a});(0,rt.useEffect)((()=>{const e=new jp(a.current,n);s.setRenderer(e),s.setupRenderer(),e.render(),e.autoRecenter()}),[a,s,n]),(0,rt.useEffect)((()=>{s.isDiagramRendererInitialized&&s.renderer.refresh()}),[s,r,o]);const l=(0,rt.useCallback)(((e,t)=>{if(e instanceof wh){const n=t.getClientOffset(),a=n?s.renderer.canvasCoordinateToModelCoordinate(s.renderer.eventCoordinateToCanvasCoordinate(new Hd(n.x,n.y))):void 0;(0,x.fl)(s.addClassView(e.li_attr.pureId,a)).catch(i.alertUnhandledError)}}),[i,s]),[,c]=(0,eE.L)((()=>({accept:cg.CLASS,drop:(e,t)=>l(e,t)})),[l]);return c(a),(0,T.jsx)("div",{ref:a,className:(0,cs.clsx)("diagram-canvas diagram-editor__canvas",s.diagramCursorClass),tabIndex:0})}))),iE=(0,at.Pi)((e=>{const{diagramEditorState:t}=e,s=l_(),i=yi(),n=e=>()=>{t.renderer.zoomCenter(e/100)},a=t.renderer.selectedClasses.length<2;return(0,T.jsxs)(T.Fragment,{children:[(0,T.jsxs)("div",{className:"diagram-editor__header__group",children:[(0,T.jsx)("button",{className:"diagram-editor__header__action diagram-editor__header__group__action",title:"Align left",disabled:a,tabIndex:-1,onClick:()=>t.renderer.align(bp.ALIGN_LEFT),children:(0,T.jsx)(As.eRw,{className:"diagram-editor__icon--aligner"})}),(0,T.jsx)("button",{className:"diagram-editor__header__action diagram-editor__header__group__action",title:"Align center",disabled:a,tabIndex:-1,onClick:()=>t.renderer.align(bp.ALIGN_CENTER),children:(0,T.jsx)(As.UPo,{className:"diagram-editor__icon--aligner"})}),(0,T.jsx)("button",{className:"diagram-editor__header__action diagram-editor__header__group__action",title:"Align right",disabled:a,tabIndex:-1,onClick:()=>t.renderer.align(bp.ALIGN_RIGHT),children:(0,T.jsx)(As.B_D,{className:"diagram-editor__icon--aligner"})})]}),(0,T.jsx)("div",{className:"diagram-editor__header__group__separator"}),(0,T.jsxs)("div",{className:"diagram-editor__header__group",children:[(0,T.jsx)("button",{className:"diagram-editor__header__action diagram-editor__header__group__action",title:"Align top",disabled:a,tabIndex:-1,onClick:()=>t.renderer.align(bp.ALIGN_TOP),children:(0,T.jsx)(As.Cti,{className:"diagram-editor__icon--aligner"})}),(0,T.jsx)("button",{className:"diagram-editor__header__action diagram-editor__header__group__action",title:"Align middle",disabled:a,tabIndex:-1,onClick:()=>t.renderer.align(bp.ALIGN_MIDDLE),children:(0,T.jsx)(As.w0Y,{className:"diagram-editor__icon--aligner"})}),(0,T.jsx)("button",{className:"diagram-editor__header__action diagram-editor__header__group__action",title:"Align bottom",disabled:a,tabIndex:-1,onClick:()=>t.renderer.align(bp.ALIGN_BOTTOM),children:(0,T.jsx)(As.HLb,{className:"diagram-editor__icon--aligner"})})]}),(0,T.jsx)("div",{className:"diagram-editor__header__group__separator"}),(0,T.jsxs)("div",{className:"diagram-editor__header__group",children:[(0,T.jsx)("button",{className:"diagram-editor__header__action diagram-editor__header__group__action",title:"Space horizontally",disabled:a,tabIndex:-1,onClick:()=>t.renderer.align(bp.SPACE_HORIZONTALLY),children:(0,T.jsx)(As.ppk,{className:"diagram-editor__icon--aligner"})}),(0,T.jsx)("button",{className:"diagram-editor__header__action diagram-editor__header__group__action",title:"Space vertically",disabled:a,tabIndex:-1,onClick:()=>t.renderer.align(bp.SPACE_VERTICALLY),children:(0,T.jsx)(As.LyQ,{className:"diagram-editor__icon--aligner"})})]}),(0,T.jsxs)(tE,{className:"diagram-editor__header__dropdown",title:"Zoom...",content:(0,T.jsxs)(Ms,{children:[(0,T.jsx)(Fs,{className:"diagram-editor__header__zoomer__dropdown__menu__item",onClick:()=>t.renderer.zoomToFit(),children:"Fit"}),(0,T.jsx)(js,{}),Mp.map((e=>(0,T.jsxs)(Fs,{className:"diagram-editor__header__zoomer__dropdown__menu__item",onClick:n(e),children:[e,"%"]},e)))]}),menuProps:{anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},elevation:7},children:[(0,T.jsxs)("div",{className:"diagram-editor__header__dropdown__label diagram-editor__header__zoomer__dropdown__label",children:[Math.round(100*t.renderer.zoom),"%"]}),(0,T.jsx)("div",{className:"diagram-editor__header__dropdown__trigger diagram-editor__header__zoomer__dropdown__trigger",children:(0,T.jsx)(As.VAA,{})})]}),(0,T.jsx)("div",{className:"diagram-editor__header__actions",children:(0,T.jsx)("button",{className:"diagram-editor__header__action",tabIndex:-1,onClick:()=>{(0,x.fl)(s.loadFile(t.filePath,new Dh(t.filePath,t.fileLine,t.fileColumn))).catch(i.alertUnhandledError)},children:(0,T.jsx)(As.qdB,{className:"diagram-editor__icon--go-to-file"})})})]})})),nE=(0,at.Pi)((e=>{const{diagramEditorState:t}=e,s=t.renderer,i=(e,t)=>()=>s.changeMode(e,t);return(0,T.jsxs)("div",{className:"diagram-editor__tools",children:[(0,T.jsx)("button",{className:(0,cs.clsx)("diagram-editor__tool",{"diagram-editor__tool--active":s.interactionMode===wp.LAYOUT}),tabIndex:-1,onClick:i(wp.LAYOUT,Lp.NONE),title:"View Tool (V)",children:(0,T.jsx)(As.Hrt,{className:"diagram-editor__icon--layout"})}),(0,T.jsx)("button",{className:(0,cs.clsx)("diagram-editor__tool",{"diagram-editor__tool--active":s.interactionMode===wp.PAN}),tabIndex:-1,onClick:i(wp.PAN,Lp.NONE),title:"Pan Tool (M)",children:(0,T.jsx)(As.tPC,{className:"diagram-editor__icon--pan"})}),(0,T.jsx)("button",{className:(0,cs.clsx)("diagram-editor__tool",{"diagram-editor__tool--active":s.interactionMode===wp.ZOOM_IN}),tabIndex:-1,title:"Zoom In (Z)",onClick:i(wp.ZOOM_IN,Lp.NONE),children:(0,T.jsx)(As.Sd5,{className:"diagram-editor__icon--zoom-in"})}),(0,T.jsx)("button",{className:(0,cs.clsx)("diagram-editor__tool",{"diagram-editor__tool--active":s.interactionMode===wp.ZOOM_OUT}),tabIndex:-1,title:"Zoom Out (Z)",onClick:i(wp.ZOOM_OUT,Lp.NONE),children:(0,T.jsx)(As.xLV,{className:"diagram-editor__icon--zoom-out"})})]})})),aE=(0,at.Pi)((e=>{const{diagramEditorState:t}=e,s=(0,rt.useRef)(null);return yg(t),(0,T.jsxs)("div",{className:"diagram-editor",children:[(0,T.jsx)("div",{className:"diagram-editor__header",children:t.isDiagramRendererInitialized&&(0,T.jsx)(iE,{diagramEditorState:t})}),(0,T.jsx)("div",{className:"diagram-editor__content",children:(0,T.jsxs)("div",{className:"diagram-editor__stage",children:[t.isDiagramRendererInitialized&&(0,T.jsx)(nE,{diagramEditorState:t}),(0,T.jsx)(sE,{diagramEditorState:t,ref:s})]})})]})}));var rE=s(98533),oE=s(84153);const lE=e=>{const{children:t,label:s,showPlaceholder:i,className:n}=e;return i?(0,T.jsx)("div",{className:(0,cs.clsx)(["dnd__entry-dropzone__placeholder",n]),children:(0,T.jsx)("div",{className:"dnd__entry-dropzone__placeholder__content",children:(0,T.jsx)("div",{className:"dnd__entry-dropzone__placeholder__label",children:s??""})})}):(0,T.jsx)(T.Fragment,{children:t})};function cE(e){const{labelGetter:t,types:s}=e,{itemType:i,item:n,isDragging:a,currentPosition:r}=(0,rE.f)((e=>({itemType:e.getItemType(),item:e.getItem(),isDragging:e.isDragging(),initialOffset:e.getInitialSourceClientOffset(),currentPosition:e.getClientOffset()})));return a&&n&&i&&s.includes(i.toString())?(0,T.jsx)(ns.Z,{children:(0,T.jsx)("div",{className:"dnd__drag-preview-layer",children:(0,T.jsx)("div",{className:"dnd__drag-preview-layer__content",style:r?{transform:`translate(${r.x/10+2}rem, ${r.y/10+1}rem)`}:{display:"none"},children:t(n)})})}):null}const dE=e=>{if(Math.abs(e.deltaY)<=Math.abs(e.deltaX))return;let t;e.stopPropagation(),t=0===e.deltaY?e.deltaY:e.deltaY<0?-Math.abs(e.deltaY):Math.abs(e.deltaY),e.currentTarget.scrollBy(t,0)},hE=(0,at.Pi)((e=>{const{tabState:t,managerTabState:s}=e;return(0,T.jsxs)(Ms,{children:[(0,T.jsx)(Fs,{onClick:()=>s.closeTab(t),children:"Close"}),(0,T.jsx)(Fs,{disabled:s.tabs.length<2,onClick:()=>s.closeAllOtherTabs(t),children:"Close Others"}),(0,T.jsx)(Fs,{onClick:()=>s.closeAllTabs(),children:"Close All"})]})})),uE=(0,at.Pi)((e=>{const t=(0,rt.useRef)(null),{tabManagerState:s,tabState:i,tabRenderer:n}=e,a=(0,rt.useCallback)(((e,n)=>{const a=e.tab,r=i,o=s.tabs.findIndex((e=>e===a)),l=s.tabs.findIndex((e=>e===r)),c=t.current?.getBoundingClientRect(),d=((c?.left??0)-(c?.right??0))/2,h=(n.getClientOffset()?.x??0)-(c?.right??0);o<l&&h<d||o>l&&h>d||s.swapTabs(a,r)}),[s,i]),[{isBeingDraggedEditorPanel:r},o]=(0,eE.L)((()=>({accept:[s.dndType],hover:(e,t)=>a(e,t),collect:e=>({isBeingDraggedEditorPanel:e.getItem()?.tab})})),[a]),l=i===r,[,c,d]=(0,V_.c)((()=>({type:s.dndType,item:()=>({tab:i})})),[i,s]);return c(o(t)),(e=>{(0,rt.useEffect)((()=>{e((0,oE.r)())}),[e])})(d),(0,T.jsx)("div",{ref:t,className:(0,cs.clsx)("tab-manager__tab",{"tab-manager__tab--active":i===s.currentTab,"tab-manager__tab--dragged":l}),onMouseUp:(h=i,e=>{1===e.nativeEvent.button&&s.closeTab(h)}),children:(0,T.jsx)(lE,{showPlaceholder:!1,className:"tab-manager__tab__dnd__placeholder",children:(0,T.jsxs)(Ds,{content:(0,T.jsx)(hE,{tabState:i,managerTabState:s}),className:"tab-manager__tab__content",children:[(0,T.jsx)("button",{className:"tab-manager__tab__label",tabIndex:-1,onClick:()=>s.openTab(i),title:i.description,children:n?.(i)??i.label}),(0,T.jsx)("button",{className:"tab-manager__tab__close-btn",onClick:()=>s.closeTab(i),tabIndex:-1,title:"Close",children:(0,T.jsx)(As.q1B,{})})]})})});var h})),pE=(0,at.Pi)((e=>{const{managerTabState:t}=e;return(0,T.jsx)(tE,{className:"tab-manager__menu__toggler",title:"Show All Tabs",content:(0,T.jsx)(Ms,{className:"tab-manager__menu",children:t.tabs.map((e=>(0,T.jsxs)(Fs,{className:(0,cs.clsx)("tab-manager__menu__item",{"tab-manager__menu__item--active":e===t.currentTab}),onClick:()=>t.openTab(e),children:[(0,T.jsx)("div",{className:"tab-manager__menu__item__label",children:e.label}),(0,T.jsx)("div",{className:"tab-manager__menu__item__close-btn",onClick:s=>{s.stopPropagation(),t.closeTab(e)},tabIndex:-1,title:"Close",children:(0,T.jsx)(As.q1B,{})})]},e.uuid)))}),menuProps:{anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}},children:(0,T.jsx)(As.v4q,{})})})),mE=(0,at.Pi)((e=>{const{tabManagerState:t,tabRenderer:s}=e;return(0,T.jsxs)("div",{className:"tab-manager",children:[(0,T.jsxs)("div",{className:"tab-manager__content",onWheel:dE,children:[t.tabs.map((e=>(0,T.jsx)(uE,{tabState:e,tabManagerState:t,tabRenderer:s},e.uuid))),(0,T.jsx)(cE,{labelGetter:e=>e.tab.label,types:[t.dndType]})]}),(0,T.jsx)(pE,{managerTabState:t})]})})),_E=()=>{const[e,t]=(0,rt.useState)(!1),{ref:s,width:i,height:n}=(0,Vs.NB)();return(0,rt.useEffect)((()=>{t((i??0)>300&&(n??0)>150)}),[i,n]),(0,T.jsx)("div",{ref:s,className:"edit-panel__splash-screen",children:(0,T.jsxs)("div",{className:(0,cs.clsx)("edit-panel__splash-screen__content",{"edit-panel__splash-screen__content--hidden":!e}),children:[(0,T.jsxs)("div",{className:"edit-panel__splash-screen__content__item",children:[(0,T.jsx)("div",{className:"edit-panel__splash-screen__content__item__label",children:"Execute the 'go' function"}),(0,T.jsx)("div",{className:"edit-panel__splash-screen__content__item__hot-keys",children:(0,T.jsx)("div",{className:"hotkey__key",children:"F9"})})]}),(0,T.jsxs)("div",{className:"edit-panel__splash-screen__content__item",children:[(0,T.jsx)("div",{className:"edit-panel__splash-screen__content__item__label",children:"Run the full test suite"}),(0,T.jsx)("div",{className:"edit-panel__splash-screen__content__item__hot-keys",children:(0,T.jsx)("div",{className:"hotkey__key",children:"F10"})})]}),(0,T.jsxs)("div",{className:"edit-panel__splash-screen__content__item",children:[(0,T.jsx)("div",{className:"edit-panel__splash-screen__content__item__label",children:"Search for a file"}),(0,T.jsxs)("div",{className:"edit-panel__splash-screen__content__item__hot-keys",children:[(0,T.jsx)("div",{className:"hotkey__key",children:"Ctrl"}),(0,T.jsx)("div",{className:"hotkey__plus",children:(0,T.jsx)(As.pOD,{})}),(0,T.jsx)("div",{className:"hotkey__key",children:"P"})]})]})]})})},gE=(0,at.Pi)((()=>{const e=l_(),t=e.tabManagerState.currentTab;return t?(0,T.jsxs)("div",{className:"panel edit-panel",children:[(0,T.jsxs)("div",{className:"panel__header edit-panel__header",children:[(0,T.jsx)("div",{className:"edit-panel__header__tabs",children:(0,T.jsx)(mE,{tabManagerState:e.tabManagerState,tabRenderer:t=>{if(t instanceof Qh){const s=e.tabManagerState.tabs.filter((e=>e instanceof Qh&&e.fileName===t.fileName)).length>1;return(0,T.jsxs)("div",{className:"edit-panel__header__tab",children:[(0,T.jsx)("div",{className:"edit-panel__header__tab__icon",children:(0,T.jsx)(As.QqN,{className:"edit-panel__header__tab__icon--file"})}),(0,T.jsx)("div",{className:"edit-panel__header__tab__label",children:t.fileName}),s&&(0,T.jsx)("div",{className:"edit-panel__header__tab__path",children:t.filePath}),t.file.RO&&(0,T.jsx)("div",{className:"edit-panel__header__tab__icon",children:(0,T.jsx)(As.mBM,{className:"edit-panel__header__tab__icon--readonly"})})]})}if(t instanceof Wm){const s=e.tabManagerState.tabs.filter((e=>e instanceof Wm&&e.diagramName===t.diagramName)).length>1;return(0,T.jsxs)("div",{className:"edit-panel__header__tab",children:[(0,T.jsx)("div",{className:"edit-panel__header__tab__icon",children:(0,T.jsx)(Q_,{})}),(0,T.jsx)("div",{className:"edit-panel__header__tab__label",children:t.diagramName}),s&&(0,T.jsx)("div",{className:"edit-panel__header__tab__path",children:t.diagramPath})]})}return t.label}})}),(0,T.jsx)("div",{className:"panel__header__actions"})]}),(0,T.jsx)("div",{className:"panel__content edit-panel__content",children:t instanceof Qh?t.textEditorState.language===v.PURE?(0,T.jsx)(Qg,{editorState:t}):(0,T.jsx)(wg,{editorState:t}):t instanceof Wm?(0,T.jsx)(aE,{diagramEditorState:t}):null},t.uuid)]}):(0,T.jsx)(_E,{})}));var EE=s(50166),fE=s(35247);const TE=e=>{const t=3.5*parseInt(getComputedStyle(document.documentElement).fontSize,10),{options:s,children:i,getValue:n,selectProps:a}=e,[r]=n(),o=s.indexOf(r)*t,l=i.length?i.findIndex((e=>e.props.isFocused)):0,c=(0,rt.useRef)(null);return(0,rt.useEffect)((()=>{c.current?.scrollToItem(l)}),[l]),i.length?(0,T.jsx)(EE.t7,{className:a.darkMode?"scrollbar--light selector-menu--dark":"",ref:c,width:"100%",height:Math.min(i.length,6)*t,itemCount:i.length,itemSize:t,initialScrollOffset:o,children:({index:e,style:t})=>(0,T.jsx)("div",{style:t,children:i[e]})}):(0,T.jsx)("div",{className:"selector-menu--no-match "+(a.darkMode?"selector-menu--dark":""),children:a.noMatchMessage??"No match found"})},CE="selector-input",xE="selector-input--dark",SE=()=>(0,T.jsx)("div",{className:`${CE}__indicator ${CE}__loading-indicator ${xE}__loading-indicator`,children:(0,T.jsx)(As.VRP,{})}),NE=()=>(0,T.jsx)("div",{className:`${CE}__indicator ${CE}__dropdown-indicator`,children:(0,T.jsx)(As.VAA,{})}),AE=e=>{const{innerProps:{ref:t,...s}}=e;return(0,T.jsx)("div",{...s,ref:t,children:(0,T.jsx)("div",{className:`${CE}__indicator ${CE}__clear-indicator`,children:(0,T.jsx)(As.q1B,{})})})},vE=e=>(0,T.jsx)(fE.baseComponents.Input,{...e,isHidden:!1}),IE=(0,rt.forwardRef)((function(e,t){const{option:s,allowCreating:i,noMatchMessage:n,disabled:a,components:r,className:o,darkMode:l,hasError:c,...d}=e,h=i?fE.CreatableSelect:fE.Select,u=l?xE:CE;return(0,T.jsx)(h,{styles:{menuPortal:e=>({...e,zIndex:9999})},menuPortalTarget:document.body,ref:t,isDisabled:Boolean(a),className:`${u} ${o} ${c?"selector-input--has-error":""}`,classNamePrefix:u,components:{ClearIndicator:AE,DropdownIndicator:NE,LoadingIndicator:SE,MenuList:TE,Input:vE,...r},...{...d,darkMode:l,noMatchMessage:n}})})),OE=(e,t)=>e.label.localeCompare(t.label),yE=(0,at.Pi)((()=>{const e=l_(),t=yi(),s=e.fileSearchCommandLoadState,i=e.fileSearchCommandState,n=(0,rt.useRef)(null),a=(0,rt.useMemo)((()=>(0,Hs.Z)((()=>{(0,x.fl)(e.searchFile()).catch(t.alertUnhandledError)}),500)),[t,e]),r=()=>e.setOpenFileSearchCommand(!1);return(0,T.jsx)(ls.Z,{open:e.openFileSearchCommand,onClose:r,TransitionProps:{onEnter:()=>{n.current?.focus()}},classes:{container:"command-modal__container"},PaperProps:{classes:{root:"command-modal__inner-container"}},children:(0,T.jsxs)("div",{className:"modal modal--dark command-modal",children:[(0,T.jsx)("div",{className:"modal__title",children:"Open file"}),(0,T.jsxs)("div",{className:"command-modal__content",children:[(0,T.jsx)(IE,{ref:n,className:"command-modal__content__input",options:e.fileSearchCommandResults.map((e=>({label:e,value:e}))).sort(OE),onChange:s=>{s?.value&&(r(),i.reset(),(0,x.fl)(e.loadFile(s.value)).catch(t.alertUnhandledError))},onInputChange:e=>{i.setText(e),a.cancel(),a()},placeholder:"Enter file name or path",escapeClearsValue:!0,darkMode:!0,isLoading:s.isInProgress}),(0,T.jsx)("button",{className:(0,cs.clsx)("command-modal__content__config-btn btn--sm",{"command-modal__content__config-btn--toggled":i.isRegExp}),title:`Use Regular Expression (${i.isRegExp?"on":"off"})`,onClick:()=>i.setRegExp(!i.isRegExp),children:(0,T.jsx)(As.x47,{})})]})]})})})),RE=(PE=(0,at.Pi)((()=>{const e=l_(),t=yi(),{ref:s,width:i,height:n}=(0,Vs.NB)(),a=T_(0===e.sideBarDisplayState.size,{onStopResize:t=>e.sideBarDisplayState.setSize(t.domElement.getBoundingClientRect().width),size:e.sideBarDisplayState.size}),r=T_(0===e.auxPanelDisplayState.size,{onStopResize:t=>e.auxPanelDisplayState.setSize(t.domElement.getBoundingClientRect().height),size:e.auxPanelDisplayState.size}),o=T_(e.auxPanelDisplayState.isMaximized);return(0,rt.useEffect)((()=>{s.current&&e.auxPanelDisplayState.setMaxSize(s.current.offsetHeight)}),[e,s,n,i]),(0,rt.useEffect)((()=>()=>{e.cleanUp()}),[e]),(0,rt.useEffect)((()=>{const s=((e,t=!1)=>t?ie.Z.parseUrl(e).query:ie.Z.parse(e))(window.location.search);(0,x.fl)(e.initialize(!1,void 0,s.mode,s.fastCompile)).catch(t.alertUnhandledError)}),[e,t]),(0,rt.useEffect)((()=>(t.navigationService.navigator.blockNavigation([()=>!0],void 0,(()=>t.notificationService.notifyWarning("Navigation from the editor is blocked"))),()=>{t.navigationService.navigator.unblockNavigation()})),[e,t]),yg(e),(0,T.jsxs)("div",{className:"editor",children:[(0,T.jsxs)("div",{className:"editor__body",children:[(0,T.jsx)(vg,{}),(0,T.jsx)("div",{className:"editor__content-container",ref:s,children:(0,T.jsx)("div",{className:"editor__content",children:(0,T.jsxs)(E_,{orientation:"vertical",children:[(0,T.jsx)(C_,{...a.collapsiblePanel,direction:1,children:(0,T.jsx)(Ng,{})}),(0,T.jsx)(x_,{}),(0,T.jsx)(C_,{...a.remainingPanel,minSize:300,children:(0,T.jsxs)(E_,{orientation:"horizontal",children:[(0,T.jsx)(C_,{...o.collapsiblePanel,...0===e.auxPanelDisplayState.size?r.remainingPanel:{},children:(0,T.jsx)(gE,{})}),(0,T.jsx)(x_,{children:(0,T.jsx)(S_,{color:e.auxPanelDisplayState.isMaximized?"transparent":"var(--color-dark-grey-250)"})}),(0,T.jsx)(C_,{...r.collapsiblePanel,...e.auxPanelDisplayState.isMaximized?o.remainingPanel:{},direction:-1,children:(0,T.jsx)(G_,{})})]})})]})})})]}),(0,T.jsx)(Og,{}),(0,T.jsx)(yE,{})]})})),function(){return(0,T.jsx)(o_,{children:(0,T.jsx)(PE,{})})});var PE;const wE=()=>(0,T.jsx)(fh,{children:(0,T.jsx)(ci,{children:(0,T.jsx)(RE,{})})}),LE=JSON.parse('{"i8":"6.2.44","Rw":{"p":"@finos/legend-application-pure-ide-plugin-core"}}');class bE extends o{}class DE extends bE{_$nominalTypeBrand;install(e){e.registerApplicationPlugin(this)}}class ME extends DE{static NAME=LE.Rw.p;constructor(){super(ME.NAME,LE.i8)}getExtraKeyedCommandConfigEntries(){return[Hh,Xh,Wh].flatMap((e=>{return t=e,Object.entries(t).map((e=>({key:e[0],content:e[1]})));var t}))}}class FE extends it{static create(){const e=new FE(Li.create());return e.withBasePlugins([new ME]),e.withBasePresets([new _h]),e}async configureApplication(e){return new Pi(e)}async loadApplication(){await(async(e,t)=>{(e=>{var t,s;S.editor.defineTheme(A.LEGEND,$e),S.editor.addKeybindingRules([{keybinding:S.KeyMod.WinCtrl|S.KeyCode.KeyG,command:null},{keybinding:S.KeyMod.WinCtrl|S.KeyCode.KeyB,command:null},{keybinding:S.KeyMod.WinCtrl|S.KeyCode.KeyO,command:null},{keybinding:S.KeyMod.WinCtrl|S.KeyCode.KeyD,command:null},{keybinding:S.KeyMod.WinCtrl|S.KeyCode.KeyP,command:null},{keybinding:S.KeyCode.F1,command:null},{keybinding:S.KeyCode.F8,command:null},{keybinding:S.KeyCode.F9,command:null},{keybinding:S.KeyMod.CtrlCmd|S.KeyCode.F2,command:null},{keybinding:S.KeyMod.Shift|S.KeyCode.F10,command:null},{keybinding:S.KeyMod.CtrlCmd|S.KeyCode.F12,command:null}]),S.languages.register({id:v.PURE}),S.languages.setLanguageConfiguration(v.PURE,ze),S.languages.setMonarchTokensProvider(v.PURE,(t=e.getPureGraphManagerPlugins().flatMap((e=>e.getExtraPureGrammarKeywords?.()??[])),s=e.getPureGraphManagerPlugins().flatMap((e=>e.getExtraPureGrammarParserNames?.()??[])),{defaultToken:"invalid",tokenPostfix:".pure",keywords:[...t,"Schema","Table","Join","View","primaryKey","groupBy","mainTable","let","extends","true","false","projects",ke.CLASS,ke.ASSOCIATION,ke.ENUMERATION,ke.MEASURE,ke.PROFILE,ke.FUNCTION,ke.MAPPING,ke.RUNTIME,ke.CONNECTION,ke.FILE_GENERATION,ke.GENERATION_SPECIFICATION,ke.DATA_ELEMENT,Ue.JSON_MODEL_CONNECTION,Ue.MODEL_CHAIN_CONNECTION,Ue.XML_MODEL_CONNECTION,"include","EnumerationMapping","Pure","AssociationMapping","XStore","AggregationAware",ke.SERVICE,ke.FLAT_DATA,ke.DATABASE,Ue.FLAT_DATA_CONNECTION,Ue.RELATIONAL_DATABASE_CONNECTION,"Relational"],operators:["=",">","<","!","~","?",":","==","<=",">=","&&","||","++","--","+","-","*","/","&","|","^","%","->","#{","}#","@","<<",">>"],languageStructs:["import","native"],parsers:[Ge.PURE,Ge.CONNECTION,Ge.RUNTIME,Ge.MAPPING,Ge.SERVICE,Ge.FLATDATA,Ge.RELATIONAL,Ge.GENERATION_SPECIFICATION,Ge.FILE_GENERATION_SPECIFICATION,Ge.DATA].concat(s).map((e=>`${Te}${e}`)),identifier:/[a-zA-Z_$][\w$]*/,symbols:/[=><!~?:&|+\-*/^%#@]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,digits:/\d+(_+\d+)*/,octaldigits:/[0-7]+(_+[0-7]+)*/,binarydigits:/[0-1]+(_+[0-1]+)*/,hexdigits:/[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/,multiplicity:/\[(?:[a-zA-Z0-9]+(?:\.\.(?:[a-zA-Z0-9]+|\*|))?|\*)\]/,package:/(?:[\w_]+::)+/,generics:/(?:(?:<\w+>)|(?:<[^:.@^()]+[^-]>))/,date:/%-?\d+(?:-\d+(?:-\d+(?:T(?:\d+(?::\d+(?::\d+(?:.\d+)?)?)?)(?:[+-][0-9]{4})?)))/,time:/%\d+(?::\d+(?::\d+(?:.\d+)?)?)?/,tokenizer:{root:[{include:"@pure"},{include:"@date"},{include:"@color"},[/^\s*###[\w]+/,{cases:{"@parsers":Be.PARSER,"@default":Be.INVALID}}],[/(@identifier)/,{cases:{"@languageStructs":Be.LANGUAGE_STRUCT,"@keywords":`${Be.KEYWORD}.$0`,"([a-zA-Z_$][\\w$]*)_((\\w+_(([a-zA-Z0-9]+)|(\\$[a-zA-Z0-9]+_[a-zA-Z0-9]+\\$)))__)*(\\w+_(([a-zA-Z0-9]+)|(\\$[a-zA-Z0-9]+_[a-zA-Z0-9]+\\$)))_":Be.TYPE,"@default":Be.IDENTIFIER}}],{include:"@whitespace"},[/[{}()[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":Be.OPERATOR,"@default":Be.IDENTIFIER}}],{include:"@number"},[/[;,.]/,Be.DELIMITER],[/'([^'\\]|\\.)*$/,`${Be.STRING}.invalid`],[/'/,Be.STRING,"@string"],{include:"@characters"}],pure:[[/(@package\*)/,[Be.PACKAGE]],[/(@package?)(@identifier)(@generics?)(\s*)(@multiplicity)/,[Be.PACKAGE,Be.TYPE,Be.GENERICS,Be.WHITESPACE,Be.MULTIPLICITY]],[/(@package)(@identifier)(@generics?)/,[Be.PACKAGE,Be.TYPE,Be.GENERICS]],[/([@^])(\s*)(@package?)(@identifier)(@generics?)(@multiplicity?)/,[`${Be.TYPE}.operator`,Be.WHITESPACE,Be.PACKAGE,Be.TYPE,Be.GENERICS,Be.MULTIPLICITY]],[/(\.\s*)(@identifier)/,[Be.DELIMITER,Be.PROPERTY]],[/(@identifier)(\s*=)/,[Be.PROPERTY,Be.OPERATOR]],[/(@identifier)(\.)(@identifier)/,[Be.TYPE,Be.OPERATOR,Be.PROPERTY]],[/(@identifier)(\s*:)/,[Be.PARAMETER,Be.OPERATOR]],[/(let)(\s+)(@identifier)(\s*=)/,[Be.KEYWORD,Be.WHITESPACE,Be.VARIABLE,Be.OPERATOR]],[/(\$@identifier)/,[`${Be.VARIABLE}.reference`]]],date:[[/(%latest)/,[`${Be.DATE}.latest`]],[/(@date)/,[Be.DATE]],[/(@time)/,[`${Be.DATE}.time`]]],color:[[/(#[0-9a-fA-F]{6})/,[Be.COLOR]]],number:[[/(@digits)[eE]([-+]?(@digits))?[fFdD]?/,`${Be.NUMBER}.float`],[/(@digits)\.(@digits)([eE][-+]?(@digits))?[fFdD]?/,`${Be.NUMBER}.float`],[/0[xX](@hexdigits)[Ll]?/,`${Be.NUMBER}.hex`],[/0(@octaldigits)[Ll]?/,`${Be.NUMBER}.octal`],[/0[bB](@binarydigits)[Ll]?/,`${Be.NUMBER}.binary`],[/(@digits)[fFdD]/,`${Be.NUMBER}.float`],[/(@digits)[lL]?/,Be.NUMBER]],whitespace:[[/[ \t\r\n]+/,Be.WHITESPACE],[/\/\*\*(?!\/)/,`${Be.COMMENT}.doc`,"@doc"],[/\/\*/,Be.COMMENT,"@comment"],[/\/\/.*$/,Be.COMMENT]],comment:[[/[^/*]+/,Be.COMMENT],[/\*\//,Be.COMMENT,"@pop"],[/[/*]/,Be.COMMENT]],doc:[[/[^/*]+/,`${Be.COMMENT}.doc`],[/\/\*/,`${Be.COMMENT}.doc.invalid`],[/\*\//,`${Be.COMMENT}.doc`,"@pop"],[/[/*]/,`${Be.COMMENT}.doc`]],string:[[/[^\\']+/,Be.STRING],[/@escapes/,`${Be.STRING}.escape`],[/\\./,`${Be.STRING}.escape.invalid`],[/'/,Be.STRING,"@pop"]],characters:[[/'[^\\']'/,Be.STRING],[/(')(@escapes)(')/,[Be.STRING,`${Be.STRING}.escape`,Be.STRING]],[/'/,`${Be.STRING}.invalid`]]}}))})(e);const s=`Monospaced font '${N}' has not been loaded properly, text editor display problems might occur`;await Promise.all([400,700].map((e=>document.fonts.load(`${e} 1em ${N}`)))).then((()=>{document.fonts.check(`1em ${N}`)?(S.editor.remeasureFonts(),t.info(h.create(Ee.LOAD_TEXT_EDITOR_FONT__SUCCESS),`Monospaced font '${N}' has been loaded`)):t.error(h.create(Ee.APPLICATION_SETUP__FAILURE),s)})).catch((()=>t.error(h.create(Ee.APPLICATION_SETUP__FAILURE),s))),(0,x.jQ)({enforceActions:"observed"})})(this.pluginManager,this.logger),(0,C.s)((()=>{let e=document.getElementsByTagName("root").length?document.getElementsByTagName("root")[0]:void 0;return e||(e=document.createElement("root"),document.body.appendChild(e)),e})()).render((0,T.jsx)(nt.VK,{basename:this.baseUrl,children:(0,T.jsx)(dt,{children:(0,T.jsx)(Oi,{config:this.config,pluginManager:this.pluginManager,children:(0,T.jsx)(wE,{})})})}))}}class jE{static getPresetCollection(){return[]}static getPluginCollection(){return[new f]}static run(e){FE.create().setup({baseUrl:e}).withPresets(jE.getPresetCollection()).withPlugins(jE.getPluginCollection()).start().catch((e=>{throw e}))}}jE.run("/ide/")},94174:function(e,t,s){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Fuse=void 0;var n=s(71659);Object.defineProperty(t,"Fuse",{enumerable:!0,get:function(){return i(n).default}})},12889:(e,t,s)=>{t.DE2=t.W1M=t.oF7=t.bK4=t.o1U=t.Zlt=t.jG4=t.uMt=t.pTE=t.UOT=t.pgN=t.VAA=t.IEm=t.pOD=t.xDH=t.q1B=t.mBM=t.cOE=t.F_y=void 0,t.QqN=t.TIy=t.SCS=t.$Ow=t.ROc=t.ry=t.FxN=t.Hf3=t.veu=t.R0=t.Qq=t.VRP=t.nnZ=t.LPM=t.rE2=t.XHJ=t.J$M=void 0,t.Two=t.qdB=t.NK0=t.UHp=t.VjU=t.NEI=t.DuK=t.ce8=t.dRK=t.VHe=t.DXi=t.jZm=t.Oag=t.kdY=void 0,t.tPC=t.Hrt=t.jtq=t.HXR=t.LyQ=t.ppk=t.B_D=t.UPo=t.eRw=t.HLb=t.w0Y=t.Cti=t.POq=t.Vzd=t.b0D=t.XCv=t.g8U=t.v4q=t.U9q=t.S9M=t.uuU=t.IMP=t.Xj8=t.a2g=t.x47=void 0,t.eid=t.xLV=t.Sd5=void 0;var i=s(18978);Object.defineProperty(t,"F_y",{enumerable:!0,get:function(){return i.FaHistory}}),Object.defineProperty(t,"cOE",{enumerable:!0,get:function(){return i.FaCrosshairs}}),Object.defineProperty(t,"mBM",{enumerable:!0,get:function(){return i.FaLock}}),Object.defineProperty(t,"q1B",{enumerable:!0,get:function(){return i.FaTimes}}),Object.defineProperty(t,"xDH",{enumerable:!0,get:function(){return i.FaTimesCircle}}),Object.defineProperty(t,"pOD",{enumerable:!0,get:function(){return i.FaPlus}}),Object.defineProperty(t,"IEm",{enumerable:!0,get:function(){return i.FaCog}}),Object.defineProperty(t,"VAA",{enumerable:!0,get:function(){return i.FaCaretDown}}),Object.defineProperty(t,"pgN",{enumerable:!0,get:function(){return i.FaHammer}}),Object.defineProperty(t,"UOT",{enumerable:!0,get:function(){return i.FaQuestion}}),Object.defineProperty(t,"pTE",{enumerable:!0,get:function(){return i.FaQuestionCircle}}),Object.defineProperty(t,"uMt",{enumerable:!0,get:function(){return i.FaInfoCircle}}),Object.defineProperty(t,"jG4",{enumerable:!0,get:function(){return i.FaCompress}}),Object.defineProperty(t,"Zlt",{enumerable:!0,get:function(){return i.FaMap}}),Object.defineProperty(t,"o1U",{enumerable:!0,get:function(){return i.FaPlay}}),Object.defineProperty(t,"bK4",{enumerable:!0,get:function(){return i.FaArrowAltCircleRight}}),Object.defineProperty(t,"oF7",{enumerable:!0,get:function(){return i.FaShapes}}),Object.defineProperty(t,"W1M",{enumerable:!0,get:function(){return i.FaSearch}}),Object.defineProperty(t,"DE2",{enumerable:!0,get:function(){return i.FaList}}),Object.defineProperty(t,"J$M",{enumerable:!0,get:function(){return i.FaCircle}}),Object.defineProperty(t,"XHJ",{enumerable:!0,get:function(){return i.FaTrash}}),Object.defineProperty(t,"rE2",{enumerable:!0,get:function(){return i.FaCheckCircle}}),Object.defineProperty(t,"LPM",{enumerable:!0,get:function(){return i.FaExclamationTriangle}}),Object.defineProperty(t,"nnZ",{enumerable:!0,get:function(){return i.FaBug}}),Object.defineProperty(t,"VRP",{enumerable:!0,get:function(){return i.FaCircleNotch}}),Object.defineProperty(t,"Qq",{enumerable:!0,get:function(){return i.FaExpand}}),Object.defineProperty(t,"R0",{enumerable:!0,get:function(){return i.FaWrench}}),Object.defineProperty(t,"veu",{enumerable:!0,get:function(){return i.FaArrowDown}}),Object.defineProperty(t,"Hf3",{enumerable:!0,get:function(){return i.FaArrowUp}}),Object.defineProperty(t,"FxN",{enumerable:!0,get:function(){return i.FaTerminal}}),Object.defineProperty(t,"ry",{enumerable:!0,get:function(){return i.FaFolderOpen}}),Object.defineProperty(t,"ROc",{enumerable:!0,get:function(){return i.FaFolder}}),Object.defineProperty(t,"$Ow",{enumerable:!0,get:function(){return i.FaExclamationCircle}}),Object.defineProperty(t,"SCS",{enumerable:!0,get:function(){return i.FaBan}}),Object.defineProperty(t,"TIy",{enumerable:!0,get:function(){return i.FaRegCopy}}),Object.defineProperty(t,"QqN",{enumerable:!0,get:function(){return i.FaFileAlt}}),Object.defineProperty(t,"kdY",{enumerable:!0,get:function(){return i.FaMapMarkerAlt}}),Object.defineProperty(t,"Oag",{enumerable:!0,get:function(){return i.FaHatWizard}}),Object.defineProperty(t,"jZm",{enumerable:!0,get:function(){return i.FaRegLaughWink}}),Object.defineProperty(t,"DXi",{enumerable:!0,get:function(){return i.FaRegSadTear}}),Object.defineProperty(t,"VHe",{enumerable:!0,get:function(){return i.FaDatabase}});var n=s(1553);Object.defineProperty(t,"dRK",{enumerable:!0,get:function(){return n.GiBeard}}),Object.defineProperty(t,"ce8",{enumerable:!0,get:function(){return n.GiSunglasses}});var a=s(65186);Object.defineProperty(t,"DuK",{enumerable:!0,get:function(){return a.MdRefresh}}),Object.defineProperty(t,"NEI",{enumerable:!0,get:function(){return a.MdSubject}}),Object.defineProperty(t,"VjU",{enumerable:!0,get:function(){return a.MdViewHeadline}}),Object.defineProperty(t,"UHp",{enumerable:!0,get:function(){return a.MdAssistant}});var r=s(49385);Object.defineProperty(t,"NK0",{enumerable:!0,get:function(){return r.VscWordWrap}}),Object.defineProperty(t,"qdB",{enumerable:!0,get:function(){return r.VscGoToFile}}),Object.defineProperty(t,"Two",{enumerable:!0,get:function(){return r.VscClose}}),Object.defineProperty(t,"x47",{enumerable:!0,get:function(){return r.VscRegex}}),Object.defineProperty(t,"a2g",{enumerable:!0,get:function(){return r.VscCaseSensitive}}),Object.defineProperty(t,"Xj8",{enumerable:!0,get:function(){return r.VscWholeWord}}),Object.defineProperty(t,"IMP",{enumerable:!0,get:function(){return r.VscReferences}}),Object.defineProperty(t,"uuU",{enumerable:!0,get:function(){return r.VscWand}}),Object.defineProperty(t,"S9M",{enumerable:!0,get:function(){return r.VscCollapseAll}}),Object.defineProperty(t,"U9q",{enumerable:!0,get:function(){return r.VscExpandAll}});var o=s(70563);Object.defineProperty(t,"v4q",{enumerable:!0,get:function(){return o.GoChevronDown}}),Object.defineProperty(t,"g8U",{enumerable:!0,get:function(){return o.GoChevronUp}}),Object.defineProperty(t,"XCv",{enumerable:!0,get:function(){return o.GoChevronRight}}),Object.defineProperty(t,"b0D",{enumerable:!0,get:function(){return o.GoX}});s(16636);var l=s(91914);Object.defineProperty(t,"Vzd",{enumerable:!0,get:function(){return l.IoFlaskSharp}});var c=s(8799);Object.defineProperty(t,"POq",{enumerable:!0,get:function(){return c.BsGripVertical}}),Object.defineProperty(t,"Cti",{enumerable:!0,get:function(){return c.BsAlignTop}}),Object.defineProperty(t,"w0Y",{enumerable:!0,get:function(){return c.BsAlignMiddle}}),Object.defineProperty(t,"HLb",{enumerable:!0,get:function(){return c.BsAlignBottom}}),Object.defineProperty(t,"eRw",{enumerable:!0,get:function(){return c.BsAlignStart}}),Object.defineProperty(t,"UPo",{enumerable:!0,get:function(){return c.BsAlignCenter}}),Object.defineProperty(t,"B_D",{enumerable:!0,get:function(){return c.BsAlignEnd}}),Object.defineProperty(t,"ppk",{enumerable:!0,get:function(){return c.BsDistributeHorizontal}}),Object.defineProperty(t,"LyQ",{enumerable:!0,get:function(){return c.BsDistributeVertical}});var d=s(77245);Object.defineProperty(t,"HXR",{enumerable:!0,get:function(){return d.BiAtom}});s(30924);var h=s(34543);Object.defineProperty(t,"jtq",{enumerable:!0,get:function(){return h.FiPackage}}),Object.defineProperty(t,"Hrt",{enumerable:!0,get:function(){return h.FiMousePointer}}),Object.defineProperty(t,"tPC",{enumerable:!0,get:function(){return h.FiMove}}),Object.defineProperty(t,"Sd5",{enumerable:!0,get:function(){return h.FiZoomIn}}),Object.defineProperty(t,"xLV",{enumerable:!0,get:function(){return h.FiZoomOut}});s(75100);var u=s(58920);Object.defineProperty(t,"eid",{enumerable:!0,get:function(){return u.TbMathFunction}});s(52742)},35247:function(e,t,s){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.baseComponents=t.createFilter=t.Select=t.CreatableSelect=void 0;var n=s(54319);Object.defineProperty(t,"CreatableSelect",{enumerable:!0,get:function(){return i(n).default}});var a=s(31776);Object.defineProperty(t,"Select",{enumerable:!0,get:function(){return i(a).default}}),Object.defineProperty(t,"createFilter",{enumerable:!0,get:function(){return a.createFilter}}),Object.defineProperty(t,"baseComponents",{enumerable:!0,get:function(){return a.components}})}},r={};function o(e){var t=r[e];if(void 0!==t)return t.exports;var s=r[e]={id:e,loaded:!1,exports:{}};return a[e].call(s.exports,s,s.exports,o),s.loaded=!0,s.exports}o.m=a,o.amdO={},e=[],o.O=(t,s,i,n)=>{if(!s){var a=1/0;for(d=0;d<e.length;d++){for(var[s,i,n]=e[d],r=!0,l=0;l<s.length;l++)(!1&n||a>=n)&&Object.keys(o.O).every((e=>o.O[e](s[l])))?s.splice(l--,1):(r=!1,n<a&&(a=n));if(r){e.splice(d--,1);var c=i();void 0!==c&&(t=c)}}return t}n=n||0;for(var d=e.length;d>0&&e[d-1][2]>n;d--)e[d]=e[d-1];e[d]=[s,i,n]},o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},s=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,o.t=function(e,i){if(1&i&&(e=this(e)),8&i)return e;if("object"==typeof e&&e){if(4&i&&e.__esModule)return e;if(16&i&&"function"==typeof e.then)return e}var n=Object.create(null);o.r(n);var a={};t=t||[null,s({}),s([]),s(s)];for(var r=2&i&&e;"object"==typeof r&&!~t.indexOf(r);r=s(r))Object.getOwnPropertyNames(r).forEach((t=>a[t]=()=>e[t]));return a.default=()=>e,o.d(n,a),n},o.d=(e,t)=>{for(var s in t)o.o(t,s)&&!o.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},o.f={},o.e=e=>Promise.all(Object.keys(o.f).reduce(((t,s)=>(o.f[s](e,t),t)),[])),o.u=e=>"static/"+e+"."+{14:"b63f5ea7",135:"3b62eae4",246:"ff0363bc",309:"ca0f7cf5",399:"7ad47fd9",471:"bde04e4b",947:"50215a8f"}[e]+".js",o.miniCssF=e=>{},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i={},n="@finos/legend-application-pure-ide-deployment:",o.l=(e,t,s,a)=>{if(i[e])i[e].push(t);else{var r,l;if(void 0!==s)for(var c=document.getElementsByTagName("script"),d=0;d<c.length;d++){var h=c[d];if(h.getAttribute("src")==e||h.getAttribute("data-webpack")==n+s){r=h;break}}r||(l=!0,(r=document.createElement("script")).charset="utf-8",r.timeout=120,o.nc&&r.setAttribute("nonce",o.nc),r.setAttribute("data-webpack",n+s),r.src=e),i[e]=[t];var u=(t,s)=>{r.onerror=r.onload=null,clearTimeout(p);var n=i[e];if(delete i[e],r.parentNode&&r.parentNode.removeChild(r),n&&n.forEach((e=>e(s))),t)return t(s)},p=setTimeout(u.bind(null,void 0,{type:"timeout",target:r}),12e4);r.onerror=u.bind(null,r.onerror),r.onload=u.bind(null,r.onload),l&&document.head.appendChild(r)}},o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),o.p="/ide/",(()=>{var e={826:0};o.f.j=(t,s)=>{var i=o.o(e,t)?e[t]:void 0;if(0!==i)if(i)s.push(i[2]);else{var n=new Promise(((s,n)=>i=e[t]=[s,n]));s.push(i[2]=n);var a=o.p+o.u(t),r=new Error;o.l(a,(s=>{if(o.o(e,t)&&(0!==(i=e[t])&&(e[t]=void 0),i)){var n=s&&("load"===s.type?"missing":s.type),a=s&&s.target&&s.target.src;r.message="Loading chunk "+t+" failed.\n("+n+": "+a+")",r.name="ChunkLoadError",r.type=n,r.request=a,i[1](r)}}),"chunk-"+t,t)}},o.O.j=t=>0===e[t];var t=(t,s)=>{var i,n,[a,r,l]=s,c=0;if(a.some((t=>0!==e[t]))){for(i in r)o.o(r,i)&&(o.m[i]=r[i]);if(l)var d=l(o)}for(t&&t(s);c<a.length;c++)n=a[c],o.o(e,n)&&e[n]&&e[n][0](),e[n]=0;return o.O(d)},s=globalThis.webpackChunk_finos_legend_application_pure_ide_deployment=globalThis.webpackChunk_finos_legend_application_pure_ide_deployment||[];s.forEach(t.bind(null,0)),s.push=t.bind(null,s.push.bind(s))})();var l=o.O(void 0,[736],(()=>o(43002)));l=o.O(l)})();
|
2
|
-
//# sourceMappingURL=index.a674d23f.js.map
|