Searched refs:jT (Results 1 – 4 of 4) sorted by relevance
29 %s`,this.path,this.context,$x(e," ")),this)}token(e){return Nn&&console.log("[%s] token <%s> + <%s>",this.path,this.tokens.join(" "),e),this.assign({tokens:[...this.tokens,e]})}literal(e){return Nn&&console.log("[%s] literal %o",this.path,e),this.pushChild(this.of({name:"Literal",value:e}))}computedValue(){for(let e=this;;e=Os(e.children)){if(!e)return null;if(!ha(e.value))return e.value}}contextCache(){let e=this.cache.get(this.context);return e||(e=Nx(this.context),this.cache.set(this.context,e)),e}get path(){var e,t;return((t=(e=this.parent)==null?void 0:e.path)==null?void 0:t.concat(" > ",this.name))||this.name}get(e){let t=e&&Ad(e),i=this.contextCache().originalMap.get(t);if(typeof i=="undefined")return;let r=this.context.get(i);return r instanceof ks?r.get(this):r}resolveName(){let e=this.tokens.join(" "),t=[],i=this.assign({tokens:t}),r=this.of({name:"VariableName",parent:i,value:this.get(e),raw:e});return Nn&&console.log("[%s] resolve name <%s=%s>",r.path,e,this.get(e)),i.pushChild(r)}pushChild(e){if(!e)return this;let t=this.assign({children:[...this.children,e]});return e.parent=t,t}pushChildren(e){let t=this;for(let i of e)t=t.pushChild(i);return t}declareName(){if(this.tokens.length===0)throw Error("no tokens to declare name");let e=this.tokens.join(" ");return Nn&&console.log("[%s] declareName <%s>",this.path,e),this.assign({tokens:[]}).pushChild(this.of({name:"Name",value:e}))}define(e,t){if(typeof e!="string")return Nn&&console.log("[%s] no define <%s=%s>",this.path,e,t),this;Nn&&console.log("[%s] define <%s=%s>",this.path,e,t);let i=this.context,r=i.set(e,t),s=this.cache.get(i)||Nx(i),o=Kx(e,Gx(s));return this.cache.set(r,o),this.assign({context:r})}assign(e={}){return n.of({...this,...e})}of(e={}){let t={context:this.context,parent:this.parent};return n.of({...t,...e})}static of(e){let{name:t,tokens:i=[],children:r=[],parent:s=null,context:o,value:a,raw:l,__cache:c}=e;if(!o)throw new Error("must provide <context>");return new n({name:t,tokens:[...i],children:[...r],context:o,parent:s,value:a,raw:l,__cache:c})}};function Ad(n){return n.replace(/\s*([./\-'+]|\*\*?)\s*/g," $1 ").replace(/\s{2,}/g," ").trim()}function qx(n,e,t){var c;let i=n.children.filter(u=>u.name!==e),r=n.children.filter(u=>u.name===e),s=i[0],o=i[Math.max(1,i.length-1)],a=s==null?void 0:s.computedValue(),l=(c=o==null?void 0:o.computedValue())!=null?c:null;return n.assign({children:r}).enterScope(e).pushChildren(i).exitScope(t).define(a,l)}function _d(n={},e=Od){let t=kd.of({context:e.of(n)});return new bc({start:t,reduce(i,r,s,o){if(r===jx){let[f,h]=i.children.slice(-2);i=i.assign({value:e.of(f==null?void 0:f.computedValue(),h==null?void 0:h.computedValue())})}if(r===Hx&&(i=i.assign({value:e.of(...i.children.map(f=>f==null?void 0:f.computedValue()))})),r===Qx){let[f,h]=i.children.slice(-2);i=i.assign({value:f==null?void 0:f.computedValue()})}if(r===Wx){let[f,...h]=i.children;(f==null?void 0:f.raw)==="get value"?i=CT(i,h):i=i.assign({value:(f==null?void 0:f.computedValue())||e.of(void 0)})}let a=xT[r];if(a)return i.enterScope(a);let l=vT[r];if(l){let{children:f,context:h}=i,d=f.slice(0,-1),p=Os(f),m=null;return r===Vx&&(m=e.of(p==null?void 0:p.computedValue())),r===zx&&(m=e.of(h,p==null?void 0:p.computedValue()).set("item",p==null?void 0:p.computedValue())),i.assign({children:d}).enterScope(l).pushChild(p).assign({context:m||h})}let c=o.read(o.pos,s.pos);if(bT[r])return i.exitScope(c);if(r===iT){let f=i.children.filter(p=>p.name!=="ContextEntry"),h=f[0],d=Os(f);return qx(i,"ContextEntry",c).assign({value:e.of(i.value).set(h==null?void 0:h.computedValue(),d==null?void 0:d.computedValue())})}if(r===T_||r===L_)return qx(i,"InExpression",c);if(r===D_)return i.define("partial",ks.of(f=>{var h;return(h=Os(f.children))==null?void 0:h.computedValue()}));if(r===X_){let f=Os(i.children).computedValue();return i.define(f,1)}if(r===F_||r===j_||r===V_){let f=i.children.slice(0,-1),h=Os(i.children);return i.assign({children:f}).enterScope("ArithmeticExpression").pushChild(h)}if(r===Q_)return i.enterScope("ArithmeticExpression");if(r===R_||r===P_||r===sT)return i.token(c);if(r===K_)return i.literal(c.replace(/^"|"$/g,"").replace(/\\(["\\])/g,"$1"));if(r===G_)return i.literal(c==="true");if(r===Y_)return i.literal(parseFloat(c));if(r===U_)return i.literal(null);if(r===z_)return i.resolveName();if(r===M_||r===rT)return i.declareName();if((r===Bx||r===N_)&&i.tokens.length>0)throw new Error("uncleared name");if(r===Bx){let f=i;for(;f.parent;)f=f.exitScope(c);return f}return i}})}var kT=_d({});function CT(n,e){if(!e.length)return n.assign({value:null});if(e[0].name==="Name"&&(e=ST(e,["m","key"])),e.length!==2)return n.assign({value:null});let[t,i]=e,r=i==null?void 0:i.computedValue(),s=t==null?void 0:t.computedValue();return!s||typeof s!="object"||typeof r!="string"?n.assign({value:null}):n.assign({value:[Ad(r),r].reduce((o,a)=>s.get(a)||o,null)})}function ST(n,e){let t={};for(let i=0;i<n.length;i+=2){let[r,s]=n.slice(i,i+2);t[r.value]=s}return e.map(i=>t[i])}function Os(n){return n[n.length-1]}var ET=Jl({StringLiteral:T.string,NumericLiteral:T.number,BooleanLiteral:T.bool,"AtLiteral!":T.special(T.string),CompareOp:T.compareOperator,ArithOp:T.arithmeticOperator,"for if then else some every return":T.controlKeyword,"in instance of and or satisfies between as":T.operatorKeyword,function:T.definitionKeyword,"Type/...":T.typeName,"Wildcard!":T.modifier,null:T.null,LineComment:T.lineComment,BlockComment:T.blockComment,"VariableName!":T.variableName,'"?"':T.special(T.variableName),"DateTimeConstructor! SpecialFunctionName!":T.standard(T.function(T.variableName)),"FunctionInvocation/VariableName!":T.function(T.variableName),"Name!":T.definition(T.variableName),"Key/Name! ContextEntryType/Name!":T.definition(T.propertyName),"PathExpression/VariableName!":T.propertyName,"FormalParameter/ParameterName!":T.function(T.definition(T.variableName)),"( )":T.paren,"[ ]":T.squareBracket,"{ }":T.brace,".":T.derefOperator,", ;":T.separator,"..":T.punctuation}),AT={__proto__:null,for:10,in:32,return:36,if:40,then:42,else:44,some:48,every:50,satisfies:56,or:60,and:64,between:72,instance:86,of:89,days:101,time:103,duration:105,years:107,months:109,date:111,list:117,context:123,function:130,null:156,true:330,false:330,"?":170,external:186,not:211},Jx=wc.deserialize({version:14,states:"CjO`QYOOO`QYOOO$yQYOOOOQU'#Ce'#CeO%TQYO'#C`O&^QYO'#FQOOQQ'#Fe'#FeO&hQYO'#FeO`QYO'#DVOOQU'#En'#EnO(_Q^O'#D]OOQU'#D^'#D^OOQU'#D]'#D]OOQO'#Fm'#FmO*[QWO'#DvOOQQ'#D}'#D}OOQQ'#EO'#EOOOQQ'#EP'#EPO*aOWO'#ESO*[QWO'#EQOOQQ'#EQ'#EQOOQQ'#Fs'#FsOOQQ'#Fq'#FqOOQQ'#Fy'#FyOOQQ'#EU'#EUO`QYO'#EWOOQQ'#FS'#FSO*iQ^O'#FSO,`QYO'#EXO,gQWO'#EYOOQP'#F}'#F}O,lQXO'#EaOOQQ'#Fz'#FzOOQQ'#FR'#FRQOQWOOOOQQ'#FT'#FTOOQQ'#F^'#F^O`QYO'#CoOOQQ'#F_'#F_O%TQYO'#CsO,zQYO'#DwOOQQ'#Fr'#FrO-PQYO'#EROOQO'#ER'#ERO`QYO'#EVO`QYO'#EUOOQO'#F{'#F{Q-XQWOOO-^QYO'#DRO.TQWO'#FaOOQO'#DT'#DTO.`QYO'#FeO.gQWOOO/^QYO'#CdO/kQYO'#FVOOQQ'#Cc'#CcO/pQYO'#FUOOQQ'#Cb'#CbO/xQYO,58zO`QYO,59iOOQQ'#Fb'#FbOOQQ'#Fc'#FcOOQQ'#Fd'#FdO`QYO,59qO`QYO,59qO`QYO,59qOOQQ'#Fk'#FkO/}QYO,5:^OOQQ'#Fl'#FlO`QYO,5:`O`QYO,59eO`QYO,59gO`QYO,59iO1|QYO,59iO2TQYO,59rOOQQ,5:i,5:iO2YQYO,59qOOQU-E8l-E8lO3|QYO'#FnOOQQ,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!g!h!i!j!k!p#Y#[#^#b#f#q#}$O$X$]$`$o${%V%a%v%w!klOPQWilu|}!]!a!b!c!g!h!i!j!k!p#Y#[#^#b#f#q#}$O$X$]$`$o${%V%a%v%w!kmOPQWilu|}!]!a!b!c!g!h!i!j!k!p#Y#[#^#b#f#q#}$O$X$]$`$o${%V%a%v%wR$T!x!koOPQWilu|}!]!a!b!c!g!h!i!j!k!p#Y#[#^#b#f#q#}$O$X$]$`$o${%V%a%v%wR#Oo",nodeNames:"\u26A0 LineComment BlockComment Expression ForExpression for InExpressions InExpression Name Identifier Identifier ArithOp ArithOp ArithOp ArithOp ArithOp in IterationContext return IfExpression if then else QuantifiedExpression some every InExpressions InExpression satisfies Disjunction or Conjunction and Comparison CompareOp CompareOp between PositiveUnaryTest ( PositiveUnaryTests ) ArithmeticExpression InstanceOfExpression instance of Type QualifiedName VariableName BacktickIdentifier SpecialType days time duration years months date > ListType list < ContextType context ContextEntryTypes ContextEntryType FunctionType function ArgumentTypes ArgumentType PathExpression ] FilterExpression [ FunctionInvocation SpecialFunctionName NamedParameters NamedParameter ParameterName PositionalParameters null NumericLiteral StringLiteral BooleanLiteral DateTimeLiteral DateTimeConstructor AtLiteral ? SimplePositiveUnaryTest Interval ParenthesizedExpression List FunctionDefinition FormalParameters FormalParameter external FunctionBody } { Context ContextEntry Key Name Identifier Expressions UnaryTests Wildcard not",maxTerm:173,context:kT,nodeProps:[["group",-17,4,19,23,29,31,33,41,42,68,70,72,85,86,88,89,90,97,"Expr",47,"Expr Expr",-5,78,79,80,81,82,"Expr Literal"],["closedBy",38,")",71,"]",96,"}"],["openedBy",40,"(",69,"[",95,"{"]],propSources:[ET],skippedNodes:[0,1,2],repeatNodeCount:14,tokenData:".v~RvXY#iYZ$^Z[#i]^$^pq#iqr$crs$nwx(Wxy(]yz(bz{(g{|(t|}(y}!O)O!O!P)]!P!Q*g!Q![,b![!],y!]!^-O!^!_-T!_!`$i!`!a-d!b!c-n!}#O-s#P#Q-x#Q#R(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],Expressions:[1,102],UnaryTests:[2,103]},dialects:{camunda:2564},dynamicPrecedences:{31:-1,68:1,72:-1,74:-1},specialized:[{term:122,get:n=>AT[n]||-1}],tokenPrec:2567});function _T(n){let e=[];return n.iterate({enter:t=>{let i=t.node;if(!i.type.isError)return;let r=i.parent,s=eb(i),o={from:i.from,to:i.to,severity:"error",type:"Syntax Error"};if(i.from!==i.to)o.message=`Unrecognized token in <${r.name}>`;else if(s)o.message=`Unrecognized token <${s.name}> in <${r.name}>`,o.to=s.to;else{let a=r.enterUnfinishedNodesBefore(i.to);o.message=`Incomplete <${(a||r).name}>`}e.push(o)}}),e}function eb(n){return n?n.nextSibling||eb(n.parent):null}var TT="first-item",MT={create(n){return{enter(e){if(e.name!=="FilterExpression")return;let t=n.readContent(e.from,e.to);if(Zx().test(t)){let{from:i,to:r}=e;n.report({from:i,to:r,message:"First item is accessed via [1]",severity:"warning",type:TT,actions:[{name:"fix",apply(s,o=i,a=r){n.updateContent(o,a,t.replace(Zx(),"[1]"))}}]})}}}}};function Zx(){return/\[\s*0\s*\]$/}var RT=[MT];function PT(n){let{readContent:e,syntaxTree:t,updateContent:i}=n,r=[],s={readContent:e,report:a=>{r.push(a)},updateContent:i},o=RT.map(a=>a.create(s));return t.iterate({enter:a=>{for(let l of o)l.enter&&l.enter(a)},leave:a=>{for(let l of o)l.leave&&l.leave(a)}}),r}function DT(n){return[..._T(n.syntaxTree),...PT(n)]}var tb=()=>n=>{if(n.state.doc.length===0)return[];let e=ge(n.state);return DT({syntaxTree:e,readContent:(i,r)=>n.state.sliceDoc(i,r),updateContent:(i,r,s)=>n.dispatch({changes:{from:i,to:r,insert:s}})}).map(i=>({...i,source:i.type}))};var Md=[Bt("function(${params}) ${body}",{label:"function",detail:"definition",type:"keyword"}),Bt("for ${var} in ${collection} return ${value}",{label:"for",detail:"expression",type:"keyword"}),Bt("every ${var} in ${collection} satisfies ${condition}",{label:"every",detail:"quantified expression",type:"keyword"}),Bt("some ${var} in ${collection} satisfies ${condition}",{label:"some",detail:"quantified expression",type:"keyword"}),Bt("if ${condition} then ${value} else ${other value}",{label:"if",detail:"block",type:"keyword"}),Bt("{ ${key}: ${value} }",{label:"context",detail:"block",type:"keyword"}),Bt("null",{label:"null",detail:"literal",type:"keyword"}),Bt("true",{label:"true",detail:"literal",type:"keyword"}),Bt("false",{label:"false",detail:"literal",type:"keyword"})];function Td(){return Td=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var i in t)({}).hasOwnProperty.call(t,i)&&(n[i]=t[i])}return n},Td.apply(null,arguments)}function ra(n){let{context:e,after:t,before:i,keyword:r}=n;return NT({nodes:e,before:i,after:t,keyword:r},ys([{label:r,type:"keyword",boost:10}]))}var Rd=[ra({context:"InExpression",keyword:"in"}),ra({context:"IfExpression",keyword:"then",after:"if",before:"else"}),ra({context:"IfExpression",keyword:"else",after:"then"}),ra({context:"QuantifiedExpression",keyword:"satisfies"}),ra({context:"ForExpression",after:"InExpressions",keyword:"return"})],nb=["StringLiteral","Identifier","LineComment","BlockComment","PathExpression","Context","Key","ParameterName"],BT=["Expr","ContextEntry"];function IT(n){let e=[...nb,...BT];return t=>{let{state:i,pos:r}=t,s=sb(ge(i).resolveInner(r,-1),e);if(s){let[o,a]=s;if(nb.includes(a))return null}return n(t)}}function $T(n){return IT(ys(n.map(e=>Td({},e,{type:"text"}))))}function ib(n,e,t){return rb(n,e,t,-1)}function LT(n,e,t){return rb(n,e,t,1)}function rb(n,e,t,i){let r=n[i>0?"childAfter":"childBefore"](e);for(;r;){if(t.includes(r.name))return r;if(r.type.isError&&r.firstChild&&t.includes(r.firstChild.name))return r.firstChild;r=r[i>0?"nextSibling":"prevSibling"]}return null}function sb(n,e){for(Array.isArray(e)||(e=[e]);n;n=n.parent){let t=n.type,i=e.find(r=>r&&t.is(r));if(i)return[n,i];if(t.isTop)break}return null}function NT(n,e){let{nodes:t,before:i,after:r,keyword:s}=n;return o=>{let{state:a,pos:l}=o,c=sb(ge(a).resolveInner(l,-1),t);if(!c)return null;let[u]=c;return ib(u,l,[s,i])||LT(u,l,[s,r])||r&&!ib(u,l,[r])?null:e(o)}}var ob=Zl.define({parser:Jx.configure({props:[$h.add({Context:Lh({closing:"}"}),"List FilterExpression":Lh({closing:"]"}),"ParenthesizedExpression FunctionInvocation":nc({except:/^\s*\)/}),"ForExpression QuantifiedExpression IfExpression":nc({except:/^\s*(then|else|return|satisfies)\b/}),FunctionDefinition:nc({except:/^\s*(\(|\))/})}),dv.add({Context:ic,List:ic,ParenthesizedExpression:ic,FunctionDefinition(n){let e=n.getChild(")");return e?{from:e.to,to:n.to}:null}})]}),languageData:{indentOnInput:/^\s*(\)|\}|\]|then|else|return|satisfies)$/,commentTokens:{line:"//",block:{open:"/*",close:"*/"}}}}),qT=ob.configure({top:"UnaryTests"},"FEEL unary tests"),FT=ob.configure({top:"Expression"},"FEEL expression");function ab(n={}){let e=n.dialect==="unaryTests"?qT:FT,t=n.parserDialect,i=_d(n.context),r=e.configure({contextTracker:i,dialect:t}),s=n.completions||[$T(Md),Rd].flat();return new ec(r,[...s.map(o=>r.data.of({autocomplete:o}))])}var jT=[{name:"not",type:"function",params:[{name:"negand"}],info:`<p>Returns the logical negation of the given value.</p>1675 `,engines:{camunda:">=8.2"}}],lb=[...jT,...VT];var QT=[kx(tb())],zT=q.theme({"& .cm-content":{padding:"0px"},"& .cm-line":{padding:"0px"},"&.cm-editor.cm-focused":{outline:"none"},"& .cm-completionInfo":{whiteSpace:"pre-wrap",overflow:"hidden",textOverflow:"ellipsis"},"&.cm-editor":{height:"100%"},"& .cm-completionInfo > *":{whiteSpace:"normal"},"& .cm-completionInfo ul":{margin:0,paddingLeft:"15px"},"& .cm-completionInfo pre":{marginBottom:0,whiteSpace:"pre-wrap"},"& .cm-completionInfo p":{marginTop:0},"& .cm-completionInfo p:not(:last-of-type)":{marginBottom:0}}),WT=q.baseTheme({"& .variableName":{color:"#10f"},"& .number":{color:"#164"},"& .string":{color:"#a11"},"& .bool":{color:"#219"},"& .function":{color:"#aa3731",fontWeight:"bold"},"& .control":{color:"#708"}}),HT=mv(ds.define([{tag:T.variableName,class:"variableName"},{tag:T.name,class:"variableName"},{tag:T.number,class:"number"},{tag:T.string,class:"string"},{tag:T.bool,class:"bool"},{tag:T.function(T.variableName),class:"function"},{tag:T.function(T.special(T.variableName)),class:"function"},{tag:T.controlKeyword,class:"control"},{tag:T.operatorKeyword,class:"control"}])),XT=[zT,WT,HT];function cb(n){return n&&n.from===n.to}function UT(n,e){let t=n.nextSibling;return cb(n)||t&&t.from===e&&cb(t)}function YT(n){return n&&n.parent&&n.parent.name==="VariableName"}function Pd(n){return n?n.name==="PathExpression"?!0:Pd(n.parent):!1}function KT({variables:n}){return e=>{let t=ge(e.state).resolve(e.pos,-1);if(!Pd(t))return null;let i=GT(t),r=t===i?e.pos:t.from,s=Dd(i,e),o=n;for(var a=0;a<s.length-1;a++){var l=o.find(f=>f.name===s[a].name);if(!l||l.isList!=="optional"&&!!l.isList!==s[a].isList)return null;o=l.entries}if(!o)return null;let c=o.map(f=>({label:f.name,type:"variable",info:f.info,detail:f.detail}));return{from:r,options:c}}}function GT(n){for(;n;){if(n.name==="PathExpression")return n;n=n.parent}}function Dd(n,e){let t=[];for(let i=n.firstChild;i;i=i.nextSibling)i.name==="PathExpression"?t.push(...Dd(i,e)):i.name==="FilterExpression"?t.push(...JT(i,e)):t.push({name:fb(i,e),isList:!1});return t}function JT(n,e){let t=n.firstChild;if(t.name==="PathExpression"){let i=Dd(t,e),r=i[i.length-1];return r.isList=!0,i}return[{name:fb(t,e),isList:!0}]}function fb(n,e){return e.state.sliceDoc(n.from,n.to)}function ZT({variables:n=[],builtins:e=[]}){let t=eM(n,e),i=/^[\w ]*$/;return t.length?r=>{let{pos:s,state:o}=r,a=ge(o).resolve(s,-1);if(UT(a,s))return r.explicit?{from:s,options:t,validFor:i}:null;if(!YT(a)||Pd(a))return null;let l=typeof r.matchBefore=="function"?r.matchBefore(/\w[\w ]*$/):null;return{from:l?l.from:a.from,options:t,validFor:i}}:r=>null}function eM(n,e){return[].concat(n.map(t=>ub(t)),e.map(t=>ub(t)))}function ub(n,e){return n.type==="function"?tM(n,e):{label:n.name,type:"variable",info:n.info,detail:n.detail,boost:e}}function tM(n,e){let{name:t,info:i,detail:r,params:s=[]}=n,o=s.map(({name:u,type:f},h)=>({name:u||`param ${h+1}`,type:f})),a=`${t}(${o.map(u=>"${"+u.name+"}").join(", ")})`,l=o.map(({name:u,type:f})=>f?`${u}: ${f}`:u).join(", "),c=`${t}(${l})`;return Bt(a,{label:c,type:"function",info:i,detail:r,boost:e})}function nM({variables:n=[],builtins:e=[]}){return[KT({variables:n}),ZT({variables:n,builtins:e}),ys(Md),...Rd]}function iM(n){return ab(n)}function rM(n){return n.slice().reverse().reduce((e,t)=>(e[t.name]=()=>{},e),{})}var hb=L.define(),db=L.define(),pb=L.define(),mb=L.define();function gb({dialect:n="expression",parserDialect:e,variables:t=[],builtins:i=[],completions:r=nM({builtins:i,variables:t})}){let s=rM([...t,...i]);return[pb.of(n),hb.of(i),db.of(t),mb.of(e),iM({dialect:n,parserDialect:e,context:s,completions:r})]}function sM(n){let e=n.facet(hb)[0],t=n.facet(db)[0],i=n.facet(pb)[0],r=n.facet(mb)[0];return{builtins:e,variables:t,dialect:i,parserDialect:r}}var oM=lb.map(n=>({...n,info:()=>le(n.info)})),yb=new Pi,vb=new Pi;function qn({extensions:n=[],dialect:e="expression",parserDialect:t,container:i,contentAttributes:r={},tooltipContainer:s,onChange:o=()=>{},onKeyDown:a=()=>{},onLint:l=()=>{},placeholder:c="",readOnly:u=!1,value:f="",builtins:h=oM,variables:d=[]}){this._events=Ax();let p=q.updateListener.of(x=>{x.docChanged&&o(x.state.doc.toString())}),m=q.updateListener.of(x=>{let b=x.transactions.flatMap(k=>k.effects).filter(k=>k.is(na));if(!b.length)return;let C=b.flatMap(k=>k.value);this._events.emit("lint",{diagnostics:C})}),y=q.domEventObservers({keydown:a});typeof s=="string"&&(s=document.querySelector(s));let g=s?H0({tooltipSpace:function(){return s.getBoundingClientRect()}}):[],w=[Iv(),yb.of(gb({dialect:e,builtins:h,variables:d,parserDialect:t})),xv(),hv(),Dv(),q.contentAttributes.of(r),p,y,cs.of([...vx]),QT,m,g,vb.of(fh(c)),XT,...n];return u&&w.push(q.editable.of(!1)),this.on("lint",({diagnostics:x})=>l(x)),this._cmEditor=new q({state:he.create({doc:f,extensions:w}),parent:i}),this}qn.prototype.setValue=function(n){this._cmEditor.dispatch({changes:{from:0,to:this._cmEditor.state.doc.length,insert:n}})};qn.prototype.focus=function(n){let e=this._cmEditor;if(e.contentDOM.focus(),e.focus(),typeof n=="number"){let t=e.state.doc.length;e.dispatch({selection:{anchor:n<=t?n:t}})}};qn.prototype.on=function(n,e){this._events.on(n,e)};qn.prototype.off=function(n,e){this._events.off(n,e)};qn.prototype.getSelection=function(){return this._cmEditor.state.selection};qn.prototype.setVariables=function(n){let e=sM(this._cmEditor.state);this._cmEditor.dispatch({effects:[yb.reconfigure(gb({...e,variables:n}))]})};qn.prototype.setPlaceholder=function(n){this._cmEditor.dispatch({effects:vb.reconfigure(fh(n))})};var sa=class extends z{constructor(t,i){var r;super(t,i);$(this,"handleMouseEvent",t=>{t.stopPropagation()});$(this,"handleKeyDownCapture",t=>{if(t.key==="Enter"){if(lM(this.node)){t.triggeredFromAutocomplete=!0;return}this.props.ctrlForNewline&&!aM(t)&&t.preventDefault(),this.props.singleLine&&t.preventDefault()}});$(this,"handleKeyDown",t=>{["Enter","Escape"].includes(t.key)&&t.triggeredFromAutocomplete&&t.stopPropagation()});$(this,"handleChange",t=>{let{onInput:i}=this.props;this.setState({value:t}),i&&i(t)});$(this,"handleBlur",()=>{let{onBlur:t,onChange:i}=this.props;i&&this.state.value!==this.props.value&&i(this.state.value),t&&t()});$(this,"setNode",t=>{this.node=t});this.node=null,this.editor=null,this.state={value:t.value},this._feelLanguageContext=(r=i.injector)==null?void 0:r.get("feelLanguageContext",!1)}_getFeelLanguageContext(){return this._feelLanguageContext&&this._feelLanguageContext.getConfig()}componentDidMount(){let t=this._getFeelLanguageContext();this.editor=new qn({contentAttributes:{"aria-label":this.props.label},parserDialect:t==null?void 0:t.parserDialect,builtins:t==null?void 0:t.builtins,dialect:this.props.feelLanguageDialect,container:this.node,onChange:this.handleChange,value:this.state.value,variables:this.props.variables||[],extensions:[q.lineWrapping]}),this.node.addEventListener("mousedown",this.handleMouseEvent),this.node.addEventListener("keydown",this.handleKeyDownCapture,!0),this.node.addEventListener("keydown",this.handleKeyDown),this.props.autoFocus&&this.editor.focus(this.state.value.length)}componentDidUpdate(t){let{value:i}=this.props;t.value!==i&&i!==this.state.value&&this.setState({value:i},()=>{this.editor.setValue(i)}),cM(t.variables,this.props.variables)||this.editor.setVariables(this.props.variables)}componentWillUnmount(){this.node.removeEventListener("mousedown",this.handleMouseEvent),this.node.removeEventListener("keydown",this.handleKeyDownCapture,!0),this.node.removeEventListener("keydown",this.handleKeyDown)}render(){return E(1,"div",["literal-expression",this.props.className||""].join(" "),null,1,{onClick:this.handleMouseEvent,onFocusIn:this.props.onFocus,onFocusOut:this.handleBlur},null,this.setNode)}};function aM(n){return n.metaKey||n.ctrlKey}function lM(n){return n.querySelector(".cm-tooltip-autocomplete")}function cM(n,e){return JSON.stringify(n)===JSON.stringify(e)}function Lt(n,e){return function(t){return on(F(2,Bd,{...t,_component:n,_selectDependencies:e}))}}var Bd=class extends z{constructor(t,i){super(t,i);$(this,"onChange",({elements:t})=>{this.props._selectDependencies(this.props).some(r=>t.includes(r))&&this.forceUpdate()});this._eventBus=i.injector.get("eventBus")}componentDidMount(){this._subscribe()}componentWillUnmount(){this._unsubscribe()}_subscribe(){this._eventBus.on("elements.changed",this.onChange)}_unsubscribe(){this._eventBus.off("elements.changed",this.onChange)}render(){let t=this.props._component;return on(F(2,t,{...this.props}))}};var Id=class extends z{constructor(t,i){super(t,i);$(this,"editLiteralExpressionText",t=>{let i=this.getLiteralExpression();this._literalExpression.setText(i,t)});this._literalExpression=i.injector.get("literalExpression"),this._translate=i.injector.get("translate"),this._expressionLanguages=i.injector.get("expressionLanguages"),this._variableResolver=i.injector.get("variableResolver",!1)}getLiteralExpression(){return this.props.expression}getEditor(){return this.isFeel()?uM:$d}isFeel(){let t=this.getLiteralExpression();return em(t)}_getVariables(){let t=this.getLiteralExpression();return this._variableResolver&&this._variableResolver.getVariables(t)}render(){let{text:t}=this.getLiteralExpression(),i=this.getEditor(),r=this._getVariables(),s=this._translate("Literal expression");return F(2,i,{label:s,className:"textarea editor",value:t,onChange:this.editLiteralExpressionText,variables:r})}};function uM(n){return on(F(2,sa,{...n,onChange:n.onChange}))}var $d=class extends xo{render(){return E(1,"div",this.getClassName(),this.getEditor(),0)}},H5=Lt(Id,n=>[n.expression]);var oa=class extends Ei{constructor(e){super(),this._modeling=e}setText(e,t){this._modeling.updateProperties(e,{text:t})}};oa.$inject=["modeling"];function Ld({label:n,onClick:e}){return E(1,"button","edit-button dmn-icon-edit",null,1,{"aria-label":n,type:"button",onClick:e})}var uj=Lt(fM,n=>[n.expression]);function fM({expression:n},e){let t=e.injector.get("functionDefinition"),i=e.injector.get("contextMenu"),r=t.getKind(n),s=t.getParameters(n),o=t.getBody(n),a=c=>{let u=xb(c);i.open(u,{contextMenuType:"kind-editor",expression:n})},l=c=>{let u=xb(c);i.open(u,{contextMenuType:"formal-parameters-editor",expression:n})};return E(1,"div","function-definition",[F(2,dM,{kind:r,openEditor:a}),F(2,pM,{parameters:s,openEditor:l}),F(2,yM,{expression:o,parameters:s})],4)}var hM={FEEL:"F",Java:"J",PMML:"P"};function dM({kind:n,openEditor:e},t){let i=t.injector.get("translate");return E(1,"div","function-definition-kind",[hM[n],F(2,Ld,{label:i("Edit function kind"),onClick:e})],0)}function pM({openEditor:n,parameters:e},t){let i=t.injector.get("translate");return E(1,"div","function-definition-parameters",[E(1,"div",null,[xe("("),e.reduce((r,s)=>r.concat(F(2,mM,{parameter:s}),", "),[]).slice(0,-1),xe(")")],0),F(2,Ld,{label:i("Edit formal parameters"),onClick:n})],4)}var mM=Lt(gM,n=>[n.parameter]);function gM({parameter:n}){let{name:e,typeRef:t}=n,i=e||"<unnamed>";return E(1,"span",null,t?`${i}: ${t}`:i,0)}var yM=Lt(vM,n=>n.parameters);function vM({expression:n,parameters:e},t){let i=t.components.getComponent("expression",{expression:n});return E(1,"div","function-definition-body",F(2,i,{expression:n,parameters:e}),2)}function xb(n){let e=n.target.parentElement,t=e.getBoundingClientRect();return{x:t.x,y:t.y}}var ui=class extends z{constructor(t,i){super(t,i);$(this,"onChange",t=>{this.setState({value:t});let{onChange:i}=this.props;typeof i=="function"&&i(t)});$(this,"onInputClick",t=>{t.preventDefault(),t.stopPropagation(),this.setOptionsVisible(!this.state.optionsVisible),this.focusInput()});$(this,"onInput",t=>{let{value:i}=t.target;this.onChange(i)});$(this,"onOptionClick",(t,i)=>{i.preventDefault(),i.stopPropagation(),this.setOptionsVisible(!1),this.onChange(t),this.focusInput()});$(this,"onFocusChanged",t=>{this.checkClose(t.target)});$(this,"onGlobalClick",t=>{this.checkClose(t.target)});$(this,"onKeyDown",t=>{let{optionsVisible:i}=this.state;var r=t.which;(r===40||r===38)&&(t.stopPropagation(),t.preventDefault(),i?this.select(r===40?1:-1):this.setOptionsVisible(!0)),i&&(r===13||r===27)&&(t.stopPropagation(),t.preventDefault(),this.setOptionsVisible(!1))});$(this,"onKeyboard",t=>{let{optionsVisible:i}=this.state;if(i&&t===27)return this.setOptionsVisible(!1),!0});zt(this);let{value:r}=t;this.state={value:r,optionsVisible:!1},this._portalEl=null}componentDidMount(){document.addEventListener("mousedown",this.onGlobalClick),document.addEventListener("focusin",this.onFocusChanged),this.keyboard.addListener(this.onKeyboard)}componentWillUnmount(){document.removeEventListener("focusin",this.onFocusChanged),document.removeEventListener("mousedown",this.onGlobalClick),this.keyboard.removeListener(this.onKeyboard),this.removePortalEl()}componentWillReceiveProps(t){let{value:i}=t;this.setState({value:i})}componentWillUpdate(t,i){let{optionsVisible:r}=i;r?this._portalEl||this.addPortalEl():this._portalEl&&this.removePortalEl()}componentDidUpdate(){let{optionsVisible:t}=this.state;if(!t||!this.inputNode)return;let i=this.getOptionsBounds();D(this._portalEl.style,i)}getOptionsBounds(){let t=this.renderer.getContainer(),{top:i,left:r,bottom:s}=t.getBoundingClientRect(),{top:o,left:a,width:l,height:c,bottom:u}=this.inputNode.getBoundingClientRect(),f=o+c-i+t.scrollTop,h=a-r+t.scrollLeft,d={top:`${f}px`,left:`${h}px`,width:`${l}px`,"max-height":`calc(100% - ${f}px)`};if(s-u<c){let p=s-o;d.bottom=`${p}px`,d["max-height"]=`calc(100% - ${p})`,delete d.top}return d}addPortalEl(){this._portalEl=le('<div class="dms-select-options"></div>'),this.renderer.getContainer().appendChild(this._portalEl),this._portalEl.addEventListener("mousedown",bb)}removePortalEl(){this._portalEl&&(this._portalEl.removeEventListener("mousedown",bb),$e(this._portalEl),this._portalEl=null)}focusInput(){let t=this.inputNode;t.focus(),"selectionStart"in t&&(t.selectionStart=1e5)}checkClose(t){this._portalEl&&!this._portalEl.contains(t)&&!this.parentNode.contains(t)&&this.setOptionsVisible(!1)}select(t){let{options:i}=this.props,{value:r}=this.state;if(!i)return;let s=i.filter(c=>c.value===r)[0],o=s?i.indexOf(s):-1,a=o===-1?t===1?0:i.length-1:(o+t)%i.length,l=i[a<0?i.length+a:a];this.onChange(l.value)}setOptionsVisible(t){this.setState({optionsVisible:t})}renderOptions(t,i){return E(1,"div","options",t.map(r=>E(1,"div",["option",i===r?"active":""].join(" "),r.label,0,{"data-value":r.value,onClick:s=>this.onOptionClick(r.value,s)})),0)}render(){let{className:t,label:i,id:r,options:s,noInput:o,title:a}=this.props,{optionsVisible:l,value:c}=this.state,u=s?s.filter(h=>h.value===c)[0]:!1,f=u?u.label:c;return E(1,"div",[t||"","dms-input-select"].join(" "),[o?E(1,"div","dms-input",f,0,{"aria-label":i,tabIndex:"0",onKeyDown:this.onKeyDown},null,h=>this.inputNode=h):E(64,"input","dms-input",null,1,{"aria-label":i,onInput:this.onInput,onKeyDown:this.onKeyDown,spellCheck:"false",type:"text",value:c,id:r},null,h=>this.inputNode=h),E(1,"span",["dms-input-select-icon",l?"dmn-icon-up":"dmn-icon-down"].join(" ")),l&&Em(this.renderOptions(s,u),this._portalEl)],0,{title:a,onClick:this.onInputClick},null,h=>this.parentNode=h)}};ui.$inject=["keyboard","renderer"];function bb(n){n.stopPropagation()}var Ui=class extends z{constructor(t,i){super(t,i);$(this,"onInput",t=>{let{onInput:i}=this.props,r=t.target.value;this.setState({value:r},()=>{typeof i=="function"&&i(r)})});$(this,"onChange",t=>{let{onChange:i}=this.props;typeof i=="function"&&i(t.target.value)});$(this,"onKeyDown",t=>{let{onKeyDown:i}=this.props;typeof i=="function"&&i(t)});$(this,"onKeyUp",t=>{let{onKeyUp:i}=this.props;typeof i=="function"&&i(t)});this.state={value:t.value}}componentDidUpdate(t){let{value:i}=this.props;i!==t.value&&i!==this.state.value&&this.setState({value:i})}render(){let{className:t,label:i,id:r,placeholder:s,type:o}=this.props,{value:a}=this.state;return E(64,"input",[t||"","dms-input"].join(" "),null,1,{"aria-label":i,placeholder:s||"",onChange:this.onChange,onInput:this.onInput,onKeyDown:this.onKeyDown,onKeyUp:this.onKeyUp,spellCheck:"false",type:o||"text",value:a,id:r})}};var Pj=Lt(xM,n=>[n.context.expression]);function xM({context:{expression:n}},e){let t=e.injector.get("functionDefinition"),i=e.injector.get("translate"),r=t.getParameters(n),s=a=>{t.removeParameter(n,a)},o=()=>{t.addParameter(n)};return E(1,"div","context-menu-container formal-parameters",[E(1,"h3",null,i("Edit formal parameters"),0),r.length?E(1,"table",null,[E(1,"thead",null,E(1,"tr",null,[E(1,"th",null,xe("Name"),2),E(1,"th",null,xe("Type"),2)],4),2),E(1,"tbody",null,r.map((a,l)=>F(2,bM,{parameter:a,remove:()=>s(a)},l)),0)],4):null,E(1,"button","add-parameter",i("Add parameter"),0,{type:"button",onClick:o})],0)}var bM=Lt(function({parameter:n,remove:e},t){let i=t.injector.get("dataTypes"),r=t.injector.get("translate"),s=t.injector.get("functionDefinition"),{name:o,typeRef:a}=n,l=f=>{s.updateParameter(n,{name:f})},c=f=>{s.updateParameter(n,{typeRef:f})},u=i.getAll().map(f=>({label:r(f),value:f}));return E(1,"tr","function-definition-parameter",[E(1,"td",null,F(2,Ui,{onChange:l,value:o}),2),E(1,"td",null,F(2,ui,{onChange:c,value:a,options:u}),2),E(1,"td",null,E(1,"button","dmn-icon-trash",null,1,{type:"button",onClick:e,"aria-label":r("Remove parameter")}),2)],4)},n=>[n.parameter]);var wM=Lt(function(n,e){let{element:t}=n,i=e.injector.get("modeling"),r=e.injector.get("translate"),s=t.get("name"),o=a=>{i.updateProperties(t,{name:a})};return F(2,Ui,{label:r("Element name"),className:"element-name editor",value:s,onChange:o})},n=>[n.element]);function Nd(n,e){let i=e.injector.get("viewer").getRootElement();return E(1,"div","element-properties",F(2,wM,{element:i}),2)}var aa=class{constructor(e){e.onGetComponent("header",()=>Nd)}};aa.$inject=["components"];var OM=300;function qd(n){return function(t){if(n!==!1){var i=Ce(n)?n:OM;return Gi(t,i)}else return t}}qd.$inject=["config.debounceInput"];var la=class{constructor(e,t){this._eventBus=t,this._viewer=e}updateId(e,t){let i=this._viewer.getRootElement();if(e!==i)throw new Error("element !== rootElement");this._eventBus.fire("element.updateId",{element:e,newId:t}),e.id=t}};la.$inject=["viewer","eventBus"];var wb="is not a registered action",kM="is already registered",ca=class{constructor(e,t){this._actions={undo(){e.undo()},redo(){e.redo()}}}trigger(e,t){if(!this._actions[e])throw Fd(e,wb);return this._actions[e](t)}register(e,t){if(typeof e=="string")return this._registerAction(e,t);B(e,(i,r)=>{this._registerAction(r,i)},this)}_registerAction(e,t){if(this.isRegistered(e))throw Fd(e,kM);this._actions[e]=t}unregister(e){if(!this.isRegistered(e))throw Fd(e,wb);this._actions[e]=void 0}isRegistered(e){return!!this._actions[e]}};ca.$inject=["commandStack","eventBus"];function Fd(n,e){return new Error(n+" "+e)}function Ob(n){return n.dmnDI&&n.dmnDI.diagrams&&n.dmnDI.diagrams[0]}var Yi=class extends Rs{_getViewProviders(){return[{id:"drd",constructor:Ve,opens(e){return Q(e,"dmn:Definitions")&&Ob(e)}},{id:"decisionTable",constructor:no,opens(e){return Q(e,"dmn:Decision")&&Q(e.decisionLogic,"dmn:DecisionTable")}},{id:"literalExpression",constructor:lo,opens(e){return Q(e,"dmn:Decision")&&Q(e.decisionLogic,"dmn:LiteralExpression")}},{id:"boxedExpression",constructor:Qr,opens(e){return Q(e,"dmn:BusinessKnowledgeModel")&&Ta(e)}}]}};var kb=globalThis;kb.DmnJS=Yi;kb.DmnJS.Viewer=Yi;var hV=Yi;})();
1831 …jT,W6,aW=z(()=>{"use strict";Ut();Wx();St();T6();Ir();Ci();kTt={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROS…1987 …Margin),t.startx=t.startx-f)}o(u,"senderAdjustment");let h=[jT.ACTOR,jT.CONTROL,jT.ENTITY,jT.DATAB…
8 …jT(r,t.featureTypes,[n])}else t.featureTypes.forEach((function(i){var o=e.combineBboxAndFilter(i.g…
1 …jT(t,e,n,r){const i=n.event||"input",o=()=>t.update(e.value);r.signal(n.signal,e.value),e.addEvent…