@kern0x1b/penstock-cli 26.10.0 → 26.10.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (135) hide show
  1. package/THIRD-PARTY-NOTICES.md +1647 -0
  2. package/dist/grammars/tree-sitter-c-sharp.wasm +0 -0
  3. package/dist/grammars/tree-sitter-go.wasm +0 -0
  4. package/dist/grammars/tree-sitter-groovy.wasm +0 -0
  5. package/dist/grammars/tree-sitter-java.wasm +0 -0
  6. package/dist/grammars/tree-sitter-javascript.wasm +0 -0
  7. package/dist/grammars/tree-sitter-kotlin.wasm +0 -0
  8. package/dist/grammars/tree-sitter-python.wasm +0 -0
  9. package/dist/grammars/tree-sitter-scala.wasm +0 -0
  10. package/dist/grammars/tree-sitter-typescript.wasm +0 -0
  11. package/dist/grammars/web-tree-sitter.wasm +0 -0
  12. package/dist/penstock.js +1077 -419
  13. package/dist/syntax-worker.js +5 -0
  14. package/dist/web/assets/AgentSettings-Iy9ZaTGR.js +1 -0
  15. package/dist/web/assets/AgentsDialog-Dt09_TEw.js +1 -0
  16. package/dist/web/assets/BpmnCanvas-CCRBnGIV.js +1905 -0
  17. package/dist/web/assets/BpmnDocument-D2lXXcnN.js +24 -0
  18. package/dist/web/assets/ConflictDialog-CaBNoJST.js +1 -0
  19. package/dist/web/assets/DiffDocument-BjLzoDLL.js +1 -0
  20. package/dist/web/assets/DmnDocument-BSGTyR3r.js +41 -0
  21. package/dist/web/assets/DmnDocument-DdjhA8he.css +1 -0
  22. package/dist/web/assets/FormDocument-BdCKvI-7.js +32 -0
  23. package/dist/web/assets/FormDocument-URLcKn84.css +1 -0
  24. package/dist/web/assets/FormStepView-BEDXMPef.js +1 -0
  25. package/dist/web/assets/GraphAwareLayoutService-CZCVRb9X.js +21 -0
  26. package/dist/web/assets/NewFileDialog-D9nTKDOT.js +34 -0
  27. package/dist/web/assets/QuickOpen-D3AkwBdF.js +1 -0
  28. package/dist/web/assets/ScriptPane-4TG-1RyI.js +2 -0
  29. package/dist/web/assets/ScriptRunDialog-C2n9cLcf.js +1 -0
  30. package/dist/web/assets/SettingsDialog-BUft2ulJ.js +1 -0
  31. package/dist/web/assets/ShortcutsDialog-Naoea994.js +1 -0
  32. package/dist/web/assets/SourceDocument-PMA1dm6T.js +1 -0
  33. package/dist/web/assets/TextDocument-D4fl42FV.js +1 -0
  34. package/dist/web/assets/UnreadableFileLayer-DuWtY1bx.js +1 -0
  35. package/dist/web/assets/UploadDialog-CEnwtJ3T.js +1 -0
  36. package/dist/web/assets/Viewer-CZiVl0t6.js +4 -0
  37. package/dist/web/assets/apply-DwO6xN9h.js +1 -0
  38. package/dist/web/assets/array-move-Bc4mVEdq.js +1 -0
  39. package/dist/web/assets/bpmn-0HrGCizt.svg +228 -0
  40. package/dist/web/assets/bpmn-Cyvp-fAH.eot +0 -0
  41. package/dist/web/assets/bpmnTheme-iB2hl29R.js +1687 -0
  42. package/dist/web/assets/bridgeInstance-CJkr34d9.js +600 -0
  43. package/dist/web/assets/clike-DaHM3zHz.js +1 -0
  44. package/dist/web/assets/colors-dark-C7vOziWz.css +1 -0
  45. package/dist/web/assets/colors-dracula-CXhMcc1Z.css +1 -0
  46. package/dist/web/assets/colors-light-CyT40N4M.css +1 -0
  47. package/dist/web/assets/commands-BMjdyegc.js +1 -0
  48. package/dist/web/assets/de-BDwOyJ4E.js +1 -0
  49. package/dist/web/assets/dialog-wo7dFa5A.js +1 -0
  50. package/dist/web/assets/diff-BmEImmS0.js +1 -0
  51. package/dist/web/assets/dist--PmHUHDp.js +1 -0
  52. package/dist/web/assets/dist-B163CX7G.js +57 -0
  53. package/dist/web/assets/dist-BBuLDp9u.js +2 -0
  54. package/dist/web/assets/dist-B_V0lTcO.js +1 -0
  55. package/dist/web/assets/dist-BaEGn3tp.js +6 -0
  56. package/dist/web/assets/dist-BqwyxNP3.js +1 -0
  57. package/dist/web/assets/dist-CAxViutc.js +5 -0
  58. package/dist/web/assets/dist-CBRIhX1e.js +1 -0
  59. package/dist/web/assets/dist-CHluRwHI.js +2 -0
  60. package/dist/web/assets/dist-COW2iVt-.js +1 -0
  61. package/dist/web/assets/dist-CRJyslwo.js +1 -0
  62. package/dist/web/assets/dist-CnDXCEJ_.js +23 -0
  63. package/dist/web/assets/dist-CsBP6QjA.js +13 -0
  64. package/dist/web/assets/dist-CxyFqsL2.js +6 -0
  65. package/dist/web/assets/dist-D6gjpLLN.js +1 -0
  66. package/dist/web/assets/dist-DUkRqvKl.js +1 -0
  67. package/dist/web/assets/dist-DgvQWhKm.js +6 -0
  68. package/dist/web/assets/dist-DvFyMwGd.js +1 -0
  69. package/dist/web/assets/dist-Gx7P7Pk_.js +1 -0
  70. package/dist/web/assets/dist-Km3QNqlU.js +2 -0
  71. package/dist/web/assets/dist-TNwbKIWT.js +1 -0
  72. package/dist/web/assets/dist-sl8LIbwu.js +1 -0
  73. package/dist/web/assets/dmn-2EwrEScy.eot +0 -0
  74. package/dist/web/assets/dmn-eH1_eUsy.svg +90 -0
  75. package/dist/web/assets/dockLayout-CxOMo-Nl.js +1 -0
  76. package/dist/web/assets/documentBridge-uW6vNrY3.js +240 -0
  77. package/dist/web/assets/documents-BwU2MdUd.js +1 -0
  78. package/dist/web/assets/duplicate-rWDlHiZr.js +342 -0
  79. package/dist/web/assets/ed25519-DTYhEcYX.js +1 -0
  80. package/dist/web/assets/engine-BPUfS3r2.js +1 -0
  81. package/dist/web/assets/engines-C3gTrVWJ.js +5 -0
  82. package/dist/web/assets/es-B4wrlqk9.js +1 -0
  83. package/dist/web/assets/files-Chpd_QD0.js +1 -0
  84. package/dist/web/assets/formChecks-DXIRZuhX.js +1 -0
  85. package/dist/web/assets/fr-BqtYruiB.js +1 -0
  86. package/dist/web/assets/frontend-By89859W.js +1 -0
  87. package/dist/web/assets/go-C1TRUqzB.js +1 -0
  88. package/dist/web/assets/groovy-DASguM_i.js +1 -0
  89. package/dist/web/assets/html2canvas-BNKOpkjM.js +5 -0
  90. package/dist/web/assets/httpHost-_QDw41Ka.js +1 -0
  91. package/dist/web/assets/index.es-CVOua_f9.js +4 -0
  92. package/dist/web/assets/index.es-DHW5-gbr.js +78 -0
  93. package/dist/web/assets/index.esm-CTLpq4ik.js +3 -0
  94. package/dist/web/assets/intelligence-BnJILPl7.js +3 -0
  95. package/dist/web/assets/ja-B6eG6Wld.js +1 -0
  96. package/dist/web/assets/jspdf.es.min-Yw43YJzU.js +79 -0
  97. package/dist/web/assets/ko-Le3hTKqP.js +1 -0
  98. package/dist/web/assets/lib-D6xZQFAF.js +1 -0
  99. package/dist/web/assets/libavoid-BRQRZjmQ.wasm +0 -0
  100. package/dist/web/assets/libavoid.wasm +0 -0
  101. package/dist/web/assets/platform-PXoldsjF.js +2 -0
  102. package/dist/web/assets/preferences-C7SSy7Wf.js +1 -0
  103. package/dist/web/assets/preload-helper-VRuDKI9K.js +1 -0
  104. package/dist/web/assets/properties-C3HzGRE2.js +1 -0
  105. package/dist/web/assets/pt-BR-aDlgSu84.js +1 -0
  106. package/dist/web/assets/purify.es-DBLk-NVl.js +3 -0
  107. package/dist/web/assets/python-CvnBFxgv.js +1 -0
  108. package/dist/web/assets/resource/ArchitectsDaughter-OFL.txt +93 -0
  109. package/dist/web/assets/resource/ArchitectsDaughter-Regular.ttf +0 -0
  110. package/dist/web/assets/resource/JetBrainsMono-Italic.woff2 +0 -0
  111. package/dist/web/assets/resource/JetBrainsMono-Medium.woff2 +0 -0
  112. package/dist/web/assets/resource/JetBrainsMono-OFL.txt +52 -0
  113. package/dist/web/assets/resource/JetBrainsMono-Regular.woff2 +0 -0
  114. package/dist/web/assets/resource/JetBrainsMono-SemiBold.woff2 +0 -0
  115. package/dist/web/assets/rolldown-runtime-B8BYMn-z.js +1 -0
  116. package/dist/web/assets/ru-DJl9EFpu.js +1 -0
  117. package/dist/web/assets/run-Dd_PjDF8.js +1 -0
  118. package/dist/web/assets/samples-DfOV2cQu.js +1 -0
  119. package/dist/web/assets/shortcut-DONH578b.js +1 -0
  120. package/dist/web/assets/source-frame-q4WXS_Md.js +2 -0
  121. package/dist/web/assets/stackblur-es-Djj-lnDR.js +2 -0
  122. package/dist/web/assets/syntax-DBcQvmbn.js +6 -0
  123. package/dist/web/assets/testCaseRuns-6x2pl8U_.js +1 -0
  124. package/dist/web/assets/translator-CTBxdhz9.js +1 -0
  125. package/dist/web/assets/typing-CXvbBSPr.js +1 -0
  126. package/dist/web/assets/ui-B2q39Bca.js +1 -0
  127. package/dist/web/assets/useTrace-BbcYW5PF.js +1 -0
  128. package/dist/web/assets/vendor-NJP34MHU.js +1 -0
  129. package/dist/web/assets/web-BTVzb1W6.css +1 -0
  130. package/dist/web/assets/web-D7xTiPek.js +148 -0
  131. package/dist/web/assets/zh-CaEk-YOk.js +1 -0
  132. package/dist/web/icon.svg +9 -0
  133. package/dist/web/index.html +64 -0
  134. package/dist/web/manifest.webmanifest +14 -0
  135. package/package.json +13 -8
@@ -0,0 +1,1687 @@
1
+ import{i as e,n as t,r as n}from"./rolldown-runtime-B8BYMn-z.js";import{i as r}from"./translator-CTBxdhz9.js";import"./frontend-By89859W.js";import{t as i}from"./bridgeInstance-CJkr34d9.js";import{m as a,p as o,v as s}from"./dist-CRJyslwo.js";import"./platform-PXoldsjF.js";import{n as c}from"./lib-D6xZQFAF.js";import{rn as l}from"./Viewer-CZiVl0t6.js";import{_ as u,a as d,i as f,s as p,v as m}from"./dist-CHluRwHI.js";import{a as h,n as g,r as _,t as v}from"./dist-TNwbKIWT.js";import{$ as y,I as b,M as x,N as S,Q as C,St as w,T,Tt as E,_ as ee,gt as D,ht as O,l as te,o as ne,pt as re,r as ie,st as ae,t as oe,tt as se,vt as ce,y as le}from"./dist-CsBP6QjA.js";import{i as ue,o as de,p as fe,r as pe}from"./dist-DvFyMwGd.js";import{i as me,n as he,r as ge,t as _e}from"./dist-Gx7P7Pk_.js";import{a as ve,r as ye,t as be}from"./dist-DUkRqvKl.js";import{l as xe,n as Se}from"./dist-BaEGn3tp.js";import{a as Ce,i as we,n as Te,r as Ee}from"./dist-CAxViutc.js";var ApiClient=class{bridge;bpmn;file;constructor(e=i()){this.bridge=e,this.bpmn=new BpmnApi(e),this.file=new FileApi(e)}dispose(){this.bridge.dispose()}},BpmnApi=class{bridge;constructor(e){this.bridge=e}getConfig=()=>this.bridge.getConfig();getPreviewDiff=()=>this.bridge.getPreviewDiff();saveProjectConfig=e=>this.bridge.saveConfig(e);getBpmnXml=()=>this.bridge.getBpmnXml();saveBpmnXml=e=>this.bridge.saveBpmnXml(e);getClipboard=()=>this.bridge.getClipboard();saveClipboard=e=>this.bridge.saveClipboard(e);openScriptFile=(e,t,n,r,i,a)=>this.bridge.openScriptFile(e,t,n,r,i,a);reportScriptSlot=(e,t)=>this.bridge.reportScriptSlot(e,t)},FileApi=class{bridge;constructor(e){this.bridge=e}readFile=e=>this.bridge.readFile(e);saveFile=(e,t,n)=>this.bridge.saveFile(e,t,n);chooseFile=(e,t)=>this.bridge.chooseFile(e,t);exportSvg=e=>this.bridge.exportSvg(e);exportPng=e=>this.bridge.exportPng(e);exportPdf=e=>this.bridge.exportPdf(e);exportFile=async(e,t,n)=>{let i=await this.bridge.chooseFile(e,{title:r(`app.export.asFormat`,{format:e.toUpperCase()}),mode:`save`});i&&await this.bridge.saveFile(i,t,n)}},De;function getApiClient(){return De||=new ApiClient,De}var Oe=n({getCoerced:()=>getCoerced,getCompatible:()=>getCompatible,isCompatible:()=>isCompatible,isSatisfied:()=>isSatisfied});function requireConstants(){return Ae||(Ae=1,ke={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:2**53-1||9007199254740991,RELEASE_TYPES:[`major`,`premajor`,`minor`,`preminor`,`patch`,`prepatch`,`prerelease`],SEMVER_SPEC_VERSION:`2.0.0`,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}),ke}function requireDebug(){return Me||(Me=1,je=typeof process==`object`&&{}.NODE_DEBUG&&/\bsemver\b/i.test({}.NODE_DEBUG)?(...e)=>console.error(`SEMVER`,...e):()=>{}),je}function requireRe(){return Ne||(Ne=1,(function(e,t){let{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:i}=requireConstants(),a=requireDebug();t=e.exports={};let o=t.re=[],s=t.safeRe=[],c=t.src=[],l=t.safeSrc=[],u=t.t={},d=0,f=`[a-zA-Z0-9-]`,p=[[`\\s`,1],[`\\d`,i],[f,r]],makeSafeRegex=e=>{for(let[t,n]of p)e=e.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`);return e},createToken=(e,t,n)=>{let r=makeSafeRegex(t),i=d++;a(e,i,t),u[e]=i,c[i]=t,l[i]=r,o[i]=new RegExp(t,n?`g`:void 0),s[i]=new RegExp(r,n?`g`:void 0)};createToken(`NUMERICIDENTIFIER`,`0|[1-9]\\d*`),createToken(`NUMERICIDENTIFIERLOOSE`,`\\d+`),createToken(`NONNUMERICIDENTIFIER`,`\\d*[a-zA-Z-]${f}*`),createToken(`MAINVERSION`,`(${c[u.NUMERICIDENTIFIER]})\\.(${c[u.NUMERICIDENTIFIER]})\\.(${c[u.NUMERICIDENTIFIER]})`),createToken(`MAINVERSIONLOOSE`,`(${c[u.NUMERICIDENTIFIERLOOSE]})\\.(${c[u.NUMERICIDENTIFIERLOOSE]})\\.(${c[u.NUMERICIDENTIFIERLOOSE]})`),createToken(`PRERELEASEIDENTIFIER`,`(?:${c[u.NONNUMERICIDENTIFIER]}|${c[u.NUMERICIDENTIFIER]})`),createToken(`PRERELEASEIDENTIFIERLOOSE`,`(?:${c[u.NONNUMERICIDENTIFIER]}|${c[u.NUMERICIDENTIFIERLOOSE]})`),createToken(`PRERELEASE`,`(?:-(${c[u.PRERELEASEIDENTIFIER]}(?:\\.${c[u.PRERELEASEIDENTIFIER]})*))`),createToken(`PRERELEASELOOSE`,`(?:-?(${c[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[u.PRERELEASEIDENTIFIERLOOSE]})*))`),createToken(`BUILDIDENTIFIER`,`${f}+`),createToken(`BUILD`,`(?:\\+(${c[u.BUILDIDENTIFIER]}(?:\\.${c[u.BUILDIDENTIFIER]})*))`),createToken(`FULLPLAIN`,`v?${c[u.MAINVERSION]}${c[u.PRERELEASE]}?${c[u.BUILD]}?`),createToken(`FULL`,`^${c[u.FULLPLAIN]}$`),createToken(`LOOSEPLAIN`,`[v=\\s]*${c[u.MAINVERSIONLOOSE]}${c[u.PRERELEASELOOSE]}?${c[u.BUILD]}?`),createToken(`LOOSE`,`^${c[u.LOOSEPLAIN]}$`),createToken(`GTLT`,`((?:<|>)?=?)`),createToken(`XRANGEIDENTIFIERLOOSE`,`${c[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),createToken(`XRANGEIDENTIFIER`,`${c[u.NUMERICIDENTIFIER]}|x|X|\\*`),createToken(`XRANGEPLAIN`,`[v=\\s]*(${c[u.XRANGEIDENTIFIER]})(?:\\.(${c[u.XRANGEIDENTIFIER]})(?:\\.(${c[u.XRANGEIDENTIFIER]})(?:${c[u.PRERELEASE]})?${c[u.BUILD]}?)?)?`),createToken(`XRANGEPLAINLOOSE`,`[v=\\s]*(${c[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[u.XRANGEIDENTIFIERLOOSE]})(?:${c[u.PRERELEASELOOSE]})?${c[u.BUILD]}?)?)?`),createToken(`XRANGE`,`^${c[u.GTLT]}\\s*${c[u.XRANGEPLAIN]}$`),createToken(`XRANGELOOSE`,`^${c[u.GTLT]}\\s*${c[u.XRANGEPLAINLOOSE]}$`),createToken(`COERCEPLAIN`,`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),createToken(`COERCE`,`${c[u.COERCEPLAIN]}(?:$|[^\\d])`),createToken(`COERCEFULL`,c[u.COERCEPLAIN]+`(?:${c[u.PRERELEASE]})?(?:${c[u.BUILD]})?(?:$|[^\\d])`),createToken(`COERCERTL`,c[u.COERCE],!0),createToken(`COERCERTLFULL`,c[u.COERCEFULL],!0),createToken(`LONETILDE`,`(?:~>?)`),createToken(`TILDETRIM`,`(\\s*)${c[u.LONETILDE]}\\s+`,!0),t.tildeTrimReplace=`$1~`,createToken(`TILDE`,`^${c[u.LONETILDE]}${c[u.XRANGEPLAIN]}$`),createToken(`TILDELOOSE`,`^${c[u.LONETILDE]}${c[u.XRANGEPLAINLOOSE]}$`),createToken(`LONECARET`,`(?:\\^)`),createToken(`CARETTRIM`,`(\\s*)${c[u.LONECARET]}\\s+`,!0),t.caretTrimReplace=`$1^`,createToken(`CARET`,`^${c[u.LONECARET]}${c[u.XRANGEPLAIN]}$`),createToken(`CARETLOOSE`,`^${c[u.LONECARET]}${c[u.XRANGEPLAINLOOSE]}$`),createToken(`COMPARATORLOOSE`,`^${c[u.GTLT]}\\s*(${c[u.LOOSEPLAIN]})$|^$`),createToken(`COMPARATOR`,`^${c[u.GTLT]}\\s*(${c[u.FULLPLAIN]})$|^$`),createToken(`COMPARATORTRIM`,`(\\s*)${c[u.GTLT]}\\s*(${c[u.LOOSEPLAIN]}|${c[u.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace=`$1$2$3`,createToken(`HYPHENRANGE`,`^\\s*(${c[u.XRANGEPLAIN]})\\s+-\\s+(${c[u.XRANGEPLAIN]})\\s*$`),createToken(`HYPHENRANGELOOSE`,`^\\s*(${c[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[u.XRANGEPLAINLOOSE]})\\s*$`),createToken(`STAR`,`(<|>)?=?\\s*\\*`),createToken(`GTE0`,`^\\s*>=\\s*0\\.0\\.0\\s*$`),createToken(`GTE0PRE`,`^\\s*>=\\s*0\\.0\\.0-0\\s*$`)})(k,k.exports)),k.exports}function requireParseOptions(){if(Fe)return Pe;Fe=1;let e=Object.freeze({loose:!0}),t=Object.freeze({}),parseOptions=n=>n?typeof n==`object`?n:e:t;return Pe=parseOptions,Pe}function requireIdentifiers(){if(Ie)return A;Ie=1;let e=/^[0-9]+$/,compareIdentifiers=(t,n)=>{if(typeof t==`number`&&typeof n==`number`)return t===n?0:t<n?-1:1;let r=e.test(t),i=e.test(n);return r&&i&&(t=+t,n=+n),t===n?0:r&&!i?-1:i&&!r?1:t<n?-1:1},rcompareIdentifiers=(e,t)=>compareIdentifiers(t,e);return A={compareIdentifiers,rcompareIdentifiers},A}function requireSemver$1(){if(Le)return j;Le=1;let e=requireDebug(),{MAX_LENGTH:t,MAX_SAFE_INTEGER:n}=requireConstants(),{safeRe:r,t:i}=requireRe(),a=requireParseOptions(),{compareIdentifiers:o}=requireIdentifiers();class SemVer{constructor(o,s){if(s=a(s),o instanceof SemVer){if(o.loose===!!s.loose&&o.includePrerelease===!!s.includePrerelease)return o;o=o.version}else if(typeof o!=`string`)throw TypeError(`Invalid version. Must be a string. Got type "${typeof o}".`);if(o.length>t)throw TypeError(`version is longer than ${t} characters`);e(`SemVer`,o,s),this.options=s,this.loose=!!s.loose,this.includePrerelease=!!s.includePrerelease;let c=o.trim().match(s.loose?r[i.LOOSE]:r[i.FULL]);if(!c)throw TypeError(`Invalid Version: ${o}`);if(this.raw=o,this.major=+c[1],this.minor=+c[2],this.patch=+c[3],this.major>n||this.major<0)throw TypeError(`Invalid major version`);if(this.minor>n||this.minor<0)throw TypeError(`Invalid minor version`);if(this.patch>n||this.patch<0)throw TypeError(`Invalid patch version`);this.prerelease=c[4]?c[4].split(`.`).map(e=>{if(/^[0-9]+$/.test(e)){let t=+e;if(t>=0&&t<n)return t}return e}):[],this.build=c[5]?c[5].split(`.`):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(`.`)}`),this.version}toString(){return this.version}compare(t){if(e(`SemVer.compare`,this.version,this.options,t),!(t instanceof SemVer)){if(typeof t==`string`&&t===this.version)return 0;t=new SemVer(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(e){return e instanceof SemVer||(e=new SemVer(e,this.options)),this.major<e.major?-1:this.major>e.major?1:this.minor<e.minor?-1:this.minor>e.minor?1:this.patch<e.patch?-1:+(this.patch>e.patch)}comparePre(t){if(t instanceof SemVer||(t=new SemVer(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let n=0;do{let r=this.prerelease[n],i=t.prerelease[n];if(e(`prerelease compare`,n,r,i),r===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(r===void 0)return-1;if(r!==i)return o(r,i)}while(++n)}compareBuild(t){t instanceof SemVer||(t=new SemVer(t,this.options));let n=0;do{let r=this.build[n],i=t.build[n];if(e(`build compare`,n,r,i),r===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(r===void 0)return-1;if(r!==i)return o(r,i)}while(++n)}inc(e,t,n){if(e.startsWith(`pre`)){if(!t&&n===!1)throw Error(`invalid increment argument: identifier is empty`);if(t){let e=`-${t}`.match(this.options.loose?r[i.PRERELEASELOOSE]:r[i.PRERELEASE]);if(!e||e[1]!==t)throw Error(`invalid identifier: ${t}`)}}switch(e){case`premajor`:this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc(`pre`,t,n);break;case`preminor`:this.prerelease.length=0,this.patch=0,this.minor++,this.inc(`pre`,t,n);break;case`prepatch`:this.prerelease.length=0,this.inc(`patch`,t,n),this.inc(`pre`,t,n);break;case`prerelease`:this.prerelease.length===0&&this.inc(`patch`,t,n),this.inc(`pre`,t,n);break;case`release`:if(this.prerelease.length===0)throw Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case`major`:(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case`minor`:(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case`patch`:this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case`pre`:{let e=+!!Number(n);if(this.prerelease.length===0)this.prerelease=[e];else{let r=this.prerelease.length;for(;--r>=0;)typeof this.prerelease[r]==`number`&&(this.prerelease[r]++,r=-2);if(r===-1){if(t===this.prerelease.join(`.`)&&n===!1)throw Error(`invalid increment argument: identifier already exists`);this.prerelease.push(e)}}if(t){let r=[t,e];n===!1&&(r=[t]),o(this.prerelease[0],t)===0?isNaN(this.prerelease[1])&&(this.prerelease=r):this.prerelease=r}break}default:throw Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(`.`)}`),this}}return j=SemVer,j}function requireParse(){if(Re)return M;Re=1;let e=requireSemver$1(),parse=(t,n,r=!1)=>{if(t instanceof e)return t;try{return new e(t,n)}catch(e){if(!r)return null;throw e}};return M=parse,M}function requireValid$1(){if(Be)return ze;Be=1;let e=requireParse(),valid=(t,n)=>{let r=e(t,n);return r?r.version:null};return ze=valid,ze}function requireClean(){if(He)return Ve;He=1;let e=requireParse(),clean=(t,n)=>{let r=e(t.trim().replace(/^[=v]+/,``),n);return r?r.version:null};return Ve=clean,Ve}function requireInc(){if(We)return Ue;We=1;let e=requireSemver$1(),inc=(t,n,r,i,a)=>{typeof r==`string`&&(a=i,i=r,r=void 0);try{return new e(t instanceof e?t.version:t,r).inc(n,i,a).version}catch{return null}};return Ue=inc,Ue}function requireDiff(){if(Ke)return Ge;Ke=1;let e=requireParse(),diff=(t,n)=>{let r=e(t,null,!0),i=e(n,null,!0),a=r.compare(i);if(a===0)return null;let o=a>0,s=o?r:i,c=o?i:r,l=!!s.prerelease.length;if(c.prerelease.length&&!l){if(!c.patch&&!c.minor)return`major`;if(c.compareMain(s)===0)return c.minor&&!c.patch?`minor`:`patch`}let u=l?`pre`:``;return r.major===i.major?r.minor===i.minor?r.patch===i.patch?`prerelease`:u+`patch`:u+`minor`:u+`major`};return Ge=diff,Ge}function requireMajor(){if(Je)return qe;Je=1;let e=requireSemver$1(),major=(t,n)=>new e(t,n).major;return qe=major,qe}function requireMinor(){if(Xe)return Ye;Xe=1;let e=requireSemver$1(),minor=(t,n)=>new e(t,n).minor;return Ye=minor,Ye}function requirePatch(){if(Qe)return Ze;Qe=1;let e=requireSemver$1(),patch=(t,n)=>new e(t,n).patch;return Ze=patch,Ze}function requirePrerelease(){if(et)return $e;et=1;let e=requireParse(),prerelease=(t,n)=>{let r=e(t,n);return r&&r.prerelease.length?r.prerelease:null};return $e=prerelease,$e}function requireCompare(){if(nt)return tt;nt=1;let e=requireSemver$1(),compare=(t,n,r)=>new e(t,r).compare(new e(n,r));return tt=compare,tt}function requireRcompare(){if(it)return rt;it=1;let e=requireCompare(),rcompare=(t,n,r)=>e(n,t,r);return rt=rcompare,rt}function requireCompareLoose(){if(ot)return at;ot=1;let e=requireCompare(),compareLoose=(t,n)=>e(t,n,!0);return at=compareLoose,at}function requireCompareBuild(){if(ct)return st;ct=1;let e=requireSemver$1(),compareBuild=(t,n,r)=>{let i=new e(t,r),a=new e(n,r);return i.compare(a)||i.compareBuild(a)};return st=compareBuild,st}function requireSort(){if(dt)return ut;dt=1;let e=requireCompareBuild(),sort=(t,n)=>t.sort((t,r)=>e(t,r,n));return ut=sort,ut}function requireRsort(){if(pt)return ft;pt=1;let e=requireCompareBuild(),rsort=(t,n)=>t.sort((t,r)=>e(r,t,n));return ft=rsort,ft}function requireGt(){if(ht)return mt;ht=1;let e=requireCompare(),gt=(t,n,r)=>e(t,n,r)>0;return mt=gt,mt}function requireLt(){if(vt)return _t;vt=1;let e=requireCompare(),lt=(t,n,r)=>e(t,n,r)<0;return _t=lt,_t}function requireEq(){if(bt)return yt;bt=1;let e=requireCompare(),eq=(t,n,r)=>e(t,n,r)===0;return yt=eq,yt}function requireNeq(){if(St)return xt;St=1;let e=requireCompare(),neq=(t,n,r)=>e(t,n,r)!==0;return xt=neq,xt}function requireGte(){if(wt)return Ct;wt=1;let e=requireCompare(),gte=(t,n,r)=>e(t,n,r)>=0;return Ct=gte,Ct}function requireLte(){if(Et)return Tt;Et=1;let e=requireCompare(),lte=(t,n,r)=>e(t,n,r)<=0;return Tt=lte,Tt}function requireCmp(){if(Ot)return Dt;Ot=1;let e=requireEq(),t=requireNeq(),n=requireGt(),r=requireGte(),i=requireLt(),a=requireLte(),cmp=(o,s,c,l)=>{switch(s){case`===`:return typeof o==`object`&&(o=o.version),typeof c==`object`&&(c=c.version),o===c;case`!==`:return typeof o==`object`&&(o=o.version),typeof c==`object`&&(c=c.version),o!==c;case``:case`=`:case`==`:return e(o,c,l);case`!=`:return t(o,c,l);case`>`:return n(o,c,l);case`>=`:return r(o,c,l);case`<`:return i(o,c,l);case`<=`:return a(o,c,l);default:throw TypeError(`Invalid operator: ${s}`)}};return Dt=cmp,Dt}function requireCoerce(){if(At)return kt;At=1;let e=requireSemver$1(),t=requireParse(),{safeRe:n,t:r}=requireRe(),coerce=(i,a)=>{if(i instanceof e)return i;if(typeof i==`number`&&(i=String(i)),typeof i!=`string`)return null;a||={};let o=null;if(!a.rtl)o=i.match(a.includePrerelease?n[r.COERCEFULL]:n[r.COERCE]);else{let e=a.includePrerelease?n[r.COERCERTLFULL]:n[r.COERCERTL],t;for(;(t=e.exec(i))&&(!o||o.index+o[0].length!==i.length);)o&&t.index+t[0].length===o.index+o[0].length||(o=t),e.lastIndex=t.index+t[1].length+t[2].length;e.lastIndex=-1}if(o===null)return null;let s=o[2],c=o[3]||`0`,l=o[4]||`0`,u=a.includePrerelease&&o[5]?`-${o[5]}`:``,d=a.includePrerelease&&o[6]?`+${o[6]}`:``;return t(`${s}.${c}.${l}${u}${d}`,a)};return kt=coerce,kt}function requireLrucache(){if(Mt)return jt;Mt=1;class LRUCache{constructor(){this.max=1e3,this.map=new Map}get(e){let t=this.map.get(e);if(t!==void 0)return this.map.delete(e),this.map.set(e,t),t}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&t!==void 0){if(this.map.size>=this.max){let e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}}return jt=LRUCache,jt}function requireRange(){if(Pt)return Nt;Pt=1;let e=/\s+/g;class Range{constructor(t,i){if(i=n(i),t instanceof Range)return t.loose===!!i.loose&&t.includePrerelease===!!i.includePrerelease?t:new Range(t.raw,i);if(t instanceof r)return this.raw=t.value,this.set=[[t]],this.formatted=void 0,this;if(this.options=i,this.loose=!!i.loose,this.includePrerelease=!!i.includePrerelease,this.raw=t.trim().replace(e,` `),this.set=this.raw.split(`||`).map(e=>this.parseRange(e.trim())).filter(e=>e.length),!this.set.length)throw TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let e=this.set[0];if(this.set=this.set.filter(e=>!isNullSet(e[0])),this.set.length===0)this.set=[e];else if(this.set.length>1){for(let e of this.set)if(e.length===1&&isAny(e[0])){this.set=[e];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted=``;for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+=`||`);let t=this.set[e];for(let e=0;e<t.length;e++)e>0&&(this.formatted+=` `),this.formatted+=t[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let n=((this.options.includePrerelease&&d)|(this.options.loose&&f))+`:`+e,a=t.get(n);if(a)return a;let p=this.options.loose,m=p?o[s.HYPHENRANGELOOSE]:o[s.HYPHENRANGE];e=e.replace(m,hyphenReplace(this.options.includePrerelease)),i(`hyphen replace`,e),e=e.replace(o[s.COMPARATORTRIM],c),i(`comparator trim`,e),e=e.replace(o[s.TILDETRIM],l),i(`tilde trim`,e),e=e.replace(o[s.CARETTRIM],u),i(`caret trim`,e);let h=e.split(` `).map(e=>parseComparator(e,this.options)).join(` `).split(/\s+/).map(e=>replaceGTE0(e,this.options));p&&(h=h.filter(e=>(i(`loose invalid filter`,e,this.options),!!e.match(o[s.COMPARATORLOOSE])))),i(`range list`,h);let g=new Map,_=h.map(e=>new r(e,this.options));for(let e of _){if(isNullSet(e))return[e];g.set(e.value,e)}g.size>1&&g.has(``)&&g.delete(``);let v=[...g.values()];return t.set(n,v),v}intersects(e,t){if(!(e instanceof Range))throw TypeError(`a Range is required`);return this.set.some(n=>isSatisfiable(n,t)&&e.set.some(e=>isSatisfiable(e,t)&&n.every(n=>e.every(e=>n.intersects(e,t)))))}test(e){if(!e)return!1;if(typeof e==`string`)try{e=new a(e,this.options)}catch{return!1}for(let t=0;t<this.set.length;t++)if(testSet(this.set[t],e,this.options))return!0;return!1}}Nt=Range;let t=new(requireLrucache()),n=requireParseOptions(),r=requireComparator(),i=requireDebug(),a=requireSemver$1(),{safeRe:o,t:s,comparatorTrimReplace:c,tildeTrimReplace:l,caretTrimReplace:u}=requireRe(),{FLAG_INCLUDE_PRERELEASE:d,FLAG_LOOSE:f}=requireConstants(),isNullSet=e=>e.value===`<0.0.0-0`,isAny=e=>e.value===``,isSatisfiable=(e,t)=>{let n=!0,r=e.slice(),i=r.pop();for(;n&&r.length;)n=r.every(e=>i.intersects(e,t)),i=r.pop();return n},parseComparator=(e,t)=>(e=e.replace(o[s.BUILD],``),i(`comp`,e,t),e=replaceCarets(e,t),i(`caret`,e),e=replaceTildes(e,t),i(`tildes`,e),e=replaceXRanges(e,t),i(`xrange`,e),e=replaceStars(e,t),i(`stars`,e),e),isX=e=>!e||e.toLowerCase()===`x`||e===`*`,replaceTildes=(e,t)=>e.trim().split(/\s+/).map(e=>replaceTilde(e,t)).join(` `),replaceTilde=(e,t)=>{let n=t.loose?o[s.TILDELOOSE]:o[s.TILDE];return e.replace(n,(t,n,r,a,o)=>{i(`tilde`,e,t,n,r,a,o);let s;return isX(n)?s=``:isX(r)?s=`>=${n}.0.0 <${+n+1}.0.0-0`:isX(a)?s=`>=${n}.${r}.0 <${n}.${+r+1}.0-0`:o?(i(`replaceTilde pr`,o),s=`>=${n}.${r}.${a}-${o} <${n}.${+r+1}.0-0`):s=`>=${n}.${r}.${a} <${n}.${+r+1}.0-0`,i(`tilde return`,s),s})},replaceCarets=(e,t)=>e.trim().split(/\s+/).map(e=>replaceCaret(e,t)).join(` `),replaceCaret=(e,t)=>{i(`caret`,e,t);let n=t.loose?o[s.CARETLOOSE]:o[s.CARET],r=t.includePrerelease?`-0`:``;return e.replace(n,(t,n,a,o,s)=>{i(`caret`,e,t,n,a,o,s);let c;return isX(n)?c=``:isX(a)?c=`>=${n}.0.0${r} <${+n+1}.0.0-0`:isX(o)?c=n===`0`?`>=${n}.${a}.0${r} <${n}.${+a+1}.0-0`:`>=${n}.${a}.0${r} <${+n+1}.0.0-0`:s?(i(`replaceCaret pr`,s),c=n===`0`?a===`0`?`>=${n}.${a}.${o}-${s} <${n}.${a}.${+o+1}-0`:`>=${n}.${a}.${o}-${s} <${n}.${+a+1}.0-0`:`>=${n}.${a}.${o}-${s} <${+n+1}.0.0-0`):(i(`no pr`),c=n===`0`?a===`0`?`>=${n}.${a}.${o}${r} <${n}.${a}.${+o+1}-0`:`>=${n}.${a}.${o}${r} <${n}.${+a+1}.0-0`:`>=${n}.${a}.${o} <${+n+1}.0.0-0`),i(`caret return`,c),c})},replaceXRanges=(e,t)=>(i(`replaceXRanges`,e,t),e.split(/\s+/).map(e=>replaceXRange(e,t)).join(` `)),replaceXRange=(e,t)=>{e=e.trim();let n=t.loose?o[s.XRANGELOOSE]:o[s.XRANGE];return e.replace(n,(n,r,a,o,s,c)=>{i(`xRange`,e,n,r,a,o,s,c);let l=isX(a),u=l||isX(o),d=u||isX(s),f=d;return r===`=`&&f&&(r=``),c=t.includePrerelease?`-0`:``,l?n=r===`>`||r===`<`?`<0.0.0-0`:`*`:r&&f?(u&&(o=0),s=0,r===`>`?(r=`>=`,u?(a=+a+1,o=0,s=0):(o=+o+1,s=0)):r===`<=`&&(r=`<`,u?a=+a+1:o=+o+1),r===`<`&&(c=`-0`),n=`${r+a}.${o}.${s}${c}`):u?n=`>=${a}.0.0${c} <${+a+1}.0.0-0`:d&&(n=`>=${a}.${o}.0${c} <${a}.${+o+1}.0-0`),i(`xRange return`,n),n})},replaceStars=(e,t)=>(i(`replaceStars`,e,t),e.trim().replace(o[s.STAR],``)),replaceGTE0=(e,t)=>(i(`replaceGTE0`,e,t),e.trim().replace(o[t.includePrerelease?s.GTE0PRE:s.GTE0],``)),hyphenReplace=e=>(t,n,r,i,a,o,s,c,l,u,d,f)=>(n=isX(r)?``:isX(i)?`>=${r}.0.0${e?`-0`:``}`:isX(a)?`>=${r}.${i}.0${e?`-0`:``}`:o?`>=${n}`:`>=${n}${e?`-0`:``}`,c=isX(l)?``:isX(u)?`<${+l+1}.0.0-0`:isX(d)?`<${l}.${+u+1}.0-0`:f?`<=${l}.${u}.${d}-${f}`:e?`<${l}.${u}.${+d+1}-0`:`<=${c}`,`${n} ${c}`.trim()),testSet=(e,t,n)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let n=0;n<e.length;n++)if(i(e[n].semver),e[n].semver!==r.ANY&&e[n].semver.prerelease.length>0){let r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0};return Nt}function requireComparator(){if(It)return Ft;It=1;let e=Symbol(`SemVer ANY`);class Comparator{static get ANY(){return e}constructor(n,r){if(r=t(r),n instanceof Comparator){if(n.loose===!!r.loose)return n;n=n.value}n=n.trim().split(/\s+/).join(` `),a(`comparator`,n,r),this.options=r,this.loose=!!r.loose,this.parse(n),this.value=this.semver===e?``:this.operator+this.semver.version,a(`comp`,this)}parse(t){let i=this.options.loose?n[r.COMPARATORLOOSE]:n[r.COMPARATOR],a=t.match(i);if(!a)throw TypeError(`Invalid comparator: ${t}`);this.operator=a[1]===void 0?``:a[1],this.operator===`=`&&(this.operator=``),this.semver=a[2]?new o(a[2],this.options.loose):e}toString(){return this.value}test(t){if(a(`Comparator.test`,t,this.options.loose),this.semver===e||t===e)return!0;if(typeof t==`string`)try{t=new o(t,this.options)}catch{return!1}return i(t,this.operator,this.semver,this.options)}intersects(e,n){if(!(e instanceof Comparator))throw TypeError(`a Comparator is required`);return this.operator===``?this.value===``||new s(e.value,n).test(this.value):e.operator===``?e.value===``||new s(this.value,n).test(e.semver):(n=t(n),n.includePrerelease&&(this.value===`<0.0.0-0`||e.value===`<0.0.0-0`)||!n.includePrerelease&&(this.value.startsWith(`<0.0.0`)||e.value.startsWith(`<0.0.0`))?!1:!!(this.operator.startsWith(`>`)&&e.operator.startsWith(`>`)||this.operator.startsWith(`<`)&&e.operator.startsWith(`<`)||this.semver.version===e.semver.version&&this.operator.includes(`=`)&&e.operator.includes(`=`)||i(this.semver,`<`,e.semver,n)&&this.operator.startsWith(`>`)&&e.operator.startsWith(`<`)||i(this.semver,`>`,e.semver,n)&&this.operator.startsWith(`<`)&&e.operator.startsWith(`>`)))}}Ft=Comparator;let t=requireParseOptions(),{safeRe:n,t:r}=requireRe(),i=requireCmp(),a=requireDebug(),o=requireSemver$1(),s=requireRange();return Ft}function requireSatisfies(){if(Rt)return Lt;Rt=1;let e=requireRange(),satisfies=(t,n,r)=>{try{n=new e(n,r)}catch{return!1}return n.test(t)};return Lt=satisfies,Lt}function requireToComparators(){if(Bt)return zt;Bt=1;let e=requireRange(),toComparators=(t,n)=>new e(t,n).set.map(e=>e.map(e=>e.value).join(` `).trim().split(` `));return zt=toComparators,zt}function requireMaxSatisfying(){if(Ht)return Vt;Ht=1;let e=requireSemver$1(),t=requireRange(),maxSatisfying=(n,r,i)=>{let a=null,o=null,s=null;try{s=new t(r,i)}catch{return null}return n.forEach(t=>{s.test(t)&&(a&&o.compare(t)!==-1||(a=t,o=new e(a,i)))}),a};return Vt=maxSatisfying,Vt}function requireMinSatisfying(){if(Wt)return Ut;Wt=1;let e=requireSemver$1(),t=requireRange(),minSatisfying=(n,r,i)=>{let a=null,o=null,s=null;try{s=new t(r,i)}catch{return null}return n.forEach(t=>{s.test(t)&&(a&&o.compare(t)!==1||(a=t,o=new e(a,i)))}),a};return Ut=minSatisfying,Ut}function requireMinVersion(){if(Kt)return Gt;Kt=1;let e=requireSemver$1(),t=requireRange(),n=requireGt(),minVersion=(r,i)=>{r=new t(r,i);let a=new e(`0.0.0`);if(r.test(a)||(a=new e(`0.0.0-0`),r.test(a)))return a;a=null;for(let t=0;t<r.set.length;++t){let i=r.set[t],o=null;i.forEach(t=>{let r=new e(t.semver.version);switch(t.operator){case`>`:r.prerelease.length===0?r.patch++:r.prerelease.push(0),r.raw=r.format();case``:case`>=`:(!o||n(r,o))&&(o=r);break;case`<`:case`<=`:break;default:throw Error(`Unexpected operation: ${t.operator}`)}}),o&&(!a||n(a,o))&&(a=o)}return a&&r.test(a)?a:null};return Gt=minVersion,Gt}function requireValid(){if(Jt)return qt;Jt=1;let e=requireRange(),validRange=(t,n)=>{try{return new e(t,n).range||`*`}catch{return null}};return qt=validRange,qt}function requireOutside(){if(Xt)return Yt;Xt=1;let e=requireSemver$1(),t=requireComparator(),{ANY:n}=t,r=requireRange(),i=requireSatisfies(),a=requireGt(),o=requireLt(),s=requireLte(),c=requireGte(),outside=(l,u,d,f)=>{l=new e(l,f),u=new r(u,f);let p,m,h,g,_;switch(d){case`>`:p=a,m=s,h=o,g=`>`,_=`>=`;break;case`<`:p=o,m=c,h=a,g=`<`,_=`<=`;break;default:throw TypeError(`Must provide a hilo val of "<" or ">"`)}if(i(l,u,f))return!1;for(let e=0;e<u.set.length;++e){let r=u.set[e],i=null,a=null;if(r.forEach(e=>{e.semver===n&&(e=new t(`>=0.0.0`)),i||=e,a||=e,p(e.semver,i.semver,f)?i=e:h(e.semver,a.semver,f)&&(a=e)}),i.operator===g||i.operator===_||(!a.operator||a.operator===g)&&m(l,a.semver)||a.operator===_&&h(l,a.semver))return!1}return!0};return Yt=outside,Yt}function requireGtr(){if(Qt)return Zt;Qt=1;let e=requireOutside(),gtr=(t,n,r)=>e(t,n,`>`,r);return Zt=gtr,Zt}function requireLtr(){if(en)return $t;en=1;let e=requireOutside(),ltr=(t,n,r)=>e(t,n,`<`,r);return $t=ltr,$t}function requireIntersects(){if(nn)return tn;nn=1;let e=requireRange(),intersects=(t,n,r)=>(t=new e(t,r),n=new e(n,r),t.intersects(n,r));return tn=intersects,tn}function requireSimplify(){if(rn)return simplify;rn=1;let e=requireSatisfies(),t=requireCompare();return simplify=(n,r,i)=>{let a=[],o=null,s=null,c=n.sort((e,n)=>t(e,n,i));for(let t of c)e(t,r,i)?(s=t,o||=t):(s&&a.push([o,s]),s=null,o=null);o&&a.push([o,null]);let l=[];for(let[e,t]of a)e===t?l.push(e):!t&&e===c[0]?l.push(`*`):t?e===c[0]?l.push(`<=${t}`):l.push(`${e} - ${t}`):l.push(`>=${e}`);let u=l.join(` || `),d=typeof r.raw==`string`?r.raw:String(r);return u.length<d.length?u:r},simplify}function requireSubset(){if(on)return an;on=1;let e=requireRange(),t=requireComparator(),{ANY:n}=t,r=requireSatisfies(),i=requireCompare(),subset=(t,n,r={})=>{if(t===n)return!0;t=new e(t,r),n=new e(n,r);let i=!1;OUTER:for(let e of t.set){for(let t of n.set){let n=simpleSubset(e,t,r);if(i||=n!==null,n)continue OUTER}if(i)return!1}return!0},a=[new t(`>=0.0.0-0`)],o=[new t(`>=0.0.0`)],simpleSubset=(e,t,s)=>{if(e===t)return!0;if(e.length===1&&e[0].semver===n){if(t.length===1&&t[0].semver===n)return!0;e=s.includePrerelease?a:o}if(t.length===1&&t[0].semver===n){if(s.includePrerelease)return!0;t=o}let c=new Set,l,u;for(let t of e)t.operator===`>`||t.operator===`>=`?l=higherGT(l,t,s):t.operator===`<`||t.operator===`<=`?u=lowerLT(u,t,s):c.add(t.semver);if(c.size>1)return null;let d;if(l&&u&&(d=i(l.semver,u.semver,s),d>0||d===0&&(l.operator!==`>=`||u.operator!==`<=`)))return null;for(let e of c){if(l&&!r(e,String(l),s)||u&&!r(e,String(u),s))return null;for(let n of t)if(!r(e,String(n),s))return!1;return!0}let f,p,m,h,g=u&&!s.includePrerelease&&u.semver.prerelease.length?u.semver:!1,_=l&&!s.includePrerelease&&l.semver.prerelease.length?l.semver:!1;g&&g.prerelease.length===1&&u.operator===`<`&&g.prerelease[0]===0&&(g=!1);for(let e of t){if(h=h||e.operator===`>`||e.operator===`>=`,m=m||e.operator===`<`||e.operator===`<=`,l){if(_&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===_.major&&e.semver.minor===_.minor&&e.semver.patch===_.patch&&(_=!1),e.operator===`>`||e.operator===`>=`){if(f=higherGT(l,e,s),f===e&&f!==l)return!1}else if(l.operator===`>=`&&!r(l.semver,String(e),s))return!1}if(u){if(g&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===g.major&&e.semver.minor===g.minor&&e.semver.patch===g.patch&&(g=!1),e.operator===`<`||e.operator===`<=`){if(p=lowerLT(u,e,s),p===e&&p!==u)return!1}else if(u.operator===`<=`&&!r(u.semver,String(e),s))return!1}if(!e.operator&&(u||l)&&d!==0)return!1}return!(l&&m&&!u&&d!==0||u&&h&&!l&&d!==0||_||g)},higherGT=(e,t,n)=>{if(!e)return t;let r=i(e.semver,t.semver,n);return r>0?e:r<0||t.operator===`>`&&e.operator===`>=`?t:e},lowerLT=(e,t,n)=>{if(!e)return t;let r=i(e.semver,t.semver,n);return r<0?e:r>0||t.operator===`<`&&e.operator===`<=`?t:e};return an=subset,an}function requireSemver(){if(cn)return sn;cn=1;let e=requireRe(),t=requireConstants(),n=requireSemver$1(),r=requireIdentifiers();return sn={parse:requireParse(),valid:requireValid$1(),clean:requireClean(),inc:requireInc(),diff:requireDiff(),major:requireMajor(),minor:requireMinor(),patch:requirePatch(),prerelease:requirePrerelease(),compare:requireCompare(),rcompare:requireRcompare(),compareLoose:requireCompareLoose(),compareBuild:requireCompareBuild(),sort:requireSort(),rsort:requireRsort(),gt:requireGt(),lt:requireLt(),eq:requireEq(),neq:requireNeq(),gte:requireGte(),lte:requireLte(),cmp:requireCmp(),coerce:requireCoerce(),Comparator:requireComparator(),Range:requireRange(),satisfies:requireSatisfies(),toComparators:requireToComparators(),maxSatisfying:requireMaxSatisfying(),minSatisfying:requireMinSatisfying(),minVersion:requireMinVersion(),validRange:requireValid(),outside:requireOutside(),gtr:requireGtr(),ltr:requireLtr(),intersects:requireIntersects(),simplifyRange:requireSimplify(),subset:requireSubset(),SemVer:n,re:e.re,src:e.src,tokens:e.t,SEMVER_SPEC_VERSION:t.SEMVER_SPEC_VERSION,RELEASE_TYPES:t.RELEASE_TYPES,compareIdentifiers:r.compareIdentifiers,rcompareIdentifiers:r.rcompareIdentifiers},sn}function isCompatible(e,t){for(let[n,r]of Object.entries(e)){let e=t[n];if(e&&isSatisfied(r,e)===!1)return!1}return!0}function getCompatible(e,t){let n={};for(let[r,i]of Object.entries(e)){let e=t[r];e&&isSatisfied(i,e)===!0&&(n[r]=e)}return n}function getCoerced(e){let t={};for(let[n,r]of Object.entries(e)){let e=N.coerce(r);e&&(t[n]=e.version)}return t}function isSatisfied(e,t){if(!N.validRange(e))return null;let n=N.coerce(t);return n?N.satisfies(n,e):null}var k,ke,Ae,je,Me,Ne,Pe,Fe,A,Ie,j,Le,M,Re,ze,Be,Ve,He,Ue,We,Ge,Ke,qe,Je,Ye,Xe,Ze,Qe,$e,et,tt,nt,rt,it,at,ot,st,ct,ut,dt,ft,pt,mt,ht,_t,vt,yt,bt,xt,St,Ct,wt,Tt,Et,Dt,Ot,kt,At,jt,Mt,Nt,Pt,Ft,It,Lt,Rt,zt,Bt,Vt,Ht,Ut,Wt,Gt,Kt,qt,Jt,Yt,Xt,Zt,Qt,$t,en,tn,nn,simplify,rn,an,on,sn,cn,N,ln=t((()=>{k={exports:{}},N=requireSemver()}));u();function lintEmptyInserts(e){let t=[];return e.iterate({enter:e=>{e.type.name===`EmptyInsert`&&t.push({from:e.from,to:e.to,severity:`warning`,message:`this insert is empty and will be ignored`,type:`emptyInsert`})}}),t}h(),a(),f();var un=124,dn=125,fn=126,pn=127,mn=131,hn=4,gn=134,_n=7,vn=8,yn=9,bn=10,xn=140,Sn=21,Cn=141,wn=25,Tn=142,En=29,Dn=39,On=43,kn=145,An=146,jn=147,Mn=148,Nn=49,Pn=70,Fn=154,In=71,Ln=73,Rn=155,zn=75,Bn=156,Vn=79,Hn=161,Un=82,Wn=83,Gn=84,Kn=168,qn=92,Jn=93,Yn=170,Xn=100,Zn=172,Qn=101,$n=103,er=104,tr=typeof process<`u`&&/\bfparse(:dbg)?\b/.test({}.LOG),nr=typeof process<`u`&&/\bfparse:dbg\b/.test({}.LOG),P=typeof process<`u`&&/\bcontext\b/.test({}.LOG),rr=[9,11,12,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],ir=chars$1(`
2
+ \r`),ar=42,or=chars$1(`'./-+*^`);function chars$1(e){return Array.from(e).map(e=>e.charCodeAt(0))}e(chars$1,`chars`);function isStartChar$1(e){return e===63||e>=65&&e<=90||e===95||e>=97&&e<=122||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=767||e>=880&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=55296&&e<=56319||e>=56320&&e<=57343}e(isStartChar$1,`isStartChar`);function isAdditional$1(e){return or.includes(e)}e(isAdditional$1,`isAdditional`);function isPartChar$1(e){return e>=48&&e<=57||e===183||e>=768&&e<=879||e>=8255&&e<=8256}e(isPartChar$1,`isPartChar`);function isSpace$1(e){return rr.includes(e)}e(isSpace$1,`isSpace`);function indent$1(e,t){return t.concat(e.split(/\n/g).join(`
3
+ `+t))}e(indent$1,`indent`);function parseAdditionalSymbol$1(e,t=0){let n=e.peek(t);return n===ar&&e.peek(t+1)===ar?{offset:2,token:`**`}:isAdditional$1(n)?{offset:1,token:String.fromCharCode(n)}:null}e(parseAdditionalSymbol$1,`parseAdditionalSymbol`);function parseIdentifier$1(e,t=0,n=!1){for(let r=!1,i=[],a=0;;a++){let o=e.peek(t+a);if(isStartChar$1(o)||(r||n)&&isPartChar$1(o))r||=!0,i.push(o);else return i.length?{token:String.fromCharCode(...i),offset:a}:null}}e(parseIdentifier$1,`parseIdentifier`);function parseSpaces$1(e,t){for(let n=!1,r=0;;r++)if(isSpace$1(e.peek(t+r)))n||=!0;else return n?{token:` `,offset:r}:null}e(parseSpaces$1,`parseSpaces`);function parseName$1(e,t){let{keys:n,prefixes:r}=t.contextCache(),i=t.tokens;for(let t=0,a=[],o=null;;){let s=i.length+a.length>0,c=a.length>0,l=parseIdentifier$1(e,t,s)||s&&parseAdditionalSymbol$1(e,t)||c&&parseSpaces$1(e,t);if(!l)return o;let{token:u,offset:d}=l;if(t+=d,u===` `)continue;a=[...a,u];let f=[...i,...a].join(` `);if(n.has(f)){let e=a[0];o={token:e,offset:e.length,term:fn}}if(!r.has(f)){if(mr.some(e=>e===f)){let e=a[0];o={token:e,offset:e.length,term:dn}}if(!mr.some(e=>e.startsWith(f)))return o}}}e(parseName$1,`parseName`);var sr={[dn]:`identifier`,[fn]:`nameIdentifier`},cr=new g((e,t)=>{nr&&console.log(`%s: T <identifier | nameIdentifier>`,e.pos);let n=parseName$1(e,t.context),r=t.context.tokens,i=n||parseIdentifier$1(e,0,r.length>0);i&&(e.advance(i.offset),e.acceptToken(n?n.term:dn),tr&&console.log(`%s: MATCH <%s> <%s>`,e.pos,n?sr[n.term]:`identifier`,i.token))},{contextual:!0}),lr=new g((e,t)=>{nr&&console.log(`%s: T <propertyIdentifier>`,e.pos);let n=t.context.tokens,r=parseIdentifier$1(e,0,n.length>0);r&&(e.advance(r.offset),e.acceptToken(un),tr&&console.log(`%s: MATCH <propertyIdentifier> <%s>`,e.pos,r.token))}),ur=new g((e,t)=>{nr&&console.log(`%s: T <insertSemi>`,e.pos);let n,r=!1;for(n=0;;n++){let t=e.peek(n);if(!rr.includes(t)){ir.includes(t)&&(r=!0);break}}if(r){let t=parseIdentifier$1(e,n+1);if(parseSpaces$1(e,n+1)||t&&/^(then|else|return|satisfies)$/.test(t.token))return;tr&&console.log(`%s: MATCH <insertSemi>`,e.pos),e.acceptToken(pn)}}),dr={[Bn]:`FunctionInvocation`,[Rn]:`FilterExpression`,[Fn]:`PathExpression`},fr={[Zn]:`Context`,[Yn]:`FunctionDefinition`,[gn]:`ForExpression`,[Kn]:`List`,[Cn]:`IfExpression`,[Tn]:`QuantifiedExpression`},pr={[Xn]:`Context`,[Jn]:`FunctionDefinition`,[hn]:`ForExpression`,[qn]:`List`,[Sn]:`IfExpression`,[wn]:`QuantifiedExpression`,[Pn]:`PathExpression`,[zn]:`FunctionInvocation`,[Ln]:`FilterExpression`,[On]:`ArithmeticExpression`},I=class ValueProducer$1{static{e(this,`ValueProducer`)}constructor(e){this.fn=e}get(e){return this.fn(e)}static of(e){return new ValueProducer$1(e)}},mr=Object.keys({"date and time":1,date:1,time:1,duration:1});function getPrefixes$1(e){let t=[];for(let n=1;n<=e.length;n++)t.push(e.substring(0,n));return t}e(getPrefixes$1,`getPrefixes`);function cacheKey$1(e,t){let n=normalizeContextKey$1(e),r=getPrefixes$1(n);t.keys.add(n);for(let e of r)t.prefixes.add(e);return t.originalMap.set(n,e),t}e(cacheKey$1,`cacheKey`);function computeContextCache$1(e){let t=createContextCache$1();for(let n of e.getKeys())cacheKey$1(n,t);return t}e(computeContextCache$1,`computeContextCache`);function createContextCache$1(e){return{keys:new Set(e?.keys),prefixes:new Set(e?.prefixes),originalMap:new Map(e?.originalMap)}}e(createContextCache$1,`createContextCache`);var VariableContext$1=class{static{e(this,`VariableContext`)}constructor(e={}){this.value=e}getKeys(){return Object.keys(this.value)}get(e){let t=this.value[e],n=this.constructor;return n.isAtomic(t)?t:n.of(t)}set(e,t){let n=this.constructor;return new n({...this.value,[e]:t})}merge(e){let t=this.constructor;return new t(t.__merge(this.value,e))}static isAtomic(e){return e==null||e instanceof this||e instanceof I||typeof e!=`object`}static of(...e){let t=e.reduce((e,t)=>this.__merge(e,t),{});return new this(t)}static __unwrap(e){return e?e instanceof this?e.value:this.isAtomic(e)?{}:e:{}}static __merge(e,t){let n=Object.assign({},this.__unwrap(e));for(let[e,r]of Object.entries(this.__unwrap(t)))n[e]=r instanceof I?r:o(n,e)?this.__merge(n[e],r):r;return n}},hr=class Variables$1{static{e(this,`Variables`)}constructor({name:e=`Expressions`,tokens:t=[],children:n=[],parent:r=null,context:i,value:a,raw:o,__cache:s}){this.name=e,this.tokens=t,this.children=n,this.parent=r,this.context=i,this.value=a,this.raw=o,this.__cache=s}get root(){let e=this;for(;e.parent;)e=e.parent;return e}get cache(){let e=this.root;return e.__cache||=new WeakMap,e.__cache}enterScope(e){let t=this.of({name:e,parent:this});return P&&console.log(`[%s] enter`,t.path,t.context),t}exitScope(e){return this.parent?(P&&console.log(`[%s] exit %o
4
+ %s`,this.path,this.context,indent$1(e,` `)),this.parent.pushChild(this)):(P&&console.log(`[%s] NO exit %o
5
+ %s`,this.path,this.context,indent$1(e,` `)),this)}token(e){return P&&console.log(`[%s] token <%s> + <%s>`,this.path,this.tokens.join(` `),e),this.assign({tokens:[...this.tokens,e]})}literal(e){return P&&console.log(`[%s] literal %o`,this.path,e),this.pushChild(this.of({name:`Literal`,value:e}))}computedValue(){for(let e=this;;e=last$1(e.children)){if(!e)return null;if(!s(e.value))return e.value}}contextCache(){let e=this.cache.get(this.context);return e||(e=computeContextCache$1(this.context),this.cache.set(this.context,e)),e}get path(){return this.parent?.path?.concat(` > `,this.name)||this.name}get(e){let t=e&&normalizeContextKey$1(e),n=this.contextCache().originalMap.get(t);if(n===void 0)return;let r=this.context.get(n);return r instanceof I?r.get(this):r}resolveName(e){let t=this.tokens.join(` `),n=this.assign({tokens:[]}),r=this.of({name:e,parent:n,value:this.get(t),raw:t});return P&&console.log(`[%s] resolve %s <%s=%s>`,e,r.path,t,r.value),n.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 n of e)t=t.pushChild(n);return t}declareName(){if(this.tokens.length===0)throw Error(`no tokens to declare name`);let e=this.tokens.join(` `);return P&&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 P&&console.log(`[%s] no define <%s=%s>`,this.path,e,t),this;P&&console.log(`[%s] define <%s=%s>`,this.path,e,t);let n=this.context,r=n.set(e,t),i=cacheKey$1(e,createContextCache$1(this.cache.get(n)||computeContextCache$1(n)));return this.cache.set(r,i),this.assign({context:r})}assign(e={}){return Variables$1.of({...this,...e})}of(e={}){let t={context:this.context,parent:this.parent};return Variables$1.of({...t,...e})}static of(e){let{name:t,tokens:n=[],children:r=[],parent:i=null,context:a,value:o,raw:s,__cache:c}=e;if(!a)throw Error(`must provide <context>`);return new Variables$1({name:t,tokens:[...n],children:[...r],context:a,parent:i,value:o,raw:s,__cache:c})}};function normalizeContextKey$1(e){return e.replace(/\s*([./\-'+]|\*\*?)\s*/g,` $1 `).replace(/\s{2,}/g,` `).trim()}e(normalizeContextKey$1,`normalizeContextKey`);function wrap$1(e,t,n){let r=e.children.filter(e=>e.name!==t),i=e.children.filter(e=>e.name===t),a=r[0],o=r[Math.max(1,r.length-1)],s=a?.computedValue(),c=o?.computedValue()??null;return e.assign({children:i}).enterScope(t).pushChildren(r).exitScope(n).define(s,c)}e(wrap$1,`wrap`);function trackVariables$1(e={},t=VariableContext$1){let n=hr.of({context:t.of(e)});return new v({start:n,reduce(e,n,r,i){if(n===Sn){let[n,r]=e.children.slice(-2);e=e.assign({value:t.of(n?.computedValue(),r?.computedValue())})}if(n===qn&&(e=e.assign({value:t.of(...e.children.map(e=>e?.computedValue()))})),n===Ln){let[t,n]=e.children.slice(-2);e=e.assign({value:t?.computedValue()})}if(n===zn){let[n,...r]=e.children;e=n?.raw===`get value`?getContextValue$1(e,r):e.assign({value:n?.computedValue()||t.of(void 0)})}let a=fr[n];if(a)return e.enterScope(a);let o=dr[n];if(o){let{children:r,context:i}=e,a=r.slice(0,-1),s=last$1(r),c=null;return n===Fn&&(c=t.of(s?.computedValue())),n===Rn&&(c=t.of(i,s?.computedValue()).set(`item`,s?.computedValue())),e.assign({children:a}).enterScope(o).pushChild(s).assign({context:c||i})}let s=i.read(i.pos,r.pos);if(pr[n])return e.exitScope(s);if(n===Qn){let n=e.children.filter(e=>e.name!==`ContextEntry`),r=n[0],i=last$1(n);return wrap$1(e,`ContextEntry`,s).assign({value:t.of(e.value).set(r?.computedValue(),i?.computedValue())})}if(n===_n||n===En)return wrap$1(e,`InExpression`,s);if(n===xn)return e.define(`partial`,I.of(e=>last$1(e.children)?.computedValue()));if(n===Vn){let t=last$1(e.children).computedValue();return e.define(t,1)}if(n===kn||n===An||n===jn){let t=e.children.slice(0,-1),n=last$1(e.children);return e.assign({children:t}).enterScope(`ArithmeticExpression`).pushChild(n)}if(n===Mn)return e.enterScope(`ArithmeticExpression`);if(n===yn||n===bn||n===er)return e.token(s);if(n===Wn)return e.literal(s.replace(/^"|"$/g,``).replace(/\\(["\\])/g,`$1`));if(n===Gn)return e.literal(s===`true`);if(n===Un)return e.literal(parseFloat(s));if(n===Hn)return e.literal(null);if(n===Nn)return e.resolveName(`VariableName`);if(n===In)return e.resolveName(`PathName`);if(n===vn||n===$n)return e.declareName();if((n===mn||n===Dn)&&e.tokens.length>0)throw Error(`uncleared name`);if(n===mn){let t=e;for(;t.parent;)t=t.exitScope(s);return t}return e}})}e(trackVariables$1,`trackVariables`);var gr=trackVariables$1({});function getContextValue$1(e,t){if(!t.length||(t[0].name===`Name`&&(t=extractNamedArgs$1(t,[`m`,`key`])),t.length!==2))return e.assign({value:null});let[n,r]=t,i=r?.computedValue(),a=n?.computedValue();return!a||typeof a!=`object`||typeof i!=`string`?e.assign({value:null}):e.assign({value:[normalizeContextKey$1(i),i].reduce((e,t)=>a.get(t)||e,null)})}e(getContextValue$1,`getContextValue`);function extractNamedArgs$1(e,t){let n={};for(let t=0;t<e.length;t+=2){let[r,i]=e.slice(t,t+2);n[r.value]=i}return t.map(e=>n[e])}e(extractNamedArgs$1,`extractNamedArgs`);function last$1(e){return e[e.length-1]}e(last$1,`last`);var _r=d({StringLiteral:p.string,NumericLiteral:p.number,BooleanLiteral:p.bool,"AtLiteral!":p.special(p.string),CompareOp:p.compareOperator,ArithOp:p.arithmeticOperator,"for if then else some every return":p.controlKeyword,"in instance of and or satisfies between as":p.operatorKeyword,function:p.definitionKeyword,"Type/...":p.typeName,"Wildcard!":p.modifier,null:p.null,LineComment:p.lineComment,BlockComment:p.blockComment,"VariableName!":p.variableName,'"?"':p.self,"DateTimeConstructor! SpecialFunctionName!":p.standard(p.function(p.variableName)),"FunctionInvocation/VariableName!":p.function(p.variableName),"Name!":p.definition(p.variableName),"Key/Name! ContextEntryType/Name!":p.definition(p.propertyName),"PathExpression/PathName!":p.propertyName,"FormalParameter/ParameterName!":p.function(p.definition(p.variableName)),"( )":p.paren,"[ ]":p.squareBracket,"{ }":p.brace,".":p.derefOperator,", ;":p.separator,"..":p.punctuation}),vr={__proto__:null,for:10,in:34,return:40,if:44,then:46,else:48,some:52,every:54,satisfies:60,or:64,and:68,between:76,instance:90,of:93,days:105,time:107,duration:109,years:111,months:113,date:115,list:121,context:127,function:134,null:162,true:332,false:332,"?":176,external:192,not:217},yr=_.deserialize({version:14,states:"CvO`QYOOO`QYOOO$yQYOOOOQU'#Ce'#CeO%TQYO'#C`O&^QYO'#FTOOQQ'#Ff'#FfO&hQYO'#FfO`QYO'#DXOOQU'#Eq'#EqO(_Q^O'#D_OOQU'#D`'#D`OOQU'#D_'#D_OOQO'#Fn'#FnO*[QWO'#DyOOQQ'#EQ'#EQOOQQ'#ER'#EROOQQ'#ES'#ESO*aOWO'#EVO*[QWO'#ETOOQQ'#ET'#ETOOQQ'#Ft'#FtOOQQ'#Fr'#FrOOQQ'#Fz'#FzOOQQ'#EX'#EXO`QYO'#EZOOQQ'#FV'#FVO*iQ^O'#FVO,`QYO'#E[O,gQWO'#E]OOQP'#GO'#GOO,lQXO'#EdOOQQ'#F{'#F{OOQQ'#FU'#FUQOQWOOOOQQ'#FW'#FWOOQQ'#F_'#F_O`QYO'#CqOOQQ'#F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$P$Q$Z$_$b$q$}%X%c%x%y!kwOPQWilu|}!]!a!b!c!g!h!i!j!k!p#Y#[#^#b#f#s$P$Q$Z$_$b$q$}%X%c%x%yR#SwV!SQ#^#s!V!aT!Q!t!v#P#W#X#h#o#p#q#r#w$k$o$r%R%S%Z%^%a%d%n%v%z&]!X!bT!Q!t!v#P#W#X#h#i#o#p#q#r#w$k$o$r%R%S%Z%^%a%d%n%v%z&]!Z!cT!Q!t!v#P#W#X#h#i#j#o#p#q#r#w$k$o$r%R%S%Z%^%a%d%n%v%z&]!kWOPQWilu|}!]!a!b!c!g!h!i!j!k!p#Y#[#^#b#f#s$P$Q$Z$_$b$q$}%X%c%x%yR&U%lT&Y%m&s!_!eT!Q!n!t!v#P#W#X#h#i#j#k#o#p#q#r#w$k$o$r%R%S%Z%^%a%d%n%v%z&]!_!gT!Q!n!t!v#P#W#X#h#i#j#k#o#p#q#r#w$k$o$r%R%S%Z%^%a%d%n%v%z&]!k^OPQWilu|}!]!a!b!c!g!h!i!j!k!p#Y#[#^#b#f#s$P$Q$Z$_$b$q$}%X%c%x%yQ!q^R!scR#{!pQ!wlR#|!p!kfOPQWilu|}!]!a!b!c!g!h!i!j!k!p#Y#[#^#b#f#s$P$Q$Z$_$b$q$}%X%c%x%y!klOPQWilu|}!]!a!b!c!g!h!i!j!k!p#Y#[#^#b#f#s$P$Q$Z$_$b$q$}%X%c%x%y!kmOPQWilu|}!]!a!b!c!g!h!i!j!k!p#Y#[#^#b#f#s$P$Q$Z$_$b$q$}%X%c%x%yR$V!x!koOPQWilu|}!]!a!b!c!g!h!i!j!k!p#Y#[#^#b#f#s$P$Q$Z$_$b$q$}%X%c%x%yR#Oo",nodeNames:`⚠ 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 PathName ] 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:174,context:gr,nodeProps:[[`group`,-17,4,21,25,31,33,35,43,44,70,73,75,88,89,91,92,93,100,`Expr`,49,`Expr Expr`,-5,81,82,83,84,85,`Expr Literal`],[`closedBy`,40,`)`,74,`]`,99,`}`],[`openedBy`,42,`(`,72,`[`,98,`{`]],propSources:[_r],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(o#S#T-}#o#p.l#q#r.q$f$g#i#BY#BZ#i$IS$I_#i$I|$I}$^$I}$JO$^$JT$JU#i$KV$KW#i&FU&FV#i?HT?HU#i~#nY#u~XY#iZ[#ipq#i$f$g#i#BY#BZ#i$IS$I_#i$JT$JU#i$KV$KW#i&FU&FV#i?HT?HU#i~$cO#v~~$fP!_!`$i~$nOt~~$qXOY$nYZ%^Zr$nrs&zs#O$n#O#P'R#P;'S$n;'S;=`(Q<%lO$n~%aVOr%^rs%vs#O%^#O#P%{#P;'S%^;'S;=`&t<%lO%^~%{O$j~~&ORO;'S%^;'S;=`&X;=`O%^~&[WOr%^rs%vs#O%^#O#P%{#P;'S%^;'S;=`&t;=`<%l%^<%lO%^~&wP;=`<%l%^~'RO$j~$k~~'URO;'S$n;'S;=`'_;=`O$n~'bYOY$nYZ%^Zr$nrs&zs#O$n#O#P'R#P;'S$n;'S;=`(Q;=`<%l$n<%lO$n~(TP;=`<%l$n~(]O#}~~(bOx~~(gOz~~(lP_~z{(o~(tO`~~(yO]~~)OO$P~R)TP[P!`!a)WQ)]O$_Q~)bQZ~!O!P)h!Q![)m~)mOc~~)rR$i~!Q![)m!g!h){#X#Y){~*OR{|*X}!O*X!Q![*_~*[P!Q![*_~*dP$i~!Q![*_~*lQ^~z{*r!P!Q+y~*uTOz*rz{+U{;'S*r;'S;=`+s<%lO*r~+XVOz*rz{+U{!P*r!P!Q+n!Q;'S*r;'S;=`+s<%lO*r~+sOQ~~+vP;=`<%l*r~,OSP~OY+yZ;'S+y;'S;=`,[<%lO+y~,_P;=`<%l+y~,gS$i~!O!P,s!Q![,b!g!h){#X#Y){~,vP!Q![)m~-OO$]~~-TO$t~R-[P!_QuP!_!`-_P-dOuPR-kP![QuP!_!`-_~-sO$m~~-xO!l~~-}O!j~~.QTO#S-}#S#T.a#T;'S-};'S;=`.f<%lO-}~.fO$Z~~.iP;=`<%l-}~.qO#V~~.vO#U~",tokenizers:[lr,cr,ur,0,1],topRules:{Expression:[0,3],Expressions:[1,105],UnaryTests:[2,106]},dialects:{camunda:2657},dynamicPrecedences:{33:-1,70:1,75:-1,77:-1},specialized:[{term:125,get:e=>vr[e]||-1}],tokenPrec:2660});function stripBackticks(e){return e.replace(/^`|`$/g,``)}function nodeText(e,t){return stripBackticks(t.substring(e.from,e.to))}function isInScope(e,t){return t.some(t=>t.has(e))}function withScope(e,t,n){let r=new Set(t);e.push(r);let i=n(r);return e.pop(),i}function forEachChild(e,t){let n=e.firstChild;for(;n;)t(n),n=n.nextSibling}function collectPathParts(e,t){let n=[];return forEachChild(e,e=>{e.name===`PathExpression`?n.push(...collectPathParts(e,t)):(e.name===`VariableName`||e.name===`PathName`)&&n.push(nodeText(e,t))}),n}function getFilterBase(e){let t=e.firstChild;return t?t.name===`FilterExpression`?t:t.name===`PathExpression`?getFilterBase(t):null:null}function hasContextBase(e){let t=e.firstChild;return t?t.name===`Context`||t.name===`PathExpression`&&hasContextBase(t):!1}function extractContextKeys(e,t){let n=[];return forEachChild(e,e=>{if(e.name===`ContextEntry`){let r=e.getChild(`Key`)?.getChild(`Name`);r&&n.push(nodeText(r,t))}}),n}function collectIterationVariables(e,t){let n=[],r=e.getChild(`InExpressions`);return r&&forEachChild(r,e=>{if(e.name===`InExpression`){let r=e.getChild(`Name`)?.getChild(`Identifier`);r&&n.push(t.substring(r.from,r.to))}}),n}function collectFunctionParameters(e,t){let n=[],r=e.getChild(`FormalParameters`);return r&&forEachChild(r,e=>{if(e.name===`FormalParameter`){let r=e.getChild(`ParameterName`)?.getChild(`Name`)?.getChild(`Identifier`);r&&n.push(t.substring(r.from,r.to))}}),n}function findVariable(e,t){return e.find(e=>e.name===t)}function findOrCreateVariable(e,t){let n=findVariable(e,t);return n||(n={name:t},e.push(n)),n}function buildNestedEntries(e,t){let n=findOrCreateVariable(e,t[0]);if(t.length<=1||(n.type||(n.type=`Context`,n.entries=n.entries||[]),n.type!==`Context`))return;let r=n.entries;for(let e=1;e<t.length;e++){let n=t[e],i=e===t.length-1,a=findVariable(r,n);a?!i&&!a.type&&(a.type=`Context`,a.entries=a.entries||[]):(a=i?{name:n}:{name:n,type:`Context`,entries:[]},r.push(a)),i||(a.entries=a.entries||[],r=a.entries)}}function sortEntries(e){if(e.entries){e.entries.sort((e,t)=>e.name.localeCompare(t.name));for(let t of e.entries)sortEntries(t)}}var br=new Set([`for`,`return`,`some`,`every`,`InExpressions`,`satisfies`]);function extractInputNames(e,t,n){let r=new Set,i=[new Set];function isExternal(e,t){return!isInScope(e,i)&&!n.has(e)&&(t===`none`||e!==`item`)}let collectInputs=(e,n=`none`)=>{let{name:a}=e;if(!e.type.isError){if(a===`FunctionInvocation`){let i=e.getChild(`VariableName`);if(i){let e=nodeText(i,t);isExternal(e,n)&&r.add(e)}forEachChild(e,e=>{e.name!==`VariableName`&&e.name!==`(`&&e.name!==`)`&&collectInputs(e,n)})}else if(a===`PathExpression`){let i=getFilterBase(e);if(hasContextBase(e))forEachChild(e,e=>collectInputs(e,n));else if(i)collectInputs(i,n);else{let i=collectPathParts(e,t);i.length>0&&isExternal(i[0],n)&&r.add(i.join(`.`))}}else if(a===`VariableName`&&e.parent?.name!==`PathExpression`&&e.parent?.name!==`FunctionInvocation`){let i=nodeText(e,t),a=n===`variable-list`&&i!==`item`;isExternal(i,n)&&!a&&r.add(i)}else if(a===`Context`&&e.parent?.name!==`List`)withScope(i,[],r=>{forEachChild(e,e=>{if(e.name===`ContextEntry`){forEachChild(e,e=>{e.name!==`Key`&&collectInputs(e,n)});let i=e.getChild(`Key`)?.getChild(`Name`);i&&r.add(nodeText(i,t))}})});else if(a===`FilterExpression`){let n=`none`,r=[`item`],a=e.getChild(`List`);a?(forEachChild(a,e=>{e.name===`Context`&&r.push(...extractContextKeys(e,t))}),n=`list-literal`):forEachChild(e,e=>{e.name===`VariableName`&&(collectInputs(e,`none`),n=`variable-list`)}),withScope(i,r,()=>{forEachChild(e,e=>{(e.name===`Comparison`||e.name===`Expression`)&&collectInputs(e,n)})})}else if(a===`ForExpression`||a===`QuantifiedExpression`){let r=collectIterationVariables(e,t),a=e.getChild(`InExpressions`);a&&forEachChild(a,e=>{e.name===`InExpression`&&forEachChild(e,e=>{e.name!==`Name`&&e.name!==`in`&&e.name!==`Identifier`&&collectInputs(e,n)})}),withScope(i,r,()=>{forEachChild(e,e=>{br.has(e.name)||collectInputs(e,`none`)})})}else if(a===`FunctionDefinition`){let n=collectFunctionParameters(e,t);withScope(i,n,()=>{let t=e.getChild(`FunctionBody`);t&&collectInputs(t,`none`)})}else forEachChild(e,e=>collectInputs(e,n))}};return collectInputs(e),Array.from(r).sort()}function initializeInputVariables(e){let t=[];for(let n of e)buildNestedEntries(t,n.split(`.`));return t}function checkLiteralsInNode(e){let t=!1,n=!1;return forEachChild(e,e=>{if(e.name===`StringLiteral`)t=!0;else if(e.name===`NumericLiteral`)n=!0;else if(e.name===`ArithmeticExpression`){let r=checkLiteralsInNode(e);t||=r.hasString,n||=r.hasNumber}}),{hasString:t,hasNumber:n}}function inferTypeForVariablesInNode(e,t,n,r,i){if(e.name===`VariableName`&&e.parent?.name!==`PathExpression`){let a=nodeText(e,t),o=findVariable(n,a);!isInScope(a,r)&&o&&!o.type&&(o.type=i)}else if(e.name===`PathExpression`){let a=collectPathParts(e,t);if(a.length>0){let e=a[0],t=findVariable(n,e);!isInScope(e,r)&&t&&!t.type&&(t.type=i)}}else forEachChild(e,e=>{inferTypeForVariablesInNode(e,t,n,r,i)})}function trackFilterItemProperties(e,t,n,r,i){let a=n?findVariable(r,n):null;if(!a)return;let visit=e=>{if(a.type===`List`){if(e.name===`PathExpression`){let n=collectPathParts(e,t);if(n.length>1&&n[0]===`item`){let e=a.entries||[];for(let t=1;t<n.length;t++)findVariable(e,n[t])||e.push({name:n[t]});a.entries=e}}else if(e.name===`VariableName`){let n=nodeText(e,t);if(!isInScope(n,i)&&n!==`item`&&e.parent?.name!==`PathExpression`){let e=a.entries||[];findVariable(e,n)||e.push({name:n}),a.entries=e}}forEachChild(e,visit)}};visit(e)}function inferTypeFromComparison(e,t,n,r,i){if(e.name!==`VariableName`)return;let a=nodeText(e,n),o=findVariable(r,a);if(isInScope(a,i)||!o||o.type)return;let s={NumericLiteral:`Number`,StringLiteral:`String`,BooleanLiteral:`Boolean`}[t.name];s&&(o.type=s)}function inferTypes(e,t,n,r,i=`none`){let{name:a}=e;if(a===`PathExpression`){let a=e.firstChild;if(a?.name===`Context`||a?.name===`PathExpression`||a?.name===`FilterExpression`){inferTypes(a,t,n,r,i);return}let o=collectPathParts(e,t);if(o.length>0){let e=o[0];!isInScope(e,r)&&(i===`none`||e!==`item`)&&findVariable(n,e)&&buildNestedEntries(n,o)}}else if(a===`Context`&&e.parent?.name!==`List`)withScope(r,[],a=>{forEachChild(e,e=>{if(e.name===`ContextEntry`){forEachChild(e,e=>{e.name!==`Key`&&inferTypes(e,t,n,r,i)});let o=e.getChild(`Key`)?.getChild(`Name`);o&&a.add(nodeText(o,t))}})});else if(a===`FilterExpression`){let i=`none`,a=null,o=[`item`],s=e.getChild(`List`);s?(forEachChild(s,e=>{e.name===`Context`&&o.push(...extractContextKeys(e,t))}),i=`list-literal`):forEachChild(e,e=>{if(e.name===`VariableName`){a=nodeText(e,t);let o=findVariable(n,a);!isInScope(a,r)&&o&&(o.type||=`List`),i=`variable-list`}}),withScope(r,o,()=>{forEachChild(e,e=>{(e.name===`Comparison`||e.name===`Expression`)&&(trackFilterItemProperties(e,t,a,n,r),inferTypes(e,t,n,r,i))})})}else{if(a===`Comparison`){let i=[];forEachChild(e,e=>{e.name!==`CompareOp`&&i.push(e)}),i.length===2&&(inferTypeFromComparison(i[0],i[1],t,n,r),inferTypeFromComparison(i[1],i[0],t,n,r))}if(a===`ArithmeticExpression`){let{hasString:a,hasNumber:o}=checkLiteralsInNode(e),s=a&&!o?`String`:!a&&o?`Number`:null;s&&inferTypeForVariablesInNode(e,t,n,r,s),forEachChild(e,e=>{[`ArithmeticExpression`,`ArithOp`,`NumericLiteral`,`StringLiteral`].includes(e.name)||inferTypes(e,t,n,r,i)})}else if(a===`ForExpression`||a===`QuantifiedExpression`){let a=collectIterationVariables(e,t),o=e.getChild(`InExpressions`);o&&forEachChild(o,e=>{e.name===`InExpression`&&forEachChild(e,e=>{[`Name`,`in`,`Identifier`].includes(e.name)||inferTypes(e,t,n,r,i)})}),withScope(r,a,()=>{forEachChild(e,e=>{br.has(e.name)||inferTypes(e,t,n,r,`none`)})})}else a===`FunctionDefinition`?withScope(r,collectFunctionParameters(e,t),()=>{let i=e.getChild(`FunctionBody`);i&&inferTypes(i,t,n,r,`none`)}):forEachChild(e,e=>{inferTypes(e,t,n,r,i)})}}function analyzeForInputs(e,t,n){let r=initializeInputVariables(extractInputNames(e,t,n));inferTypes(e,t,r,[new Set]);for(let e of r)sortEntries(e);return r.sort((e,t)=>e.name.localeCompare(t.name)),r}var xr=new Set([`for`,`return`,`some`,`every`,`InExpressions`,`satisfies`]);function analyzeForFunctions(e,t,n){let r=[],i=[],recordInvocation=e=>{let a=nodeText(e,t),o=!isInScope(a,i)&&n.has(a)?`builtin`:`user`,{from:s,to:c}=e;r.push({name:a,type:o,from:s,to:c})},walk=e=>{let{name:n}=e;if(n===`Context`)withScope(i,[],n=>{forEachChild(e,e=>{if(e.name!==`ContextEntry`)return;forEachChild(e,e=>{e.name!==`Key`&&walk(e)});let r=e.getChild(`Key`)?.getChild(`Name`);r&&n.add(nodeText(r,t))})});else if(n===`FunctionDefinition`){let n=collectFunctionParameters(e,t);withScope(i,n,()=>{let t=e.getChild(`FunctionBody`);t&&walk(t)})}else if(n===`ForExpression`||n===`QuantifiedExpression`){let n=e.getChild(`InExpressions`);n&&forEachChild(n,e=>{e.name===`InExpression`&&forEachChild(e,e=>{e.name!==`Name`&&e.name!==`in`&&e.name!==`Identifier`&&walk(e)})}),withScope(i,collectIterationVariables(e,t),()=>{forEachChild(e,e=>{xr.has(e.name)||walk(e)})})}else{if(n===`FunctionInvocation`){let t=e.getChild(`VariableName`);t&&recordInvocation(t)}forEachChild(e,walk)}};return walk(e),r.sort((e,t)=>e.from-t.from)}function analyzeForValidity(e){return!containsErrorNodes(e)}function containsErrorNodes(e){if(e.type.isError)return!0;let t=e.firstChild;for(;t;){if(containsErrorNodes(t))return!0;t=t.nextSibling}return!1}function createContext$1(e){return e.reduce((e,t)=>(e[t.name]=()=>{},e),{})}e(createContext$1,`createContext`);var FeelAnalyzer=class{constructor(e={}){this.builtinNames=new Set(e.builtins?.map(e=>e.name)??[]);let t={top:e.dialect===`unaryTests`?`UnaryTests`:`Expression`,dialect:e.parserDialect};e.reservedNameBuiltins&&e.reservedNameBuiltins.length>0&&(t.contextTracker=trackVariables$1(createContext$1(e.reservedNameBuiltins))),this.parser=yr.configure(t)}analyzeExpression(e){let t=this.parser.parse(e);return this.analyzeTree(t,e)}analyzeTree(e,t){let n=e.topNode;return{valid:analyzeForValidity(n),inputs:analyzeForInputs(n,t,this.builtinNames),functions:analyzeForFunctions(n,t,this.builtinNames)}}};ln();function lintSyntax(e){let t=[];return e.iterate({enter:e=>{let n=e.node;if(!n.type.isError)return;let r=n.parent,i=getNextNode(n),a={from:n.from,to:n.to,severity:`error`,type:`Syntax Error`};n.from===n.to?i?(a.message=`Unrecognized token <${i.name}> in <${r.name}>`,a.to=i.to):a.message=`Incomplete <${(r.enterUnfinishedNodesBefore(n.to)||r).name}>`:a.message=`Unrecognized token in <${r.name}>`,t.push(a)}}),t}function getNextNode(e){return e?e.nextSibling||getNextNode(e.parent):null}var Sr=`first-item`,Cr={create(e){return{enter(t){if(t.name!==`FilterExpression`)return;let n=e.readContent(t.from,t.to);if(zeroIndexPattern().test(n)){let{from:r,to:i}=t;e.report({from:r,to:i,message:`First item is accessed via [1]`,severity:`warning`,type:Sr,actions:[{name:`fix`,apply(t,a=r,o=i){e.updateContent(a,o,n.replace(zeroIndexPattern(),`[1]`))}}]})}}}}};function zeroIndexPattern(){return/\[\s*0\s*\]$/}var wr=[Cr];function lintRules(e){let{readContent:t,syntaxTree:n,updateContent:r}=e,i=[],a={readContent:t,report:e=>{i.push(e)},updateContent:r},o=wr.map(e=>e.create(a));return n.iterate({enter:e=>{for(let t of o)t.enter&&t.enter(e)},leave:e=>{for(let t of o)t.leave&&t.leave(e)}}),i}var Tr=`compatibility`;function lintCompatibility(e={}){let{syntaxTree:t,expression:n,engines:r,builtins:i=[]}=e;if(!r||!Object.keys(r).length||!i.length)return[];let a=getUnavailableBuiltins(i,r);if(!a.size)return[];let{valid:o,functions:s=[]}=new FeelAnalyzer({builtins:i}).analyzeTree(t,n);return o?s.reduce((e,t)=>{if(t.type!==`builtin`)return e;let n=a.get(t.name);return n&&e.push({from:t.from,to:t.to,severity:`warning`,type:Tr,message:`Function '${t.name}' requires ${formatEngines(n.engines)}`}),e},[]):[]}function getUnavailableBuiltins(e,t){let n=new Map;for(let r of e)r.engines&&!isCompatible(r.engines,t)&&n.set(r.name,r);return n}function formatEngines(e){return Object.entries(e).map(([e,t])=>`${capitalize(e)} ${t}`).join(`, `)}function capitalize(e){return e.charAt(0).toUpperCase()+e.slice(1)}function lintAll$1(e){return[...lintSyntax(e.syntaxTree),...lintRules(e),...lintCompatibility(e)]}e(lintAll$1,`lintAll`);var cmFeelLinter=({builtins:e=[],engines:t}={})=>n=>n.state.doc.length===0?[]:lintAll$1({syntaxTree:S(n.state),expression:n.state.doc.toString(),builtins:e,engines:t,readContent:(e,t)=>n.state.sliceDoc(e,t),updateContent:(e,t,r)=>n.dispatch({changes:{from:e,to:t,insert:r}})}).map(e=>({...e,source:e.type}));function lintAll(e){return[...lintEmptyInserts(e)]}function cmFeelersLinter(){let e=cmFeelLinter();return t=>{let n=e(t);if(t.state.doc.length===0)return[];let r=lintAll(S(t.state));return[...n,...r.map(e=>({...e,source:`feelers linter`}))]}}var Er=ye(cmFeelersLinter());h(),a(),f();var Dr=124,L=125,Or=126,kr=127,Ar=131,jr=4,Mr=134,Nr=7,Pr=8,Fr=9,Ir=10,Lr=140,Rr=21,zr=141,Br=25,Vr=142,Hr=29,Ur=39,Wr=43,Gr=145,Kr=146,qr=147,Jr=148,Yr=49,Xr=70,Zr=154,Qr=71,$r=73,ei=155,ti=75,ni=156,ri=79,ii=161,ai=82,oi=83,si=84,ci=168,li=92,ui=93,di=170,fi=100,pi=172,mi=101,hi=103,gi=104,_i=typeof process<`u`&&/\bfparse(:dbg)?\b/.test({}.LOG),vi=typeof process<`u`&&/\bfparse:dbg\b/.test({}.LOG),R=typeof process<`u`&&/\bcontext\b/.test({}.LOG),yi=[9,11,12,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],bi=chars(`
6
+ \r`),xi=42,Si=chars(`'./-+*^`);function chars(e){return Array.from(e).map(e=>e.charCodeAt(0))}function isStartChar(e){return e===63||e>=65&&e<=90||e===95||e>=97&&e<=122||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=767||e>=880&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=55296&&e<=56319||e>=56320&&e<=57343}function isAdditional(e){return Si.includes(e)}function isPartChar(e){return e>=48&&e<=57||e===183||e>=768&&e<=879||e>=8255&&e<=8256}function isSpace(e){return yi.includes(e)}function indent(e,t){return t.concat(e.split(/\n/g).join(`
7
+ `+t))}function parseAdditionalSymbol(e,t=0){let n=e.peek(t);return n===xi&&e.peek(t+1)===xi?{offset:2,token:`**`}:isAdditional(n)?{offset:1,token:String.fromCharCode(n)}:null}function parseIdentifier(e,t=0,n=!1){for(let r=!1,i=[],a=0;;a++){let o=e.peek(t+a);if(isStartChar(o)||(r||n)&&isPartChar(o))r||=!0,i.push(o);else return i.length?{token:String.fromCharCode(...i),offset:a}:null}}function parseSpaces(e,t){for(let n=!1,r=0;;r++)if(isSpace(e.peek(t+r)))n||=!0;else return n?{token:` `,offset:r}:null}function parseName(e,t){let{keys:n,prefixes:r}=t.contextCache(),i=t.tokens;for(let t=0,a=[],o=null;;){let s=i.length+a.length>0,c=a.length>0,l=parseIdentifier(e,t,s)||s&&parseAdditionalSymbol(e,t)||c&&parseSpaces(e,t);if(!l)return o;let{token:u,offset:d}=l;if(t+=d,u===` `)continue;a=[...a,u];let f=[...i,...a].join(` `);if(n.has(f)){let e=a[0];o={token:e,offset:e.length,term:Or}}if(!r.has(f)){if(Ai.some(e=>e===f)){let e=a[0];o={token:e,offset:e.length,term:L}}if(!Ai.some(e=>e.startsWith(f)))return o}}}var Ci={[L]:`identifier`,[Or]:`nameIdentifier`},wi=new g((e,t)=>{vi&&console.log(`%s: T <identifier | nameIdentifier>`,e.pos);let n=parseName(e,t.context),r=t.context.tokens,i=n||parseIdentifier(e,0,r.length>0);i&&(e.advance(i.offset),e.acceptToken(n?n.term:L),_i&&console.log(`%s: MATCH <%s> <%s>`,e.pos,n?Ci[n.term]:`identifier`,i.token))},{contextual:!0}),Ti=new g((e,t)=>{vi&&console.log(`%s: T <propertyIdentifier>`,e.pos);let n=t.context.tokens,r=parseIdentifier(e,0,n.length>0);r&&(e.advance(r.offset),e.acceptToken(Dr),_i&&console.log(`%s: MATCH <propertyIdentifier> <%s>`,e.pos,r.token))}),Ei=new g((e,t)=>{vi&&console.log(`%s: T <insertSemi>`,e.pos);let n,r=!1;for(n=0;;n++){let t=e.peek(n);if(!yi.includes(t)){bi.includes(t)&&(r=!0);break}}if(r){let t=parseIdentifier(e,n+1);if(parseSpaces(e,n+1)||t&&/^(then|else|return|satisfies)$/.test(t.token))return;_i&&console.log(`%s: MATCH <insertSemi>`,e.pos),e.acceptToken(kr)}}),Di={[ni]:`FunctionInvocation`,[ei]:`FilterExpression`,[Zr]:`PathExpression`},Oi={[pi]:`Context`,[di]:`FunctionDefinition`,[Mr]:`ForExpression`,[ci]:`List`,[zr]:`IfExpression`,[Vr]:`QuantifiedExpression`},ki={[fi]:`Context`,[ui]:`FunctionDefinition`,[jr]:`ForExpression`,[li]:`List`,[Rr]:`IfExpression`,[Br]:`QuantifiedExpression`,[Xr]:`PathExpression`,[ti]:`FunctionInvocation`,[$r]:`FilterExpression`,[Wr]:`ArithmeticExpression`},z=class ValueProducer{constructor(e){this.fn=e}get(e){return this.fn(e)}static of(e){return new ValueProducer(e)}},Ai=Object.keys({"date and time":1,date:1,time:1,duration:1});function getPrefixes(e){let t=[];for(let n=1;n<=e.length;n++)t.push(e.substring(0,n));return t}function cacheKey(e,t){let n=normalizeContextKey(e),r=getPrefixes(n);t.keys.add(n);for(let e of r)t.prefixes.add(e);return t.originalMap.set(n,e),t}function computeContextCache(e){let t=createContextCache();for(let n of e.getKeys())cacheKey(n,t);return t}function createContextCache(e){return{keys:new Set(e?.keys),prefixes:new Set(e?.prefixes),originalMap:new Map(e?.originalMap)}}var VariableContext=class{constructor(e={}){this.value=e}getKeys(){return Object.keys(this.value)}get(e){let t=this.value[e],n=this.constructor;return n.isAtomic(t)?t:n.of(t)}set(e,t){let n=this.constructor;return new n({...this.value,[e]:t})}merge(e){let t=this.constructor;return new t(t.__merge(this.value,e))}static isAtomic(e){return e==null||e instanceof this||e instanceof z||typeof e!=`object`}static of(...e){let t=e.reduce((e,t)=>this.__merge(e,t),{});return new this(t)}static __unwrap(e){return e?e instanceof this?e.value:this.isAtomic(e)?{}:e:{}}static __merge(e,t){let n=Object.assign({},this.__unwrap(e));for(let[e,r]of Object.entries(this.__unwrap(t)))n[e]=r instanceof z?r:o(n,e)?this.__merge(n[e],r):r;return n}},ji=class Variables{constructor({name:e=`Expressions`,tokens:t=[],children:n=[],parent:r=null,context:i,value:a,raw:o,__cache:s}){this.name=e,this.tokens=t,this.children=n,this.parent=r,this.context=i,this.value=a,this.raw=o,this.__cache=s}get root(){let e=this;for(;e.parent;)e=e.parent;return e}get cache(){let e=this.root;return e.__cache||=new WeakMap,e.__cache}enterScope(e){let t=this.of({name:e,parent:this});return R&&console.log(`[%s] enter`,t.path,t.context),t}exitScope(e){return this.parent?(R&&console.log(`[%s] exit %o
8
+ %s`,this.path,this.context,indent(e,` `)),this.parent.pushChild(this)):(R&&console.log(`[%s] NO exit %o
9
+ %s`,this.path,this.context,indent(e,` `)),this)}token(e){return R&&console.log(`[%s] token <%s> + <%s>`,this.path,this.tokens.join(` `),e),this.assign({tokens:[...this.tokens,e]})}literal(e){return R&&console.log(`[%s] literal %o`,this.path,e),this.pushChild(this.of({name:`Literal`,value:e}))}computedValue(){for(let e=this;;e=last(e.children)){if(!e)return null;if(!s(e.value))return e.value}}contextCache(){let e=this.cache.get(this.context);return e||(e=computeContextCache(this.context),this.cache.set(this.context,e)),e}get path(){return this.parent?.path?.concat(` > `,this.name)||this.name}get(e){let t=e&&normalizeContextKey(e),n=this.contextCache().originalMap.get(t);if(n===void 0)return;let r=this.context.get(n);return r instanceof z?r.get(this):r}resolveName(e){let t=this.tokens.join(` `),n=this.assign({tokens:[]}),r=this.of({name:e,parent:n,value:this.get(t),raw:t});return R&&console.log(`[%s] resolve %s <%s=%s>`,e,r.path,t,r.value),n.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 n of e)t=t.pushChild(n);return t}declareName(){if(this.tokens.length===0)throw Error(`no tokens to declare name`);let e=this.tokens.join(` `);return R&&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 R&&console.log(`[%s] no define <%s=%s>`,this.path,e,t),this;R&&console.log(`[%s] define <%s=%s>`,this.path,e,t);let n=this.context,r=n.set(e,t),i=cacheKey(e,createContextCache(this.cache.get(n)||computeContextCache(n)));return this.cache.set(r,i),this.assign({context:r})}assign(e={}){return Variables.of({...this,...e})}of(e={}){let t={context:this.context,parent:this.parent};return Variables.of({...t,...e})}static of(e){let{name:t,tokens:n=[],children:r=[],parent:i=null,context:a,value:o,raw:s,__cache:c}=e;if(!a)throw Error(`must provide <context>`);return new Variables({name:t,tokens:[...n],children:[...r],context:a,parent:i,value:o,raw:s,__cache:c})}};function normalizeContextKey(e){return e.replace(/\s*([./\-'+]|\*\*?)\s*/g,` $1 `).replace(/\s{2,}/g,` `).trim()}function wrap(e,t,n){let r=e.children.filter(e=>e.name!==t),i=e.children.filter(e=>e.name===t),a=r[0],o=r[Math.max(1,r.length-1)],s=a?.computedValue(),c=o?.computedValue()??null;return e.assign({children:i}).enterScope(t).pushChildren(r).exitScope(n).define(s,c)}function trackVariables(e={},t=VariableContext){let n=ji.of({context:t.of(e)});return new v({start:n,reduce(e,n,r,i){if(n===Rr){let[n,r]=e.children.slice(-2);e=e.assign({value:t.of(n?.computedValue(),r?.computedValue())})}if(n===li&&(e=e.assign({value:t.of(...e.children.map(e=>e?.computedValue()))})),n===$r){let[t,n]=e.children.slice(-2);e=e.assign({value:t?.computedValue()})}if(n===ti){let[n,...r]=e.children;e=n?.raw===`get value`?getContextValue(e,r):e.assign({value:n?.computedValue()||t.of(void 0)})}let a=Oi[n];if(a)return e.enterScope(a);let o=Di[n];if(o){let{children:r,context:i}=e,a=r.slice(0,-1),s=last(r),c=null;return n===Zr&&(c=t.of(s?.computedValue())),n===ei&&(c=t.of(i,s?.computedValue()).set(`item`,s?.computedValue())),e.assign({children:a}).enterScope(o).pushChild(s).assign({context:c||i})}let s=i.read(i.pos,r.pos);if(ki[n])return e.exitScope(s);if(n===mi){let n=e.children.filter(e=>e.name!==`ContextEntry`),r=n[0],i=last(n);return wrap(e,`ContextEntry`,s).assign({value:t.of(e.value).set(r?.computedValue(),i?.computedValue())})}if(n===Nr||n===Hr)return wrap(e,`InExpression`,s);if(n===Lr)return e.define(`partial`,z.of(e=>last(e.children)?.computedValue()));if(n===ri){let t=last(e.children).computedValue();return e.define(t,1)}if(n===Gr||n===Kr||n===qr){let t=e.children.slice(0,-1),n=last(e.children);return e.assign({children:t}).enterScope(`ArithmeticExpression`).pushChild(n)}if(n===Jr)return e.enterScope(`ArithmeticExpression`);if(n===Fr||n===Ir||n===gi)return e.token(s);if(n===oi)return e.literal(s.replace(/^"|"$/g,``).replace(/\\(["\\])/g,`$1`));if(n===si)return e.literal(s===`true`);if(n===ai)return e.literal(parseFloat(s));if(n===ii)return e.literal(null);if(n===Yr)return e.resolveName(`VariableName`);if(n===Qr)return e.resolveName(`PathName`);if(n===Pr||n===hi)return e.declareName();if((n===Ar||n===Ur)&&e.tokens.length>0)throw Error(`uncleared name`);if(n===Ar){let t=e;for(;t.parent;)t=t.exitScope(s);return t}return e}})}var Mi=trackVariables({});function getContextValue(e,t){if(!t.length||(t[0].name===`Name`&&(t=extractNamedArgs(t,[`m`,`key`])),t.length!==2))return e.assign({value:null});let[n,r]=t,i=r?.computedValue(),a=n?.computedValue();return!a||typeof a!=`object`||typeof i!=`string`?e.assign({value:null}):e.assign({value:[normalizeContextKey(i),i].reduce((e,t)=>a.get(t)||e,null)})}function extractNamedArgs(e,t){let n={};for(let t=0;t<e.length;t+=2){let[r,i]=e.slice(t,t+2);n[r.value]=i}return t.map(e=>n[e])}function last(e){return e[e.length-1]}var Ni=d({StringLiteral:p.string,NumericLiteral:p.number,BooleanLiteral:p.bool,"AtLiteral!":p.special(p.string),CompareOp:p.compareOperator,ArithOp:p.arithmeticOperator,"for if then else some every return":p.controlKeyword,"in instance of and or satisfies between as":p.operatorKeyword,function:p.definitionKeyword,"Type/...":p.typeName,"Wildcard!":p.modifier,null:p.null,LineComment:p.lineComment,BlockComment:p.blockComment,"VariableName!":p.variableName,'"?"':p.self,"DateTimeConstructor! SpecialFunctionName!":p.standard(p.function(p.variableName)),"FunctionInvocation/VariableName!":p.function(p.variableName),"Name!":p.definition(p.variableName),"Key/Name! ContextEntryType/Name!":p.definition(p.propertyName),"PathExpression/PathName!":p.propertyName,"FormalParameter/ParameterName!":p.function(p.definition(p.variableName)),"( )":p.paren,"[ ]":p.squareBracket,"{ }":p.brace,".":p.derefOperator,", ;":p.separator,"..":p.punctuation}),Pi={__proto__:null,for:10,in:34,return:40,if:44,then:46,else:48,some:52,every:54,satisfies:60,or:64,and:68,between:76,instance:90,of:93,days:105,time:107,duration:109,years:111,months:113,date:115,list:121,context:127,function:134,null:162,true:332,false:332,"?":176,external:192,not:217},Fi=_.deserialize({version:14,states:"CvO`QYOOO`QYOOO$yQYOOOOQU'#Ce'#CeO%TQYO'#C`O&^QYO'#FTOOQQ'#Ff'#FfO&hQYO'#FfO`QYO'#DXOOQU'#Eq'#EqO(_Q^O'#D_OOQU'#D`'#D`OOQU'#D_'#D_OOQO'#Fn'#FnO*[QWO'#DyOOQQ'#EQ'#EQOOQQ'#ER'#EROOQQ'#ES'#ESO*aOWO'#EVO*[QWO'#ETOOQQ'#ET'#ETOOQQ'#Ft'#FtOOQQ'#Fr'#FrOOQQ'#Fz'#FzOOQQ'#EX'#EXO`QYO'#EZOOQQ'#FV'#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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 PathName ] 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:174,context:Mi,nodeProps:[[`group`,-17,4,21,25,31,33,35,43,44,70,73,75,88,89,91,92,93,100,`Expr`,49,`Expr Expr`,-5,81,82,83,84,85,`Expr Literal`],[`closedBy`,40,`)`,74,`]`,99,`}`],[`openedBy`,42,`(`,72,`[`,98,`{`]],propSources:[Ni],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(o#S#T-}#o#p.l#q#r.q$f$g#i#BY#BZ#i$IS$I_#i$I|$I}$^$I}$JO$^$JT$JU#i$KV$KW#i&FU&FV#i?HT?HU#i~#nY#u~XY#iZ[#ipq#i$f$g#i#BY#BZ#i$IS$I_#i$JT$JU#i$KV$KW#i&FU&FV#i?HT?HU#i~$cO#v~~$fP!_!`$i~$nOt~~$qXOY$nYZ%^Zr$nrs&zs#O$n#O#P'R#P;'S$n;'S;=`(Q<%lO$n~%aVOr%^rs%vs#O%^#O#P%{#P;'S%^;'S;=`&t<%lO%^~%{O$j~~&ORO;'S%^;'S;=`&X;=`O%^~&[WOr%^rs%vs#O%^#O#P%{#P;'S%^;'S;=`&t;=`<%l%^<%lO%^~&wP;=`<%l%^~'RO$j~$k~~'URO;'S$n;'S;=`'_;=`O$n~'bYOY$nYZ%^Zr$nrs&zs#O$n#O#P'R#P;'S$n;'S;=`(Q;=`<%l$n<%lO$n~(TP;=`<%l$n~(]O#}~~(bOx~~(gOz~~(lP_~z{(o~(tO`~~(yO]~~)OO$P~R)TP[P!`!a)WQ)]O$_Q~)bQZ~!O!P)h!Q![)m~)mOc~~)rR$i~!Q![)m!g!h){#X#Y){~*OR{|*X}!O*X!Q![*_~*[P!Q![*_~*dP$i~!Q![*_~*lQ^~z{*r!P!Q+y~*uTOz*rz{+U{;'S*r;'S;=`+s<%lO*r~+XVOz*rz{+U{!P*r!P!Q+n!Q;'S*r;'S;=`+s<%lO*r~+sOQ~~+vP;=`<%l*r~,OSP~OY+yZ;'S+y;'S;=`,[<%lO+y~,_P;=`<%l+y~,gS$i~!O!P,s!Q![,b!g!h){#X#Y){~,vP!Q![)m~-OO$]~~-TO$t~R-[P!_QuP!_!`-_P-dOuPR-kP![QuP!_!`-_~-sO$m~~-xO!l~~-}O!j~~.QTO#S-}#S#T.a#T;'S-};'S;=`.f<%lO-}~.fO$Z~~.iP;=`<%l-}~.qO#V~~.vO#U~",tokenizers:[Ti,wi,Ei,0,1],topRules:{Expression:[0,3],Expressions:[1,105],UnaryTests:[2,106]},dialects:{camunda:2657},dynamicPrecedences:{33:-1,70:1,75:-1,77:-1},specialized:[{term:125,get:e=>Pi[e]||-1}],tokenPrec:2660}),Ii={ConditionalSpanner:ee,LoopSpanner:ee};function createMixedLanguage(e=void 0){let t=c.configure({wrap:m(t=>t.name==`Feel`||t.name==`FeelBlock`?{parser:Fi}:e&&t.name==`SimpleTextBlock`?{parser:e}:null),props:[le.add(Ii)]});return ie.define({parser:t})}function feelersLanguage(e){return new ne(createMixedLanguage(e),[])}f();var Li=x(oe.define([{tag:[p.keyword,p.controlKeyword,p.operatorKeyword,p.definitionKeyword,p.typeName],color:`var(--theme-syntax-pink)`},{tag:[p.string,p.special(p.string)],color:`color-mix(in srgb, var(--theme-syntax-green) 85%, var(--theme-fg-primary))`},{tag:[p.number,p.bool,p.null],color:`var(--theme-syntax-cyan)`},{tag:[p.arithmeticOperator,p.compareOperator,p.logicOperator],color:`var(--theme-fg-secondary)`},{tag:[p.function(p.variableName),p.function(p.propertyName),p.function(p.special(p.variableName))],color:`var(--theme-syntax-orange)`},{tag:[p.lineComment,p.blockComment],color:`var(--theme-fg-tertiary)`,fontStyle:`italic`},{tag:p.invalid,color:`var(--theme-error-text)`}])),Ri=[b.theme({"&":{color:`var(--theme-fg-primary)`,backgroundColor:`transparent`},".cm-content":{caretColor:`var(--theme-fg-primary)`},".cm-cursor, .cm-dropCursor":{borderLeftColor:`var(--theme-fg-primary)`},"&.cm-focused .cm-selectionBackground, .cm-selectionBackground":{backgroundColor:`var(--theme-bg-selected)`},".cm-placeholder":{color:`var(--theme-fg-tertiary)`},".cm-lintRange-error":{backgroundImage:`none`,textDecoration:`underline wavy var(--theme-error)`},".cm-lintRange-warning":{backgroundImage:`none`,textDecoration:`underline wavy var(--theme-warning)`},".cm-lintRange-active":{backgroundColor:`var(--theme-bg-selected)`},".cm-lintPoint-error":{"&:after":{borderBottomColor:`var(--theme-error)`}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:`var(--theme-warning)`}},".cm-tooltip":{backgroundColor:`var(--theme-bg-primary)`,color:`var(--theme-fg-primary)`,border:`1px solid var(--theme-border-primary)`,borderRadius:`8px`,boxShadow:`var(--theme-shadow-popup)`},".cm-tooltip-autocomplete > ul":{fontFamily:`var(--font-family-mono)`,maxHeight:`240px`},".cm-tooltip-autocomplete ul li":{color:`var(--theme-fg-primary)`,borderRadius:`4px`,padding:`4px 8px`},".cm-tooltip-autocomplete ul li[aria-selected]":{backgroundColor:`var(--theme-bg-selected)`,color:`var(--theme-fg-primary)`},".cm-completionMatchedText":{textDecoration:`none`,fontWeight:`600`,color:`var(--theme-link)`},".cm-completionDetail":{color:`var(--theme-fg-secondary)`,fontStyle:`normal`},".cm-completionIcon":{color:`var(--theme-fg-secondary)`},".cm-completionInfo":{backgroundColor:`var(--theme-bg-primary)`,color:`var(--theme-fg-secondary)`,borderLeft:`1px solid var(--theme-border-primary)`},".cm-diagnostic":{borderLeft:`2px solid var(--theme-border-secondary)`,padding:`4px 8px`,color:`var(--theme-fg-primary)`},".cm-diagnostic-error":{borderLeftColor:`var(--theme-error-border)`},".cm-diagnostic-warning":{borderLeftColor:`var(--theme-warning-border)`}}),Li],zi=Ri;function mitt_default(e){return{all:e||=new Map,on:function(t,n){var r=e.get(t);r?r.push(n):e.set(t,[n])},off:function(t,n){var r=e.get(t);r&&(n?r.splice(r.indexOf(n)>>>0,1):e.set(t,[]))},emit:function(t,n){var r=e.get(t);r&&r.slice().map(function(e){e(n)}),(r=e.get(`*`))&&r.slice().map(function(e){e(t,n)})}}}e(mitt_default,`default`),u();var Bi=xe.configure({wrap:m(e=>e.name===`HTMLTag`||e.name===`HTMLBlock`?{parser:Se}:null)});function FeelersEditor({container:e,tooltipContainer:t,hostLanguage:n,hostLanguageParser:r,onChange:i=()=>{},onKeyDown:a=()=>{},onLint:o=()=>{},contentAttributes:s={},readOnly:c=!1,value:l=``,enableGutters:u=!1,singleLine:d=!1,lineWrap:f=!1,darkMode:p=!1}){this._events=mitt_default(),this.on(`lint`,({diagnostics:e})=>o(e));let m=b.updateListener.of(e=>{e.docChanged&&i(e.state.doc.toString())}),h=b.updateListener.of(e=>{let t=e.transactions.flatMap(e=>e.effects).filter(e=>e.is(ve));if(!t.length)return;let n=t.flatMap(e=>e.value);this._events.emit(`lint`,{diagnostics:n})}),g=b.contentAttributes.of(s),_=b.domEventHandlers({keydown:a});typeof t==`string`&&(t=document.querySelector(t)||void 0);let v=t,x=v?ae({tooltipSpace:function(){return v.getBoundingClientRect()}}):[],_getHostLanguageParser=e=>{switch(e){case`markdown`:return Bi;default:return}},S=feelersLanguage(r||n&&_getHostLanguageParser(n)||void 0),w=[te(),m,g,ue(),T(),_,C.of([..._e]),S,Er,h,x,p?zi:Ri,...u?[y()]:[],...d?[O.transactionFilter.of(e=>e.newDoc.lines>1?[]:e)]:[],...f?[b.lineWrapping]:[]];return c&&w.push(b.editable.of(!1)),d&&l&&(l=l.toString().split(`
10
+ `)[0]),this._cmEditor=new b({state:O.create({doc:l,extensions:w}),parent:e}),this}FeelersEditor.prototype.setValue=function(e){this._cmEditor.dispatch({changes:{from:0,to:this._cmEditor.state.doc.length,insert:e}})},FeelersEditor.prototype.focus=function(e){let t=this._cmEditor;if(t.contentDOM.focus(),t.focus(),typeof e==`number`){let n=t.state.doc.length;t.dispatch({selection:{anchor:e<=n?e:n}})}},FeelersEditor.prototype.getSelection=function(){return this._cmEditor.state.selection},FeelersEditor.prototype.on=function(e,t){this._events.on(e,t)},FeelersEditor.prototype.off=function(e,t){this._events.off(e,t)};var Vi=[{name:`not`,type:`function`,params:[{name:`negand`}],info:`<p>Returns the logical negation of the given value.</p>
11
+ <p><strong>Function signature</strong></p>
12
+ <pre><code class="language-feel">not(negand: boolean): boolean
13
+ </code></pre>
14
+ <p><strong>Examples</strong></p>
15
+ <pre><code class="language-feel">not(true)
16
+ // false
17
+
18
+ not(null)
19
+ // null
20
+ </code></pre>
21
+ `},{name:`get value`,type:`function`,params:[{name:`context`},{name:`key`}],info:`<p>Returns the value of the context entry with the given key.</p>
22
+ <p><strong>Function signature</strong></p>
23
+ <pre><code class="language-feel">get value(context: context, key: string): Any
24
+ </code></pre>
25
+ <p><strong>Examples</strong></p>
26
+ <pre><code class="language-feel">get value({foo: 123}, &quot;foo&quot;)
27
+ // 123
28
+
29
+ get value({a: 1}, &quot;b&quot;)
30
+ // null
31
+ </code></pre>
32
+ `},{name:`get entries`,type:`function`,params:[{name:`context`}],info:`<p>Returns the entries of the context as a list of key-value-pairs.</p>
33
+ <p><strong>Function signature</strong></p>
34
+ <pre><code class="language-feel">get entries(context: context): list&lt;context&gt;
35
+ </code></pre>
36
+ <p>The return value is a list of contexts. Each context contains two entries for &quot;key&quot; and &quot;value&quot;.</p>
37
+ <p><strong>Examples</strong></p>
38
+ <pre><code class="language-feel">get entries({foo: 123})
39
+ // [{key: &quot;foo&quot;, value: 123}]
40
+ </code></pre>
41
+ `},{name:`context put`,type:`function`,params:[{name:`context`},{name:`keys`},{name:`value`}],info:`<p>Adds a new entry with the given value to the context. The path of the entry is defined by the keys. Returns a new context that includes the entry.</p>
42
+ <p>If <code>keys</code> contains the keys <code>[k1, k2]</code> then it adds the nested entry <code>k1.k2 = value</code> to the context.</p>
43
+ <p>If an entry for the same keys already exists in the context, it overrides the value.</p>
44
+ <p>If <code>keys</code> are empty, it returns <code>null</code>.</p>
45
+ <p><strong>Function signature</strong></p>
46
+ <pre><code class="language-feel">context put(context: context, keys: list&lt;string&gt;, value: Any): context
47
+ </code></pre>
48
+ <p><strong>Examples</strong></p>
49
+ <pre><code class="language-feel">context put({x:1}, [&quot;y&quot;], 2)
50
+ // {x:1, y:2}
51
+
52
+ context put({x:1, y: {z:0}}, [&quot;y&quot;, &quot;z&quot;], 2)
53
+ // {x:1, y: {z:2}}
54
+
55
+ context put({x:1}, [&quot;y&quot;, &quot;z&quot;], 2)
56
+ // {x:1, y: {z:2}}
57
+ </code></pre>
58
+ `},{name:`string`,type:`function`,params:[{name:`from`}],info:`<p>Returns the given value as a string representation.</p>
59
+ <p><strong>Function signature</strong></p>
60
+ <pre><code class="language-feel">string(from: Any): string
61
+ </code></pre>
62
+ <p><strong>Examples</strong></p>
63
+ <pre><code class="language-feel">string(1.1)
64
+ // &quot;1.1&quot;
65
+
66
+ string(date(&quot;2012-12-25&quot;))
67
+ // &quot;2012-12-25&quot;
68
+ </code></pre>
69
+ `},{name:`number`,type:`function`,params:[{name:`from`}],info:`<p>Parses the given string to a number.</p>
70
+ <p>Returns <code>null</code> if the string is not a number.</p>
71
+ <p><strong>Function signature</strong></p>
72
+ <pre><code class="language-feel">number(from: string): number
73
+ </code></pre>
74
+ <p><strong>Examples</strong></p>
75
+ <pre><code class="language-feel">number(&quot;1500.5&quot;)
76
+ // 1500.5
77
+ </code></pre>
78
+ `},{name:`number`,type:`function`,params:[{name:`from`},{name:`grouping separator`}],info:`<p>Parses the given string to a number using the specified grouping separator.</p>
79
+ <p>Returns <code>null</code> if the string is not a number.</p>
80
+ <p><strong>Function signature</strong></p>
81
+ <pre><code class="language-feel">number(from: string, grouping separator: string): number
82
+ </code></pre>
83
+ <p><strong>Examples</strong></p>
84
+ <pre><code class="language-feel">number(&quot;1,500&quot;, &quot;,&quot;)
85
+ // 1500
86
+ </code></pre>
87
+ `},{name:`number`,type:`function`,params:[{name:`from`},{name:`grouping separator`},{name:`decimal separator`}],info:`<p>Parses the given string to a number using the specified grouping and decimal separators.</p>
88
+ <p>Returns <code>null</code> if the string is not a number.</p>
89
+ <p><strong>Function signature</strong></p>
90
+ <pre><code class="language-feel">number(from: string, grouping separator: string, decimal separator: string): number
91
+ </code></pre>
92
+ <p><strong>Examples</strong></p>
93
+ <pre><code class="language-feel">number(&quot;1 500.5&quot;, &quot; &quot;, &quot;.&quot;)
94
+ // 1500.5
95
+ </code></pre>
96
+ `},{name:`context`,type:`function`,params:[{name:`entries`}],info:`<p>Constructs a context of the given list of key-value pairs. It is the reverse function to <a href="https://docs.camunda.io/docs/components/modeler/feel/builtin-functions/feel-built-in-functions-context#get-entriescontext">get entries()</a>.</p>
97
+ <p>Each key-value pair must be a context with two entries: <code>key</code> and <code>value</code>. The entry with name <code>key</code> must have a value of the type <code>string</code>.</p>
98
+ <p>It might override context entries if the keys are equal. The entries are overridden in the same order as the contexts in the given list.</p>
99
+ <p>Returns <code>null</code> if one of the entries is not a context or if a context doesn&#39;t contain the required entries.</p>
100
+ <p><strong>Function signature</strong></p>
101
+ <pre><code class="language-feel">context(entries: list&lt;context&gt;): context
102
+ </code></pre>
103
+ <p><strong>Examples</strong></p>
104
+ <pre><code class="language-feel">context([{&quot;key&quot;:&quot;a&quot;, &quot;value&quot;:1}, {&quot;key&quot;:&quot;b&quot;, &quot;value&quot;:2}])
105
+ // {a:1, b:2}
106
+ </code></pre>
107
+ `},{name:`date`,type:`function`,params:[{name:`from`}],info:`<p>Returns a date from the given value.</p>
108
+ <p>Returns <code>null</code> if the string is not a valid calendar date. For example, <code>&quot;2024-06-31&quot;</code> is invalid because June has
109
+ only 30 days.</p>
110
+ <p><strong>Function signature</strong></p>
111
+ <pre><code class="language-feel">date(from: string): date
112
+ </code></pre>
113
+ <p>Parses the given string into a date.</p>
114
+ <pre><code class="language-feel">date(from: date and time): date
115
+ </code></pre>
116
+ <p>Extracts the date component from the given date and time.</p>
117
+ <p><strong>Examples</strong></p>
118
+ <pre><code class="language-feel">date(&quot;2018-04-29&quot;)
119
+ // date(&quot;2018-04-29&quot;)
120
+
121
+ date(date and time(&quot;2012-12-25T11:00:00&quot;))
122
+ // date(&quot;2012-12-25&quot;)
123
+ </code></pre>
124
+ `},{name:`date`,type:`function`,params:[{name:`year`},{name:`month`},{name:`day`}],info:`<p>Returns a date from the given components.</p>
125
+ <p>Returns <code>null</code> if the components don&#39;t represent a valid calendar date. For example, <code>2024,6,31</code> is invalid because
126
+ June has only 30 days.</p>
127
+ <p><strong>Function signature</strong></p>
128
+ <pre><code class="language-feel">date(year: number, month: number, day: number): date
129
+ </code></pre>
130
+ <p><strong>Examples</strong></p>
131
+ <pre><code class="language-feel">date(2012, 12, 25)
132
+ // date(&quot;2012-12-25&quot;)
133
+ </code></pre>
134
+ `},{name:`time`,type:`function`,params:[{name:`from`}],info:`<p>Returns a time from the given value.</p>
135
+ <p><strong>Function signature</strong></p>
136
+ <pre><code class="language-feel">time(from: string): time
137
+ </code></pre>
138
+ <p>Parses the given string into a time.</p>
139
+ <pre><code class="language-feel">time(from: date and time): time
140
+ </code></pre>
141
+ <p>Extracts the time component from the given date and time.</p>
142
+ <p><strong>Examples</strong></p>
143
+ <pre><code class="language-feel">time(&quot;12:00:00&quot;)
144
+ // time(&quot;12:00:00&quot;)
145
+
146
+ time(date and time(&quot;2012-12-25T11:00:00&quot;))
147
+ // time(&quot;11:00:00&quot;)
148
+ </code></pre>
149
+ `},{name:`time`,type:`function`,params:[{name:`hour`},{name:`minute`},{name:`second`}],info:`<p>Returns a time from the given components.</p>
150
+ <p><strong>Function signature</strong></p>
151
+ <pre><code class="language-feel">time(hour: number, minute: number, second: number): time
152
+ </code></pre>
153
+ <p><strong>Examples</strong></p>
154
+ <pre><code class="language-feel">time(23, 59, 0)
155
+ // time(&quot;23:59:00&quot;)
156
+ </code></pre>
157
+ `},{name:`time`,type:`function`,params:[{name:`hour`},{name:`minute`},{name:`second`},{name:`offset`}],info:`<p>Returns a time from the given components, including a timezone offset.</p>
158
+ <p><strong>Function signature</strong></p>
159
+ <pre><code class="language-feel">time(hour: number, minute: number, second: number, offset: days and time duration): time
160
+ </code></pre>
161
+ <p><strong>Examples</strong></p>
162
+ <pre><code class="language-feel">time(14, 30, 0, duration(&quot;PT1H&quot;))
163
+ // time(&quot;14:30:00+01:00&quot;)
164
+ </code></pre>
165
+ `},{name:`date and time`,type:`function`,params:[{name:`from`}],info:`<p>Parses the given string into a date and time. The function supports strings in the format <code>YYYY-MM-DDThh:mm:ss</code> with
166
+ optional timezone information either as offset (e.g., <code>+01:00</code> or <code>Z</code>), as IANA timezone ID (e.g., <code>@Europe/Berlin</code>), or
167
+ as a combination of both (e.g., <code>+01:00[Europe/Berlin]</code>).</p>
168
+ <p>Returns <code>null</code> if the string is not a valid calendar date. For example, <code>&quot;2024-06-31T10:00:00&quot;</code> is invalid because
169
+ June has only 30 days.</p>
170
+ <p><strong>Function signature</strong></p>
171
+ <pre><code class="language-feel">date and time(from: string): date and time
172
+ </code></pre>
173
+ <p><strong>Examples</strong></p>
174
+ <pre><code class="language-feel">date and time(&quot;2018-04-29T09:30:00&quot;)
175
+ // date and time(&quot;2018-04-29T09:30:00&quot;)
176
+
177
+ date and time(&quot;2018-04-29T09:30:00+02:00&quot;)
178
+ // date and time(&quot;2018-04-29T09:30:00+02:00&quot;)
179
+
180
+ date and time(&quot;2018-04-29T09:30:00@Europe/Berlin&quot;)
181
+ // date and time(&quot;2018-04-29T09:30:00@Europe/Berlin&quot;)
182
+
183
+ date and time(&quot;2018-04-29T09:30:00+02:00[Europe/Berlin]&quot;)
184
+ // date and time(&quot;2018-04-29T09:30:00@Europe/Berlin&quot;)
185
+ </code></pre>
186
+ `},{name:`date and time`,type:`function`,params:[{name:`date`},{name:`time`}],info:`<p>Returns a date and time from the given components.</p>
187
+ <p><strong>Function signature</strong></p>
188
+ <pre><code class="language-feel">date and time(date: date, time: time): date and time
189
+ </code></pre>
190
+ <pre><code class="language-feel">date and time(date: date and time, time: time): date and time
191
+ </code></pre>
192
+ <p>Returns a date and time value that consists of the date component of <code>date</code> combined with <code>time</code>.</p>
193
+ <p><strong>Examples</strong></p>
194
+ <pre><code class="language-feel">date and time(date(&quot;2012-12-24&quot;),time(&quot;T23:59:00&quot;))
195
+ // date and time(&quot;2012-12-24T23:59:00&quot;)
196
+
197
+ date and time(date and time(&quot;2012-12-25T11:00:00&quot;),time(&quot;T23:59:00&quot;))
198
+ // date and time(&quot;2012-12-25T23:59:00&quot;)
199
+ </code></pre>
200
+ `},{name:`duration`,type:`function`,params:[{name:`from`}],info:`<p>Parses the given string into a duration. The duration is either a days and time duration or a years and months duration.</p>
201
+ <p><strong>Function signature</strong></p>
202
+ <pre><code class="language-feel">duration(from: string): days and time duration
203
+ </code></pre>
204
+ <pre><code class="language-feel">duration(from: string): years and months duration
205
+ </code></pre>
206
+ <p><strong>Examples</strong></p>
207
+ <pre><code class="language-feel">duration(&quot;P5D&quot;)
208
+ // duration(&quot;P5D&quot;)
209
+
210
+ duration(&quot;P32Y&quot;)
211
+ // duration(&quot;P32Y&quot;)
212
+ </code></pre>
213
+ `},{name:`years and months duration`,type:`function`,params:[{name:`from`},{name:`to`}],info:`<p>Returns the years and months duration between <code>from</code> and <code>to</code>.</p>
214
+ <p><strong>Function signature</strong></p>
215
+ <pre><code class="language-feel">years and months duration(from: date, to: date): years and months duration
216
+ </code></pre>
217
+ <p><strong>Examples</strong></p>
218
+ <pre><code class="language-feel">years and months duration(date(&quot;2011-12-22&quot;), date(&quot;2013-08-24&quot;))
219
+ // duration(&quot;P1Y8M&quot;)
220
+ </code></pre>
221
+ `},{name:`from json`,type:`function`,params:[{name:`value`}],info:`<p>Parses a JSON string into a FEEL value. The function converts JSON primitives, objects, and arrays into their corresponding FEEL types.</p>
222
+ <p>Returns <code>null</code> if the string is not a valid JSON value.</p>
223
+ <p><strong>Function signature</strong></p>
224
+ <pre><code class="language-feel">from json(value: string): Any
225
+ </code></pre>
226
+ <p><strong>Examples</strong></p>
227
+ <pre><code class="language-feel">from json(&quot;{\\&quot;a\\&quot;: 1, \\&quot;b\\&quot;: 2}&quot;)
228
+ // {a: 1, b: 2}
229
+
230
+ from json(&quot;true&quot;)
231
+ // true
232
+
233
+ from json(&quot;\\&quot;2023-06-14\\&quot;&quot;)
234
+ // &quot;2023-06-14&quot;
235
+ </code></pre>
236
+ `,engines:{camunda:`>=8.9`}},{name:`to json`,type:`function`,params:[{name:`value`}],info:`<p>Converts a FEEL value into a JSON string. The function converts FEEL primitives, contexts, and lists into their
237
+ corresponding JSON types. Temporal values are converted to their ISO 8601 string representation, including timezone
238
+ information for date and time values (format: <code>2025-11-24T10:00:00+01:00[Europe/Berlin]</code>).</p>
239
+ <p><strong>Function signature</strong></p>
240
+ <pre><code class="language-feel">to json(value: Any): string
241
+ </code></pre>
242
+ <p><strong>Examples</strong></p>
243
+ <pre><code class="language-feel">to json({a: 1, b: 2})
244
+ // &quot;{\\&quot;a\\&quot;:1,\\&quot;b\\&quot;:2}&quot;
245
+
246
+ to json(true)
247
+ // &quot;true&quot;
248
+
249
+ to json(@&quot;2023-06-14&quot;)
250
+ // &quot;\\&quot;2023-06-14\\&quot;&quot;
251
+
252
+ to json(@&quot;2025-11-24T10:00:00@Europe/Berlin&quot;)
253
+ // &quot;\\&quot;2025-11-24T10:00:00+01:00[Europe/Berlin]\\&quot;&quot;
254
+
255
+ to json(@&quot;P3Y&quot;)
256
+ // &quot;\\&quot;P3Y\\&quot;&quot;
257
+ </code></pre>
258
+ `,engines:{camunda:`>=8.9`}},{name:`list contains`,type:`function`,params:[{name:`list`},{name:`element`}],info:`<p>Returns <code>true</code> if the given list contains the element. Otherwise, returns <code>false</code>.</p>
259
+ <p><strong>Function signature</strong></p>
260
+ <pre><code class="language-feel">list contains(list: list, element: Any): boolean
261
+ </code></pre>
262
+ <p><strong>Examples</strong></p>
263
+ <pre><code class="language-feel">list contains([1,2,3], 2)
264
+ // true
265
+ </code></pre>
266
+ `},{name:`count`,type:`function`,params:[{name:`list`}],info:`<p>Returns the number of elements of the given list.</p>
267
+ <p><strong>Function signature</strong></p>
268
+ <pre><code class="language-feel">count(list: list): number
269
+ </code></pre>
270
+ <p><strong>Examples</strong></p>
271
+ <pre><code class="language-feel">count([1,2,3])
272
+ // 3
273
+ </code></pre>
274
+ `},{name:`min`,type:`function`,params:[{name:`list`}],info:`<p>Returns the minimum of the given list.</p>
275
+ <p><strong>Function signature</strong></p>
276
+ <pre><code class="language-feel">min(list: list): Any
277
+ </code></pre>
278
+ <p>All elements in <code>list</code> should have the same type and be comparable.</p>
279
+ <p>The parameter <code>list</code> can be passed as a list or as a sequence of elements.</p>
280
+ <p><strong>Examples</strong></p>
281
+ <pre><code class="language-feel">min([1,2,3])
282
+ // 1
283
+
284
+ min(1,2,3)
285
+ // 1
286
+ </code></pre>
287
+ `},{name:`max`,type:`function`,params:[{name:`list`}],info:`<p>Returns the maximum of the given list.</p>
288
+ <p><strong>Function signature</strong></p>
289
+ <pre><code class="language-feel">max(list: list): Any
290
+ </code></pre>
291
+ <p>All elements in <code>list</code> should have the same type and be comparable.</p>
292
+ <p>The parameter <code>list</code> can be passed as a list or as a sequence of elements.</p>
293
+ <p><strong>Examples</strong></p>
294
+ <pre><code class="language-feel">max([1,2,3])
295
+ // 3
296
+
297
+ max(1,2,3)
298
+ // 3
299
+ </code></pre>
300
+ `},{name:`sum`,type:`function`,params:[{name:`list`}],info:`<p>Returns the sum of the given list of numbers.</p>
301
+ <p><strong>Function signature</strong></p>
302
+ <pre><code class="language-feel">sum(list: list&lt;number&gt;): number
303
+ </code></pre>
304
+ <p>The parameter <code>list</code> can be passed as a list or as a sequence of elements.</p>
305
+ <p><strong>Examples</strong></p>
306
+ <pre><code class="language-feel">sum([1,2,3])
307
+ // 6
308
+
309
+ sum(1,2,3)
310
+ // 6
311
+ </code></pre>
312
+ `},{name:`product`,type:`function`,params:[{name:`list`}],info:`<p>Returns the product of the given list of numbers.</p>
313
+ <p><strong>Function signature</strong></p>
314
+ <pre><code class="language-feel">product(list: list&lt;number&gt;): number
315
+ </code></pre>
316
+ <p>The parameter <code>list</code> can be passed as a list or as a sequence of elements.</p>
317
+ <p><strong>Examples</strong></p>
318
+ <pre><code class="language-feel">product([2, 3, 4])
319
+ // 24
320
+
321
+ product(2, 3, 4)
322
+ // 24
323
+ </code></pre>
324
+ `},{name:`mean`,type:`function`,params:[{name:`list`}],info:`<p>Returns the arithmetic mean (i.e. average) of the given list of numbers.</p>
325
+ <p><strong>Function signature</strong></p>
326
+ <pre><code class="language-feel">mean(list: list&lt;number&gt;): number
327
+ </code></pre>
328
+ <p>The parameter <code>list</code> can be passed as a list or as a sequence of elements.</p>
329
+ <p><strong>Examples</strong></p>
330
+ <pre><code class="language-feel">mean([1,2,3])
331
+ // 2
332
+
333
+ mean(1,2,3)
334
+ // 2
335
+ </code></pre>
336
+ `},{name:`median`,type:`function`,params:[{name:`list`}],info:`<p>Returns the median element of the given list of numbers.</p>
337
+ <p><strong>Function signature</strong></p>
338
+ <pre><code class="language-feel">median(list: list&lt;number&gt;): number
339
+ </code></pre>
340
+ <p>The parameter <code>list</code> can be passed as a list or as a sequence of elements.</p>
341
+ <p><strong>Examples</strong></p>
342
+ <pre><code class="language-feel">median(8, 2, 5, 3, 4)
343
+ // 4
344
+
345
+ median([6, 1, 2, 3])
346
+ // 2.5
347
+ </code></pre>
348
+ `},{name:`stddev`,type:`function`,params:[{name:`list`}],info:`<p>Returns the standard deviation of the given list of numbers.</p>
349
+ <p><strong>Function signature</strong></p>
350
+ <pre><code class="language-feel">stddev(list: list&lt;number&gt;): number
351
+ </code></pre>
352
+ <p>The parameter <code>list</code> can be passed as a list or as a sequence of elements.</p>
353
+ <p><strong>Examples</strong></p>
354
+ <pre><code class="language-feel">stddev(2, 4, 7, 5)
355
+ // 2.0816659994661326
356
+
357
+ stddev([2, 4, 7, 5])
358
+ // 2.0816659994661326
359
+ </code></pre>
360
+ `},{name:`mode`,type:`function`,params:[{name:`list`}],info:`<p>Returns the mode of the given list of numbers.</p>
361
+ <p><strong>Function signature</strong></p>
362
+ <pre><code class="language-feel">mode(list: list&lt;number&gt;): number
363
+ </code></pre>
364
+ <p>The parameter <code>list</code> can be passed as a list or as a sequence of elements.</p>
365
+ <p><strong>Examples</strong></p>
366
+ <pre><code class="language-feel">mode(6, 3, 9, 6, 6)
367
+ // [6]
368
+
369
+ mode([6, 1, 9, 6, 1])
370
+ // [1, 6]
371
+ </code></pre>
372
+ `},{name:`all`,type:`function`,params:[{name:`list`}],info:`<p>Returns <code>false</code> if any element of the given list is <code>false</code>. Otherwise, returns <code>true</code>.</p>
373
+ <p>If the given list is empty, it returns <code>true</code>.</p>
374
+ <p><strong>Function signature</strong></p>
375
+ <pre><code class="language-feel">all(list: list&lt;boolean&gt;): boolean
376
+ </code></pre>
377
+ <p>The parameter <code>list</code> can be passed as a list or as a sequence of elements.</p>
378
+ <p><strong>Examples</strong></p>
379
+ <pre><code class="language-feel">all([true,false])
380
+ // false
381
+
382
+ all(false,null,true)
383
+ // false
384
+ </code></pre>
385
+ <p>:::info
386
+ The function <code>all()</code> replaced the previous function <code>and()</code>. The previous function is deprecated and
387
+ should not be used anymore.
388
+ :::</p>
389
+ `},{name:`any`,type:`function`,params:[{name:`list`}],info:`<p>Returns <code>true</code> if any element of the given list is <code>true</code>. Otherwise, returns <code>false</code>.</p>
390
+ <p>If the given list is empty, it returns <code>false</code>.</p>
391
+ <p><strong>Function signature</strong></p>
392
+ <pre><code class="language-feel">any(list: list&lt;boolean&gt;): boolean
393
+ </code></pre>
394
+ <p>The parameter <code>list</code> can be passed as a list or as a sequence of elements.</p>
395
+ <p><strong>Examples</strong></p>
396
+ <pre><code class="language-feel">any([false,true])
397
+ // true
398
+
399
+ any(false,null,true)
400
+ // true
401
+ </code></pre>
402
+ <p>:::info
403
+ The function <code>any()</code> replaced the previous function <code>or()</code>. The previous function is deprecated and
404
+ should not be used anymore.
405
+ :::</p>
406
+ `},{name:`sublist`,type:`function`,params:[{name:`list`},{name:`start position`}],info:`<p>Returns a partial list of the given value starting at <code>start position</code>.</p>
407
+ <p><strong>Function signature</strong></p>
408
+ <pre><code class="language-feel">sublist(list: list, start position: number): list
409
+ </code></pre>
410
+ <p>The <code>start position</code> starts at the index <code>1</code>. The last position is <code>-1</code>.</p>
411
+ <p><strong>Examples</strong></p>
412
+ <pre><code class="language-feel">sublist([1,2,3], 2)
413
+ // [2,3]
414
+ </code></pre>
415
+ `},{name:`sublist`,type:`function`,params:[{name:`list`},{name:`start position`},{name:`length`}],info:`<p>Returns a partial list of the given value starting at <code>start position</code>.</p>
416
+ <p><strong>Function signature</strong></p>
417
+ <pre><code class="language-feel">sublist(list: list, start position: number, length: number): list
418
+ </code></pre>
419
+ <p>The <code>start position</code> starts at the index <code>1</code>. The last position is <code>-1</code>.</p>
420
+ <p><strong>Examples</strong></p>
421
+ <pre><code class="language-feel">sublist([1,2,3], 1, 2)
422
+ // [1,2]
423
+ </code></pre>
424
+ `},{name:`append`,type:`function`,params:[{name:`list`},{name:`items`}],info:`<p>Returns the given list with all <code>items</code> appended.</p>
425
+ <p><strong>Function signature</strong></p>
426
+ <pre><code class="language-feel">append(list: list, items: Any): list
427
+ </code></pre>
428
+ <p>The parameter <code>items</code> can be a single element or a sequence of elements.</p>
429
+ <p><strong>Examples</strong></p>
430
+ <pre><code class="language-feel">append([1], 2, 3)
431
+ // [1,2,3]
432
+ </code></pre>
433
+ `},{name:`concatenate`,type:`function`,params:[{name:`lists`}],info:`<p>Returns a list that includes all elements of the given lists.</p>
434
+ <p><strong>Function signature</strong></p>
435
+ <pre><code class="language-feel">concatenate(lists: list): list
436
+ </code></pre>
437
+ <p>The parameter <code>lists</code> is a sequence of lists.</p>
438
+ <p><strong>Examples</strong></p>
439
+ <pre><code class="language-feel">concatenate([1,2],[3])
440
+ // [1,2,3]
441
+
442
+ concatenate([1],[2],[3])
443
+ // [1,2,3]
444
+ </code></pre>
445
+ `},{name:`insert before`,type:`function`,params:[{name:`list`},{name:`position`},{name:`newItem`}],info:`<p>Returns the given list with <code>newItem</code> inserted at <code>position</code>.</p>
446
+ <p><strong>Function signature</strong></p>
447
+ <pre><code class="language-feel">insert before(list: list, position: number, newItem: Any): list
448
+ </code></pre>
449
+ <p>The <code>position</code> starts at the index <code>1</code>. The last position is <code>-1</code>.</p>
450
+ <p><strong>Examples</strong></p>
451
+ <pre><code class="language-feel">insert before([1,3],1,2)
452
+ // [2,1,3]
453
+ </code></pre>
454
+ `},{name:`remove`,type:`function`,params:[{name:`list`},{name:`position`}],info:`<p>Returns the given list without the element at <code>position</code>.</p>
455
+ <p><strong>Function signature</strong></p>
456
+ <pre><code class="language-feel">remove(list: list, position: number): list
457
+ </code></pre>
458
+ <p>The <code>position</code> starts at the index <code>1</code>. The last position is <code>-1</code>.</p>
459
+ <p><strong>Examples</strong></p>
460
+ <pre><code class="language-feel">remove([1,2,3], 2)
461
+ // [1,3]
462
+ </code></pre>
463
+ `},{name:`reverse`,type:`function`,params:[{name:`list`}],info:`<p>Returns the given list in revered order.</p>
464
+ <p><strong>Function signature</strong></p>
465
+ <pre><code class="language-feel">reverse(list: list): list
466
+ </code></pre>
467
+ <p><strong>Examples</strong></p>
468
+ <pre><code class="language-feel">reverse([1,2,3])
469
+ // [3,2,1]
470
+ </code></pre>
471
+ `},{name:`index of`,type:`function`,params:[{name:`list`},{name:`match`}],info:`<p>Returns an ascending list of positions containing <code>match</code>.</p>
472
+ <p><strong>Function signature</strong></p>
473
+ <pre><code class="language-feel">index of(list: list, match: Any): list&lt;number&gt;
474
+ </code></pre>
475
+ <p><strong>Examples</strong></p>
476
+ <pre><code class="language-feel">index of([1,2,3,2],2)
477
+ // [2,4]
478
+ </code></pre>
479
+ `},{name:`union`,type:`function`,params:[{name:`list`}],info:`<p>Returns a list that includes all elements of the given lists without duplicates.</p>
480
+ <p><strong>Function signature</strong></p>
481
+ <pre><code class="language-feel">union(list: list): list
482
+ </code></pre>
483
+ <p>The parameter <code>list</code> is a sequence of lists.</p>
484
+ <p><strong>Examples</strong></p>
485
+ <pre><code class="language-feel">union([1,2],[2,3])
486
+ // [1,2,3]
487
+ </code></pre>
488
+ `},{name:`distinct values`,type:`function`,params:[{name:`list`}],info:`<p>Returns the given list without duplicates.</p>
489
+ <p><strong>Function signature</strong></p>
490
+ <pre><code class="language-feel">distinct values(list: list): list
491
+ </code></pre>
492
+ <p><strong>Examples</strong></p>
493
+ <pre><code class="language-feel">distinct values([1,2,3,2,1])
494
+ // [1,2,3]
495
+ </code></pre>
496
+ `},{name:`flatten`,type:`function`,params:[{name:`list`}],info:`<p>Returns a list that includes all elements of the given list without nested lists.</p>
497
+ <p><strong>Function signature</strong></p>
498
+ <pre><code class="language-feel">flatten(list: list): list
499
+ </code></pre>
500
+ <p><strong>Examples</strong></p>
501
+ <pre><code class="language-feel">flatten([[1,2],[[3]], 4])
502
+ // [1,2,3,4]
503
+ </code></pre>
504
+ `},{name:`sort`,type:`function`,params:[{name:`list`},{name:`precedes`}],info:`<p>Returns the given list sorted by the <code>precedes</code> function.</p>
505
+ <p><strong>Function signature</strong></p>
506
+ <pre><code class="language-feel">sort(list: list, precedes: function&lt;(Any, Any) -&gt; boolean&gt;): list
507
+ </code></pre>
508
+ <p><strong>Examples</strong></p>
509
+ <pre><code class="language-feel">sort(list: [3,1,4,5,2], precedes: function(x,y) x &lt; y)
510
+ // [1,2,3,4,5]
511
+ </code></pre>
512
+ `},{name:`string join`,type:`function`,params:[{name:`list`}],info:`<p>Joins a list of strings into a single string. This is similar to
513
+ Java&#39;s <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/stream/Collectors.html#joining(java.lang.CharSequence,java.lang.CharSequence,java.lang.CharSequence)">joining</a>
514
+ function.</p>
515
+ <p>If an item of the list is <code>null</code>, the item is ignored for the result string. If an item is
516
+ neither a string nor <code>null</code>, the function returns <code>null</code> instead of a string.</p>
517
+ <p><strong>Function signature</strong></p>
518
+ <pre><code class="language-feel">string join(list: list&lt;string&gt;): string
519
+ </code></pre>
520
+ <p><strong>Examples</strong></p>
521
+ <pre><code class="language-feel">string join([&quot;a&quot;,&quot;b&quot;,&quot;c&quot;])
522
+ // &quot;abc&quot;
523
+
524
+ string join([&quot;a&quot;,null,&quot;c&quot;])
525
+ // &quot;ac&quot;
526
+
527
+ string join([])
528
+ // &quot;&quot;
529
+ </code></pre>
530
+ `},{name:`string join`,type:`function`,params:[{name:`list`},{name:`delimiter`}],info:`<p>Joins a list of strings into a single string. This is similar to
531
+ Java&#39;s <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/stream/Collectors.html#joining(java.lang.CharSequence,java.lang.CharSequence,java.lang.CharSequence)">joining</a>
532
+ function.</p>
533
+ <p>If an item of the list is <code>null</code>, the item is ignored for the result string. If an item is
534
+ neither a string nor <code>null</code>, the function returns <code>null</code> instead of a string.</p>
535
+ <p>The resulting string contains a <code>delimiter</code> between each element.</p>
536
+ <p><strong>Function signature</strong></p>
537
+ <pre><code class="language-feel">string join(list: list&lt;string&gt;, delimiter: string): string
538
+ </code></pre>
539
+ <p><strong>Examples</strong></p>
540
+ <pre><code class="language-feel">string join([&quot;a&quot;], &quot;X&quot;)
541
+ // &quot;a&quot;
542
+
543
+ string join([&quot;a&quot;,&quot;b&quot;,&quot;c&quot;], &quot;, &quot;)
544
+ // &quot;a, b, c&quot;
545
+ </code></pre>
546
+ `},{name:`decimal`,type:`function`,params:[{name:`n`},{name:`scale`}],info:`<p>Rounds the given value at the given scale.</p>
547
+ <p><strong>Function signature</strong></p>
548
+ <pre><code class="language-feel">decimal(n: number, scale: number): number
549
+ </code></pre>
550
+ <p><strong>Examples</strong></p>
551
+ <pre><code class="language-feel">decimal(1/3, 2)
552
+ // .33
553
+
554
+ decimal(1.5, 0)
555
+ // 2
556
+ </code></pre>
557
+ `},{name:`floor`,type:`function`,params:[{name:`n`}],info:`<p>Rounds the given value with rounding mode flooring.</p>
558
+ <p><strong>Function signature</strong></p>
559
+ <pre><code class="language-feel">floor(n: number): number
560
+ </code></pre>
561
+ <p><strong>Examples</strong></p>
562
+ <pre><code class="language-feel">floor(1.5)
563
+ // 1
564
+
565
+ floor(-1.5)
566
+ // -2
567
+ </code></pre>
568
+ `},{name:`floor`,type:`function`,params:[{name:`n`},{name:`scale`}],info:`<p>Rounds the given value with rounding mode flooring at the given scale.</p>
569
+ <p><strong>Function signature</strong></p>
570
+ <pre><code class="language-feel">floor(n: number, scale: number): number
571
+ </code></pre>
572
+ <p><strong>Examples</strong></p>
573
+ <pre><code class="language-feel">floor(-1.56, 1)
574
+ // -1.6
575
+ </code></pre>
576
+ `},{name:`ceiling`,type:`function`,params:[{name:`n`}],info:`<p>Rounds the given value with rounding mode ceiling.</p>
577
+ <p><strong>Function signature</strong></p>
578
+ <pre><code class="language-feel">ceiling(n: number): number
579
+ </code></pre>
580
+ <p><strong>Examples</strong></p>
581
+ <pre><code class="language-feel">ceiling(1.5)
582
+ // 2
583
+
584
+ ceiling(-1.5)
585
+ // -1
586
+ </code></pre>
587
+ `},{name:`ceiling`,type:`function`,params:[{name:`n`},{name:`scale`}],info:`<p>Rounds the given value with rounding mode ceiling at the given scale.</p>
588
+ <p><strong>Function signature</strong></p>
589
+ <pre><code class="language-feel">ceiling(n: number, scale: number): number
590
+ </code></pre>
591
+ <p><strong>Examples</strong></p>
592
+ <pre><code class="language-feel">ceiling(-1.56, 1)
593
+ // -1.5
594
+ </code></pre>
595
+ `},{name:`round up`,type:`function`,params:[{name:`n`},{name:`scale`}],info:`<p>Rounds the given value with the rounding mode round-up at the given scale.</p>
596
+ <p><strong>Function signature</strong></p>
597
+ <pre><code class="language-feel">round up(n: number, scale: number): number
598
+ </code></pre>
599
+ <p><strong>Examples</strong></p>
600
+ <pre><code class="language-feel">round up(5.5)
601
+ // 6
602
+
603
+ round up(-5.5)
604
+ // -6
605
+
606
+ round up(1.121, 2)
607
+ // 1.13
608
+
609
+ round up(-1.126, 2)
610
+ // -1.13
611
+ </code></pre>
612
+ `},{name:`round down`,type:`function`,params:[{name:`n`},{name:`scale`}],info:`<p>Rounds the given value with the rounding mode round-down at the given scale.</p>
613
+ <p><strong>Function signature</strong></p>
614
+ <pre><code class="language-feel">round down(n: number, scale: number): number
615
+ </code></pre>
616
+ <p><strong>Examples</strong></p>
617
+ <pre><code class="language-feel">round down(5.5, 0)
618
+ // 5
619
+
620
+ round down (-5.5, 0)
621
+ // -5
622
+
623
+ round down (1.121, 2)
624
+ // 1.12
625
+
626
+ round down (-1.126, 2)
627
+ // -1.12
628
+ </code></pre>
629
+ `},{name:`round half up`,type:`function`,params:[{name:`n`},{name:`scale`}],info:`<p>Rounds the given value with the rounding mode round-half-up at the given scale.</p>
630
+ <p><strong>Function signature</strong></p>
631
+ <pre><code class="language-feel">round half up(n: number, scale: number): number
632
+ </code></pre>
633
+ <p><strong>Examples</strong></p>
634
+ <pre><code class="language-feel">round half up(5.5, 0)
635
+ // 6
636
+
637
+ round half up(-5.5, 0)
638
+ // -6
639
+
640
+ round half up(1.121, 2)
641
+ // 1.12
642
+
643
+ round half up(-1.126, 2)
644
+ // -1.13
645
+ </code></pre>
646
+ `},{name:`round half down`,type:`function`,params:[{name:`n`},{name:`scale`}],info:`<p>Rounds the given value with the rounding mode round-half-down at the given scale.</p>
647
+ <p><strong>Function signature</strong></p>
648
+ <pre><code class="language-feel">round half down(n: number, scale: number): number
649
+ </code></pre>
650
+ <p><strong>Examples</strong></p>
651
+ <pre><code class="language-feel">round half down (5.5, 0)
652
+ // 5
653
+
654
+ round half down (-5.5, 0)
655
+ // -5
656
+
657
+ round half down (1.121, 2)
658
+ // 1.12
659
+
660
+ round half down (-1.126, 2)
661
+ // -1.13
662
+ </code></pre>
663
+ `},{name:`abs`,type:`function`,params:[{name:`number`}],info:`<p>Returns the absolute value of the given numeric value.</p>
664
+ <p><strong>Function signature</strong></p>
665
+ <pre><code class="language-feel">abs(number: number): number
666
+ </code></pre>
667
+ <p><strong>Examples</strong></p>
668
+ <pre><code class="language-feel">abs(10)
669
+ // 10
670
+
671
+ abs(-10)
672
+ // 10
673
+ </code></pre>
674
+ `},{name:`modulo`,type:`function`,params:[{name:`dividend`},{name:`divisor`}],info:`<p>Returns the remainder of the division of dividend by divisor.</p>
675
+ <p><strong>Function signature</strong></p>
676
+ <pre><code class="language-feel">modulo(dividend: number, divisor: number): number
677
+ </code></pre>
678
+ <p><strong>Examples</strong></p>
679
+ <pre><code class="language-feel">modulo(12, 5)
680
+ // 2
681
+ </code></pre>
682
+ `},{name:`sqrt`,type:`function`,params:[{name:`number`}],info:`<p>Returns the square root of the given value.</p>
683
+ <p><strong>Function signature</strong></p>
684
+ <pre><code class="language-feel">sqrt(number: number): number
685
+ </code></pre>
686
+ <p><strong>Examples</strong></p>
687
+ <pre><code class="language-feel">sqrt(16)
688
+ // 4
689
+ </code></pre>
690
+ `},{name:`log`,type:`function`,params:[{name:`number`}],info:`<p>Returns the natural logarithm (base e) of the given value.</p>
691
+ <p><strong>Function signature</strong></p>
692
+ <pre><code class="language-feel">log(number: number): number
693
+ </code></pre>
694
+ <p><strong>Examples</strong></p>
695
+ <pre><code class="language-feel">log(10)
696
+ // 2.302585092994046
697
+ </code></pre>
698
+ `},{name:`exp`,type:`function`,params:[{name:`number`}],info:`<p>Returns the Euler’s number e raised to the power of the given number .</p>
699
+ <p><strong>Function signature</strong></p>
700
+ <pre><code class="language-feel">exp(number: number): number
701
+ </code></pre>
702
+ <p><strong>Examples</strong></p>
703
+ <pre><code class="language-feel">exp(5)
704
+ // 148.4131591025766
705
+ </code></pre>
706
+ `},{name:`odd`,type:`function`,params:[{name:`number`}],info:`<p>Returns <code>true</code> if the given value is odd. Otherwise, returns <code>false</code>.</p>
707
+ <p><strong>Function signature</strong></p>
708
+ <pre><code class="language-feel">odd(number: number): boolean
709
+ </code></pre>
710
+ <p><strong>Examples</strong></p>
711
+ <pre><code class="language-feel">odd(5)
712
+ // true
713
+
714
+ odd(2)
715
+ // false
716
+ </code></pre>
717
+ `},{name:`even`,type:`function`,params:[{name:`number`}],info:`<p>Returns <code>true</code> if the given is even. Otherwise, returns <code>false</code>.</p>
718
+ <p><strong>Function signature</strong></p>
719
+ <pre><code class="language-feel">even(number: number): boolean
720
+ </code></pre>
721
+ <p><strong>Examples</strong></p>
722
+ <pre><code class="language-feel">even(5)
723
+ // false
724
+
725
+ even(2)
726
+ // true
727
+ </code></pre>
728
+ `},{name:`before`,type:`function`,params:[{name:`point1`},{name:`point2`}],info:`<p><strong>Function signature</strong></p>
729
+ <pre><code class="language-feel">before(point1: Any, point2: Any): boolean
730
+ </code></pre>
731
+ <p><strong>Examples</strong></p>
732
+ <pre><code class="language-feel">before(1, 10)
733
+ // true
734
+
735
+ before(10, 1)
736
+ // false
737
+ </code></pre>
738
+ `},{name:`before`,type:`function`,params:[{name:`range`},{name:`point`}],info:`<p><strong>Function signature</strong></p>
739
+ <pre><code class="language-feel">before(range: range, point: Any): boolean
740
+ </code></pre>
741
+ <p><strong>Examples</strong></p>
742
+ <pre><code class="language-feel">before([1..5], 10)
743
+ // true
744
+ </code></pre>
745
+ `},{name:`before`,type:`function`,params:[{name:`point`},{name:`range`}],info:`<p><strong>Function signature</strong></p>
746
+ <pre><code class="language-feel">before(point: Any, range: range): boolean
747
+ </code></pre>
748
+ <p><strong>Examples</strong></p>
749
+ <pre><code class="language-feel">before(1, [2..5])
750
+ // true
751
+ </code></pre>
752
+ `},{name:`before`,type:`function`,params:[{name:`range1`},{name:`range2`}],info:`<p><strong>Function signature</strong></p>
753
+ <pre><code class="language-feel">before(range1: range, range2: range): boolean
754
+ </code></pre>
755
+ <p><strong>Examples</strong></p>
756
+ <pre><code class="language-feel">before([1..5], [6..10])
757
+ // true
758
+
759
+ before([1..5),[5..10])
760
+ // true
761
+ </code></pre>
762
+ `},{name:`after`,type:`function`,params:[{name:`point1`},{name:`point2`}],info:`<p><strong>Function signature</strong></p>
763
+ <pre><code class="language-feel">after(point1: Any, point2: Any): boolean
764
+ </code></pre>
765
+ <p><strong>Examples</strong></p>
766
+ <pre><code class="language-feel">after(10, 1)
767
+ // true
768
+
769
+ after(1, 10)
770
+ // false
771
+ </code></pre>
772
+ `},{name:`after`,type:`function`,params:[{name:`range`},{name:`point`}],info:`<p><strong>Function signature</strong></p>
773
+ <pre><code class="language-feel">after(range: range, point: Any): boolean
774
+ </code></pre>
775
+ <p><strong>Examples</strong></p>
776
+ <pre><code class="language-feel">after([1..5], 10)
777
+ // false
778
+ </code></pre>
779
+ `},{name:`after`,type:`function`,params:[{name:`point`},{name:`range`}],info:`<p><strong>Function signature</strong></p>
780
+ <pre><code class="language-feel">after(point: Any, range: range): boolean
781
+ </code></pre>
782
+ <p><strong>Examples</strong></p>
783
+ <pre><code class="language-feel">after(12, [2..5])
784
+ // true
785
+ </code></pre>
786
+ `},{name:`after`,type:`function`,params:[{name:`range1`},{name:`range2`}],info:`<p><strong>Function signature</strong></p>
787
+ <pre><code class="language-feel">after(range1: range, range2: range): boolean
788
+ </code></pre>
789
+ <p><strong>Examples</strong></p>
790
+ <pre><code class="language-feel">after([6..10], [1..5])
791
+ // true
792
+
793
+ after([5..10], [1..5))
794
+ // true
795
+ </code></pre>
796
+ `},{name:`meets`,type:`function`,params:[{name:`range1`},{name:`range2`}],info:`<p><strong>Function signature</strong></p>
797
+ <pre><code class="language-feel">meets(range1: range, range2: range): boolean
798
+ </code></pre>
799
+ <p><strong>Examples</strong></p>
800
+ <pre><code class="language-feel">meets([1..5], [5..10])
801
+ // true
802
+
803
+ meets([1..3], [4..6])
804
+ // false
805
+
806
+ meets([1..3], [3..5])
807
+ // true
808
+
809
+ meets([1..5], (5..8])
810
+ // false
811
+ </code></pre>
812
+ `},{name:`met by`,type:`function`,params:[{name:`range1`},{name:`range2`}],info:`<p><strong>Function signature</strong></p>
813
+ <pre><code class="language-feel">met by(range1: range, range2: range): boolean
814
+ </code></pre>
815
+ <p><strong>Examples</strong></p>
816
+ <pre><code class="language-feel">met by([5..10], [1..5])
817
+ // true
818
+
819
+ met by([3..4], [1..2])
820
+ // false
821
+
822
+ met by([3..5], [1..3])
823
+ // true
824
+
825
+ met by((5..8], [1..5))
826
+ // false
827
+
828
+ met by([5..10], [1..5))
829
+ // false
830
+ </code></pre>
831
+ `},{name:`overlaps`,type:`function`,params:[{name:`range1`},{name:`range2`}],info:`<p><strong>Function signature</strong></p>
832
+ <pre><code class="language-feel">overlaps(range1: range, range2: range): boolean
833
+ </code></pre>
834
+ <p><strong>Examples</strong></p>
835
+ <pre><code class="language-feel">overlaps([5..10], [1..6])
836
+ // true
837
+
838
+ overlaps((3..7], [1..4])
839
+ // true
840
+
841
+ overlaps([1..3], (3..6])
842
+ // false
843
+
844
+ overlaps((5..8], [1..5))
845
+ // false
846
+
847
+ overlaps([4..10], [1..5))
848
+ // true
849
+ </code></pre>
850
+ `},{name:`overlaps before`,type:`function`,params:[{name:`range1`},{name:`range2`}],info:`<p><strong>Function signature</strong></p>
851
+ <pre><code class="language-feel">overlaps before(range1: range, range2: range): boolean
852
+ </code></pre>
853
+ <p><strong>Examples</strong></p>
854
+ <pre><code class="language-feel">overlaps before([1..5], [4..10])
855
+ // true
856
+
857
+ overlaps before([3..4], [1..2])
858
+ // false
859
+
860
+ overlaps before([1..3], (3..5])
861
+ // false
862
+
863
+ overlaps before([1..5), (3..8])
864
+ // true
865
+
866
+ overlaps before([1..5), [5..10])
867
+ // false
868
+ </code></pre>
869
+ `},{name:`overlaps after`,type:`function`,params:[{name:`range1`},{name:`range2`}],info:`<p><strong>Function signature</strong></p>
870
+ <pre><code class="language-feel">overlaps after(range1: range, range2: range): boolean
871
+ </code></pre>
872
+ <p><strong>Examples</strong></p>
873
+ <pre><code class="language-feel">overlaps after([4..10], [1..5])
874
+ // true
875
+
876
+ overlaps after([3..4], [1..2])
877
+ // false
878
+
879
+ overlaps after([3..5], [1..3))
880
+ // false
881
+
882
+ overlaps after((5..8], [1..5))
883
+ // false
884
+
885
+ overlaps after([4..10], [1..5))
886
+ // true
887
+ </code></pre>
888
+ `},{name:`finishes`,type:`function`,params:[{name:`point`},{name:`range`}],info:`<p><strong>Function signature</strong></p>
889
+ <pre><code class="language-feel">finishes(point: Any, range: range): boolean
890
+ </code></pre>
891
+ <p><strong>Examples</strong></p>
892
+ <pre><code class="language-feel">finishes(5, [1..5])
893
+ // true
894
+
895
+ finishes(10, [1..7])
896
+ // false
897
+ </code></pre>
898
+ `},{name:`finishes`,type:`function`,params:[{name:`range1`},{name:`range2`}],info:`<p><strong>Function signature</strong></p>
899
+ <pre><code class="language-feel">finishes(range1: range, range2: range): boolean
900
+ </code></pre>
901
+ <p><strong>Examples</strong></p>
902
+ <pre><code class="language-feel">finishes([3..5], [1..5])
903
+ // true
904
+
905
+ finishes((1..5], [1..5))
906
+ // false
907
+
908
+ finishes([5..10], [1..10))
909
+ // false
910
+ </code></pre>
911
+ `},{name:`finished by`,type:`function`,params:[{name:`range`},{name:`point`}],info:`<p><strong>Function signature</strong></p>
912
+ <pre><code class="language-feel">finished by(range: range, point: Any): boolean
913
+ </code></pre>
914
+ <p><strong>Examples</strong></p>
915
+ <pre><code class="language-feel">finished by([5..10], 10)
916
+ // true
917
+
918
+ finished by([3..4], 2)
919
+ // false
920
+ </code></pre>
921
+ `},{name:`finished by`,type:`function`,params:[{name:`range1`},{name:`range2`}],info:`<p><strong>Function signature</strong></p>
922
+ <pre><code class="language-feel">finished by(range1: range, range2: range): boolean
923
+ </code></pre>
924
+ <p><strong>Examples</strong></p>
925
+ <pre><code class="language-feel">finished by([1..5], [3..5])
926
+ // true
927
+
928
+ finished by((5..8], [1..5))
929
+ // false
930
+
931
+ finished by([5..10], (1..10))
932
+ // false
933
+ </code></pre>
934
+ `},{name:`includes`,type:`function`,params:[{name:`range`},{name:`point`}],info:`<p><strong>Function signature</strong></p>
935
+ <pre><code class="language-feel">includes(range: range, point: Any): boolean
936
+ </code></pre>
937
+ <p><strong>Examples</strong></p>
938
+ <pre><code class="language-feel">includes([5..10], 6)
939
+ // true
940
+
941
+ includes([3..4], 5)
942
+ // false
943
+ </code></pre>
944
+ `},{name:`includes`,type:`function`,params:[{name:`range1`},{name:`range2`}],info:`<p><strong>Function signature</strong></p>
945
+ <pre><code class="language-feel">includes(range1: range, range2: range): boolean
946
+ </code></pre>
947
+ <p><strong>Examples</strong></p>
948
+ <pre><code class="language-feel">includes([1..10], [4..6])
949
+ // true
950
+
951
+ includes((5..8], [1..5))
952
+ // false
953
+
954
+ includes([1..10], [1..5))
955
+ // true
956
+ </code></pre>
957
+ `},{name:`during`,type:`function`,params:[{name:`point`},{name:`range`}],info:`<p><strong>Function signature</strong></p>
958
+ <pre><code class="language-feel">during(point: Any, range: range): boolean
959
+ </code></pre>
960
+ <p><strong>Examples</strong></p>
961
+ <pre><code class="language-feel">during(5, [1..10])
962
+ // true
963
+
964
+ during(12, [1..10])
965
+ // false
966
+
967
+ during(1, (1..10])
968
+ // false
969
+ </code></pre>
970
+ `},{name:`during`,type:`function`,params:[{name:`range1`},{name:`range2`}],info:`<p><strong>Function signature</strong></p>
971
+ <pre><code class="language-feel">during(range1: range, range2: range): boolean
972
+ </code></pre>
973
+ <p><strong>Examples</strong></p>
974
+ <pre><code class="language-feel">during([4..6], [1..10))
975
+ // true
976
+
977
+ during((1..5], (1..10])
978
+ // true
979
+ </code></pre>
980
+ `},{name:`starts`,type:`function`,params:[{name:`point`},{name:`range`}],info:`<p><strong>Function signature</strong></p>
981
+ <pre><code class="language-feel">starts(point: Any, range: range): boolean
982
+ </code></pre>
983
+ <p><strong>Examples</strong></p>
984
+ <pre><code class="language-feel">starts(1, [1..5])
985
+ // true
986
+
987
+ starts(1, (1..8])
988
+ // false
989
+ </code></pre>
990
+ `},{name:`starts`,type:`function`,params:[{name:`range1`},{name:`range2`}],info:`<p><strong>Function signature</strong></p>
991
+ <pre><code class="language-feel">starts(range1: range, range2: range): boolean
992
+ </code></pre>
993
+ <p><strong>Examples</strong></p>
994
+ <pre><code class="language-feel">starts((1..5], [1..5])
995
+ // false
996
+
997
+ starts([1..10], [1..5])
998
+ // false
999
+
1000
+ starts((1..5), (1..10))
1001
+ // true
1002
+ </code></pre>
1003
+ `},{name:`started by`,type:`function`,params:[{name:`range`},{name:`point`}],info:`<p><strong>Function signature</strong></p>
1004
+ <pre><code class="language-feel">started by(range: range, point: Any): boolean
1005
+ </code></pre>
1006
+ <p><strong>Examples</strong></p>
1007
+ <pre><code class="language-feel">started by([1..10], 1)
1008
+ // true
1009
+
1010
+ started by((1..10], 1)
1011
+ // false
1012
+ </code></pre>
1013
+ `},{name:`started by`,type:`function`,params:[{name:`range1`},{name:`range2`}],info:`<p><strong>Function signature</strong></p>
1014
+ <pre><code class="language-feel">started by(range1: range, range2: range): boolean
1015
+ </code></pre>
1016
+ <p><strong>Examples</strong></p>
1017
+ <pre><code class="language-feel">started by([1..10], [1..5])
1018
+ // true
1019
+
1020
+ started by((1..10], [1..5))
1021
+ // false
1022
+
1023
+ started by([1..10], [1..10))
1024
+ // true
1025
+ </code></pre>
1026
+ `},{name:`coincides`,type:`function`,params:[{name:`point1`},{name:`point2`}],info:`<p><strong>Function signature</strong></p>
1027
+ <pre><code class="language-feel">coincides(point1: Any, point2: Any): boolean
1028
+ </code></pre>
1029
+ <p><strong>Examples</strong></p>
1030
+ <pre><code class="language-feel">coincides(5, 5)
1031
+ // true
1032
+
1033
+ coincides(3, 4)
1034
+ // false
1035
+ </code></pre>
1036
+ `},{name:`coincides`,type:`function`,params:[{name:`range1`},{name:`range2`}],info:`<p><strong>Function signature</strong></p>
1037
+ <pre><code class="language-feel">coincides(range1: range, range2: range): boolean
1038
+ </code></pre>
1039
+ <p><strong>Examples</strong></p>
1040
+ <pre><code class="language-feel">coincides([1..5], [1..5])
1041
+ // true
1042
+
1043
+ coincides((1..5], [1..5))
1044
+ // false
1045
+
1046
+ coincides([1..5], [2..6])
1047
+ // false
1048
+ </code></pre>
1049
+ `},{name:`substring`,type:`function`,params:[{name:`string`},{name:`start position`}],info:`<p>Returns a substring of the given value starting at <code>start position</code>.</p>
1050
+ <p><strong>Function signature</strong></p>
1051
+ <pre><code class="language-feel">substring(string: string, start position: number): string
1052
+ </code></pre>
1053
+ <p>The <code>start position</code> starts at the index <code>1</code>. The last position is <code>-1</code>.</p>
1054
+ <p><strong>Examples</strong></p>
1055
+ <pre><code class="language-feel">substring(&quot;foobar&quot;, 3)
1056
+ // &quot;obar&quot;
1057
+
1058
+ substring(&quot;foobar&quot;, -2)
1059
+ // &quot;ar&quot;
1060
+ </code></pre>
1061
+ `},{name:`substring`,type:`function`,params:[{name:`string`},{name:`start position`},{name:`length`}],info:`<p>Returns a substring of the given value, starting at <code>start position</code> with the given <code>length</code>. If <code>length</code> is greater than
1062
+ the remaining characters of the value, it returns all characters from <code>start position</code> until the end.</p>
1063
+ <p><strong>Function signature</strong></p>
1064
+ <pre><code class="language-feel">substring(string: string, start position: number, length: number): string
1065
+ </code></pre>
1066
+ <p>The <code>start position</code> starts at the index <code>1</code>. The last position is <code>-1</code>.</p>
1067
+ <p><strong>Examples</strong></p>
1068
+ <pre><code class="language-feel">substring(&quot;foobar&quot;, 3, 3)
1069
+ // &quot;oba&quot;
1070
+
1071
+ substring(&quot;foobar&quot;, -3, 2)
1072
+ // &quot;ba&quot;
1073
+
1074
+ substring(&quot;foobar&quot;, 3, 10)
1075
+ // &quot;obar&quot;
1076
+ </code></pre>
1077
+ `},{name:`string length`,type:`function`,params:[{name:`string`}],info:`<p>Returns the number of characters in the given value.</p>
1078
+ <p><strong>Function signature</strong></p>
1079
+ <pre><code class="language-feel">string length(string: string): number
1080
+ </code></pre>
1081
+ <p><strong>Examples</strong></p>
1082
+ <pre><code class="language-feel">string length(&quot;foo&quot;)
1083
+ // 3
1084
+ </code></pre>
1085
+ `},{name:`upper case`,type:`function`,params:[{name:`string`}],info:`<p>Returns the given value with all characters are uppercase.</p>
1086
+ <p><strong>Function signature</strong></p>
1087
+ <pre><code class="language-feel">upper case(string: string): string
1088
+ </code></pre>
1089
+ <p><strong>Examples</strong></p>
1090
+ <pre><code class="language-feel">upper case(&quot;aBc4&quot;)
1091
+ // &quot;ABC4&quot;
1092
+ </code></pre>
1093
+ `},{name:`lower case`,type:`function`,params:[{name:`string`}],info:`<p>Returns the given value with all characters are lowercase.</p>
1094
+ <p><strong>Function signature</strong></p>
1095
+ <pre><code class="language-feel">lower case(string: string): string
1096
+ </code></pre>
1097
+ <p><strong>Examples</strong></p>
1098
+ <pre><code class="language-feel">lower case(&quot;aBc4&quot;)
1099
+ // &quot;abc4&quot;
1100
+ </code></pre>
1101
+ `},{name:`substring before`,type:`function`,params:[{name:`string`},{name:`match`}],info:`<p>Returns a substring of the given value that contains all characters before <code>match</code>.</p>
1102
+ <p><strong>Function signature</strong></p>
1103
+ <pre><code class="language-feel">substring before(string: string, match: string): string
1104
+ </code></pre>
1105
+ <p><strong>Examples</strong></p>
1106
+ <pre><code class="language-feel">substring before(&quot;foobar&quot;, &quot;bar&quot;)
1107
+ // &quot;foo&quot;
1108
+ </code></pre>
1109
+ `},{name:`substring after`,type:`function`,params:[{name:`string`},{name:`match`}],info:`<p>Returns a substring of the given value that contains all characters after <code>match</code>.</p>
1110
+ <p><strong>Function signature</strong></p>
1111
+ <pre><code class="language-feel">substring after(string: string, match: string): string
1112
+ </code></pre>
1113
+ <p><strong>Examples</strong></p>
1114
+ <pre><code class="language-feel">substring after(&quot;foobar&quot;, &quot;ob&quot;)
1115
+ // &quot;ar&quot;
1116
+ </code></pre>
1117
+ `},{name:`contains`,type:`function`,params:[{name:`string`},{name:`match`}],info:`<p>Returns <code>true</code> if the given value contains the substring <code>match</code>. Otherwise, returns <code>false</code>.</p>
1118
+ <p><strong>Function signature</strong></p>
1119
+ <pre><code class="language-feel">contains(string: string, match: string): boolean
1120
+ </code></pre>
1121
+ <p><strong>Examples</strong></p>
1122
+ <pre><code class="language-feel">contains(&quot;foobar&quot;, &quot;of&quot;)
1123
+ // false
1124
+ </code></pre>
1125
+ `},{name:`starts with`,type:`function`,params:[{name:`string`},{name:`match`}],info:`<p>Returns <code>true</code> if the given value starts with the substring <code>match</code>. Otherwise, returns <code>false</code>.</p>
1126
+ <p><strong>Function signature</strong></p>
1127
+ <pre><code class="language-feel">starts with(string: string, match: string): boolean
1128
+ </code></pre>
1129
+ <p><strong>Examples</strong></p>
1130
+ <pre><code class="language-feel">starts with(&quot;foobar&quot;, &quot;fo&quot;)
1131
+ // true
1132
+ </code></pre>
1133
+ `},{name:`ends with`,type:`function`,params:[{name:`string`},{name:`match`}],info:`<p>Returns <code>true</code> if the given value ends with the substring <code>match</code>. Otherwise, returns <code>false</code>.</p>
1134
+ <p><strong>Function signature</strong></p>
1135
+ <pre><code class="language-feel">ends with(string: string, match: string): boolean
1136
+ </code></pre>
1137
+ <p><strong>Examples</strong></p>
1138
+ <pre><code class="language-feel">ends with(&quot;foobar&quot;, &quot;r&quot;)
1139
+ // true
1140
+ </code></pre>
1141
+ `},{name:`matches`,type:`function`,params:[{name:`input`},{name:`pattern`}],info:`<p>Returns <code>true</code> if the given value matches the <code>pattern</code>. Otherwise, returns <code>false</code>.</p>
1142
+ <p><strong>Function signature</strong></p>
1143
+ <pre><code class="language-feel">matches(input: string, pattern: string): boolean
1144
+ </code></pre>
1145
+ <p>The <code>pattern</code> is a string that contains a regular expression.</p>
1146
+ <p><strong>Examples</strong></p>
1147
+ <pre><code class="language-feel">matches(&quot;foobar&quot;, &quot;^fo*bar&quot;)
1148
+ // true
1149
+ </code></pre>
1150
+ `},{name:`matches`,type:`function`,params:[{name:`input`},{name:`pattern`},{name:`flags`}],info:`<p>Returns <code>true</code> if the given value matches the <code>pattern</code>. Otherwise, returns <code>false</code>.</p>
1151
+ <p><strong>Function signature</strong></p>
1152
+ <pre><code class="language-feel">matches(input: string, pattern: string, flags: string): boolean
1153
+ </code></pre>
1154
+ <p>The <code>pattern</code> is a string that contains a regular expression.</p>
1155
+ <p>The <code>flags</code> can contain one or more of the following characters:</p>
1156
+ <ul>
1157
+ <li><code>s</code> (dot-all)</li>
1158
+ <li><code>m</code> (multi-line)</li>
1159
+ <li><code>i</code> (case insensitive)</li>
1160
+ <li><code>x</code> (comments)</li>
1161
+ </ul>
1162
+ <p><strong>Examples</strong></p>
1163
+ <pre><code class="language-feel">matches(&quot;FooBar&quot;, &quot;foo&quot;, &quot;i&quot;)
1164
+ // true
1165
+ </code></pre>
1166
+ `},{name:`replace`,type:`function`,params:[{name:`input`},{name:`pattern`},{name:`replacement`}],info:`<p>Returns the resulting string after replacing all occurrences of <code>pattern</code> with <code>replacement</code>.</p>
1167
+ <p><strong>Function signature</strong></p>
1168
+ <pre><code class="language-feel">replace(input: string, pattern: string, replacement: string): string
1169
+ </code></pre>
1170
+ <p>The <code>pattern</code> is a string that contains a regular expression.</p>
1171
+ <p>The <code>replacement</code> can access the match groups by using <code>$</code> and the number of the group, for example,
1172
+ <code>$1</code> to access the first group.</p>
1173
+ <p><strong>Examples</strong></p>
1174
+ <pre><code class="language-feel">replace(&quot;abcd&quot;, &quot;(ab)|(a)&quot;, &quot;[1=$1][2=$2]&quot;)
1175
+ // &quot;[1=ab][2=]cd&quot;
1176
+
1177
+ replace(&quot;0123456789&quot;, &quot;(\\d{3})(\\d{3})(\\d{4})&quot;, &quot;($1) $2-$3&quot;)
1178
+ // &quot;(012) 345-6789&quot;
1179
+ </code></pre>
1180
+ `},{name:`replace`,type:`function`,params:[{name:`input`},{name:`pattern`},{name:`replacement`},{name:`flags`}],info:`<p>Returns the resulting string after replacing all occurrences of <code>pattern</code> with <code>replacement</code>.</p>
1181
+ <p><strong>Function signature</strong></p>
1182
+ <pre><code class="language-feel">replace(input: string, pattern: string, replacement: string, flags: string): string
1183
+ </code></pre>
1184
+ <p>The <code>pattern</code> is a string that contains a regular expression.</p>
1185
+ <p>The <code>replacement</code> can access the match groups by using <code>$</code> and the number of the group, for example,
1186
+ <code>$1</code> to access the first group.</p>
1187
+ <p>The <code>flags</code> can contain one or more of the following characters:</p>
1188
+ <ul>
1189
+ <li><code>s</code> (dot-all)</li>
1190
+ <li><code>m</code> (multi-line)</li>
1191
+ <li><code>i</code> (case insensitive)</li>
1192
+ <li><code>x</code> (comments)</li>
1193
+ </ul>
1194
+ <p><strong>Examples</strong></p>
1195
+ <pre><code class="language-feel">replace(&quot;How do you feel?&quot;, &quot;Feel&quot;, &quot;FEEL&quot;, &quot;i&quot;)
1196
+ // &quot;How do you FEEL?&quot;
1197
+ </code></pre>
1198
+ `},{name:`split`,type:`function`,params:[{name:`string`},{name:`delimiter`}],info:`<p>Splits the given value into a list of substrings, breaking at each occurrence of the <code>delimiter</code> pattern.</p>
1199
+ <p><strong>Function signature</strong></p>
1200
+ <pre><code class="language-feel">split(string: string, delimiter: string): list&lt;string&gt;
1201
+ </code></pre>
1202
+ <p>The <code>delimiter</code> is a string that contains a regular expression.</p>
1203
+ <p><strong>Examples</strong></p>
1204
+ <pre><code class="language-feel">split(&quot;John Doe&quot;, &quot;\\s&quot; )
1205
+ // [&quot;John&quot;, &quot;Doe&quot;]
1206
+
1207
+ split(&quot;a;b;c;;&quot;, &quot;;&quot;)
1208
+ // [&quot;a&quot;, &quot;b&quot;, &quot;c&quot;, &quot;&quot;, &quot;&quot;]
1209
+ </code></pre>
1210
+ `},{name:`now`,type:`function`,params:[],info:`<p>Returns the current date and time including the timezone.</p>
1211
+ <p><strong>Function signature</strong></p>
1212
+ <pre><code class="language-feel">now(): date and time
1213
+ </code></pre>
1214
+ <p><strong>Examples</strong></p>
1215
+ <pre><code class="language-feel">now()
1216
+ // date and time(&quot;2020-07-31T14:27:30@Europe/Berlin&quot;)
1217
+ </code></pre>
1218
+ <p>In Camunda, <code>now()</code> uses the default time zone of the cluster. FEEL shows the zone ID after <code>@</code>, for example <code>@Europe/Berlin</code>. If you store the result in a variable, the zone ID is written in brackets after the offset instead, for example <code>2026-09-29T12:31:01.641Z[GMT]</code>, which some ISO 8601 parsers reject. To store the value without the zone ID, convert it to a fixed offset. See <a href="https://docs.camunda.io/components/concepts/variables#variable-values">variable values</a>.</p>
1219
+ <pre><code class="language-feel">date and time(now(), &quot;Z&quot;)
1220
+ // date and time(&quot;2020-07-31T12:27:30Z&quot;)
1221
+ </code></pre>
1222
+ `},{name:`today`,type:`function`,params:[],info:`<p>Returns the current date.</p>
1223
+ <p><strong>Function signature</strong></p>
1224
+ <pre><code class="language-feel">today(): date
1225
+ </code></pre>
1226
+ <p><strong>Examples</strong></p>
1227
+ <pre><code class="language-feel">today()
1228
+ // date(&quot;2020-07-31&quot;)
1229
+ </code></pre>
1230
+ `},{name:`day of week`,type:`function`,params:[{name:`date`}],info:`<p>Returns the day of the week according to the Gregorian calendar. Note that it always returns the English name of the day.</p>
1231
+ <p><strong>Function signature</strong></p>
1232
+ <pre><code class="language-feel">day of week(date: date): string
1233
+ </code></pre>
1234
+ <pre><code class="language-feel">day of week(date: date and time): string
1235
+ </code></pre>
1236
+ <p><strong>Examples</strong></p>
1237
+ <pre><code class="language-feel">day of week(date(&quot;2019-09-17&quot;))
1238
+ // &quot;Tuesday&quot;
1239
+
1240
+ day of week(date and time(&quot;2019-09-17T12:00:00&quot;))
1241
+ // &quot;Tuesday&quot;
1242
+ </code></pre>
1243
+ `},{name:`day of year`,type:`function`,params:[{name:`date`}],info:`<p>Returns the Gregorian number of the day within the year.</p>
1244
+ <p><strong>Function signature</strong></p>
1245
+ <pre><code class="language-feel">day of year(date: date): number
1246
+ </code></pre>
1247
+ <pre><code class="language-feel">day of year(date: date and time): number
1248
+ </code></pre>
1249
+ <p><strong>Examples</strong></p>
1250
+ <pre><code class="language-feel">day of year(date(&quot;2019-09-17&quot;))
1251
+ // 260
1252
+
1253
+ day of year(date and time(&quot;2019-09-17T12:00:00&quot;))
1254
+ // 260
1255
+ </code></pre>
1256
+ `},{name:`week of year`,type:`function`,params:[{name:`date`}],info:`<p>Returns the Gregorian number of the week within the year, according to ISO 8601.</p>
1257
+ <p><strong>Function signature</strong></p>
1258
+ <pre><code class="language-feel">week of year(date: date): number
1259
+ </code></pre>
1260
+ <pre><code class="language-feel">week of year(date: date and time): number
1261
+ </code></pre>
1262
+ <p><strong>Examples</strong></p>
1263
+ <pre><code class="language-feel">week of year(date(&quot;2019-09-17&quot;))
1264
+ // 38
1265
+
1266
+ week of year(date and time(&quot;2019-09-17T12:00:00&quot;))
1267
+ // 38
1268
+ </code></pre>
1269
+ `},{name:`month of year`,type:`function`,params:[{name:`date`}],info:`<p>Returns the month of the year according to the Gregorian calendar. Note that it always returns the English name of the month.</p>
1270
+ <p><strong>Function signature</strong></p>
1271
+ <pre><code class="language-feel">month of year(date: date): string
1272
+ </code></pre>
1273
+ <pre><code class="language-feel">month of year(date: date and time): string
1274
+ </code></pre>
1275
+ <p><strong>Examples</strong></p>
1276
+ <pre><code class="language-feel">month of year(date(&quot;2019-09-17&quot;))
1277
+ // &quot;September&quot;
1278
+
1279
+ month of year(date and time(&quot;2019-09-17T12:00:00&quot;))
1280
+ // &quot;September&quot;
1281
+ </code></pre>
1282
+ `},{name:`abs`,type:`function`,params:[{name:`n`}],info:`<p>Returns the absolute value of a given duration.</p>
1283
+ <p><strong>Function signature</strong></p>
1284
+ <pre><code class="language-feel">abs(n: days and time duration): days and time duration
1285
+ </code></pre>
1286
+ <pre><code class="language-feel">abs(n: years and months duration): years and months duration
1287
+ </code></pre>
1288
+ <p><strong>Examples</strong></p>
1289
+ <pre><code class="language-feel">abs(duration(&quot;-PT5H&quot;))
1290
+ // &quot;duration(&quot;PT5H&quot;)&quot;
1291
+
1292
+ abs(duration(&quot;PT5H&quot;))
1293
+ // &quot;duration(&quot;PT5H&quot;)&quot;
1294
+
1295
+ abs(duration(&quot;-P2M&quot;))
1296
+ // duration(&quot;P2M&quot;)
1297
+ </code></pre>
1298
+ `}],Hi=[{name:`fromAi`,type:`function`,params:[{name:`value`}],info:`<p><em>Camunda Extension</em></p>
1299
+ <p>Returns the unmodified <code>value</code> parameter, which must be a FEEL variable reference in the form <code>toolCall.&lt;parameterName&gt;</code> (for example, <code>toolCall.userId</code>).</p>
1300
+ <ul>
1301
+ <li>The purpose of this function is solely to tag the value as being generated by an AI integration.</li>
1302
+ <li>The actual handling is not performed by the FEEL engine, but by a custom integration such as a connector or a job worker.</li>
1303
+ </ul>
1304
+ <p>The main use case of this function is for <a href="https://docs.camunda.io/docs/components/connectors/out-of-the-box-connectors/agentic-ai-aiagent-tool-definitions">tool definitions</a> used by the <a href="https://docs.camunda.io/docs/components/connectors/out-of-the-box-connectors/agentic-ai-aiagent">AI Agent connector</a>.</p>
1305
+ <p>See the following function overloads for additional function parameters.</p>
1306
+ <p><strong>Function signature</strong></p>
1307
+ <pre><code class="language-feel">fromAi(value: Any): Any
1308
+ </code></pre>
1309
+ <p><strong>Examples</strong></p>
1310
+ <pre><code class="language-feel">fromAi(toolCall.searchQuery)
1311
+ // toolCall.searchQuery contents
1312
+
1313
+ fromAi(toolCall.userId)
1314
+ // toolCall.userId contents
1315
+ </code></pre>
1316
+ `,engines:{camunda:`>=8.8`}},{name:`fromAi`,type:`function`,params:[{name:`value`},{name:`description`}],info:`<p><em>Camunda Extension</em></p>
1317
+ <p>Returns the unmodified <code>value</code> parameter, which must be a FEEL variable reference in the form <code>toolCall.&lt;parameterName&gt;</code> (for example, <code>toolCall.userId</code>).</p>
1318
+ <p>In addition to the previous overload, it also accepts an optional <code>description</code> parameter to provide a textual description of the value. The description must be <code>null</code> or a string constant.</p>
1319
+ <p><strong>Function signature</strong></p>
1320
+ <pre><code class="language-feel">fromAi(value: Any, description: string): Any
1321
+ </code></pre>
1322
+ <p><strong>Examples</strong></p>
1323
+ <pre><code class="language-feel">fromAi(toolCall.searchQuery, &quot;The search query used to find the best match.&quot;)
1324
+ // toolCall.searchQuery contents
1325
+
1326
+ fromAi(toolCall.searchQuery, null)
1327
+ // toolCall.searchQuery contents
1328
+ </code></pre>
1329
+ `,engines:{camunda:`>=8.8`}},{name:`fromAi`,type:`function`,params:[{name:`value`},{name:`description`},{name:`type`}],info:`<p><em>Camunda Extension</em></p>
1330
+ <p>Returns the unmodified <code>value</code> parameter, which must be a FEEL variable reference in the form <code>toolCall.&lt;parameterName&gt;</code> (for example, <code>toolCall.userId</code>).</p>
1331
+ <p>In addition to the previous overload, it also accepts an optional <code>type</code> parameter to provide type information about the value. The type must be <code>null</code> or a string constant.</p>
1332
+ <p><strong>Function signature</strong></p>
1333
+ <pre><code class="language-feel">fromAi(value: Any, description: string, type: string): Any
1334
+ </code></pre>
1335
+ <p><strong>Examples</strong></p>
1336
+ <pre><code class="language-feel">fromAi(toolCall.searchQuery, &quot;The search query used to find the best match.&quot;, &quot;string&quot;)
1337
+ // toolCall.searchQuery contents
1338
+
1339
+ fromAi(toolCall.userId, &quot;The user&#39;s ID&quot;, &quot;number&quot;)
1340
+ // toolCall.userId contents
1341
+
1342
+ fromAi(toolCall.userId, null, &quot;number&quot;)
1343
+ // toolCall.userId contents
1344
+
1345
+ fromAi(value: toolCall.userId, type: &quot;number&quot;)
1346
+ // toolCall.userId contents
1347
+ </code></pre>
1348
+ `,engines:{camunda:`>=8.8`}},{name:`fromAi`,type:`function`,params:[{name:`value`},{name:`description`},{name:`type`},{name:`schema`}],info:`<p><em>Camunda Extension</em></p>
1349
+ <p>Returns the unmodified <code>value</code> parameter, which must be a FEEL variable reference in the form <code>toolCall.&lt;parameterName&gt;</code> (for example, <code>toolCall.userId</code>).</p>
1350
+ <p>In addition to the previous overload, it also accepts an optional <code>schema</code> parameter to provide a (partial) <a href="https://json-schema.org/">JSON schema</a> for the value.</p>
1351
+ <ul>
1352
+ <li>The schema must be <code>null</code> or a context (map) containing only constant values. For example, function calls within the schema are not supported.</li>
1353
+ <li>The schema is not validated by the FEEL engine but might be by a custom integration consuming the information.</li>
1354
+ <li>From the engine side it is possible to specify both a <code>type</code> and a <code>schema</code>, and it depends on the integration as to which value takes precedence. The <a href="https://docs.camunda.io/docs/components/connectors/out-of-the-box-connectors/agentic-ai-aiagent">AI Agent connector</a> will override any type specified in the schema if the <code>type</code> parameter is also provided.</li>
1355
+ </ul>
1356
+ <p><strong>Function signature</strong></p>
1357
+ <pre><code class="language-feel">fromAi(value: Any, description: string, type: string, schema: context): Any
1358
+ </code></pre>
1359
+ <p><strong>Examples</strong></p>
1360
+ <pre><code class="language-feel">fromAi(toolCall.documentType, &quot;The document type to provide&quot;, &quot;string&quot;, {
1361
+ enum: [&quot;invoice&quot;, &quot;receipt&quot;, &quot;contract&quot;]
1362
+ })
1363
+ // toolCall.documentType contents
1364
+
1365
+ fromAi(value: toolCall.documentType, description: &quot;The document type to provide&quot;, schema: {
1366
+ type: &quot;string&quot;,
1367
+ enum: [&quot;invoice&quot;, &quot;receipt&quot;, &quot;contract&quot;]
1368
+ })
1369
+ // toolCall.documentType contents
1370
+
1371
+ fromAi(toolCall.tags, &quot;Tags to apply to the blog post&quot;, &quot;array&quot;, {
1372
+ items: {
1373
+ type: &quot;string&quot;
1374
+ }
1375
+ })
1376
+ // toolCall.tags contents
1377
+ </code></pre>
1378
+ `,engines:{camunda:`>=8.8`}},{name:`fromAi`,type:`function`,params:[{name:`value`},{name:`description`},{name:`type`},{name:`schema`},{name:`options`}],info:`<p><em>Camunda Extension</em></p>
1379
+ <p>Returns the unmodified <code>value</code> parameter, which must be a FEEL variable reference in the form <code>toolCall.&lt;parameterName&gt;</code> (for example, <code>toolCall.userId</code>).</p>
1380
+ <p>In addition to the previous overload, it also accepts an optional <code>options</code> parameter to provide additional options for the integration handling the value definition.</p>
1381
+ <ul>
1382
+ <li>The options parameter must be <code>null</code> or a context (map) containing only constant values. For example, function calls within options are not supported.</li>
1383
+ </ul>
1384
+ <p><strong>Function signature</strong></p>
1385
+ <pre><code class="language-feel">fromAi(value: Any, description: string, type: string, schema: context, options: context): Any
1386
+ </code></pre>
1387
+ <p><strong>Examples</strong></p>
1388
+ <pre><code class="language-feel">fromAi(toolCall.documentType, &quot;The document type to provide&quot;, &quot;string&quot;, null, {
1389
+ required: false
1390
+ })
1391
+ // toolCall.documentType contents
1392
+
1393
+ fromAi(value: toolCall.documentType, options: {
1394
+ required: false
1395
+ })
1396
+ // toolCall.documentType contents
1397
+ </code></pre>
1398
+ `,engines:{camunda:`>=8.8`}},{name:`is defined`,type:`function`,params:[{name:`value`}],info:`<p><em>Camunda Extension</em></p>
1399
+ <p>Checks if a given value is not <code>null</code>. If the value is <code>null</code> then the function returns <code>false</code>.
1400
+ Otherwise, the function returns <code>true</code>.</p>
1401
+ <p>The function requires one argument. Calling <code>is defined()</code> without an argument is invalid.</p>
1402
+ <p><strong>Function signature</strong></p>
1403
+ <pre><code class="language-feel">is defined(value: Any): boolean
1404
+ </code></pre>
1405
+ <p><strong>Examples</strong></p>
1406
+ <pre><code class="language-feel">is defined(1)
1407
+ // true
1408
+
1409
+ is defined(null)
1410
+ // false
1411
+
1412
+ is defined(x)
1413
+ // false - if no variable &quot;x&quot; exists
1414
+
1415
+ is defined(x.y)
1416
+ // false - if no variable &quot;x&quot; exists or it doesn&#39;t have a property &quot;y&quot;
1417
+
1418
+ is defined()
1419
+ // error - expected one argument
1420
+ </code></pre>
1421
+ <p>:::caution Breaking change</p>
1422
+ <p>This function worked differently in previous versions. It returned <code>true</code> if the value was <code>null</code>.
1423
+ Since this version, the function returns <code>false</code> if the value is <code>null</code>.</p>
1424
+ <p>:::</p>
1425
+ `},{name:`get or else`,type:`function`,params:[{name:`value`},{name:`default`}],info:`<p><em>Camunda Extension</em></p>
1426
+ <p>Return the provided value parameter if not <code>null</code>, otherwise return the default parameter</p>
1427
+ <p><strong>Function signature</strong></p>
1428
+ <pre><code class="language-feel">get or else(value: Any, default: Any): Any
1429
+ </code></pre>
1430
+ <p><strong>Examples</strong></p>
1431
+ <pre><code class="language-feel">get or else(&quot;this&quot;, &quot;default&quot;)
1432
+ // &quot;this&quot;
1433
+
1434
+ get or else(null, &quot;default&quot;)
1435
+ // &quot;default&quot;
1436
+
1437
+ get or else(null, null)
1438
+ // null
1439
+ </code></pre>
1440
+ `,engines:{camunda:`>=8.3`}},{name:`assert`,type:`function`,params:[{name:`value`},{name:`condition`}],info:`<p><em>Camunda Extension</em></p>
1441
+ <p>Verify that the given condition is met. If the condition is <code>true</code>, the function returns the value.
1442
+ Otherwise, the evaluation fails with an error.</p>
1443
+ <p><strong>Function signature</strong></p>
1444
+ <pre><code class="language-feel">assert(value: Any, condition: Any)
1445
+ </code></pre>
1446
+ <p><strong>Examples</strong></p>
1447
+ <pre><code class="language-feel">assert(x, x != null)
1448
+ // &quot;value&quot; - if x is &quot;value&quot;
1449
+ // error - if x is null or doesn&#39;t exist
1450
+
1451
+ assert(x, x &gt;= 0)
1452
+ // 4 - if x is 4
1453
+ // error - if x is less than zero
1454
+ </code></pre>
1455
+ `,engines:{camunda:`>=8.3`}},{name:`assert`,type:`function`,params:[{name:`value`},{name:`condition`},{name:`cause`}],info:`<p><em>Camunda Extension</em></p>
1456
+ <p>Verify that the given condition is met. If the condition is <code>true</code>, the function returns the value.
1457
+ Otherwise, the evaluation fails with an error containing the given message.</p>
1458
+ <p><strong>Function signature</strong></p>
1459
+ <pre><code class="language-feel">assert(value: Any, condition: Any, cause: String)
1460
+ </code></pre>
1461
+ <p><strong>Examples</strong></p>
1462
+ <pre><code class="language-feel">assert(x, x != null, &quot;&#39;x&#39; should not be null&quot;)
1463
+ // &quot;value&quot; - if x is &quot;value&quot;
1464
+ // error(&#39;x&#39; should not be null) - if x is null or doesn&#39;t exist
1465
+
1466
+ assert(x, x &gt;= 0, &quot;&#39;x&#39; should be positive&quot;)
1467
+ // 4 - if x is 4
1468
+ // error(&#39;x&#39; should be positive) - if x is less than zero
1469
+ </code></pre>
1470
+ `,engines:{camunda:`>=8.3`}},{name:`get value`,type:`function`,params:[{name:`context`},{name:`keys`}],info:`<p><em>Camunda Extension</em></p>
1471
+ <p>Returns the value of the context entry for a context path defined by the given keys.</p>
1472
+ <p>If <code>keys</code> contains the keys <code>[k1, k2]</code> then it returns the value at the nested entry <code>k1.k2</code> of the context.</p>
1473
+ <p>If <code>keys</code> are empty or the nested entry defined by the keys doesn&#39;t exist in the context, it returns <code>null</code>.</p>
1474
+ <p><strong>Function signature</strong></p>
1475
+ <pre><code class="language-feel">get value(context: context, keys: list&lt;string&gt;): Any
1476
+ </code></pre>
1477
+ <p><strong>Examples</strong></p>
1478
+ <pre><code class="language-feel">get value({x:1, y: {z:0}}, [&quot;y&quot;, &quot;z&quot;])
1479
+ // 0
1480
+
1481
+ get value({x: {y: {z:0}}}, [&quot;x&quot;, &quot;y&quot;])
1482
+ // {z:0}
1483
+
1484
+ get value({a: {b: 3}}, [&quot;b&quot;])
1485
+ // null
1486
+ </code></pre>
1487
+ `},{name:`context put`,type:`function`,params:[{name:`context`},{name:`key`},{name:`value`}],info:`<p>Adds a new entry with the given key and value to the context. Returns a new context that includes the entry.</p>
1488
+ <p>If an entry for the same key already exists in the context, it overrides the value.</p>
1489
+ <p><strong>Function signature</strong></p>
1490
+ <pre><code class="language-feel">context put(context: context, key: string, value: Any): context
1491
+ </code></pre>
1492
+ <p><strong>Examples</strong></p>
1493
+ <pre><code class="language-feel">context put({x:1}, &quot;y&quot;, 2)
1494
+ // {x:1, y:2}
1495
+ </code></pre>
1496
+ <p>:::info
1497
+ The function <code>context put()</code> replaced the previous function <code>put()</code> (Camunda Extension). The
1498
+ previous function is deprecated and should not be used anymore.
1499
+ :::</p>
1500
+ `},{name:`context merge`,type:`function`,params:[{name:`contexts`}],info:`<p>Union the given contexts. Returns a new context that includes all entries of the given contexts.</p>
1501
+ <p>If an entry for the same key already exists in a context, it overrides the value. The entries are overridden in the same order as in the list of contexts.</p>
1502
+ <p><strong>Function signature</strong></p>
1503
+ <pre><code class="language-feel">context merge(contexts: list&lt;context&gt;): context
1504
+ </code></pre>
1505
+ <p><strong>Examples</strong></p>
1506
+ <pre><code class="language-feel">context merge([{x:1}, {y:2}])
1507
+ // {x:1, y:2}
1508
+
1509
+ context merge([{x:1, y: 0}, {y:2}])
1510
+ // {x:1, y:2}
1511
+ </code></pre>
1512
+ <p>:::info
1513
+ The function <code>context merge()</code> replaced the previous function <code>put all()</code> (Camunda Extension). The
1514
+ previous function is deprecated and should not be used anymore.
1515
+ :::</p>
1516
+ `,engines:{camunda:`>=8.2`}},{name:`date and time`,type:`function`,params:[{name:`date`},{name:`timezone`}],info:`<p><em>Camunda Extension</em></p>
1517
+ <p>Returns the given date and time value at the given timezone.</p>
1518
+ <p>If <code>date</code> has a different timezone than <code>timezone</code> then it adjusts the time to match the local time of <code>timezone</code>.</p>
1519
+ <p><strong>Function signature</strong></p>
1520
+ <pre><code class="language-feel">date and time(date: date and time, timezone: string): date and time
1521
+ </code></pre>
1522
+ <p><strong>Examples</strong></p>
1523
+ <pre><code class="language-feel">date and time(@&quot;2020-07-31T14:27:30@Europe/Berlin&quot;, &quot;America/Los_Angeles&quot;)
1524
+ // date and time(&quot;2020-07-31T05:27:30@America/Los_Angeles&quot;)
1525
+
1526
+ date and time(@&quot;2020-07-31T14:27:30&quot;, &quot;Z&quot;)
1527
+ // date and time(&quot;2020-07-31T12:27:30Z&quot;)
1528
+ </code></pre>
1529
+ `},{name:`duplicate values`,type:`function`,params:[{name:`list`}],info:`<p><em>Camunda Extension</em></p>
1530
+ <p>Returns all duplicate values of the given list.</p>
1531
+ <p><strong>Function signature</strong></p>
1532
+ <pre><code class="language-feel">duplicate values(list: list): list
1533
+ </code></pre>
1534
+ <p><strong>Examples</strong></p>
1535
+ <pre><code class="language-feel">duplicate values([1,2,3,2,1])
1536
+ // [1,2]
1537
+ </code></pre>
1538
+ `,engines:{camunda:`>=8.3`}},{name:`string join`,type:`function`,params:[{name:`list`},{name:`delimiter`},{name:`prefix`},{name:`suffix`}],info:`<p><em>Camunda Extension</em></p>
1539
+ <p>Joins a list of strings into a single string. This is similar to
1540
+ Java&#39;s <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/stream/Collectors.html#joining(java.lang.CharSequence,java.lang.CharSequence,java.lang.CharSequence)">joining</a>
1541
+ function.</p>
1542
+ <p>If an item of the list is <code>null</code>, the item is ignored for the result string. If an item is
1543
+ neither a string nor <code>null</code>, the function returns <code>null</code> instead of a string.</p>
1544
+ <p>The resulting string starts with <code>prefix</code>, contains a <code>delimiter</code> between each element, and ends
1545
+ with <code>suffix</code>.</p>
1546
+ <p><strong>Function signature</strong></p>
1547
+ <pre><code class="language-feel">string join(list: list&lt;string&gt;, delimiter: string, prefix: string, suffix: string): string
1548
+ </code></pre>
1549
+ <p><strong>Examples</strong></p>
1550
+ <pre><code class="language-feel">string join([&quot;a&quot;,&quot;b&quot;,&quot;c&quot;], &quot;, &quot;, &quot;[&quot;, &quot;]&quot;)
1551
+ // &quot;[a, b, c]&quot;
1552
+ </code></pre>
1553
+ `},{name:`is empty`,type:`function`,params:[{name:`list`}],info:`<p><em>Camunda Extension</em></p>
1554
+ <p>Returns <code>true</code> if the given list is empty. Otherwise, returns <code>false</code>.</p>
1555
+ <p><strong>Function signature</strong></p>
1556
+ <pre><code class="language-feel">is empty(list: list): boolean
1557
+ </code></pre>
1558
+ <p><strong>Examples</strong></p>
1559
+ <pre><code class="language-feel">is empty([])
1560
+ // true
1561
+
1562
+ is empty([1,2,3])
1563
+ // false
1564
+ </code></pre>
1565
+ `,engines:{camunda:`>=8.6`}},{name:`partition`,type:`function`,params:[{name:`list`},{name:`size`}],info:`<p><em>Camunda Extension</em></p>
1566
+ <p>Returns consecutive sublists of a list, each of the same size (the final list may be smaller).</p>
1567
+ <p>If <code>size</code> is less than <code>0</code>, it returns <code>null</code>.</p>
1568
+ <p><strong>Function signature</strong></p>
1569
+ <pre><code class="language-feel">partition(list: list, size: number): list
1570
+ </code></pre>
1571
+ <p><strong>Examples</strong></p>
1572
+ <pre><code class="language-feel">partition([1,2,3,4,5], 2)
1573
+ // [[1,2], [3,4], [5]]
1574
+
1575
+ partition([], 2)
1576
+ // []
1577
+
1578
+ partition([1,2], 0)
1579
+ // null
1580
+ </code></pre>
1581
+ `,engines:{camunda:`>=8.7`}},{name:`random number`,type:`function`,params:[],info:`<p><em>Camunda Extension</em></p>
1582
+ <p>Returns a random number between <code>0</code> and <code>1</code>.</p>
1583
+ <p><strong>Function signature</strong></p>
1584
+ <pre><code class="language-feel">random number(): number
1585
+ </code></pre>
1586
+ <p><strong>Examples</strong></p>
1587
+ <pre><code class="language-feel">random number()
1588
+ // 0.9701618132579795
1589
+ </code></pre>
1590
+ `,engines:{camunda:`>=8.2`}},{name:`extract`,type:`function`,params:[{name:`string`},{name:`pattern`}],info:`<p><em>Camunda Extension</em></p>
1591
+ <p>Returns all matches of the pattern in the given string. Returns an empty list if the pattern doesn&#39;t
1592
+ match.</p>
1593
+ <p><strong>Function signature</strong></p>
1594
+ <pre><code class="language-feel">extract(string: string, pattern: string): list&lt;string&gt;
1595
+ </code></pre>
1596
+ <p>The <code>pattern</code> is a string that contains a regular expression.</p>
1597
+ <p><strong>Examples</strong></p>
1598
+ <pre><code class="language-feel">extract(&quot;references are 1234, 1256, 1378&quot;, &quot;12[0-9]*&quot;)
1599
+ // [&quot;1234&quot;,&quot;1256&quot;]
1600
+ </code></pre>
1601
+ `},{name:`trim`,type:`function`,params:[{name:`string`}],info:`<p><em>Camunda Extension</em></p>
1602
+ <p>Returns the given string without leading and trailing spaces.</p>
1603
+ <p><strong>Function signature</strong></p>
1604
+ <pre><code class="language-feel">trim(string: string): string
1605
+ </code></pre>
1606
+ <p><strong>Examples</strong></p>
1607
+ <pre><code class="language-feel">trim(&quot; hello world &quot;)
1608
+ // &quot;hello world&quot;
1609
+
1610
+ trim(&quot;hello world &quot;)
1611
+ // &quot;hello world&quot;
1612
+ </code></pre>
1613
+ `,engines:{camunda:`>=8.6`}},{name:`uuid`,type:`function`,params:[],info:`<p><em>Camunda Extension</em></p>
1614
+ <p>Returns a UUID (Universally Unique Identifier) with 36 characters.</p>
1615
+ <p><strong>Function signature</strong></p>
1616
+ <pre><code class="language-feel">uuid(): string
1617
+ </code></pre>
1618
+ <p><strong>Examples</strong></p>
1619
+ <pre><code class="language-feel">uuid()
1620
+ // &quot;7793aab1-d761-4d38-916b-b7270e309894&quot;
1621
+ </code></pre>
1622
+ `,engines:{camunda:`>=8.6`}},{name:`to base64`,type:`function`,params:[{name:`value`}],info:`<p><em>Camunda Extension</em></p>
1623
+ <p>Returns the given string encoded in Base64 format.</p>
1624
+ <p><strong>Function signature</strong></p>
1625
+ <pre><code class="language-feel">to base64(value: string): string
1626
+ </code></pre>
1627
+ <p><strong>Examples</strong></p>
1628
+ <pre><code class="language-feel">to base64(&quot;FEEL&quot;)
1629
+ // &quot;RkVFTA==&quot;
1630
+ </code></pre>
1631
+ `,engines:{camunda:`>=8.6`}},{name:`from base64`,type:`function`,params:[{name:`value`}],info:`<p><em>Camunda Extension</em></p>
1632
+ <p>Returns the given Base64 encoded string decoded to a plain string.</p>
1633
+ <p><strong>Function signature</strong></p>
1634
+ <pre><code class="language-feel">from base64(value: string): string
1635
+ </code></pre>
1636
+ <p><strong>Examples</strong></p>
1637
+ <pre><code class="language-feel">from base64(&quot;RkVFTA==&quot;)
1638
+ // &quot;FEEL&quot;
1639
+ </code></pre>
1640
+ `,engines:{camunda:`>=8.9`}},{name:`is blank`,type:`function`,params:[{name:`string`}],info:`<p><em>Camunda Extension</em></p>
1641
+ <p>Returns <code>true</code> if the given string is blank (empty or contains only whitespaces).</p>
1642
+ <p><strong>Function signature</strong></p>
1643
+ <pre><code class="language-feel">is blank(string: string): boolean
1644
+ </code></pre>
1645
+ <p><strong>Examples</strong></p>
1646
+ <pre><code class="language-feel">is blank(&quot;&quot;)
1647
+ // true
1648
+
1649
+ is blank(&quot; &quot;)
1650
+ // true
1651
+
1652
+ is blank(&quot;hello world&quot;)
1653
+ // false
1654
+ </code></pre>
1655
+ `,engines:{camunda:`>=8.8`}},{name:`last day of month`,type:`function`,params:[{name:`date`}],info:`<p><em>Camunda Extension</em></p>
1656
+ <p>Takes the month of the given date or date-time value and returns the last day of this month.</p>
1657
+ <p><strong>Function signature</strong></p>
1658
+ <pre><code class="language-feel">last day of month(date: date): date
1659
+ </code></pre>
1660
+ <pre><code class="language-feel">last day of month(date: date and time): date
1661
+ </code></pre>
1662
+ <p><strong>Examples</strong></p>
1663
+ <pre><code class="language-feel">last day of month(date(&quot;2022-10-01&quot;))
1664
+ // date(&quot;2022-10-31&quot;))
1665
+
1666
+ last day of month(date and time(&quot;2022-10-16T12:00:00&quot;))
1667
+ // date(&quot;2022-10-31&quot;))
1668
+ </code></pre>
1669
+ `,engines:{camunda:`>=8.2`}}],Ui=[...Vi,...Hi],Wi=[{name:`get or else`,type:`function`,params:[{name:`value`},{name:`default`}],info:`<p><em>Camunda Extension</em></p>
1670
+ <p>Return the provided value parameter if not <code>null</code>, otherwise return the default parameter</p>
1671
+ <p><strong>Function signature</strong></p>
1672
+ <pre><code class="language-feel">get or else(value: Any, default: Any): Any
1673
+ </code></pre>
1674
+ <p><strong>Examples</strong></p>
1675
+ <pre><code class="language-feel">get or else(&quot;this&quot;, &quot;default&quot;)
1676
+ // &quot;this&quot;
1677
+
1678
+ get or else(null, &quot;default&quot;)
1679
+ // &quot;default&quot;
1680
+
1681
+ get or else(null, null)
1682
+ // null
1683
+ </code></pre>
1684
+ `,engines:{camunda:`>=8.3`}}];ln();var Gi=[b.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}}),Ri];function _isEmpty(e){return e&&e.from===e.to}function isEmpty(e,t){let n=e.nextSibling;return _isEmpty(e)||n&&n.from===t&&_isEmpty(n)}function isVariableName(e){return e&&e.parent&&e.parent.name===`VariableName`}function isPathExpression(e){return e?e.name===`PathExpression`||isPathExpression(e.parent):!1}function pathExpressionCompletion({variables:e}){return t=>{let n=S(t.state).resolve(t.pos,-1);if(!isPathExpression(n))return null;let r=findPathExpression(n),i=n===r||n.name===`.`?t.pos:n.from,a=getPath(r,t),o=e;for(var s=0;s<a.length-1;s++){var c=o.find(e=>e.name===a[s].name);if(!c||c.isList!==`optional`&&!!c.isList!==a[s].isList)return null;o=c.entries}return o?{from:i,options:o.map(e=>({label:e.name,type:`variable`,info:e.info,detail:e.detail}))}:null}}function findPathExpression(e){for(;e;){if(e.name===`PathExpression`)return e;e=e.parent}}function getPath(e,t){let n=[];for(let r=e.firstChild;r;r=r.nextSibling)r.name!==`.`&&(r.name===`PathExpression`?n.push(...getPath(r,t)):r.name===`FilterExpression`?n.push(...getFilter(r,t)):n.push({name:getNodeContent(r,t),isList:!1}));return n}function getFilter(e,t){let n=e.firstChild;if(n.name===`PathExpression`){let e=getPath(n,t),r=e[e.length-1];return r.isList=!0,e}return[{name:getNodeContent(n,t),isList:!0}]}function getNodeContent(e,t){return t.state.sliceDoc(e.from,e.to)}function variableCompletion({variables:e=[],builtins:t=[]}){let n=getVariableSuggestions(e,t),r=/^[\w ]*$/;return n.length?e=>{let{pos:t,state:i}=e,a=S(i).resolve(t,-1);if(isEmpty(a,t))return isPathExpression(a)?null:e.explicit?{from:t,options:n,validFor:r}:null;if(!isVariableName(a)||isPathExpression(a))return null;let o=typeof e.matchBefore==`function`?e.matchBefore(/\w[\w ]*$/):null;return{from:o?o.from:a.from,options:n,validFor:r}}:e=>null}function getVariableSuggestions(e,t){return[].concat(e.map(e=>createVariableSuggestion(e)),t.map(e=>createVariableSuggestion(e)))}function createVariableSuggestion(e,t){return e.type===`function`?createFunctionVariable(e,t):{label:e.name,type:`variable`,info:e.info,detail:e.detail,boost:t}}function createFunctionVariable(e,t){let{name:n,info:r,detail:i,params:a=[]}=e,o=a.map(({name:e,type:t},n)=>({name:e||`param ${n+1}`,type:t})),s=`${n}(${o.map(e=>"${"+e.name+`}`).join(`, `)})`,c=`${n}(${o.map(({name:e,type:t})=>t?`${e}: ${t}`:e).join(`, `)})`;return fe(s,{label:c,type:`function`,info:r,detail:i,boost:t})}function snippetCompletions(){return we(Ce)}function completions({variables:e=[],builtins:t=[]}){return[pathExpressionCompletion({variables:e}),variableCompletion({variables:e,builtins:t}),snippetCompletions(),...Ee]}function language(e){return Te(e)}function createContext(e){return e.slice().reverse().reduce((e,t)=>(e[t.name]=()=>{},e),{})}function lintExtension({builtins:e=[],engines:t}={}){return ye(cmFeelLinter({builtins:e,engines:t}))}var Ki=D.define(),qi=D.define(),Ji=D.define(),Yi=D.define(),Xi=D.define();function configure({dialect:e=`expression`,parserDialect:t,variables:n=[],builtins:r=[],engines:i,completions:a}){let o=createContext([...n,...r]),s=a??completions({builtins:availableBuiltins(r,i),variables:n});return[Ji.of(e),Ki.of(r),qi.of(n),Yi.of(t),Xi.of(i),language({dialect:e,parserDialect:t,context:o,completions:s}),lintExtension({builtins:r,engines:i})]}function availableBuiltins(e,t){return!t||!Object.keys(t).length?e:e.filter(e=>!e.engines||isCompatible(e.engines,t))}function get(e){return{builtins:e.facet(Ki)[0],variables:e.facet(qi)[0],dialect:e.facet(Ji)[0],parserDialect:e.facet(Yi)[0],engines:e.facet(Xi)[0]}}var Zi=Ui.map(e=>({...e,info:()=>l(e.info)})),Qi=new re,$i=new re;function FeelEditor({extensions:e=[],dialect:t=`expression`,parserDialect:n,container:r,contentAttributes:i={},tooltipContainer:a,onChange:o=()=>{},onKeyDown:s=()=>{},onLint:c=()=>{},placeholder:l=``,readOnly:u=!1,value:d=``,builtins:f=Zi,variables:p=[],engines:m}){this._events=mitt_default();let h=b.updateListener.of(e=>{e.docChanged&&o(e.state.doc.toString())}),g=b.updateListener.of(e=>{let t=e.transactions.flatMap(e=>e.effects).filter(e=>e.is(ve));if(!t.length)return;let n=t.flatMap(e=>e.value);this._events.emit(`lint`,{diagnostics:n})}),_=b.domEventObservers({keydown:s});typeof a==`string`&&(a=document.querySelector(a));let v=a?ae({tooltipSpace:function(){return a.getBoundingClientRect()}}):[],y=[pe(),Qi.of(configure({dialect:t,builtins:f,variables:p,parserDialect:n,engines:m})),te(),T(),ue(),b.contentAttributes.of(i),h,_,C.of([..._e]),g,v,$i.of(se(l)),Gi,...e];return u&&y.push(b.editable.of(!1)),this.on(`lint`,({diagnostics:e})=>c(e)),this._cmEditor=new b({state:O.create({doc:d,extensions:y}),parent:r}),this}FeelEditor.prototype.setValue=function(e){this._cmEditor.dispatch({changes:{from:0,to:this._cmEditor.state.doc.length,insert:e}})},FeelEditor.prototype.focus=function(e){let t=this._cmEditor;if(t.contentDOM.focus(),t.focus(),typeof e==`number`){let n=t.state.doc.length;t.dispatch({selection:{anchor:e<=n?e:n}})}},FeelEditor.prototype.on=function(e,t){this._events.on(e,t)},FeelEditor.prototype.off=function(e,t){this._events.off(e,t)},FeelEditor.prototype.getSelection=function(){return this._cmEditor.state.selection},FeelEditor.prototype.setVariables=function(e){let t=get(this._cmEditor.state);this._cmEditor.dispatch({effects:[Qi.reconfigure(configure({...t,variables:e}))]})},FeelEditor.prototype.setEngines=function(e){let t=get(this._cmEditor.state);this._cmEditor.dispatch({effects:[Qi.reconfigure(configure({...t,engines:e}))]}),be(this._cmEditor)},FeelEditor.prototype.setPlaceholder=function(e){this._cmEditor.dispatch({effects:$i.reconfigure(se(e))})};var ea=[`input:not([inert]):not([inert] *)`,`select:not([inert]):not([inert] *)`,`textarea:not([inert]):not([inert] *)`,`a[href]:not([inert]):not([inert] *)`,`area[href]:not([inert]):not([inert] *)`,`button:not([inert]):not([inert] *)`,`[tabindex]:not(slot):not([inert]):not([inert] *)`,`audio[controls]:not([inert]):not([inert] *)`,`video[controls]:not([inert]):not([inert] *)`,`[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)`,`details>summary:first-of-type:not([inert]):not([inert] *)`,`details:not([inert]):not([inert] *)`],B=ea.join(`,`),ta=typeof Element>`u`,V=ta?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,H=!ta&&Element.prototype.getRootNode?function(e){return e?.getRootNode?.call(e)}:function(e){return e?.ownerDocument},U=function isInert(e,t){t===void 0&&(t=!0);var n=e?.getAttribute?.call(e,`inert`);return n===``||n===`true`||t&&e&&(typeof e.closest==`function`?e.closest(`[inert]`):U(e.parentNode))},na=function isContentEditable(e){var t=e?.getAttribute?.call(e,`contenteditable`);return t===``||t===`true`},ra=function getCandidates(e,t,n){if(U(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(B));return t&&V.call(e,B)&&r.unshift(e),r=r.filter(n),r},W=function getCandidatesIteratively(e,t,n){for(var r=[],i=Array.from(e);i.length;){var a=i.shift();if(!U(a,!1)){if(a.tagName===`SLOT`){var o=a.assignedElements(),s=W(o.length?o:a.children,!0,n);n.flatten?r.push.apply(r,s):r.push({scopeParent:a,candidates:s})}else{V.call(a,B)&&n.filter(a)&&(t||!e.includes(a))&&r.push(a);var c=a.shadowRoot||typeof n.getShadowRoot==`function`&&n.getShadowRoot(a),l=!U(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(a));if(c&&l){var u=W(c===!0?a.children:c.children,!0,n);n.flatten?r.push.apply(r,u):r.push({scopeParent:a,candidates:u})}else i.unshift.apply(i,a.children)}}}return r},ia=function hasTabIndex(e){return!isNaN(parseInt(e.getAttribute(`tabindex`),10))},G=function getTabIndex(e){if(!e)throw Error(`No node provided`);return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||na(e))&&!ia(e)?0:e.tabIndex},aa=function getSortOrderTabIndex(e,t){var n=G(e);return n<0&&t&&!ia(e)?0:n},oa=function sortOrderedTabbables(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},sa=function isInput(e){return e.tagName===`INPUT`},ca=function isHiddenInput(e){return sa(e)&&e.type===`hidden`},la=function isDetailsWithSummary(e){return e.tagName===`DETAILS`&&Array.prototype.slice.apply(e.children).some(function(e){return e.tagName===`SUMMARY`})},ua=function getCheckedRadio(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]},da=function isTabbableRadio(e){if(!e.name)return!0;var t=e.form||H(e),n=function queryRadios(e){return t.querySelectorAll(`input[type="radio"][name="`+e+`"]`)},r;if(typeof window<`u`&&window.CSS!==void 0&&typeof window.CSS.escape==`function`)r=n(window.CSS.escape(e.name));else try{r=n(e.name)}catch(e){return console.error(`Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s`,e.message),!1}var i=ua(r,e.form);return!i||i===e},fa=function isRadio(e){return sa(e)&&e.type===`radio`},pa=function isNonTabbableRadio(e){return fa(e)&&!da(e)},ma=function isNodeAttached(e){var t=e&&H(e),n=t?.host,r=!1;if(t&&t!==e){var i,a,o;for(r=!!((i=n)!=null&&(a=i.ownerDocument)!=null&&a.contains(n)||e!=null&&(o=e.ownerDocument)!=null&&o.contains(e));!r&&n;){var s,c;t=H(n),n=t?.host,r=!!((s=n)!=null&&(c=s.ownerDocument)!=null&&c.contains(n))}}return r},ha=function isZeroArea(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return n===0&&r===0},ga=function isHidden(e,t){var n=t.displayCheck,r=t.getShadowRoot;if(n===`full-native`&&`checkVisibility`in e)return!e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});var i=getComputedStyle(e).visibility;if(i===`hidden`||i===`collapse`)return!0;var a=V.call(e,`details>summary:first-of-type`)?e.parentElement:e;if(V.call(a,`details:not([open]) *`))return!0;if(!n||n===`full`||n===`full-native`||n===`legacy-full`){if(typeof r==`function`){for(var o=e;e;){var s=e.parentElement,c=H(e);if(s&&!s.shadowRoot&&r(s)===!0)return ha(e);e=e.assignedSlot?e.assignedSlot:!s&&c!==e.ownerDocument?c.host:s}e=o}if(ma(e))return!e.getClientRects().length;if(n!==`legacy-full`)return!0}else if(n===`non-zero-area`)return ha(e);return!1},_a=function isDisabledFromFieldset(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName===`FIELDSET`&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if(r.tagName===`LEGEND`)return V.call(t,`fieldset[disabled] *`)?!0:!r.contains(e)}return!0}t=t.parentElement}return!1},K=function isNodeMatchingSelectorFocusable(e,t){return!(t.disabled||ca(t)||ga(t,e)||la(t)||_a(t))},va=function isNodeMatchingSelectorTabbable(e,t){return!(pa(t)||G(t)<0||!K(e,t))},ya=function isShadowRootTabbable(e){var t=parseInt(e.getAttribute(`tabindex`),10);return!!(isNaN(t)||t>=0)},ba=function sortByOrder(e){var t=[],n=[];return e.forEach(function(e,r){var i=!!e.scopeParent,a=i?e.scopeParent:e,o=aa(a,i),s=i?ba(e.candidates):a;o===0?i?t.push.apply(t,s):t.push(a):n.push({documentOrder:r,tabIndex:o,item:e,isScope:i,content:s})}),n.sort(oa).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(t)},xa=function tabbable(e,t){return t||={},ba(t.getShadowRoot?W([e],t.includeContainer,{filter:va.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:ya}):ra(e,t.includeContainer,va.bind(null,t)))},Sa=function focusable(e,t){return t||={},t.getShadowRoot?W([e],t.includeContainer,{filter:K.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):ra(e,t.includeContainer,K.bind(null,t))},q=function isTabbable(e,t){if(t||={},!e)throw Error(`No node provided`);return V.call(e,B)!==!1&&va(t,e)},Ca=ea.concat(`iframe:not([inert]):not([inert] *)`).join(`,`),wa=function isFocusable(e,t){if(t||={},!e)throw Error(`No node provided`);return V.call(e,Ca)!==!1&&K(t,e)};function _arrayLikeToArray(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _createForOfIteratorHelper(e,t){var n=typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(!n){if(Array.isArray(e)||(n=_unsupportedIterableToArray(e))||t){n&&(e=n);var r=0,F=function(){};return{s:F,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:F}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
1685
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i,a=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||n.return==null||n.return()}finally{if(o)throw i}}}}function _defineProperty(e,t,n){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _iterableToArray(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function _nonIterableSpread(){throw TypeError(`Invalid attempt to spread non-iterable instance.
1686
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _objectSpread2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?ownKeys(Object(n),!0).forEach(function(t){_defineProperty(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _toPrimitive(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function _toPropertyKey(e){var t=_toPrimitive(e,`string`);return typeof t==`symbol`?t:t+``}function _unsupportedIterableToArray(e,t){if(e){if(typeof e==`string`)return _arrayLikeToArray(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(e,t):void 0}}var J={getActiveTrap:function getActiveTrap(e){return e?.length>0?e[e.length-1]:null},activateTrap:function activateTrap(e,t){t!==J.getActiveTrap(e)&&J.pauseTrap(e);var n=e.indexOf(t);n===-1||e.splice(n,1),e.push(t)},deactivateTrap:function deactivateTrap(e,t){var n=e.indexOf(t);n!==-1&&e.splice(n,1),J.unpauseTrap(e)},pauseTrap:function pauseTrap(e){J.getActiveTrap(e)?._setPausedState(!0)},unpauseTrap:function unpauseTrap(e){var t=J.getActiveTrap(e);t&&!t._isManuallyPaused()&&t._setPausedState(!1)}},Ta=function isSelectableInput(e){return e.tagName&&e.tagName.toLowerCase()===`input`&&typeof e.select==`function`},Ea=function isEscapeEvent(e){return e?.key===`Escape`||e?.key===`Esc`||e?.keyCode===27},Y=function isTabEvent(e){return e?.key===`Tab`||e?.keyCode===9},Da=function isKeyForward(e){return Y(e)&&!e.shiftKey},Oa=function isKeyBackward(e){return Y(e)&&e.shiftKey},ka=function delay(e){return setTimeout(e,0)},X=function valueOrHandler(e){var t=[...arguments].slice(1);return typeof e==`function`?e.apply(void 0,t):e},Z=function getActualTarget(e){return e.target.shadowRoot&&typeof e.composedPath==`function`?e.composedPath()[0]:e.target},Aa=[],ja=function createFocusTrap(e,t){var n=t?.document||document,r=t?.trapStack||Aa,i=_objectSpread2({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,delayReturnFocus:!0,isolateSubtrees:!1,isKeyForward:Da,isKeyBackward:Oa},t),a={containers:[],containerGroups:[],tabbableGroups:[],adjacentElements:new Set,alreadySilent:new Set,nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,manuallyPaused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},o,s=function getOption(e,t,n){return e&&e[t]!==void 0?e[t]:i[n||t]},c=function findContainerIndex(e,t){var n=typeof t?.composedPath==`function`?t.composedPath():void 0;return a.containerGroups.findIndex(function(t){var r=t.container,i=t.tabbableNodes;return r.contains(e)||n?.includes(r)||i.find(function(t){return t===e})})},l=function getNodeForOption(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.hasFallback,a=r!==void 0&&r,o=t.params,s=o===void 0?[]:o,c=i[e];if(typeof c==`function`&&(c=c.apply(void 0,_toConsumableArray(s))),c===!0&&(c=void 0),!c){if(c===void 0||c===!1)return c;throw Error(`\`${e}\` was specified but was not a node, or did not return a node`)}var l=c;if(typeof c==`string`){try{l=n.querySelector(c)}catch(t){throw Error(`\`${e}\` appears to be an invalid selector; error="${t.message}"`)}if(!l&&!a)throw Error(`\`${e}\` as selector refers to no known node`)}return l},u=function getActiveElement(e){var t=e.activeElement;return t?t.shadowRoot&&t.shadowRoot.activeElement!==null?u(t.shadowRoot):t:null},d=function getInitialFocusNode(){var e=l(`initialFocus`,{hasFallback:!0});if(e===!1)return!1;if(e===void 0||e&&!wa(e,i.tabbableOptions)){var t=u(n);if(c(t)>=0)e=t;else{var r=a.tabbableGroups[0];e=r&&r.firstTabbableNode||l(`fallbackFocus`)}}else e===null&&(e=l(`fallbackFocus`));if(!e)throw Error(`Your focus-trap needs to have at least one focusable element`);return e},f=function updateTabbableNodes(){if(a.containerGroups=a.containers.map(function(e){var t=xa(e,i.tabbableOptions),n=Sa(e,i.tabbableOptions),r=t.length>0?t[0]:void 0,a=t.length>0?t[t.length-1]:void 0,o=n.find(function(e){return q(e)}),s=n.slice().reverse().find(function(e){return q(e)});return{container:e,tabbableNodes:t,focusableNodes:n,posTabIndexesFound:!!t.find(function(e){return G(e)>0}),firstTabbableNode:r,lastTabbableNode:a,firstDomTabbableNode:o,lastDomTabbableNode:s,nextTabbableNode:function nextTabbableNode(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,i=t.indexOf(e);return i<0?r?n.slice(n.indexOf(e)+1).find(function(e){return q(e)}):n.slice(0,n.indexOf(e)).reverse().find(function(e){return q(e)}):t[i+(r?1:-1)]}}}),a.tabbableGroups=a.containerGroups.filter(function(e){return e.tabbableNodes.length>0}),a.tabbableGroups.length<=0&&!l(`fallbackFocus`))throw Error(`Your focus-trap must have at least one container with at least one tabbable node in it at all times`);if(a.containerGroups.find(function(e){return e.posTabIndexesFound})&&a.containerGroups.length>1)throw Error(`At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.`)},p=function tryFocus(e){e!==!1&&e!==u(document)&&(!e||!e.focus?p(d()):(e.focus({preventScroll:!!i.preventScroll}),a.mostRecentlyFocusedNode=e,Ta(e)&&e.select()))},m=function getReturnFocusNode(e){var t=l(`setReturnFocus`,{params:[e]});return t||t!==!1&&e},h=function findNextNavNode(e){var t=e.target,n=e.event,r=e.isBackward,o=r!==void 0&&r;t||=Z(n),f();var s=null;if(a.tabbableGroups.length>0){var u=c(t,n),d=u>=0?a.containerGroups[u]:void 0;if(u<0)s=o?a.tabbableGroups[a.tabbableGroups.length-1].lastTabbableNode:a.tabbableGroups[0].firstTabbableNode;else if(o){var p=a.tabbableGroups.findIndex(function(e){var n=e.firstTabbableNode;return t===n});if(p<0&&(d.container===t||wa(t,i.tabbableOptions)&&!q(t,i.tabbableOptions)&&!d.nextTabbableNode(t,!1))&&(p=u),p>=0){var m=p===0?a.tabbableGroups.length-1:p-1,h=a.tabbableGroups[m];s=G(t)>=0?h.lastTabbableNode:h.lastDomTabbableNode}else Y(n)||(s=d.nextTabbableNode(t,!1))}else{var g=a.tabbableGroups.findIndex(function(e){var n=e.lastTabbableNode;return t===n});if(g<0&&(d.container===t||wa(t,i.tabbableOptions)&&!q(t,i.tabbableOptions)&&!d.nextTabbableNode(t))&&(g=u),g>=0){var _=g===a.tabbableGroups.length-1?0:g+1,v=a.tabbableGroups[_];s=G(t)>=0?v.firstTabbableNode:v.firstDomTabbableNode}else Y(n)||(s=d.nextTabbableNode(t))}}else s=l(`fallbackFocus`);return s},g=function checkPointerDown(e){c(Z(e),e)>=0||(X(i.clickOutsideDeactivates,e)?o.deactivate({returnFocus:i.returnFocusOnDeactivate}):X(i.allowOutsideClick,e)||e.preventDefault())},_=function checkFocusIn(e){var t=Z(e),n=c(t,e)>=0;if(n||t instanceof Document)n&&(a.mostRecentlyFocusedNode=t);else{e.stopImmediatePropagation();var r,o=!0;if(a.mostRecentlyFocusedNode){if(G(a.mostRecentlyFocusedNode)>0){var s=c(a.mostRecentlyFocusedNode),l=a.containerGroups[s].tabbableNodes;if(l.length>0){var u=l.findIndex(function(e){return e===a.mostRecentlyFocusedNode});u>=0&&(i.isKeyForward(a.recentNavEvent)?u+1<l.length&&(r=l[u+1],o=!1):u-1>=0&&(r=l[u-1],o=!1))}}else a.containerGroups.some(function(e){return e.tabbableNodes.some(function(e){return G(e)>0})})||(o=!1)}else o=!1;o&&(r=h({target:a.mostRecentlyFocusedNode,isBackward:i.isKeyBackward(a.recentNavEvent)})),p(r||a.mostRecentlyFocusedNode||d())}a.recentNavEvent=void 0},v=function checkKeyNav(e){var t=arguments.length>1&&arguments[1]!==void 0&&arguments[1];a.recentNavEvent=e;var n=h({event:e,isBackward:t});n&&(Y(e)&&e.preventDefault(),p(n))},y=function checkTabKey(e){(i.isKeyForward(e)||i.isKeyBackward(e))&&v(e,i.isKeyBackward(e))},b=function checkEscapeKey(e){Ea(e)&&X(i.escapeDeactivates,e)!==!1&&(e.preventDefault(),o.deactivate())},x=function checkClick(e){c(Z(e),e)>=0||X(i.clickOutsideDeactivates,e)||X(i.allowOutsideClick,e)||(e.preventDefault(),e.stopImmediatePropagation())},S=function addListeners(){if(a.active){J.activateTrap(r,o);var e;return i.delayInitialFocus?e=new Promise(function(e){a.delayInitialFocusTimer=ka(function(){p(d()),e()})}):p(d()),n.addEventListener(`focusin`,_,!0),n.addEventListener(`mousedown`,g,{capture:!0,passive:!1}),n.addEventListener(`touchstart`,g,{capture:!0,passive:!1}),n.addEventListener(`click`,x,{capture:!0,passive:!1}),n.addEventListener(`keydown`,y,{capture:!0,passive:!1}),n.addEventListener(`keydown`,b),e}},C=function collectAdjacentElements(e){a.active&&!a.paused&&o._setSubtreeIsolation(!1),a.adjacentElements.clear(),a.alreadySilent.clear();var t=new Set,n=new Set,r=_createForOfIteratorHelper(e),i;try{for(r.s();!(i=r.n()).done;){var s=i.value;t.add(s);for(var c=typeof ShadowRoot<`u`&&s.getRootNode()instanceof ShadowRoot,l=s;l;){t.add(l);var u=l.parentElement,d=[];u?d=u.children:!u&&c&&(d=l.getRootNode().children,u=l.getRootNode().host,c=typeof ShadowRoot<`u`&&u.getRootNode()instanceof ShadowRoot);var f=_createForOfIteratorHelper(d),p;try{for(f.s();!(p=f.n()).done;){var m=p.value;n.add(m)}}catch(e){f.e(e)}finally{f.f()}l=u}}}catch(e){r.e(e)}finally{r.f()}t.forEach(function(e){n.delete(e)}),a.adjacentElements=n},w=function removeListeners(){if(a.active)return n.removeEventListener(`focusin`,_,!0),n.removeEventListener(`mousedown`,g,!0),n.removeEventListener(`touchstart`,g,!0),n.removeEventListener(`click`,x,!0),n.removeEventListener(`keydown`,y,!0),n.removeEventListener(`keydown`,b),o},T=typeof window<`u`&&`MutationObserver`in window?new MutationObserver(function checkDomRemoval(e){var t=a.mostRecentlyFocusedNode;t&&e.some(function(e){return Array.from(e.removedNodes).some(function(e){return e===t||typeof e.contains==`function`&&e.contains(t)})})&&a.containers.some(function(e){return e?.isConnected})&&(f(),p(d()))}):void 0,E=function updateObservedNodes(){T&&(T.disconnect(),a.active&&!a.paused&&a.containers.map(function(e){T.observe(e,{subtree:!0,childList:!0})}))};return o={get active(){return a.active},get paused(){return a.paused},activate:function activate(e){if(a.active)return this;var t=s(e,`onActivate`),i=s(e,`onPostActivate`),c=s(e,`checkCanFocusTrap`),l=J.getActiveTrap(r),d=!1;if(l&&!l.paused){var p;(p=l._setSubtreeIsolation)==null||p.call(l,!1),d=!0}try{c||f(),a.active=!0,a.paused=!1,a.nodeFocusedBeforeActivation=u(n),t?.({trap:o});var m=function finishActivation(){c&&f();var e=function afterListeners(){o._setSubtreeIsolation(!0),E(),i?.({trap:o})},t=S();t?t.then(e):e()};if(c)return c(a.containers.concat()).then(m,m),this;m()}catch(e){if(l===J.getActiveTrap(r)&&d){var h;(h=l._setSubtreeIsolation)==null||h.call(l,!0)}throw e}return this},deactivate:function deactivate(e){if(!a.active)return this;var t=_objectSpread2({onDeactivate:i.onDeactivate,onPostDeactivate:i.onPostDeactivate,checkCanReturnFocus:i.checkCanReturnFocus},e);clearTimeout(a.delayInitialFocusTimer),a.delayInitialFocusTimer=void 0,a.paused||o._setSubtreeIsolation(!1),a.alreadySilent.clear(),w(),a.active=!1,a.paused=!1,E(),J.deactivateTrap(r,o);var n=s(t,`onDeactivate`),c=s(t,`onPostDeactivate`),l=s(t,`checkCanReturnFocus`),u=s(t,`delayReturnFocus`),d=s(t,`returnFocus`,`returnFocusOnDeactivate`);n?.({trap:o});var f=function completeDeactivation(){d&&p(m(a.nodeFocusedBeforeActivation)),c?.({trap:o})},h=function finishDeactivation(){u&&d?ka(f):f()};return d&&l?(l(m(a.nodeFocusedBeforeActivation)).then(h,h),this):(h(),this)},pause:function pause(e){return a.active?(a.manuallyPaused=!0,this._setPausedState(!0,e)):this},unpause:function unpause(e){return!a.active||(a.manuallyPaused=!1,r[r.length-1]!==this)?this:this._setPausedState(!1,e)},updateContainerElements:function updateContainerElements(e){return a.containers=[].concat(e).filter(Boolean).map(function(e){return typeof e==`string`?n.querySelector(e):e}),i.isolateSubtrees&&C(a.containers),a.active&&(f(),a.paused||o._setSubtreeIsolation(!0)),E(),this}},Object.defineProperties(o,{_isManuallyPaused:{value:function value(){return a.manuallyPaused}},_setPausedState:{value:function value(e,t){if(a.paused===e)return this;if(a.paused=e,e){var n=s(t,`onPause`),r=s(t,`onPostPause`);n?.({trap:o}),w(),o._setSubtreeIsolation(!1),E(),r?.({trap:o})}else{var i=s(t,`onUnpause`),c=s(t,`onPostUnpause`);i?.({trap:o}),(function finishUnpause(){f();var e=function afterListeners(){o._setSubtreeIsolation(!0),E(),c?.({trap:o})},t=S();t?t.then(e):e()})()}return this}},_setSubtreeIsolation:{value:function value(e){i.isolateSubtrees&&a.adjacentElements.forEach(function(t){if(e)switch(i.isolateSubtrees){case`aria-hidden`:(t.ariaHidden===`true`||t.getAttribute(`aria-hidden`)?.toLowerCase()===`true`)&&a.alreadySilent.add(t),t.setAttribute(`aria-hidden`,`true`);break;default:(t.inert||t.hasAttribute(`inert`))&&a.alreadySilent.add(t),t.setAttribute(`inert`,!0)}else if(!a.alreadySilent.has(t))switch(i.isolateSubtrees){case`aria-hidden`:t.removeAttribute(`aria-hidden`);break;default:t.removeAttribute(`inert`)}})}}}),o.updateContainerElements(e),o},Ma=[`input`,`delete`,`move`],Na=[`z`,`y`],Pa=O.transactionExtender.of(e=>e.docChanged&&!Ma.some(t=>e.isUserEvent(t))?{annotations:E.addToHistory.of(!1)}:null),Fa=ce.high(b.domEventHandlers({keydown:e=>((e.ctrlKey||e.metaKey)&&Na.includes(e.key.toLowerCase())&&e.stopPropagation(),!1)}));function feelHistory(){return[he(),C.of(me),Fa,Pa]}function hasHistory(e){return e.state.field(ge,!1)!==void 0}function attachHistory(e){hasHistory(e)||e.dispatch({effects:w.appendConfig.of(feelHistory())})}var Ia=!1;function installFeelBehaviour(){if(Ia)return;Ia=!0;let e=FeelEditor.prototype.setVariables;FeelEditor.prototype.setVariables=function setStableVariables(t){let n=t.map(e=>e.name).join(`
1687
+ `);this.names!==n&&(this.names=n,e.call(this,t))},document.addEventListener(`focusin`,e=>{let t=e.target?.closest?.(`.cm-editor`),n=t?b.findFromDOM(t):null;n&&attachHistory(n)}),document.addEventListener(`keydown`,e=>{if(e.key===`Tab`)for(let e of document.querySelectorAll(`.cm-tooltip-autocomplete`)){let t=e.closest(`.cm-editor`),n=t?b.findFromDOM(t):null;n&&de(n)}},!0)}var La=`<rect x="5.5" y="4.5" width="5" height="7" rx="1"/><path d="M1.5 2H3V6H5.5M1.5 14H3V10H5.5M10.5 6H13V2H14.5M10.5 10H13V14H14.5"/>`,Ra=`<svg class="trace-icon" viewBox="0 0 16 16" width="22" height="22" stroke="currentColor" fill="none" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">${La}</svg>`,za=new Set([`bpmn:EndEvent`,`bpmn:TerminateEndEvent`,`bpmn:MessageEndEvent`,`bpmn:EscalationEndEvent`,`bpmn:ErrorEndEvent`,`bpmn:CancelEndEvent`,`bpmn:CompensateEndEvent`,`bpmn:SignalEndEvent`]),Ba=new Set([`bpmn:StartEvent`,`bpmn:MessageStartEvent`,`bpmn:TimerStartEvent`,`bpmn:SignalStartEvent`,`bpmn:ErrorStartEvent`,`bpmn:EscalationStartEvent`,`bpmn:ConditionalStartEvent`,`bpmn:LinkStartEvent`]),Va=new Set([`bpmn:Process`,`bpmn:SubProcess`,`bpmn:Transaction`,`bpmn:AdHocSubProcess`]),Ha=new Set([`bpmn:SequenceFlow`,`bpmn:MessageFlow`,`bpmn:Association`,`bpmn:DataAssociation`]);function words(e){let t=e.replace(/^[a-z]+:/,``),n=`app.element.kind.${t[0].toLowerCase()}${t.slice(1)}`,i=r(n);return i===n?t.replace(/([a-z])([A-Z])/g,`$1 $2`).toLowerCase():i}function labelOf(e){let t=e?.name?.replace(/\s+/g,` `).trim();return t?`"${t}"`:r(`app.rules.theKindOf`,{kind:e?words(e.$type):r(`app.rules.compat.element`)})}function containersOf(e){let t=[],n=new Set,add=e=>{e&&!n.has(e)&&(n.add(e),t.push(e))};for(let t of e.rootElements??[])if(t.$type===`bpmn:Process`&&add(t),t.$type===`bpmn:Collaboration`)for(let e of t.participants??[])add(e.processRef);for(let e=0;e<t.length;e+=1)for(let n of t[e].flowElements??[])Va.has(n.$type)&&add(n);return t}function bpmnGraph(e,t){let n=e,r=new Map,i=[],link=(e,t,n)=>{e?.id&&t?.id&&i.push({from:e.id,to:t.id,flow:n})};for(let e of containersOf(n??{$type:`bpmn:Definitions`})){for(let t of e.flowElements??[])t.id&&!Ha.has(t.$type)&&r.set(t.id,t);for(let t of e.flowElements??[])t.$type===`bpmn:SequenceFlow`&&link(t.sourceRef,t.targetRef,t.id??null),t.$type===`bpmn:BoundaryEvent`&&link(t.attachedToRef,t,null),t.$type===`bpmn:SubProcess`&&t.triggeredByEvent&&link(e,t,null)}if(t)for(let e of n?.rootElements??[])for(let t of e.messageFlows??[])link(t.sourceRef,t.targetRef,t.id??null);let a=new Map,o=new Map;for(let e of i)r.has(e.from)&&r.has(e.to)&&(o.set(e.from,[...o.get(e.from)??[],e]),a.set(e.to,[...a.get(e.to)??[],e]));return{nodes:r,incoming:a,outgoing:o}}function bpmnSide(e,t,n,r){let i=n===`incoming`?e.incoming:e.outgoing,other=e=>n===`incoming`?e.from:e.to,a=new Set([t]),o=new Set,s=[],reach=e=>{for(let t of i.get(e)??[]){t.flow&&o.add(t.flow);let e=other(t);a.has(e)||(a.add(e),s.push(e))}};reach(t);for(let t=0;t<s.length;t+=1)r.has(e.nodes.get(s[t])?.$type??``)||reach(s[t]);return{nodes:s,flows:[...o]}}function traceBpmnPaths(e,t,n={}){let r=bpmnGraph(e,n.followMessages===!0);if(!r.nodes.has(t))return null;let i=bpmnSide(r,t,`incoming`,Ba),a=bpmnSide(r,t,`outgoing`,za);return{origin:t,originLabel:labelOf(r.nodes.get(t)),before:i.nodes,after:a.nodes,beforeFlows:i.flows,afterFlows:a.flows}}function dmnNodesOf(e,t){let visit=e=>{if(e&&e.id&&!t.has(e.id)){t.set(e.id,e);for(let t of e.childDecisions??[])visit(t)}};for(let t of e.rootElements??[])visit(t)}function dmnSide(e,t,n){let other=e=>n===`up`?e.from:e.to,r=new Set([t]),i=new Set,a=[],reach=t=>{for(let o of e.get(t)??[]){(n===`up`?o.to===t:o.from===t)&&i.add(o);let e=other(o);r.has(e)||(r.add(e),a.push(e))}};reach(t);for(let e=0;e<a.length;e+=1)reach(a[e]);return{nodes:a,edges:[...i]}}function traceDmnPaths(e,t){let n=e??{$type:`dmn:Definitions`},r=new Map;if(dmnNodesOf(n,r),!r.has(t))return null;let i=new Map,a=new Map;for(let e of r.values())if(e.id)for(let t of e.requires??[]){let n=t.requiredInput??t.requiredDecision,o=typeof n==`string`?n:n?.id;if(!o||!r.has(o)||!e.id)continue;let s={from:o,to:e.id};i.set(s.to,[...i.get(s.to)??[],s]),a.set(s.from,[...a.get(s.from)??[],s])}let o=dmnSide(i,t,`up`),s=dmnSide(a,t,`down`);return{origin:t,originLabel:labelOf(r.get(t)),before:o.nodes,after:s.nodes,beforeEdges:o.edges,afterEdges:s.edges}}var Ua=`penstock-trace-before`,Wa=`penstock-trace-after`,Ga=`penstock-trace-origin`,Ka=`penstock-trace-dim`,qa=`penstock-trace-label`,Ja=`penstock-trace-label-dim`,Ya=[Ua,Wa,Ga,Ka,qa,Ja],Xa=new Set([`bpmn:SubProcess`,`bpmn:Transaction`,`bpmn:AdHocSubProcess`]),Za=/Task$|Event$|Gateway$|Activity$/;function isBpmnFlowNode(e){return e?.$type?typeof e.$instanceOf==`function`?e.$instanceOf(`bpmn:FlowNode`):Za.test(e.$type)||Xa.has(e.$type):!1}function isDmnDecision(e){return e?.$type===`dmn:Decision`}function isTraceable(e,t,n){if(!t)return!1;let r=e?.get?.(`elementRegistry`,!1)?.get?.(t);return!!r?.businessObject&&n(r.businessObject)}function bpmnTraceOf(e,t,n){return!t||!isTraceable(e,t,isBpmnFlowNode)?null:traceBpmnPaths(e.getDefinitions?.(),t,{followMessages:n})}function rootsOf(e){let t=e,n=t?.rootElements??t?.drgElement?.rootElements;return Array.isArray(n)&&n.length>0?{$type:`dmn:Definitions`,rootElements:n}:null}function drdOf(e){let t=new Map;return e?.forEach(e=>{let n=e?.businessObject;n?.id&&!t.has(n.id)&&t.set(n.id,{$type:n.$type??``,id:n.id,...n.name?{name:n.name}:{}})}),e?.forEach(e=>{let n=e?.businessObject?.$type===`dmn:InformationRequirement`,r=e?.source?.businessObject?.id,i=e?.target?.businessObject?.id;if(!n||!r||!i)return;let a=t.get(i);a&&t.has(r)&&(a.requires=[...a.requires??[],{requiredInput:{id:r}}])}),{$type:`dmn:Definitions`,rootElements:[...t.values()]}}function dmnTraceOf(e,t,n){if(!n)return null;let r=t?.get?.(`elementRegistry`,!1)?.get?.(n);return isDmnDecision(r?.businessObject)?traceDmnPaths(rootsOf(e)??drdOf(t?.get?.(`elementRegistry`,!1)),n):null}var Qa={before:Ua,after:Wa,origin:Ga,dim:Ka};function clearTrace(e,t){t.forEach(t=>{for(let n of Ya)e.hasMarker?.(t,n)!==!1&&e.removeMarker(t,n)})}function paintTrace(e,t,n){clearTrace(e,t),t.forEach(t=>{if(!t.parent)return;let r=t.labelTarget,i=n(r||t);i&&e.addMarker(t,r?i===`dim`?Ja:qa:Qa[i])})}function bpmnToneOf(e){let t=new Set(e.before),n=new Set(e.after),r=new Set([...e.beforeFlows,...e.afterFlows]),i=new Set(e.afterFlows);return a=>{let o=a.id;return o?r.has(o)?i.has(o)?`after`:`before`:o===e.origin?`origin`:n.has(o)?`after`:t.has(o)?`before`:`dim`:null}}function dmnToneOf(e){let t=new Set(e.before),n=new Set(e.after),edgeKey=(e,t)=>`${e}>${t}`,r=new Set(e.beforeEdges.map(e=>edgeKey(e.from,e.to))),i=new Set(e.afterEdges.map(e=>edgeKey(e.from,e.to)));return a=>{let o=a.id;if(!o)return null;let s=a.source?.id,c=a.target?.id;if(s&&c){let e=edgeKey(s,c);return i.has(e)?`after`:r.has(e)?`before`:`dim`}return o===e.origin?`origin`:n.has(o)?`after`:t.has(o)?`before`:`dim`}}var Q=`http://www.w3.org/2000/svg`,$a=[[`before`,`--theme-trace-before`],[`after`,`--theme-trace-after`],[`dim`,`--theme-trace-dim-stroke`]];function traceArrowOf(e){return`penstock-trace-arrow-${e}`}function arrowMarker(e,t,n){let r=e.createElementNS(Q,`marker`);r.setAttribute(`id`,traceArrowOf(t)),r.setAttribute(`viewBox`,`0 0 20 20`),r.setAttribute(`refX`,`11`),r.setAttribute(`refY`,`10`),r.setAttribute(`markerWidth`,`20`),r.setAttribute(`markerHeight`,`20`),r.setAttribute(`markerUnits`,`userSpaceOnUse`),r.setAttribute(`orient`,`auto`);let i=e.createElementNS(Q,`path`);return i.setAttribute(`d`,`M 1 5 L 11 10 L 1 15 Z`),i.setAttribute(`style`,`stroke-width: 1px; stroke-linecap: round; stroke-dasharray: 10000, 1; fill: var(${n}); stroke: none;`),r.appendChild(i),r}function ensureTraceArrows(e){let t=(e?.get?.(`canvas`,!1)?.getContainer?.())?.querySelector?.(`svg`),n=t?.querySelector?.(`defs`)??t?.ownerDocument?.createElementNS?.(Q,`defs`);if(t&&n){n.parentNode||t.appendChild(n);for(let[e,r]of $a)n.querySelector(`#${traceArrowOf(e)}`)||n.appendChild(arrowMarker(t.ownerDocument,e,r))}}function traceTally(e,t,n){return r(`app.tracePaths.tracingBeforeAfter`,{label:e,before:t,after:n})}function canvasOf(e){let t=e?.get?.(`canvas`,!1),n=e?.get?.(`elementRegistry`,!1);return t&&n?{canvas:t,registry:n}:null}function clearTraceOn(e){let t=canvasOf(e);t&&clearTrace(t.canvas,t.registry)}function bpmnTraceReading(e,t,n){let r=bpmnTraceOf(e,t,n);return r?{label:r.originLabel,before:r.before.length,after:r.after.length}:null}function dmnTraceReading(e,t,n){let r=dmnTraceOf(e,t,n);return r?{label:r.originLabel,before:r.before.length,after:r.after.length}:null}var $=null;function paintBpmnTrace(e,t,n){let r=canvasOf(e);if(!r)return;let i=t?bpmnTraceOf(e,t,n):null;i?(paintTrace(r.canvas,r.registry,bpmnToneOf(i)),$={viewer:e,paint:e=>paintBpmnTrace(e,t,n)}):(clearTrace(r.canvas,r.registry),$=null)}function paintDmnTrace(e,t,n){let r=canvasOf(t);if(!r)return;ensureTraceArrows(t);let i=n?dmnTraceOf(e,t,n):null;i?(paintTrace(r.canvas,r.registry,dmnToneOf(i)),$={viewer:t,paint:t=>paintDmnTrace(e,t,n)}):(clearTrace(r.canvas,r.registry),$=null)}async function withoutTrace(e,t){if(!e)return t();let n=$&&$.viewer===e?$:null;clearTraceOn(e);try{return await t()}finally{n?.paint(e)}}var eo={light:{defaultFillColor:`#ffffff`,defaultStrokeColor:`#3c3f41`},dark:{defaultFillColor:`#191a1c`,defaultStrokeColor:`#afb1b3`},dracula:{defaultFillColor:`#262936`,defaultStrokeColor:`#cfcdcd`}},to={defaultStyle:{fontFamily:`Arial, sans-serif`,fontWeight:`normal`,fontSize:12,lineHeight:1.2},externalStyle:{fontFamily:`Arial, sans-serif`,fontSize:12,lineHeight:1.2}},no={defaultStyle:{fontFamily:`'Architects Daughter', Arial`,fontWeight:`normal`,fontSize:13,lineHeight:1.2},externalStyle:{fontSize:13,lineHeight:1.2}};export{getApiClient as A,FeelAnalyzer as C,ln as D,getCompatible as E,isSatisfied as O,FeelersEditor as S,getCoerced as T,feelHistory as _,clearTraceOn as a,Ui as b,isDmnDecision as c,paintDmnTrace as d,traceTally as f,installFeelBehaviour as g,Ra as h,bpmnTraceReading as i,ApiClient as k,isTraceable as l,La as m,no as n,dmnTraceReading as o,withoutTrace as p,eo as r,isBpmnFlowNode as s,to as t,paintBpmnTrace as u,ja as v,Oe as w,Wi as x,FeelEditor as y};