Home
last modified time | relevance | path

Searched defs:Pl (Results 1 – 9 of 9) sorted by relevance

/plugin/xlsx2dw/packages/xmltojson/
H A Dxmltojson.js160 function Pl(a,b){return a.lastIndexOf(b)} function
/plugin/findologicxmlexport/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/js/
H A Dd3.min.js5 …(i.area/f):0);i.z=!0,i.dx+=e.x+e.dx-a,e.y+=f,e.dy-=f}else{for((r||f>e.dx)&&(f=e.dx);++u<o;)i=n[u],…
/plugin/bpmnio/vendor/dmn-js/dist/
H A Ddmn-viewer.production.min.js16 */function fs(e){this._container=this._createContainer(),lo(this._container),this._init(this._container,e)}rn(fs,mi),fs.prototype.saveSVG=jt((function(e){var t=this;return new Promise((function(e){var n=t.get("canvas"),i=n.getActiveLayer(),r=It("defs",n._svg),o=Mn(i),s=r&&r.outerHTML||"",a=i.getBBox();e({svg:'<?xml version="1.0" encoding="utf-8"?>\n\x3c!-- created with dmn-js / http://bpmn.io --\x3e\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+a.width+'" height="'+a.height+'" viewBox="'+a.x+" "+a.y+" "+a.width+" "+a.height+'" version="1.1">'+s+o+"</svg>"})}))})),fs.prototype.getModules=function(){return this._modules},fs.prototype.destroy=function(){mi.prototype.destroy.call(this),Ft(this._container)},fs.prototype.on=function(e,t,n,i){return this.get("eventBus").on(e,t,n,i)},fs.prototype.off=function(e,t){this.get("eventBus").off(e,t)},fs.prototype._init=function(e,t){var{additionalModules:n,canvas:i,...r}=t,o={...r,canvas:{...i,container:e},modules:[...[{drd:["value",this]}],...t.modules||this.getModules(),...n||[]]};mi.call(this,o),t&&t.container&&this.attachTo(t.container)},fs.prototype._emit=function(e,t){return this.get("eventBus").fire(e,t)},fs.prototype._createContainer=function(){return Lt('<div class="dmn-drd-container"></div>')},fs.prototype.open=function(e){var t=this;return new Promise(((n,i)=>{var r;try{return t._definitions&&t.clear(),t._definitions=e,function(e,t,n){var i,r=e.get("drdImporter"),o=e.get("eventBus"),s=[];o.fire("import.start",{definitions:t});try{!function(e){new xi({root:function(e){return r.root(e)},element:function(e,t){return r.add(e,t)},error:function(e,t){s.push({message:e,context:t})}}).handleDefinitions(e)}(t)}catch(e){i=e}o.fire("import.done",{error:i,warnings:s}),n(i,s)}(t,e,(function(e,t){e?(e.warnings=t||[],i(e)):n({warnings:t||[]})}))}catch(e){r=e}r?(r.warnings=r.warnings||[],i(r)):n({warnings:[]})}))},fs.prototype.attachTo=function(e){if(!e)throw new Error("parentNode required");this.detach();var t=this._container;e.appendChild(t),this._emit("attach",{}),this.get("canvas").resized()},fs.prototype.detach=function(){var e=this._container,t=e.parentNode;t&&(this._emit("detach",{}),t.removeChild(e))},fs.prototype._modules=[Fo,jo,es,as,hs,ps];class gs{constructor(e){b(this,e),ys(this,"businessObject",{writable:!0})}}const ms={root:class extends gs{constructor(e){super(e),ys(this,"rows",{enumerable:!0,value:this.rows||[]}),ys(this,"cols",{enumerable:!0,value:this.cols||[]})}},row:class extends gs{constructor(e){super(e),ys(this,"root",{writable:!0}),ys(this,"cells",{enumerable:!0,value:this.cells||[]})}},col:class extends gs{constructor(e){super(e),ys(this,"root",{writable:!0}),ys(this,"cells",{enumerable:!0,value:this.cells||[]})}},cell:class extends gs{constructor(e){super(e),ys(this,"row",{writable:!0}),ys(this,"col",{writable:!0})}}};function ys(e,t,n){Object.defineProperty(e,t,n)}let vs=class{constructor(e){this._eventBus=e,this._elements={},e.on("table.clear",this.clear.bind(this))}add(e,t){const{id:n}=e;this._elements[n]=e}remove(e){const t=e.id||e;delete this._elements[t]}get(e){return this._elements[e]}getAll(){return ws(this._elements)}forEach(e){ws(this._elements).forEach((t=>e(t)))}filter(e){return ws(this._elements).filter((t=>e(t)))}clear(){this._elements={}}updateId(e,t){this._validateId(t),"string"==typeof e&&(e=this.get(e)),this._eventBus.fire("element.updateId",{element:e,newId:t}),this.remove(e),e.id=t,this.add(e)}_validateId(e){if(!e)throw new Error("element must have an id");if(this._elements[e])throw new Error("element with id "+e+" already added")}};function ws(e){return Object.keys(e).map((function(t){return e[t]}))}vs.$inject=["eventBus"];let bs=class{constructor(e){this._listeners={},e.on("elements.changed",(({elements:e})=>{this.elementsChanged(e)})),e.on("root.remove",(t=>{const n=t.root.id;this._listeners[n]&&e.once("root.add",(e=>{const t=e.root.id;this.updateId(n,t)}))})),e.on("element.updateId",(({element:e,newId:t})=>{this.updateId(e.id,t)}))}elementsChanged(e){const t={},n=e.length;for(let i=0;i<n;i++){const{id:n}=e[i];if(t[n])return;t[n]=!0;const r=this._listeners[n]&&this._listeners[n].length;if(r)for(let e=0;e<r;e++)this._listeners[n][e]&&this._listeners[n][e]()}}onElementsChanged(e,t){this._listeners[e]||(this._listeners[e]=[]),this._listeners[e][this._listeners[e].length]=t}offElementsChanged(e,t){if(this._listeners[e])if(t){const n=this._listeners[e].indexOf(t);-1!==n&&this._listeners[e].splice(n,1)}else this._listeners[e].length=0}updateId(e,t){this._listeners[e]&&(this._listeners[t]=this._listeners[e],delete this._listeners[e])}};bs.$inject=["eventBus"];class xs extends oo{constructor(e){super(e);const t=this._injector=e.injector;this._sheet=t.get("sheet"),this._changeSupport=t.get("changeSupport"),this._components=t.get("components"),this._eventBus=t.get("eventBus");const n=t.get("throttle");this.onElementsChanged=this.onElementsChanged.bind(this),this.onScroll=n(this.onScroll.bind(this))}onElementsChanged(){this.forceUpdate()}onScroll(){this._eventBus.fire("sheet.scroll")}getChildContext(){return{changeSupport:this._changeSupport,components:this._components,injector:this._injector}}componentWillMount(){const{id:e}=this._sheet.getRoot();this._changeSupport.onElementsChanged(e,this.onElementsChanged)}componentWillUnmount(){const{id:e}=this._sheet.getRoot();this._changeSupport.offElementsChanged(e,this.onElementsChanged)}render(){const{rows:e,cols:t}=this._sheet.getRoot(),n=this._components.getComponents("table.before"),i=this._components.getComponents("table.after"),r=this._components.getComponent("table.head"),o=this._components.getComponent("table.body"),s=this._components.getComponent("table.foot");return zi(1,"div","tjs-container",[n&&n.map(((e,t)=>Hi(2,e,null,t))),zi(1,"div","tjs-table-container",zi(1,"table","tjs-table",[r&&Hi(2,r,{rows:e,cols:t}),o&&Hi(2,o,{rows:e,cols:t}),s&&Hi(2,s,{rows:e,cols:t})],0),2,{onScroll:this.onScroll}),i&&i.map(((e,t)=>Hi(2,e,null,t)))],0)}}let ks=class{constructor(e,t,n,i,r){const{container:o}=n;this._container=o,i.on("root.added",(()=>{eo(Hi(2,xs,{injector:r}),o)})),i.on("root.remove",(()=>{eo(null,o)}))}getContainer(){return this._container}};ks.$inject=["changeSupport","components","config.renderer","eventBus","injector"];var _s={__init__:["changeSupport","components","renderer"],changeSupport:["type",bs],components:["type",class{constructor(){this._listeners={}}getComponent(e,t){const n=this._listeners[e];if(!n)return;let i;for(let e=0;e<n.length&&(i=n[e].callback(t),!i);e++);return i}getComponents(e,t){const n=this._listeners[e],i=[];if(!n)return i;for(let e=0;e<n.length;e++){const r=n[e].callback(t);r&&i.push(r)}return i.length,i}onGetComponent(e,t,n){if(s(t)&&(n=t,t=1e3),!o(t))throw new Error("priority must be a number");const i=this._getListeners(e);let r,a;const l={priority:t,callback:n};for(a=0;r=i[a];a++)if(r.priority<t)return void i.splice(a,0,l);i.push(l)}offGetComponent(e,t){const n=this._getListeners(e);let i,r,o;if(t)for(o=n.length-1;i=n[o];o--)r=i.callback,r===t&&n.splice(o,1);else n.length=0}_getListeners(e){let t=this._listeners[e];return t||(this._listeners[e]=t=[]),t}}],renderer:["type",ks]};class Ss{constructor(e,t){this._elementRegistry=e,this._eventBus=t,this._root=null,t.on("table.clear",(()=>{this.setRoot(null)}))}setRoot(e){if(this._root){const e=this._root;this._eventBus.fire("root.remove",{root:e}),this._root=null,this._eventBus.fire("root.removed",{root:e})}e&&this._eventBus.fire("root.add",{root:e}),this._root=e,e&&this._eventBus.fire("root.added",{root:e})}getRoot(){return this._root||this.setRoot({id:"__implicitroot",rows:[],cols:[]}),this._root}addRow(e,t){const n=this.getRoot();if(n.cols.length!=e.cells.length)throw new Error("number of cells is not equal to number of cols");return void 0===t&&(t=n.rows.length),Cs(t,n.rows,e),e.root=n,this._elementRegistry.add(e),e.cells.forEach(((i,r)=>{this._elementRegistry.add(i),i.row=e,i.col=n.cols[r],Cs(t,n.cols[r].cells,i)})),this._eventBus.fire("row.add",{row:e}),e}removeRow(e){const t=this.getRoot();"string"==typeof e&&(e=this._elementRegistry.get(e));const n=t.rows.indexOf(e);-1!==n&&(Es(n,t.rows),e.root=void 0,this._elementRegistry.remove(e),e.cells.forEach(((e,i)=>{this._elementRegistry.remove(e),e.col=void 0,Es(n,t.cols[i].cells)})),this._eventBus.fire("row.remove",{row:e}))}addCol(e,t){const n=this.getRoot();if(this._elementRegistry.add(e),n.rows.length!=e.cells.length)throw new Error("number of cells is not equal to number of rows");return void 0===t&&(t=n.cols.length),Cs(t,n.cols,e),e.root=n,e.cells.forEach(((i,r)=>{this._elementRegistry.add(i),i.col=e,i.row=n.rows[r],Cs(t,n.rows[r].cells,i)})),this._eventBus.fire("col.add",{col:e}),e}removeCol(e){const t=this.getRoot();"string"==typeof e&&(e=this._elementRegistry.get(e));const n=t.cols.indexOf(e);-1!==n&&(Es(n,t.cols),e.root=void 0,this._elementRegistry.remove(e),e.cells.forEach(((e,i)=>{this._elementRegistry.remove(e),e.row=void 0,Es(n,t.rows[i].cells)})),this._eventBus.fire("col.remove",{col:e}))}resized(){this._eventBus.fire("sheet.resized")}}function Cs(e,t,n){return t.splice(e,0,n)}function Es(e,t){return t.splice(e,1)}function Ms(e=!0){const t="number"==typeof e?e:e?300:0;return t?e=>function(e,t){let n=!1;return function(...i){n||(e(...i),n=!0,setTimeout((()=>{n=!1}),t))}}(e,t):e=>e}Ss.$inject=["elementRegistry","eventBus"],Ms.$inject=["config.throttle"];var As={__depends__:[_s],__init__:["elementFactory","sheet"],elementFactory:["type",class{constructor(){this._uid=12}create(e,t={}){return t.id||(t.id=e+"_"+this._uid++),function(e,t){const n=ms[e];if(!n)throw new Error("unknown type "+e);return new n(t)}(e,t)}createRoot(e){return this.create("root",e)}createRow(e){return this.create("row",e)}createCol(e){return this.create("col",e)}createCell(e){return this.create("cell",e)}}],elementRegistry:["type",vs],eventBus:["type",_],sheet:["type",Ss],throttle:["factory",Ms]};class Ds{constructor(e={}){let{injector:t}=e;if(!t){let{modules:n,config:i}=this._init(e);t=function(e,t){const n=[{config:["value",e]},As].concat(t||[]),i=new tn(n);return i.init(),i}(i,n)}this.get=t.get,this.invoke=t.invoke,this.get("eventBus").fire("table.init"),this.get("eventBus").fire("diagram.init")}_init(e){let{modules:t,...n}=e;return{modules:t,config:n}}destroy(){const e=this.get("eventBus");e.fire("table.destroy"),e.fire("diagram.destroy")}clear(){const e=this.get("eventBus");e.fire("table.clear"),e.fire("diagram.clear")}}function Rs(e){if(!e)return"<null>";const t=e.id?` id="${e.id}"`:"";return`<${e.$type}${t} />`}function Os(e,t){function n(t,n,i){if(t.gfx)throw new Error(`already rendered ${Rs(t)}`);return e.element(t,n,i)}function i(e,t,i){u(e,(function(e){n(e,t,i)}))}function r(e,t,i){u(e,(function(e){n(e,t,i)}))}return{handleDecision:function(t){t.id||(t.id="decision");const o=t.decisionLogic;if(!o)throw new Error(`no table for ${Rs(t)}`);{if(!o.output)throw new Error(`missing output for ${Rs(o)}`);const t=(c=o,e.table(c));o.input&&i(o.input,t,o),i(o.output,t,o),s=o.rule,a=t,l=o,u(s,(function(e){n(e,a,l),r(e.inputEntry,e),r(e.outputEntry,e)}))}var s,a,l,c}}}function Ts(e,t){const{elements:n,index:i}=e;return i[t]?e:{elements:[...n,t],index:{...i,[t]:!0}}}function Ns(...e){let t={elements:[],index:{}};return e.forEach((function(e){const n=typeof e;"string"===n&&e.length>0?t=Ts(t,e):"object"===n&&null!==e&&Object.keys(e).forEach((function(n){e[n]&&(t=Ts(t,n))}))})),function(e,t){return e.elements.join(t)}(t," ")}function Ps(e){return qs(e.constructor,e)}function qs(e,t){const n=e.$inject;if(!n)return;const{injector:i}=t.context,r=[...n,function(...e){for(const i in e){const r=n[i],o=e[i];t[r]=o}}];i.invoke(r)}function Bs(e,t){Object.keys(t).forEach((function(n){if("$inject"===n||"__init"===n)return;const i=t[n];"constructor"===n&&i.call(e,e.props,e.context);const r=e[n];if(void 0!==r){if("function"!=typeof r)throw new Error(`failed to mixin <${n}>: cannot combine with non-fn component value`);e[n]=function(e,...t){return function(...n){let i;return t.forEach((function(t){if(i=t.call(e,...n),void 0!==i)return!1})),i}.bind(e)}(e,r,i)}else e[n]=i.bind(e)})),"$inject"in t&&qs(t,e),"__init"in t&&t.__init.call(e,e.props,e.context)}const Ls={getSelectionClasses(){const{selected:e,selectedSecondary:t,focussed:n}=this.state;return Ns({selected:e,"selected-secondary":t,focussed:n})},selectionChanged(e){this.setState(e)},componentWillUpdate(e){e.elementId!==this.props.elementId&&this.updateSelectionSubscription(!1)},componentDidUpdate(e){e.elementId!==this.props.elementId&&this.updateSelectionSubscription(!0)},componentDidMount(){this.updateSelectionSubscription(!0)},componentWillUnmount(){this.updateSelectionSubscription(!1)},updateSelectionSubscription(e){const{elementId:t}=this.props;t&&t&&this.eventBus[e?"on":"off"](`selection.${t}.changed`,this.selectionChanged)},$inject:["eventBus"]};class Is extends oo{constructor(e,t){super(e,t),Bs(this,Ls),Ps(this)}getRenderProps(...e){const{className:t,elementId:n,coords:i,...r}=this.props,o={className:Ns(...e,this.getSelectionClasses(),t)};return n&&(o["data-element-id"]=n),i&&(o["data-coords"]=i),{...o,...r}}}class Fs extends Is{constructor(e,t){super(e,t),this.state={}}render(){const{children:e}=this.props;return Ui(zi(1,"td",null,e,0,{...this.getRenderProps("cell")}))}}const js={slotFill(e,t){const{type:n,context:i,...r}=e,o=this.components.getComponent(n,i)||t;return o?Ui(Hi(2,o,{...i,...r})):null},slotFills(e){const{type:t,context:n,...i}=e;return this.components.getComponents(t,n).map((e=>Ui(Hi(2,e,{...n,...i}))))},$inject:["components"]};class Vs extends oo{constructor(e,t){super(e,t),Bs(this,js),Ps(this)}componentDidMount(){this.changeSupport.onElementsChanged(this.getRoot(),this.onElementsChanged)}componentWillUnmount(){this.changeSupport.offElementsChanged(this.getRoot(),this.onElementsChanged)}onElementsChanged=()=>{this.forceUpdate()};getRoot(){return this.sheet.getRoot()}render(){const e=(this.getRoot().businessObject.get("annotationsWidth")||400)+"px";return zi(1,"th","annotation header",[this.slotFills({type:"cell-inner",context:{cellType:"annotations",col:this.sheet.getRoot(),minWidth:400}}),this.translate("Annotations")],0,{style:{width:e}})}}function $s(e){const{row:t}=e,{id:n,description:i}=t.businessObject;return Hi(2,Fs,{className:"annotation",elementId:n,children:i||"-"})}function zs(e){e.onGetComponent("cell",(({cellType:e})=>"after-label-cells"===e?Vs:"after-rule-cells"===e?$s:void 0))}Vs.$inject=["changeSupport","sheet","translate"],zs.$inject=["components"];var Hs={__init__:["annotationsProvider"],annotationsProvider:["type",zs]};function Ws(e,t){return b({id:e.id,type:e.$type,businessObject:e},t)}class Us{constructor(e,t,n){this._elementFactory=e,this._eventBus=t,this._sheet=n}add(e){let t;if(yi(e,"dmn:DecisionTable"))t=this._elementFactory.createRoot(Ws(e)),this._sheet.setRoot(t);else if(yi(e,"dmn:InputClause"))t=this._elementFactory.createCol(Ws(e)),this._sheet.addCol(t);else if(yi(e,"dmn:OutputClause"))t=this._elementFactory.createCol(Ws(e)),this._sheet.addCol(t);else if(yi(e,"dmn:DecisionRule")){e.inputEntry||(e.inputEntry=[]),e.outputEntry||(e.outputEntry=[]);const n=[...e.inputEntry,...e.outputEntry].map((e=>this._elementFactory.createCell(Ws(e))));t=this._elementFactory.createRow(b(Ws(e),{cells:n})),this._sheet.addRow(t)}return this._eventBus.fire("dmnElement.added",{element:t}),t}}Us.$inject=["elementFactory","eventBus","sheet"];var Gs={__depends__:[{__depends__:[jo],tableImporter:["type",Us]},_s]};class Ks extends oo{constructor(e,t){super(e,t),Bs(this,js),this._sheet=t.injector.get("sheet"),this._changeSupport=t.changeSupport}onElementsChanged=()=>{this.forceUpdate()};componentWillMount(){const e=this._sheet.getRoot();this._changeSupport.onElementsChanged(e.id,this.onElementsChanged)}componentWillUnmount(){const e=this._sheet.getRoot();this._changeSupport.offElementsChanged(e.id,this.onElementsChanged)}render(){const e=this._sheet.getRoot();if(!yi(e,"dmn:DMNElement"))return null;const t=vi(e),n=t.input,i=t.output;return zi(1,"thead",null,zi(1,"tr",null,[zi(1,"th","index-column"),this.slotFills({type:"cell",context:{cellType:"before-label-cells"}}),n&&n.map(((e,t)=>{const i=e.width||"192px";return this.slotFill({type:"cell",context:{cellType:"input-header",input:e,index:t,inputsLength:n.length,width:i},key:e.id},Xs)})),i.map(((e,t)=>this.slotFill({type:"cell",context:{cellType:"output-header",output:e,index:t,outputsLength:i.length},key:e.id},Ys))),this.slotFills({type:"cell",context:{cellType:"after-label-cells"}})],0),2)}}function Xs(e,t){const{input:n,className:i,index:r}=e,{label:o,inputExpression:s,inputValues:a}=n,l=t.injector.get("translate");return zi(1,"th",(i||"")+" input-cell",[zi(1,"div","clause",l(0===r?"When":"And"),0),o?zi(1,"div","input-label",o,0,{title:l("Input label: ")+o}):zi(1,"div","input-expression",s.text,0,{title:l("Input expression: ")+s.text}),zi(1,"div","input-variable",a&&a.text||s.typeRef,0,{title:a&&a.text?l("Input values"):l("Input type")})],0,{"data-col-id":n.id},n.id)}function Ys(e,t){const{output:n,className:i,index:r}=e,{label:o,name:s,outputValues:a,typeRef:l}=n,c=t.injector.get("translate");return zi(1,"th",(i||"")+" output-cell",[zi(1,"div","clause",c(0===r?"Then":"And"),0),o?zi(1,"div","output-label",o,0,{title:c("Output label")}):zi(1,"div","output-name",s,0,{title:c("Output name")}),zi(1,"div","output-variable",a&&a.text||l,0,{title:a&&a.text?c("Output values"):c("Output type")})],0,null,n.id)}function Js(e){e.onGetComponent("table.head",(()=>Ks))}Js.$inject=["components"];var Qs={__init__:["decisionTableHeadProvider"],decisionTableHeadProvider:["type",Js]};class Zs extends oo{constructor(e,t){super(e,t),this._translate=t.injector.get("translate"),Ps(this)}render(){const e=this.sheet.getRoot();if(!yi(e,"dmn:DMNElement"))return null;const{name:t}=e.businessObject.$parent,n=this.components.getComponent("hit-policy")||ea;return zi(1,"div","decision-table-properties",[zi(1,"div","decision-table-name",t,0,{title:this._translate("Decision name: ")+t}),zi(1,"div","decision-table-header-separator"),Hi(2,n)],4)}}function ea(){return null}Zs.$inject=["sheet","components"];class ta{constructor(e){e.onGetComponent("table.before",500,(()=>Zs))}}ta.$inject=["components"];var na={__init__:["decisionTableProperties"],decisionTableProperties:["type",ta]};class ia extends oo{render(){const{row:e,rowIndex:t}=this.props,{components:n}=this.context,i=n.getComponents("cell-inner",{cellType:"rule-index",row:e,rowIndex:t});return zi(1,"td","rule-index",[i&&i.map((n=>Hi(2,n,{row:e,rowIndex:t}))),t+1],0,{"data-element-id":e.id,"data-row-id":e.id})}}class ra{constructor(e){e.onGetComponent("cell",(({cellType:e})=>{if("before-rule-cells"===e)return ia}))}}ra.$inject=["components"];var oa={__init__:["decisionRuleIndices"],decisionRuleIndices:["type",ra]};const sa=[{label:"FEEL",value:"feel"}];class aa{constructor(e){this._injector=e;const t=e.get("config.expressionLanguages")||{};this._config={options:sa,defaults:{editor:"feel"}},t.options&&(this._config.options=t.options);const n=this._getLegacyDefaults();b(this._config.defaults,n,t.defaults)}getDefault(e){const{defaults:t}=this._config,n=t[e]||t.editor;return this._getLanguageByValue(n)||this.getAll()[0]}getLabel(e){const t=this._getLanguageByValue(e);return t?t.label:e}getAll(){return this._config.options}_getLegacyDefaults(){const e={},t=this._injector,n=t.get("config.defaultInputExpressionLanguage"),i=t.get("config.defaultOutputExpressionLanguage");return n&&(e.inputCell=n),i&&(e.outputCell=i),e}_getLanguageByValue(e){return c(this.getAll(),(t=>e===t.value))}}aa.$inject=["injector"];var la={__init__:["expressionLanguages"],expressionLanguages:["type",aa]};class ca extends oo{render({rows:e,cols:t}){const{components:n}=this.context;return zi(1,"tbody",null,e.map(((e,i)=>{const r=n.getComponent("row",{rowType:"rule"});return r&&Hi(2,r,{row:e,rowIndex:i,cols:t},e.id)})),0)}}class ha extends oo{constructor(e,t){super(e,t),Bs(this,js)}render(){const{row:e,rowIndex:t,cols:n}=this.props,{cells:i}=e;return zi(1,"tr",null,[this.slotFills({type:"cell",context:{cellType:"before-rule-cells",row:e,rowIndex:t}}),i.map(((i,r)=>this.slotFill({type:"cell",context:{cellType:"rule",cell:i,rowIndex:t,colIndex:r},key:i.id,row:e,col:n[r]}))),this.slotFills({type:"cell",context:{cellType:"after-rule-cells",row:e,rowIndex:t}})],0)}}class ua extends oo{render(){const{cell:e,row:t,col:n}=this.props;return yi(e,"dmn:UnaryTests")?Hi(2,Fs,{className:"input-cell",elementId:e.id,"data-row-id":t.id,"data-col-id":n.id,children:e.businessObject.text}):Hi(2,Fs,{className:"output-cell",elementId:e.id,"data-row-id":t.id,"data-col-id":n.id,children:e.businessObject.text})}}class da{constructor(e){e.onGetComponent("table.body",(()=>ca)),e.onGetComponent("row",(({rowType:e})=>{if("rule"===e)return ha})),e.onGetComponent("cell",(({cellType:e})=>{if("rule"===e)return ua}))}}da.$inject=["components"];var pa={__depends__:[la],__init__:["decisionRules"],decisionRules:["type",da]};const fa=[{label:"Unique",value:{hitPolicy:"UNIQUE",aggregation:void 0},explanation:"No overlap is possible and all rules are disjoint. Only a single rule can be matched"},{label:"First",value:{hitPolicy:"FIRST",aggregation:void 0},explanation:"Rules may overlap. The first matching rule will be chosen"},{label:"Priority",value:{hitPolicy:"PRIORITY",aggregation:void 0},explanation:"Rules may overlap. The one with the highest priority will be chosen"},{label:"Any",value:{hitPolicy:"ANY",aggregation:void 0},explanation:"Rules may overlap. Their output have to match"},{label:"Collect",value:{hitPolicy:"COLLECT",aggregation:void 0},explanation:"Collects the values of all matching rules"},{label:"Collect (Sum)",value:{hitPolicy:"COLLECT",aggregation:"SUM"},explanation:"Collects the values of all matching rules and sums up to a single value"},{label:"Collect (Min)",value:{hitPolicy:"COLLECT",aggregation:"MIN"},explanation:"Collects the values of all matching rules and uses the lowest value"},{label:"Collect (Max)",value:{hitPolicy:"COLLECT",aggregation:"MAX"},explanation:"Collects the values of all matching rules and uses the highest value"},{label:"Collect (Count)",value:{hitPolicy:"COLLECT",aggregation:"COUNT"},explanation:"Collects the values of all matching rules and counts the number of them"},{label:"Rule order",value:{hitPolicy:"RULE ORDER",aggregation:void 0},explanation:"Collects the values of all matching rules in rule order"},{label:"Output order",value:{hitPolicy:"OUTPUT ORDER",aggregation:void 0},explanation:"Collects the values of all matching rules in decreasing output priority order"}];class ga extends oo{constructor(e,t){super(e,t),this._translate=t.injector.get("translate"),Ps(this)}getRoot(){return this.sheet.getRoot()}render(){const e=this.getRoot().businessObject,{aggregation:t,hitPolicy:n}=e,i=c(fa,(e=>{return i=e.value,r={aggregation:t,hitPolicy:n},i.hitPolicy===r.hitPolicy&&i.aggregation===r.aggregation;var i,r}));return zi(1,"div","hit-policy header",[zi(1,"label","dms-label",this._translate("Hit policy:"),0),zi(1,"span","hit-policy-value",this._translate(i.label),0)],4,{title:this._translate(i.explanation)})}}function ma(e){e.onGetComponent("hit-policy",(()=>ga))}ga.$inject=["sheet"],ma.$inject=["components"];var ya={__init__:["hitPolicyProvider"],hitPolicyProvider:["type",ma]};let va=class extends oo{constructor(e,t){super(e,t);const{injector:n}=t;this._translate=n.get("translate"),this._eventBus=n.get("eventBus")}onClick=()=>{this._eventBus.fire("showDrd")};render(){return zi(1,"div","view-drd",zi(1,"button","view-drd-button",this._translate("View DRD"),0,{type:"button",onClick:this.onClick}),2,null,null,(e=>this.node=e))}},wa=class{constructor(e,t,n,i){this._injector=n,this._sheet=i,e.onGetComponent("table.before",(()=>{if(this.canViewDrd())return va})),t.on("showDrd",(()=>{const e=n.get("_parent",!1),t=ba(i.getRoot());if(!t)return;const r=e.getView(t);e.open(r)}))}canViewDrd(){const e=this._injector.get("_parent",!1);if(!e)return!1;const t=ba(this._sheet.getRoot());return!!e.getView(t)}};function ba(e){const{businessObject:t}=e;if(!t)return;return t.$parent.$parent}wa.$inject=["components","eventBus","injector","sheet"];var xa={__init__:["viewDrd"],viewDrd:["type",wa]};let ka=class{constructor(e){e.onGetComponent("table.before",(()=>co))}};ka.$inject=["components"];var _a={__init__:["poweredBy"],poweredBy:["type",ka]};let Sa=class e extends Ds{constructor(t={}){const n=e._createContainer();super(b(t,{renderer:{container:n}})),this._container=n}open(e){var t=this;return new Promise(((n,i)=>{var r;try{return t._decision&&t.clear(),t._decision=e,function(e,t,n){const i=e.get("tableImporter"),r=e.get("eventBus"),o=e.get("sheet");e.get("modeling",!1);let s,a=[];r.fire("import.render.start",{decision:t});try{!function(e){new Os({create:(e,t,n,r)=>i.create(e,t,n,r),table:e=>i.add(e),element:(e,t,n)=>i.add(e,t,n),error(e,t){a.push({message:e,context:t})}}).handleDecision(e)}(t)}catch(e){s=e}r.fire("import.render.complete",{error:s,warnings:a}),r.fire("elements.changed",{elements:[o.getRoot()]}),n(s,a)}(t,e,(function(e,t){e?(e.warnings=t||[],i(e)):n({warnings:t||[]})}))}catch(e){r=e}r?(r.warnings=r.warnings||[],i(r)):n({warnings:[]})}))}_init(e){let{modules:t,additionalModules:n,...i}=e,r=t||this.getModules();return{modules:[_a,...r,...n||[],...[{decisionTable:["value",this]}]],config:i}}on(e,t,n,i){return this.get("eventBus").on(e,t,n,i)}off(e,t){this.get("eventBus").off(e,t)}_emit(e,t){return this.get("eventBus").fire(e,t)}attachTo(e){if(!e)throw new Error("parentNode required");this.detach();const t=this._container;e.appendChild(t),this._emit("attach",{})}detach(){const e=this._container;e.parentNode&&(this._emit("detach",{}),Ft(e))}destroy(){super.destroy(),this.detach()}getModules(){return e._getModules()}static _getModules(){return[Hs,Gs,jo,Qs,na,oa,pa,ya,xa]}static _createContainer(){return Lt('<div class="dmn-decision-table-container"></div>')}};class Ca{constructor(e){this._listeners={},e.on("elements.changed",(({elements:e})=>{this.elementsChanged(e)})),e.on("element.updateId",(({element:e,newId:t})=>{this.updateId(e.id,t)}))}elementsChanged(e){const t={},n=e.length;for(let i=0;i<n;i++){const{id:n}=e[i];if(t[n])return;t[n]=!0;const r=this._listeners[n]&&this._listeners[n].length;if(r)for(let e=0;e<r;e++)this._listeners[n][e]&&this._listeners[n][e]()}}onElementsChanged(e,t){this._listeners[e]||(this._listeners[e]=[]),this._listeners[e][this._listeners[e].length]=t}offElementsChanged(e,t){if(this._listeners[e])if(t){const n=this._listeners[e].indexOf(t);-1!==n&&this._listeners[e].splice(n,1)}else this._listeners[e].length=0}updateId(e,t){this._listeners[e]&&(this._listeners[t]=this._listeners[e],delete this._listeners[e])}}Ca.$inject=["eventBus"];class Ea extends oo{constructor(e){super(e);const t=this._injector=e.injector;this._changeSupport=t.get("changeSupport"),this._components=t.get("components"),this._renderer=t.get("renderer")}getChildContext(){return{changeSupport:this._changeSupport,components:this._components,renderer:this._renderer,injector:this._injector}}render(){const e=this._components.getComponents("viewer");return zi(1,"div","viewer-container",e&&e.map(((e,t)=>Hi(2,e,null,t))),0)}}class Ma{constructor(e,t,n,i,r){const{container:o}=n;this._container=o,i.on("renderer.mount",(()=>{eo(Hi(2,Ea,{injector:r}),o)})),i.on("renderer.unmount",(()=>{eo(null,o)}))}getContainer(){return this._container}}Ma.$inject=["changeSupport","components","config.renderer","eventBus","injector"];var Aa={__init__:["changeSupport","components","renderer"],changeSupport:["type",Ca],components:["type",class{constructor(){this._listeners={}}getComponent(e,t){const n=this._listeners[e];if(!n)return;let i;for(let e=0;e<n.length&&(i=n[e].callback(t),!i);e++);return i}getComponents(e,t){const n=this._listeners[e];if(!n)return;const i=[];for(let e=0;e<n.length;e++){const r=n[e].callback(t);r&&i.push(r)}return i.length?i:void 0}onGetComponent(e,t,n){if(s(t)&&(n=t,t=1e3),!o(t))throw new Error("priority must be a number");const i=this._getListeners(e);let r,a;const l={priority:t,callback:n};for(a=0;r=i[a];a++)if(r.priority<t)return void i.splice(a,0,l);i.push(l)}offGetComponent(e,t){const n=this._getListeners(e);let i,r,o;if(t)for(o=n.length-1;i=n[o];o--)r=i.callback,r===t&&n.splice(o,1);else n.length=0}_getListeners(e){let t=this._listeners[e];return t||(this._listeners[e]=t=[]),t}}],eventBus:["type",_],renderer:["type",Ma]};let Da=class{constructor(e={}){let{injector:t}=e;if(!t){let{modules:n,config:i}=this._init(e);t=function(e,t){const n=[{config:["value",e]},Aa].concat(t||[]),i=new tn(n);return i.init(),i}(i,n)}this.get=t.get,this.invoke=t.invoke,this.get("eventBus").fire("viewer.init")}_init(e){let{modules:t,...n}=e;return{modules:t,config:n}}destroy(){this.get("eventBus").fire("viewer.destroy")}clear(){this.get("eventBus").fire("viewer.clear")}};class Ra{constructor(e,t){this._eventBus=t,this._viewer=e}getDecision(){return this._viewer.getDecision()}updateId(e,t){if(e!==this.getDecision())throw new Error("element !== decision");this._eventBus.fire("element.updateId",{element:e,newId:t}),e.id=t}}Ra.$inject=["viewer","eventBus"];var Oa={__init__:["elementRegistry"],elementRegistry:["type",Ra]};class Ta extends oo{constructor(e,t){super(e,t),this._viewer=t.injector.get("viewer")}render(){const{name:e}=this._viewer.getDecision();return zi(1,"div","decision-properties",zi(1,"h3","decision-name",e,0),2)}}let Na=class{constructor(e){e.onGetComponent("viewer",1500,(()=>Ta))}};Na.$inject=["components"];var Pa={__init__:["decisionProperties"],decisionProperties:["type",Na]};class qa extends oo{constructor(e,t){super(e,t),this._translate=t.injector.get("translate"),this._viewer=t.injector.get("viewer")}render(){const{decisionLogic:e,variable:t}=this._viewer.getDecision();return zi(1,"div","literal-expression-properties",zi(1,"table",null,[zi(1,"tr",null,[zi(1,"td",null,this._translate("Variable name:"),0),zi(1,"td",null,zi(1,"span",null,t.name||"-",0),2)],4),zi(1,"tr",null,[zi(1,"td",null,this._translate("Variable type:"),0),zi(1,"td",null,zi(1,"span",null,this._translate(t.typeRef||"")||"-",0),2)],4),zi(1,"tr",null,[zi(1,"td",null,this._translate("Expression language:"),0),zi(1,"td",null,zi(1,"span",null,e.expressionLanguage||"-",0),2)],4)],4),2)}}class Ba{constructor(e){e.onGetComponent("viewer",500,(()=>qa))}}Ba.$inject=["components"];var La={__depends__:[],__init__:["literalExpressionProperties"],literalExpressionProperties:["type",Ba]};let Ia=class{constructor(e){e.onGetComponent("viewer",2e3,(()=>co))}};Ia.$inject=["components"];var Fa={__init__:["poweredBy"],poweredBy:["type",Ia]};class ja extends oo{constructor(e,t){super(e,t),this._viewer=t.injector.get("viewer")}render(){const{text:e}=this._viewer.getDecision().decisionLogic;return zi(1,"div","textarea",zi(1,"div","content",e,0),2)}}class Va{constructor(e){e.onGetComponent("viewer",(()=>ja))}}Va.$inject=["components"];var $a={__init__:["textarea"],textarea:["type",Va]};let za=class extends oo{constructor(e,t){super(e,t);const{injector:n}=t;this._translate=n.get("translate"),this._eventBus=n.get("eventBus")}onClick=()=>{this._eventBus.fire("showDrd")};render(){return zi(1,"div","view-drd",zi(1,"button","view-drd-button",this._translate("View DRD"),0,{type:"button",onClick:this.onClick}),2,null,null,(e=>this.node=e))}};za.$inject=["translate"];let Ha=class{constructor(e,t,n,i){this._injector=i,this._viewer=t,e.onGetComponent("viewer",2e3,(()=>{if(this.canViewDrd())return za})),n.on("showDrd",(()=>{const e=i.get("_parent",!1),t=this.getDefinitions(),n=e.getView(t);e.open(n)}))}canViewDrd(){const e=this._injector.get("_parent",!1);if(!e)return;const t=this.getDefinitions();return!!e.getView(t)}getDefinitions(){return this._viewer.getDecision().$parent}};Ha.$inject=["components","viewer","eventBus","injector"];var Wa={__init__:["viewDrd"],viewDrd:["type",Ha]};let Ua=class e extends Da{constructor(t={}){const n=e._createContainer();super(b(t,{renderer:{container:n}})),this._container=n}open(e){var t=this;return new Promise((function(n,i){var r;try{t._decision&&(t.clear(),t.get("eventBus").fire("renderer.unmount")),t._decision=e,t.get("eventBus").fire("import",e),t.get("eventBus").fire("renderer.mount")}catch(e){r=e}r?(r.warnings=r.warnings||[],i(r)):n({warnings:[]})}))}_init(e){let{modules:t,additionalModules:n,...i}=e;return{modules:[...t||this.getModules(),...n||[],...[{viewer:["value",this]}]],config:i}}on(e,t,n,i){return this.get("eventBus").on(e,t,n,i)}off(e,t){this.get("eventBus").off(e,t)}_emit(e,t){return this.get("eventBus").fire(e,t)}getDecision(){return this._decision}attachTo(e){if(!e)throw new Error("parentNode required");this.detach(),e.appendChild(this._container),this._emit("attach",{})}detach(){const e=this._container;e.parentNode&&(this._emit("detach",{}),Ft(e))}destroy(){super.destroy(),this.detach()}getModules(){return e._getModules()}static _getModules(){return[Oa,jo,Pa,La,Fa,$a,Wa]}static _createContainer(){return Lt('<div class="dmn-literal-expression-container"></div>')}};function Ga(e,{injector:t}){const n=t.get("components").getComponents("header");return zi(1,"div","dmn-boxed-expression-section dmn-boxed-expression-header",n&&n.map(((e,t)=>Hi(2,e,null,t))),0)}function Ka(e,{injector:t}){const n=t.get("components").getComponents("body");return zi(1,"div","dmn-boxed-expression-section dmn-boxed-expression-body",n&&n.map(((e,t)=>Hi(2,e,null,t))),0)}function Xa(e,{injector:t}){const n=t.get("components").getComponents("footer");return zi(1,"div","dmn-boxed-expression-section dmn-boxed-expression-footer",n&&n.map(((e,t)=>Hi(2,e,null,t))),0)}var Ya={__init__:["viewRenderer","tableJsSupport"],viewRenderer:["type",class{static $inject=["components"];constructor(e){e.onGetComponent("viewer",(()=>Ga)),e.onGetComponent("viewer",(()=>Ka)),e.onGetComponent("viewer",(()=>Xa))}}],tableJsSupport:["type",class{static $inject=["components"];constructor(e){e.onGetComponent("viewer",(()=>{const t=e.getComponents("table.before")||[];return()=>zi(1,"div",null,t.map(((e,t)=>Hi(2,e,null,t))),0)}))}}]};class Ja{constructor(e){e.onGetComponent("viewer",2e3,(()=>co))}}Ja.$inject=["components"];var Qa={__init__:["poweredBy"],poweredBy:["type",Ja]};function Za({expression:e},t){return zi(1,"div","textarea",zi(1,"div","content",t.injector.get("literalExpression").getText(e),0),2)}class el{getText(e){return e.get("text")}}var tl={__init__:["literalExpressionComponent"],literalExpressionComponent:["type",class{static $inject=["components"];constructor(e){e.onGetComponent("expression",(({expression:e})=>{if(yi(e,"dmn:LiteralExpression"))return Za}))}}],literalExpression:["type",el]};function nl({expression:e},t){const n=t.injector.get("functionDefinition"),i=n.getKind(e),r=n.getParameters(e),o=n.getBody(e);return zi(1,"div","function-definition",[Hi(2,rl,{kind:i}),Hi(2,ol,{parameters:r}),Hi(2,al,{expression:o})],4)}const il={FEEL:"F",Java:"J",PMML:"P"};function rl({kind:e},t){const n=t.injector.get("translate");return zi(1,"div","function-definition-kind",il[e],0,{title:n("Function kind: {kind}",{kind:e})})}function ol({parameters:e}){return zi(1,"div","function-definition-parameters",zi(1,"div",null,[Wi("("),e.reduce(((e,t)=>e.concat(Hi(2,sl,{parameter:t}),", ")),[]).slice(0,-1),Wi(")")],0),2)}function sl({parameter:e}){const{name:t,typeRef:n}=e,i=t||"<unnamed>";return zi(1,"span",null,n?`${i}: ${n}`:i,0)}function al({expression:e},t){return zi(1,"div","function-definition-body",Hi(2,t.components.getComponent("expression",{expression:e}),{expression:e}),2)}var ll={__init__:["functionDefinitionComponent"],functionDefinition:["type",class{getParameters(e){return e.get("formalParameter")}getBody(e){return e.get("body")}getKind(e){return e.get("kind")||"FEEL"}}],functionDefinitionComponent:["type",class{static $inject=["components"];constructor(e){e.onGetComponent("expression",(({expression:e})=>{if(yi(e,"dmn:FunctionDefinition"))return nl}))}}]};class cl extends oo{constructor(e,t){super(e,t);const{injector:n}=t;this._translate=n.get("translate"),this._eventBus=n.get("eventBus")}onClick=()=>{this._eventBus.fire("showDrd")};render(){return zi(1,"div","view-drd",zi(1,"button","view-drd-button",this._translate("View DRD"),0,{type:"button",onClick:this.onClick}),2,null,null,(e=>this.node=e))}}cl.$inject=["translate"];class hl{constructor(e,t,n){this._injector=n,e.onGetComponent("viewer",2e3,(()=>{if(this.canViewDrd())return cl})),t.on("showDrd",(()=>{const e=n.get("_parent",!1),t=e.getDefinitions(),i=e.getView(t);e.open(i)}))}canViewDrd(){const e=this._injector.get("_parent",!1);if(!e)return;const t=e.getDefinitions();return!!e.getView(t)}}hl.$inject=["components","eventBus","injector"];var ul={__init__:["viewDrd"],viewDrd:["type",hl]};function dl(e,t){const n=t.injector.get("viewer"),{name:i}=n.getRootElement();return zi(1,"div","element-properties",zi(1,"h2","element-name",i,0),2)}class pl{constructor(e){e.onGetComponent("header",(()=>dl))}}pl.$inject=["components"];var fl={__init__:["elementProperties"],elementProperties:["type",pl]};function gl(e,{injector:t}){const n=t.get("components"),i=function(e){if(yi(e,"dmn:Decision"))return e.get("decisionLogic");if(yi(e,"dmn:BusinessKnowledgeModel"))return e.get("encapsulatedLogic")}(t.get("viewer").getRootElement());return Hi(2,n.getComponent("expression",{expression:i}),{expression:i})}function ml({expression:e}){return zi(1,"div",null,zi(1,"span",null,[Wi("Expression of type "),e.$type,Wi(" is not supported.")],0,{style:"color:red;"}),2)}var yl={__init__:["elementLogic"],elementLogic:["type",class{static $inject=["components"];constructor(e){e.onGetComponent("body",(()=>gl)),e.onGetComponent("expression",100,(()=>ml))}}]};function vl(e,t){const n=t.injector.get("elementVariable"),i=t.injector.get("translate"),r=n.getName(),o=n.getType();return zi(1,"div","element-variable",[zi(1,"h2",null,Wi("Result"),2),zi(1,"div","element-variable-name",[zi(1,"span","element-variable-name-label",i("Variable name"),0),zi(1,"span",null,r,0)],4),zi(1,"div","element-variable-type",[zi(1,"span","element-variable-type-label",i("Variable type"),0),zi(1,"span",null,o,0)],4)],4)}var wl={__init__:["elementVariableComponent"],elementVariable:["type",class{static $inject=["viewer"];constructor(e){this._viewer=e}getName(){const e=this.getVariable(),t=this._getElement();return(e?e.get("name"):null)||t.get("name")}getType(){const e=this.getVariable();return e?e.get("typeRef"):"Any"}_getElement(){return this._viewer.getRootElement()}getVariable(){return this._getElement().get("variable")}}],elementVariableComponent:["type",class{static $inject=["components"];constructor(e){e.onGetComponent("footer",(()=>vl))}}]};let bl=class e extends Da{constructor(t={}){const n=e._createContainer();super(b(t,{renderer:{container:n}})),this._container=n}open(e){const t=this.get("eventBus");return new Promise(((n,i)=>{let r;try{this.getRootElement()&&(this.clear(),t.fire("renderer.unmount")),this._setRootElement(e),t.fire("import",e),t.fire("renderer.mount")}catch(e){r=e}r?(r.warnings=r.warnings||[],i(r)):n({warnings:[]})}))}_init(e){let{modules:t,additionalModules:n,...i}=e;return{modules:[...t||this.getModules(),...n||[],...[{viewer:["value",this]}]],config:i}}on(e,t,n,i){return this.get("eventBus").on(e,t,n,i)}off(e,t){this.get("eventBus").off(e,t)}_emit(e,t){return this.get("eventBus").fire(e,t)}getRootElement(){return this._root}_setRootElement(e){this._root=e}attachTo(e){if(!e)throw new Error("parentNode required");this.detach(),e.appendChild(this._container),this._emit("attach",{})}detach(){const e=this._container;e.parentNode&&(this._emit("detach",{}),Ft(e))}destroy(){super.destroy(),this.detach()}getModules(){return[Ya,jo,Qa,ul,fl,yl,ll,tl,wl]}static _createContainer(){return Lt('<div class="dmn-boxed-expression-container"></div>')}};window.getSelection();var xl,kl={exports:{}};!function(){if(xl)return kl.exports;function e(e,t){return{start:e,end:void 0===t?e:t}}xl=1,kl.exports=function(t,n,i){var r=t.start,o=r,s=(i.length,n.length);i.length,n.length;var a=n.substring(r);return i.lastIndexOf(a)===i.length-a.length&&(n=n.substring(0,n.length-a.length),i=i.substring(0,i.length-a.length)),s=function(e,t){var n,i,r,o=0,s=0;t.length>e.length?(i=t,r=e):(i=e,r=t);for(;o<i.length;)i.charAt(o)!==r.charAt(s)?(n||(n={l_start:o,s_start:s}),o++):(n&&!n.complete&&(n.l_end=o,n.s_end=s,n.complete=!0),s++,o++);n&&!n.complete&&(n.complete=!0,n.s_end=r.length,n.l_end=i.length);if(!n)return;return t.length>e.length?{newStart:n.l_start,newEnd:n.l_end,type:"add"}:{newStart:n.s_start,newEnd:n.s_end,type:t.length<e.length?"remove":"replace"}}(n,i),s&&(o="remove"===s.type?s.newStart:s.newEnd),e(o)},kl.exports.range=e,kl.exports}();let _l=[],Sl=[];function Cl(e){if(e<768)return!1;for(let t=0,n=_l.length;;){let i=t+n>>1;if(e<_l[i])n=i;else{if(!(e>=Sl[i]))return!0;t=i+1}if(t==n)return!1}}function El(e){return e>=127462&&e<=127487}(()=>{let e="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map((e=>e?parseInt(e,36):1));for(let t=0,n=0;t<e.length;t++)(t%2?Sl:_l).push(n+=e[t])})();const Ml=8205;function Al(e,t,n=!0,i=!0){return(n?Dl:Rl)(e,t,i)}function Dl(e,t,n){if(t==e.length)return t;t&&Tl(e.charCodeAt(t))&&Nl(e.charCodeAt(t-1))&&t--;let i=Ol(e,t);for(t+=Pl(i);t<e.length;){let r=Ol(e,t);if(i==Ml||r==Ml||n&&Cl(r))t+=Pl(r),i=r;else{if(!El(r))break;{let n=0,i=t-2;for(;i>=0&&El(Ol(e,i));)n++,i-=2;if(n%2==0)break;t+=2}}}return t}function Rl(e,t,n){for(;t>0;){let i=Dl(e,t-2,n);if(i<t)return i;t--}return 0}function Ol(e,t){let n=e.charCodeAt(t);if(!Nl(n)||t+1==e.length)return n;let i=e.charCodeAt(t+1);return Tl(i)?i-56320+(n-55296<<10)+65536:n}function Tl(e){return e>=56320&&e<57344}function Nl(e){return e>=55296&&e<56320}function Pl(e){return e<65536?1:2}class ql{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,n){[e,t]=Hl(this,e,t);let i=[];return this.decompose(0,e,i,2),n.length&&n.decompose(0,n.length,i,3),this.decompose(t,this.length,i,1),Ll.from(i,this.length-(t-e)+n.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=Hl(this,e,t);let n=[];return this.decompose(e,t,n,0),Ll.from(n,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),n=this.length-this.scanIdentical(e,-1),i=new jl(this),r=new jl(e);for(let e=t,o=t;;){if(i.next(e),r.next(e),e=0,i.lineBreak!=r.lineBreak||i.done!=r.done||i.value!=r.value)return!1;if(o+=i.value.length,i.done||o>=n)return!0}}iter(e=1){return new jl(this,e)}iterRange(e,t=this.length){return new Vl(this,e,t)}iterLines(e,t){let n;if(null==e)n=this.iter();else{null==t&&(t=this.lines+1);let i=this.line(e).from;n=this.iterRange(i,Math.max(i,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new $l(n)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(0==e.length)throw new RangeError("A document must have at least one line");return 1!=e.length||e[0]?e.length<=32?new Bl(e):Ll.from(Bl.split(e,[])):ql.empty}}class Bl extends ql{constructor(e,t=function(e){let t=-1;for(let n of e)t+=n.length+1;return t}(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,n,i){for(let r=0;;r++){let o=this.text[r],s=i+o.length;if((t?n:s)>=e)return new zl(i,s,n,o);i=s+1,n++}}decompose(e,t,n,i){let r=e<=0&&t>=this.length?this:new Bl(Fl(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(1&i){let e=n.pop(),t=Il(r.text,e.text.slice(),0,r.length);if(t.length<=32)n.push(new Bl(t,e.length+r.length));else{let e=t.length>>1;n.push(new Bl(t.slice(0,e)),new Bl(t.slice(e)))}}else n.push(r)}replace(e,t,n){if(!(n instanceof Bl))return super.replace(e,t,n);[e,t]=Hl(this,e,t);let i=Il(this.text,Il(n.text,Fl(this.text,0,e)),t),r=this.length+n.length-(t-e);return i.length<=32?new Bl(i,r):Ll.from(Bl.split(i,[]),r)}sliceString(e,t=this.length,n="\n"){[e,t]=Hl(this,e,t);let i="";for(let r=0,o=0;r<=t&&o<this.text.length;o++){let s=this.text[o],a=r+s.length;r>e&&o&&(i+=n),e<a&&t>r&&(i+=s.slice(Math.max(0,e-r),t-r)),r=a+1}return i}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let n=[],i=-1;for(let r of e)n.push(r),i+=r.length+1,32==n.length&&(t.push(new Bl(n,i)),n=[],i=-1);return i>-1&&t.push(new Bl(n,i)),t}}class Ll extends ql{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let t of e)this.lines+=t.lines}lineInner(e,t,n,i){for(let r=0;;r++){let o=this.children[r],s=i+o.length,a=n+o.lines-1;if((t?a:s)>=e)return o.lineInner(e,t,n,i);i=s+1,n=a+1}}decompose(e,t,n,i){for(let r=0,o=0;o<=t&&r<this.children.length;r++){let s=this.children[r],a=o+s.length;if(e<=a&&t>=o){let r=i&((o<=e?1:0)|(a>=t?2:0));o>=e&&a<=t&&!r?n.push(s):s.decompose(e-o,t-o,n,r)}o=a+1}}replace(e,t,n){if([e,t]=Hl(this,e,t),n.lines<this.lines)for(let i=0,r=0;i<this.children.length;i++){let o=this.children[i],s=r+o.length;if(e>=r&&t<=s){let a=o.replace(e-r,t-r,n),l=this.lines-o.lines+a.lines;if(a.lines<l>>4&&a.lines>l>>6){let r=this.children.slice();return r[i]=a,new Ll(r,this.length-(t-e)+n.length)}return super.replace(r,s,a)}r=s+1}return super.replace(e,t,n)}sliceString(e,t=this.length,n="\n"){[e,t]=Hl(this,e,t);let i="";for(let r=0,o=0;r<this.children.length&&o<=t;r++){let s=this.children[r],a=o+s.length;o>e&&r&&(i+=n),e<a&&t>o&&(i+=s.sliceString(e-o,t-o,n)),o=a+1}return i}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof Ll))return 0;let n=0,[i,r,o,s]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;i+=t,r+=t){if(i==o||r==s)return n;let a=this.children[i],l=e.children[r];if(a!=l)return n+a.scanIdentical(l,t);n+=a.length+1}}static from(e,t=e.reduce(((e,t)=>e+t.length+1),-1)){let n=0;for(let t of e)n+=t.lines;if(n<32){let n=[];for(let t of e)t.flatten(n);return new Bl(n,t)}let i=Math.max(32,n>>5),r=i<<1,o=i>>1,s=[],a=0,l=-1,c=[];function h(e){let t;if(e.lines>r&&e instanceof Ll)for(let t of e.children)h(t);else e.lines>o&&(a>o||!a)?(u(),s.push(e)):e instanceof Bl&&a&&(t=c[c.length-1])instanceof Bl&&e.lines+t.lines<=32?(a+=e.lines,l+=e.length+1,c[c.length-1]=new Bl(t.text.concat(e.text),t.length+1+e.length)):(a+e.lines>i&&u(),a+=e.lines,l+=e.length+1,c.push(e))}function u(){0!=a&&(s.push(1==c.length?c[0]:Ll.from(c,l)),l=-1,a=c.length=0)}for(let t of e)h(t);return u(),1==s.length?s[0]:new Ll(s,t)}}function Il(e,t,n=0,i=1e9){for(let r=0,o=0,s=!0;o<e.length&&r<=i;o++){let a=e[o],l=r+a.length;l>=n&&(l>i&&(a=a.slice(0,i-r)),r<n&&(a=a.slice(n-r)),s?(t[t.length-1]+=a,s=!1):t.push(a)),r=l+1}return t}function Fl(e,t,n){return Il(e,[""],t,n)}ql.empty=new Bl([""],0);class jl{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[t>0?1:(e instanceof Bl?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let n=this.nodes.length-1,i=this.nodes[n],r=this.offsets[n],o=r>>1,s=i instanceof Bl?i.text.length:i.children.length;if(o==(t>0?s:0)){if(0==n)return this.done=!0,this.value="",this;t>0&&this.offsets[n-1]++,this.nodes.pop(),this.offsets.pop()}else if((1&r)==(t>0?0:1)){if(this.offsets[n]+=t,0==e)return this.lineBreak=!0,this.value="\n",this;e--}else if(i instanceof Bl){let r=i.text[o+(t<0?-1:0)];if(this.offsets[n]+=t,r.length>Math.max(0,e))return this.value=0==e?r:t>0?r.slice(e):r.slice(0,r.length-e),this;e-=r.length}else{let r=i.children[o+(t<0?-1:0)];e>r.length?(e-=r.length,this.offsets[n]+=t):(t<0&&this.offsets[n]--,this.nodes.push(r),this.offsets.push(t>0?1:(r instanceof Bl?r.text.length:r.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class Vl{constructor(e,t,n){this.value="",this.done=!1,this.cursor=new jl(e,t>n?-1:1),this.pos=t>n?e.length:0,this.from=Math.min(t,n),this.to=Math.max(t,n)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let n=t<0?this.pos-this.from:this.to-this.pos;e>n&&(e=n),n-=e;let{value:i}=this.cursor.next(e);return this.pos+=(i.length+e)*t,this.value=i.length<=n?i:t<0?i.slice(i.length-n):i.slice(0,n),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&""!=this.value}}class $l{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:n,value:i}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):n?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=i,this.afterBreak=!1),this}get lineBreak(){return!1}}"undefined"!=typeof Symbol&&(ql.prototype[Symbol.iterator]=function(){return this.iter()},jl.prototype[Symbol.iterator]=Vl.prototype[Symbol.iterator]=$l.prototype[Symbol.iterator]=function(){return this});class zl{constructor(e,t,n,i){this.from=e,this.to=t,this.number=n,this.text=i}get length(){return this.to-this.from}}function Hl(e,t,n){return[t=Math.max(0,Math.min(e.length,t)),Math.max(t,Math.min(e.length,n))]}function Wl(e,t,n=!0,i=!0){return Al(e,t,n,i)}const Ul=/\r\n?|\n/;var Gl=function(e){return e[e.Simple=0]="Simple",e[e.TrackDel=1]="TrackDel",e[e.TrackBefore=2]="TrackBefore",e[e.TrackAfter=3]="TrackAfter",e}(Gl||(Gl={}));class Kl{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;t<this.sections.length;t+=2)e+=this.sections[t];return e}get newLength(){let e=0;for(let t=0;t<this.sections.length;t+=2){let n=this.sections[t+1];e+=n<0?this.sections[t]:n}return e}get empty(){return 0==this.sections.length||2==this.sections.length&&this.sections[1]<0}iterGaps(e){for(let t=0,n=0,i=0;t<this.sections.length;){let r=this.sections[t++],o=this.sections[t++];o<0?(e(n,i,r),i+=r):i+=o,n+=r}}iterChangedRanges(e,t=!1){Ql(this,e,t)}get invertedDesc(){let e=[];for(let t=0;t<this.sections.length;){let n=this.sections[t++],i=this.sections[t++];i<0?e.push(n,i):e.push(i,n)}return new Kl(e)}composeDesc(e){return this.empty?e:e.empty?this:ec(this,e)}mapDesc(e,t=!1){return e.empty?this:Zl(this,e,t)}mapPos(e,t=-1,n=Gl.Simple){let i=0,r=0;for(let o=0;o<this.sections.length;){let s=this.sections[o++],a=this.sections[o++],l=i+s;if(a<0){if(l>e)return r+(e-i);r+=s}else{if(n!=Gl.Simple&&l>=e&&(n==Gl.TrackDel&&i<e&&l>e||n==Gl.TrackBefore&&i<e||n==Gl.TrackAfter&&l>e))return null;if(l>e||l==e&&t<0&&!s)return e==i||t<0?r:r+a;r+=a}i=l}if(e>i)throw new RangeError(`Position ${e} is out of range for changeset of length ${i}`);return r}touchesRange(e,t=e){for(let n=0,i=0;n<this.sections.length&&i<=t;){let r=i+this.sections[n++];if(this.sections[n++]>=0&&i<=t&&r>=e)return!(i<e&&r>t)||"cover";i=r}return!1}toString(){let e="";for(let t=0;t<this.sections.length;){let n=this.sections[t++],i=this.sections[t++];e+=(e?" ":"")+n+(i>=0?":"+i:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some((e=>"number"!=typeof e)))throw new RangeError("Invalid JSON representation of ChangeDesc");return new Kl(e)}static create(e){return new Kl(e)}}class Xl extends Kl{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return Ql(this,((t,n,i,r,o)=>e=e.replace(i,i+(n-t),o)),!1),e}mapDesc(e,t=!1){return Zl(this,e,t,!0)}invert(e){let t=this.sections.slice(),n=[];for(let i=0,r=0;i<t.length;i+=2){let o=t[i],s=t[i+1];if(s>=0){t[i]=s,t[i+1]=o;let a=i>>1;for(;n.length<a;)n.push(ql.empty);n.push(o?e.slice(r,r+o):ql.empty)}r+=o}return new Xl(t,n)}compose(e){return this.empty?e:e.empty?this:ec(this,e,!0)}map(e,t=!1){return e.empty?this:Zl(this,e,t,!0)}iterChanges(e,t=!1){Ql(this,e,t)}get desc(){return Kl.create(this.sections)}filter(e){let t=[],n=[],i=[],r=new tc(this);e:for(let o=0,s=0;;){let a=o==e.length?1e9:e[o++];for(;s<a||s==a&&0==r.len;){if(r.done)break e;let e=Math.min(r.len,a-s);Yl(i,e,-1);let o=-1==r.ins?-1:0==r.off?r.ins:0;Yl(t,e,o),o>0&&Jl(n,t,r.text),r.forward(e),s+=e}let l=e[o++];for(;s<l;){if(r.done)break e;let e=Math.min(r.len,l-s);Yl(t,e,-1),Yl(i,e,-1==r.ins?-1:0==r.off?r.ins:0),r.forward(e),s+=e}}return{changes:new Xl(t,n),filtered:Kl.create(i)}}toJSON(){let e=[];for(let t=0;t<this.sections.length;t+=2){let n=this.sections[t],i=this.sections[t+1];i<0?e.push(n):0==i?e.push([n]):e.push([n].concat(this.inserted[t>>1].toJSON()))}return e}static of(e,t,n){let i=[],r=[],o=0,s=null;function a(e=!1){if(!e&&!i.length)return;o<t&&Yl(i,t-o,-1);let n=new Xl(i,r);s=s?s.compose(n.map(s)):n,i=[],r=[],o=0}return function e(l){if(Array.isArray(l))for(let t of l)e(t);else if(l instanceof Xl){if(l.length!=t)throw new RangeError(`Mismatched change set length (got ${l.length}, expected ${t})`);a(),s=s?s.compose(l.map(s)):l}else{let{from:e,to:s=e,insert:c}=l;if(e>s||e<0||s>t)throw new RangeError(`Invalid change range ${e} to ${s} (in doc of length ${t})`);let h=c?"string"==typeof c?ql.of(c.split(n||Ul)):c:ql.empty,u=h.length;if(e==s&&0==u)return;e<o&&a(),e>o&&Yl(i,e-o,-1),Yl(i,s-e,u),Jl(r,i,h),o=s}}(e),a(!s),s}static empty(e){return new Xl(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let t=[],n=[];for(let i=0;i<e.length;i++){let r=e[i];if("number"==typeof r)t.push(r,-1);else{if(!Array.isArray(r)||"number"!=typeof r[0]||r.some(((e,t)=>t&&"string"!=typeof e)))throw new RangeError("Invalid JSON representation of ChangeSet");if(1==r.length)t.push(r[0],0);else{for(;n.length<i;)n.push(ql.empty);n[i]=ql.of(r.slice(1)),t.push(r[0],n[i].length)}}}return new Xl(t,n)}static createSet(e,t){return new Xl(e,t)}}function Yl(e,t,n,i=!1){if(0==t&&n<=0)return;let r=e.length-2;r>=0&&n<=0&&n==e[r+1]?e[r]+=t:r>=0&&0==t&&0==e[r]?e[r+1]+=n:i?(e[r]+=t,e[r+1]+=n):e.push(t,n)}function Jl(e,t,n){if(0==n.length)return;let i=t.length-2>>1;if(i<e.length)e[e.length-1]=e[e.length-1].append(n);else{for(;e.length<i;)e.push(ql.empty);e.push(n)}}function Ql(e,t,n){let i=e.inserted;for(let r=0,o=0,s=0;s<e.sections.length;){let a=e.sections[s++],l=e.sections[s++];if(l<0)r+=a,o+=a;else{let c=r,h=o,u=ql.empty;for(;c+=a,h+=l,l&&i&&(u=u.append(i[s-2>>1])),!(n||s==e.sections.length||e.sections[s+1]<0);)a=e.sections[s++],l=e.sections[s++];t(r,c,o,h,u),r=c,o=h}}}function Zl(e,t,n,i=!1){let r=[],o=i?[]:null,s=new tc(e),a=new tc(t);for(let e=-1;;){if(s.done&&a.len||a.done&&s.len)throw new Error("Mismatched change set lengths");if(-1==s.ins&&-1==a.ins){let e=Math.min(s.len,a.len);Yl(r,e,-1),s.forward(e),a.forward(e)}else if(a.ins>=0&&(s.ins<0||e==s.i||0==s.off&&(a.len<s.len||a.len==s.len&&!n))){let t=a.len;for(Yl(r,a.ins,-1);t;){let n=Math.min(s.len,t);s.ins>=0&&e<s.i&&s.len<=n&&(Yl(r,0,s.ins),o&&Jl(o,r,s.text),e=s.i),s.forward(n),t-=n}a.next()}else{if(!(s.ins>=0)){if(s.done&&a.done)return o?Xl.createSet(r,o):Kl.create(r);throw new Error("Mismatched change set lengths")}{let t=0,n=s.len;for(;n;)if(-1==a.ins){let e=Math.min(n,a.len);t+=e,n-=e,a.forward(e)}else{if(!(0==a.ins&&a.len<n))break;n-=a.len,a.next()}Yl(r,t,e<s.i?s.ins:0),o&&e<s.i&&Jl(o,r,s.text),e=s.i,s.forward(s.len-n)}}}}function ec(e,t,n=!1){let i=[],r=n?[]:null,o=new tc(e),s=new tc(t);for(let e=!1;;){if(o.done&&s.done)return r?Xl.createSet(i,r):Kl.create(i);if(0==o.ins)Yl(i,o.len,0,e),o.next();else if(0!=s.len||s.done){if(o.done||s.done)throw new Error("Mismatched change set lengths");{let t=Math.min(o.len2,s.len),n=i.length;if(-1==o.ins){let n=-1==s.ins?-1:s.off?0:s.ins;Yl(i,t,n,e),r&&n&&Jl(r,i,s.text)}else-1==s.ins?(Yl(i,o.off?0:o.len,t,e),r&&Jl(r,i,o.textBit(t))):(Yl(i,o.off?0:o.len,s.off?0:s.ins,e),r&&!s.off&&Jl(r,i,s.text));e=(o.ins>t||s.ins>=0&&s.len>t)&&(e||i.length>n),o.forward2(t),s.forward(t)}}else Yl(i,0,s.ins,e),r&&Jl(r,i,s.text),s.next()}}class tc{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return-2==this.ins}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,t=this.i-2>>1;return t>=e.length?ql.empty:e[t]}textBit(e){let{inserted:t}=this.set,n=this.i-2>>1;return n>=t.length&&!e?ql.empty:t[n].slice(this.off,null==e?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){-1==this.ins?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class nc{constructor(e,t,n){this.from=e,this.to=t,this.flags=n}get anchor(){return 32&this.flags?this.to:this.from}get head(){return 32&this.flags?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return 8&this.flags?-1:16&this.flags?1:0}get bidiLevel(){let e=7&this.flags;return 7==e?null:e}get goalColumn(){let e=this.flags>>6;return 16777215==e?void 0:e}map(e,t=-1){let n,i;return this.empty?n=i=e.mapPos(this.from,t):(n=e.mapPos(this.from,1),i=e.mapPos(this.to,-1)),n==this.from&&i==this.to?this:new nc(n,i,this.flags)}extend(e,t=e){if(e<=this.anchor&&t>=this.anchor)return ic.range(e,t);let n=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return ic.range(this.anchor,n)}eq(e,t=!1){return!(this.anchor!=e.anchor||this.head!=e.head||t&&this.empty&&this.assoc!=e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||"number"!=typeof e.anchor||"number"!=typeof e.head)throw new RangeError("Invalid JSON representation for SelectionRange");return ic.range(e.anchor,e.head)}static create(e,t,n){return new nc(e,t,n)}}class ic{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:ic.create(this.ranges.map((n=>n.map(e,t))),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let n=0;n<this.ranges.length;n++)if(!this.ranges[n].eq(e.ranges[n],t))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return 1==this.ranges.length?this:new ic([this.main],0)}addRange(e,t=!0){return ic.create([e].concat(this.ranges),t?0:this.mainIndex+1)}replaceRange(e,t=this.mainIndex){let n=this.ranges.slice();return n[t]=e,ic.create(n,this.mainIndex)}toJSON(){return{ranges:this.ranges.map((e=>e.toJSON())),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||"number"!=typeof e.main||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new ic(e.ranges.map((e=>nc.fromJSON(e))),e.main)}static single(e,t=e){return new ic([ic.range(e,t)],0)}static create(e,t=0){if(0==e.length)throw new RangeError("A selection needs at least one range");for(let n=0,i=0;i<e.length;i++){let r=e[i];if(r.empty?r.from<=n:r.from<n)return ic.normalized(e.slice(),t);n=r.to}return new ic(e,t)}static cursor(e,t=0,n,i){return nc.create(e,e,(0==t?0:t<0?8:16)|(null==n?7:Math.min(6,n))|(null!=i?i:16777215)<<6)}static range(e,t,n,i){let r=(null!=n?n:16777215)<<6|(null==i?7:Math.min(6,i));return t<e?nc.create(t,e,48|r):nc.create(e,t,(t>e?8:0)|r)}static normalized(e,t=0){let n=e[t];e.sort(((e,t)=>e.from-t.from)),t=e.indexOf(n);for(let n=1;n<e.length;n++){let i=e[n],r=e[n-1];if(i.empty?i.from<=r.to:i.from<r.to){let o=r.from,s=Math.max(i.to,r.to);n<=t&&t--,e.splice(--n,2,i.anchor>i.head?ic.range(s,o):ic.range(o,s))}}return new ic(e,t)}}function rc(e,t){for(let n of e.ranges)if(n.to>t)throw new RangeError("Selection points outside of document")}let oc=0;class sc{constructor(e,t,n,i,r){this.combine=e,this.compareInput=t,this.compare=n,this.isStatic=i,this.id=oc++,this.default=e([]),this.extensions="function"==typeof r?r(this):r}get reader(){return this}static define(e={}){return new sc(e.combine||(e=>e),e.compareInput||((e,t)=>e===t),e.compare||(e.combine?(e,t)=>e===t:ac),!!e.static,e.enables)}of(e){return new lc([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new lc(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new lc(e,this,2,t)}from(e,t){return t||(t=e=>e),this.compute([e],(n=>t(n.field(e))))}}function ac(e,t){return e==t||e.length==t.length&&e.every(((e,n)=>e===t[n]))}class lc{constructor(e,t,n,i){this.dependencies=e,this.facet=t,this.type=n,this.value=i,this.id=oc++}dynamicSlot(e){var t;let n=this.value,i=this.facet.compareInput,r=this.id,o=e[r]>>1,s=2==this.type,a=!1,l=!1,c=[];for(let n of this.dependencies)"doc"==n?a=!0:"selection"==n?l=!0:1&(null!==(t=e[n.id])&&void 0!==t?t:1)||c.push(e[n.id]);return{create:e=>(e.values[o]=n(e),1),update(e,t){if(a&&t.docChanged||l&&(t.docChanged||t.selection)||hc(e,c)){let t=n(e);if(s?!cc(t,e.values[o],i):!i(t,e.values[o]))return e.values[o]=t,1}return 0},reconfigure:(e,t)=>{let a,l=t.config.address[r];if(null!=l){let r=Cc(t,l);if(this.dependencies.every((n=>n instanceof sc?t.facet(n)===e.facet(n):!(n instanceof pc)||t.field(n,!1)==e.field(n,!1)))||(s?cc(a=n(e),r,i):i(a=n(e),r)))return e.values[o]=r,0}else a=n(e);return e.values[o]=a,1}}}}function cc(e,t,n){if(e.length!=t.length)return!1;for(let i=0;i<e.length;i++)if(!n(e[i],t[i]))return!1;return!0}function hc(e,t){let n=!1;for(let i of t)1&Sc(e,i)&&(n=!0);return n}function uc(e,t,n){let i=n.map((t=>e[t.id])),r=n.map((e=>e.type)),o=i.filter((e=>!(1&e))),s=e[t.id]>>1;function a(e){let n=[];for(let t=0;t<i.length;t++){let o=Cc(e,i[t]);if(2==r[t])for(let e of o)n.push(e);else n.push(o)}return t.combine(n)}return{create(e){for(let t of i)Sc(e,t);return e.values[s]=a(e),1},update(e,n){if(!hc(e,o))return 0;let i=a(e);return t.compare(i,e.values[s])?0:(e.values[s]=i,1)},reconfigure(e,r){let o=hc(e,i),l=r.config.facets[t.id],c=r.facet(t);if(l&&!o&&ac(n,l))return e.values[s]=c,0;let h=a(e);return t.compare(h,c)?(e.values[s]=c,0):(e.values[s]=h,1)}}}const dc=sc.define({static:!0});class pc{constructor(e,t,n,i,r){this.id=e,this.createF=t,this.updateF=n,this.compareF=i,this.spec=r,this.provides=void 0}static define(e){let t=new pc(oc++,e.create,e.update,e.compare||((e,t)=>e===t),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(dc).find((e=>e.field==this));return((null==t?void 0:t.create)||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:e=>(e.values[t]=this.create(e),1),update:(e,n)=>{let i=e.values[t],r=this.updateF(i,n);return this.compareF(i,r)?0:(e.values[t]=r,1)},reconfigure:(e,n)=>null!=n.config.address[this.id]?(e.values[t]=n.field(this),0):(e.values[t]=this.create(e),1)}}init(e){return[this,dc.of({field:this,create:e})]}get extension(){return this}}const fc=4,gc=3,mc=2,yc=1;function vc(e){return t=>new bc(t,e)}const wc={highest:vc(0),high:vc(yc),default:vc(mc),low:vc(gc),lowest:vc(fc)};class bc{constructor(e,t){this.inner=e,this.prec=t}}class xc{of(e){return new kc(this,e)}reconfigure(e){return xc.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class kc{constructor(e,t){this.compartment=e,this.inner=t}}class _c{constructor(e,t,n,i,r,o){for(this.base=e,this.compartments=t,this.dynamicSlots=n,this.address=i,this.staticValues=r,this.facets=o,this.statusTemplate=[];this.statusTemplate.length<n.length;)this.statusTemplate.push(0)}staticFacet(e){let t=this.address[e.id];return null==t?e.default:this.staticValues[t>>1]}static resolve(e,t,n){let i=[],r=Object.create(null),o=new Map;for(let n of function(e,t,n){let i=[[],[],[],[],[]],r=new Map;function o(e,s){let a=r.get(e);if(null!=a){if(a<=s)return;let t=i[a].indexOf(e);t>-1&&i[a].splice(t,1),e instanceof kc&&n.delete(e.compartment)}if(r.set(e,s),Array.isArray(e))for(let t of e)o(t,s);else if(e instanceof kc){if(n.has(e.compartment))throw new RangeError("Duplicate use of compartment in extensions");let i=t.get(e.compartment)||e.inner;n.set(e.compartment,i),o(i,s)}else if(e instanceof bc)o(e.inner,e.prec);else if(e instanceof pc)i[s].push(e),e.provides&&o(e.provides,s);else if(e instanceof lc)i[s].push(e),e.facet.extensions&&o(e.facet.extensions,mc);else{let t=e.extension;if(!t)throw new Error(`Unrecognized extension value in extension set (${e}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);o(t,s)}}return o(e,mc),i.reduce(((e,t)=>e.concat(t)))}(e,t,o))n instanceof pc?i.push(n):(r[n.facet.id]||(r[n.facet.id]=[])).push(n);let s=Object.create(null),a=[],l=[];for(let e of i)s[e.id]=l.length<<1,l.push((t=>e.slot(t)));let c=null==n?void 0:n.config.facets;for(let e in r){let t=r[e],i=t[0].facet,o=c&&c[e]||[];if(t.every((e=>0==e.type)))if(s[i.id]=a.length<<1|1,ac(o,t))a.push(n.facet(i));else{let e=i.combine(t.map((e=>e.value)));a.push(n&&i.compare(e,n.facet(i))?n.facet(i):e)}else{for(let e of t)0==e.type?(s[e.id]=a.length<<1|1,a.push(e.value)):(s[e.id]=l.length<<1,l.push((t=>e.dynamicSlot(t))));s[i.id]=l.length<<1,l.push((e=>uc(e,i,t)))}}let h=l.map((e=>e(s)));return new _c(e,o,h,s,a,r)}}function Sc(e,t){if(1&t)return 2;let n=t>>1,i=e.status[n];if(4==i)throw new Error("Cyclic dependency between fields and/or facets");if(2&i)return i;e.status[n]=4;let r=e.computeSlot(e,e.config.dynamicSlots[n]);return e.status[n]=2|r}function Cc(e,t){return 1&t?e.config.staticValues[t>>1]:e.values[t>>1]}const Ec=sc.define(),Mc=sc.define({combine:e=>e.some((e=>e)),static:!0}),Ac=sc.define({combine:e=>e.length?e[0]:void 0,static:!0}),Dc=sc.define(),Rc=sc.define(),Oc=sc.define(),Tc=sc.define({combine:e=>!!e.length&&e[0]});class Nc{constructor(e,t){this.type=e,this.value=t}static define(){return new Pc}}class Pc{of(e){return new Nc(this,e)}}class qc{constructor(e){this.map=e}of(e){return new Bc(this,e)}}class Bc{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return void 0===t?void 0:t==this.value?this:new Bc(this.type,t)}is(e){return this.type==e}static define(e={}){return new qc(e.map||(e=>e))}static mapEffects(e,t){if(!e.length)return e;let n=[];for(let i of e){let e=i.map(t);e&&n.push(e)}return n}}Bc.reconfigure=Bc.define(),Bc.appendConfig=Bc.define();class Lc{constructor(e,t,n,i,r,o){this.startState=e,this.changes=t,this.selection=n,this.effects=i,this.annotations=r,this.scrollIntoView=o,this._doc=null,this._state=null,n&&rc(n,t.newLength),r.some((e=>e.type==Lc.time))||(this.annotations=r.concat(Lc.time.of(Date.now())))}static create(e,t,n,i,r,o){return new Lc(e,t,n,i,r,o)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(Lc.userEvent);return!(!t||!(t==e||t.length>e.length&&t.slice(0,e.length)==e&&"."==t[e.length]))}}function Ic(e,t){let n=[];for(let i=0,r=0;;){let o,s;if(i<e.length&&(r==t.length||t[r]>=e[i]))o=e[i++],s=e[i++];else{if(!(r<t.length))return n;o=t[r++],s=t[r++]}!n.length||n[n.length-1]<o?n.push(o,s):n[n.length-1]<s&&(n[n.length-1]=s)}}function Fc(e,t,n){var i;let r,o,s;return n?(r=t.changes,o=Xl.empty(t.changes.length),s=e.changes.compose(t.changes)):(r=t.changes.map(e.changes),o=e.changes.mapDesc(t.changes,!0),s=e.changes.compose(r)),{changes:s,selection:t.selection?t.selection.map(o):null===(i=e.selection)||void 0===i?void 0:i.map(r),effects:Bc.mapEffects(e.effects,r).concat(Bc.mapEffects(t.effects,o)),annotations:e.annotations.length?e.annotations.concat(t.annotations):t.annotations,scrollIntoView:e.scrollIntoView||t.scrollIntoView}}function jc(e,t,n){let i=t.selection,r=zc(t.annotations);return t.userEvent&&(r=r.concat(Lc.userEvent.of(t.userEvent))),{changes:t.changes instanceof Xl?t.changes:Xl.of(t.changes||[],n,e.facet(Ac)),selection:i&&(i instanceof ic?i:ic.single(i.anchor,i.head)),effects:zc(t.effects),annotations:r,scrollIntoView:!!t.scrollIntoView}}function Vc(e,t,n){let i=jc(e,t.length?t[0]:{},e.doc.length);t.length&&!1===t[0].filter&&(n=!1);for(let r=1;r<t.length;r++){!1===t[r].filter&&(n=!1);let o=!!t[r].sequential;i=Fc(i,jc(e,t[r],o?i.changes.newLength:e.doc.length),o)}let r=Lc.create(e,i.changes,i.selection,i.effects,i.annotations,i.scrollIntoView);return function(e){let t=e.startState,n=t.facet(Oc),i=e;for(let r=n.length-1;r>=0;r--){let o=n[r](e);o&&Object.keys(o).length&&(i=Fc(i,jc(t,o,e.changes.newLength),!0))}return i==e?e:Lc.create(t,e.changes,e.selection,i.effects,i.annotations,i.scrollIntoView)}(n?function(e){let t=e.startState,n=!0;for(let i of t.facet(Dc)){let t=i(e);if(!1===t){n=!1;break}Array.isArray(t)&&(n=!0===n?t:Ic(n,t))}if(!0!==n){let i,r;if(!1===n)r=e.changes.invertedDesc,i=Xl.empty(t.doc.length);else{let t=e.changes.filter(n);i=t.changes,r=t.filtered.mapDesc(t.changes).invertedDesc}e=Lc.create(t,i,e.selection&&e.selection.map(r),Bc.mapEffects(e.effects,r),e.annotations,e.scrollIntoView)}let i=t.facet(Rc);for(let n=i.length-1;n>=0;n--){let r=i[n](e);e=r instanceof Lc?r:Array.isArray(r)&&1==r.length&&r[0]instanceof Lc?r[0]:Vc(t,zc(r),!1)}return e}(r):r)}Lc.time=Nc.define(),Lc.userEvent=Nc.define(),Lc.addToHistory=Nc.define(),Lc.remote=Nc.define();const $c=[];function zc(e){return null==e?$c:Array.isArray(e)?e:[e]}var Hc=function(e){return e[e.Word=0]="Word",e[e.Space=1]="Space",e[e.Other=2]="Other",e}(Hc||(Hc={}));const Wc=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let Uc;try{Uc=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch(e){}function Gc(e){return t=>{if(!/\S/.test(t))return Hc.Space;if(function(e){if(Uc)return Uc.test(e);for(let t=0;t<e.length;t++){let n=e[t];if(/\w/.test(n)||n>"€"&&(n.toUpperCase()!=n.toLowerCase()||Wc.test(n)))return!0}return!1}(t))return Hc.Word;for(let n=0;n<e.length;n++)if(t.indexOf(e[n])>-1)return Hc.Word;return Hc.Other}}class Kc{constructor(e,t,n,i,r,o){this.config=e,this.doc=t,this.selection=n,this.values=i,this.status=e.statusTemplate.slice(),this.computeSlot=r,o&&(o._state=this);for(let e=0;e<this.config.dynamicSlots.length;e++)Sc(this,e<<1);this.computeSlot=null}field(e,t=!0){let n=this.config.address[e.id];if(null!=n)return Sc(this,n),Cc(this,n);if(t)throw new RangeError("Field is not present in this state")}update(...e){return Vc(this,e,!0)}applyTransaction(e){let t,n=this.config,{base:i,compartments:r}=n;for(let t of e.effects)t.is(xc.reconfigure)?(n&&(r=new Map,n.compartments.forEach(((e,t)=>r.set(t,e))),n=null),r.set(t.value.compartment,t.value.extension)):t.is(Bc.reconfigure)?(n=null,i=t.value):t.is(Bc.appendConfig)&&(n=null,i=zc(i).concat(t.value));if(n)t=e.startState.values.slice();else{n=_c.resolve(i,r,this),t=new Kc(n,this.doc,this.selection,n.dynamicSlots.map((()=>null)),((e,t)=>t.reconfigure(e,this)),null).values}let o=e.startState.facet(Mc)?e.newSelection:e.newSelection.asSingle();new Kc(n,e.newDoc,o,t,((t,n)=>n.update(t,e)),e)}replaceSelection(e){return"string"==typeof e&&(e=this.toText(e)),this.changeByRange((t=>({changes:{from:t.from,to:t.to,insert:e},range:ic.cursor(t.from+e.length)})))}changeByRange(e){let t=this.selection,n=e(t.ranges[0]),i=this.changes(n.changes),r=[n.range],o=zc(n.effects);for(let n=1;n<t.ranges.length;n++){let s=e(t.ranges[n]),a=this.changes(s.changes),l=a.map(i);for(let e=0;e<n;e++)r[e]=r[e].map(l);let c=i.mapDesc(a,!0);r.push(s.range.map(c)),i=i.compose(l),o=Bc.mapEffects(o,l).concat(Bc.mapEffects(zc(s.effects),c))}return{changes:i,selection:ic.create(r,t.mainIndex),effects:o}}changes(e=[]){return e instanceof Xl?e:Xl.of(e,this.doc.length,this.facet(Kc.lineSeparator))}toText(e){return ql.of(e.split(this.facet(Kc.lineSeparator)||Ul))}sliceDoc(e=0,t=this.doc.length){return this.doc.sliceString(e,t,this.lineBreak)}facet(e){let t=this.config.address[e.id];return null==t?e.default:(Sc(this,t),Cc(this,t))}toJSON(e){let t={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let n in e){let i=e[n];i instanceof pc&&null!=this.config.address[i.id]&&(t[n]=i.spec.toJSON(this.field(e[n]),this))}return t}static fromJSON(e,t={},n){if(!e||"string"!=typeof e.doc)throw new RangeError("Invalid JSON representation for EditorState");let i=[];if(n)for(let t in n)if(Object.prototype.hasOwnProperty.call(e,t)){let r=n[t],o=e[t];i.push(r.init((e=>r.spec.fromJSON(o,e))))}return Kc.create({doc:e.doc,selection:ic.fromJSON(e.selection),extensions:t.extensions?i.concat([t.extensions]):i})}static create(e={}){let t=_c.resolve(e.extensions||[],new Map),n=e.doc instanceof ql?e.doc:ql.of((e.doc||"").split(t.staticFacet(Kc.lineSeparator)||Ul)),i=e.selection?e.selection instanceof ic?e.selection:ic.single(e.selection.anchor,e.selection.head):ic.single(0);return rc(i,n.length),t.staticFacet(Mc)||(i=i.asSingle()),new Kc(t,n,i,t.dynamicSlots.map((()=>null)),((e,t)=>t.create(e)),null)}get tabSize(){return this.facet(Kc.tabSize)}get lineBreak(){return this.facet(Kc.lineSeparator)||"\n"}get readOnly(){return this.facet(Tc)}phrase(e,...t){for(let t of this.facet(Kc.phrases))if(Object.prototype.hasOwnProperty.call(t,e)){e=t[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,((e,n)=>{if("$"==n)return"$";let i=+(n||1);return!i||i>t.length?e:t[i-1]}))),e}languageDataAt(e,t,n=-1){let i=[];for(let r of this.facet(Ec))for(let o of r(this,t,n))Object.prototype.hasOwnProperty.call(o,e)&&i.push(o[e]);return i}charCategorizer(e){return Gc(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:t,from:n,length:i}=this.doc.lineAt(e),r=this.charCategorizer(e),o=e-n,s=e-n;for(;o>0;){let e=Wl(t,o,!1);if(r(t.slice(e,o))!=Hc.Word)break;o=e}for(;s<i;){let e=Wl(t,s);if(r(t.slice(s,e))!=Hc.Word)break;s=e}return o==s?null:ic.range(o+n,s+n)}}Kc.allowMultipleSelections=Mc,Kc.tabSize=sc.define({combine:e=>e.length?e[0]:4}),Kc.lineSeparator=Ac,Kc.readOnly=Tc,Kc.phrases=sc.define({compare(e,t){let n=Object.keys(e),i=Object.keys(t);return n.length==i.length&&n.every((n=>e[n]==t[n]))}}),Kc.languageData=Ec,Kc.changeFilter=Dc,Kc.transactionFilter=Rc,Kc.transactionExtender=Oc,xc.reconfigure=Bc.define();class Xc{eq(e){return this==e}range(e,t=e){return Yc.create(e,t,this)}}Xc.prototype.startSide=Xc.prototype.endSide=0,Xc.prototype.point=!1,Xc.prototype.mapMode=Gl.TrackDel;let Yc=class e{constructor(e,t,n){this.from=e,this.to=t,this.value=n}static create(t,n,i){return new e(t,n,i)}};function Jc(e,t){return e.from-t.from||e.value.startSide-t.value.startSide}class Qc{constructor(e,t,n,i){this.from=e,this.to=t,this.value=n,this.maxPoint=i}get length(){return this.to[this.to.length-1]}findIndex(e,t,n,i=0){let r=n?this.to:this.from;for(let o=i,s=r.length;;){if(o==s)return o;let i=o+s>>1,a=r[i]-e||(n?this.value[i].endSide:this.value[i].startSide)-t;if(i==o)return a>=0?o:s;a>=0?s=i:o=i+1}}between(e,t,n,i){for(let r=this.findIndex(t,-1e9,!0),o=this.findIndex(n,1e9,!1,r);r<o;r++)if(!1===i(this.from[r]+e,this.to[r]+e,this.value[r]))return!1}map(e,t){let n=[],i=[],r=[],o=-1,s=-1;for(let a=0;a<this.value.length;a++){let l,c,h=this.value[a],u=this.from[a]+e,d=this.to[a]+e;if(u==d){let e=t.mapPos(u,h.startSide,h.mapMode);if(null==e)continue;if(l=c=e,h.startSide!=h.endSide&&(c=t.mapPos(u,h.endSide),c<l))continue}else if(l=t.mapPos(u,h.startSide),c=t.mapPos(d,h.endSide),l>c||l==c&&h.startSide>0&&h.endSide<=0)continue;(c-l||h.endSide-h.startSide)<0||(o<0&&(o=l),h.point&&(s=Math.max(s,c-l)),n.push(h),i.push(l-o),r.push(c-o))}return{mapped:n.length?new Qc(i,r,n,s):null,pos:o}}}class Zc{constructor(e,t,n,i){this.chunkPos=e,this.chunk=t,this.nextLayer=n,this.maxPoint=i}static create(e,t,n,i){return new Zc(e,t,n,i)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:n=!1,filterFrom:i=0,filterTo:r=this.length}=e,o=e.filter;if(0==t.length&&!o)return this;if(n&&(t=t.slice().sort(Jc)),this.isEmpty)return t.length?Zc.of(t):this;let s=new nh(this,null,-1).goto(0),a=0,l=[],c=new eh;for(;s.value||a<t.length;)if(a<t.length&&(s.from-t[a].from||s.startSide-t[a].value.startSide)>=0){let e=t[a++];c.addInner(e.from,e.to,e.value)||l.push(e)}else 1==s.rangeIndex&&s.chunkIndex<this.chunk.length&&(a==t.length||this.chunkEnd(s.chunkIndex)<t[a].from)&&(!o||i>this.chunkEnd(s.chunkIndex)||r<this.chunkPos[s.chunkIndex])&&c.addChunk(this.chunkPos[s.chunkIndex],this.chunk[s.chunkIndex])?s.nextChunk():((!o||i>s.to||r<s.from||o(s.from,s.to,s.value))&&(c.addInner(s.from,s.to,s.value)||l.push(Yc.create(s.from,s.to,s.value))),s.next());return c.finishInner(this.nextLayer.isEmpty&&!l.length?Zc.empty:this.nextLayer.update({add:l,filter:o,filterFrom:i,filterTo:r}))}map(e){if(e.empty||this.isEmpty)return this;let t=[],n=[],i=-1;for(let r=0;r<this.chunk.length;r++){let o=this.chunkPos[r],s=this.chunk[r],a=e.touchesRange(o,o+s.length);if(!1===a)i=Math.max(i,s.maxPoint),t.push(s),n.push(e.mapPos(o));else if(!0===a){let{mapped:r,pos:a}=s.map(o,e);r&&(i=Math.max(i,r.maxPoint),t.push(r),n.push(a))}}let r=this.nextLayer.map(e);return 0==t.length?r:new Zc(n,t,r||Zc.empty,i)}between(e,t,n){if(!this.isEmpty){for(let i=0;i<this.chunk.length;i++){let r=this.chunkPos[i],o=this.chunk[i];if(t>=r&&e<=r+o.length&&!1===o.between(r,e-r,t-r,n))return}this.nextLayer.between(e,t,n)}}iter(e=0){return ih.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return ih.from(e).goto(t)}static compare(e,t,n,i,r=-1){let o=e.filter((e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=r)),s=t.filter((e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=r)),a=th(o,s,n),l=new oh(o,a,r),c=new oh(s,a,r);n.iterGaps(((e,t,n)=>sh(l,e,c,t,n,i))),n.empty&&0==n.length&&sh(l,0,c,0,0,i)}static eq(e,t,n=0,i){null==i&&(i=999999999);let r=e.filter((e=>!e.isEmpty&&t.indexOf(e)<0)),o=t.filter((t=>!t.isEmpty&&e.indexOf(t)<0));if(r.length!=o.length)return!1;if(!r.length)return!0;let s=th(r,o),a=new oh(r,s,0).goto(n),l=new oh(o,s,0).goto(n);for(;;){if(a.to!=l.to||!ah(a.active,l.active)||a.point&&(!l.point||!a.point.eq(l.point)))return!1;if(a.to>i)return!0;a.next(),l.next()}}static spans(e,t,n,i,r=-1){let o=new oh(e,null,r).goto(t),s=t,a=o.openStart;for(;;){let e=Math.min(o.to,n);if(o.point){let n=o.activeForPoint(o.to),r=o.pointFrom<t?n.length+1:o.point.startSide<0?n.length:Math.min(n.length,a);i.point(s,e,o.point,n,r,o.pointRank),a=Math.min(o.openEnd(e),n.length)}else e>s&&(i.span(s,e,o.active,a),a=o.openEnd(e));if(o.to>n)return a+(o.point&&o.to>n?1:0);s=o.to,o.next()}}static of(e,t=!1){let n=new eh;for(let i of e instanceof Yc?[e]:t?function(e){if(e.length>1)for(let t=e[0],n=1;n<e.length;n++){let i=e[n];if(Jc(t,i)>0)return e.slice().sort(Jc);t=i}return e}(e):e)n.add(i.from,i.to,i.value);return n.finish()}static join(e){if(!e.length)return Zc.empty;let t=e[e.length-1];for(let n=e.length-2;n>=0;n--)for(let i=e[n];i!=Zc.empty;i=i.nextLayer)t=new Zc(i.chunkPos,i.chunk,t,Math.max(i.maxPoint,t.maxPoint));return t}}Zc.empty=new Zc([],[],null,-1),Zc.empty.nextLayer=Zc.empty;class eh{finishChunk(e){this.chunks.push(new Qc(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,t,n){this.addInner(e,t,n)||(this.nextLayer||(this.nextLayer=new eh)).add(e,t,n)}addInner(e,t,n){let i=e-this.lastTo||n.startSide-this.last.endSide;if(i<=0&&(e-this.lastFrom||n.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return!(i<0)&&(250==this.from.length&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=n,this.lastFrom=e,this.lastTo=t,this.value.push(n),n.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}addChunk(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let n=t.value.length-1;return this.last=t.value[n],this.lastFrom=t.from[n]+e,this.lastTo=t.to[n]+e,!0}finish(){return this.finishInner(Zc.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),0==this.chunks.length)return e;let t=Zc.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}}function th(e,t,n){let i=new Map;for(let t of e)for(let e=0;e<t.chunk.length;e++)t.chunk[e].maxPoint<=0&&i.set(t.chunk[e],t.chunkPos[e]);let r=new Set;for(let e of t)for(let t=0;t<e.chunk.length;t++){let o=i.get(e.chunk[t]);null==o||(n?n.mapPos(o):o)!=e.chunkPos[t]||(null==n?void 0:n.touchesRange(o,o+e.chunk[t].length))||r.add(e.chunk[t])}return r}class nh{constructor(e,t,n,i=0){this.layer=e,this.skip=t,this.minPoint=n,this.rank=i}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,t=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,t,!1),this}gotoInner(e,t,n){for(;this.chunkIndex<this.layer.chunk.length;){let t=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(t)||this.layer.chunkEnd(this.chunkIndex)<e||t.maxPoint<this.minPoint))break;this.chunkIndex++,n=!1}if(this.chunkIndex<this.layer.chunk.length){let i=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],t,!0);(!n||this.rangeIndex<i)&&this.setRangeIndex(i)}this.next()}forward(e,t){(this.to-e||this.endSide-t)<0&&this.gotoInner(e,t,!0)}next(){for(;;){if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}{let e=this.layer.chunkPos[this.chunkIndex],t=this.layer.chunk[this.chunkIndex],n=e+t.from[this.rangeIndex];if(this.from=n,this.to=e+t.to[this.rangeIndex],this.value=t.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=e}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(e){return this.from-e.from||this.startSide-e.startSide||this.rank-e.rank||this.to-e.to||this.endSide-e.endSide}}class ih{constructor(e){this.heap=e}static from(e,t=null,n=-1){let i=[];for(let r=0;r<e.length;r++)for(let o=e[r];!o.isEmpty;o=o.nextLayer)o.maxPoint>=n&&i.push(new nh(o,t,n,r));return 1==i.length?i[0]:new ih(i)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let n of this.heap)n.goto(e,t);for(let e=this.heap.length>>1;e>=0;e--)rh(this.heap,e);return this.next(),this}forward(e,t){for(let n of this.heap)n.forward(e,t);for(let e=this.heap.length>>1;e>=0;e--)rh(this.heap,e);(this.to-e||this.value.endSide-t)<0&&this.next()}next(){if(0==this.heap.length)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),rh(this.heap,0)}}}function rh(e,t){for(let n=e[t];;){let i=1+(t<<1);if(i>=e.length)break;let r=e[i];if(i+1<e.length&&r.compare(e[i+1])>=0&&(r=e[i+1],i++),n.compare(r)<0)break;e[i]=n,e[t]=r,t=i}}class oh{constructor(e,t,n){this.minPoint=n,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=ih.from(e,t,n)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){lh(this.active,e),lh(this.activeTo,e),lh(this.activeRank,e),this.minActive=hh(this.active,this.activeTo)}addActive(e){let t=0,{value:n,to:i,rank:r}=this.cursor;for(;t<this.activeRank.length&&(r-this.activeRank[t]||i-this.activeTo[t])>0;)t++;ch(this.active,t,n),ch(this.activeTo,t,i),ch(this.activeRank,t,r),e&&ch(e,t,this.cursor.from),this.minActive=hh(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let n=this.openStart<0?[]:null;for(;;){let i=this.minActive;if(i>-1&&(this.activeTo[i]-this.cursor.from||this.active[i].endSide-this.cursor.startSide)<0){if(this.activeTo[i]>e){this.to=this.activeTo[i],this.endSide=this.active[i].endSide;break}this.removeActive(i),n&&lh(n,i)}else{if(!this.cursor.value){this.to=this.endSide=1e9;break}if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}{let e=this.cursor.value;if(e.point){if(!(t&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)){this.point=e,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=e.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}this.cursor.next()}else this.addActive(n),this.cursor.next()}}}if(n){this.openStart=0;for(let t=n.length-1;t>=0&&n[t]<e;t--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let t=[];for(let n=this.active.length-1;n>=0&&!(this.activeRank[n]<this.pointRank);n--)(this.activeTo[n]>e||this.activeTo[n]==e&&this.active[n].endSide>=this.point.endSide)&&t.push(this.active[n]);return t.reverse()}openEnd(e){let t=0;for(let n=this.activeTo.length-1;n>=0&&this.activeTo[n]>e;n--)t++;return t}}function sh(e,t,n,i,r,o){e.goto(t),n.goto(i);let s=i+r,a=i,l=i-t;for(;;){let t=e.to+l-n.to,i=t||e.endSide-n.endSide,r=i<0?e.to+l:n.to,c=Math.min(r,s);if(e.point||n.point?e.point&&n.point&&(e.point==n.point||e.point.eq(n.point))&&ah(e.activeForPoint(e.to),n.activeForPoint(n.to))||o.comparePoint(a,c,e.point,n.point):c>a&&!ah(e.active,n.active)&&o.compareRange(a,c,e.active,n.active),r>s)break;(t||e.openEnd!=n.openEnd)&&o.boundChange&&o.boundChange(r),a=r,i<=0&&e.next(),i>=0&&n.next()}}function ah(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n]&&!e[n].eq(t[n]))return!1;return!0}function lh(e,t){for(let n=t,i=e.length-1;n<i;n++)e[n]=e[n+1];e.pop()}function ch(e,t,n){for(let n=e.length-1;n>=t;n--)e[n+1]=e[n];e[t]=n}function hh(e,t){let n=-1,i=1e9;for(let r=0;r<t.length;r++)(t[r]-i||e[r].endSide-e[n].endSide)<0&&(n=r,i=t[r]);return n}const uh="undefined"==typeof Symbol?"__ͼ":Symbol.for("ͼ"),dh="undefined"==typeof Symbol?"__styleSet"+Math.floor(1e8*Math.random()):Symbol("styleSet"),ph="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:{};class fh{constructor(e,t){this.rules=[];let{finish:n}=t||{};function i(e){return/^@/.test(e)?[e]:e.split(/,\s*/)}function r(e,t,o,s){let a=[],l=/^@(\w+)\b/.exec(e[0]),c=l&&"keyframes"==l[1];if(l&&null==t)return o.push(e[0]+";");for(let n in t){let s=t[n];if(/&/.test(n))r(n.split(/,\s*/).map((t=>e.map((e=>t.replace(/&/,e))))).reduce(((e,t)=>e.concat(t))),s,o);else if(s&&"object"==typeof s){if(!l)throw new RangeError("The value of a property ("+n+") should be a primitive value.");r(i(n),s,a,c)}else null!=s&&a.push(n.replace(/_.*/,"").replace(/[A-Z]/g,(e=>"-"+e.toLowerCase()))+": "+s+";")}(a.length||c)&&o.push((!n||l||s?e:e.map(n)).join(", ")+" {"+a.join(" ")+"}")}for(let t in e)r(i(t),e[t],this.rules)}getRules(){return this.rules.join("\n")}static newName(){let e=ph[uh]||1;return ph[uh]=e+1,"ͼ"+e.toString(36)}static mount(e,t,n){let i=e[dh],r=n&&n.nonce;i?r&&i.setNonce(r):i=new mh(e,r),i.mount(Array.isArray(t)?t:[t],e)}}let gh=new Map;class mh{constructor(e,t){let n=e.ownerDocument||e,i=n.defaultView;if(!e.head&&e.adoptedStyleSheets&&i.CSSStyleSheet){let t=gh.get(n);if(t)return e[dh]=t;this.sheet=new i.CSSStyleSheet,gh.set(n,this)}else this.styleTag=n.createElement("style"),t&&this.styleTag.setAttribute("nonce",t);this.modules=[],e[dh]=this}mount(e,t){let n=this.sheet,i=0,r=0;for(let t=0;t<e.length;t++){let o=e[t],s=this.modules.indexOf(o);if(s<r&&s>-1&&(this.modules.splice(s,1),r--,s=-1),-1==s){if(this.modules.splice(r++,0,o),n)for(let e=0;e<o.rules.length;e++)n.insertRule(o.rules[e],i++)}else{for(;r<s;)i+=this.modules[r++].rules.length;i+=o.rules.length,r++}}if(n)t.adoptedStyleSheets.indexOf(this.sheet)<0&&(t.adoptedStyleSheets=[this.sheet,...t.adoptedStyleSheets]);else{let e="";for(let t=0;t<this.modules.length;t++)e+=this.modules[t].getRules()+"\n";this.styleTag.textContent=e;let n=t.head||t;this.styleTag.parentNode!=n&&n.insertBefore(this.styleTag,n.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}}for(var yh={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},vh={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},wh=0;wh<10;wh++)yh[48+wh]=yh[96+wh]=String(wh);for(wh=1;wh<=24;wh++)yh[wh+111]="F"+wh;for(wh=65;wh<=90;wh++)yh[wh]=String.fromCharCode(wh+32),vh[wh]=String.fromCharCode(wh);for(var bh in yh)vh.hasOwnProperty(bh)||(vh[bh]=yh[bh]);function xh(e){let t;return t=11==e.nodeType?e.getSelection?e:e.ownerDocument:e,t.getSelection()}function kh(e,t){return!!t&&(e==t||e.contains(1!=t.nodeType?t.parentNode:t))}function _h(e,t){if(!t.anchorNode)return!1;try{return kh(e,t.anchorNode)}catch(e){return!1}}function Sh(e){return 3==e.nodeType?Lh(e,0,e.nodeValue.length).getClientRects():1==e.nodeType?e.getClientRects():[]}function Ch(e,t,n,i){return!!n&&(Ah(e,t,n,i,-1)||Ah(e,t,n,i,1))}function Eh(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t}function Mh(e){return 1==e.nodeType&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(e.nodeName)}function Ah(e,t,n,i,r){for(;;){if(e==n&&t==i)return!0;if(t==(r<0?0:Dh(e))){if("DIV"==e.nodeName)return!1;let n=e.parentNode;if(!n||1!=n.nodeType)return!1;t=Eh(e)+(r<0?0:1),e=n}else{if(1!=e.nodeType)return!1;if(1==(e=e.childNodes[t+(r<0?-1:0)]).nodeType&&"false"==e.contentEditable)return!1;t=r<0?Dh(e):0}}}function Dh(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function Rh(e,t){let n=t?e.left:e.right;return{left:n,right:n,top:e.top,bottom:e.bottom}}function Oh(e){let t=e.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.innerWidth,top:0,bottom:e.innerHeight}}function Th(e,t){let n=t.width/e.offsetWidth,i=t.height/e.offsetHeight;return(n>.995&&n<1.005||!isFinite(n)||Math.abs(t.width-e.offsetWidth)<1)&&(n=1),(i>.995&&i<1.005||!isFinite(i)||Math.abs(t.height-e.offsetHeight)<1)&&(i=1),{scaleX:n,scaleY:i}}class Nh{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:t,focusNode:n}=e;this.set(t,Math.min(e.anchorOffset,t?Dh(t):0),n,Math.min(e.focusOffset,n?Dh(n):0))}set(e,t,n,i){this.anchorNode=e,this.anchorOffset=t,this.focusNode=n,this.focusOffset=i}}let Ph,qh=null;function Bh(e){if(e.setActive)return e.setActive();if(qh)return e.focus(qh);let t=[];for(let n=e;n&&(t.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(e.focus(null==qh?{get preventScroll(){return qh={preventScroll:!0},!0}}:void 0),!qh){qh=!1;for(let e=0;e<t.length;){let n=t[e++],i=t[e++],r=t[e++];n.scrollTop!=i&&(n.scrollTop=i),n.scrollLeft!=r&&(n.scrollLeft=r)}}}function Lh(e,t,n=t){let i=Ph||(Ph=document.createRange());return i.setEnd(e,n),i.setStart(e,t),i}function Ih(e,t,n,i){let r={key:t,code:t,keyCode:n,which:n,cancelable:!0};i&&({altKey:r.altKey,ctrlKey:r.ctrlKey,shiftKey:r.shiftKey,metaKey:r.metaKey}=i);let o=new KeyboardEvent("keydown",r);o.synthetic=!0,e.dispatchEvent(o);let s=new KeyboardEvent("keyup",r);return s.synthetic=!0,e.dispatchEvent(s),o.defaultPrevented||s.defaultPrevented}function Fh(e){for(;e.attributes.length;)e.removeAttributeNode(e.attributes[0])}function jh(e){return e.scrollTop>Math.max(1,e.scrollHeight-e.clientHeight-4)}function Vh(e,t){for(let n=e,i=t;;){if(3==n.nodeType&&i>0)return{node:n,offset:i};if(1==n.nodeType&&i>0){if("false"==n.contentEditable)return null;n=n.childNodes[i-1],i=Dh(n)}else{if(!n.parentNode||Mh(n))return null;i=Eh(n),n=n.parentNode}}}function $h(e,t){for(let n=e,i=t;;){if(3==n.nodeType&&i<n.nodeValue.length)return{node:n,offset:i};if(1==n.nodeType&&i<n.childNodes.length){if("false"==n.contentEditable)return null;n=n.childNodes[i],i=0}else{if(!n.parentNode||Mh(n))return null;i=Eh(n)+1,n=n.parentNode}}}class zh{constructor(e,t,n=!0){this.node=e,this.offset=t,this.precise=n}static before(e,t){return new zh(e.parentNode,Eh(e),t)}static after(e,t){return new zh(e.parentNode,Eh(e)+1,t)}}const Hh=[];class Wh{constructor(){this.parent=null,this.dom=null,this.flags=2}get overrideDOMText(){return null}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e){let t=this.posAtStart;for(let n of this.children){if(n==e)return t;t+=n.length+n.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}sync(e,t){if(2&this.flags){let n,i=this.dom,r=null;for(let o of this.children){if(7&o.flags){if(!o.dom&&(n=r?r.nextSibling:i.firstChild)){let e=Wh.get(n);(!e||!e.parent&&e.canReuseDOM(o))&&o.reuseDOM(n)}o.sync(e,t),o.flags&=-8}if(n=r?r.nextSibling:i.firstChild,t&&!t.written&&t.node==i&&n!=o.dom&&(t.written=!0),o.dom.parentNode==i)for(;n&&n!=o.dom;)n=Uh(n);else i.insertBefore(o.dom,n);r=o.dom}for(n=r?r.nextSibling:i.firstChild,n&&t&&t.node==i&&(t.written=!0);n;)n=Uh(n)}else if(1&this.flags)for(let n of this.children)7&n.flags&&(n.sync(e,t),n.flags&=-8)}reuseDOM(e){}localPosFromDOM(e,t){let n;if(e==this.dom)n=this.dom.childNodes[t];else{let i=0==Dh(e)?0:0==t?-1:1;for(;;){let t=e.parentNode;if(t==this.dom)break;0==i&&t.firstChild!=t.lastChild&&(i=e==t.firstChild?-1:1),e=t}n=i<0?e:e.nextSibling}if(n==this.dom.firstChild)return 0;for(;n&&!Wh.get(n);)n=n.nextSibling;if(!n)return this.length;for(let e=0,t=0;;e++){let i=this.children[e];if(i.dom==n)return t;t+=i.length+i.breakAfter}}domBoundsAround(e,t,n=0){let i=-1,r=-1,o=-1,s=-1;for(let a=0,l=n,c=n;a<this.children.length;a++){let n=this.children[a],h=l+n.length;if(l<e&&h>t)return n.domBoundsAround(e,t,l);if(h>=e&&-1==i&&(i=a,r=l),l>t&&n.dom.parentNode==this.dom){o=a,s=c;break}c=h,l=h+n.breakAfter}return{from:r,to:s<0?n+this.length:s,startDOM:(i?this.children[i-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:o<this.children.length&&o>=0?this.children[o].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let t=this.parent;t;t=t.parent){if(e&&(t.flags|=2),1&t.flags)return;t.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,7&this.flags&&this.markParentsDirty(!0))}setDOM(e){this.dom!=e&&(this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this)}get rootView(){for(let e=this;;){let t=e.parent;if(!t)return e;e=t}}replaceChildren(e,t,n=Hh){this.markDirty();for(let i=e;i<t;i++){let e=this.children[i];e.parent==this&&n.indexOf(e)<0&&e.destroy()}n.length<250?this.children.splice(e,t-e,...n):this.children=[].concat(this.children.slice(0,e),n,this.children.slice(t));for(let e=0;e<n.length;e++)n[e].setParent(this)}ignoreMutation(e){return!1}ignoreEvent(e){return!1}childCursor(e=this.length){return new Gh(this.children,e,this.children.length)}childPos(e,t=1){return this.childCursor().findPos(e,t)}toString(){let e=this.constructor.name.replace("View","");return e+(this.children.length?"("+this.children.join()+")":this.length?"["+("Text"==e?this.text:this.length)+"]":"")+(this.breakAfter?"#":"")}static get(e){return e.cmView}get isEditable(){return!0}get isWidget(){return!1}get isHidden(){return!1}merge(e,t,n,i,r,o){return!1}become(e){return!1}canReuseDOM(e){return e.constructor==this.constructor&&!(8&(this.flags|e.flags))}getSide(){return 0}destroy(){for(let e of this.children)e.parent==this&&e.destroy();this.parent=null}}function Uh(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}Wh.prototype.breakAfter=0;class Gh{constructor(e,t,n){this.children=e,this.pos=t,this.i=n,this.off=0}findPos(e,t=1){for(;;){if(e>this.pos||e==this.pos&&(t>0||0==this.i||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let n=this.children[--this.i];this.pos-=n.length+n.breakAfter}}}function Kh(e,t,n,i,r,o,s,a,l){let{children:c}=e,h=c.length?c[t]:null,u=o.length?o[o.length-1]:null,d=u?u.breakAfter:s;if(!(t==i&&h&&!s&&!d&&o.length<2&&h.merge(n,r,o.length?u:null,0==n,a,l))){if(i<c.length){let e=c[i];e&&(r<e.length||e.breakAfter&&(null==u?void 0:u.breakAfter))?(t==i&&(e=e.split(r),r=0),!d&&u&&e.merge(0,r,u,!0,0,l)?o[o.length-1]=e:((r||e.children.length&&!e.children[0].length)&&e.merge(0,r,null,!1,0,l),o.push(e))):(null==e?void 0:e.breakAfter)&&(u?u.breakAfter=1:s=1),i++}for(h&&(h.breakAfter=s,n>0&&(!s&&o.length&&h.merge(n,h.length,o[0],!1,a,0)?h.breakAfter=o.shift().breakAfter:(n<h.length||h.children.length&&0==h.children[h.children.length-1].length)&&h.merge(n,h.length,null,!1,a,0),t++));t<i&&o.length;)if(c[i-1].become(o[o.length-1]))i--,o.pop(),l=o.length?0:a;else{if(!c[t].become(o[0]))break;t++,o.shift(),a=o.length?0:l}!o.length&&t&&i<c.length&&!c[t-1].breakAfter&&c[i].merge(0,0,c[t-1],!1,a,l)&&t--,(t<i||o.length)&&e.replaceChildren(t,i,o)}}function Xh(e,t,n,i,r,o){let s=e.childCursor(),{i:a,off:l}=s.findPos(n,1),{i:c,off:h}=s.findPos(t,-1),u=t-n;for(let e of i)u+=e.length;e.length+=u,Kh(e,c,h,a,l,i,0,r,o)}let Yh="undefined"!=typeof navigator?navigator:{userAgent:"",vendor:"",platform:""},Jh="undefined"!=typeof document?document:{documentElement:{style:{}}};const Qh=/Edge\/(\d+)/.exec(Yh.userAgent),Zh=/MSIE \d/.test(Yh.userAgent),eu=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Yh.userAgent),tu=!!(Zh||eu||Qh),nu=!tu&&/gecko\/(\d+)/i.test(Yh.userAgent),iu=!tu&&/Chrome\/(\d+)/.exec(Yh.userAgent),ru="webkitFontSmoothing"in Jh.documentElement.style,ou=!tu&&/Apple Computer/.test(Yh.vendor),su=ou&&(/Mobile\/\w+/.test(Yh.userAgent)||Yh.maxTouchPoints>2);var au={mac:su||/Mac/.test(Yh.platform),windows:/Win/.test(Yh.platform),linux:/Linux|X11/.test(Yh.platform),ie:tu,ie_version:Zh?Jh.documentMode||6:eu?+eu[1]:Qh?+Qh[1]:0,gecko:nu,gecko_version:nu?+(/Firefox\/(\d+)/.exec(Yh.userAgent)||[0,0])[1]:0,chrome:!!iu,chrome_version:iu?+iu[1]:0,ios:su,android:/Android\b/.test(Yh.userAgent),webkit:ru,safari:ou,webkit_version:ru?+(/\bAppleWebKit\/(\d+)/.exec(Yh.userAgent)||[0,0])[1]:0,tabSize:null!=Jh.documentElement.style.tabSize?"tab-size":"-moz-tab-size"};class lu extends Wh{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,t){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(t&&t.node==this.dom&&(t.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){3==e.nodeType&&this.createDOM(e)}merge(e,t,n){return!(8&this.flags||n&&(!(n instanceof lu)||this.length-(t-e)+n.length>256||8&n.flags))&&(this.text=this.text.slice(0,e)+(n?n.text:"")+this.text.slice(t),this.markDirty(),!0)}split(e){let t=new lu(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),t.flags|=8&this.flags,t}localPosFromDOM(e,t){return e==this.dom?t:t?this.text.length:0}domAtPos(e){return new zh(this.dom,e)}domBoundsAround(e,t,n){return{from:n,to:n+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,t){return function(e,t,n){let i=e.nodeValue.length;t>i&&(t=i);let r=t,o=t,s=0;0==t&&n<0||t==i&&n>=0?au.chrome||au.gecko||(t?(r--,s=1):o<i&&(o++,s=-1)):n<0?r--:o<i&&o++;let a=Lh(e,r,o).getClientRects();if(!a.length)return null;let l=a[(s?s<0:n>=0)?0:a.length-1];au.safari&&!s&&0==l.width&&(l=Array.prototype.find.call(a,(e=>e.width))||l);return s?Rh(l,s<0):l||null}(this.dom,e,t)}}class cu extends Wh{constructor(e,t=[],n=0){super(),this.mark=e,this.children=t,this.length=n;for(let e of t)e.setParent(this)}setAttrs(e){if(Fh(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let t in this.mark.attrs)e.setAttribute(t,this.mark.attrs[t]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!(8&(this.flags|e.flags))}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,t){this.dom?4&this.flags&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,t)}merge(e,t,n,i,r,o){return(!n||!(!(n instanceof cu&&n.mark.eq(this.mark))||e&&r<=0||t<this.length&&o<=0))&&(Xh(this,e,t,n?n.children.slice():[],r-1,o-1),this.markDirty(),!0)}split(e){let t=[],n=0,i=-1,r=0;for(let o of this.children){let s=n+o.length;s>e&&t.push(n<e?o.split(e-n):o),i<0&&n>=e&&(i=r),n=s,r++}let o=this.length-e;return this.length=e,i>-1&&(this.children.length=i,this.markDirty()),new cu(this.mark,t,o)}domAtPos(e){return du(this,e)}coordsAt(e,t){return fu(this,e,t)}}class hu extends Wh{static create(e,t,n){return new hu(e,t,n)}constructor(e,t,n){super(),this.widget=e,this.length=t,this.side=n,this.prevWidget=null}split(e){let t=hu.create(this.widget,this.length-e,this.side);return this.length-=e,t}sync(e){this.dom&&this.widget.updateDOM(this.dom,e)||(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(e,t,n,i,r,o){return!(n&&(!(n instanceof hu&&this.widget.compare(n.widget))||e>0&&r<=0||t<this.length&&o<=0))&&(this.length=e+(n?n.length:0)+(this.length-t),!0)}become(e){return e instanceof hu&&e.side==this.side&&this.widget.constructor==e.widget.constructor&&(this.widget.compare(e.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,!0)}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get overrideDOMText(){if(0==this.length)return ql.empty;let e=this;for(;e.parent;)e=e.parent;let{view:t}=e,n=t&&t.state.doc,i=this.posAtStart;return n?n.slice(i,i+this.length):ql.empty}domAtPos(e){return(this.length?0==e:this.side>0)?zh.before(this.dom):zh.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,t){let n=this.widget.coordsAt(this.dom,e,t);if(n)return n;let i=this.dom.getClientRects(),r=null;if(!i.length)return null;let o=this.side?this.side<0:e>0;for(let t=o?i.length-1:0;r=i[t],!(e>0?0==t:t==i.length-1||r.top<r.bottom);t+=o?-1:1);return Rh(r,!o)}get isEditable(){return!1}get isWidget(){return!0}get isHidden(){return this.widget.isHidden}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}}class uu extends Wh{constructor(e){super(),this.side=e}get length(){return 0}merge(){return!1}become(e){return e instanceof uu&&e.side==this.side}split(){return new uu(this.side)}sync(){if(!this.dom){let e=document.createElement("img");e.className="cm-widgetBuffer",e.setAttribute("aria-hidden","true"),this.setDOM(e)}}getSide(){return this.side}domAtPos(e){return this.side>0?zh.before(this.dom):zh.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return ql.empty}get isHidden(){return!0}}function du(e,t){let n=e.dom,{children:i}=e,r=0;for(let e=0;r<i.length;r++){let o=i[r],s=e+o.length;if(!(s==e&&o.getSide()<=0)){if(t>e&&t<s&&o.dom.parentNode==n)return o.domAtPos(t-e);if(t<=e)break;e=s}}for(let e=r;e>0;e--){let t=i[e-1];if(t.dom.parentNode==n)return t.domAtPos(t.length)}for(let e=r;e<i.length;e++){let t=i[e];if(t.dom.parentNode==n)return t.domAtPos(0)}return new zh(n,0)}function pu(e,t,n){let i,{children:r}=e;n>0&&t instanceof cu&&r.length&&(i=r[r.length-1])instanceof cu&&i.mark.eq(t.mark)?pu(i,t.children[0],n-1):(r.push(t),t.setParent(e)),e.length+=t.length}function fu(e,t,n){let i=null,r=-1,o=null,s=-1;!function e(t,a){for(let l=0,c=0;l<t.children.length&&c<=a;l++){let h=t.children[l],u=c+h.length;u>=a&&(h.children.length?e(h,a-c):(!o||o.isHidden&&n>0)&&(u>a||c==u&&h.getSide()>0)?(o=h,s=a-c):(c<a||c==u&&h.getSide()<0&&!h.isHidden)&&(i=h,r=a-c)),c=u}}(e,t);let a=(n<0?i:o)||i||o;return a?a.coordsAt(Math.max(0,a==i?r:s),n):function(e){let t=e.dom.lastChild;if(!t)return e.dom.getBoundingClientRect();let n=Sh(t);return n[n.length-1]||null}(e)}function gu(e,t){for(let n in e)"class"==n&&t.class?t.class+=" "+e.class:"style"==n&&t.style?t.style+=";"+e.style:t[n]=e[n];return t}lu.prototype.children=hu.prototype.children=uu.prototype.children=Hh;const mu=Object.create(null);function yu(e,t,n){if(e==t)return!0;e||(e=mu),t||(t=mu);let i=Object.keys(e),r=Object.keys(t);if(i.length-(n&&i.indexOf(n)>-1?1:0)!=r.length-(n&&r.indexOf(n)>-1?1:0))return!1;for(let o of i)if(o!=n&&(-1==r.indexOf(o)||e[o]!==t[o]))return!1;return!0}function vu(e,t,n){let i=!1;if(t)for(let r in t)n&&r in n||(i=!0,"style"==r?e.style.cssText="":e.removeAttribute(r));if(n)for(let r in n)t&&t[r]==n[r]||(i=!0,"style"==r?e.style.cssText=n[r]:e.setAttribute(r,n[r]));return i}function wu(e){let t=Object.create(null);for(let n=0;n<e.attributes.length;n++){let i=e.attributes[n];t[i.name]=i.value}return t}class bu{eq(e){return!1}updateDOM(e,t){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,t,n){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}}var xu=function(e){return e[e.Text=0]="Text",e[e.WidgetBefore=1]="WidgetBefore",e[e.WidgetAfter=2]="WidgetAfter",e[e.WidgetRange=3]="WidgetRange",e}(xu||(xu={}));class ku extends Xc{constructor(e,t,n,i){super(),this.startSide=e,this.endSide=t,this.widget=n,this.spec=i}get heightRelevant(){return!1}static mark(e){return new _u(e)}static widget(e){let t=Math.max(-1e4,Math.min(1e4,e.side||0)),n=!!e.block;return t+=n&&!e.inlineOrder?t>0?3e8:-4e8:t>0?1e8:-1e8,new Cu(e,t,t,n,e.widget||null,!1)}static replace(e){let t,n,i=!!e.block;if(e.isBlockGap)t=-5e8,n=4e8;else{let{start:r,end:o}=Eu(e,i);t=(r?i?-3e8:-1:5e8)-1,n=1+(o?i?2e8:1:-6e8)}return new Cu(e,t,n,i,e.widget||null,!0)}static line(e){return new Su(e)}static set(e,t=!1){return Zc.of(e,t)}hasHeight(){return!!this.widget&&this.widget.estimatedHeight>-1}}ku.none=Zc.empty;class _u extends ku{constructor(e){let{start:t,end:n}=Eu(e);super(t?-1:5e8,n?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var t,n;return this==e||e instanceof _u&&this.tagName==e.tagName&&(this.class||(null===(t=this.attrs)||void 0===t?void 0:t.class))==(e.class||(null===(n=e.attrs)||void 0===n?void 0:n.class))&&yu(this.attrs,e.attrs,"class")}range(e,t=e){if(e>=t)throw new RangeError("Mark decorations may not be empty");return super.range(e,t)}}_u.prototype.point=!1;class Su extends ku{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof Su&&this.spec.class==e.spec.class&&yu(this.spec.attributes,e.spec.attributes)}range(e,t=e){if(t!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,t)}}Su.prototype.mapMode=Gl.TrackBefore,Su.prototype.point=!0;class Cu extends ku{constructor(e,t,n,i,r,o){super(t,n,r,e),this.block=i,this.isReplace=o,this.mapMode=i?t<=0?Gl.TrackBefore:Gl.TrackAfter:Gl.TrackDel}get type(){return this.startSide!=this.endSide?xu.WidgetRange:this.startSide<=0?xu.WidgetBefore:xu.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof Cu&&(t=this.widget,n=e.widget,t==n||!!(t&&n&&t.compare(n)))&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide;var t,n}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&t!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,t)}}function Eu(e,t=!1){let{inclusiveStart:n,inclusiveEnd:i}=e;return null==n&&(n=e.inclusive),null==i&&(i=e.inclusive),{start:null!=n?n:t,end:null!=i?i:t}}function Mu(e,t,n,i=0){let r=n.length-1;r>=0&&n[r]+i>=e?n[r]=Math.max(n[r],t):n.push(e,t)}Cu.prototype.point=!0;class Au extends Wh{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,t,n,i,r,o){if(n){if(!(n instanceof Au))return!1;this.dom||n.transferDOM(this)}return i&&this.setDeco(n?n.attrs:null),Xh(this,e,t,n?n.children.slice():[],r,o),!0}split(e){let t=new Au;if(t.breakAfter=this.breakAfter,0==this.length)return t;let{i:n,off:i}=this.childPos(e);i&&(t.append(this.children[n].split(i),0),this.children[n].merge(i,this.children[n].length,null,!1,0,0),n++);for(let e=n;e<this.children.length;e++)t.append(this.children[e],0);for(;n>0&&0==this.children[n-1].length;)this.children[--n].destroy();return this.children.length=n,this.markDirty(),this.length=e,t}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=void 0===this.prevAttrs?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){yu(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,t){pu(this,e,t)}addLineDeco(e){let t=e.spec.attributes,n=e.spec.class;t&&(this.attrs=gu(t,this.attrs||{})),n&&(this.attrs=gu({class:n},this.attrs||{}))}domAtPos(e){return du(this,e)}reuseDOM(e){"DIV"==e.nodeName&&(this.setDOM(e),this.flags|=6)}sync(e,t){var n;this.dom?4&this.flags&&(Fh(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),void 0!==this.prevAttrs&&(vu(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,t);let i=this.dom.lastChild;for(;i&&Wh.get(i)instanceof cu;)i=i.lastChild;if(!(i&&this.length&&("BR"==i.nodeName||0!=(null===(n=Wh.get(i))||void 0===n?void 0:n.isEditable)||au.ios&&this.children.some((e=>e instanceof lu))))){let e=document.createElement("BR");e.cmIgnore=!0,this.dom.appendChild(e)}}measureTextSize(){if(0==this.children.length||this.length>20)return null;let e,t=0;for(let n of this.children){if(!(n instanceof lu)||/[^ -~]/.test(n.text))return null;let i=Sh(n.dom);if(1!=i.length)return null;t+=i[0].width,e=i[0].height}return t?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:t/this.length,textHeight:e}:null}coordsAt(e,t){let n=fu(this,e,t);if(!this.children.length&&n&&this.parent){let{heightOracle:e}=this.parent.view.viewState,t=n.bottom-n.top;if(Math.abs(t-e.lineHeight)<2&&e.textHeight<t){let i=(t-e.textHeight)/2;return{top:n.top+i,bottom:n.bottom-i,left:n.left,right:n.left}}}return n}become(e){return e instanceof Au&&0==this.children.length&&0==e.children.length&&yu(this.attrs,e.attrs)&&this.breakAfter==e.breakAfter}covers(){return!0}static find(e,t){for(let n=0,i=0;n<e.children.length;n++){let r=e.children[n],o=i+r.length;if(o>=t){if(r instanceof Au)return r;if(o>t)break}i=o+r.breakAfter}return null}}class Du extends Wh{constructor(e,t,n){super(),this.widget=e,this.length=t,this.deco=n,this.breakAfter=0,this.prevWidget=null}merge(e,t,n,i,r,o){return!(n&&(!(n instanceof Du&&this.widget.compare(n.widget))||e>0&&r<=0||t<this.length&&o<=0))&&(this.length=e+(n?n.length:0)+(this.length-t),!0)}domAtPos(e){return 0==e?zh.before(this.dom):zh.after(this.dom,e==this.length)}split(e){let t=this.length-e;this.length=e;let n=new Du(this.widget,t,this.deco);return n.breakAfter=this.breakAfter,n}get children(){return Hh}sync(e){this.dom&&this.widget.updateDOM(this.dom,e)||(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}get overrideDOMText(){return this.parent?this.parent.view.state.doc.slice(this.posAtStart,this.posAtEnd):ql.empty}domBoundsAround(){return null}become(e){return e instanceof Du&&e.widget.constructor==this.widget.constructor&&(e.widget.compare(this.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,this.deco=e.deco,this.breakAfter=e.breakAfter,!0)}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get isEditable(){return!1}get isWidget(){return!0}coordsAt(e,t){let n=this.widget.coordsAt(this.dom,e,t);return n||(this.widget instanceof Ru?null:Rh(this.dom.getBoundingClientRect(),this.length?0==e:t<=0))}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}covers(e){let{startSide:t,endSide:n}=this.deco;return t!=n&&(e<0?t<0:n>0)}}class Ru extends bu{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}class Ou{constructor(e,t,n,i){this.doc=e,this.pos=t,this.end=n,this.disallowBlockEffectsFor=i,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=t}posCovered(){if(0==this.content.length)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof Du&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new Au),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(Tu(new uu(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,this.posCovered()||e&&this.content.length&&this.content[this.content.length-1]instanceof Du||this.getLine()}buildText(e,t,n){for(;e>0;){if(this.textOff==this.text.length){let{value:t,lineBreak:n,done:i}=this.cursor.next(this.skip);if(this.skip=0,i)throw new Error("Ran out of text content when drawing inline views");if(n){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}this.text=t,this.textOff=0}let i=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(t.slice(t.length-n)),this.getLine().append(Tu(new lu(this.text.slice(this.textOff,this.textOff+i)),t),n),this.atCursorPos=!0,this.textOff+=i,e-=i,n=0}}span(e,t,n,i){this.buildText(t-e,n,i),this.pos=t,this.openStart<0&&(this.openStart=i)}point(e,t,n,i,r,o){if(this.disallowBlockEffectsFor[o]&&n instanceof Cu){if(n.block)throw new RangeError("Block decorations may not be specified via plugins");if(t>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let s=t-e;if(n instanceof Cu)if(n.block)n.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new Du(n.widget||Nu.block,s,n));else{let o=hu.create(n.widget||Nu.inline,s,s?0:n.startSide),a=this.atCursorPos&&!o.isEditable&&r<=i.length&&(e<t||n.startSide>0),l=!o.isEditable&&(e<t||r>i.length||n.startSide<=0),c=this.getLine();2!=this.pendingBuffer||a||o.isEditable||(this.pendingBuffer=0),this.flushBuffer(i),a&&(c.append(Tu(new uu(1),i),r),r=i.length+Math.max(0,r-i.length)),c.append(Tu(o,i),r),this.atCursorPos=l,this.pendingBuffer=l?e<t||r>i.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=i.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(n);s&&(this.textOff+s<=this.text.length?this.textOff+=s:(this.skip+=s-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=t),this.openStart<0&&(this.openStart=r)}static build(e,t,n,i,r){let o=new Ou(e,t,n,r);return o.openEnd=Zc.spans(i,t,n,o),o.openStart<0&&(o.openStart=o.openEnd),o.finish(o.openEnd),o}}function Tu(e,t){for(let n of t)e=new cu(n,[e],e.length);return e}class Nu extends bu{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}Nu.inline=new Nu("span"),Nu.block=new Nu("div");var Pu=function(e){return e[e.LTR=0]="LTR",e[e.RTL=1]="RTL",e}(Pu||(Pu={}));const qu=Pu.LTR,Bu=Pu.RTL;function Lu(e){let t=[];for(let n=0;n<e.length;n++)t.push(1<<+e[n]);return t}const Iu=Lu("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),Fu=Lu("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),ju=Object.create(null),Vu=[];for(let e of["()","[]","{}"]){let t=e.charCodeAt(0),n=e.charCodeAt(1);ju[t]=n,ju[n]=-t}function $u(e){return e<=247?Iu[e]:1424<=e&&e<=1524?2:1536<=e&&e<=1785?Fu[e-1536]:1774<=e&&e<=2220?4:8192<=e&&e<=8204?256:64336<=e&&e<=65023?4:1}const zu=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class Hu{get dir(){return this.level%2?Bu:qu}constructor(e,t,n){this.from=e,this.to=t,this.level=n}side(e,t){return this.dir==t==e?this.to:this.from}forward(e,t){return e==(this.dir==t)}static find(e,t,n,i){let r=-1;for(let o=0;o<e.length;o++){let s=e[o];if(s.from<=t&&s.to>=t){if(s.level==n)return o;(r<0||(0!=i?i<0?s.from<t:s.to>t:e[r].level>s.level))&&(r=o)}}if(r<0)throw new RangeError("Index out of range");return r}}function Wu(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++){let i=e[n],r=t[n];if(i.from!=r.from||i.to!=r.to||i.direction!=r.direction||!Wu(i.inner,r.inner))return!1}return!0}const Uu=[];function Gu(e,t,n,i,r,o,s){let a=i%2?2:1;if(i%2==r%2)for(let l=t,c=0;l<n;){let t=!0,h=!1;if(c==o.length||l<o[c].from){let e=Uu[l];e!=a&&(t=!1,h=16==e)}let u=t||1!=a?null:[],d=t?i:i+1,p=l;e:for(;;)if(c<o.length&&p==o[c].from){if(h)break e;let f=o[c];if(!t)for(let e=f.to,t=c+1;;){if(e==n)break e;if(!(t<o.length&&o[t].from==e)){if(Uu[e]==a)break e;break}e=o[t++].to}if(c++,u)u.push(f);else{f.from>l&&s.push(new Hu(l,f.from,d)),Ku(e,f.direction==qu!=!(d%2)?i+1:i,r,f.inner,f.from,f.to,s),l=f.to}p=f.to}else{if(p==n||(t?Uu[p]!=a:Uu[p]==a))break;p++}u?Gu(e,l,p,i+1,r,u,s):l<p&&s.push(new Hu(l,p,d)),l=p}else for(let l=n,c=o.length;l>t;){let n=!0,h=!1;if(!c||l>o[c-1].to){let e=Uu[l-1];e!=a&&(n=!1,h=16==e)}let u=n||1!=a?null:[],d=n?i:i+1,p=l;e:for(;;)if(c&&p==o[c-1].to){if(h)break e;let f=o[--c];if(!n)for(let e=f.from,n=c;;){if(e==t)break e;if(!n||o[n-1].to!=e){if(Uu[e-1]==a)break e;break}e=o[--n].from}if(u)u.push(f);else{f.to<l&&s.push(new Hu(f.to,l,d)),Ku(e,f.direction==qu!=!(d%2)?i+1:i,r,f.inner,f.from,f.to,s),l=f.from}p=f.from}else{if(p==t||(n?Uu[p-1]!=a:Uu[p-1]==a))break;p--}u?Gu(e,p,l,i+1,r,u,s):p<l&&s.push(new Hu(p,l,d)),l=p}}function Ku(e,t,n,i,r,o,s){let a=t%2?2:1;!function(e,t,n,i,r){for(let o=0;o<=i.length;o++){let s=o?i[o-1].to:t,a=o<i.length?i[o].from:n,l=o?256:r;for(let t=s,n=l,i=l;t<a;t++){let r=$u(e.charCodeAt(t));512==r?r=n:8==r&&4==i&&(r=16),Uu[t]=4==r?2:r,7&r&&(i=r),n=r}for(let e=s,t=l,i=l;e<a;e++){let r=Uu[e];if(128==r)e<a-1&&t==Uu[e+1]&&24&t?r=Uu[e]=t:Uu[e]=256;else if(64==r){let r=e+1;for(;r<a&&64==Uu[r];)r++;let o=e&&8==t||r<n&&8==Uu[r]?1==i?1:8:256;for(let t=e;t<r;t++)Uu[t]=o;e=r-1}else 8==r&&1==i&&(Uu[e]=1);t=r,7&r&&(i=r)}}}(e,r,o,i,a),function(e,t,n,i,r){let o=1==r?2:1;for(let s=0,a=0,l=0;s<=i.length;s++){let c=s?i[s-1].to:t,h=s<i.length?i[s].from:n;for(let t,n,i,s=c;s<h;s++)if(n=ju[t=e.charCodeAt(s)])if(n<0){for(let e=a-3;e>=0;e-=3)if(Vu[e+1]==-n){let t=Vu[e+2],n=2&t?r:4&t?1&t?o:r:0;n&&(Uu[s]=Uu[Vu[e]]=n),a=e;break}}else{if(189==Vu.length)break;Vu[a++]=s,Vu[a++]=t,Vu[a++]=l}else if(2==(i=Uu[s])||1==i){let e=i==r;l=e?0:1;for(let t=a-3;t>=0;t-=3){let n=Vu[t+2];if(2&n)break;if(e)Vu[t+2]|=2;else{if(4&n)break;Vu[t+2]|=4}}}}}(e,r,o,i,a),function(e,t,n,i){for(let r=0,o=i;r<=n.length;r++){let s=r?n[r-1].to:e,a=r<n.length?n[r].from:t;for(let l=s;l<a;){let s=Uu[l];if(256==s){let s=l+1;for(;;)if(s==a){if(r==n.length)break;s=n[r++].to,a=r<n.length?n[r].from:t}else{if(256!=Uu[s])break;s++}let c=1==o,h=c==(1==(s<t?Uu[s]:i))?c?1:2:i;for(let t=s,i=r,o=i?n[i-1].to:e;t>l;)t==o&&(t=n[--i].from,o=i?n[i-1].to:e),Uu[--t]=h;l=s}else o=s,l++}}}(r,o,i,a),Gu(e,r,o,t,n,i,s)}function Xu(e){return[new Hu(0,e,0)]}let Yu="";function Ju(e,t,n,i,r){var o;let s=i.head-e.from,a=Hu.find(t,s,null!==(o=i.bidiLevel)&&void 0!==o?o:-1,i.assoc),l=t[a],c=l.side(r,n);if(s==c){let e=a+=r?1:-1;if(e<0||e>=t.length)return null;l=t[a=e],s=l.side(!r,n),c=l.side(r,n)}let h=Wl(e.text,s,l.forward(r,n));(h<l.from||h>l.to)&&(h=c),Yu=e.text.slice(Math.min(s,h),Math.max(s,h));let u=a==(r?t.length-1:0)?null:t[a+(r?1:-1)];return u&&h==c&&u.level+(r?0:1)<l.level?ic.cursor(u.side(!r,n)+e.from,u.forward(r,n)?1:-1,u.level):ic.cursor(h+e.from,l.forward(r,n)?-1:1,l.level)}function Qu(e,t,n){for(let i=t;i<n;i++){let t=$u(e.charCodeAt(i));if(1==t)return qu;if(2==t||4==t)return Bu}return qu}const Zu=sc.define(),ed=sc.define(),td=sc.define(),nd=sc.define(),id=sc.define(),rd=sc.define(),od=sc.define(),sd=sc.define(),ad=sc.define(),ld=sc.define({combine:e=>e.some((e=>e))}),cd=sc.define({combine:e=>e.some((e=>e))}),hd=sc.define();class ud{constructor(e,t="nearest",n="nearest",i=5,r=5,o=!1){this.range=e,this.y=t,this.x=n,this.yMargin=i,this.xMargin=r,this.isSnapshot=o}map(e){return e.empty?this:new ud(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new ud(ic.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const dd=Bc.define({map:(e,t)=>e.map(t)}),pd=Bc.define();function fd(e,t,n){let i=e.facet(nd);i.length?i[0](t):window.onerror?window.onerror(String(t),n,void 0,void 0,t):n?console.error(n+":",t):console.error(t)}const gd=sc.define({combine:e=>!e.length||e[0]});let md=0;const yd=sc.define();class vd{constructor(e,t,n,i,r){this.id=e,this.create=t,this.domEventHandlers=n,this.domEventObservers=i,this.extension=r(this)}static define(e,t){const{eventHandlers:n,eventObservers:i,provide:r,decorations:o}=t||{};return new vd(md++,e,n,i,(e=>{let t=[yd.of(e)];return o&&t.push(kd.of((t=>{let n=t.plugin(e);return n?o(n):ku.none}))),r&&t.push(r(e)),t}))}static fromClass(e,t){return vd.define((t=>new e(t)),t)}}class wd{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}update(e){if(this.value){if(this.mustUpdate){let e=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(e)}catch(t){if(fd(e.state,t,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch(e){}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(e)}catch(t){fd(e.state,t,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var t;if(null===(t=this.value)||void 0===t?void 0:t.destroy)try{this.value.destroy()}catch(t){fd(e.state,t,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const bd=sc.define(),xd=sc.define(),kd=sc.define(),_d=sc.define(),Sd=sc.define(),Cd=sc.define();function Ed(e,t){let n=e.state.facet(Cd);if(!n.length)return n;let i=n.map((t=>t instanceof Function?t(e):t)),r=[];return Zc.spans(i,t.from,t.to,{point(){},span(e,n,i,o){let s=e-t.from,a=n-t.from,l=r;for(let e=i.length-1;e>=0;e--,o--){let n,r=i[e].spec.bidiIsolate;if(null==r&&(r=Qu(t.text,s,a)),o>0&&l.length&&(n=l[l.length-1]).to==s&&n.direction==r)n.to=a,l=n.inner;else{let e={from:s,to:a,direction:r,inner:[]};l.push(e),l=e.inner}}}}),r}const Md=sc.define();function Ad(e){let t=0,n=0,i=0,r=0;for(let o of e.state.facet(Md)){let s=o(e);s&&(null!=s.left&&(t=Math.max(t,s.left)),null!=s.right&&(n=Math.max(n,s.right)),null!=s.top&&(i=Math.max(i,s.top)),null!=s.bottom&&(r=Math.max(r,s.bottom)))}return{left:t,right:n,top:i,bottom:r}}const Dd=sc.define();class Rd{constructor(e,t,n,i){this.fromA=e,this.toA=t,this.fromB=n,this.toB=i}join(e){return new Rd(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let t=e.length,n=this;for(;t>0;t--){let i=e[t-1];if(!(i.fromA>n.toA)){if(i.toA<n.fromA)break;n=n.join(i),e.splice(t-1,1)}}return e.splice(t,0,n),e}static extendWithRanges(e,t){if(0==t.length)return e;let n=[];for(let i=0,r=0,o=0,s=0;;i++){let a=i==e.length?null:e[i],l=o-s,c=a?a.fromB:1e9;for(;r<t.length&&t[r]<c;){let e=t[r],i=t[r+1],o=Math.max(s,e),a=Math.min(c,i);if(o<=a&&new Rd(o+l,a+l,o,a).addToSet(n),i>c)break;r+=2}if(!a)return n;new Rd(a.fromA,a.toA,a.fromB,a.toB).addToSet(n),o=a.toA,s=a.toB}}}class Od{constructor(e,t,n){this.view=e,this.state=t,this.transactions=n,this.flags=0,this.startState=e.state,this.changes=Xl.empty(this.startState.doc.length);for(let e of n)this.changes=this.changes.compose(e.changes);let i=[];this.changes.iterChangedRanges(((e,t,n,r)=>i.push(new Rd(e,t,n,r)))),this.changedRanges=i}static create(e,t,n){return new Od(e,t,n)}get viewportChanged(){return(4&this.flags)>0}get viewportMoved(){return(8&this.flags)>0}get heightChanged(){return(2&this.flags)>0}get geometryChanged(){return this.docChanged||(18&this.flags)>0}get focusChanged(){return(1&this.flags)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some((e=>e.selection))}get empty(){return 0==this.flags&&0==this.transactions.length}}class Td extends Wh{get length(){return this.view.state.doc.length}constructor(e){super(),this.view=e,this.decorations=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.editContextFormatting=ku.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new Au],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new Rd(0,0,0,e.state.doc.length)],0,null)}update(e){var t;let n=e.changedRanges;this.minWidth>0&&n.length&&(n.every((({fromA:e,toA:t})=>t<this.minWidthFrom||e>this.minWidthTo))?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let i=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&((null===(t=this.domChanged)||void 0===t?void 0:t.newSel)?i=this.domChanged.newSel.head:function(e,t){let n=!1;t&&e.iterChangedRanges(((e,i)=>{e<t.to&&i>t.from&&(n=!0)}));return n}(e.changes,this.hasComposition)||e.selectionSet||(i=e.state.selection.main.head));let r=i>-1?function(e,t,n){let i=Nd(e,n);if(!i)return null;let{node:r,from:o,to:s}=i,a=r.nodeValue;if(/[\n\r]/.test(a))return null;if(e.state.doc.sliceString(i.from,i.to)!=a)return null;let l=t.invertedDesc,c=new Rd(l.mapPos(o),l.mapPos(s),o,s),h=[];for(let t=r.parentNode;;t=t.parentNode){let n=Wh.get(t);if(n instanceof cu)h.push({node:t,deco:n.mark});else{if(n instanceof Au||"DIV"==t.nodeName&&t.parentNode==e.contentDOM)return{range:c,text:r,marks:h,line:t};if(t==e.contentDOM)return null;h.push({node:t,deco:new _u({inclusive:!0,attributes:wu(t),tagName:t.tagName.toLowerCase()})})}}}(this.view,e.changes,i):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:t,to:i}=this.hasComposition;n=new Rd(t,i,e.changes.mapPos(t,-1),e.changes.mapPos(i,1)).addToSet(n.slice())}this.hasComposition=r?{from:r.range.fromB,to:r.range.toB}:null,(au.ie||au.chrome)&&!r&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let o=function(e,t,n){let i=new Pd;return Zc.compare(e,t,n,i),i.changes}(this.decorations,this.updateDeco(),e.changes);return n=Rd.extendWithRanges(n,o),!!(7&this.flags||0!=n.length)&&(this.updateInner(n,e.startState.doc.length,r),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t,n){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,t,n);let{observer:i}=this.view;i.ignore((()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let e=au.chrome||au.ios?{node:i.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,e),this.flags&=-8,e&&(e.written||i.selectionRange.focusNode!=e.node)&&(this.forceSelection=!0),this.dom.style.height=""})),this.markedForComposition.forEach((e=>e.flags&=-9));let r=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let e of this.children)e instanceof Du&&e.widget instanceof Ru&&r.push(e.dom);i.updateGaps(r)}updateChildren(e,t,n){let i=n?n.range.addToSet(e.slice()):e,r=this.childCursor(t);for(let e=i.length-1;;e--){let t=e>=0?i[e]:null;if(!t)break;let o,s,a,l,{fromA:c,toA:h,fromB:u,toB:d}=t;if(n&&n.range.fromB<d&&n.range.toB>u){let e=Ou.build(this.view.state.doc,u,n.range.fromB,this.decorations,this.dynamicDecorationMap),t=Ou.build(this.view.state.doc,n.range.toB,d,this.decorations,this.dynamicDecorationMap);s=e.breakAtStart,a=e.openStart,l=t.openEnd;let i=this.compositionView(n);t.breakAtStart?i.breakAfter=1:t.content.length&&i.merge(i.length,i.length,t.content[0],!1,t.openStart,0)&&(i.breakAfter=t.content[0].breakAfter,t.content.shift()),e.content.length&&i.merge(0,0,e.content[e.content.length-1],!0,0,e.openEnd)&&e.content.pop(),o=e.content.concat(i).concat(t.content)}else({content:o,breakAtStart:s,openStart:a,openEnd:l}=Ou.build(this.view.state.doc,u,d,this.decorations,this.dynamicDecorationMap));let{i:p,off:f}=r.findPos(h,1),{i:g,off:m}=r.findPos(c,-1);Kh(this,g,m,p,f,o,s,a,l)}n&&this.fixCompositionDOM(n)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let t of e.transactions)for(let e of t.effects)e.is(pd)&&(this.editContextFormatting=e.value)}compositionView(e){let t=new lu(e.text.nodeValue);t.flags|=8;for(let{deco:n}of e.marks)t=new cu(n,[t],t.length);let n=new Au;return n.append(t,0),n}fixCompositionDOM(e){let t=(e,t)=>{t.flags|=8|(t.children.some((e=>7&e.flags))?1:0),this.markedForComposition.add(t);let n=Wh.get(e);n&&n!=t&&(n.dom=null),t.setDOM(e)},n=this.childPos(e.range.fromB,1),i=this.children[n.i];t(e.line,i);for(let r=e.marks.length-1;r>=-1;r--)n=i.childPos(n.off,1),i=i.children[n.i],t(r>=0?e.marks[r].node:e.text,i)}updateSelection(e=!1,t=!1){!e&&this.view.observer.selectionRange.focusNode||this.view.observer.readSelectionRange();let n=this.view.root.activeElement,i=n==this.dom,r=!i&&!(this.view.state.facet(gd)||this.dom.tabIndex>-1)&&_h(this.dom,this.view.observer.selectionRange)&&!(n&&this.dom.contains(n));if(!(i||t||r))return;let o=this.forceSelection;this.forceSelection=!1;let s=this.view.state.selection.main,a=this.moveToLine(this.domAtPos(s.anchor)),l=s.empty?a:this.moveToLine(this.domAtPos(s.head));if(au.gecko&&s.empty&&!this.hasComposition&&(1==(c=a).node.nodeType&&c.node.firstChild&&(0==c.offset||"false"==c.node.childNodes[c.offset-1].contentEditable)&&(c.offset==c.node.childNodes.length||"false"==c.node.childNodes[c.offset].contentEditable))){let e=document.createTextNode("");this.view.observer.ignore((()=>a.node.insertBefore(e,a.node.childNodes[a.offset]||null))),a=l=new zh(e,0),o=!0}var c;let h=this.view.observer.selectionRange;!o&&h.focusNode&&(Ch(a.node,a.offset,h.anchorNode,h.anchorOffset)&&Ch(l.node,l.offset,h.focusNode,h.focusOffset)||this.suppressWidgetCursorChange(h,s))||(this.view.observer.ignore((()=>{au.android&&au.chrome&&this.dom.contains(h.focusNode)&&function(e,t){for(let n=e;n&&n!=t;n=n.assignedSlot||n.parentNode)if(1==n.nodeType&&"false"==n.contentEditable)return!0;return!1}(h.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let e=xh(this.view.root);if(e)if(s.empty){if(au.gecko){let e=function(e,t){return 1!=e.nodeType?0:(t&&"false"==e.childNodes[t-1].contentEditable?1:0)|(t<e.childNodes.length&&"false"==e.childNodes[t].contentEditable?2:0)}(a.node,a.offset);if(e&&3!=e){let t=(1==e?Vh:$h)(a.node,a.offset);t&&(a=new zh(t.node,t.offset))}}e.collapse(a.node,a.offset),null!=s.bidiLevel&&void 0!==e.caretBidiLevel&&(e.caretBidiLevel=s.bidiLevel)}else if(e.extend){e.collapse(a.node,a.offset);try{e.extend(l.node,l.offset)}catch(e){}}else{let t=document.createRange();s.anchor>s.head&&([a,l]=[l,a]),t.setEnd(l.node,l.offset),t.setStart(a.node,a.offset),e.removeAllRanges(),e.addRange(t)}else;r&&this.view.root.activeElement==this.dom&&(this.dom.blur(),n&&n.focus())})),this.view.observer.setSelectionRange(a,l)),this.impreciseAnchor=a.precise?null:new zh(h.anchorNode,h.anchorOffset),this.impreciseHead=l.precise?null:new zh(h.focusNode,h.focusOffset)}suppressWidgetCursorChange(e,t){return this.hasComposition&&t.empty&&Ch(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==t.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,t=e.state.selection.main,n=xh(e.root),{anchorNode:i,anchorOffset:r}=e.observer.selectionRange;if(!(n&&t.empty&&t.assoc&&n.modify))return;let o=Au.find(this,t.head);if(!o)return;let s=o.posAtStart;if(t.head==s||t.head==s+o.length)return;let a=this.coordsAt(t.head,-1),l=this.coordsAt(t.head,1);if(!a||!l||a.bottom>l.top)return;let c=this.domAtPos(t.head+t.assoc);n.collapse(c.node,c.offset),n.modify("move",t.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let h=e.observer.selectionRange;e.docView.posFromDOM(h.anchorNode,h.anchorOffset)!=t.from&&n.collapse(i,r)}moveToLine(e){let t,n=this.dom;if(e.node!=n)return e;for(let i=e.offset;!t&&i<n.childNodes.length;i++){let e=Wh.get(n.childNodes[i]);e instanceof Au&&(t=e.domAtPos(0))}for(let i=e.offset-1;!t&&i>=0;i--){let e=Wh.get(n.childNodes[i]);e instanceof Au&&(t=e.domAtPos(e.length))}return t?new zh(t.node,t.offset,!0):e}nearest(e){for(let t=e;t;){let e=Wh.get(t);if(e&&e.rootView==this)return e;t=t.parentNode}return null}posFromDOM(e,t){let n=this.nearest(e);if(!n)throw new RangeError("Trying to find position for a DOM position outside of the document");return n.localPosFromDOM(e,t)+n.posAtStart}domAtPos(e){let{i:t,off:n}=this.childCursor().findPos(e,-1);for(;t<this.children.length-1;){let e=this.children[t];if(n<e.length||e instanceof Au)break;t++,n=0}return this.children[t].domAtPos(n)}coordsAt(e,t){let n=null,i=0;for(let r=this.length,o=this.children.length-1;o>=0;o--){let s=this.children[o],a=r-s.breakAfter,l=a-s.length;if(a<e)break;if(l<=e&&(l<e||s.covers(-1))&&(a>e||s.covers(1))&&(!n||s instanceof Au&&!(n instanceof Au&&t>=0)))n=s,i=l;else if(n&&l==e&&a==e&&s instanceof Du&&Math.abs(t)<2){if(s.deco.startSide<0)break;o&&(n=null)}r=l}return n?n.coordsAt(e-i,t):null}coordsForChar(e){let{i:t,off:n}=this.childPos(e,1),i=this.children[t];if(!(i instanceof Au))return null;for(;i.children.length;){let{i:e,off:t}=i.childPos(n,1);for(;;e++){if(e==i.children.length)return null;if((i=i.children[e]).length)break}n=t}if(!(i instanceof lu))return null;let r=Wl(i.text,n);if(r==n)return null;let o=Lh(i.dom,n,r).getClientRects();for(let e=0;e<o.length;e++){let t=o[e];if(e==o.length-1||t.top<t.bottom&&t.left<t.right)return t}return null}measureVisibleLineHeights(e){let t=[],{from:n,to:i}=e,r=this.view.contentDOM.clientWidth,o=r>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,s=-1,a=this.view.textDirection==Pu.LTR;for(let e=0,l=0;l<this.children.length;l++){let c=this.children[l],h=e+c.length;if(h>i)break;if(e>=n){let n=c.dom.getBoundingClientRect();if(t.push(n.height),o){let t=c.dom.lastChild,i=t?Sh(t):[];if(i.length){let t=i[i.length-1],o=a?t.right-n.left:n.right-t.left;o>s&&(s=o,this.minWidth=r,this.minWidthFrom=e,this.minWidthTo=h)}}}e=h+c.breakAfter}return t}textDirectionAt(e){let{i:t}=this.childPos(e,1);return"rtl"==getComputedStyle(this.children[t].dom).direction?Pu.RTL:Pu.LTR}measureTextSize(){for(let e of this.children)if(e instanceof Au){let t=e.measureTextSize();if(t)return t}let e,t,n,i=document.createElement("div");return i.className="cm-line",i.style.width="99999px",i.style.position="absolute",i.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore((()=>{this.dom.appendChild(i);let r=Sh(i.firstChild)[0];e=i.getBoundingClientRect().height,t=r?r.width/27:7,n=r?r.height:e,i.remove()})),{lineHeight:e,charWidth:t,textHeight:n}}childCursor(e=this.length){let t=this.children.length;return t&&(e-=this.children[--t].length),new Gh(this.children,e,t)}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let n=0,i=0;;i++){let r=i==t.viewports.length?null:t.viewports[i],o=r?r.from-1:this.length;if(o>n){let i=(t.lineBlockAt(o).bottom-t.lineBlockAt(n).top)/this.view.scaleY;e.push(ku.replace({widget:new Ru(i),block:!0,inclusive:!0,isBlockGap:!0}).range(n,o))}if(!r)break;n=r.to+1}return ku.set(e)}updateDeco(){let e=1,t=this.view.state.facet(kd).map((t=>(this.dynamicDecorationMap[e++]="function"==typeof t)?t(this.view):t)),n=!1,i=this.view.state.facet(_d).map(((e,t)=>{let i="function"==typeof e;return i&&(n=!0),i?e(this.view):e}));for(i.length&&(this.dynamicDecorationMap[e++]=n,t.push(Zc.join(i))),this.decorations=[this.editContextFormatting,...t,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];e<this.decorations.length;)this.dynamicDecorationMap[e++]=!1;return this.decorations}scrollIntoView(e){if(e.isSnapshot){let t=this.view.viewState.lineBlockAt(e.range.head);return this.view.scrollDOM.scrollTop=t.top-e.yMargin,void(this.view.scrollDOM.scrollLeft=e.xMargin)}for(let t of this.view.state.facet(hd))try{if(t(this.view,e.range,e))return!0}catch(e){fd(this.view.state,e,"scroll handler")}let t,{range:n}=e,i=this.coordsAt(n.head,n.empty?n.assoc:n.head>n.anchor?-1:1);if(!i)return;!n.empty&&(t=this.coordsAt(n.anchor,n.anchor>n.head?-1:1))&&(i={left:Math.min(i.left,t.left),top:Math.min(i.top,t.top),right:Math.max(i.right,t.right),bottom:Math.max(i.bottom,t.bottom)});let r=Ad(this.view),o={left:i.left-r.left,top:i.top-r.top,right:i.right+r.right,bottom:i.bottom+r.bottom},{offsetWidth:s,offsetHeight:a}=this.view.scrollDOM;!function(e,t,n,i,r,o,s,a){let l=e.ownerDocument,c=l.defaultView||window;for(let h=e,u=!1;h&&!u;)if(1==h.nodeType){let e,d=h==l.body,p=1,f=1;if(d)e=Oh(c);else{if(/^(fixed|sticky)$/.test(getComputedStyle(h).position)&&(u=!0),h.scrollHeight<=h.clientHeight&&h.scrollWidth<=h.clientWidth){h=h.assignedSlot||h.parentNode;continue}let t=h.getBoundingClientRect();({scaleX:p,scaleY:f}=Th(h,t)),e={left:t.left,right:t.left+h.clientWidth*p,top:t.top,bottom:t.top+h.clientHeight*f}}let g=0,m=0;if("nearest"==r)t.top<e.top?(m=-(e.top-t.top+s),n>0&&t.bottom>e.bottom+m&&(m=t.bottom-e.bottom+m+s)):t.bottom>e.bottom&&(m=t.bottom-e.bottom+s,n<0&&t.top-m<e.top&&(m=-(e.top+m-t.top+s)));else{let i=t.bottom-t.top,o=e.bottom-e.top;m=("center"==r&&i<=o?t.top+i/2-o/2:"start"==r||"center"==r&&n<0?t.top-s:t.bottom-o+s)-e.top}if("nearest"==i?t.left<e.left?(g=-(e.left-t.left+o),n>0&&t.right>e.right+g&&(g=t.right-e.right+g+o)):t.right>e.right&&(g=t.right-e.right+o,n<0&&t.left<e.left+g&&(g=-(e.left+g-t.left+o))):g=("center"==i?t.left+(t.right-t.left)/2-(e.right-e.left)/2:"start"==i==a?t.left-o:t.right-(e.right-e.left)+o)-e.left,g||m)if(d)c.scrollBy(g,m);else{let e=0,n=0;if(m){let e=h.scrollTop;h.scrollTop+=m/f,n=(h.scrollTop-e)*f}if(g){let t=h.scrollLeft;h.scrollLeft+=g/p,e=(h.scrollLeft-t)*p}t={left:t.left-e,top:t.top-n,right:t.right-e,bottom:t.bottom-n},e&&Math.abs(e-g)<1&&(i="nearest"),n&&Math.abs(n-m)<1&&(r="nearest")}if(d)break;h=h.assignedSlot||h.parentNode}else{if(11!=h.nodeType)break;h=h.host}}(this.view.scrollDOM,o,n.head<n.anchor?-1:1,e.x,e.y,Math.max(Math.min(e.xMargin,s),-s),Math.max(Math.min(e.yMargin,a),-a),this.view.textDirection==Pu.LTR)}}function Nd(e,t){let n=e.observer.selectionRange;if(!n.focusNode)return null;let i=Vh(n.focusNode,n.focusOffset),r=$h(n.focusNode,n.focusOffset),o=i||r;if(r&&i&&r.node!=i.node){let t=Wh.get(r.node);if(!t||t instanceof lu&&t.text!=r.node.nodeValue)o=r;else if(e.docView.lastCompositionAfterCursor){let e=Wh.get(i.node);!e||e instanceof lu&&e.text!=i.node.nodeValue||(o=r)}}if(e.docView.lastCompositionAfterCursor=o!=i,!o)return null;let s=t-o.offset;return{from:s,to:s+o.node.nodeValue.length,node:o.node}}let Pd=class{constructor(){this.changes=[]}compareRange(e,t){Mu(e,t,this.changes)}comparePoint(e,t){Mu(e,t,this.changes)}boundChange(e){Mu(e,e,this.changes)}};function qd(e,t){return t.left>e?t.left-e:Math.max(0,e-t.right)}function Bd(e,t){return t.top>e?t.top-e:Math.max(0,e-t.bottom)}function Ld(e,t){return e.top<t.bottom-1&&e.bottom>t.top+1}function Id(e,t){return t<e.top?{top:t,left:e.left,right:e.right,bottom:e.bottom}:e}function Fd(e,t){return t>e.bottom?{top:e.top,left:e.left,right:e.right,bottom:t}:e}function jd(e,t,n){let i,r,o,s,a,l,c,h,u=!1;for(let d=e.firstChild;d;d=d.nextSibling){let e=Sh(d);for(let p=0;p<e.length;p++){let f=e[p];r&&Ld(r,f)&&(f=Id(Fd(f,r.bottom),r.top));let g=qd(t,f),m=Bd(n,f);if(0==g&&0==m)return 3==d.nodeType?Vd(d,t,n):jd(d,t,n);if(!i||s>m||s==m&&o>g){i=d,r=f,o=g,s=m;let a=m?n<f.top?-1:1:g?t<f.left?-1:1:0;u=!a||(a>0?p<e.length-1:p>0)}0==g?n>f.bottom&&(!c||c.bottom<f.bottom)?(a=d,c=f):n<f.top&&(!h||h.top>f.top)&&(l=d,h=f):c&&Ld(c,f)?c=Fd(c,f.bottom):h&&Ld(h,f)&&(h=Id(h,f.top))}}if(c&&c.bottom>=n?(i=a,r=c):h&&h.top<=n&&(i=l,r=h),!i)return{node:e,offset:0};let d=Math.max(r.left,Math.min(r.right,t));return 3==i.nodeType?Vd(i,d,n):u&&"false"!=i.contentEditable?jd(i,d,n):{node:e,offset:Array.prototype.indexOf.call(e.childNodes,i)+(t>=(r.left+r.right)/2?1:0)}}function Vd(e,t,n){let i=e.nodeValue.length,r=-1,o=1e9,s=0;for(let a=0;a<i;a++){let i=Lh(e,a,a+1).getClientRects();for(let l=0;l<i.length;l++){let c=i[l];if(c.top==c.bottom)continue;s||(s=t-c.left);let h=(c.top>n?c.top-n:n-c.bottom)-1;if(c.left-1<=t&&c.right+1>=t&&h<o){let n=t>=(c.left+c.right)/2,i=n;if(au.chrome||au.gecko){Lh(e,a).getBoundingClientRect().left==c.right&&(i=!n)}if(h<=0)return{node:e,offset:a+(i?1:0)};r=a+(i?1:0),o=h}}}return{node:e,offset:r>-1?r:s>0?e.nodeValue.length:0}}function $d(e,t,n,i=-1){var r,o;let s,a=e.contentDOM.getBoundingClientRect(),l=a.top+e.viewState.paddingTop,{docHeight:c}=e.viewState,{x:h,y:u}=t,d=u-l;if(d<0)return 0;if(d>c)return e.state.doc.length;for(let t=e.viewState.heightOracle.textHeight/2,r=!1;s=e.elementAtHeight(d),s.type!=xu.Text;)for(;d=i>0?s.bottom+t:s.top-t,!(d>=0&&d<=c);){if(r)return n?null:0;r=!0,i=-i}u=l+d;let p=s.from;if(p<e.viewport.from)return 0==e.viewport.from?0:n?null:zd(e,a,s,h,u);if(p>e.viewport.to)return e.viewport.to==e.state.doc.length?e.state.doc.length:n?null:zd(e,a,s,h,u);let f=e.dom.ownerDocument,g=e.root.elementFromPoint?e.root:f,m=g.elementFromPoint(h,u);m&&!e.contentDOM.contains(m)&&(m=null),m||(h=Math.max(a.left+1,Math.min(a.right-1,h)),m=g.elementFromPoint(h,u),m&&!e.contentDOM.contains(m)&&(m=null));let y,v=-1;if(m&&0!=(null===(r=e.docView.nearest(m))||void 0===r?void 0:r.isEditable)){if(f.caretPositionFromPoint){let e=f.caretPositionFromPoint(h,u);e&&({offsetNode:y,offset:v}=e)}else if(f.caretRangeFromPoint){let t=f.caretRangeFromPoint(h,u);t&&(({startContainer:y,startOffset:v}=t),(!e.contentDOM.contains(y)||au.safari&&function(e,t,n){let i;if(3!=e.nodeType||t!=(i=e.nodeValue.length))return!1;for(let t=e.nextSibling;t;t=t.nextSibling)if(1!=t.nodeType||"BR"!=t.nodeName)return!1;return Lh(e,i-1,i).getBoundingClientRect().left>n}(y,v,h)||au.chrome&&function(e,t,n){if(0!=t)return!1;for(let t=e;;){let e=t.parentNode;if(!e||1!=e.nodeType||e.firstChild!=t)return!1;if(e.classList.contains("cm-line"))break;t=e}let i=1==e.nodeType?e.getBoundingClientRect():Lh(e,0,Math.max(e.nodeValue.length,1)).getBoundingClientRect();return n-i.left>5}(y,v,h))&&(y=void 0))}y&&(v=Math.min(Dh(y),v))}if(!y||!e.docView.dom.contains(y)){let t=Au.find(e.docView,p);if(!t)return d>s.top+s.height/2?s.to:s.from;({node:y,offset:v}=jd(t.dom,h,u))}let w=e.docView.nearest(y);if(!w)return null;if(w.isWidget&&1==(null===(o=w.dom)||void 0===o?void 0:o.nodeType)){let e=w.dom.getBoundingClientRect();return t.y<e.top||t.y<=e.bottom&&t.x<=(e.left+e.right)/2?w.posAtStart:w.posAtEnd}return w.localPosFromDOM(y,v)+w.posAtStart}function zd(e,t,n,i,r){let o=Math.round((i-t.left)*e.defaultCharacterWidth);if(e.lineWrapping&&n.height>1.5*e.defaultLineHeight){let t=e.viewState.heightOracle.textHeight;o+=Math.floor((r-n.top-.5*(e.defaultLineHeight-t))/t)*e.viewState.heightOracle.lineLength}let s=e.state.sliceDoc(n.from,n.to);return n.from+function(e,t,n,i){for(let i=0,r=0;;){if(r>=t)return i;if(i==e.length)break;r+=9==e.charCodeAt(i)?n-r%n:1,i=Wl(e,i)}return!0===i?-1:e.length}(s,o,e.state.tabSize)}function Hd(e,t,n,i){let r=function(e,t){let n=e.lineBlockAt(t);if(Array.isArray(n.type))for(let e of n.type)if(e.to>t||e.to==t&&(e.to==n.to||e.type==xu.Text))return e;return n}(e,t.head),o=i&&r.type==xu.Text&&(e.lineWrapping||r.widgetLineBreaks)?e.coordsAtPos(t.assoc<0&&t.head>r.from?t.head-1:t.head):null;if(o){let t=e.dom.getBoundingClientRect(),i=e.textDirectionAt(r.from),s=e.posAtCoords({x:n==(i==Pu.LTR)?t.right-1:t.left+1,y:(o.top+o.bottom)/2});if(null!=s)return ic.cursor(s,n?-1:1)}return ic.cursor(n?r.to:r.from,n?-1:1)}function Wd(e,t,n,i){let r=e.state.doc.lineAt(t.head),o=e.bidiSpans(r),s=e.textDirectionAt(r.from);for(let a=t,l=null;;){let t=Ju(r,o,s,a,n),c=Yu;if(!t){if(r.number==(n?e.state.doc.lines:1))return a;c="\n",r=e.state.doc.line(r.number+(n?1:-1)),o=e.bidiSpans(r),t=e.visualLineSide(r,!n)}if(l){if(!l(c))return a}else{if(!i)return t;l=i(c)}a=t}}function Ud(e,t,n){for(;;){let i=0;for(let r of e)r.between(t-1,t+1,((e,r,o)=>{if(t>e&&t<r){let o=i||n||(t-e<r-t?-1:1);t=o<0?e:r,i=o}}));if(!i)return t}}function Gd(e,t,n){let i=Ud(e.state.facet(Sd).map((t=>t(e))),n.from,t.head>n.from?-1:1);return i==n.from?n:ic.cursor(i,i<n.from?1:-1)}const Kd="￿";class Xd{constructor(e,t){this.points=e,this.text="",this.lineSeparator=t.facet(Kc.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=Kd}readRange(e,t){if(!e)return this;let n=e.parentNode;for(let i=e;;){this.findPointBefore(n,i);let e=this.text.length;this.readNode(i);let r=i.nextSibling;if(r==t)break;let o=Wh.get(i),s=Wh.get(r);(o&&s?o.breakAfter:(o?o.breakAfter:Mh(i))||Mh(r)&&("BR"!=i.nodeName||i.cmIgnore)&&this.text.length>e)&&this.lineBreak(),i=r}return this.findPointBefore(n,t),this}readTextNode(e){let t=e.nodeValue;for(let n of this.points)n.node==e&&(n.pos=this.text.length+Math.min(n.offset,t.length));for(let n=0,i=this.lineSeparator?null:/\r\n?|\n/g;;){let r,o=-1,s=1;if(this.lineSeparator?(o=t.indexOf(this.lineSeparator,n),s=this.lineSeparator.length):(r=i.exec(t))&&(o=r.index,s=r[0].length),this.append(t.slice(n,o<0?t.length:o)),o<0)break;if(this.lineBreak(),s>1)for(let t of this.points)t.node==e&&t.pos>this.text.length&&(t.pos-=s-1);n=o+s}}readNode(e){if(e.cmIgnore)return;let t=Wh.get(e),n=t&&t.overrideDOMText;if(null!=n){this.findPointInside(e,n.length);for(let e=n.iter();!e.next().done;)e.lineBreak?this.lineBreak():this.append(e.value)}else 3==e.nodeType?this.readTextNode(e):"BR"==e.nodeName?e.nextSibling&&this.lineBreak():1==e.nodeType&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let n of this.points)n.node==e&&e.childNodes[n.offset]==t&&(n.pos=this.text.length)}findPointInside(e,t){for(let n of this.points)(3==e.nodeType?n.node==e:e.contains(n.node))&&(n.pos=this.text.length+(Yd(e,n.node,n.offset)?t:0))}}function Yd(e,t,n){for(;;){if(!t||n<Dh(t))return!1;if(t==e)return!0;n=Eh(t)+1,t=t.parentNode}}class Jd{constructor(e,t){this.node=e,this.offset=t,this.pos=-1}}class Qd{constructor(e,t,n,i){this.typeOver=i,this.bounds=null,this.text="",this.domChanged=t>-1;let{impreciseHead:r,impreciseAnchor:o}=e.docView;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=e.docView.domBoundsAround(t,n,0))){let t=r||o?[]:function(e){let t=[];if(e.root.activeElement!=e.contentDOM)return t;let{anchorNode:n,anchorOffset:i,focusNode:r,focusOffset:o}=e.observer.selectionRange;n&&(t.push(new Jd(n,i)),r==n&&o==i||t.push(new Jd(r,o)));return t}(e),n=new Xd(t,e.state);n.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=n.text,this.newSel=function(e,t){if(0==e.length)return null;let n=e[0].pos,i=2==e.length?e[1].pos:n;return n>-1&&i>-1?ic.single(n+t,i+t):null}(t,this.bounds.from)}else{let t=e.observer.selectionRange,n=r&&r.node==t.focusNode&&r.offset==t.focusOffset||!kh(e.contentDOM,t.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(t.focusNode,t.focusOffset),i=o&&o.node==t.anchorNode&&o.offset==t.anchorOffset||!kh(e.contentDOM,t.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(t.anchorNode,t.anchorOffset),s=e.viewport;if((au.ios||au.chrome)&&e.state.selection.main.empty&&n!=i&&(s.from>0||s.to<e.state.doc.length)){let t=Math.min(n,i),r=Math.max(n,i),o=s.from-t,a=s.to-r;0!=o&&1!=o&&0!=t||0!=a&&-1!=a&&r!=e.state.doc.length||(n=0,i=e.state.doc.length)}this.newSel=ic.single(i,n)}}}function Zd(e,t){let n,{newSel:i}=t,r=e.state.selection.main,o=e.inputState.lastKeyTime>Date.now()-100?e.inputState.lastKeyCode:-1;if(t.bounds){let{from:i,to:s}=t.bounds,a=r.from,l=null;(8===o||au.android&&t.text.length<s-i)&&(a=r.to,l="end");let c=function(e,t,n,i){let r=Math.min(e.length,t.length),o=0;for(;o<r&&e.charCodeAt(o)==t.charCodeAt(o);)o++;if(o==r&&e.length==t.length)return null;let s=e.length,a=t.length;for(;s>0&&a>0&&e.charCodeAt(s-1)==t.charCodeAt(a-1);)s--,a--;if("end"==i){n-=s+Math.max(0,o-Math.min(s,a))-o}if(s<o&&e.length<t.length){o-=n<=o&&n>=s?o-n:0,a=o+(a-s),s=o}else if(a<o){o-=n<=o&&n>=a?o-n:0,s=o+(s-a),a=o}return{from:o,toA:s,toB:a}}(e.state.doc.sliceString(i,s,Kd),t.text,a-i,l);c&&(au.chrome&&13==o&&c.toB==c.from+2&&t.text.slice(c.from,c.toB)==Kd+Kd&&c.toB--,n={from:i+c.from,to:i+c.toA,insert:ql.of(t.text.slice(c.from,c.toB).split(Kd))})}else i&&(!e.hasFocus&&e.state.facet(gd)||i.main.eq(r))&&(i=null);if(!n&&!i)return!1;if(!n&&t.typeOver&&!r.empty&&i&&i.main.empty?n={from:r.from,to:r.to,insert:e.state.doc.slice(r.from,r.to)}:(au.mac||au.android)&&n&&n.from==n.to&&n.from==r.head-1&&/^\. ?$/.test(n.insert.toString())&&"off"==e.contentDOM.getAttribute("autocorrect")?(i&&2==n.insert.length&&(i=ic.single(i.main.anchor-1,i.main.head-1)),n={from:n.from,to:n.to,insert:ql.of([n.insert.toString().replace("."," ")])}):n&&n.from>=r.from&&n.to<=r.to&&(n.from!=r.from||n.to!=r.to)&&r.to-r.from-(n.to-n.from)<=4?n={from:r.from,to:r.to,insert:e.state.doc.slice(r.from,n.from).append(n.insert).append(e.state.doc.slice(n.to,r.to))}:au.chrome&&n&&n.from==n.to&&n.from==r.head&&"\n "==n.insert.toString()&&e.lineWrapping&&(i&&(i=ic.single(i.main.anchor-1,i.main.head-1)),n={from:r.from,to:r.to,insert:ql.of([" "])}),n)return ep(e,n,i,o);if(i&&!i.main.eq(r)){let t=!1,n="select";return e.inputState.lastSelectionTime>Date.now()-50&&("select"==e.inputState.lastSelectionOrigin&&(t=!0),n=e.inputState.lastSelectionOrigin),e.dispatch({selection:i,scrollIntoView:t,userEvent:n}),!0}return!1}function ep(e,t,n,i=-1){if(au.ios&&e.inputState.flushIOSKey(t))return!0;let r=e.state.selection.main;if(au.android&&(t.to==r.to&&(t.from==r.from||t.from==r.from-1&&" "==e.state.sliceDoc(t.from,r.from))&&1==t.insert.length&&2==t.insert.lines&&Ih(e.contentDOM,"Enter",13)||(t.from==r.from-1&&t.to==r.to&&0==t.insert.length||8==i&&t.insert.length<t.to-t.from&&t.to>r.head)&&Ih(e.contentDOM,"Backspace",8)||t.from==r.from&&t.to==r.to+1&&0==t.insert.length&&Ih(e.contentDOM,"Delete",46)))return!0;let o,s=t.insert.toString();e.inputState.composing>=0&&e.inputState.composing++;let a=()=>o||(o=function(e,t,n){let i,r=e.state,o=r.selection.main;if(t.from>=o.from&&t.to<=o.to&&t.to-t.from>=(o.to-o.from)/3&&(!n||n.main.empty&&n.main.from==t.from+t.insert.length)&&e.inputState.composing<0){let n=o.from<t.from?r.sliceDoc(o.from,t.from):"",s=o.to>t.to?r.sliceDoc(t.to,o.to):"";i=r.replaceSelection(e.state.toText(n+t.insert.sliceString(0,void 0,e.state.lineBreak)+s))}else{let s=r.changes(t),a=n&&n.main.to<=s.newLength?n.main:void 0;if(r.selection.ranges.length>1&&e.inputState.composing>=0&&t.to<=o.to&&t.to>=o.to-10){let l,c=e.state.sliceDoc(t.from,t.to),h=n&&Nd(e,n.main.head);if(h){let e=t.insert.length-(t.to-t.from);l={from:h.from,to:h.to-e}}else l=e.state.doc.lineAt(o.head);let u=o.to-t.to,d=o.to-o.from;i=r.changeByRange((n=>{if(n.from==o.from&&n.to==o.to)return{changes:s,range:a||n.map(s)};let i=n.to-u,h=i-c.length;if(n.to-n.from!=d||e.state.sliceDoc(h,i)!=c||n.to>=l.from&&n.from<=l.to)return{range:n};let p=r.changes({from:h,to:i,insert:t.insert}),f=n.to-o.to;return{changes:p,range:a?ic.range(Math.max(0,a.anchor+f),Math.max(0,a.head+f)):n.map(p)}}))}else i={changes:s,selection:a&&r.selection.replaceRange(a)}}let s="input.type";(e.composing||e.inputState.compositionPendingChange&&e.inputState.compositionEndedAt>Date.now()-50)&&(e.inputState.compositionPendingChange=!1,s+=".compose",e.inputState.compositionFirstChange&&(s+=".start",e.inputState.compositionFirstChange=!1));return r.update(i,{userEvent:s,scrollIntoView:!0})}(e,t,n));return e.state.facet(rd).some((n=>n(e,t.from,t.to,s,a)))||e.dispatch(a()),!0}class tp{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,au.safari&&e.contentDOM.addEventListener("input",(()=>null)),au.gecko&&function(e){Ap.has(e)||(Ap.add(e),e.addEventListener("copy",(()=>{})),e.addEventListener("cut",(()=>{})))}(e.contentDOM.ownerDocument)}handleEvent(e){(function(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n,i=t.target;i!=e.contentDOM;i=i.parentNode)if(!i||11==i.nodeType||(n=Wh.get(i))&&n.ignoreEvent(t))return!1;return!0})(this.view,e)&&!this.ignoreDuringComposition(e)&&("keydown"==e.type&&this.keydown(e)||this.runHandlers(e.type,e))}runHandlers(e,t){let n=this.handlers[e];if(n){for(let e of n.observers)e(this.view,t);for(let e of n.handlers){if(t.defaultPrevented)break;if(e(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=ip(e),n=this.handlers,i=this.view.contentDOM;for(let e in t)if("scroll"!=e){let r=!t[e].handlers.length,o=n[e];o&&r!=!o.handlers.length&&(i.removeEventListener(e,this.handleEvent),o=null),o||i.addEventListener(e,this.handleEvent,{passive:r})}for(let e in n)"scroll"==e||t[e]||i.removeEventListener(e,this.handleEvent);this.handlers=t}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),9==e.keyCode&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&27!=e.keyCode&&sp.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),au.android&&au.chrome&&!e.synthetic&&(13==e.keyCode||8==e.keyCode))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let t;return!au.ios||e.synthetic||e.altKey||e.metaKey||!((t=rp.find((t=>t.keyCode==e.keyCode)))&&!e.ctrlKey||op.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(229!=e.keyCode&&this.view.observer.forceFlush(),!1):(this.pendingIOSKey=t||e,setTimeout((()=>this.flushIOSKey()),250),!0)}flushIOSKey(e){let t=this.pendingIOSKey;return!!t&&(!("Enter"==t.key&&e&&e.from<e.to&&/^\S+$/.test(e.insert.toString()))&&(this.pendingIOSKey=void 0,Ih(this.view.contentDOM,t.key,t.keyCode,t instanceof KeyboardEvent?t:void 0)))}ignoreDuringComposition(e){return!!/^key/.test(e.type)&&(this.composing>0||!!(au.safari&&!au.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100)&&(this.compositionPendingKey=!1,!0))}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function np(e,t){return(n,i)=>{try{return t.call(e,i,n)}catch(e){fd(n.state,e)}}}function ip(e){let t=Object.create(null);function n(e){return t[e]||(t[e]={observers:[],handlers:[]})}for(let t of e){let e=t.spec;if(e&&e.domEventHandlers)for(let i in e.domEventHandlers){let r=e.domEventHandlers[i];r&&n(i).handlers.push(np(t.value,r))}if(e&&e.domEventObservers)for(let i in e.domEventObservers){let r=e.domEventObservers[i];r&&n(i).observers.push(np(t.value,r))}}for(let e in cp)n(e).handlers.push(cp[e]);for(let e in hp)n(e).observers.push(hp[e]);return t}const rp=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],op="dthko",sp=[16,17,18,20,91,92,224,225];function ap(e){return.7*Math.max(0,e)+8}class lp{constructor(e,t,n,i){this.view=e,this.startEvent=t,this.style=n,this.mustSelect=i,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParents=function(e){let t,n,i=e.ownerDocument;for(let r=e.parentNode;r&&!(r==i.body||t&&n);)if(1==r.nodeType)!n&&r.scrollHeight>r.clientHeight&&(n=r),!t&&r.scrollWidth>r.clientWidth&&(t=r),r=r.assignedSlot||r.parentNode;else{if(11!=r.nodeType)break;r=r.host}return{x:t,y:n}}(e.contentDOM),this.atoms=e.state.facet(Sd).map((t=>t(e)));let r=e.contentDOM.ownerDocument;r.addEventListener("mousemove",this.move=this.move.bind(this)),r.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(Kc.allowMultipleSelections)&&function(e,t){let n=e.state.facet(Zu);return n.length?n[0](t):au.mac?t.metaKey:t.ctrlKey}(e,t),this.dragging=!(!function(e,t){let{main:n}=e.state.selection;if(n.empty)return!1;let i=xh(e.root);if(!i||0==i.rangeCount)return!0;let r=i.getRangeAt(0).getClientRects();for(let e=0;e<r.length;e++){let n=r[e];if(n.left<=t.clientX&&n.right>=t.clientX&&n.top<=t.clientY&&n.bottom>=t.clientY)return!0}return!1}(e,t)||1!=kp(t))&&null}start(e){!1===this.dragging&&this.select(e)}move(e){if(0==e.buttons)return this.destroy();if(this.dragging||null==this.dragging&&(t=this.startEvent,n=e,Math.max(Math.abs(t.clientX-n.clientX),Math.abs(t.clientY-n.clientY))<10))return;var t,n;this.select(this.lastEvent=e);let i=0,r=0,o=0,s=0,a=this.view.win.innerWidth,l=this.view.win.innerHeight;this.scrollParents.x&&({left:o,right:a}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:s,bottom:l}=this.scrollParents.y.getBoundingClientRect());let c=Ad(this.view);e.clientX-c.left<=o+6?i=-ap(o-e.clientX):e.clientX+c.right>=a-6&&(i=ap(e.clientX-a)),e.clientY-c.top<=s+6?r=-ap(s-e.clientY):e.clientY+c.bottom>=l-6&&(r=ap(e.clientY-l)),this.setScrollSpeed(i,r)}up(e){null==this.dragging&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval((()=>this.scroll()),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:t}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),t&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=t,t=0),(e||t)&&this.view.win.scrollBy(e,t),!1===this.dragging&&this.select(this.lastEvent)}skipAtoms(e){let t=null;for(let n=0;n<e.ranges.length;n++){let i=e.ranges[n],r=null;if(i.empty){let e=Ud(this.atoms,i.from,0);e!=i.from&&(r=ic.cursor(e,-1))}else{let e=Ud(this.atoms,i.from,-1),t=Ud(this.atoms,i.to,1);e==i.from&&t==i.to||(r=ic.range(i.from==i.anchor?e:t,i.from==i.head?e:t))}r&&(t||(t=e.ranges.slice()),t[n]=r)}return t?ic.create(t,e.mainIndex):e}select(e){let{view:t}=this,n=this.skipAtoms(this.style.get(e,this.extend,this.multiple));!this.mustSelect&&n.eq(t.state.selection,!1===this.dragging)||this.view.dispatch({selection:n,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){e.transactions.some((e=>e.isUserEvent("input.type")))?this.destroy():this.style.update(e)&&setTimeout((()=>this.select(this.lastEvent)),20)}}const cp=Object.create(null),hp=Object.create(null),up=au.ie&&au.ie_version<15||au.ios&&au.webkit_version<604;function dp(e,t,n){for(let i of e.facet(t))n=i(n,e);return n}function pp(e,t){t=dp(e.state,sd,t);let n,{state:i}=e,r=1,o=i.toText(t),s=o.lines==i.selection.ranges.length;if(null!=Sp&&i.selection.ranges.every((e=>e.empty))&&Sp==o.toString()){let e=-1;n=i.changeByRange((n=>{let a=i.doc.lineAt(n.from);if(a.from==e)return{range:n};e=a.from;let l=i.toText((s?o.line(r++).text:t)+i.lineBreak);return{changes:{from:a.from,insert:l},range:ic.cursor(n.from+l.length)}}))}else n=s?i.changeByRange((e=>{let t=o.line(r++);return{changes:{from:e.from,to:e.to,insert:t.text},range:ic.cursor(e.from+t.length)}})):i.replaceSelection(o);e.dispatch(n,{userEvent:"input.paste",scrollIntoView:!0})}function fp(e,t,n,i){if(1==i)return ic.cursor(t,n);if(2==i)return function(e,t,n=1){let i=e.charCategorizer(t),r=e.doc.lineAt(t),o=t-r.from;if(0==r.length)return ic.cursor(t);0==o?n=1:o==r.length&&(n=-1);let s=o,a=o;n<0?s=Wl(r.text,o,!1):a=Wl(r.text,o);let l=i(r.text.slice(s,a));for(;s>0;){let e=Wl(r.text,s,!1);if(i(r.text.slice(e,s))!=l)break;s=e}for(;a<r.length;){let e=Wl(r.text,a);if(i(r.text.slice(a,e))!=l)break;a=e}return ic.range(s+r.from,a+r.from)}(e.state,t,n);{let n=Au.find(e.docView,t),i=e.state.doc.lineAt(n?n.posAtEnd:t),r=n?n.posAtStart:i.from,o=n?n.posAtEnd:i.to;return o<e.state.doc.length&&o==i.to&&o++,ic.range(r,o)}}hp.scroll=e=>{e.inputState.lastScrollTop=e.scrollDOM.scrollTop,e.inputState.lastScrollLeft=e.scrollDOM.scrollLeft},cp.keydown=(e,t)=>(e.inputState.setSelectionOrigin("select"),27==t.keyCode&&0!=e.inputState.tabFocusMode&&(e.inputState.tabFocusMode=Date.now()+2e3),!1),hp.touchstart=(e,t)=>{e.inputState.lastTouchTime=Date.now(),e.inputState.setSelectionOrigin("select.pointer")},hp.touchmove=e=>{e.inputState.setSelectionOrigin("select.pointer")},cp.mousedown=(e,t)=>{if(e.observer.flush(),e.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let i of e.state.facet(td))if(n=i(e,t),n)break;if(n||0!=t.button||(n=function(e,t){let n=yp(e,t),i=kp(t),r=e.state.selection;return{update(e){e.docChanged&&(n.pos=e.changes.mapPos(n.pos),r=r.map(e.changes))},get(t,o,s){let a,l=yp(e,t),c=fp(e,l.pos,l.bias,i);if(n.pos!=l.pos&&!o){let t=fp(e,n.pos,n.bias,i),r=Math.min(t.from,c.from),o=Math.max(t.to,c.to);c=r<c.from?ic.range(r,o):ic.range(o,r)}return o?r.replaceRange(r.main.extend(c.from,c.to)):s&&1==i&&r.ranges.length>1&&(a=function(e,t){for(let n=0;n<e.ranges.length;n++){let{from:i,to:r}=e.ranges[n];if(i<=t&&r>=t)return ic.create(e.ranges.slice(0,n).concat(e.ranges.slice(n+1)),e.mainIndex==n?0:e.mainIndex-(e.mainIndex>n?1:0))}return null}(r,l.pos))?a:s?r.addRange(c):ic.create([c])}}}(e,t)),n){let i=!e.hasFocus;e.inputState.startMouseSelection(new lp(e,t,n,i)),i&&e.observer.ignore((()=>{Bh(e.contentDOM);let t=e.root.activeElement;t&&!t.contains(e.contentDOM)&&t.blur()}));let r=e.inputState.mouseSelection;if(r)return r.start(t),!1===r.dragging}return!1};let gp=(e,t,n)=>t>=n.top&&t<=n.bottom&&e>=n.left&&e<=n.right;function mp(e,t,n,i){let r=Au.find(e.docView,t);if(!r)return 1;let o=t-r.posAtStart;if(0==o)return 1;if(o==r.length)return-1;let s=r.coordsAt(o,-1);if(s&&gp(n,i,s))return-1;let a=r.coordsAt(o,1);return a&&gp(n,i,a)?1:s&&s.bottom>=i?-1:1}function yp(e,t){let n=e.posAtCoords({x:t.clientX,y:t.clientY},!1);return{pos:n,bias:mp(e,n,t.clientX,t.clientY)}}const vp=au.ie&&au.ie_version<=11;let wp=null,bp=0,xp=0;function kp(e){if(!vp)return e.detail;let t=wp,n=xp;return wp=e,xp=Date.now(),bp=!t||n>Date.now()-400&&Math.abs(t.clientX-e.clientX)<2&&Math.abs(t.clientY-e.clientY)<2?(bp+1)%3:1}function _p(e,t,n,i){if(!(n=dp(e.state,sd,n)))return;let r=e.posAtCoords({x:t.clientX,y:t.clientY},!1),{draggedContent:o}=e.inputState,s=i&&o&&function(e,t){let n=e.state.facet(ed);return n.length?n[0](t):au.mac?!t.altKey:!t.ctrlKey}(e,t)?{from:o.from,to:o.to}:null,a={from:r,insert:n},l=e.state.changes(s?[s,a]:a);e.focus(),e.dispatch({changes:l,selection:{anchor:l.mapPos(r,-1),head:l.mapPos(r,1)},userEvent:s?"move.drop":"input.drop"}),e.inputState.draggedContent=null}cp.dragstart=(e,t)=>{let{selection:{main:n}}=e.state;if(t.target.draggable){let i=e.docView.nearest(t.target);if(i&&i.isWidget){let e=i.posAtStart,t=e+i.length;(e>=n.to||t<=n.from)&&(n=ic.range(e,t))}}let{inputState:i}=e;return i.mouseSelection&&(i.mouseSelection.dragging=!0),i.draggedContent=n,t.dataTransfer&&(t.dataTransfer.setData("Text",dp(e.state,ad,e.state.sliceDoc(n.from,n.to))),t.dataTransfer.effectAllowed="copyMove"),!1},cp.dragend=e=>(e.inputState.draggedContent=null,!1),cp.drop=(e,t)=>{if(!t.dataTransfer)return!1;if(e.state.readOnly)return!0;let n=t.dataTransfer.files;if(n&&n.length){let i=Array(n.length),r=0,o=()=>{++r==n.length&&_p(e,t,i.filter((e=>null!=e)).join(e.state.lineBreak),!1)};for(let e=0;e<n.length;e++){let t=new FileReader;t.onerror=o,t.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(t.result)||(i[e]=t.result),o()},t.readAsText(n[e])}return!0}{let n=t.dataTransfer.getData("Text");if(n)return _p(e,t,n,!0),!0}return!1},cp.paste=(e,t)=>{if(e.state.readOnly)return!0;e.observer.flush();let n=up?null:t.clipboardData;return n?(pp(e,n.getData("text/plain")||n.getData("text/uri-list")),!0):(function(e){let t=e.dom.parentNode;if(!t)return;let n=t.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus(),setTimeout((()=>{e.focus(),n.remove(),pp(e,n.value)}),50)}(e),!1)};let Sp=null;cp.copy=cp.cut=(e,t)=>{let{text:n,ranges:i,linewise:r}=function(e){let t=[],n=[],i=!1;for(let i of e.selection.ranges)i.empty||(t.push(e.sliceDoc(i.from,i.to)),n.push(i));if(!t.length){let r=-1;for(let{from:i}of e.selection.ranges){let o=e.doc.lineAt(i);o.number>r&&(t.push(o.text),n.push({from:o.from,to:Math.min(e.doc.length,o.to+1)})),r=o.number}i=!0}return{text:dp(e,ad,t.join(e.lineBreak)),ranges:n,linewise:i}}(e.state);if(!n&&!r)return!1;Sp=r?n:null,"cut"!=t.type||e.state.readOnly||e.dispatch({changes:i,scrollIntoView:!0,userEvent:"delete.cut"});let o=up?null:t.clipboardData;return o?(o.clearData(),o.setData("text/plain",n),!0):(function(e,t){let n=e.dom.parentNode;if(!n)return;let i=n.appendChild(document.createElement("textarea"));i.style.cssText="position: fixed; left: -10000px; top: 10px",i.value=t,i.focus(),i.selectionEnd=t.length,i.selectionStart=0,setTimeout((()=>{i.remove(),e.focus()}),50)}(e,n),!1)};const Cp=Nc.define();function Ep(e,t){let n=[];for(let i of e.facet(od)){let r=i(e,t);r&&n.push(r)}return n?e.update({effects:n,annotations:Cp.of(!0)}):null}function Mp(e){setTimeout((()=>{let t=e.hasFocus;if(t!=e.inputState.notifiedFocused){let n=Ep(e.state,t);n?e.dispatch(n):e.update([])}}),10)}hp.focus=e=>{e.inputState.lastFocusTime=Date.now(),e.scrollDOM.scrollTop||!e.inputState.lastScrollTop&&!e.inputState.lastScrollLeft||(e.scrollDOM.scrollTop=e.inputState.lastScrollTop,e.scrollDOM.scrollLeft=e.inputState.lastScrollLeft),Mp(e)},hp.blur=e=>{e.observer.clearSelectionRange(),Mp(e)},hp.compositionstart=hp.compositionupdate=e=>{e.observer.editContext||(null==e.inputState.compositionFirstChange&&(e.inputState.compositionFirstChange=!0),e.inputState.composing<0&&(e.inputState.composing=0))},hp.compositionend=e=>{e.observer.editContext||(e.inputState.composing=-1,e.inputState.compositionEndedAt=Date.now(),e.inputState.compositionPendingKey=!0,e.inputState.compositionPendingChange=e.observer.pendingRecords().length>0,e.inputState.compositionFirstChange=null,au.chrome&&au.android?e.observer.flushSoon():e.inputState.compositionPendingChange?Promise.resolve().then((()=>e.observer.flush())):setTimeout((()=>{e.inputState.composing<0&&e.docView.hasComposition&&e.update([])}),50))},hp.contextmenu=e=>{e.inputState.lastContextMenu=Date.now()},cp.beforeinput=(e,t)=>{var n,i;if("insertReplacementText"==t.inputType&&e.observer.editContext){let i=null===(n=t.dataTransfer)||void 0===n?void 0:n.getData("text/plain"),r=t.getTargetRanges();if(i&&r.length){let t=r[0],n=e.posAtDOM(t.startContainer,t.startOffset),o=e.posAtDOM(t.endContainer,t.endOffset);return ep(e,{from:n,to:o,insert:e.state.toText(i)},null),!0}}let r;if(au.chrome&&au.android&&(r=rp.find((e=>e.inputType==t.inputType)))&&(e.observer.delayAndroidKey(r.key,r.keyCode),"Backspace"==r.key||"Delete"==r.key)){let t=(null===(i=window.visualViewport)||void 0===i?void 0:i.height)||0;setTimeout((()=>{var n;((null===(n=window.visualViewport)||void 0===n?void 0:n.height)||0)>t+10&&e.hasFocus&&(e.contentDOM.blur(),e.focus())}),100)}return au.ios&&"deleteContentForward"==t.inputType&&e.observer.flushSoon(),au.safari&&"insertText"==t.inputType&&e.inputState.composing>=0&&setTimeout((()=>hp.compositionend(e,t)),20),!1};const Ap=new Set;const Dp=["pre-wrap","normal","pre-line","break-spaces"];let Rp=!1;function Op(){Rp=!1}class Tp{constructor(e){this.lineWrapping=e,this.doc=ql.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,t){let n=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(n+=Math.max(0,Math.ceil((t-e-n*this.lineLength*.5)/this.lineLength))),this.lineHeight*n}heightForLine(e){if(!this.lineWrapping)return this.lineHeight;return(1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5))))*this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return Dp.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let n=0;n<e.length;n++){let i=e[n];i<0?n++:this.heightSamples[Math.floor(10*i)]||(t=!0,this.heightSamples[Math.floor(10*i)]=!0)}return t}refresh(e,t,n,i,r,o){let s=Dp.indexOf(e)>-1,a=Math.round(t)!=Math.round(this.lineHeight)||this.lineWrapping!=s;if(this.lineWrapping=s,this.lineHeight=t,this.charWidth=n,this.textHeight=i,this.lineLength=r,a){this.heightSamples={};for(let e=0;e<o.length;e++){let t=o[e];t<0?e++:this.heightSamples[Math.floor(10*t)]=!0}}return a}}class Np{constructor(e,t){this.from=e,this.heights=t,this.index=0}get more(){return this.index<this.heights.length}}class Pp{constructor(e,t,n,i,r){this.from=e,this.length=t,this.top=n,this.height=i,this._content=r}get type(){return"number"==typeof this._content?xu.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof Cu?this._content.widget:null}get widgetLineBreaks(){return"number"==typeof this._content?this._content:0}join(e){let t=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(e._content)?e._content:[e]);return new Pp(this.from,this.length+e.length,this.top,this.height+e.height,t)}}var qp=function(e){return e[e.ByPos=0]="ByPos",e[e.ByHeight=1]="ByHeight",e[e.ByPosNoHeight=2]="ByPosNoHeight",e}(qp||(qp={}));const Bp=.001;class Lp{constructor(e,t,n=2){this.length=e,this.height=t,this.flags=n}get outdated(){return(2&this.flags)>0}set outdated(e){this.flags=(e?2:0)|-3&this.flags}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>Bp&&(Rp=!0),this.height=e)}replace(e,t,n){return Lp.of(n)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,n,i){let r=this,o=n.doc;for(let s=i.length-1;s>=0;s--){let{fromA:a,toA:l,fromB:c,toB:h}=i[s],u=r.lineAt(a,qp.ByPosNoHeight,n.setDoc(t),0,0),d=u.to>=l?u:r.lineAt(l,qp.ByPosNoHeight,n,0,0);for(h+=d.to-l,l=d.to;s>0&&u.from<=i[s-1].toA;)a=i[s-1].fromA,c=i[s-1].fromB,s--,a<u.from&&(u=r.lineAt(a,qp.ByPosNoHeight,n,0,0));c+=u.from-a,a=u.from;let p=Hp.build(n.setDoc(o),e,c,h);r=Ip(r,r.replace(a,l,p))}return r.updateHeight(n,0)}static empty(){return new jp(0,0)}static of(e){if(1==e.length)return e[0];let t=0,n=e.length,i=0,r=0;for(;;)if(t==n)if(i>2*r){let r=e[t-1];r.break?e.splice(--t,1,r.left,null,r.right):e.splice(--t,1,r.left,r.right),n+=1+r.break,i-=r.size}else{if(!(r>2*i))break;{let t=e[n];t.break?e.splice(n,1,t.left,null,t.right):e.splice(n,1,t.left,t.right),n+=2+t.break,r-=t.size}}else if(i<r){let n=e[t++];n&&(i+=n.size)}else{let t=e[--n];t&&(r+=t.size)}let o=0;return null==e[t-1]?(o=1,t--):null==e[t]&&(o=1,n++),new $p(Lp.of(e.slice(0,t)),o,Lp.of(e.slice(n)))}}function Ip(e,t){return e==t?e:(e.constructor!=t.constructor&&(Rp=!0),t)}Lp.prototype.size=1;class Fp extends Lp{constructor(e,t,n){super(e,t),this.deco=n}blockAt(e,t,n,i){return new Pp(i,this.length,n,this.height,this.deco||0)}lineAt(e,t,n,i,r){return this.blockAt(0,n,i,r)}forEachLine(e,t,n,i,r,o){e<=r+this.length&&t>=r&&o(this.blockAt(0,n,i,r))}updateHeight(e,t=0,n=!1,i){return i&&i.from<=t&&i.more&&this.setHeight(i.heights[i.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class jp extends Fp{constructor(e,t){super(e,t,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,t,n,i){return new Pp(i,this.length,n,this.height,this.breaks)}replace(e,t,n){let i=n[0];return 1==n.length&&(i instanceof jp||i instanceof Vp&&4&i.flags)&&Math.abs(this.length-i.length)<10?(i instanceof Vp?i=new jp(i.length,this.height):i.height=this.height,this.outdated||(i.outdated=!1),i):Lp.of(n)}updateHeight(e,t=0,n=!1,i){return i&&i.from<=t&&i.more?this.setHeight(i.heights[i.index++]):(n||this.outdated)&&this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class Vp extends Lp{constructor(e){super(e,0)}heightMetrics(e,t){let n,i=e.doc.lineAt(t).number,r=e.doc.lineAt(t+this.length).number,o=r-i+1,s=0;if(e.lineWrapping){let t=Math.min(this.height,e.lineHeight*o);n=t/o,this.length>o+1&&(s=(this.height-t)/(this.length-o-1))}else n=this.height/o;return{firstLine:i,lastLine:r,perLine:n,perChar:s}}blockAt(e,t,n,i){let{firstLine:r,lastLine:o,perLine:s,perChar:a}=this.heightMetrics(t,i);if(t.lineWrapping){let r=i+(e<t.lineHeight?0:Math.round(Math.max(0,Math.min(1,(e-n)/this.height))*this.length)),o=t.doc.lineAt(r),l=s+o.length*a,c=Math.max(n,e-l/2);return new Pp(o.from,o.length,c,l,0)}{let i=Math.max(0,Math.min(o-r,Math.floor((e-n)/s))),{from:a,length:l}=t.doc.line(r+i);return new Pp(a,l,n+s*i,s,0)}}lineAt(e,t,n,i,r){if(t==qp.ByHeight)return this.blockAt(e,n,i,r);if(t==qp.ByPosNoHeight){let{from:t,to:i}=n.doc.lineAt(e);return new Pp(t,i-t,0,0,0)}let{firstLine:o,perLine:s,perChar:a}=this.heightMetrics(n,r),l=n.doc.lineAt(e),c=s+l.length*a,h=l.number-o,u=i+s*h+a*(l.from-r-h);return new Pp(l.from,l.length,Math.max(i,Math.min(u,i+this.height-c)),c,0)}forEachLine(e,t,n,i,r,o){e=Math.max(e,r),t=Math.min(t,r+this.length);let{firstLine:s,perLine:a,perChar:l}=this.heightMetrics(n,r);for(let c=e,h=i;c<=t;){let t=n.doc.lineAt(c);if(c==e){let n=t.number-s;h+=a*n+l*(e-r-n)}let i=a+l*t.length;o(new Pp(t.from,t.length,h,i,0)),h+=i,c=t.to+1}}replace(e,t,n){let i=this.length-t;if(i>0){let e=n[n.length-1];e instanceof Vp?n[n.length-1]=new Vp(e.length+i):n.push(null,new Vp(i-1))}if(e>0){let t=n[0];t instanceof Vp?n[0]=new Vp(e+t.length):n.unshift(new Vp(e-1),null)}return Lp.of(n)}decomposeLeft(e,t){t.push(new Vp(e-1),null)}decomposeRight(e,t){t.push(null,new Vp(this.length-e-1))}updateHeight(e,t=0,n=!1,i){let r=t+this.length;if(i&&i.from<=t+this.length&&i.more){let n=[],o=Math.max(t,i.from),s=-1;for(i.from>t&&n.push(new Vp(i.from-t-1).updateHeight(e,t));o<=r&&i.more;){let t=e.doc.lineAt(o).length;n.length&&n.push(null);let r=i.heights[i.index++];-1==s?s=r:Math.abs(r-s)>=Bp&&(s=-2);let a=new jp(t,r);a.outdated=!1,n.push(a),o+=t+1}o<=r&&n.push(null,new Vp(r-o).updateHeight(e,o));let a=Lp.of(n);return(s<0||Math.abs(a.height-this.height)>=Bp||Math.abs(s-this.heightMetrics(e,t).perLine)>=Bp)&&(Rp=!0),Ip(this,a)}return(n||this.outdated)&&(this.setHeight(e.heightForGap(t,t+this.length)),this.outdated=!1),this}toString(){return`gap(${this.length})`}}class $p extends Lp{constructor(e,t,n){super(e.length+t+n.length,e.height+n.height,t|(e.outdated||n.outdated?2:0)),this.left=e,this.right=n,this.size=e.size+n.size}get break(){return 1&this.flags}blockAt(e,t,n,i){let r=n+this.left.height;return e<r?this.left.blockAt(e,t,n,i):this.right.blockAt(e,t,r,i+this.left.length+this.break)}lineAt(e,t,n,i,r){let o=i+this.left.height,s=r+this.left.length+this.break,a=t==qp.ByHeight?e<o:e<s,l=a?this.left.lineAt(e,t,n,i,r):this.right.lineAt(e,t,n,o,s);if(this.break||(a?l.to<s:l.from>s))return l;let c=t==qp.ByPosNoHeight?qp.ByPosNoHeight:qp.ByPos;return a?l.join(this.right.lineAt(s,c,n,o,s)):this.left.lineAt(s,c,n,i,r).join(l)}forEachLine(e,t,n,i,r,o){let s=i+this.left.height,a=r+this.left.length+this.break;if(this.break)e<a&&this.left.forEachLine(e,t,n,i,r,o),t>=a&&this.right.forEachLine(e,t,n,s,a,o);else{let l=this.lineAt(a,qp.ByPos,n,i,r);e<l.from&&this.left.forEachLine(e,l.from-1,n,i,r,o),l.to>=e&&l.from<=t&&o(l),t>l.to&&this.right.forEachLine(l.to+1,t,n,s,a,o)}}replace(e,t,n){let i=this.left.length+this.break;if(t<i)return this.balanced(this.left.replace(e,t,n),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-i,t-i,n));let r=[];e>0&&this.decomposeLeft(e,r);let o=r.length;for(let e of n)r.push(e);if(e>0&&zp(r,o-1),t<this.length){let e=r.length;this.decomposeRight(t,r),zp(r,e)}return Lp.of(r)}decomposeLeft(e,t){let n=this.left.length;if(e<=n)return this.left.decomposeLeft(e,t);t.push(this.left),this.break&&(n++,e>=n&&t.push(null)),e>n&&this.right.decomposeLeft(e-n,t)}decomposeRight(e,t){let n=this.left.length,i=n+this.break;if(e>=i)return this.right.decomposeRight(e-i,t);e<n&&this.left.decomposeRight(e,t),this.break&&e<i&&t.push(null),t.push(this.right)}balanced(e,t){return e.size>2*t.size||t.size>2*e.size?Lp.of(this.break?[e,null,t]:[e,t]):(this.left=Ip(this.left,e),this.right=Ip(this.right,t),this.setHeight(e.height+t.height),this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,n=!1,i){let{left:r,right:o}=this,s=t+r.length+this.break,a=null;return i&&i.from<=t+r.length&&i.more?a=r=r.updateHeight(e,t,n,i):r.updateHeight(e,t,n),i&&i.from<=s+o.length&&i.more?a=o=o.updateHeight(e,s,n,i):o.updateHeight(e,s,n),a?this.balanced(r,o):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function zp(e,t){let n,i;null==e[t]&&(n=e[t-1])instanceof Vp&&(i=e[t+1])instanceof Vp&&e.splice(t-1,3,new Vp(n.length+1+i.length))}class Hp{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let e=Math.min(t,this.lineEnd),n=this.nodes[this.nodes.length-1];n instanceof jp?n.length+=e-this.pos:(e>this.pos||!this.isCovered)&&this.nodes.push(new jp(e-this.pos,-1)),this.writtenTo=e,t>e&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,n){if(e<t||n.heightRelevant){let i=n.widget?n.widget.estimatedHeight:0,r=n.widget?n.widget.lineBreaks:0;i<0&&(i=this.oracle.lineHeight);let o=t-e;n.block?this.addBlock(new Fp(o,i,n)):(o||r||i>=5)&&this.addLineDeco(i,r,o)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenTo<e&&((this.writtenTo<e-1||null==this.nodes[this.nodes.length-1])&&this.nodes.push(this.blankContent(this.writtenTo,e-1)),this.nodes.push(null)),this.pos>e&&this.nodes.push(new jp(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,t){let n=new Vp(t-e);return this.oracle.doc.lineAt(e).to==t&&(n.flags|=4),n}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof jp)return e;let t=new jp(0,-1);return this.nodes.push(t),t}addBlock(e){this.enterLine();let t=e.deco;t&&t.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,t&&t.endSide>0&&(this.covering=e)}addLineDeco(e,t,n){let i=this.ensureLine();i.length+=n,i.collapsed+=n,i.widgetHeight=Math.max(i.widgetHeight,e),i.breaks+=t,this.writtenTo=this.pos=this.pos+n}finish(e){let t=0==this.nodes.length?null:this.nodes[this.nodes.length-1];!(this.lineStart>-1)||t instanceof jp||this.isCovered?(this.writtenTo<this.pos||null==t)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos)):this.nodes.push(new jp(0,-1));let n=e;for(let e of this.nodes)e instanceof jp&&e.updateHeight(this.oracle,n),n+=e?e.length:1;return this.nodes}static build(e,t,n,i){let r=new Hp(n,e);return Zc.spans(t,n,i,r,0),r.finish(n)}}class Wp{constructor(){this.changes=[]}compareRange(){}comparePoint(e,t,n,i){(e<t||n&&n.heightRelevant||i&&i.heightRelevant)&&Mu(e,t,this.changes,5)}}function Up(e,t){let n=e.getBoundingClientRect(),i=e.ownerDocument,r=i.defaultView||window,o=Math.max(0,n.left),s=Math.min(r.innerWidth,n.right),a=Math.max(0,n.top),l=Math.min(r.innerHeight,n.bottom);for(let t=e.parentNode;t&&t!=i.body;)if(1==t.nodeType){let n=t,i=window.getComputedStyle(n);if((n.scrollHeight>n.clientHeight||n.scrollWidth>n.clientWidth)&&"visible"!=i.overflow){let i=n.getBoundingClientRect();o=Math.max(o,i.left),s=Math.min(s,i.right),a=Math.max(a,i.top),l=Math.min(t==e.parentNode?r.innerHeight:l,i.bottom)}t="absolute"==i.position||"fixed"==i.position?n.offsetParent:n.parentNode}else{if(11!=t.nodeType)break;t=t.host}return{left:o-n.left,right:Math.max(o,s)-n.left,top:a-(n.top+t),bottom:Math.max(a,l)-(n.top+t)}}function Gp(e,t){let n=e.getBoundingClientRect();return{left:0,right:n.right-n.left,top:t,bottom:n.bottom-(n.top+t)}}class Kp{constructor(e,t,n,i){this.from=e,this.to=t,this.size=n,this.displaySize=i}static same(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++){let i=e[n],r=t[n];if(i.from!=r.from||i.to!=r.to||i.size!=r.size)return!1}return!0}draw(e,t){return ku.replace({widget:new Xp(this.displaySize*(t?e.scaleY:e.scaleX),t)}).range(this.from,this.to)}}class Xp extends bu{constructor(e,t){super(),this.size=e,this.vertical=t}eq(e){return e.size==this.size&&e.vertical==this.vertical}toDOM(){let e=document.createElement("div");return this.vertical?e.style.height=this.size+"px":(e.style.width=this.size+"px",e.style.height="2px",e.style.display="inline-block"),e}get estimatedHeight(){return this.vertical?this.size:-1}}class Yp{constructor(e){this.state=e,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scrollTop=0,this.scrolledToBottom=!1,this.scaleX=1,this.scaleY=1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=ef,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=Pu.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let t=e.facet(xd).some((e=>"function"!=typeof e&&"cm-lineWrapping"==e.class));this.heightOracle=new Tp(t),this.stateDeco=e.facet(kd).filter((e=>"function"!=typeof e)),this.heightMap=Lp.empty().applyChanges(this.stateDeco,ql.empty,this.heightOracle.setDoc(e.doc),[new Rd(0,0,0,e.doc.length)]);for(let e=0;e<2&&(this.viewport=this.getViewport(0,null),this.updateForViewport());e++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=ku.set(this.lineGaps.map((e=>e.draw(this,!1)))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let n=0;n<=1;n++){let i=n?t.head:t.anchor;if(!e.some((({from:e,to:t})=>i>=e&&i<=t))){let{from:t,to:n}=this.lineBlockAt(i);e.push(new Jp(t,n))}}return this.viewports=e.sort(((e,t)=>e.from-t.from)),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?ef:new tf(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,(e=>{this.viewportLines.push(nf(e,this.scaler))}))}update(e,t=null){this.state=e.state;let n=this.stateDeco;this.stateDeco=this.state.facet(kd).filter((e=>"function"!=typeof e));let i=e.changedRanges,r=Rd.extendWithRanges(i,function(e,t,n){let i=new Wp;return Zc.compare(e,t,n,i,0),i.changes}(n,this.stateDeco,e?e.changes:Xl.empty(this.state.doc.length))),o=this.heightMap.height,s=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);Op(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),r),(this.heightMap.height!=o||Rp)&&(e.flags|=2),s?(this.scrollAnchorPos=e.changes.mapPos(s.from,-1),this.scrollAnchorHeight=s.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);let a=r.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.head<a.from||t.range.head>a.to)||!this.viewportIsAppropriate(a))&&(a=this.getViewport(0,t));let l=a.from!=this.viewport.from||a.to!=this.viewport.to;this.viewport=a,e.flags|=this.updateForViewport(),(l||!e.changes.empty||2&e.flags)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(e.changes),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(cd)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let t=e.contentDOM,n=window.getComputedStyle(t),i=this.heightOracle,r=n.whiteSpace;this.defaultTextDirection="rtl"==n.direction?Pu.RTL:Pu.LTR;let o=this.heightOracle.mustRefreshForWrapping(r),s=t.getBoundingClientRect(),a=o||this.mustMeasureContent||this.contentDOMHeight!=s.height;this.contentDOMHeight=s.height,this.mustMeasureContent=!1;let l=0,c=0;if(s.width&&s.height){let{scaleX:e,scaleY:n}=Th(t,s);(e>.005&&Math.abs(this.scaleX-e)>.005||n>.005&&Math.abs(this.scaleY-n)>.005)&&(this.scaleX=e,this.scaleY=n,l|=16,o=a=!0)}let h=(parseInt(n.paddingTop)||0)*this.scaleY,u=(parseInt(n.paddingBottom)||0)*this.scaleY;this.paddingTop==h&&this.paddingBottom==u||(this.paddingTop=h,this.paddingBottom=u,l|=18),this.editorWidth!=e.scrollDOM.clientWidth&&(i.lineWrapping&&(a=!0),this.editorWidth=e.scrollDOM.clientWidth,l|=16);let d=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=d&&(this.scrollAnchorHeight=-1,this.scrollTop=d),this.scrolledToBottom=jh(e.scrollDOM);let p=(this.printing?Gp:Up)(t,this.paddingTop),f=p.top-this.pixelViewport.top,g=p.bottom-this.pixelViewport.bottom;this.pixelViewport=p;let m=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(m!=this.inView&&(this.inView=m,m&&(a=!0)),!this.inView&&!this.scrollTarget&&!function(e){let t=e.getBoundingClientRect(),n=e.ownerDocument.defaultView||window;return t.left<n.innerWidth&&t.right>0&&t.top<n.innerHeight&&t.bottom>0}(e.dom))return 0;let y=s.width;if(this.contentDOMWidth==y&&this.editorHeight==e.scrollDOM.clientHeight||(this.contentDOMWidth=s.width,this.editorHeight=e.scrollDOM.clientHeight,l|=16),a){let t=e.docView.measureVisibleLineHeights(this.viewport);if(i.mustRefreshForHeights(t)&&(o=!0),o||i.lineWrapping&&Math.abs(y-this.contentDOMWidth)>i.charWidth){let{lineHeight:n,charWidth:s,textHeight:a}=e.docView.measureTextSize();o=n>0&&i.refresh(r,n,s,a,y/s,t),o&&(e.docView.minWidth=0,l|=16)}f>0&&g>0?c=Math.max(f,g):f<0&&g<0&&(c=Math.min(f,g)),Op();for(let n of this.viewports){let r=n.from==this.viewport.from?t:e.docView.measureVisibleLineHeights(n);this.heightMap=(o?Lp.empty().applyChanges(this.stateDeco,ql.empty,this.heightOracle,[new Rd(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(i,0,o,new Np(n.from,r))}Rp&&(l|=2)}let v=!this.viewportIsAppropriate(this.viewport,c)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return v&&(2&l&&(l|=this.updateScaler()),this.viewport=this.getViewport(c,this.scrollTarget),l|=this.updateForViewport()),(2&l||v)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(o?[]:this.lineGaps,e)),l|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),l}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let n=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),i=this.heightMap,r=this.heightOracle,{visibleTop:o,visibleBottom:s}=this,a=new Jp(i.lineAt(o-1e3*n,qp.ByHeight,r,0,0).from,i.lineAt(s+1e3*(1-n),qp.ByHeight,r,0,0).to);if(t){let{head:e}=t.range;if(e<a.from||e>a.to){let n,o=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),s=i.lineAt(e,qp.ByPos,r,0,0);n="center"==t.y?(s.top+s.bottom)/2-o/2:"start"==t.y||"nearest"==t.y&&e<a.from?s.top:s.bottom-o,a=new Jp(i.lineAt(n-500,qp.ByHeight,r,0,0).from,i.lineAt(n+o+500,qp.ByHeight,r,0,0).to)}}return a}mapViewport(e,t){let n=t.mapPos(e.from,-1),i=t.mapPos(e.to,1);return new Jp(this.heightMap.lineAt(n,qp.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(i,qp.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:t},n=0){if(!this.inView)return!0;let{top:i}=this.heightMap.lineAt(e,qp.ByPos,this.heightOracle,0,0),{bottom:r}=this.heightMap.lineAt(t,qp.ByPos,this.heightOracle,0,0),{visibleTop:o,visibleBottom:s}=this;return(0==e||i<=o-Math.max(10,Math.min(-n,250)))&&(t==this.state.doc.length||r>=s+Math.max(10,Math.min(n,250)))&&i>o-2e3&&r<s+2e3}mapLineGaps(e,t){if(!e.length||t.empty)return e;let n=[];for(let i of e)t.touchesRange(i.from,i.to)||n.push(new Kp(t.mapPos(i.from),t.mapPos(i.to),i.size,i.displaySize));return n}ensureLineGaps(e,t){let n=this.heightOracle.lineWrapping,i=n?1e4:2e3,r=i>>1,o=i<<1;if(this.defaultTextDirection!=Pu.LTR&&!n)return[];let s=[],a=(i,o,l,c)=>{if(o-i<r)return;let h=this.state.selection.main,u=[h.from];h.empty||u.push(h.to);for(let e of u)if(e>i&&e<o)return a(i,e-10,l,c),void a(e+10,o,l,c);let d=function(e,t){for(let n of e)if(t(n))return n;return}(e,(e=>e.from>=l.from&&e.to<=l.to&&Math.abs(e.from-i)<r&&Math.abs(e.to-o)<r&&!u.some((t=>e.from<t&&e.to>t))));if(!d){if(o<l.to&&t&&n&&t.visibleRanges.some((e=>e.from<=o&&e.to>=o))){let e=t.moveToLineBoundary(ic.cursor(o),!1,!0).head;e>i&&(o=e)}let e=this.gapSize(l,i,o,c);d=new Kp(i,o,e,n||e<2e6?e:2e6)}s.push(d)},l=t=>{if(t.length<o||t.type!=xu.Text)return;let r=function(e,t,n){let i=[],r=e,o=0;Zc.spans(n,e,t,{span(){},point(e,t){e>r&&(i.push({from:r,to:e}),o+=e-r),r=t}},20),r<t&&(i.push({from:r,to:t}),o+=t-r);return{total:o,ranges:i}}(t.from,t.to,this.stateDeco);if(r.total<o)return;let s,l,c=this.scrollTarget?this.scrollTarget.range.head:null;if(n){let e,n,o=i/this.heightOracle.lineLength*this.heightOracle.lineHeight;if(null!=c){let i=Zp(r,c),s=((this.visibleBottom-this.visibleTop)/2+o)/t.height;e=i-s,n=i+s}else e=(this.visibleTop-t.top-o)/t.height,n=(this.visibleBottom-t.top+o)/t.height;s=Qp(r,e),l=Qp(r,n)}else{let n=r.total*this.heightOracle.charWidth,o=i*this.heightOracle.charWidth,a=0;if(n>2e6)for(let n of e)n.from>=t.from&&n.from<t.to&&n.size!=n.displaySize&&n.from*this.heightOracle.charWidth+a<this.pixelViewport.left&&(a=n.size-n.displaySize);let h,u,d=this.pixelViewport.left+a,p=this.pixelViewport.right+a;if(null!=c){let e=Zp(r,c),t=((p-d)/2+o)/n;h=e-t,u=e+t}else h=(d-o)/n,u=(p+o)/n;s=Qp(r,h),l=Qp(r,u)}s>t.from&&a(t.from,s,t,r),l<t.to&&a(l,t.to,t,r)};for(let e of this.viewportLines)Array.isArray(e.type)?e.type.forEach(l):l(e);return s}gapSize(e,t,n,i){let r=Zp(i,n)-Zp(i,t);return this.heightOracle.lineWrapping?e.height*r:i.total*this.heightOracle.charWidth*r}updateLineGaps(e){Kp.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=ku.set(e.map((e=>e.draw(this,this.heightOracle.lineWrapping)))))}computeVisibleRanges(e){let t=this.stateDeco;this.lineGaps.length&&(t=t.concat(this.lineGapDeco));let n=[];Zc.spans(t,this.viewport.from,this.viewport.to,{span(e,t){n.push({from:e,to:t})},point(){}},20);let i=0;if(n.length!=this.visibleRanges.length)i=12;else for(let t=0;t<n.length&&!(8&i);t++){let r=this.visibleRanges[t],o=n[t];r.from==o.from&&r.to==o.to||(i|=4,e&&e.mapPos(r.from,-1)==o.from&&e.mapPos(r.to,1)==o.to||(i|=8))}return this.visibleRanges=n,i}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find((t=>t.from<=e&&t.to>=e))||nf(this.heightMap.lineAt(e,qp.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find((t=>t.top<=e&&t.bottom>=e))||nf(this.heightMap.lineAt(this.scaler.fromDOM(e),qp.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let t=this.lineBlockAtHeight(e+8);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}elementAtHeight(e){return nf(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class Jp{constructor(e,t){this.from=e,this.to=t}}function Qp({total:e,ranges:t},n){if(n<=0)return t[0].from;if(n>=1)return t[t.length-1].to;let i=Math.floor(e*n);for(let e=0;;e++){let{from:n,to:r}=t[e],o=r-n;if(i<=o)return n+i;i-=o}}function Zp(e,t){let n=0;for(let{from:i,to:r}of e.ranges){if(t<=r){n+=t-i;break}n+=r-i}return n/e.total}const ef={toDOM:e=>e,fromDOM:e=>e,scale:1,eq(e){return e==this}};class tf{constructor(e,t,n){let i=0,r=0,o=0;this.viewports=n.map((({from:n,to:r})=>{let o=t.lineAt(n,qp.ByPos,e,0,0).top,s=t.lineAt(r,qp.ByPos,e,0,0).bottom;return i+=s-o,{from:n,to:r,top:o,bottom:s,domTop:0,domBottom:0}})),this.scale=(7e6-i)/(t.height-i);for(let e of this.viewports)e.domTop=o+(e.top-r)*this.scale,o=e.domBottom=e.domTop+(e.bottom-e.top),r=e.bottom}toDOM(e){for(let t=0,n=0,i=0;;t++){let r=t<this.viewports.length?this.viewports[t]:null;if(!r||e<r.top)return i+(e-n)*this.scale;if(e<=r.bottom)return r.domTop+(e-r.top);n=r.bottom,i=r.domBottom}}fromDOM(e){for(let t=0,n=0,i=0;;t++){let r=t<this.viewports.length?this.viewports[t]:null;if(!r||e<r.domTop)return n+(e-i)/this.scale;if(e<=r.domBottom)return r.top+(e-r.domTop);n=r.bottom,i=r.domBottom}}eq(e){return e instanceof tf&&(this.scale==e.scale&&this.viewports.length==e.viewports.length&&this.viewports.every(((t,n)=>t.from==e.viewports[n].from&&t.to==e.viewports[n].to)))}}function nf(e,t){if(1==t.scale)return e;let n=t.toDOM(e.top),i=t.toDOM(e.bottom);return new Pp(e.from,e.length,n,i-n,Array.isArray(e._content)?e._content.map((e=>nf(e,t))):e._content)}const rf=sc.define({combine:e=>e.join(" ")}),of=sc.define({combine:e=>e.indexOf(!0)>-1}),sf=fh.newName(),af=fh.newName(),lf=fh.newName(),cf={"&light":"."+af,"&dark":"."+lf};function hf(e,t,n){return new fh(t,{finish:t=>/&/.test(t)?t.replace(/&\w*/,(t=>{if("&"==t)return e;if(!n||!n[t])throw new RangeError(`Unsupported selector: ${t}`);return n[t]})):e+" "+t})}const uf=hf("."+sf,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#ddd"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",insetInlineStart:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:'url(\'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>\')',backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},cf),df={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},pf=au.ie&&au.ie_version<=11;class ff{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new Nh,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver((t=>{for(let e of t)this.queue.push(e);(au.ie&&au.ie_version<=11||au.ios&&e.composing)&&t.some((e=>"childList"==e.type&&e.removedNodes.length||"characterData"==e.type&&e.oldValue.length>e.target.nodeValue.length))?this.flushSoon():this.flush()})),!window.EditContext||!1===e.constructor.EDIT_CONTEXT||au.chrome&&au.chrome_version<126||(this.editContext=new yf(e),e.state.facet(gd)&&(e.contentDOM.editContext=this.editContext.editContext)),pf&&(this.onCharData=e=>{this.queue.push({target:e.target,type:"characterData",oldValue:e.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),"function"==typeof ResizeObserver&&(this.resizeScroll=new ResizeObserver((()=>{var e;(null===(e=this.view.docView)||void 0===e?void 0:e.lastUpdate)<Date.now()-75&&this.onResize()})),this.resizeScroll.observe(e.scrollDOM)),this.addWindowListeners(this.win=e.win),this.start(),"function"==typeof IntersectionObserver&&(this.intersection=new IntersectionObserver((e=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),e.length>0&&e[e.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))}),{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver((e=>{e.length>0&&e[e.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))}),{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout((()=>{this.resizeTimeout=-1,this.view.requestMeasure()}),50))}onPrint(e){("change"!=e.type&&e.type||e.matches)&&(this.view.viewState.printing=!0,this.view.measure(),setTimeout((()=>{this.view.viewState.printing=!1,this.view.requestMeasure()}),500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some(((t,n)=>t!=e[n])))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:n}=this,i=this.selectionRange;if(n.state.facet(gd)?n.root.activeElement!=this.dom:!_h(this.dom,i))return;let r=i.anchorNode&&n.docView.nearest(i.anchorNode);r&&r.ignoreEvent(e)?t||(this.selectionChanged=!1):(au.ie&&au.ie_version<=11||au.android&&au.chrome)&&!n.state.selection.main.empty&&i.focusNode&&Ch(i.focusNode,i.focusOffset,i.anchorNode,i.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=xh(e.root);if(!t)return!1;let n=au.safari&&11==e.root.nodeType&&e.root.activeElement==this.dom&&function(e,t){if(t.getComposedRanges){let n=t.getComposedRanges(e.root)[0];if(n)return mf(e,n)}let n=null;function i(e){e.preventDefault(),e.stopImmediatePropagation(),n=e.getTargetRanges()[0]}return e.contentDOM.addEventListener("beforeinput",i,!0),e.dom.ownerDocument.execCommand("indent"),e.contentDOM.removeEventListener("beforeinput",i,!0),n?mf(e,n):null}(this.view,t)||t;if(!n||this.selectionRange.eq(n))return!1;let i=_h(this.dom,n);return i&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&function(e,t){let n=t.focusNode,i=t.focusOffset;if(!n||t.anchorNode!=n||t.anchorOffset!=i)return!1;for(i=Math.min(i,Dh(n));;)if(i){if(1!=n.nodeType)return!1;let e=n.childNodes[i-1];"false"==e.contentEditable?i--:(n=e,i=Dh(n))}else{if(n==e)return!0;i=Eh(n),n=n.parentNode}}(this.dom,n)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(n),i&&(this.selectionChanged=!0),!0)}setSelectionRange(e,t){this.selectionRange.set(e.node,e.offset,t.node,t.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,t=null;for(let n=this.dom;n;)if(1==n.nodeType)!t&&e<this.scrollTargets.length&&this.scrollTargets[e]==n?e++:t||(t=this.scrollTargets.slice(0,e)),t&&t.push(n),n=n.assignedSlot||n.parentNode;else{if(11!=n.nodeType)break;n=n.host}if(e<this.scrollTargets.length&&!t&&(t=this.scrollTargets.slice(0,e)),t){for(let e of this.scrollTargets)e.removeEventListener("scroll",this.onScroll);for(let e of this.scrollTargets=t)e.addEventListener("scroll",this.onScroll)}}ignore(e){if(!this.active)return e();try{return this.stop(),e()}finally{this.start(),this.clear()}}start(){this.active||(this.observer.observe(this.dom,df),pf&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),pf&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,t){var n;if(!this.delayedAndroidKey){let e=()=>{let e=this.delayedAndroidKey;if(e){this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=e.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&e.force&&Ih(this.dom,e.key,e.keyCode)}};this.flushingAndroidKey=this.view.win.requestAnimationFrame(e)}this.delayedAndroidKey&&"Enter"!=e||(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange<Date.now()-50||!!(null===(n=this.delayedAndroidKey)||void 0===n?void 0:n.force)})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame((()=>{this.delayedFlush=-1,this.flush()})))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let t=-1,n=-1,i=!1;for(let r of e){let e=this.readMutation(r);e&&(e.typeOver&&(i=!0),-1==t?({from:t,to:n}=e):(t=Math.min(e.from,t),n=Math.max(e.to,n)))}return{from:t,to:n,typeOver:i}}readChange(){let{from:e,to:t,typeOver:n}=this.processRecords(),i=this.selectionChanged&&_h(this.dom,this.selectionRange);if(e<0&&!i)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let r=new Qd(this.view,e,t,n);return this.view.docView.domChanged={newSel:r.newSel?r.newSel.main:null},r}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return this.view.requestMeasure(),!1;let n=this.view.state,i=Zd(this.view,t);return this.view.state==n&&(t.domChanged||t.newSel&&!t.newSel.main.eq(this.view.state.selection.main))&&this.view.update([]),i}readMutation(e){let t=this.view.docView.nearest(e.target);if(!t||t.ignoreMutation(e))return null;if(t.markDirty("attributes"==e.type),"attributes"==e.type&&(t.flags|=4),"childList"==e.type){let n=gf(t,e.previousSibling||e.target.previousSibling,-1),i=gf(t,e.nextSibling||e.target.nextSibling,1);return{from:n?t.posAfter(n):t.posAtStart,to:i?t.posBefore(i):t.posAtEnd,typeOver:!1}}return"characterData"==e.type?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(gd)!=e.state.facet(gd)&&(e.view.contentDOM.editContext=e.state.facet(gd)?this.editContext.editContext:null))}destroy(){var e,t,n;this.stop(),null===(e=this.intersection)||void 0===e||e.disconnect(),null===(t=this.gapIntersection)||void 0===t||t.disconnect(),null===(n=this.resizeScroll)||void 0===n||n.disconnect();for(let e of this.scrollTargets)e.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function gf(e,t,n){for(;t;){let i=Wh.get(t);if(i&&i.parent==e)return i;let r=t.parentNode;t=r!=e.dom?r:n>0?t.nextSibling:t.previousSibling}return null}function mf(e,t){let n=t.startContainer,i=t.startOffset,r=t.endContainer,o=t.endOffset,s=e.docView.domAtPos(e.state.selection.main.anchor);return Ch(s.node,s.offset,r,o)&&([n,i,r,o]=[r,o,n,i]),{anchorNode:n,anchorOffset:i,focusNode:r,focusOffset:o}}class yf{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(e.state);let t=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=t=>{let n=e.state.selection.main,{anchor:i,head:r}=n,o=this.toEditorPos(t.updateRangeStart),s=this.toEditorPos(t.updateRangeEnd);e.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:t.updateRangeStart,editorBase:o,drifted:!1});let a={from:o,to:s,insert:ql.of(t.text.split("\n"))};if(a.from==this.from&&i<this.from?a.from=i:a.to==this.to&&i>this.to&&(a.to=i),a.from!=a.to||a.insert.length){if((au.mac||au.android)&&a.from==r-1&&/^\. ?$/.test(t.text)&&"off"==e.contentDOM.getAttribute("autocorrect")&&(a={from:o,to:s,insert:ql.of([t.text.replace("."," ")])}),this.pendingContextChange=a,!e.state.readOnly){let n=this.to-this.from+(a.to-a.from+a.insert.length);ep(e,a,ic.single(this.toEditorPos(t.selectionStart,n),this.toEditorPos(t.selectionEnd,n)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state))}else{let i=ic.single(this.toEditorPos(t.selectionStart),this.toEditorPos(t.selectionEnd));i.main.eq(n)||e.dispatch({selection:i,userEvent:"select"})}},this.handlers.characterboundsupdate=n=>{let i=[],r=null;for(let t=this.toEditorPos(n.rangeStart),o=this.toEditorPos(n.rangeEnd);t<o;t++){let n=e.coordsForChar(t);r=n&&new DOMRect(n.left,n.top,n.right-n.left,n.bottom-n.top)||r||new DOMRect,i.push(r)}t.updateCharacterBounds(n.rangeStart,i)},this.handlers.textformatupdate=t=>{let n=[];for(let e of t.getTextFormats()){let t=e.underlineStyle,i=e.underlineThickness;if("None"!=t&&"None"!=i){let r=this.toEditorPos(e.rangeStart),o=this.toEditorPos(e.rangeEnd);if(r<o){let e=`text-decoration: underline ${"Dashed"==t?"dashed ":"Squiggle"==t?"wavy ":""}${"Thin"==i?1:2}px`;n.push(ku.mark({attributes:{style:e}}).range(r,o))}}}e.dispatch({effects:pd.of(ku.set(n))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:t}=this.composing;this.composing=null,t&&this.reset(e.state)}};for(let e in this.handlers)t.addEventListener(e,this.handlers[e]);this.measureReq={read:e=>{this.editContext.updateControlBounds(e.contentDOM.getBoundingClientRect());let t=xh(e.root);t&&t.rangeCount&&this.editContext.updateSelectionBounds(t.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let t=0,n=!1,i=this.pendingContextChange;return e.changes.iterChanges(((r,o,s,a,l)=>{if(n)return;let c=l.length-(o-r);if(i&&o>=i.to){if(i.from==r&&i.to==o&&i.insert.eq(l))return i=this.pendingContextChange=null,t+=c,void(this.to+=c);i=null,this.revertPending(e.state)}if(r+=t,(o+=t)<=this.from)this.from+=c,this.to+=c;else if(r<this.to){if(r<this.from||o>this.to||this.to-this.from+l.length>3e4)return void(n=!0);this.editContext.updateText(this.toContextPos(r),this.toContextPos(o),l.toString()),this.to+=c}t+=c})),i&&!n&&this.revertPending(e.state),!n}update(e){let t=this.pendingContextChange;this.composing&&(this.composing.drifted||e.transactions.some((e=>!e.isUserEvent("input.type")&&e.changes.touchesRange(this.from,this.to))))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):this.applyEdits(e)&&this.rangeIsValid(e.state)?(e.docChanged||e.selectionSet||t)&&this.setSelection(e.state):(this.pendingContextChange=null,this.reset(e.state)),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:t}=e.selection.main;this.from=Math.max(0,t-1e4),this.to=Math.min(e.doc.length,t+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let t=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(t.from),this.toContextPos(t.from+t.insert.length),e.doc.sliceString(t.from,t.to))}setSelection(e){let{main:t}=e.selection,n=this.toContextPos(Math.max(this.from,Math.min(this.to,t.anchor))),i=this.toContextPos(t.head);this.editContext.selectionStart==n&&this.editContext.selectionEnd==i||this.editContext.updateSelection(n,i)}rangeIsValid(e){let{head:t}=e.selection.main;return!(this.from>0&&t-this.from<500||this.to<e.doc.length&&this.to-t<500||this.to-this.from>3e4)}toEditorPos(e,t=this.to-this.from){e=Math.min(e,t);let n=this.composing;return n&&n.drifted?n.editorBase+(e-n.contextBase):e+this.from}toContextPos(e){let t=this.composing;return t&&t.drifted?t.contextBase+(e-t.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}}class vf{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var t;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:n}=e;this.dispatchTransactions=e.dispatchTransactions||n&&(e=>e.forEach((e=>n(e,this))))||(e=>this.update(e)),this.dispatch=this.dispatch.bind(this),this._root=e.root||function(e){for(;e;){if(e&&(9==e.nodeType||11==e.nodeType&&e.host))return e;e=e.assignedSlot||e.parentNode}return null}(e.parent)||document,this.viewState=new Yp(e.state||Kc.create(e)),e.scrollTo&&e.scrollTo.is(dd)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(yd).map((e=>new wd(e)));for(let e of this.plugins)e.update(this);this.observer=new ff(this),this.inputState=new tp(this),this.inputState.ensureHandlers(this.plugins),this.docView=new Td(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),(null===(t=document.fonts)||void 0===t?void 0:t.ready)&&document.fonts.ready.then((()=>this.requestMeasure()))}dispatch(...e){let t=1==e.length&&e[0]instanceof Lc?e:1==e.length&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(t,this)}update(e){if(0!=this.updateState)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let t,n=!1,i=!1,r=this.state;for(let t of e){if(t.startState!=r)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");r=t.state}if(this.destroyed)return void(this.viewState.state=r);let o=this.hasFocus,s=0,a=null;e.some((e=>e.annotation(Cp)))?(this.inputState.notifiedFocused=o,s=1):o!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=o,a=Ep(r,o),a||(s=1));let l=this.observer.delayedAndroidKey,c=null;if(l?(this.observer.clearDelayedAndroidKey(),c=this.observer.readChange(),(c&&!this.state.doc.eq(r.doc)||!this.state.selection.eq(r.selection))&&(c=null)):this.observer.clear(),r.facet(Kc.phrases)!=this.state.facet(Kc.phrases))return this.setState(r);t=Od.create(this,r,e),t.flags|=s;let h=this.viewState.scrollTarget;try{this.updateState=2;for(let t of e){if(h&&(h=h.map(t.changes)),t.scrollIntoView){let{main:e}=t.state.selection;h=new ud(e.empty?e:ic.cursor(e.head,e.head>e.anchor?-1:1))}for(let e of t.effects)e.is(dd)&&(h=e.value.clip(this.state))}this.viewState.update(t,h),this.bidiCache=xf.update(this.bidiCache,t.changes),t.empty||(this.updatePlugins(t),this.inputState.update(t)),n=this.docView.update(t),this.state.facet(Dd)!=this.styleModules&&this.mountStyles(),i=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(n,e.some((e=>e.isUserEvent("select.pointer"))))}finally{this.updateState=0}if(t.startState.facet(rf)!=t.state.facet(rf)&&(this.viewState.mustMeasureContent=!0),(n||i||h||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),n&&this.docViewUpdate(),!t.empty)for(let e of this.state.facet(id))try{e(t)}catch(e){fd(this.state,e,"update listener")}(a||c)&&Promise.resolve().then((()=>{a&&this.state==a.startState&&this.dispatch(a),c&&!Zd(this,c)&&l.force&&Ih(this.contentDOM,l.key,l.keyCode)}))}setState(e){if(0!=this.updateState)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed)return void(this.viewState.state=e);this.updateState=2;let t=this.hasFocus;try{for(let e of this.plugins)e.destroy(this);this.viewState=new Yp(e),this.plugins=e.facet(yd).map((e=>new wd(e))),this.pluginMap.clear();for(let e of this.plugins)e.update(this);this.docView.destroy(),this.docView=new Td(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(yd),n=e.state.facet(yd);if(t!=n){let i=[];for(let r of n){let n=t.indexOf(r);if(n<0)i.push(new wd(r));else{let t=this.plugins[n];t.mustUpdate=e,i.push(t)}}for(let t of this.plugins)t.mustUpdate!=e&&t.destroy(this);this.plugins=i,this.pluginMap.clear()}else for(let t of this.plugins)t.mustUpdate=e;for(let e=0;e<this.plugins.length;e++)this.plugins[e].update(this);t!=n&&this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let e of this.plugins){let t=e.value;if(t&&t.docViewUpdate)try{t.docViewUpdate(this)}catch(e){fd(this.state,e,"doc view update listener")}}}measure(e=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey)return this.measureScheduled=-1,void this.requestMeasure();this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,n=this.scrollDOM,i=n.scrollTop*this.scaleY,{scrollAnchorPos:r,scrollAnchorHeight:o}=this.viewState;Math.abs(i-this.viewState.scrollTop)>1&&(o=-1),this.viewState.scrollAnchorHeight=-1;try{for(let e=0;;e++){if(o<0)if(jh(n))r=-1,o=this.viewState.heightMap.height;else{let e=this.viewState.scrollAnchorAt(i);r=e.from,o=e.top}this.updateState=1;let s=this.viewState.measure(this);if(!s&&!this.measureRequests.length&&null==this.viewState.scrollTarget)break;if(e>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let a=[];4&s||([this.measureRequests,a]=[a,this.measureRequests]);let l=a.map((e=>{try{return e.read(this)}catch(e){return fd(this.state,e),bf}})),c=Od.create(this,this.state,[]),h=!1;c.flags|=s,t?t.flags|=s:t=c,this.updateState=2,c.empty||(this.updatePlugins(c),this.inputState.update(c),this.updateAttrs(),h=this.docView.update(c),h&&this.docViewUpdate());for(let e=0;e<a.length;e++)if(l[e]!=bf)try{let t=a[e];t.write&&t.write(l[e],this)}catch(e){fd(this.state,e)}if(h&&this.docView.updateSelection(!0),!c.viewportChanged&&0==this.measureRequests.length){if(this.viewState.editorHeight){if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,o=-1;continue}{let e=(r<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(r).top)-o;if(e>1||e<-1){i+=e,n.scrollTop=i/this.scaleY,o=-1;continue}}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let e of this.state.facet(id))e(t)}get themeClasses(){return sf+" "+(this.state.facet(of)?lf:af)+" "+this.state.facet(rf)}updateAttrs(){let e=kf(this,bd,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),t={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:this.state.facet(gd)?"true":"false",class:"cm-content",style:`${au.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(t["aria-readonly"]="true"),kf(this,xd,t);let n=this.observer.ignore((()=>{let n=vu(this.contentDOM,this.contentAttrs,t),i=vu(this.dom,this.editorAttrs,e);return n||i}));return this.editorAttrs=e,this.contentAttrs=t,n}showAnnouncements(e){let t=!0;for(let n of e)for(let e of n.effects)if(e.is(vf.announce)){t&&(this.announceDOM.textContent=""),t=!1,this.announceDOM.appendChild(document.createElement("div")).textContent=e.value}}mountStyles(){this.styleModules=this.state.facet(Dd);let e=this.state.facet(vf.cspNonce);fh.mount(this.root,this.styleModules.concat(uf).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(2==this.updateState)throw new Error("Reading the editor layout isn't allowed during an update");0==this.updateState&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame((()=>this.measure()))),e){if(this.measureRequests.indexOf(e)>-1)return;if(null!=e.key)for(let t=0;t<this.measureRequests.length;t++)if(this.measureRequests[t].key===e.key)return void(this.measureRequests[t]=e);this.measureRequests.push(e)}}plugin(e){let t=this.pluginMap.get(e);return(void 0===t||t&&t.spec!=e)&&this.pluginMap.set(e,t=this.plugins.find((t=>t.spec==e))||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,n){return Gd(this,e,Wd(this,e,t,n))}moveByGroup(e,t){return Gd(this,e,Wd(this,e,t,(t=>function(e,t,n){let i=e.state.charCategorizer(t),r=i(n);return e=>{let t=i(e);return r==Hc.Space&&(r=t),r==t}}(this,e.head,t))))}visualLineSide(e,t){let n=this.bidiSpans(e),i=this.textDirectionAt(e.from),r=n[t?n.length-1:0];return ic.cursor(r.side(t,i)+e.from,r.forward(!t,i)?1:-1)}moveToLineBoundary(e,t,n=!0){return Hd(this,e,t,n)}moveVertically(e,t,n){return Gd(this,e,function(e,t,n,i){let r=t.head,o=n?1:-1;if(r==(n?e.state.doc.length:0))return ic.cursor(r,t.assoc);let s,a=t.goalColumn,l=e.contentDOM.getBoundingClientRect(),c=e.coordsAtPos(r,t.assoc||-1),h=e.documentTop;if(c)null==a&&(a=c.left-l.left),s=o<0?c.top:c.bottom;else{let t=e.viewState.lineBlockAt(r);null==a&&(a=Math.min(l.right-l.left,e.defaultCharacterWidth*(r-t.from))),s=(o<0?t.top:t.bottom)+h}let u=l.left+a,d=null!=i?i:e.viewState.heightOracle.textHeight>>1;for(let t=0;;t+=10){let n=s+(d+t)*o,i=$d(e,{x:u,y:n},!1,o);if(n<l.top||n>l.bottom||(o<0?i<r:i>r)){let t=e.docView.coordsForChar(i),r=!t||n<t.top?-1:1;return ic.cursor(i,r,void 0,a)}}}(this,e,t,n))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){return this.readMeasured(),$d(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let n=this.docView.coordsAt(e,t);if(!n||n.left==n.right)return n;let i=this.state.doc.lineAt(e),r=this.bidiSpans(i);return Rh(n,r[Hu.find(r,e-i.from,-1,t)].dir==Pu.LTR==t>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(ld)||e<this.viewport.from||e>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>wf)return Xu(e.length);let t,n=this.textDirectionAt(e.from);for(let i of this.bidiCache)if(i.from==e.from&&i.dir==n&&(i.fresh||Wu(i.isolates,t=Ed(this,e))))return i.order;t||(t=Ed(this,e));let i=function(e,t,n){if(!e)return[new Hu(0,0,t==Bu?1:0)];if(t==qu&&!n.length&&!zu.test(e))return Xu(e.length);if(n.length)for(;e.length>Uu.length;)Uu[Uu.length]=256;let i=[],r=t==qu?0:1;return Ku(e,r,r,n,0,e.length,i),i}(e.text,n,t);return this.bidiCache.push(new xf(e.from,e.to,n,t,!0,i)),i}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||au.safari&&(null===(e=this.inputState)||void 0===e?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore((()=>{Bh(this.contentDOM),this.docView.updateSelection()}))}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((9==e.nodeType?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,t={}){return dd.of(new ud("number"==typeof e?ic.cursor(e):e,t.y,t.x,t.yMargin,t.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:t}=this.scrollDOM,n=this.viewState.scrollAnchorAt(e);return dd.of(new ud(ic.cursor(n.from),"start","start",n.top-e,t,!0))}setTabFocusMode(e){null==e?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:"boolean"==typeof e?this.inputState.tabFocusMode=e?0:-1:0!=this.inputState.tabFocusMode&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return vd.define((()=>({})),{eventHandlers:e})}static domEventObservers(e){return vd.define((()=>({})),{eventObservers:e})}static theme(e,t){let n=fh.newName(),i=[rf.of(n),Dd.of(hf(`.${n}`,e))];return t&&t.dark&&i.push(of.of(!0)),i}static baseTheme(e){return wc.lowest(Dd.of(hf("."+sf,e,cf)))}static findFromDOM(e){var t;let n=e.querySelector(".cm-content"),i=n&&Wh.get(n)||Wh.get(e);return(null===(t=null==i?void 0:i.rootView)||void 0===t?void 0:t.view)||null}}vf.styleModule=Dd,vf.inputHandler=rd,vf.clipboardInputFilter=sd,vf.clipboardOutputFilter=ad,vf.scrollHandler=hd,vf.focusChangeEffect=od,vf.perLineTextDirection=ld,vf.exceptionSink=nd,vf.updateListener=id,vf.editable=gd,vf.mouseSelectionStyle=td,vf.dragMovesSelection=ed,vf.clickAddsSelectionRange=Zu,vf.decorations=kd,vf.outerDecorations=_d,vf.atomicRanges=Sd,vf.bidiIsolatedRanges=Cd,vf.scrollMargins=Md,vf.darkTheme=of,vf.cspNonce=sc.define({combine:e=>e.length?e[0]:""}),vf.contentAttributes=xd,vf.editorAttributes=bd,vf.lineWrapping=vf.contentAttributes.of({class:"cm-lineWrapping"}),vf.announce=Bc.define();const wf=4096,bf={};class xf{constructor(e,t,n,i,r,o){this.from=e,this.to=t,this.dir=n,this.isolates=i,this.fresh=r,this.order=o}static update(e,t){if(t.empty&&!e.some((e=>e.fresh)))return e;let n=[],i=e.length?e[e.length-1].dir:Pu.LTR;for(let r=Math.max(0,e.length-10);r<e.length;r++){let o=e[r];o.dir!=i||t.touchesRange(o.from,o.to)||n.push(new xf(t.mapPos(o.from,1),t.mapPos(o.to,-1),o.dir,o.isolates,!1,o.order))}return n}}function kf(e,t,n){for(let i=e.state.facet(t),r=i.length-1;r>=0;r--){let t=i[r],o="function"==typeof t?t(e):t;o&&gu(o,n)}return n}const _f={".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"}},".cm-content":{"& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}};!(au.ios&&au.webkit&&au.webkit_version<534)&&(_f[".cm-line"].caretColor=_f[".cm-content"].caretColor="transparent !important");class Sf extends Xc{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}Sf.prototype.elementClass="",Sf.prototype.toDOM=void 0,Sf.prototype.mapMode=Gl.TrackBefore,Sf.prototype.startSide=Sf.prototype.endSide=-1,Sf.prototype.point=!0;const Cf=1024;let Ef=0;class Mf{constructor(e,t){this.from=e,this.to=t}}class Af{constructor(e={}){this.id=Ef++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return"function"!=typeof e&&(e=Of.match(e)),t=>{let n=e(t);return void 0===n?null:[this,n]}}}Af.closedBy=new Af({deserialize:e=>e.split(" ")}),Af.openedBy=new Af({deserialize:e=>e.split(" ")}),Af.group=new Af({deserialize:e=>e.split(" ")}),Af.isolate=new Af({deserialize:e=>{if(e&&"rtl"!=e&&"ltr"!=e&&"auto"!=e)throw new RangeError("Invalid value for isolate: "+e);return e||"auto"}}),Af.contextHash=new Af({perNode:!0}),Af.lookAhead=new Af({perNode:!0}),Af.mounted=new Af({perNode:!0});class Df{constructor(e,t,n){this.tree=e,this.overlay=t,this.parser=n}static get(e){return e&&e.props&&e.props[Af.mounted.id]}}const Rf=Object.create(null);class Of{constructor(e,t,n,i=0){this.name=e,this.props=t,this.id=n,this.flags=i}static define(e){let t=e.props&&e.props.length?Object.create(null):Rf,n=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(null==e.name?8:0),i=new Of(e.name||"",t,e.id,n);if(e.props)for(let n of e.props)if(Array.isArray(n)||(n=n(i)),n){if(n[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");t[n[0].id]=n[1]}return i}prop(e){return this.props[e.id]}get isTop(){return(1&this.flags)>0}get isSkipped(){return(2&this.flags)>0}get isError(){return(4&this.flags)>0}get isAnonymous(){return(8&this.flags)>0}is(e){if("string"==typeof e){if(this.name==e)return!0;let t=this.prop(Af.group);return!!t&&t.indexOf(e)>-1}return this.id==e}static match(e){let t=Object.create(null);for(let n in e)for(let i of n.split(" "))t[i]=e[n];return e=>{for(let n=e.prop(Af.group),i=-1;i<(n?n.length:0);i++){let r=t[i<0?e.name:n[i]];if(r)return r}}}}Of.none=new Of("",Object.create(null),0,8);const Tf=new WeakMap,Nf=new WeakMap;var Pf;!function(e){e[e.ExcludeBuffers=1]="ExcludeBuffers",e[e.IncludeAnonymous=2]="IncludeAnonymous",e[e.IgnoreMounts=4]="IgnoreMounts",e[e.IgnoreOverlays=8]="IgnoreOverlays"}(Pf||(Pf={}));class qf{constructor(e,t,n,i,r){if(this.type=e,this.children=t,this.positions=n,this.length=i,this.props=null,r&&r.length){this.props=Object.create(null);for(let[e,t]of r)this.props["number"==typeof e?e:e.id]=t}}toString(){let e=Df.get(this);if(e&&!e.overlay)return e.tree.toString();let t="";for(let e of this.children){let n=e.toString();n&&(t&&(t+=","),t+=n)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(t.length?"("+t+")":""):t}cursor(e=0){return new Kf(this.topNode,e)}cursorAt(e,t=0,n=0){let i=Tf.get(this)||this.topNode,r=new Kf(i);return r.moveTo(e,t),Tf.set(this,r._tree),r}get topNode(){return new Vf(this,0,0,null)}resolve(e,t=0){let n=Ff(Tf.get(this)||this.topNode,e,t,!1);return Tf.set(this,n),n}resolveInner(e,t=0){let n=Ff(Nf.get(this)||this.topNode,e,t,!0);return Nf.set(this,n),n}resolveStack(e,t=0){return function(e,t,n){let i=e.resolveInner(t,n),r=null;for(let e=i instanceof Vf?i:i.context.parent;e;e=e.parent)if(e.index<0){let o=e.parent;(r||(r=[i])).push(o.resolve(t,n)),e=o}else{let o=Df.get(e.tree);if(o&&o.overlay&&o.overlay[0].from<=t&&o.overlay[o.overlay.length-1].to>=t){let s=new Vf(o.tree,o.overlay[0].from+e.from,-1,e);(r||(r=[i])).push(Ff(s,t,n,!1))}}return r?Uf(r):i}(this,e,t)}iterate(e){let{enter:t,leave:n,from:i=0,to:r=this.length}=e,o=e.mode||0,s=(o&Pf.IncludeAnonymous)>0;for(let e=this.cursor(o|Pf.IncludeAnonymous);;){let o=!1;if(e.from<=r&&e.to>=i&&(!s&&e.type.isAnonymous||!1!==t(e))){if(e.firstChild())continue;o=!0}for(;o&&n&&(s||!e.type.isAnonymous)&&n(e),!e.nextSibling();){if(!e.parent())return;o=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:Qf(Of.none,this.children,this.positions,0,this.children.length,0,this.length,((e,t,n)=>new qf(this.type,e,t,n,this.propValues)),e.makeTree||((e,t,n)=>new qf(Of.none,e,t,n)))}static build(e){return function(e){var t;let{buffer:n,nodeSet:i,maxBufferLength:r=Cf,reused:o=[],minRepeatType:s=i.types.length}=e,a=Array.isArray(n)?new Bf(n,n.length):n,l=i.types,c=0,h=0;function u(e,t,n,v,w,b){let{id:x,start:k,end:_,size:S}=a,C=h,E=c;for(;S<0;){if(a.next(),-1==S){let t=o[x];return n.push(t),void v.push(k-e)}if(-3==S)return void(c=x);if(-4==S)return void(h=x);throw new RangeError(`Unrecognized record size: ${S}`)}let M,A,D=l[x],R=k-e;if(_-k<=r&&(A=m(a.pos-t,w))){let t=new Uint16Array(A.size-A.skip),n=a.pos-A.size,r=t.length;for(;a.pos>n;)r=y(A.start,t,r);M=new Lf(t,_-A.start,i),R=A.start-e}else{let e=a.pos-S;a.next();let t=[],n=[],i=x>=s?x:-1,o=0,l=_;for(;a.pos>e;)i>=0&&a.id==i&&a.size>=0?(a.end<=l-r&&(f(t,n,k,o,a.end,l,i,C,E),o=t.length,l=a.end),a.next()):b>2500?d(k,e,t,n):u(k,e,t,n,i,b+1);if(i>=0&&o>0&&o<t.length&&f(t,n,k,o,k,l,i,C,E),t.reverse(),n.reverse(),i>-1&&o>0){let e=p(D,E);M=Qf(D,t,n,0,t.length,0,_-k,e,e)}else M=g(D,t,n,_-k,C-_,E)}n.push(M),v.push(R)}function d(e,t,n,o){let s=[],l=0,c=-1;for(;a.pos>t;){let{id:e,start:t,end:n,size:i}=a;if(i>4)a.next();else{if(c>-1&&t<c)break;c<0&&(c=n-r),s.push(e,t,n),l++,a.next()}}if(l){let t=new Uint16Array(4*l),r=s[s.length-2];for(let e=s.length-3,n=0;e>=0;e-=3)t[n++]=s[e],t[n++]=s[e+1]-r,t[n++]=s[e+2]-r,t[n++]=n;n.push(new Lf(t,s[2]-r,i)),o.push(r-e)}}function p(e,t){return(n,i,r)=>{let o,s,a=0,l=n.length-1;if(l>=0&&(o=n[l])instanceof qf){if(!l&&o.type==e&&o.length==r)return o;(s=o.prop(Af.lookAhead))&&(a=i[l]+o.length+s)}return g(e,n,i,r,a,t)}}function f(e,t,n,r,o,s,a,l,c){let h=[],u=[];for(;e.length>r;)h.push(e.pop()),u.push(t.pop()+n-o);e.push(g(i.types[a],h,u,s-o,l-s,c)),t.push(o-n)}function g(e,t,n,i,r,o,s){if(o){let e=[Af.contextHash,o];s=s?[e].concat(s):[e]}if(r>25){let e=[Af.lookAhead,r];s=s?[e].concat(s):[e]}return new qf(e,t,n,i,s)}function m(e,t){let n=a.fork(),i=0,o=0,l=0,c=n.end-r,h={size:0,start:0,skip:0};e:for(let r=n.pos-e;n.pos>r;){let e=n.size;if(n.id==t&&e>=0){h.size=i,h.start=o,h.skip=l,l+=4,i+=4,n.next();continue}let a=n.pos-e;if(e<0||a<r||n.start<c)break;let u=n.id>=s?4:0,d=n.start;for(n.next();n.pos>a;){if(n.size<0){if(-3!=n.size)break e;u+=4}else n.id>=s&&(u+=4);n.next()}o=d,i+=e,l+=u}return(t<0||i==e)&&(h.size=i,h.start=o,h.skip=l),h.size>4?h:void 0}function y(e,t,n){let{id:i,start:r,end:o,size:l}=a;if(a.next(),l>=0&&i<s){let s=n;if(l>4){let i=a.pos-(l-4);for(;a.pos>i;)n=y(e,t,n)}t[--n]=s,t[--n]=o-e,t[--n]=r-e,t[--n]=i}else-3==l?c=i:-4==l&&(h=i);return n}let v=[],w=[];for(;a.pos>0;)u(e.start||0,e.bufferStart||0,v,w,-1,0);let b=null!==(t=e.length)&&void 0!==t?t:v.length?w[0]+v[0].length:0;return new qf(l[e.topID],v.reverse(),w.reverse(),b)}(e)}}qf.empty=new qf(Of.none,[],[],0);class Bf{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new Bf(this.buffer,this.index)}}class Lf{constructor(e,t,n){this.buffer=e,this.length=t,this.set=n}get type(){return Of.none}toString(){let e=[];for(let t=0;t<this.buffer.length;)e.push(this.childString(t)),t=this.buffer[t+3];return e.join(",")}childString(e){let t=this.buffer[e],n=this.buffer[e+3],i=this.set.types[t],r=i.name;if(/\W/.test(r)&&!i.isError&&(r=JSON.stringify(r)),n==(e+=4))return r;let o=[];for(;e<n;)o.push(this.childString(e)),e=this.buffer[e+3];return r+"("+o.join(",")+")"}findChild(e,t,n,i,r){let{buffer:o}=this,s=-1;for(let a=e;a!=t&&!(If(r,i,o[a+1],o[a+2])&&(s=a,n>0));a=o[a+3]);return s}slice(e,t,n){let i=this.buffer,r=new Uint16Array(t-e),o=0;for(let s=e,a=0;s<t;){r[a++]=i[s++],r[a++]=i[s++]-n;let t=r[a++]=i[s++]-n;r[a++]=i[s++]-e,o=Math.max(o,t)}return new Lf(r,o,this.set)}}function If(e,t,n,i){switch(e){case-2:return n<t;case-1:return i>=t&&n<t;case 0:return n<t&&i>t;case 1:return n<=t&&i>t;case 2:return i>t;case 4:return!0}}function Ff(e,t,n,i){for(var r;e.from==e.to||(n<1?e.from>=t:e.from>t)||(n>-1?e.to<=t:e.to<t);){let t=!i&&e instanceof Vf&&e.index<0?null:e.parent;if(!t)return e;e=t}let o=i?0:Pf.IgnoreOverlays;if(i)for(let i=e,s=i.parent;s;i=s,s=i.parent)i instanceof Vf&&i.index<0&&(null===(r=s.enter(t,n,o))||void 0===r?void 0:r.from)!=i.from&&(e=s);for(;;){let i=e.enter(t,n,o);if(!i)return e;e=i}}class jf{cursor(e=0){return new Kf(this,e)}getChild(e,t=null,n=null){let i=$f(this,e,t,n);return i.length?i[0]:null}getChildren(e,t=null,n=null){return $f(this,e,t,n)}resolve(e,t=0){return Ff(this,e,t,!1)}resolveInner(e,t=0){return Ff(this,e,t,!0)}matchContext(e){return zf(this.parent,e)}enterUnfinishedNodesBefore(e){let t=this.childBefore(e),n=this;for(;t;){let e=t.lastChild;if(!e||e.to!=t.to)break;e.type.isError&&e.from==e.to?(n=t,t=e.prevSibling):t=e}return n}get node(){return this}get next(){return this.parent}}class Vf extends jf{constructor(e,t,n,i){super(),this._tree=e,this.from=t,this.index=n,this._parent=i}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,t,n,i,r=0){for(let o=this;;){for(let{children:s,positions:a}=o._tree,l=t>0?s.length:-1;e!=l;e+=t){let l=s[e],c=a[e]+o.from;if(If(i,n,c,c+l.length))if(l instanceof Lf){if(r&Pf.ExcludeBuffers)continue;let s=l.findChild(0,l.buffer.length,t,n-c,i);if(s>-1)return new Wf(new Hf(o,l,e,c),null,s)}else if(r&Pf.IncludeAnonymous||!l.type.isAnonymous||Xf(l)){let s;if(!(r&Pf.IgnoreMounts)&&(s=Df.get(l))&&!s.overlay)return new Vf(s.tree,c,e,o);let a=new Vf(l,c,e,o);return r&Pf.IncludeAnonymous||!a.type.isAnonymous?a:a.nextChild(t<0?l.children.length-1:0,t,n,i)}}if(r&Pf.IncludeAnonymous||!o.type.isAnonymous)return null;if(e=o.index>=0?o.index+t:t<0?-1:o._parent._tree.children.length,o=o._parent,!o)return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,t,n=0){let i;if(!(n&Pf.IgnoreOverlays)&&(i=Df.get(this._tree))&&i.overlay){let n=e-this.from;for(let{from:e,to:r}of i.overlay)if((t>0?e<=n:e<n)&&(t<0?r>=n:r>n))return new Vf(i.tree,i.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,n)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function $f(e,t,n,i){let r=e.cursor(),o=[];if(!r.firstChild())return o;if(null!=n)for(let e=!1;!e;)if(e=r.type.is(n),!r.nextSibling())return o;for(;;){if(null!=i&&r.type.is(i))return o;if(r.type.is(t)&&o.push(r.node),!r.nextSibling())return null==i?o:[]}}function zf(e,t,n=t.length-1){for(let i=e;n>=0;i=i.parent){if(!i)return!1;if(!i.type.isAnonymous){if(t[n]&&t[n]!=i.name)return!1;n--}}return!0}class Hf{constructor(e,t,n,i){this.parent=e,this.buffer=t,this.index=n,this.start=i}}class Wf extends jf{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,n){super(),this.context=e,this._parent=t,this.index=n,this.type=e.buffer.set.types[e.buffer.buffer[n]]}child(e,t,n){let{buffer:i}=this.context,r=i.findChild(this.index+4,i.buffer[this.index+3],e,t-this.context.start,n);return r<0?null:new Wf(this.context,this,r)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,t,n=0){if(n&Pf.ExcludeBuffers)return null;let{buffer:i}=this.context,r=i.findChild(this.index+4,i.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return r<0?null:new Wf(this.context,this,r)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new Wf(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new Wf(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:n}=this.context,i=this.index+4,r=n.buffer[this.index+3];if(r>i){let o=n.buffer[this.index+1];e.push(n.slice(i,r,o)),t.push(0)}return new qf(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function Uf(e){if(!e.length)return null;let t=0,n=e[0];for(let i=1;i<e.length;i++){let r=e[i];(r.from>n.from||r.to<n.to)&&(n=r,t=i)}let i=n instanceof Vf&&n.index<0?null:n.parent,r=e.slice();return i?r[t]=i:r.splice(t,1),new Gf(r,n)}class Gf{constructor(e,t){this.heads=e,this.node=t}get next(){return Uf(this.heads)}}class Kf{get name(){return this.type.name}constructor(e,t=0){if(this.mode=t,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof Vf)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let t=e._parent;t;t=t._parent)this.stack.unshift(t.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return!!e&&(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0)}yieldBuf(e,t){this.index=e;let{start:n,buffer:i}=this.buffer;return this.type=t||i.set.types[i.buffer[e]],this.from=n+i.buffer[e+1],this.to=n+i.buffer[e+2],!0}yield(e){return!!e&&(e instanceof Vf?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)))}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,n){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,n,this.mode));let{buffer:i}=this.buffer,r=i.findChild(this.index+4,i.buffer[this.index+3],e,t-this.buffer.start,n);return!(r<0)&&(this.stack.push(this.index),this.yieldBuf(r))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,n=this.mode){return this.buffer?!(n&Pf.ExcludeBuffers)&&this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,n))}parent(){if(!this.buffer)return this.yieldNode(this.mode&Pf.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&Pf.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return!!this._tree._parent&&this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode));let{buffer:t}=this.buffer,n=this.stack.length-1;if(e<0){let e=n<0?0:this.stack[n]+4;if(this.index!=e)return this.yieldBuf(t.findChild(e,this.index,-1,0,4))}else{let e=t.buffer[this.index+3];if(e<(n<0?t.buffer.length:t.buffer[this.stack[n]+3]))return this.yieldBuf(e)}return n<0&&this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode))}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,n,{buffer:i}=this;if(i){if(e>0){if(this.index<i.buffer.buffer.length)return!1}else for(let e=0;e<this.index;e++)if(i.buffer.buffer[e+3]<this.index)return!1;({index:t,parent:n}=i)}else({index:t,_parent:n}=this._tree);for(;n;({index:t,_parent:n}=n))if(t>-1)for(let i=t+e,r=e<0?-1:n._tree.children.length;i!=r;i+=e){let e=n._tree.children[i];if(this.mode&Pf.IncludeAnonymous||e instanceof Lf||!e.type.isAnonymous||Xf(e))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,t););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,t=null,n=0;if(e&&e.context==this.buffer)e:for(let i=this.index,r=this.stack.length;r>=0;){for(let o=e;o;o=o._parent)if(o.index==i){if(i==this.index)return o;t=o,n=r+1;break e}i=this.stack[--r]}for(let e=n;e<this.stack.length;e++)t=new Wf(this.buffer,t,this.stack[e]);return this.bufferNode=new Wf(this.buffer,t,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,t){for(let n=0;;){let i=!1;if(this.type.isAnonymous||!1!==e(this)){if(this.firstChild()){n++;continue}this.type.isAnonymous||(i=!0)}for(;;){if(i&&t&&t(this),i=this.type.isAnonymous,!n)return;if(this.nextSibling())break;this.parent(),n--,i=!0}}}matchContext(e){if(!this.buffer)return zf(this.node.parent,e);let{buffer:t}=this.buffer,{types:n}=t.set;for(let i=e.length-1,r=this.stack.length-1;i>=0;r--){if(r<0)return zf(this._tree,e,i);let o=n[t.buffer[this.stack[r]]];if(!o.isAnonymous){if(e[i]&&e[i]!=o.name)return!1;i--}}return!0}}function Xf(e){return e.children.some((e=>e instanceof Lf||!e.type.isAnonymous||Xf(e)))}const Yf=new WeakMap;function Jf(e,t){if(!e.isAnonymous||t instanceof Lf||t.type!=e)return 1;let n=Yf.get(t);if(null==n){n=1;for(let i of t.children){if(i.type!=e||!(i instanceof qf)){n=1;break}n+=Jf(e,i)}Yf.set(t,n)}return n}function Qf(e,t,n,i,r,o,s,a,l){let c=0;for(let n=i;n<r;n++)c+=Jf(e,t[n]);let h=Math.ceil(1.5*c/8),u=[],d=[];return function t(n,i,r,s,a){for(let c=r;c<s;){let r=c,p=i[c],f=Jf(e,n[c]);for(c++;c<s;c++){let t=Jf(e,n[c]);if(f+t>=h)break;f+=t}if(c==r+1){if(f>h){let e=n[r];t(e.children,e.positions,0,e.children.length,i[r]+a);continue}u.push(n[r])}else{let t=i[c-1]+n[c-1].length-p;u.push(Qf(e,n,i,r,c,p,t,null,l))}d.push(p+a-o)}}(t,n,i,r,0),(a||l)(u,d,s)}class Zf{constructor(e,t,n,i,r=!1,o=!1){this.from=e,this.to=t,this.tree=n,this.offset=i,this.open=(r?1:0)|(o?2:0)}get openStart(){return(1&this.open)>0}get openEnd(){return(2&this.open)>0}static addTree(e,t=[],n=!1){let i=[new Zf(0,e.length,e,0,!1,n)];for(let n of t)n.to>e.length&&i.push(n);return i}static applyChanges(e,t,n=128){if(!t.length)return e;let i=[],r=1,o=e.length?e[0]:null;for(let s=0,a=0,l=0;;s++){let c=s<t.length?t[s]:null,h=c?c.fromA:1e9;if(h-a>=n)for(;o&&o.from<h;){let t=o;if(a>=t.from||h<=t.to||l){let e=Math.max(t.from,a)-l,n=Math.min(t.to,h)-l;t=e>=n?null:new Zf(e,n,t.tree,t.offset+l,s>0,!!c)}if(t&&i.push(t),o.to>h)break;o=r<e.length?e[r++]:null}if(!c)break;a=c.toA,l=c.toA-c.toB}return i}}class eg{startParse(e,t,n){return"string"==typeof e&&(e=new tg(e)),n=n?n.length?n.map((e=>new Mf(e.from,e.to))):[new Mf(0,0)]:[new Mf(0,e.length)],this.createParse(e,t||[],n)}parse(e,t,n){let i=this.startParse(e,t,n);for(;;){let e=i.advance();if(e)return e}}}class tg{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}}new Af({perNode:!0});let ng=0;class ig{constructor(e,t,n,i){this.name=e,this.set=t,this.base=n,this.modified=i,this.id=ng++}toString(){let{name:e}=this;for(let t of this.modified)t.name&&(e=`${t.name}(${e})`);return e}static define(e,t){let n="string"==typeof e?e:"?";if(e instanceof ig&&(t=e),null==t?void 0:t.base)throw new Error("Can not derive from a modified tag");let i=new ig(n,[],null,[]);if(i.set.push(i),t)for(let e of t.set)i.set.push(e);return i}static defineModifier(e){let t=new og(e);return e=>e.modified.indexOf(t)>-1?e:og.get(e.base||e,e.modified.concat(t).sort(((e,t)=>e.id-t.id)))}}let rg=0;class og{constructor(e){this.name=e,this.instances=[],this.id=rg++}static get(e,t){if(!t.length)return e;let n=t[0].instances.find((n=>{return n.base==e&&(i=t,r=n.modified,i.length==r.length&&i.every(((e,t)=>e==r[t])));var i,r}));if(n)return n;let i=[],r=new ig(e.name,i,e,t);for(let e of t)e.instances.push(r);let o=function(e){let t=[[]];for(let n=0;n<e.length;n++)for(let i=0,r=t.length;i<r;i++)t.push(t[i].concat(e[n]));return t.sort(((e,t)=>t.length-e.length))}(t);for(let t of e.set)if(!t.modified.length)for(let e of o)i.push(og.get(t,e));return r}}function sg(e){let t=Object.create(null);for(let n in e){let i=e[n];Array.isArray(i)||(i=[i]);for(let e of n.split(" "))if(e){let n=[],r=2,o=e;for(let t=0;;){if("..."==o&&t>0&&t+3==e.length){r=1;break}let i=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(o);if(!i)throw new RangeError("Invalid path: "+e);if(n.push("*"==i[0]?"":'"'==i[0][0]?JSON.parse(i[0]):i[0]),t+=i[0].length,t==e.length)break;let s=e[t++];if(t==e.length&&"!"==s){r=0;break}if("/"!=s)throw new RangeError("Invalid path: "+e);o=e.slice(t)}let s=n.length-1,a=n[s];if(!a)throw new RangeError("Invalid path: "+e);let l=new lg(i,r,s>0?n.slice(0,s):null);t[a]=l.sort(t[a])}}return ag.add(t)}const ag=new Af;class lg{constructor(e,t,n,i){this.tags=e,this.mode=t,this.context=n,this.next=i}get opaque(){return 0==this.mode}get inherit(){return 1==this.mode}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}}function cg(e,t){let n=Object.create(null);for(let t of e)if(Array.isArray(t.tag))for(let e of t.tag)n[e.id]=t.class;else n[t.tag.id]=t.class;let{scope:i,all:r=null}=t||{};return{style:e=>{let t=r;for(let i of e)for(let e of i.set){let i=n[e.id];if(i){t=t?t+" "+i:i;break}}return t},scope:i}}function hg(e,t,n,i=0,r=e.length){let o=new ug(i,Array.isArray(t)?t:[t],n);o.highlightRange(e.cursor(),i,r,"",o.highlighters),o.flush(r)}lg.empty=new lg([],2,null);class ug{constructor(e,t,n){this.at=e,this.highlighters=t,this.span=n,this.class=""}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,n,i,r){let{type:o,from:s,to:a}=e;if(s>=n||a<=t)return;o.isTop&&(r=this.highlighters.filter((e=>!e.scope||e.scope(o))));let l=i,c=function(e){let t=e.type.prop(ag);for(;t&&t.context&&!e.matchContext(t.context);)t=t.next;return t||null}(e)||lg.empty,h=function(e,t){let n=null;for(let i of e){let e=i.style(t);e&&(n=n?n+" "+e:e)}return n}(r,c.tags);if(h&&(l&&(l+=" "),l+=h,1==c.mode&&(i+=(i?" ":"")+h)),this.startSpan(Math.max(t,s),l),c.opaque)return;let u=e.tree&&e.tree.prop(Af.mounted);if(u&&u.overlay){let o=e.node.enter(u.overlay[0].from+s,1),c=this.highlighters.filter((e=>!e.scope||e.scope(u.tree.type))),h=e.firstChild();for(let d=0,p=s;;d++){let f=d<u.overlay.length?u.overlay[d]:null,g=f?f.from+s:a,m=Math.max(t,p),y=Math.min(n,g);if(m<y&&h)for(;e.from<y&&(this.highlightRange(e,m,y,i,r),this.startSpan(Math.min(y,e.to),l),!(e.to>=g)&&e.nextSibling()););if(!f||g>n)break;p=f.to+s,p>t&&(this.highlightRange(o.cursor(),Math.max(t,f.from+s),Math.min(n,p),"",c),this.startSpan(Math.min(n,p),l))}h&&e.parent()}else if(e.firstChild()){u&&(i="");do{if(!(e.to<=t)){if(e.from>=n)break;this.highlightRange(e,t,n,i,r),this.startSpan(Math.min(n,e.to),l)}}while(e.nextSibling());e.parent()}}}const dg=ig.define,pg=dg(),fg=dg(),gg=dg(fg),mg=dg(fg),yg=dg(),vg=dg(yg),wg=dg(yg),bg=dg(),xg=dg(bg),kg=dg(),_g=dg(),Sg=dg(),Cg=dg(Sg),Eg=dg(),Mg={comment:pg,lineComment:dg(pg),blockComment:dg(pg),docComment:dg(pg),name:fg,variableName:dg(fg),typeName:gg,tagName:dg(gg),propertyName:mg,attributeName:dg(mg),className:dg(fg),labelName:dg(fg),namespace:dg(fg),macroName:dg(fg),literal:yg,string:vg,docString:dg(vg),character:dg(vg),attributeValue:dg(vg),number:wg,integer:dg(wg),float:dg(wg),bool:dg(yg),regexp:dg(yg),escape:dg(yg),color:dg(yg),url:dg(yg),keyword:kg,self:dg(kg),null:dg(kg),atom:dg(kg),unit:dg(kg),modifier:dg(kg),operatorKeyword:dg(kg),controlKeyword:dg(kg),definitionKeyword:dg(kg),moduleKeyword:dg(kg),operator:_g,derefOperator:dg(_g),arithmeticOperator:dg(_g),logicOperator:dg(_g),bitwiseOperator:dg(_g),compareOperator:dg(_g),updateOperator:dg(_g),definitionOperator:dg(_g),typeOperator:dg(_g),controlOperator:dg(_g),punctuation:Sg,separator:dg(Sg),bracket:Cg,angleBracket:dg(Cg),squareBracket:dg(Cg),paren:dg(Cg),brace:dg(Cg),content:bg,heading:xg,heading1:dg(xg),heading2:dg(xg),heading3:dg(xg),heading4:dg(xg),heading5:dg(xg),heading6:dg(xg),contentSeparator:dg(bg),list:dg(bg),quote:dg(bg),emphasis:dg(bg),strong:dg(bg),link:dg(bg),monospace:dg(bg),strikethrough:dg(bg),inserted:dg(),deleted:dg(),changed:dg(),invalid:dg(),meta:Eg,documentMeta:dg(Eg),annotation:dg(Eg),processingInstruction:dg(Eg),definition:ig.defineModifier("definition"),constant:ig.defineModifier("constant"),function:ig.defineModifier("function"),standard:ig.defineModifier("standard"),local:ig.defineModifier("local"),special:ig.defineModifier("special")};for(let e in Mg){let t=Mg[e];t instanceof ig&&(t.name=e)}var Ag;cg([{tag:Mg.link,class:"tok-link"},{tag:Mg.heading,class:"tok-heading"},{tag:Mg.emphasis,class:"tok-emphasis"},{tag:Mg.strong,class:"tok-strong"},{tag:Mg.keyword,class:"tok-keyword"},{tag:Mg.atom,class:"tok-atom"},{tag:Mg.bool,class:"tok-bool"},{tag:Mg.url,class:"tok-url"},{tag:Mg.labelName,class:"tok-labelName"},{tag:Mg.inserted,class:"tok-inserted"},{tag:Mg.deleted,class:"tok-deleted"},{tag:Mg.literal,class:"tok-literal"},{tag:Mg.string,class:"tok-string"},{tag:Mg.number,class:"tok-number"},{tag:[Mg.regexp,Mg.escape,Mg.special(Mg.string)],class:"tok-string2"},{tag:Mg.variableName,class:"tok-variableName"},{tag:Mg.local(Mg.variableName),class:"tok-variableName tok-local"},{tag:Mg.definition(Mg.variableName),class:"tok-variableName tok-definition"},{tag:Mg.special(Mg.variableName),class:"tok-variableName2"},{tag:Mg.definition(Mg.propertyName),class:"tok-propertyName tok-definition"},{tag:Mg.typeName,class:"tok-typeName"},{tag:Mg.namespace,class:"tok-namespace"},{tag:Mg.className,class:"tok-className"},{tag:Mg.macroName,class:"tok-macroName"},{tag:Mg.propertyName,class:"tok-propertyName"},{tag:Mg.operator,class:"tok-operator"},{tag:Mg.comment,class:"tok-comment"},{tag:Mg.meta,class:"tok-meta"},{tag:Mg.invalid,class:"tok-invalid"},{tag:Mg.punctuation,class:"tok-punctuation"}]);const Dg=new Af,Rg=new Af;class Og{constructor(e,t,n=[],i=""){this.data=e,this.name=i,Kc.prototype.hasOwnProperty("tree")||Object.defineProperty(Kc.prototype,"tree",{get(){return Ng(this)}}),this.parser=t,this.extension=[$g.of(this),Kc.languageData.of(((e,t,n)=>{let i=Tg(e,t,n),r=i.type.prop(Dg);if(!r)return[];let o=e.facet(r),s=i.type.prop(Rg);if(s){let r=i.resolve(t-i.from,n);for(let t of s)if(t.test(r,e)){let n=e.facet(t.facet);return"replace"==t.type?n:n.concat(o)}}return o}))].concat(n)}isActiveAt(e,t,n=-1){return Tg(e,t,n).type.prop(Dg)==this.data}findRegions(e){let t=e.facet($g);if((null==t?void 0:t.data)==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let n=[],i=(e,t)=>{if(e.prop(Dg)==this.data)return void n.push({from:t,to:t+e.length});let r=e.prop(Af.mounted);if(r){if(r.tree.prop(Dg)==this.data){if(r.overlay)for(let e of r.overlay)n.push({from:e.from+t,to:e.to+t});else n.push({from:t,to:t+e.length});return}if(r.overlay){let e=n.length;if(i(r.tree,r.overlay[0].from+t),n.length>e)return}}for(let n=0;n<e.children.length;n++){let r=e.children[n];r instanceof qf&&i(r,e.positions[n]+t)}};return i(Ng(e),0),n}get allowsNesting(){return!0}}function Tg(e,t,n){let i=e.facet($g),r=Ng(e).topNode;if(!i||i.allowsNesting)for(let e=r;e;e=e.enter(t,n,Pf.ExcludeBuffers))e.type.isTop&&(r=e);return r}function Ng(e){let t=e.field(Og.state,!1);return t?t.tree:qf.empty}Og.setState=Bc.define();class Pg{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let n=this.cursorPos-this.string.length;return e<n||t>=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-n,t-n)}}let qg=null;class Bg{constructor(e,t,n=[],i,r,o,s,a){this.parser=e,this.state=t,this.fragments=n,this.tree=i,this.treeLen=r,this.viewport=o,this.skipped=s,this.scheduleOn=a,this.parse=null,this.tempSkipped=[]}static create(e,t,n){return new Bg(e,t,[],qf.empty,0,n,[],null)}startParse(){return this.parser.startParse(new Pg(this.state.doc),this.fragments)}work(e,t){return null!=t&&t>=this.state.doc.length&&(t=void 0),this.tree!=qf.empty&&this.isDone(null!=t?t:this.state.doc.length)?(this.takeTree(),!0):this.withContext((()=>{var n;if("number"==typeof e){let t=Date.now()+e;e=()=>Date.now()>t}for(this.parse||(this.parse=this.startParse()),null!=t&&(null==this.parse.stoppedAt||this.parse.stoppedAt>t)&&t<this.state.doc.length&&this.parse.stopAt(t);;){let i=this.parse.advance();if(i){if(this.fragments=this.withoutTempSkipped(Zf.addTree(i,this.fragments,null!=this.parse.stoppedAt)),this.treeLen=null!==(n=this.parse.stoppedAt)&&void 0!==n?n:this.state.doc.length,this.tree=i,this.parse=null,!(this.treeLen<(null!=t?t:this.state.doc.length)))return!0;this.parse=this.startParse()}if(e())return!1}}))}takeTree(){let e,t;this.parse&&(e=this.parse.parsedPos)>=this.treeLen&&((null==this.parse.stoppedAt||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext((()=>{for(;!(t=this.parse.advance()););})),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(Zf.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=qg;qg=this;try{return e()}finally{qg=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=Lg(e,t.from,t.to);return e}changes(e,t){let{fragments:n,tree:i,treeLen:r,viewport:o,skipped:s}=this;if(this.takeTree(),!e.empty){let t=[];if(e.iterChangedRanges(((e,n,i,r)=>t.push({fromA:e,toA:n,fromB:i,toB:r}))),n=Zf.applyChanges(n,t),i=qf.empty,r=0,o={from:e.mapPos(o.from,-1),to:e.mapPos(o.to,1)},this.skipped.length){s=[];for(let t of this.skipped){let n=e.mapPos(t.from,1),i=e.mapPos(t.to,-1);n<i&&s.push({from:n,to:i})}}}return new Bg(this.parser,t,n,i,r,o,s,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let t=this.skipped.length;for(let t=0;t<this.skipped.length;t++){let{from:n,to:i}=this.skipped[t];n<e.to&&i>e.from&&(this.fragments=Lg(this.fragments,n,i),this.skipped.splice(t--,1))}return!(this.skipped.length>=t)&&(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends eg{createParse(t,n,i){let r=i[0].from,o=i[i.length-1].to;return{parsedPos:r,advance(){let t=qg;if(t){for(let e of i)t.tempSkipped.push(e);e&&(t.scheduleOn=t.scheduleOn?Promise.all([t.scheduleOn,e]):e)}return this.parsedPos=o,new qf(Of.none,[],[],o-r)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&0==t[0].from&&t[0].to>=e}static get(){return qg}}function Lg(e,t,n){return Zf.applyChanges(e,[{fromA:t,toA:n,fromB:t,toB:n}])}class Ig{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let t=this.context.changes(e.changes,e.state),n=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),t.viewport.to);return t.work(20,n)||t.takeTree(),new Ig(t)}static init(e){let t=Math.min(3e3,e.doc.length),n=Bg.create(e.facet($g).parser,e,{from:0,to:t});return n.work(20,t)||n.takeTree(),new Ig(n)}}Og.state=pc.define({create:Ig.init,update(e,t){for(let e of t.effects)if(e.is(Og.setState))return e.value;return t.startState.facet($g)!=t.state.facet($g)?Ig.init(t.state):e.apply(t)}});let Fg=e=>{let t=setTimeout((()=>e()),500);return()=>clearTimeout(t)};"undefined"!=typeof requestIdleCallback&&(Fg=e=>{let t=-1,n=setTimeout((()=>{t=requestIdleCallback(e,{timeout:400})}),100);return()=>t<0?clearTimeout(n):cancelIdleCallback(t)});const jg="undefined"!=typeof navigator&&(null===(Ag=navigator.scheduling)||void 0===Ag?void 0:Ag.isInputPending)?()=>navigator.scheduling.isInputPending():null,Vg=vd.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let t=this.view.state.field(Og.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(Og.state);t.tree==t.context.tree&&t.context.isDone(e.doc.length)||(this.working=Fg(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEnd<t&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=t+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:n,viewport:{to:i}}=this.view,r=n.field(Og.state);if(r.tree==r.context.tree&&r.context.isDone(i+1e5))return;let o=Date.now()+Math.min(this.chunkBudget,100,e&&!jg?Math.max(25,e.timeRemaining()-5):1e9),s=r.context.treeLen<i&&n.doc.length>i+1e3,a=r.context.work((()=>jg&&jg()||Date.now()>o),i+(s?0:1e5));this.chunkBudget-=Date.now()-t,(a||this.chunkBudget<=0)&&(r.context.takeTree(),this.view.dispatch({effects:Og.setState.of(new Ig(r.context))})),this.chunkBudget>0&&(!a||s)&&this.scheduleWork(),this.checkAsyncSchedule(r.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then((()=>this.scheduleWork())).catch((e=>fd(this.view.state,e))).then((()=>this.workScheduled--)),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),$g=sc.define({combine:e=>e.length?e[0]:null,enables:e=>[Og.state,Vg,vf.contentAttributes.compute([e],(t=>{let n=t.facet(e);return n&&n.name?{"data-language":n.name}:{}}))]});class zg{constructor(e,t){let n;function i(e){let t=fh.newName();return(n||(n=Object.create(null)))["."+t]=e,t}this.specs=e;const r="string"==typeof t.all?t.all:t.all?i(t.all):void 0,o=t.scope;this.scope=o instanceof Og?e=>e.prop(Dg)==o.data:o?e=>e==o:void 0,this.style=cg(e.map((e=>({tag:e.tag,class:e.class||i(Object.assign({},e,{tag:null}))}))),{all:r}).style,this.module=n?new fh(n):null,this.themeType=t.themeType}static define(e,t){return new zg(e,t||{})}}const Hg=sc.define(),Wg=sc.define({combine:e=>e.length?[e[0]]:null});function Ug(e){let t=e.facet(Hg);return t.length?t:e.facet(Wg)}class Gg{constructor(e){this.markCache=Object.create(null),this.tree=Ng(e.state),this.decorations=this.buildDeco(e,Ug(e.state)),this.decoratedTo=e.viewport.to}update(e){let t=Ng(e.state),n=Ug(e.state),i=n!=Ug(e.startState),{viewport:r}=e.view,o=e.changes.mapPos(this.decoratedTo,1);t.length<r.to&&!i&&t.type==this.tree.type&&o>=r.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=o):(t!=this.tree||e.viewportChanged||i)&&(this.tree=t,this.decorations=this.buildDeco(e.view,n),this.decoratedTo=r.to)}buildDeco(e,t){if(!t||!this.tree.length)return ku.none;let n=new eh;for(let{from:i,to:r}of e.visibleRanges)hg(this.tree,t,((e,t,i)=>{n.add(e,t,this.markCache[i]||(this.markCache[i]=ku.mark({class:i})))}),i,r);return n.finish()}}const Kg=wc.high(vd.fromClass(Gg,{decorations:e=>e.decorations}));Mg.meta,Mg.link,Mg.heading,Mg.emphasis,Mg.strong,Mg.strikethrough,Mg.keyword,Mg.atom,Mg.bool,Mg.url,Mg.contentSeparator,Mg.labelName,Mg.literal,Mg.inserted,Mg.string,Mg.deleted,Mg.regexp,Mg.escape,Mg.string,Mg.variableName,Mg.variableName,Mg.typeName,Mg.namespace,Mg.className,Mg.variableName,Mg.macroName,Mg.propertyName,Mg.comment,Mg.invalid;const Xg=Object.create(null),Yg=[Of.none],Jg=[],Qg=Object.create(null),Zg=Object.create(null);for(let[e,t]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])Zg[e]=tm(Xg,t);function em(e,t){Jg.indexOf(e)>-1||(Jg.push(e),console.warn(t))}function tm(e,t){let n=[];for(let i of t.split(" ")){let t=[];for(let n of i.split(".")){let i=e[n]||Mg[n];i?"function"==typeof i?t.length?t=t.map(i):em(n,`Modifier ${n} used at start of tag`):t.length?em(n,`Tag ${n} used as modifier`):t=Array.isArray(i)?i:[i]:em(n,`Unknown highlighting tag ${n}`)}for(let e of t)n.push(e)}if(!n.length)return 0;let i=t.replace(/ /g,"_"),r=i+" "+n.map((e=>e.id)),o=Qg[r];if(o)return o.id;let s=Qg[r]=Of.define({id:Yg.length,name:i,props:[sg({[i]:n})]});return Yg.push(s),s.id}Pu.RTL,Pu.LTR;const nm=sc.define({combine:e=>Object.assign({sources:e.map((e=>e.source)).filter((e=>null!=e))},function(e,t,n={}){let i={};for(let t of e)for(let e of Object.keys(t)){let r=t[e],o=i[e];if(void 0===o)i[e]=r;else if(o===r||void 0===r);else{if(!Object.hasOwnProperty.call(n,e))throw new Error("Config merge conflict for field "+e);i[e]=n[e](o,r)}}for(let e in t)void 0===i[e]&&(i[e]=t[e]);return i}(e.map((e=>e.config)),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{needsRefresh:(e,t)=>e?t?n=>e(n)||t(n):e:t}))});function im(e){const t=[];return e.iterate({enter:e=>{const n=e.node;if(!n.type.isError)return;const i=n.parent,r=rm(n),o={from:n.from,to:n.to,severity:"error",type:"Syntax Error"};if(n.from!==n.to)o.message=`Unrecognized token in <${i.name}>`;else if(r)o.message=`Unrecognized token <${r.name}> in <${i.name}>`,o.to=r.to;else{const e=i.enterUnfinishedNodesBefore(n.to);o.message=`Incomplete <${(e||i).name}>`}t.push(o)}}),t}function rm(e){return e?e.nextSibling||rm(e.parent):null}var om={create:e=>({enter(t){if("FilterExpression"!==t.name)return;const n=e.readContent(t.from,t.to);if(/\[\s*0\s*\]$/.test(n)){const{from:i,to:r}=t;e.report({from:i,to:r,message:"First item is accessed via [1]",severity:"warning",type:"first-item",actions:[{name:"fix",apply(t,o=i,s=r){e.updateContent(o,s,n.replace(/\[\s*0\s*\]$/,"[1]"))}}]})}}})};const sm=[om];function am(e){const{readContent:t,syntaxTree:n,updateContent:i}=e,r=[],o={readContent:t,report:e=>{r.push(e)},updateContent:i},s=sm.map((e=>e.create(o)));return n.iterate({enter:e=>{for(const t of s)t.enter&&t.enter(e)},leave:e=>{for(const t of s)t.leave&&t.leave(e)}}),r}!function(e,t={}){nm.of({source:e,config:t})}((e=>{if(0===e.state.doc.length)return[];const t=Ng(e.state),n=(i={syntaxTree:t,readContent:(t,n)=>e.state.sliceDoc(t,n),updateContent:(t,n,i)=>e.dispatch({changes:{from:t,to:n,insert:i}})},[...im(i.syntaxTree),...am(i)]);var i;return n.map((e=>({...e,source:e.type})))})),vf.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}}),vf.baseTheme({"& .variableName":{color:"#10f"},"& .number":{color:"#164"},"& .string":{color:"#a11"},"& .bool":{color:"#219"},"& .function":{color:"#aa3731",fontWeight:"bold"},"& .control":{color:"#708"}}),function(e,t){let n,i=[Kg];e instanceof zg&&(e.module&&i.push(vf.styleModule.of(e.module)),n=e.themeType),n?i.push(Hg.computeN([vf.darkTheme],(t=>t.facet(vf.darkTheme)==("dark"==n)?[e]:[]))):i.push(Hg.of(e))}(zg.define([{tag:Mg.variableName,class:"variableName"},{tag:Mg.name,class:"variableName"},{tag:Mg.number,class:"number"},{tag:Mg.string,class:"string"},{tag:Mg.bool,class:"bool"},{tag:Mg.function(Mg.variableName),class:"function"},{tag:Mg.function(Mg.special(Mg.variableName)),class:"function"},{tag:Mg.controlKeyword,class:"control"},{tag:Mg.operatorKeyword,class:"control"}])),sc.define(),sc.define(),sc.define(),sc.define();function lm(e){const{name:t,description:n}=e,i=t.match(/^([\w\s]+)\((.*)\)$/),r=i[1],o=i[2],s=o?o.split(", ").map((e=>({name:e}))):[];return{name:r,type:"function",params:s,info:()=>Lt(`<div class="description">${n}<div>`),boost:0}}[{name:"not(negand)",description:'<p>Returns the logical negation of the given value.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">not(negand: boolean): boolean\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">not(true)\n// false\n\nnot(null)\n// null\n</code></pre>\n'},{name:"is defined(value)",description:'<p><em>Camunda Extension</em></p>\n<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>.\nOtherwise, the function returns <code>true</code>.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">is defined(value: Any): boolean\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">is defined(1)\n// true\n\nis defined(null)\n// false\n\nis defined(x)\n// false - if no variable &quot;x&quot; exists\n\nis defined(x.y)\n// false - if no variable &quot;x&quot; exists or it doesn&#39;t have a property &quot;y&quot;\n</code></pre>\n<p>:::caution Breaking change</p>\n<p>This function worked differently in previous versions. It returned <code>true</code> if the value was <code>null</code>.\nSince this version, the function returns <code>false</code> if the value is <code>null</code>.</p>\n<p>:::</p>\n'},{name:"get or else(value, default)",description:'<p><em>Camunda Extension</em></p>\n<p>Return the provided value parameter if not <code>null</code>, otherwise return the default parameter</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">get or else(value: Any, default: Any): Any\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">get or else(&quot;this&quot;, &quot;default&quot;)\n// &quot;this&quot;\n\nget or else(null, &quot;default&quot;)\n// &quot;default&quot;\n\nget or else(null, null)\n// null\n</code></pre>\n'},{name:"assert(value, condition)",description:'<p><em>Camunda Extension</em></p>\n<p>Verify that the given condition is met. If the condition is <code>true</code>, the function returns the value.\nOtherwise, the evaluation fails with an error.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">assert(value: Any, condition: Any)\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">assert(x, x != null)\n// &quot;value&quot; - if x is &quot;value&quot;\n// error - if x is null or doesn&#39;t exist\n\nassert(x, x &gt;= 0)\n// 4 - if x is 4\n// error - if x is less than zero\n</code></pre>\n'},{name:"assert(value, condition, cause)",description:'<p><em>Camunda Extension</em></p>\n<p>Verify that the given condition is met. If the condition is <code>true</code>, the function returns the value.\nOtherwise, the evaluation fails with an error containing the given message.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">assert(value: Any, condition: Any, cause: String)\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">assert(x, x != null, &quot;&#39;x&#39; should not be null&quot;)\n// &quot;value&quot; - if x is &quot;value&quot;\n// error(&#39;x&#39; should not be null) - if x is null or doesn&#39;t exist\n\nassert(x, x &gt;= 0, &quot;&#39;x&#39; should be positive&quot;)\n// 4 - if x is 4\n// error(&#39;x&#39; should be positive) - if x is less than zero\n</code></pre>\n'},{name:"get value(context, key)",description:'<p>Returns the value of the context entry with the given key.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">get value(context: context, key: string): Any\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">get value({foo: 123}, &quot;foo&quot;)\n// 123\n\nget value({a: 1}, &quot;b&quot;)\n// null\n</code></pre>\n'},{name:"get value(context, keys)",description:'<p><em>Camunda Extension</em></p>\n<p>Returns the value of the context entry for a context path defined by the given keys.</p>\n<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>\n<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>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">get value(context: context, keys: list&lt;string&gt;): Any\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">get value({x:1, y: {z:0}}, [&quot;y&quot;, &quot;z&quot;])\n// 0\n\nget value({x: {y: {z:0}}}, [&quot;x&quot;, &quot;y&quot;])\n// {z:0}\n\nget value({a: {b: 3}}, [&quot;b&quot;])\n// null\n</code></pre>\n'},{name:"get entries(context)",description:'<p>Returns the entries of the context as a list of key-value-pairs.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">get entries(context: context): list&lt;context&gt;\n</code></pre>\n<p>The return value is a list of contexts. Each context contains two entries for &quot;key&quot; and &quot;value&quot;.</p>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">get entries({foo: 123})\n// [{key: &quot;foo&quot;, value: 123}]\n</code></pre>\n'},{name:"context put(context, key, value)",description:'<p>Adds a new entry with the given key and value to the context. Returns a new context that includes the entry.</p>\n<p>If an entry for the same key already exists in the context, it overrides the value.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">context put(context: context, key: string, value: Any): context\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">context put({x:1}, &quot;y&quot;, 2)\n// {x:1, y:2}\n</code></pre>\n<p>:::info\nThe function <code>context put()</code> replaced the previous function <code>put()</code> (Camunda Extension). The\nprevious function is deprecated and should not be used anymore.\n:::</p>\n'},{name:"context put(context, keys, value)",description:'<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>\n<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>\n<p>If an entry for the same keys already exists in the context, it overrides the value.</p>\n<p>If <code>keys</code> are empty, it returns <code>null</code>.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">context put(context: context, keys: list&lt;string&gt;, value: Any): context\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">context put({x:1}, [&quot;y&quot;], 2)\n// {x:1, y:2}\n\ncontext put({x:1, y: {z:0}}, [&quot;y&quot;, &quot;z&quot;], 2)\n// {x:1, y: {z:2}}\n\ncontext put({x:1}, [&quot;y&quot;, &quot;z&quot;], 2)\n// {x:1, y: {z:2}}\n</code></pre>\n'},{name:"context merge(contexts)",description:'<p>Union the given contexts. Returns a new context that includes all entries of the given contexts.</p>\n<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>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">context merge(contexts: list&lt;context&gt;): context\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">context merge([{x:1}, {y:2}])\n// {x:1, y:2}\n\ncontext merge([{x:1, y: 0}, {y:2}])\n// {x:1, y:2}\n</code></pre>\n<p>:::info\nThe function <code>context merge()</code> replaced the previous function <code>put all()</code> (Camunda Extension). The\nprevious function is deprecated and should not be used anymore.\n:::</p>\n'},{name:"string(from)",description:'<p>Returns the given value as a string representation.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">string(from: Any): string\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">string(1.1)\n// &quot;1.1&quot;\n\nstring(date(&quot;2012-12-25&quot;))\n// &quot;2012-12-25&quot;\n</code></pre>\n'},{name:"number(from)",description:'<p>Parses the given string to a number.</p>\n<p>Returns <code>null</code> if the string is not a number.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">number(from: string): number\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">number(&quot;1500.5&quot;)\n// 1500.5\n</code></pre>\n'},{name:"context(entries)",description:'<p>Constructs a context of the given list of key-value pairs. It is the reverse function to <a href="feel-built-in-functions-context.md#get-entriescontext">get entries()</a>.</p>\n<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>\n<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>\n<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>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">context(entries: list&lt;context&gt;): context\n</code></pre>\n<p><strong>Examples</strong></p>\n<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}])\n// {a:1, b:2}\n</code></pre>\n'},{name:"date(from)",description:'<p>Returns a date from the given value.</p>\n<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\nonly 30 days.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">date(from: string): date\n</code></pre>\n<p>Parses the given string into a date.</p>\n<pre><code class="language-feel">date(from: date and time): date\n</code></pre>\n<p>Extracts the date component from the given date and time.</p>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">date(&quot;2018-04-29&quot;)\n// date(&quot;2018-04-29&quot;)\n\ndate(date and time(&quot;2012-12-25T11:00:00&quot;))\n// date(&quot;2012-12-25&quot;)\n</code></pre>\n'},{name:"date(year, month, day)",description:'<p>Returns a date from the given components.</p>\n<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\nJune has only 30 days.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">date(year: number, month: number, day: number): date\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">date(2012, 12, 25)\n// date(&quot;2012-12-25&quot;)\n</code></pre>\n'},{name:"time(from)",description:'<p>Returns a time from the given value.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">time(from: string): time\n</code></pre>\n<p>Parses the given string into a time.</p>\n<pre><code class="language-feel">time(from: date and time): time\n</code></pre>\n<p>Extracts the time component from the given date and time.</p>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">time(&quot;12:00:00&quot;)\n// time(&quot;12:00:00&quot;)\n\ntime(date and time(&quot;2012-12-25T11:00:00&quot;))\n// time(&quot;11:00:00&quot;)\n</code></pre>\n'},{name:"time(hour, minute, second)",description:'<p>Returns a time from the given components.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">time(hour: number, minute: number, second: number): time\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">time(23, 59, 0)\n// time(&quot;23:59:00&quot;)\n</code></pre>\n'},{name:"time(hour, minute, second, offset)",description:'<p>Returns a time from the given components, including a timezone offset.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">time(hour: number, minute: number, second: number, offset: days and time duration): time\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">time(14, 30, 0, duration(&quot;PT1H&quot;))\n// time(&quot;14:30:00+01:00&quot;)\n</code></pre>\n'},{name:"date and time(from)",description:'<p>Parses the given string into a date and time.</p>\n<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\nJune has only 30 days.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">date and time(from: string): date and time\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">date and time(&quot;2018-04-29T09:30:00&quot;)\n// date and time(&quot;2018-04-29T09:30:00&quot;)\n</code></pre>\n'},{name:"date and time(date, time)",description:'<p>Returns a date and time from the given components.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">date and time(date: date, time: time): date and time\n</code></pre>\n<pre><code class="language-feel">date and time(date: date and time, time: time): date and time\n</code></pre>\n<p>Returns a date and time value that consists of the date component of <code>date</code> combined with <code>time</code>.</p>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">date and time(date(&quot;2012-12-24&quot;),time(&quot;T23:59:00&quot;))\n// date and time(&quot;2012-12-24T23:59:00&quot;)\n\ndate and time(date and time(&quot;2012-12-25T11:00:00&quot;),time(&quot;T23:59:00&quot;))\n// date and time(&quot;2012-12-25T23:59:00&quot;)\n</code></pre>\n'},{name:"date and time(date, timezone)",description:'<p><em>Camunda Extension</em></p>\n<p>Returns the given date and time value at the given timezone.</p>\n<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>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">date and time(date: date and time, timezone: string): date and time\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">date and time(@&quot;2020-07-31T14:27:30@Europe/Berlin&quot;, &quot;America/Los_Angeles&quot;)\n// date and time(&quot;2020-07-31T05:27:30@America/Los_Angeles&quot;)\n\ndate and time(@&quot;2020-07-31T14:27:30&quot;, &quot;Z&quot;)\n// date and time(&quot;2020-07-31T12:27:30Z&quot;)\n</code></pre>\n'},{name:"duration(from)",description:'<p>Parses the given string into a duration. The duration is either a days and time duration or a years and months duration.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">duration(from: string): days and time duration\n</code></pre>\n<pre><code class="language-feel">duration(from: string): years and months duration\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">duration(&quot;P5D&quot;)\n// duration(&quot;P5D&quot;)\n\nduration(&quot;P32Y&quot;)\n// duration(&quot;P32Y&quot;)\n</code></pre>\n'},{name:"years and months duration(from, to)",description:'<p>Returns the years and months duration between <code>from</code> and <code>to</code>.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">years and months duration(from: date, to: date): years and months duration\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">years and months duration(date(&quot;2011-12-22&quot;), date(&quot;2013-08-24&quot;))\n// duration(&quot;P1Y8M&quot;)\n</code></pre>\n'},{name:"list contains(list, element)",description:'<p>Returns <code>true</code> if the given list contains the element. Otherwise, returns <code>false</code>.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">list contains(list: list, element: Any): boolean\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">list contains([1,2,3], 2)\n// true\n</code></pre>\n'},{name:"count(list)",description:'<p>Returns the number of elements of the given list.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">count(list: list): number\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">count([1,2,3])\n// 3\n</code></pre>\n'},{name:"min(list)",description:'<p>Returns the minimum of the given list.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">min(list: list): Any\n</code></pre>\n<p>All elements in <code>list</code> should have the same type and be comparable.</p>\n<p>The parameter <code>list</code> can be passed as a list or as a sequence of elements.</p>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">min([1,2,3])\n// 1\n\nmin(1,2,3)\n// 1\n</code></pre>\n'},{name:"max(list)",description:'<p>Returns the maximum of the given list.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">max(list: list): Any\n</code></pre>\n<p>All elements in <code>list</code> should have the same type and be comparable.</p>\n<p>The parameter <code>list</code> can be passed as a list or as a sequence of elements.</p>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">max([1,2,3])\n// 3\n\nmax(1,2,3)\n// 3\n</code></pre>\n'},{name:"sum(list)",description:'<p>Returns the sum of the given list of numbers.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">sum(list: list&lt;number&gt;): number\n</code></pre>\n<p>The parameter <code>list</code> can be passed as a list or as a sequence of elements.</p>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">sum([1,2,3])\n// 6\n\nsum(1,2,3)\n// 6\n</code></pre>\n'},{name:"product(list)",description:'<p>Returns the product of the given list of numbers.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">product(list: list&lt;number&gt;): number\n</code></pre>\n<p>The parameter <code>list</code> can be passed as a list or as a sequence of elements.</p>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">product([2, 3, 4])\n// 24\n\nproduct(2, 3, 4)\n// 24\n</code></pre>\n'},{name:"mean(list)",description:'<p>Returns the arithmetic mean (i.e. average) of the given list of numbers.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">mean(list: list&lt;number&gt;): number\n</code></pre>\n<p>The parameter <code>list</code> can be passed as a list or as a sequence of elements.</p>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">mean([1,2,3])\n// 2\n\nmean(1,2,3)\n// 2\n</code></pre>\n'},{name:"median(list)",description:'<p>Returns the median element of the given list of numbers.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">median(list: list&lt;number&gt;): number\n</code></pre>\n<p>The parameter <code>list</code> can be passed as a list or as a sequence of elements.</p>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">median(8, 2, 5, 3, 4)\n// 4\n\nmedian([6, 1, 2, 3])\n// 2.5\n</code></pre>\n'},{name:"stddev(list)",description:'<p>Returns the standard deviation of the given list of numbers.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">stddev(list: list&lt;number&gt;): number\n</code></pre>\n<p>The parameter <code>list</code> can be passed as a list or as a sequence of elements.</p>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">stddev(2, 4, 7, 5)\n// 2.0816659994661326\n\nstddev([2, 4, 7, 5])\n// 2.0816659994661326\n</code></pre>\n'},{name:"mode(list)",description:'<p>Returns the mode of the given list of numbers.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">mode(list: list&lt;number&gt;): number\n</code></pre>\n<p>The parameter <code>list</code> can be passed as a list or as a sequence of elements.</p>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">mode(6, 3, 9, 6, 6)\n// [6]\n\nmode([6, 1, 9, 6, 1])\n// [1, 6]\n</code></pre>\n'},{name:"all(list)",description:'<p>Returns <code>false</code> if any element of the given list is <code>false</code>. Otherwise, returns <code>true</code>.</p>\n<p>If the given list is empty, it returns <code>true</code>.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">all(list: list&lt;boolean&gt;): boolean\n</code></pre>\n<p>The parameter <code>list</code> can be passed as a list or as a sequence of elements.</p>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">all([true,false])\n// false\n\nall(false,null,true)\n// false\n</code></pre>\n<p>:::info\nThe function <code>all()</code> replaced the previous function <code>and()</code>. The previous function is deprecated and\nshould not be used anymore.\n:::</p>\n'},{name:"any(list)",description:'<p>Returns <code>true</code> if any element of the given list is <code>true</code>. Otherwise, returns <code>false</code>.</p>\n<p>If the given list is empty, it returns <code>false</code>.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">any(list: list&lt;boolean&gt;): boolean\n</code></pre>\n<p>The parameter <code>list</code> can be passed as a list or as a sequence of elements.</p>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">any([false,true])\n// true\n\nany(false,null,true)\n// true\n</code></pre>\n<p>:::info\nThe function <code>any()</code> replaced the previous function <code>or()</code>. The previous function is deprecated and\nshould not be used anymore.\n:::</p>\n'},{name:"sublist(list, start position)",description:'<p>Returns a partial list of the given value starting at <code>start position</code>.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">sublist(list: list, start position: number): list\n</code></pre>\n<p>The <code>start position</code> starts at the index <code>1</code>. The last position is <code>-1</code>.</p>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">sublist([1,2,3], 2)\n// [2,3]\n</code></pre>\n'},{name:"sublist(list, start position, length)",description:'<p>Returns a partial list of the given value starting at <code>start position</code>.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">sublist(list: list, start position: number, length: number): list\n</code></pre>\n<p>The <code>start position</code> starts at the index <code>1</code>. The last position is <code>-1</code>.</p>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">sublist([1,2,3], 1, 2)\n// [1,2]\n</code></pre>\n'},{name:"append(list, items)",description:'<p>Returns the given list with all <code>items</code> appended.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">append(list: list, items: Any): list\n</code></pre>\n<p>The parameter <code>items</code> can be a single element or a sequence of elements.</p>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">append([1], 2, 3)\n// [1,2,3]\n</code></pre>\n'},{name:"concatenate(lists)",description:'<p>Returns a list that includes all elements of the given lists.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">concatenate(lists: list): list\n</code></pre>\n<p>The parameter <code>lists</code> is a sequence of lists.</p>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">concatenate([1,2],[3])\n// [1,2,3]\n\nconcatenate([1],[2],[3])\n// [1,2,3]\n</code></pre>\n'},{name:"insert before(list, position, newItem)",description:'<p>Returns the given list with <code>newItem</code> inserted at <code>position</code>.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">insert before(list: list, position: number, newItem: Any): list\n</code></pre>\n<p>The <code>position</code> starts at the index <code>1</code>. The last position is <code>-1</code>.</p>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">insert before([1,3],1,2)\n// [2,1,3]\n</code></pre>\n'},{name:"remove(list, position)",description:'<p>Returns the given list without the element at <code>position</code>.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">remove(list: list, position: number): list\n</code></pre>\n<p>The <code>position</code> starts at the index <code>1</code>. The last position is <code>-1</code>.</p>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">remove([1,2,3], 2)\n// [1,3]\n</code></pre>\n'},{name:"reverse(list)",description:'<p>Returns the given list in revered order.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">reverse(list: list): list\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">reverse([1,2,3])\n// [3,2,1]\n</code></pre>\n'},{name:"index of(list, match)",description:'<p>Returns an ascending list of positions containing <code>match</code>.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">index of(list: list, match: Any): list&lt;number&gt;\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">index of([1,2,3,2],2)\n// [2,4]\n</code></pre>\n'},{name:"union(list)",description:'<p>Returns a list that includes all elements of the given lists without duplicates.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">union(list: list): list\n</code></pre>\n<p>The parameter <code>list</code> is a sequence of lists.</p>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">union([1,2],[2,3])\n// [1,2,3]\n</code></pre>\n'},{name:"distinct values(list)",description:'<p>Returns the given list without duplicates.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">distinct values(list: list): list\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">distinct values([1,2,3,2,1])\n// [1,2,3]\n</code></pre>\n'},{name:"duplicate values(list)",description:'<p><em>Camunda Extension</em></p>\n<p>Returns all duplicate values of the given list.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">duplicate values(list: list): list\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">duplicate values([1,2,3,2,1])\n// [1,2]\n</code></pre>\n'},{name:"flatten(list)",description:'<p>Returns a list that includes all elements of the given list without nested lists.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">flatten(list: list): list\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">flatten([[1,2],[[3]], 4])\n// [1,2,3,4]\n</code></pre>\n'},{name:"sort(list, precedes)",description:'<p>Returns the given list sorted by the <code>precedes</code> function.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">sort(list: list, precedes: function&lt;(Any, Any) -&gt; boolean&gt;): list\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">sort(list: [3,1,4,5,2], precedes: function(x,y) x &lt; y)\n// [1,2,3,4,5]\n</code></pre>\n'},{name:"string join(list)",description:'<p>Joins a list of strings into a single string. This is similar to\nJava&#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>\nfunction.</p>\n<p>If an item of the list is <code>null</code>, the item is ignored for the result string. If an item is\nneither a string nor <code>null</code>, the function returns <code>null</code> instead of a string.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">string join(list: list&lt;string&gt;): string\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">string join([&quot;a&quot;,&quot;b&quot;,&quot;c&quot;])\n// &quot;abc&quot;\n\nstring join([&quot;a&quot;,null,&quot;c&quot;])\n// &quot;ac&quot;\n\nstring join([])\n// &quot;&quot;\n</code></pre>\n'},{name:"string join(list, delimiter)",description:'<p>Joins a list of strings into a single string. This is similar to\nJava&#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>\nfunction.</p>\n<p>If an item of the list is <code>null</code>, the item is ignored for the result string. If an item is\nneither a string nor <code>null</code>, the function returns <code>null</code> instead of a string.</p>\n<p>The resulting string contains a <code>delimiter</code> between each element.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">string join(list: list&lt;string&gt;, delimiter: string): string\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">string join([&quot;a&quot;], &quot;X&quot;)\n// &quot;a&quot;\n\nstring join([&quot;a&quot;,&quot;b&quot;,&quot;c&quot;], &quot;, &quot;)\n// &quot;a, b, c&quot;\n</code></pre>\n'},{name:"string join(list, delimiter, prefix, suffix)",description:'<p><em>Camunda Extension</em></p>\n<p>Joins a list of strings into a single string. This is similar to\nJava&#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>\nfunction.</p>\n<p>If an item of the list is <code>null</code>, the item is ignored for the result string. If an item is\nneither a string nor <code>null</code>, the function returns <code>null</code> instead of a string.</p>\n<p>The resulting string starts with <code>prefix</code>, contains a <code>delimiter</code> between each element, and ends\nwith <code>suffix</code>.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">string join(list: list&lt;string&gt;, delimiter: string, prefix: string, suffix: string): string\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">string join([&quot;a&quot;,&quot;b&quot;,&quot;c&quot;], &quot;, &quot;, &quot;[&quot;, &quot;]&quot;)\n// &quot;[a, b, c]&quot;\n</code></pre>\n'},{name:"is empty(list)",description:'<p><em>Camunda Extension</em></p>\n<p>Returns <code>true</code> if the given list is empty. Otherwise, returns <code>false</code>.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">is empty(list: list): boolean\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">is empty([])\n// true\n\nis empty([1,2,3])\n// false\n</code></pre>\n'},{name:"partition(list, size)",description:'<p><em>Camunda Extension</em></p>\n<p>Returns consecutive sublists of a list, each of the same size (the final list may be smaller).</p>\n<p>If <code>size</code> is less than <code>0</code>, it returns <code>null</code>.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">partition(list: list, size: number): list\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">partition([1,2,3,4,5], 2)\n// [[1,2], [3,4], [5]]\n\npartition([], 2)\n// []\n\npartition([1,2], 0)\n// null\n</code></pre>\n'},{name:"decimal(n, scale)",description:'<p>Rounds the given value at the given scale.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">decimal(n: number, scale: number): number\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">decimal(1/3, 2)\n// .33\n\ndecimal(1.5, 0)\n// 2\n</code></pre>\n'},{name:"floor(n)",description:'<p>Rounds the given value with rounding mode flooring.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">floor(n: number): number\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">floor(1.5)\n// 1\n\nfloor(-1.5)\n// -2\n</code></pre>\n'},{name:"floor(n, scale)",description:'<p>Rounds the given value with rounding mode flooring at the given scale.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">floor(n: number, scale: number): number\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">floor(-1.56, 1)\n// -1.6\n</code></pre>\n'},{name:"ceiling(n)",description:'<p>Rounds the given value with rounding mode ceiling.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">ceiling(n: number): number\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">ceiling(1.5)\n// 2\n\nceiling(-1.5)\n// -1\n</code></pre>\n'},{name:"ceiling(n, scale)",description:'<p>Rounds the given value with rounding mode ceiling at the given scale.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">ceiling(n: number, scale: number): number\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">ceiling(-1.56, 1)\n// -1.5\n</code></pre>\n'},{name:"round up(n, scale)",description:'<p>Rounds the given value with the rounding mode round-up at the given scale.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">round up(n: number, scale: number): number\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">round up(5.5)\n// 6\n\nround up(-5.5)\n// -6\n\nround up(1.121, 2)\n// 1.13\n\nround up(-1.126, 2)\n// -1.13\n</code></pre>\n'},{name:"round down(n, scale)",description:'<p>Rounds the given value with the rounding mode round-down at the given scale.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">round down(n: number, scale: number): number\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">round down(5.5, 0)\n// 5\n\nround down (-5.5, 0)\n// -5\n\nround down (1.121, 2)\n// 1.12\n\nround down (-1.126, 2)\n// -1.12\n</code></pre>\n'},{name:"round half up(n, scale)",description:'<p>Rounds the given value with the rounding mode round-half-up at the given scale.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">round half up(n: number, scale: number): number\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">round half up(5.5, 0)\n// 6\n\nround half up(-5.5, 0)\n// -6\n\nround half up(1.121, 2)\n// 1.12\n\nround half up(-1.126, 2)\n// -1.13\n</code></pre>\n'},{name:"round half down(n, scale)",description:'<p>Rounds the given value with the rounding mode round-half-down at the given scale.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">round half down(n: number, scale: number): number\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">round half down (5.5, 0)\n// 5\n\nround half down (-5.5, 0)\n// -5\n\nround half down (1.121, 2)\n// 1.12\n\nround half down (-1.126, 2)\n// -1.13\n</code></pre>\n'},{name:"abs(number)",description:'<p>Returns the absolute value of the given numeric value.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">abs(number: number): number\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">abs(10)\n// 10\n\nabs(-10)\n// 10\n</code></pre>\n'},{name:"modulo(dividend, divisor)",description:'<p>Returns the remainder of the division of dividend by divisor.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">modulo(dividend: number, divisor: number): number\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">modulo(12, 5)\n// 2\n</code></pre>\n'},{name:"sqrt(number)",description:'<p>Returns the square root of the given value.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">sqrt(number: number): number\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">sqrt(16)\n// 4\n</code></pre>\n'},{name:"log(number)",description:'<p>Returns the natural logarithm (base e) of the given value.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">log(number: number): number\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">log(10)\n// 2.302585092994046\n</code></pre>\n'},{name:"exp(number)",description:'<p>Returns the Euler’s number e raised to the power of the given number .</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">exp(number: number): number\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">exp(5)\n// 148.4131591025766\n</code></pre>\n'},{name:"odd(number)",description:'<p>Returns <code>true</code> if the given value is odd. Otherwise, returns <code>false</code>.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">odd(number: number): boolean\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">odd(5)\n// true\n\nodd(2)\n// false\n</code></pre>\n'},{name:"even(number)",description:'<p>Returns <code>true</code> if the given is even. Otherwise, returns <code>false</code>.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">even(number: number): boolean\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">even(5)\n// false\n\neven(2)\n// true\n</code></pre>\n'},{name:"random number()",description:'<p><em>Camunda Extension</em></p>\n<p>Returns a random number between <code>0</code> and <code>1</code>.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">random number(): number\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">random number()\n// 0.9701618132579795\n</code></pre>\n'},{name:"before(point1, point2)",description:'<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">before(point1: Any, point2: Any): boolean\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">before(1, 10)\n// true\n\nbefore(10, 1)\n// false\n</code></pre>\n'},{name:"before(range, point)",description:'<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">before(range: range, point: Any): boolean\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">before([1..5], 10)\n// true\n</code></pre>\n'},{name:"before(point, range)",description:'<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">before(point: Any, range: range): boolean\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">before(1, [2..5])\n// true\n</code></pre>\n'},{name:"before(range1, range2)",description:'<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">before(range1: range, range2: range): boolean\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">before([1..5], [6..10])\n// true\n\nbefore([1..5),[5..10])\n// true\n</code></pre>\n'},{name:"after(point1, point2)",description:'<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">after(point1: Any, point2: Any): boolean\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">after(10, 1)\n// true\n\nafter(1, 10)\n// false\n</code></pre>\n'},{name:"after(range, point)",description:'<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">after(range: range, point: Any): boolean\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">after([1..5], 10)\n// false\n</code></pre>\n'},{name:"after(point, range)",description:'<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">after(point: Any, range: range): boolean\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">after(12, [2..5])\n// true\n</code></pre>\n'},{name:"after(range1, range2)",description:'<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">after(range1: range, range2: range): boolean\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">after([6..10], [1..5])\n// true\n\nafter([5..10], [1..5))\n// true\n</code></pre>\n'},{name:"meets(range1, range2)",description:'<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">meets(range1: range, range2: range): boolean\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">meets([1..5], [5..10])\n// true\n\nmeets([1..3], [4..6])\n// false\n\nmeets([1..3], [3..5])\n// true\n\nmeets([1..5], (5..8])\n// false\n</code></pre>\n'},{name:"met by(range1, range2)",description:'<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">met by(range1: range, range2: range): boolean\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">met by([5..10], [1..5])\n// true\n\nmet by([3..4], [1..2])\n// false\n\nmet by([3..5], [1..3])\n// true\n\nmet by((5..8], [1..5))\n// false\n\nmet by([5..10], [1..5))\n// false\n</code></pre>\n'},{name:"overlaps(range1, range2)",description:'<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">overlaps(range1: range, range2: range): boolean\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">overlaps([5..10], [1..6])\n// true\n\noverlaps((3..7], [1..4])\n// true\n\noverlaps([1..3], (3..6])\n// false\n\noverlaps((5..8], [1..5))\n// false\n\noverlaps([4..10], [1..5))\n// true\n</code></pre>\n'},{name:"overlaps before(range1, range2)",description:'<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">overlaps before(range1: range, range2: range): boolean\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">overlaps before([1..5], [4..10])\n// true\n\noverlaps before([3..4], [1..2])\n// false\n\noverlaps before([1..3], (3..5])\n// false\n\noverlaps before([1..5), (3..8])\n// true\n\noverlaps before([1..5), [5..10])\n// false\n</code></pre>\n'},{name:"overlaps after(range1, range2)",description:'<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">overlaps after(range1: range, range2: range): boolean\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">overlaps after([4..10], [1..5])\n// true\n\noverlaps after([3..4], [1..2])\n// false\n\noverlaps after([3..5], [1..3))\n// false\n\noverlaps after((5..8], [1..5))\n// false\n\noverlaps after([4..10], [1..5))\n// true\n</code></pre>\n'},{name:"finishes(point, range)",description:'<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">finishes(point: Any, range: range): boolean\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">finishes(5, [1..5])\n// true\n\nfinishes(10, [1..7])\n// false\n</code></pre>\n'},{name:"finishes(range1, range2)",description:'<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">finishes(range1: range, range2: range): boolean\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">finishes([3..5], [1..5])\n// true\n\nfinishes((1..5], [1..5))\n// false\n\nfinishes([5..10], [1..10))\n// false\n</code></pre>\n'},{name:"finished by(range, point)",description:'<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">finished by(range: range, point: Any): boolean\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">finished by([5..10], 10)\n// true\n\nfinished by([3..4], 2)\n// false\n</code></pre>\n'},{name:"finished by(range1, range2)",description:'<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">finished by(range1: range, range2: range): boolean\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">finished by([1..5], [3..5])\n// true\n\nfinished by((5..8], [1..5))\n// false\n\nfinished by([5..10], (1..10))\n// false\n</code></pre>\n'},{name:"includes(range, point)",description:'<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">includes(range: range, point: Any): boolean\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">includes([5..10], 6)\n// true\n\nincludes([3..4], 5)\n// false\n</code></pre>\n'},{name:"includes(range1, range2)",description:'<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">includes(range1: range, range2: range): boolean\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">includes([1..10], [4..6])\n// true\n\nincludes((5..8], [1..5))\n// false\n\nincludes([1..10], [1..5))\n// true\n</code></pre>\n'},{name:"during(point, range)",description:'<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">during(point: Any, range: range): boolean\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">during(5, [1..10])\n// true\n\nduring(12, [1..10])\n// false\n\nduring(1, (1..10])\n// false\n</code></pre>\n'},{name:"during(range1, range2)",description:'<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">during(range1: range, range2: range): boolean\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">during([4..6], [1..10))\n// true\n\nduring((1..5], (1..10])\n// true\n</code></pre>\n'},{name:"starts(point, range)",description:'<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">starts(point: Any, range: range): boolean\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">starts(1, [1..5])\n// true\n\nstarts(1, (1..8])\n// false\n</code></pre>\n'},{name:"starts(range1, range2)",description:'<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">starts(range1: range, range2: range): boolean\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">starts((1..5], [1..5])\n// false\n\nstarts([1..10], [1..5])\n// false\n\nstarts((1..5), (1..10))\n// true\n</code></pre>\n'},{name:"started by(range, point)",description:'<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">started by(range: range, point: Any): boolean\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">started by([1..10], 1)\n// true\n\nstarted by((1..10], 1)\n// false\n</code></pre>\n'},{name:"started by(range1, range2)",description:'<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">started by(range1: range, range2: range): boolean\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">started by([1..10], [1..5])\n// true\n\nstarted by((1..10], [1..5))\n// false\n\nstarted by([1..10], [1..10))\n// true\n</code></pre>\n'},{name:"coincides(point1, point2)",description:'<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">coincides(point1: Any, point2: Any): boolean\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">coincides(5, 5)\n// true\n\ncoincides(3, 4)\n// false\n</code></pre>\n'},{name:"coincides(range1, range2)",description:'<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">coincides(range1: range, range2: range): boolean\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">coincides([1..5], [1..5])\n// true\n\ncoincides((1..5], [1..5))\n// false\n\ncoincides([1..5], [2..6])\n// false\n</code></pre>\n'},{name:"substring(string, start position)",description:'<p>Returns a substring of the given value starting at <code>start position</code>.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">substring(string: string, start position: number): string\n</code></pre>\n<p>The <code>start position</code> starts at the index <code>1</code>. The last position is <code>-1</code>.</p>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">substring(&quot;foobar&quot;, 3)\n// &quot;obar&quot;\n\nsubstring(&quot;foobar&quot;, -2)\n// &quot;ar&quot;\n</code></pre>\n'},{name:"substring(string, start position, length)",description:'<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\nthe remaining characters of the value, it returns all characters from <code>start position</code> until the end.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">substring(string: string, start position: number, length: number): string\n</code></pre>\n<p>The <code>start position</code> starts at the index <code>1</code>. The last position is <code>-1</code>.</p>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">substring(&quot;foobar&quot;, 3, 3)\n// &quot;oba&quot;\n\nsubstring(&quot;foobar&quot;, -3, 2)\n// &quot;ba&quot;\n\nsubstring(&quot;foobar&quot;, 3, 10)\n// &quot;obar&quot;\n</code></pre>\n'},{name:"string length(string)",description:'<p>Returns the number of characters in the given value.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">string length(string: string): number\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">string length(&quot;foo&quot;)\n// 3\n</code></pre>\n'},{name:"upper case(string)",description:'<p>Returns the given value with all characters are uppercase.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">upper case(string: string): string\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">upper case(&quot;aBc4&quot;)\n// &quot;ABC4&quot;\n</code></pre>\n'},{name:"lower case(string)",description:'<p>Returns the given value with all characters are lowercase.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">lower case(string: string): string\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">lower case(&quot;aBc4&quot;)\n// &quot;abc4&quot;\n</code></pre>\n'},{name:"substring before(string, match)",description:'<p>Returns a substring of the given value that contains all characters before <code>match</code>.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">substring before(string: string, match: string): string\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">substring before(&quot;foobar&quot;, &quot;bar&quot;)\n// &quot;foo&quot;\n</code></pre>\n'},{name:"substring after(string, match)",description:'<p>Returns a substring of the given value that contains all characters after <code>match</code>.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">substring after(string: string, match: string): string\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">substring after(&quot;foobar&quot;, &quot;ob&quot;)\n// &quot;ar&quot;\n</code></pre>\n'},{name:"contains(string, match)",description:'<p>Returns <code>true</code> if the given value contains the substring <code>match</code>. Otherwise, returns <code>false</code>.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">contains(string: string, match: string): boolean\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">contains(&quot;foobar&quot;, &quot;of&quot;)\n// false\n</code></pre>\n'},{name:"starts with(string, match)",description:'<p>Returns <code>true</code> if the given value starts with the substring <code>match</code>. Otherwise, returns <code>false</code>.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">starts with(string: string, match: string): boolean\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">starts with(&quot;foobar&quot;, &quot;fo&quot;)\n// true\n</code></pre>\n'},{name:"ends with(string, match)",description:'<p>Returns <code>true</code> if the given value ends with the substring <code>match</code>. Otherwise, returns <code>false</code>.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">ends with(string: string, match: string): boolean\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">ends with(&quot;foobar&quot;, &quot;r&quot;)\n// true\n</code></pre>\n'},{name:"matches(input, pattern)",description:'<p>Returns <code>true</code> if the given value matches the <code>pattern</code>. Otherwise, returns <code>false</code>.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">matches(input: string, pattern: string): boolean\n</code></pre>\n<p>The <code>pattern</code> is a string that contains a regular expression.</p>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">matches(&quot;foobar&quot;, &quot;^fo*bar&quot;)\n// true\n</code></pre>\n'},{name:"matches(input, pattern, flags)",description:'<p>Returns <code>true</code> if the given value matches the <code>pattern</code>. Otherwise, returns <code>false</code>.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">matches(input: string, pattern: string, flags: string): boolean\n</code></pre>\n<p>The <code>pattern</code> is a string that contains a regular expression.</p>\n<p>The <code>flags</code> can contain one or more of the following characters:</p>\n<ul>\n<li><code>s</code> (dot-all)</li>\n<li><code>m</code> (multi-line)</li>\n<li><code>i</code> (case insensitive)</li>\n<li><code>x</code> (comments)</li>\n</ul>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">matches(&quot;FooBar&quot;, &quot;foo&quot;, &quot;i&quot;)\n// true\n</code></pre>\n'},{name:"replace(input, pattern, replacement)",description:'<p>Returns the resulting string after replacing all occurrences of <code>pattern</code> with <code>replacement</code>.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">replace(input: string, pattern: string, replacement: string): string\n</code></pre>\n<p>The <code>pattern</code> is a string that contains a regular expression.</p>\n<p>The <code>replacement</code> can access the match groups by using <code>$</code> and the number of the group, for example,\n<code>$1</code> to access the first group.</p>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">replace(&quot;abcd&quot;, &quot;(ab)|(a)&quot;, &quot;[1=$1][2=$2]&quot;)\n// &quot;[1=ab][2=]cd&quot;\n\nreplace(&quot;0123456789&quot;, &quot;(\\d{3})(\\d{3})(\\d{4})&quot;, &quot;($1) $2-$3&quot;)\n// &quot;(012) 345-6789&quot;\n</code></pre>\n'},{name:"replace(input, pattern, replacement, flags)",description:'<p>Returns the resulting string after replacing all occurrences of <code>pattern</code> with <code>replacement</code>.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">replace(input: string, pattern: string, replacement: string, flags: string): string\n</code></pre>\n<p>The <code>pattern</code> is a string that contains a regular expression.</p>\n<p>The <code>replacement</code> can access the match groups by using <code>$</code> and the number of the group, for example,\n<code>$1</code> to access the first group.</p>\n<p>The <code>flags</code> can contain one or more of the following characters:</p>\n<ul>\n<li><code>s</code> (dot-all)</li>\n<li><code>m</code> (multi-line)</li>\n<li><code>i</code> (case insensitive)</li>\n<li><code>x</code> (comments)</li>\n</ul>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">replace(&quot;How do you feel?&quot;, &quot;Feel&quot;, &quot;FEEL&quot;, &quot;i&quot;)\n// &quot;How do you FEEL?&quot;\n</code></pre>\n'},{name:"split(string, delimiter)",description:'<p>Splits the given value into a list of substrings, breaking at each occurrence of the <code>delimiter</code> pattern.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">split(string: string, delimiter: string): list&lt;string&gt;\n</code></pre>\n<p>The <code>delimiter</code> is a string that contains a regular expression.</p>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">split(&quot;John Doe&quot;, &quot;\\s&quot; )\n// [&quot;John&quot;, &quot;Doe&quot;]\n\nsplit(&quot;a;b;c;;&quot;, &quot;;&quot;)\n// [&quot;a&quot;, &quot;b&quot;, &quot;c&quot;, &quot;&quot;, &quot;&quot;]\n</code></pre>\n'},{name:"extract(string, pattern)",description:'<p><em>Camunda Extension</em></p>\n<p>Returns all matches of the pattern in the given string. Returns an empty list if the pattern doesn&#39;t\nmatch.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">extract(string: string, pattern: string): list&lt;string&gt;\n</code></pre>\n<p>The <code>pattern</code> is a string that contains a regular expression.</p>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">extract(&quot;references are 1234, 1256, 1378&quot;, &quot;12[0-9]*&quot;)\n// [&quot;1234&quot;,&quot;1256&quot;]\n</code></pre>\n'},{name:"trim(string)",description:'<p><em>Camunda Extension</em></p>\n<p>Returns the given string without leading and trailing spaces.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">trim(string: string): string\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">trim(&quot; hello world &quot;)\n// &quot;hello world&quot;\n\ntrim(&quot;hello world &quot;)\n// &quot;hello world&quot;\n</code></pre>\n'},{name:"uuid()",description:'<p><em>Camunda Extension</em></p>\n<p>Returns a UUID (Universally Unique Identifier) with 36 characters.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">uuid(): string\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">uuid()\n// &quot;7793aab1-d761-4d38-916b-b7270e309894&quot;\n</code></pre>\n'},{name:"to base64(value)",description:'<p><em>Camunda Extension</em></p>\n<p>Returns the given string encoded in Base64 format.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">to base64(value: string): string\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">to base64(&quot;FEEL&quot;)\n// &quot;RkVFTA==&quot;\n</code></pre>\n'},{name:"is blank(string)",description:'<p><em>Camunda Extension</em></p>\n<p>Returns <code>true</code> if the given string is blank (empty or contains only whitespaces).</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">is blank(string: string): boolean\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">is blank(&quot;&quot;)\n// true\n\nis blank(&quot; &quot;)\n// true\n\nis blank(&quot;hello world&quot;)\n// false\n</code></pre>\n'},{name:"now()",description:'<p>Returns the current date and time including the timezone.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">now(): date and time\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">now()\n// date and time(&quot;2020-07-31T14:27:30@Europe/Berlin&quot;)\n</code></pre>\n'},{name:"today()",description:'<p>Returns the current date.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">today(): date\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">today()\n// date(&quot;2020-07-31&quot;)\n</code></pre>\n'},{name:"day of week(date)",description:'<p>Returns the day of the week according to the Gregorian calendar. Note that it always returns the English name of the day.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">day of week(date: date): string\n</code></pre>\n<pre><code class="language-feel">day of week(date: date and time): string\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">day of week(date(&quot;2019-09-17&quot;))\n// &quot;Tuesday&quot;\n\nday of week(date and time(&quot;2019-09-17T12:00:00&quot;))\n// &quot;Tuesday&quot;\n</code></pre>\n'},{name:"day of year(date)",description:'<p>Returns the Gregorian number of the day within the year.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">day of year(date: date): number\n</code></pre>\n<pre><code class="language-feel">day of year(date: date and time): number\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">day of year(date(&quot;2019-09-17&quot;))\n// 260\n\nday of year(date and time(&quot;2019-09-17T12:00:00&quot;))\n// 260\n</code></pre>\n'},{name:"week of year(date)",description:'<p>Returns the Gregorian number of the week within the year, according to ISO 8601.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">week of year(date: date): number\n</code></pre>\n<pre><code class="language-feel">week of year(date: date and time): number\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">week of year(date(&quot;2019-09-17&quot;))\n// 38\n\nweek of year(date and time(&quot;2019-09-17T12:00:00&quot;))\n// 38\n</code></pre>\n'},{name:"month of year(date)",description:'<p>Returns the month of the year according to the Gregorian calendar. Note that it always returns the English name of the month.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">month of year(date: date): string\n</code></pre>\n<pre><code class="language-feel">month of year(date: date and time): string\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">month of year(date(&quot;2019-09-17&quot;))\n// &quot;September&quot;\n\nmonth of year(date and time(&quot;2019-09-17T12:00:00&quot;))\n// &quot;September&quot;\n</code></pre>\n'},{name:"abs(n)",description:'<p>Returns the absolute value of a given duration.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">abs(n: days and time duration): days and time duration\n</code></pre>\n<pre><code class="language-feel">abs(n: years and months duration): years and months duration\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">abs(duration(&quot;-PT5H&quot;))\n// &quot;duration(&quot;PT5H&quot;)&quot;\n\nabs(duration(&quot;PT5H&quot;))\n// &quot;duration(&quot;PT5H&quot;)&quot;\n\nabs(duration(&quot;-P2M&quot;))\n// duration(&quot;P2M&quot;)\n</code></pre>\n'},{name:"last day of month(date)",description:'<p><em>Camunda Extension</em></p>\n<p>Takes the month of the given date or date-time value and returns the last day of this month.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class="language-feel">last day of month(date: date): date\n</code></pre>\n<pre><code class="language-feel">last day of month(date: date and time): date\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class="language-feel">last day of month(date(&quot;2022-10-01&quot;))\n// date(&quot;2022-10-31&quot;))\n\nlast day of month(date and time(&quot;2022-10-16T12:00:00&quot;))\n// date(&quot;2022-10-31&quot;))\n</code></pre>\n'}].map(lm);(class extends el{constructor(e){super(),this._modeling=e}setText(e,t){this._modeling.updateProperties(e,{text:t})}}).$inject=["modeling"];function cm(e){e.stopPropagation()}(class extends oo{constructor(e,t){super(e,t),Ps(this);const{value:n}=e;this.state={value:n,optionsVisible:!1},this._portalEl=null}componentDidMount(){document.addEventListener("mousedown",this.onGlobalClick),document.addEventListener("focusin",this.onFocusChanged),this.keyboard.addListener(this.onKeyboard)}componentWillUnmount(){document.removeEventListener("focusin",this.onFocusChanged),document.removeEventListener("mousedown",this.onGlobalClick),this.keyboard.removeListener(this.onKeyboard),this.removePortalEl()}componentWillReceiveProps(e){const{value:t}=e;this.setState({value:t})}componentWillUpdate(e,t){const{optionsVisible:n}=t;n?this._portalEl||this.addPortalEl():this._portalEl&&this.removePortalEl()}componentDidUpdate(){const{optionsVisible:e}=this.state;if(!e||!this.inputNode)return;const t=this.getOptionsBounds();b(this._portalEl.style,t)}getOptionsBounds(){const e=this.renderer.getContainer(),{top:t,left:n,bottom:i}=e.getBoundingClientRect(),{top:r,left:o,width:s,height:a,bottom:l}=this.inputNode.getBoundingClientRect(),c=r+a-t+e.scrollTop,h={top:`${c}px`,left:`${o-n+e.scrollLeft}px`,width:`${s}px`,"max-height":`calc(100% - ${c}px)`};if(i-l<a){const e=i-r;h.bottom=`${e}px`,h["max-height"]=`calc(100% - ${e})`,delete h.top}return h}addPortalEl(){this._portalEl=Lt('<div class="dms-select-options"></div>');this.renderer.getContainer().appendChild(this._portalEl),this._portalEl.addEventListener("mousedown",cm)}removePortalEl(){this._portalEl&&(this._portalEl.removeEventListener("mousedown",cm),Ft(this._portalEl),this._portalEl=null)}onChange=e=>{this.setState({value:e});const{onChange:t}=this.props;"function"==typeof t&&t(e)};onInputClick=e=>{e.preventDefault(),e.stopPropagation(),this.setOptionsVisible(!this.state.optionsVisible),this.focusInput()};onInput=e=>{const{value:t}=e.target;this.onChange(t)};onOptionClick=(e,t)=>{t.preventDefault(),t.stopPropagation(),this.setOptionsVisible(!1),this.onChange(e),this.focusInput()};focusInput(){const e=this.inputNode;e.focus(),"selectionStart"in e&&(e.selectionStart=1e5)}checkClose(e){!this._portalEl||this._portalEl.contains(e)||this.parentNode.contains(e)||this.setOptionsVisible(!1)}onFocusChanged=e=>{this.checkClose(e.target)};onGlobalClick=e=>{this.checkClose(e.target)};select(e){const{options:t}=this.props,{value:n}=this.state;if(!t)return;const i=t.filter((e=>e.value===n))[0],r=i?t.indexOf(i):-1,o=-1===r?1===e?0:t.length-1:(r+e)%t.length,s=t[o<0?t.length+o:o];this.onChange(s.value)}setOptionsVisible(e){this.setState({optionsVisible:e})}onKeyDown=e=>{const{optionsVisible:t}=this.state;var n=e.which;40!==n&&38!==n||(e.stopPropagation(),e.preventDefault(),t?this.select(40===n?1:-1):this.setOptionsVisible(!0)),t&&(13!==n&&27!==n||(e.stopPropagation(),e.preventDefault(),this.setOptionsVisible(!1)))};onKeyboard=e=>{const{optionsVisible:t}=this.state;if(t)return 27===e?(this.setOptionsVisible(!1),!0):void 0};renderOptions(e,t){return zi(1,"div","options",e.map((e=>zi(1,"div",["option",t===e?"active":""].join(" "),e.label,0,{"data-value":e.value,onClick:t=>this.onOptionClick(e.value,t)}))),0)}render(){const{className:e,label:t,id:n,options:i,noInput:r,title:o}=this.props,{optionsVisible:s,value:a}=this.state,l=!!i&&i.filter((e=>e.value===a))[0],c=l?l.label:a;return zi(1,"div",[e||"","dms-input-select"].join(" "),[r?zi(1,"div","dms-input",c,0,{"aria-label":t,tabIndex:"0",onKeyDown:this.onKeyDown},null,(e=>this.inputNode=e)):zi(64,"input","dms-input",null,1,{"aria-label":t,onInput:this.onInput,onKeyDown:this.onKeyDown,spellCheck:"false",type:"text",value:a,id:n},null,(e=>this.inputNode=e)),zi(1,"span",["dms-input-select-icon",s?"dmn-icon-up":"dmn-icon-down"].join(" ")),s&&(h=this.renderOptions(i,l),u=this._portalEl,zi(1024,u,null,h,0,null,Ai(h)?null:h.key,null))],0,{title:o,onClick:this.onInputClick},null,(e=>this.parentNode=e));var h,u}}).$inject=["keyboard","renderer"];return class extends $t{_getViewProviders(){return[{id:"drd",constructor:fs,opens(e){return yi(e,"dmn:Definitions")&&((t=e).dmnDI&&t.dmnDI.diagrams&&t.dmnDI.diagrams[0]);var t}},{id:"decisionTable",constructor:Sa,opens:e=>yi(e,"dmn:Decision")&&yi(e.decisionLogic,"dmn:DecisionTable")},{id:"literalExpression",constructor:Ua,opens:e=>yi(e,"dmn:Decision")&&yi(e.decisionLogic,"dmn:LiteralExpression")},{id:"boxedExpression",constructor:bl,opens:e=>yi(e,"dmn:BusinessKnowledgeModel")&&wi(e)}]}}})); class
H A Ddmn-modeler.production.min.js21 */function Ha(e){this._container=this._createContainer(),Is(this._container),this._init(this._container,e)}function Wa(e){return{x:e.x+e.width/2,y:e.y+e.height/2}}function Ua(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Xa(e){return Math.log(e)/Math.log(10)}function Ka(e,t){var n=Xa(e.min),i=Xa(e.max);return(Math.abs(n)+Math.abs(i))/t}yn(Ha,Uo),Ha.prototype.saveSVG=tn((function(e){var t=this;return new Promise((function(e){var n=t.get("canvas"),i=n.getActiveLayer(),o=Zt("defs",n._svg),r=ei(i),s=o&&o.outerHTML||"",a=i.getBBox();e({svg:'<?xml version="1.0" encoding="utf-8"?>\n\x3c!-- created with dmn-js / http://bpmn.io --\x3e\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+a.width+'" height="'+a.height+'" viewBox="'+a.x+" "+a.y+" "+a.width+" "+a.height+'" version="1.1">'+s+r+"</svg>"})}))})),Ha.prototype.getModules=function(){return this._modules},Ha.prototype.destroy=function(){Uo.prototype.destroy.call(this),en(this._container)},Ha.prototype.on=function(e,t,n,i){return this.get("eventBus").on(e,t,n,i)},Ha.prototype.off=function(e,t){this.get("eventBus").off(e,t)},Ha.prototype._init=function(e,t){var{additionalModules:n,canvas:i,...o}=t,r={...o,canvas:{...i,container:e},modules:[...[{drd:["value",this]}],...t.modules||this.getModules(),...n||[]]};Uo.call(this,r),t&&t.container&&this.attachTo(t.container)},Ha.prototype._emit=function(e,t){return this.get("eventBus").fire(e,t)},Ha.prototype._createContainer=function(){return Gt('<div class="dmn-drd-container"></div>')},Ha.prototype.open=function(e){var t=this;return new Promise(((n,i)=>{var o;try{return t._definitions&&t.clear(),t._definitions=e,function(e,t,n){var i,o=e.get("drdImporter"),r=e.get("eventBus"),s=[];r.fire("import.start",{definitions:t});try{!function(e){new Ko({root:function(e){return o.root(e)},element:function(e,t){return o.add(e,t)},error:function(e,t){s.push({message:e,context:t})}}).handleDefinitions(e)}(t)}catch(e){i=e}r.fire("import.done",{error:i,warnings:s}),n(i,s)}(t,e,(function(e,t){e?(e.warnings=t||[],i(e)):n({warnings:t||[]})}))}catch(e){o=e}o?(o.warnings=o.warnings||[],i(o)):n({warnings:[]})}))},Ha.prototype.attachTo=function(e){if(!e)throw new Error("parentNode required");this.detach();var t=this._container;e.appendChild(t),this._emit("attach",{}),this.get("canvas").resized()},Ha.prototype.detach=function(){var e=this._container,t=e.parentNode;t&&(this._emit("detach",{}),t.removeChild(e))},Ha.prototype._modules=[ua,ha,Aa,La,Va,Qa];var Ga=Math.sign||function(e){return e>=0?1:-1},Ya={min:.2,max:4};function Za(e,t,n){e=e||{},this._enabled=!1,this._canvas=n,this._container=n._container,this._handleWheel=T(this._handleWheel,this),this._totalDelta=0,this._scale=e.scale||.75;var i=this;t.on("canvas.init",(function(t){i._init(!1!==e.enabled)}))}Za.$inject=["config.zoomScroll","eventBus","canvas"],Za.prototype.scroll=function(e){this._canvas.scroll(e)},Za.prototype.reset=function(){this._canvas.zoom("fit-viewport")},Za.prototype.zoom=function(e,t){var n=Ka(Ya,20);this._totalDelta+=e,Math.abs(this._totalDelta)>.1&&(this._zoom(e,t,n),this._totalDelta=0)},Za.prototype._handleWheel=function(e){if(!Bt(e.target,".djs-scrollable",!0)){var t=this._container;e.preventDefault();var n,i=e.ctrlKey||ma()&&e.metaKey,o=e.shiftKey,r=-1*this._scale;if(r*=i?0===e.deltaMode?.02:.32:0===e.deltaMode?1:16,i){var s=t.getBoundingClientRect(),a={x:e.clientX-s.left,y:e.clientY-s.top};n=Math.sqrt(Math.pow(e.deltaY,2)+Math.pow(e.deltaX,2))*Ga(e.deltaY)*r,this.zoom(n,a)}else n=o?{dx:r*e.deltaY,dy:0}:{dx:r*e.deltaX,dy:r*e.deltaY},this.scroll(n)}},Za.prototype.stepZoom=function(e,t){var n=Ka(Ya,10);this._zoom(e,t,n)},Za.prototype._zoom=function(e,t,n){var i=this._canvas,o=e>0?1:-1,r=Xa(i.zoom()),s=Math.round(r/n)*n;s+=n*o;var a,l,c=Math.pow(10,s);i.zoom((a=Ya,l=c,Math.max(a.min,Math.min(a.max,l))),t)},Za.prototype.toggle=function(e){var t=this._container,n=this._handleWheel,i=this._enabled;return void 0===e&&(e=!i),i!==e&&zt[e?"bind":"unbind"](t,"wheel",n,!1),this._enabled=e,e},Za.prototype._init=function(e){this.toggle(e)};var Ja={__init__:["zoomScroll"],zoomScroll:["type",Za]},el=/^djs-cursor-.*$/;function tl(e){var t=$t(document.body);t.removeMatching(el),e&&t.add("djs-cursor-"+e)}function nl(){tl(null)}var il=5e3;function ol(e,t){function n(){return!1}return t=t||"element.click",e.once(t,il,n),function(){e.off(t,n)}}function rl(e,t){var n;function i(i){var o,r=n.start,s=n.button,a=ga(i),l=Ua(a,r);(!n.dragging&&(o=l,Math.sqrt(Math.pow(o.x,2)+Math.pow(o.y,2))>15)&&(n.dragging=!0,0===s&&ol(e),tl("grab")),n.dragging)&&(l=Ua(a,n.last||n.start),t.scroll({dx:l.x,dy:l.y}),n.last=a);i.preventDefault()}function o(e){zt.unbind(document,"mousemove",i),zt.unbind(document,"mouseup",o),n=null,nl()}e.on("element.mousedown",500,(function(e){return function(e){if(Bt(e.target,".djs-draggable"))return;var t=e.button;if(t>=2||e.ctrlKey||e.shiftKey||e.altKey)return;return n={button:t,start:ga(e)},zt.bind(document,"mousemove",i),zt.bind(document,"mouseup",o),!0}(e.originalEvent)})),this.isActive=function(){return!!n}}rl.$inject=["eventBus","canvas"];var sl={__init__:["moveCanvas"],moveCanvas:["type",rl]};function al(e){return CSS.escape(e)}var ll={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};var cl=["c","C"],ul=["v","V"],hl=["y","Y"],dl=["z","Z"];function pl(e){return!e.altKey&&(e.ctrlKey||e.metaKey)}function fl(e,t){return-1!==(e=r(e)?e:[e]).indexOf(t.key)||-1!==e.indexOf(t.code)}function gl(e){return e.shiftKey}function ml(e){return pl(e)&&!gl(e)&&fl(dl,e)}function vl(e){return pl(e)&&(fl(hl,e)||fl(dl,e)&&gl(e))}function yl(e,t,n,i){this._open=!1,this._results={},this._eventMaps=[],this._cachedRootElement=null,this._cachedSelection=null,this._cachedViewbox=null,this._canvas=e,this._eventBus=t,this._selection=n,this._translate=i,this._container=this._getBoxHtml(),this._searchInput=Zt(yl.INPUT_SELECTOR,this._container),this._resultsContainer=Zt(yl.RESULTS_CONTAINER_SELECTOR,this._container),this._canvas.getContainer().appendChild(this._container),t.on(["canvas.destroy","diagram.destroy","drag.init","elements.changed"],this.close,this)}function xl(e,t,n){var i=function(e){var t="";return e.forEach((function(e){var n,i=(n=""+(n=e.value||e.matched||e.normal))&&n.replace(/[&<>"']/g,(function(e){return ll[e]})),o=e.match||e.matched;t+=o?'<b class="'+yl.RESULT_HIGHLIGHT_CLASS+'">'+i+"</b>":i})),""!==t?t:null}(t),o=Gt(n);o.innerHTML=i,e.appendChild(o)}yl.$inject=["canvas","eventBus","selection","translate"],yl.prototype._bindEvents=function(){var e=this;function t(t,n,i,o){e._eventMaps.push({el:t,type:i,listener:Wt.bind(t,n,i,o)})}t(document,"html","click",(function(t){e.close(!1)})),t(this._container,yl.INPUT_SELECTOR,"click",(function(e){e.stopPropagation(),e.delegateTarget.focus()})),t(this._container,yl.RESULT_SELECTOR,"mouseover",(function(t){t.stopPropagation(),e._scrollToNode(t.delegateTarget),e._preselect(t.delegateTarget)})),t(this._container,yl.RESULT_SELECTOR,"click",(function(t){t.stopPropagation(),e._select(t.delegateTarget)})),t(this._container,yl.INPUT_SELECTOR,"keydown",(function(e){fl("ArrowUp",e)&&e.preventDefault(),fl("ArrowDown",e)&&e.preventDefault()})),t(this._container,yl.INPUT_SELECTOR,"keyup",(function(t){if(fl("Escape",t))return e.close();if(fl("Enter",t)){var n=e._getCurrentResult();return n?e._select(n):e.close(!1)}return fl("ArrowUp",t)?e._scrollToDirection(!0):fl("ArrowDown",t)?e._scrollToDirection():void(fl(["ArrowLeft","ArrowRight"],t)||e._search(t.delegateTarget.value))}))},yl.prototype._unbindEvents=function(){this._eventMaps.forEach((function(e){Wt.unbind(e.el,e.type,e.listener)}))},yl.prototype._search=function(e){var t=this;if(this._clearResults(),e&&""!==e){var n=this._searchProvider.find(e);if((n=n.filter((function(e){return!t._canvas.getRootElements().includes(e.element)}))).length){n.forEach((function(e){var n=e.element.id,i=t._createResultNode(e,n);t._results[n]={element:e.element,node:i}}));var i=Zt(yl.RESULT_SELECTOR,this._resultsContainer);this._scrollToNode(i),this._preselect(i)}else this._selection.select(null)}},yl.prototype._scrollToDirection=function(e){var t=this._getCurrentResult();if(t){var n=e?t.previousElementSibling:t.nextElementSibling;n&&(this._scrollToNode(n),this._preselect(n))}},yl.prototype._scrollToNode=function(e){if(e&&e!==this._getCurrentResult()){var t=e.offsetTop,n=this._resultsContainer.scrollTop,i=t-this._resultsContainer.clientHeight+e.clientHeight;t<n?this._resultsContainer.scrollTop=t:n<i&&(this._resultsContainer.scrollTop=i)}},yl.prototype._clearResults=function(){It(this._resultsContainer),this._results={},this._eventBus.fire("searchPad.cleared")},yl.prototype._getCurrentResult=function(){return Zt(yl.RESULT_SELECTED_SELECTOR,this._resultsContainer)},yl.prototype._createResultNode=function(e,t){var n=Gt(yl.RESULT_HTML);return e.primaryTokens.length>0&&xl(n,e.primaryTokens,yl.RESULT_PRIMARY_HTML),xl(n,e.secondaryTokens,yl.RESULT_SECONDARY_HTML),Pt(n,yl.RESULT_ID_ATTRIBUTE,t),this._resultsContainer.appendChild(n),n},yl.prototype.registerProvider=function(e){this._searchProvider=e},yl.prototype.open=function(){if(!this._searchProvider)throw new Error("no search provider registered");this.isOpen()||(this._cachedRootElement=this._canvas.getRootElement(),this._cachedSelection=this._selection.get(),this._cachedViewbox=this._canvas.viewbox(),this._selection.select(null),this._bindEvents(),this._open=!0,$t(this._canvas.getContainer()).add("djs-search-open"),$t(this._container).add("open"),this._searchInput.focus(),this._eventBus.fire("searchPad.opened"))},yl.prototype.close=function(e=!0){this.isOpen()&&(e&&(this._cachedRootElement&&this._canvas.setRootElement(this._cachedRootElement),this._cachedSelection&&this._selection.select(this._cachedSelection),this._cachedViewbox&&this._canvas.viewbox(this._cachedViewbox),this._eventBus.fire("searchPad.restored")),this._cachedRootElement=null,this._cachedSelection=null,this._cachedViewbox=null,this._unbindEvents(),this._open=!1,$t(this._canvas.getContainer()).remove("djs-search-open"),$t(this._container).remove("open"),this._clearResults(),this._searchInput.value="",this._searchInput.blur(),this._eventBus.fire("searchPad.closed"),this._canvas.restoreFocus())},yl.prototype.toggle=function(){this.isOpen()?this.close():this.open()},yl.prototype.isOpen=function(){return this._open},yl.prototype._preselect=function(e){var t=this._getCurrentResult();if(e!==t){t&&$t(t).remove(yl.RESULT_SELECTED_CLASS);var n=Pt(e,yl.RESULT_ID_ATTRIBUTE),i=this._results[n].element;$t(e).add(yl.RESULT_SELECTED_CLASS),this._canvas.scrollToElement(i,{top:300}),this._selection.select(i),this._eventBus.fire("searchPad.preselected",i)}},yl.prototype._select=function(e){var t=Pt(e,yl.RESULT_ID_ATTRIBUTE),n=this._results[t].element;this._cachedSelection=null,this._cachedViewbox=null,this.close(!1),this._canvas.scrollToElement(n,{top:300}),this._selection.select(n),this._eventBus.fire("searchPad.selected",n)},yl.prototype._getBoxHtml=function(){const e=Gt(yl.BOX_HTML),t=Zt(yl.INPUT_SELECTOR,e);return t&&t.setAttribute("aria-label",this._translate("Search in diagram")),e},yl.CONTAINER_SELECTOR=".djs-search-container",yl.INPUT_SELECTOR=".djs-search-input input",yl.RESULTS_CONTAINER_SELECTOR=".djs-search-results",yl.RESULT_SELECTOR=".djs-search-result",yl.RESULT_SELECTED_CLASS="djs-search-result-selected",yl.RESULT_SELECTED_SELECTOR="."+yl.RESULT_SELECTED_CLASS,yl.RESULT_ID_ATTRIBUTE="data-result-id",yl.RESULT_HIGHLIGHT_CLASS="djs-search-highlight",yl.BOX_HTML='<div class="djs-search-container djs-scrollable">\n <div class="djs-search-input">\n <svg class="djs-search-icon" width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M9.0325 8.5H9.625L13.3675 12.25L12.25 13.3675L8.5 9.625V9.0325L8.2975 8.8225C7.4425 9.5575 6.3325 10 5.125 10C2.4325 10 0.25 7.8175 0.25 5.125C0.25 2.4325 2.4325 0.25 5.125 0.25C7.8175 0.25 10 2.4325 10 5.125C10 6.3325 9.5575 7.4425 8.8225 8.2975L9.0325 8.5ZM1.75 5.125C1.75 6.9925 3.2575 8.5 5.125 8.5C6.9925 8.5 8.5 6.9925 8.5 5.125C8.5 3.2575 6.9925 1.75 5.125 1.75C3.2575 1.75 1.75 3.2575 1.75 5.125Z" fill="#22242A"/>\n </svg>\n <input type="text" spellcheck="false" />\n </div>\n <div class="djs-search-results" />\n</div>',yl.RESULT_HTML='<div class="djs-search-result"></div>',yl.RESULT_PRIMARY_HTML='<div class="djs-search-result-primary"></div>',yl.RESULT_SECONDARY_HTML='<p class="djs-search-result-secondary"></p>';var bl={__depends__:[ha,La,Aa],searchPad:["type",yl]};function _l(e){return hn(e,"dmn:Decision")||hn(e,"dmn:BusinessKnowledgeModel")||hn(e,"dmn:InputData")||hn(e,"dmn:KnowledgeSource")?"name":hn(e,"dmn:TextAnnotation")?"text":void 0}function wl(e){var t=e.businessObject,n=_l(t);if(n)return t[n]||""}function Cl(e,t,n){this._elementRegistry=e,this._canvas=n,t.registerProvider(this)}function Ol(e){return d(e,(function(e){return!!e.matched})).length>0}function kl(e,t){const n=[],i=e;if(!e)return n;e=e.toLowerCase(),t=t.toLowerCase();const o=e.indexOf(t);return o>-1?(0!==o&&n.push({normal:i.substr(0,o)}),n.push({matched:i.substr(o,t.length)}),t.length+o<e.length&&n.push({normal:i.substr(t.length+o,e.length)})):n.push({normal:i}),n}Cl.$inject=["elementRegistry","searchPad","canvas"],Cl.prototype.find=function(e){const t=this._canvas.getRootElement();let n=this._elementRegistry.filter((function(e){return!e.labelTarget}));return n=d(n,(function(e){return e!==t})),n=v(n,(function(t){return{primaryTokens:kl(wl(t),e),secondaryTokens:kl(t.id,e),element:t}})),n=d(n,(function(e){return Ol(e.primaryTokens)||Ol(e.secondaryTokens)})),n=w(n,(function(e){return wl(e.element)+e.element.id})),n};var El={__depends__:[bl],__init__:["dmnSearch"],dmnSearch:["type",Cl]};function Sl(e){Ha.call(this,e)}function Rl(e){return e&&e[e.length-1]}function Tl(e){return e.y}function Ml(e){return e.x}yn(Sl,Ha),Sl.prototype._navigationModules=[Ja,sl,El],Sl.prototype._modules=[].concat(Sl.prototype._modules,Sl.prototype._navigationModules);var Al={left:Ml,center:Ml,right:function(e){return e.x+e.width},top:Tl,middle:Tl,bottom:function(e){return e.y+e.height}};function Pl(e,t){this._modeling=e,this._rules=t}Pl.$inject=["modeling","rules"],Pl.prototype._getOrientationDetails=function(e){var t="x",n="width";return-1!==["top","bottom","middle"].indexOf(e)&&(t="y",n="height"),{axis:t,dimension:n}},Pl.prototype._isType=function(e,t){return-1!==t.indexOf(e)},Pl.prototype._alignmentPosition=function(e,t){var n,i,o,r=this._getOrientationDetails(e),s=r.axis,a=r.dimension,l={},c={},u=!1;if(this._isType(e,["left","top"]))l[e]=t[0][s];else if(this._isType(e,["right","bottom"]))o=Rl(t),l[e]=o[s]+o[a];else if(this._isType(e,["center","middle"])){if(p(t,(function(e){var t=e[s]+Math.round(e[a]/2);c[t]?c[t].elements.push(e):c[t]={elements:[e],center:t}})),n=w(c,(function(e){return e.elements.length>1&&(u=!0),e.elements.length})),u)return l[e]=Rl(n).center,l;i=t[0],o=Rl(t=w(t,(function(e){return e[s]+e[a]}))),l[e]=function(e,t){return Math.round((e[s]+t[s]+t[a])/2)}(i,o)}return l},Pl.prototype.trigger=function(e,t){var n,i=this._modeling,o=d(e,(function(e){return!(e.waypoints||e.host||e.labelTarget)}));if(r(n=this._rules.allowed("elements.align",{elements:o}))&&(o=n),!(o.length<2)&&n){var s=w(o,Al[t]),a=this._alignmentPosition(t,s);i.alignElements(s,a)}};var Dl={__init__:["alignElements"],alignElements:["type",Pl]},$l=10,jl=50,Il=250;function Bl(e,t,n,i){for(var o;o=Ll(e,n,t);)n=i(t,n,o);return n}function Ll(e,t,n){var i={x:t.x-n.width/2,y:t.y-n.height/2,width:n.width,height:n.height},o=function(e){var t=Nl(e);e.host&&(t=t.concat(Nl(e.host)));e.attachers&&(t=t.concat(e.attachers.reduce((function(e,t){return e.concat(Nl(t))}),[])));return t}(e);return h(o,(function(e){return e!==n&&"intersect"===vo(e,i,$l)}))}function Nl(e){return(t=e,t.outgoing.map((function(e){return e.target}))).concat(function(e){return e.incoming.map((function(e){return e.source}))}(e));var t}function ql(){return!0}function Vl(e,t,n){e.on("autoPlace",100,(function(e){var t=e.shape;return function(e,t,n){n||(n={});var i=n.defaultDistance||jl,o=mo(e),r=po(e);return{x:r.right+i+t.width/2,y:o.y}}(e.source,t)})),e.on("autoPlace.end",(function(e){n.scrollToElement(e.shape)})),this.append=function(n,i,o){e.fire("autoPlace.start",{source:n,shape:i});var r=e.fire("autoPlace",{source:n,shape:i}),s=t.appendShape(n,i,r,n.parent,o);return e.fire("autoPlace.end",{source:n,shape:s}),s}}function Fl(e,t){e.on("autoPlace.end",500,(function(e){t.select(e.shape)}))}Vl.$inject=["eventBus","modeling","canvas"],Fl.$inject=["eventBus","selection"];var zl={__init__:["autoPlaceSelectionBehavior"],autoPlace:["type",Vl],autoPlaceSelectionBehavior:["type",Fl]},Ql={width:135,height:46},Hl={width:180,height:80},Wl={width:125,height:45},Ul={width:100,height:63};function Xl(e){qo.call(this),this._drdFactory=e}yn(Xl,qo),Xl.$inject=["drdFactory"],Xl.prototype.baseCreate=qo.prototype.create,Xl.prototype.create=function(e,t){return this.createDrdElement(e,t)},Xl.prototype.createDrdElement=function(e,t){var n,i=this._drdFactory,o=(t=t||{}).businessObject;if(!o){if(!t.type)throw new Error("no shape type specified");o=i.create(t.type)}return o.di||("connection"===e?o.di=i.createDiEdge(o,[]):"shape"===e&&(o.di=i.createDiShape(o,{}))),n=this._getDefaultSize(o),t=M({businessObject:o,id:o.id},n,t),this.baseCreate(e,t)},Xl.prototype._getDefaultSize=function(e){return hn(e,"dmn:BusinessKnowledgeModel")?Ql:hn(e,"dmn:Decision")?Hl:hn(e,"dmn:InputData")?Wl:hn(e,"dmn:KnowledgeSource")?Ul:{width:100,height:80}};var Kl="left",Gl="right",Yl=60,Zl=Hl.width;function Jl(e,t){return hn(t,"dmn:TextAnnotation")?function(e,t){var n=po(e),i={x:n.right+t.width/2,y:n.top-50-t.height/2};return Bl(e,t,i,function(e){return function(t,n,i){var o={x:n.x,y:n.y};return["x","y"].forEach((function(r){var s=e[r];if(s){var a="x"===r?"width":"height",l=s.margin,c=s.minDistance;o[r]=l<0?Math.min(i[r]+l-t[a]/2,n[r]-c+l):Math.max(i[r]+i[a]+l+t[a]/2,n[r]+c+l)}})),o}}({y:{margin:-30,minDistance:20}}))}(e,t):hn(t,"dmn:DRGElement")?function(e,t){var n=po(e),i=mo(e);function o(t){return t.target===e?1:-1}var r=function(e,t){t||(t={});var n=t.defaultDistance||jl,i=t.direction||"e",o=t.filter,r=t.getWeight||function(t){return t.source===e?1:-1},s=t.maxDistance||Il,a=t.reference||"start";function l(e,t){return"n"===i?"start"===a?po(e).top-po(t).bottom:"center"===a?po(e).top-mo(t).y:po(e).top-po(t).top:"w"===i?"start"===a?po(e).left-po(t).right:"center"===a?po(e).left-mo(t).x:po(e).left-po(t).left:"s"===i?"start"===a?po(t).top-po(e).bottom:"center"===a?mo(t).y-po(e).bottom:po(t).bottom-po(e).bottom:"start"===a?po(t).left-po(e).right:"center"===a?mo(t).x-po(e).right:po(t).right-po(e).right}o||(o=ql);var c=e.incoming.filter(o).map((function(t){var n=r(t),i=n<0?l(t.source,e):l(e,t.source);return{id:t.source.id,distance:i,weight:n}})),u=e.outgoing.filter(o).map((function(t){var n=r(t),i=n>0?l(e,t.target):l(t.target,e);return{id:t.target.id,distance:i,weight:n}})),h=f(c.concat(u).reduce((function(e,t){return e[t.id+"__weight_"+t.weight]=t,e}),{}),(function(e,t){var n=t.distance,i=t.weight;return n<0||n>s||(e[String(n)]||(e[String(n)]=0),e[String(n)]+=1*i,(!e.distance||e[e.distance]<e[String(n)])&&(e.distance=n)),e}),{});return h.distance||n}(e,{defaultDistance:180,direction:"s",getWeight:o,filter:ec,reference:"center"}),s={x:i.x,y:n.bottom+r};return Bl(e,t,s,function(e){var t,n,i=mo(e);return function(e,o,r){var s;return t?(o.x<i.x?t=r:n=r,s=tc(i,mo(t))<tc(i,mo(n))?Kl:Gl):(t=r,n=r,s=mo(r).x-i.x>0?Kl:Gl),s===Kl?{x:Math.min(mo(t).x-Zl-Yl,po(t).left-Yl-e.width/2),y:o.y}:{x:Math.max(mo(n).x+Zl+Yl,po(n).right+Yl+e.width/2),y:o.y}}}(e))}(e,t):void 0}function ec(e){return!hn(e,"dmn:Association")}function tc(e,t){return Math.abs(t.x-e.x)}function nc(e){e.on("autoPlace",(function(e){var t=e.shape;return Jl(e.source,t)}))}nc.$inject=["eventBus"];var ic={__depends__:[zl],__init__:["dmnAutoPlace"],dmnAutoPlace:["type",nc]};function oc(e,t,n){var i,o,r=this,s=n.get("dragging",!1);s&&t.on("drag.start",(function(n){t.once("drag.move",1500,(function(t){!function(t){if(!t.hover){var n=t.originalEvent,i=r._findTargetGfx(n),o=i&&e.get(i);i&&o&&(t.stopPropagation(),s.hover({element:o,gfx:i}),s.move(n))}}(t)}))})),t.on("element.hover",(function(e){i=e.gfx,o=e.element})),t.on("element.hover",1500,(function(e){o&&t.fire("element.out",{element:o,gfx:i})})),t.on("element.out",(function(){i=null,o=null})),this._findTargetGfx=function(e){var t;if(e instanceof MouseEvent)return t=ga(e),function(e){return Bt(e,"svg, .djs-element",!0)}(document.elementFromPoint(t.x,t.y))}}oc.$inject=["elementRegistry","eventBus","injector"];var rc={__init__:["hoverFix"],hoverFix:["type",oc]},sc=Math.round,ac="djs-drag-active";function lc(e){e.preventDefault()}function cc(e,t,n,i){var o,r={threshold:5,trapClick:!0};function s(e){var n=t.viewbox(),i=t._container.getBoundingClientRect();return{x:n.x+(e.x-i.left)/n.scale,y:n.y+(e.y-i.top)/n.scale}}function a(t,n){n=n||o;var i=e.createEvent(M({},n.payload,n.data,{isTouch:n.isTouch}));return!1!==e.fire("drag."+t,i)&&e.fire(n.prefix+"."+t,i)}function l(e,i){var r,l=o.payload,c=o.displacement,u=o.globalStart,h=ga(e),d=Ua(h,u),p=o.localStart,f=s(h),m=Ua(f,p);if(!o.active&&(i||(r=d,Math.sqrt(Math.pow(r.x,2)+Math.pow(r.y,2))>o.threshold))){if(M(l,{x:sc(p.x+c.x),y:sc(p.y+c.y),dx:0,dy:0},{originalEvent:e}),!1===a("start"))return g();o.active=!0,o.keepSelection||(l.previousSelection=n.get(),n.select(null)),o.cursor&&tl(o.cursor),t.addMarker(t.getRootElement(),ac)}fa(e),o.active&&(M(l,{x:sc(f.x+c.x),y:sc(f.y+c.y),dx:sc(m.x),dy:sc(m.y)},{originalEvent:e}),a("move"))}function c(e){var t=!0;o.active&&(e&&(o.payload.originalEvent=e,fa(e)),t=a("end")),!1===t&&a("rejected"),a("ended",m(!0!==t))}function u(e){fl("Escape",e)&&(lc(e),g())}function h(t){var n;o.active&&(n=ol(e),setTimeout(n,400),lc(t)),c(t)}function d(e){l(e)}function p(e){var t=o.payload;t.hoverGfx=e.gfx,t.hover=e.element,a("hover")}function f(e){a("out");var t=o.payload;t.hoverGfx=null,t.hover=null}function g(e){var t;if(o){var n=o.active;n&&a("cancel"),t=m(e),n&&a("canceled",t)}}function m(r){var s,m;a("cleanup"),nl(),m=o.trapClick?h:c,zt.unbind(document,"mousemove",l),zt.unbind(document,"dragstart",lc),zt.unbind(document,"selectstart",lc),zt.unbind(document,"mousedown",m,!0),zt.unbind(document,"mouseup",m,!0),zt.unbind(document,"keyup",u),zt.unbind(document,"touchstart",d,!0),zt.unbind(document,"touchcancel",g,!0),zt.unbind(document,"touchmove",l,!0),zt.unbind(document,"touchend",c,!0),e.off("element.hover",p),e.off("element.out",f),t.removeMarker(t.getRootElement(),ac);var v=o.payload.previousSelection;return!1!==r&&v&&!n.get().length&&function(e){var t=e.filter((function(e){return i.get(e.id)}));t.length&&n.select(t)}(v),s=o,o=null,s}e.on("diagram.destroy",g),this.init=function(t,n,i,m){o&&g(!1),"string"==typeof n&&(m=i,i=n,n=null);var v,y,x,b,_,w=(m=M({},r,m||{})).data||{};b=m.trapClick?h:c,t?(v=pa(t)||t,y=ga(t),fa(t),"dragstart"===v.type&&lc(v)):(v=null,y={x:0,y:0}),x=s(y),n||(n=x),_=function(e){return"undefined"!=typeof TouchEvent&&e instanceof TouchEvent}(v),o=M({prefix:i,data:w,payload:{},globalStart:y,displacement:Ua(n,x),localStart:x,isTouch:_},m),m.manual||(_?(zt.bind(document,"touchstart",d,!0),zt.bind(document,"touchcancel",g,!0),zt.bind(document,"touchmove",l,!0),zt.bind(document,"touchend",c,!0)):(zt.bind(document,"mousemove",l),zt.bind(document,"dragstart",lc),zt.bind(document,"selectstart",lc),zt.bind(document,"mousedown",b,!0),zt.bind(document,"mouseup",b,!0)),zt.bind(document,"keyup",u),e.on("element.hover",p),e.on("element.out",f)),a("init"),m.autoActivate&&l(t,!0)},this.move=l,this.hover=p,this.out=f,this.end=c,this.cancel=g,this.context=function(){return o},this.setOptions=function(e){M(r,e)}}cc.$inject=["eventBus","canvas","selection","elementRegistry"];var uc={__depends__:[rc,Aa],dragging:["type",cc]};function hc(e,t,n){this._canvas=n,this._opts=M({scrollThresholdIn:[20,20,20,20],scrollThresholdOut:[0,0,0,0],scrollRepeatTimeout:15,scrollStep:10},e);var i=this;t.on("drag.move",(function(e){var t=i._toBorderPoint(e);i.startScroll(t)})),t.on(["drag.cleanup"],(function(){i.stopScroll()}))}function dc(e,t,n){return t<e&&e<n}hc.$inject=["config.autoScroll","eventBus","canvas"],hc.prototype.startScroll=function(e){var t=this._canvas,n=this._opts,i=this,o=t.getContainer().getBoundingClientRect(),r=[e.x,e.y,o.width-e.x,o.height-e.y];this.stopScroll();for(var s=0,a=0,l=0;l<4;l++)dc(r[l],n.scrollThresholdOut[l],n.scrollThresholdIn[l])&&(0===l?s=n.scrollStep:1==l?a=n.scrollStep:2==l?s=-n.scrollStep:3==l&&(a=-n.scrollStep));0===s&&0===a||(t.scroll({dx:s,dy:a}),this._scrolling=setTimeout((function(){i.startScroll(e)}),n.scrollRepeatTimeout))},hc.prototype.stopScroll=function(){clearTimeout(this._scrolling)},hc.prototype.setOptions=function(e){this._opts=M({},this._opts,e)},hc.prototype._toBorderPoint=function(e){var t=this._canvas._container.getBoundingClientRect(),n=ga(e.originalEvent);return{x:n.x-t.left,y:n.y-t.top}};var pc={__depends__:[uc],__init__:["autoScroll"],autoScroll:["type",hc]};function fc(e){this._commandStack=e.get("commandStack",!1)}fc.$inject=["injector"],fc.prototype.allowed=function(e,t){var n=!0,i=this._commandStack;return i&&(n=i.canExecute(e,t)),void 0===n||n};var gc={__init__:["rules"],rules:["type",fc]},mc=Math.round,vc=Math.max;var yc=10;function xc(e,t){return function(e,t){var n,i;for(n=0;i=e[n];n++)if(ki(i,t)<=yc)return{point:e[n],bendpoint:!0,index:n};return null}(e,t)||function(e,t){var n,i,o=no(function(e,t){return[["M",e.x,e.y],["m",0,-t],["a",t,t,0,1,1,0,2*t],["a",t,t,0,1,1,0,-2*t],["z"]]}(t,yc),(n=[],e.forEach((function(e,t){n.push([0===t?"M":"L",e.x,e.y])})),n)),r=o[0],s=o[o.length-1];return r?r!==s?r.segment2!==s.segment2?{point:e[i=vc(r.segment2,s.segment2)-1],bendpoint:!0,index:i}:{point:{x:mc(r.x+s.x)/2,y:mc(r.y+s.y)/2},index:r.segment2}:{point:{x:mc(r.x),y:mc(r.y)},index:r.segment2}:null}(e,t)}function bc(e,t){var n=t[0],i=t[1],o={x:i.x-n.x,y:i.y-n.y},r=function(e,t,n){var i=[{n:e[0]-n[0],lambda:t[0]},{n:e[1]-n[1],lambda:t[1]}];return-(i[0].n*t[0]+i[1].n*t[1])/(i[0].lambda*t[0]+i[1].lambda*t[1])}([n.x,n.y],[o.x,o.y],[e.x,e.y]);return{x:n.x+r*o.x,y:n.y+r*o.y}}function _c(e,t){var n,i=bc(e,t),o={x:i.x-e.x,y:i.y-e.y};return n=o,Math.sqrt(Math.pow(n.x,2)+Math.pow(n.y,2))}var wc="djs-bendpoint",Cc="djs-segment-dragger";function Oc(e,t,n){var i=function(e,t){var n,i=ga(t),o=e._container.getBoundingClientRect();n={x:o.left,y:o.top};var r=e.viewbox();return{x:r.x+(i.x-n.x)/r.scale,y:r.y+(i.y-n.y)/r.scale}}(e,n);return xc(t,i)}function kc(e,t){var n=Qn("g");Bn(n).add(wc),An(e,n);var i=Qn("circle");jn(i,{cx:0,cy:0,r:4}),Bn(i).add("djs-visual"),An(n,i);var o=Qn("circle");return jn(o,{cx:0,cy:0,r:10}),Bn(o).add("djs-hit"),An(n,o),t&&Bn(n).add(t),n}function Ec(e,t,n,i){var o=Qn("g");An(e,o);var r=function(e,t,n){var i=t.x-e.x,o=t.y-e.y;return Rc("h"===n?i:o)}(t,n,i),s=Qn("rect");jn(s,{x:-9,y:-3,width:18,height:6}),Bn(s).add("djs-visual"),An(o,s);var a=Qn("rect");return jn(a,{x:-r/2,y:-8.5,width:r,height:17}),Bn(a).add("djs-hit"),An(o,a),function(e,t){var n=Xn();n.setRotate(t,0,0),ii(e,n)}(o,"v"===i?90:0),o}function Sc(e,t,n){var i=Qn("g"),o=Mi(t,n),r=Ri(t,n);return An(e,i),Ec(i,t,n,r),Bn(i).add(Cc),Bn(i).add("h"===r?"horizontal":"vertical"),Fo(i,o.x,o.y),i}function Rc(e){return Math.abs(Math.round(2*e/3))}function Tc(e,t){var n=function(e,t){for(var n,i=t.waypoints,o=1/0,r=0;r<i.length-1;r++){var s=_c(e,[i[r],i[r+1]]);s<o&&(o=s,n=r)}return[i[n],i[n+1]]}(e,t);return bc(e,n)}function Mc(e,t,n,i,o){function r(e,n){var r,s=n.waypoints,a=Oc(t,s,e);if(a)return r=function(e,t){var n,i,o=e.waypoints;return t.index<=0||t.bendpoint?null:(i=Ri((n={start:o[t.index-1],end:o[t.index]}).start,n.end))?Rc("h"===i?n.end.x-n.start.x:n.end.y-n.start.y)/2:null}(n,a),!function(e,t,n){var i,o,r,s,a,l,c=e.index,u=e.point;return!(c<=0||e.bendpoint)&&(r=Mi(i=t[c-1],o=t[c]),s=Ri(i,o),a=Math.abs(u.x-r.x),l=Math.abs(u.y-r.y),s&&a<=n&&l<=n)}(a,s,r)?i.start(e,n,a.index,!a.bendpoint):o.start(e,n,a.index),!0}function s(e,t,i){zt.bind(e,t,(function(e){n.triggerMouseEvent(t,e,i),e.stopPropagation()}))}function a(e,n){var i=t.getLayer("overlays"),o=Zt('.djs-bendpoints[data-element-id="'+al(e.id)+'"]',i);return!o&&n&&(jn(o=Qn("g"),{"data-element-id":e.id}),Bn(o).add("djs-bendpoints"),An(i,o),s(o,"mousedown",e),s(o,"click",e),s(o,"dblclick",e)),o}function l(e,t){return Zt('.djs-segment-dragger[data-segment-idx="'+e+'"]',t)}function c(e,t){t.waypoints.forEach((function(t,n){var i=kc(e);An(e,i),Fo(i,t.x,t.y)})),kc(e,"floating")}function u(e,t){for(var n,i,o,r=t.waypoints,a=1;a<r.length;a++)Ri(n=r[a-1],i=r[a])&&(jn(o=Sc(e,n,i),{"data-segment-idx":a}),s(o,"mousemove",t))}function h(e){var t=a(e);return t||(c(t=a(e,!0),e),u(t,e)),t}function d(e){var t=a(e);t&&(!function(e){p(Jt("."+Cc,e),(function(e){ti(e)}))}(t),function(e){p(Jt("."+wc,e),(function(e){ti(e)}))}(t),u(t,e),c(t,e))}function f(e,t,n){var i,o,r=l(t.index,e),s=n[t.index-1],a=n[t.index],c=t.point,u=Mi(s,a),h=Ri(s,a);r&&(i=function(e){return Zt(".djs-visual",e)}(r),o={x:c.x-u.x,y:c.y-u.y},"v"===h&&(o={x:o.y,y:o.x}),Fo(i,o.x,o.y))}e.on("connection.changed",(function(e){d(e.element)})),e.on("connection.remove",(function(e){var t=a(e.element);t&&ti(t)})),e.on("element.marker.update",(function(e){var t,n=e.element;n.waypoints&&(t=h(n),e.add?Bn(t).add(e.marker):Bn(t).remove(e.marker))})),e.on("element.mousemove",(function(e){var n,i,o=e.element,r=o.waypoints;if(r){if(n=a(o,!0),!(i=Oc(t,r,e.originalEvent)))return;!function(e,t){var n=Zt(".floating",e),i=t.point;n&&Fo(n,i.x,i.y)}(n,i),i.bendpoint||f(n,i,r)}})),e.on("element.mousedown",(function(e){if(ya(e)){var t=e.originalEvent,n=e.element;if(n.waypoints)return r(t,n)}})),e.on("selection.changed",(function(e){var t=e.newSelection[0];t&&t.waypoints&&h(t)})),e.on("element.hover",(function(e){var t=e.element;t.waypoints&&(h(t),n.registerEvent(e.gfx,"mousemove","element.mousemove"))})),e.on("element.out",(function(e){n.unregisterEvent(e.gfx,"mousemove","element.mousemove")})),e.on("element.updateId",(function(e){var t=e.element,n=e.newId;if(t.waypoints){var i=a(t);i&&jn(i,{"data-element-id":n})}})),this.addHandles=h,this.updateHandles=d,this.getBendpointsContainer=a,this.getSegmentDragger=l}Mc.$inject=["eventBus","canvas","interactionEvents","bendpointMove","connectionSegmentMove"];var Ac=Math.round,Pc="reconnectStart",Dc="reconnectEnd",$c="updateWaypoints";function jc(e,t,n,i,o,r){this._injector=e,this.start=function(e,t,r,s){var a,l=n.getGraphics(t),c=t.source,u=t.target,h=t.waypoints,d=(a=s||0!==r?s||r!==h.length-1?$c:Dc:Pc)===$c?"connection.updateWaypoints":"connection.reconnect",p=o.allowed(d,{connection:t,source:c,target:u});!1===p&&(p=o.allowed(d,{connection:t,source:u,target:c})),!1!==p&&i.init(e,"bendpoint.move",{data:{connection:t,connectionGfx:l,context:{allowed:p,bendpointIndex:r,connection:t,source:c,target:u,insert:s,type:a}}})},t.on("bendpoint.move.hover",(function(e){var t,n=e.context,i=n.connection,r=i.source,s=i.target,a=e.hover,l=n.type;if(n.hover=a,a){var c=l===$c?"connection.updateWaypoints":"connection.reconnect";if(t=n.allowed=o.allowed(c,{connection:i,source:l===Pc?a:r,target:l===Dc?a:s}))return n.source=l===Pc?a:r,void(n.target=l===Dc?a:s);!1===t&&(t=n.allowed=o.allowed(c,{connection:i,source:l===Dc?a:s,target:l===Pc?a:r})),t&&(n.source=l===Dc?a:s,n.target=l===Pc?a:r)}})),t.on(["bendpoint.move.out","bendpoint.move.cleanup"],(function(e){var t=e.context,n=t.type;t.hover=null,t.source=null,t.target=null,n!==$c&&(t.allowed=!1)})),t.on("bendpoint.move.end",(function(e){var t=e.context,n=t.allowed,i=t.bendpointIndex,o=t.connection,s=t.insert,a=o.waypoints.slice(),l=t.source,c=t.target,u=t.type,h=t.hints||{},d={x:Ac(e.x),y:Ac(e.y)};if(!n)return!1;u===$c?(s?a.splice(i,0,d):a[i]=d,h.bendpointMove={insert:s,bendpointIndex:i},a=this.cropWaypoints(o,a),r.updateWaypoints(o,function(e){e=e.slice();for(var t,n,i,o=0;e[o];)t=e[o],n=e[o-1],0===ki(t,i=e[o+1])||Ei(n,i,t)?e.splice(o,1):o++;return e}(a),h)):(u===Pc?(h.docking="source",Ic(t)&&(h.docking="target",h.newWaypoints=a.reverse())):u===Dc&&(h.docking="target",Ic(t)&&(h.docking="source",h.newWaypoints=a.reverse())),r.reconnect(o,l,c,d,h))}),this)}function Ic(e){var t=e.hover,n=e.source,i=e.target,o=e.type;return o===Pc?t&&i&&t===i&&n!==i:o===Dc?t&&n&&t===n&&n!==i:void 0}jc.$inject=["injector","eventBus","canvas","dragging","rules","modeling"],jc.prototype.cropWaypoints=function(e,t){var n=this._injector.get("connectionDocking",!1);if(!n)return t;var i=e.waypoints;return e.waypoints=t,e.waypoints=n.getCroppedWaypoints(e),t=e.waypoints,e.waypoints=i,t};var Bc="updateWaypoints",Lc="connect-ok",Nc="connect-not-ok",qc="connect-hover",Vc="djs-updating",Fc="djs-dragging";function zc(e,t,n,i){this._injector=t;var o=t.get("connectionPreview",!1);n.on("bendpoint.move.start",(function(e){var t=e.context,n=t.bendpointIndex,o=t.connection,r=t.insert,s=o.waypoints,a=s.slice();t.waypoints=s,r&&a.splice(n,0,{x:e.x,y:e.y}),o.waypoints=a,Bn(t.draggerGfx=kc(i.getLayer("overlays"))).add("djs-dragging"),i.addMarker(o,Fc),i.addMarker(o,Vc)})),n.on("bendpoint.move.hover",(function(e){var t=e.context,n=t.allowed,o=t.hover,r=t.type;if(o){if(i.addMarker(o,qc),r===Bc)return;n?(i.removeMarker(o,Nc),i.addMarker(o,Lc)):!1===n&&(i.removeMarker(o,Lc),i.addMarker(o,Nc))}})),n.on(["bendpoint.move.out","bendpoint.move.cleanup"],1100,(function(e){var t=e.context,n=t.hover,o=t.target;n&&(i.removeMarker(n,qc),i.removeMarker(n,o?Lc:Nc))})),n.on("bendpoint.move.move",(function(t){var n=t.context,i=n.allowed,r=n.bendpointIndex,s=n.draggerGfx,a=n.hover,l=n.type,c=n.connection,u=c.source,h=c.target,d=c.waypoints.slice(),p={x:t.x,y:t.y},f=n.hints||{},g={};o&&(f.connectionStart&&(g.connectionStart=f.connectionStart),f.connectionEnd&&(g.connectionEnd=f.connectionEnd),"reconnectStart"===l?Ic(n)?(g.connectionEnd=g.connectionEnd||p,g.source=h,g.target=a||u,d=d.reverse()):(g.connectionStart=g.connectionStart||p,g.source=a||u,g.target=h):"reconnectEnd"===l?Ic(n)?(g.connectionStart=g.connectionStart||p,g.source=a||h,g.target=u,d=d.reverse()):(g.connectionEnd=g.connectionEnd||p,g.source=u,g.target=a||h):(g.noCropping=!0,g.noLayout=!0,d[r]=p),l===Bc&&(d=e.cropWaypoints(c,d)),g.waypoints=d,o.drawPreview(n,i,g)),Fo(s,t.x,t.y)}),this),n.on(["bendpoint.move.end","bendpoint.move.cancel"],1100,(function(e){var t=e.context,n=t.connection,r=t.draggerGfx,s=t.hover,a=t.target,l=t.waypoints;n.waypoints=l,ti(r),i.removeMarker(n,Vc),i.removeMarker(n,Fc),s&&(i.removeMarker(s,Lc),i.removeMarker(s,a?Lc:Nc)),o&&o.cleanUp(t)}))}zc.$inject=["bendpointMove","injector","eventBus","canvas"];var Qc="connect-hover",Hc="djs-updating";function Wc(e,t,n){return Uc(e,t,e[t]+n)}function Uc(e,t,n){return{x:"x"===t?n:e.x,y:"y"===t?n:e.y}}function Xc(e){return"x"===e?"y":"x"}function Kc(e,t,n){var i,o;return e.original?e.original:(i=mo(t),Uc(e,o=Xc(n),i[o]))}function Gc(e,t,n,i,o,r){var s=e.get("connectionDocking",!1);function a(e,t){if(!s)return t;var n,i=e.waypoints;return e.waypoints=t,n=s.getCroppedWaypoints(e),e.waypoints=i,n}function l(e){o.update("connection",e.connection,e.connectionGfx)}function c(e,t,n){var i=e.newWaypoints,o=function(e,t,n,i){var o=Math.max(t[i],n[i]),r=Math.min(t[i],n[i]);return Uc(t,i,Math.min(Math.max(r+20,e[i]),o-20))}(n,i[e.segmentStartIndex+t],i[e.segmentEndIndex+t],Xc(e.axis));Fo(e.draggerGfx,o.x,o.y)}this.start=function(e,t,o){var r,s,a,l,c=n.getGraphics(t),u=o-1,h=o,d=t.waypoints,p=d[u],f=d[h],g=Oc(n,d,e);(s=Ri(p,f))&&(a="v"===s?"x":"y",0===u&&(p=Kc(p,t.source,a)),h===d.length-1&&(f=Kc(f,t.target,a)),r={connection:t,segmentStartIndex:u,segmentEndIndex:h,segmentStart:p,segmentEnd:f,axis:a,dragPosition:l=g?g.point:{x:(p.x+f.x)/2,y:(p.y+f.y)/2}},i.init(e,l,"connectionSegment.move",{cursor:"x"===a?"resize-ew":"resize-ns",data:{connection:t,connectionGfx:c,context:r}}))},t.on("connectionSegment.move.start",(function(e){var t=e.context,i=e.connection,o=n.getLayer("overlays");t.originalWaypoints=i.waypoints.slice(),t.draggerGfx=Sc(o,t.segmentStart,t.segmentEnd),Bn(t.draggerGfx).add("djs-dragging"),n.addMarker(i,Hc)})),t.on("connectionSegment.move.move",(function(e){var t,n,i=e.context,o=i.connection,r=i.segmentStartIndex,s=i.segmentEndIndex,u=i.segmentStart,h=i.segmentEnd,d=i.axis,p=i.originalWaypoints.slice(),f=Wc(u,d,e["d"+d]),g=Wc(h,d,e["d"+d]),m=p.length,v=0;p[r]=f,p[s]=g,r<2&&(t=vo(o.source,f),1===r?"intersect"===t&&(p.shift(),p[0]=f,v--):"intersect"!==t&&(p.unshift(u),v++)),s>m-3&&(n=vo(o.target,g),s===m-2?"intersect"===n&&(p.pop(),p[p.length-1]=g):"intersect"!==n&&p.push(h)),i.newWaypoints=o.waypoints=a(o,p),c(i,v,e),i.newSegmentStartIndex=r+v,l(e)})),t.on("connectionSegment.move.hover",(function(e){e.context.hover=e.hover,n.addMarker(e.hover,Qc)})),t.on(["connectionSegment.move.out","connectionSegment.move.cleanup"],(function(e){var t=e.context.hover;t&&n.removeMarker(t,Qc)})),t.on("connectionSegment.move.cleanup",(function(e){var t=e.context,i=t.connection;t.draggerGfx&&ti(t.draggerGfx),n.removeMarker(i,Hc)})),t.on(["connectionSegment.move.cancel","connectionSegment.move.end"],(function(e){var t=e.context;t.connection.waypoints=t.originalWaypoints,l(e)})),t.on("connectionSegment.move.end",(function(e){var t=e.context,n=t.connection,i=t.newWaypoints,o=t.newSegmentStartIndex;i=i.map((function(e){return{original:e.original,x:Math.round(e.x),y:Math.round(e.y)}}));var s=function(e,t){var n=0,i=e.filter((function(i,o){return!Ei(e[o-1],e[o+1],i)||(n=o<=t?n-1:n,!1)}));return{waypoints:i,segmentOffset:n}}(i,o),l=a(n,s.waypoints),c=s.segmentOffset,u={segmentMove:{segmentStartIndex:t.segmentStartIndex,newSegmentStartIndex:o+c}};r.updateWaypoints(n,l,u)}))}Gc.$inject=["injector","eventBus","canvas","dragging","graphicsFactory","modeling"];var Yc=Math.abs,Zc=Math.round;function Jc(e,t){return!e||isNaN(e.x)||isNaN(e.y)?t:{x:Zc(e.x+e.width/2),y:Zc(e.y+e.height/2)}}function eu(e,t){var n=e.snapped;return!!n&&("string"==typeof t?n[t]:n.x&&n.y)}function tu(e,t,n){if("string"!=typeof t)throw new Error("axis must be in [x, y]");if("number"!=typeof n&&!1!==n)throw new Error("value must be Number or false");var i,o=e[t],r=e.snapped=e.snapped||{};return!1===n?r[t]=!1:(r[t]=!0,i=n-o,e[t]+=i,e["d"+t]+=i),o}function nu(e){return e.children||[]}var iu=Math.abs,ou=Math.round;function ru(e){function t(e,t){if(r(e)){for(var n=e.length;n--;)if(iu(e[n]-t)<=10)return e[n]}else{var i=t%(e=+e);if(i<10)return t-i;if(i>e-10)return t-i+e}return t}function n(e,t){return e.waypoints?Tc(t,e):e.width?{x:ou(e.width/2+e.x),y:ou(e.height/2+e.y)}:void 0}e.on("connectionSegment.move.move",1500,(function(e){var i,o,r=function(e){var t=e.context,i=t.snapPoints,o=t.connection,r=o.waypoints,s=t.segmentStart,a=t.segmentStartIndex,l=t.segmentEnd,c=t.segmentEndIndex,u=t.axis;if(i)return i;var h=[r[a-1],s,l,r[c+1]];return a<2&&h.unshift(n(o.source,e)),c>r.length-3&&h.unshift(n(o.target,e)),t.snapPoints=i={horizontal:[],vertical:[]},p(h,(function(e){e&&(e=e.original||e,"y"===u&&i.horizontal.push(e.y),"x"===u&&i.vertical.push(e.x))})),i}(e),s=e.x,a=e.y;if(r){var l=s-(i=t(r.vertical,s)),c=a-(o=t(r.horizontal,a));M(e,{dx:e.dx-l,dy:e.dy-c,x:i,y:o}),(l||-1!==r.vertical.indexOf(s))&&tu(e,"x",i),(c||-1!==r.horizontal.indexOf(a))&&tu(e,"y",o)}})),e.on(["connect.hover","connect.move","connect.end"],1500,(function(e){var t=e.context.hover,i=t&&n(t,e);co(t)&&i&&i.x&&i.y&&(tu(e,"x",i.x),tu(e,"y",i.y))})),e.on(["bendpoint.move.move","bendpoint.move.end"],1500,(function(e){var i,o,r=e.context,s=function(e){var t=e.snapPoints,n=e.connection.waypoints,i=e.bendpointIndex;if(t)return t;var o=[n[i-1],n[i+1]];return e.snapPoints=t={horizontal:[],vertical:[]},p(o,(function(e){e&&(e=e.original||e,t.horizontal.push(e.y),t.vertical.push(e.x))})),t}(r),a=r.hover,l=a&&n(a,e),c=e.x,u=e.y;if(s){var h=c-(i=t(l?s.vertical.concat([l.x]):s.vertical,c)),d=u-(o=t(l?s.horizontal.concat([l.y]):s.horizontal,u));M(e,{dx:e.dx-h,dy:e.dy-d,x:e.x-h,y:e.y-d}),(h||-1!==s.vertical.indexOf(c))&&tu(e,"x",i),(d||-1!==s.horizontal.indexOf(u))&&tu(e,"y",o)}}))}ru.$inject=["eventBus"];var su={__depends__:[uc,gc],__init__:["bendpoints","bendpointSnapping","bendpointMovePreview"],bendpoints:["type",Mc],bendpointMove:["type",jc],bendpointMovePreview:["type",zc],connectionSegmentMove:["type",Gc],bendpointSnapping:["type",ru]};const au=new Pa;function lu(e){this._scheduled={},e.on("diagram.destroy",(()=>{Object.keys(this._scheduled).forEach((e=>{this.cancel(e)}))}))}lu.$inject=["eventBus"],lu.prototype.schedule=function(e,t=au.next()){this.cancel(t);const n=this._schedule(e,t);return this._scheduled[t]=n,n.promise},lu.prototype._schedule=function(e,t){const n=function(){const e={};return e.promise=new Promise(((t,n)=>{e.resolve=t,e.reject=n})),e}(),i=setTimeout((()=>{try{this._scheduled[t]=null;try{n.resolve(e())}catch(e){n.reject(e)}}catch(e){console.error("Scheduler#_schedule execution failed",e)}}));return{executionId:i,promise:n.promise}},lu.prototype.cancel=function(e){const t=this._scheduled[e];t&&(this._cancel(t),this._scheduled[e]=null)},lu.prototype._cancel=function(e){clearTimeout(e.executionId)};var cu={scheduler:["type",lu]},uu=".entry";function hu(e,t,n,i){this._canvas=e,this._elementRegistry=t,this._eventBus=n,this._scheduler=i,this._current=null,this._init()}hu.$inject=["canvas","elementRegistry","eventBus","scheduler"],hu.prototype._init=function(){var e=this;this._eventBus.on("selection.changed",(function(t){var n=t.newSelection,i=n.length?1===n.length?n[0]:n:null;i?e.open(i,!0):e.close()})),this._eventBus.on("elements.changed",(function(t){var n=t.elements,i=e._current;if(i){var o=i.target,s=r(o)?o:[o];if(s.filter((function(e){return n.includes(e)})).length){e.close();var a=s.filter((function(t){return e._elementRegistry.get(t.id)}));a.length&&e._updateAndOpen(a.length>1?a:a[0])}}})),this._eventBus.on("canvas.viewbox.changed",(function(){e._updatePosition()})),this._eventBus.on("element.marker.update",(function(t){if(e.isOpen()){var n=t.element,i=e._current;(r(i.target)?i.target:[i.target]).includes(n)&&e._updateVisibility()}})),this._container=this._createContainer()},hu.prototype._createContainer=function(){var e=Gt('<div class="djs-context-pad-parent"></div>');return this._canvas.getContainer().appendChild(e),e},hu.prototype.registerProvider=function(e,t){t||(t=e,e=1e3),this._eventBus.on("contextPad.getProviders",e,(function(e){e.providers.push(t)}))},hu.prototype.getEntries=function(e){var t=this._getProviders(),n=r(e)?"getMultiElementContextPadEntries":"getContextPadEntries",i={};return p(t,(function(t){if(l(t[n])){var o=t[n](e);l(o)?i=o(i):p(o,(function(e,t){i[t]=e}))}})),i},hu.prototype.trigger=function(e,t,n){var i,o,r=this,s=t.delegateTarget||t.target;return s?(i=Pt(s,"data-action"),o=t.originalEvent||t,"mouseover"!==e?"mouseout"===e?(clearTimeout(this._timeout),void(this._mouseout&&(this._mouseout(),this._mouseout=null))):this.triggerEntry(i,e,o,n):void(this._timeout=setTimeout((function(){r._mouseout=r.triggerEntry(i,"hover",o,n)}),300))):t.preventDefault()},hu.prototype.triggerEntry=function(e,t,n,i){if(this.isShown()){var o=this._current.target,r=this._current.entries[e];if(r){var s=r.action;if(!1!==this._eventBus.fire("contextPad.trigger",{entry:r,event:n})){if(l(s)){if("click"===t)return s(n,o,i)}else if(s[t])return s[t](n,o,i);n.preventDefault()}}}},hu.prototype.open=function(e,t){!t&&this.isOpen(e)||(this.close(),this._updateAndOpen(e))},hu.prototype._getProviders=function(){var e=this._eventBus.createEvent({type:"contextPad.getProviders",providers:[]});return this._eventBus.fire(e),e.providers},hu.prototype._updateAndOpen=function(e){var t,n=this.getEntries(e),i=this._createHtml(e);p(n,(function(e,n){var o,s=e.group||"default",a=Gt(e.html||'<div class="entry" draggable="true"></div>');Pt(a,"data-action",n),(o=Zt("[data-group="+al(s)+"]",i))||(Pt(o=Gt('<div class="group"></div>'),"data-group",s),i.appendChild(o)),o.appendChild(a),e.className&&function(e,t){var n=$t(e);t=r(t)?t:t.split(/\s+/g),t.forEach((function(e){n.add(e)}))}(a,e.className),e.title&&Pt(a,"title",e.title),e.imageUrl&&(Pt(t=Gt("<img>"),"src",e.imageUrl),t.style.width="100%",t.style.height="100%",a.appendChild(t))})),$t(i).add("open"),this._current={entries:n,html:i,target:e},this._updatePosition(),this._updateVisibility(),this._eventBus.fire("contextPad.open",{current:this._current})},hu.prototype._createHtml=function(e){var t=this,n=Gt('<div class="djs-context-pad"></div>');return Wt.bind(n,uu,"click",(function(e){t.trigger("click",e)})),Wt.bind(n,uu,"dragstart",(function(e){t.trigger("dragstart",e)})),Wt.bind(n,uu,"mouseover",(function(e){t.trigger("mouseover",e)})),Wt.bind(n,uu,"mouseout",(function(e){t.trigger("mouseout",e)})),zt.bind(n,"mousedown",(function(e){e.stopPropagation()})),this._container.appendChild(n),this._eventBus.fire("contextPad.create",{target:e,pad:n}),n},hu.prototype.getPad=function(e){let t;return console.warn(new Error("ContextPad#getPad is deprecated and will be removed in future library versions, cf. https://github.com/bpmn-io/diagram-js/pull/888")),t=this.isOpen()&&function(e,t){return e=r(e)?e:[e],t=r(t)?t:[t],e.length===t.length&&g(e,(function(e){return t.includes(e)}))}(this._current.target,e)?this._current.html:this._createHtml(e),{html:t}},hu.prototype.close=function(){this.isOpen()&&(clearTimeout(this._timeout),this._container.innerHTML="",this._eventBus.fire("contextPad.close",{current:this._current}),this._current=null)},hu.prototype.isOpen=function(e){var t=this._current;if(!t)return!1;if(!e)return!0;var n=t.target;return r(e)===r(n)&&(r(e)?e.length===n.length&&g(e,(function(e){return n.includes(e)})):n===e)},hu.prototype.isShown=function(){return this.isOpen()&&$t(this._current.html).has("open")},hu.prototype.show=function(){this.isOpen()&&($t(this._current.html).add("open"),this._updatePosition(),this._eventBus.fire("contextPad.show",{current:this._current}))},hu.prototype.hide=function(){this.isOpen()&&($t(this._current.html).remove("open"),this._eventBus.fire("contextPad.hide",{current:this._current}))},hu.prototype._getPosition=function(e){if(!r(e)&&co(e)){var t=this._canvas.viewbox(),n=(s=e).waypoints[s.waypoints.length-1],i=n.x*t.scale-t.x*t.scale,o=n.y*t.scale-t.y*t.scale;return{left:i+8*this._canvas.zoom(),top:o}}var s,a=this._canvas.getContainer().getBoundingClientRect(),l=this._getTargetBounds(e);return{left:l.right-a.left+8*this._canvas.zoom(),top:l.top-a.top}},hu.prototype._updatePosition=function(){this._scheduler.schedule((()=>{if(this.isOpen()){var e=this._current.html,t=this._getPosition(this._current.target);"x"in t&&"y"in t?(e.style.left=t.x+"px",e.style.top=t.y+"px"):["top","right","bottom","left"].forEach((function(n){n in t&&(e.style[n]=t[n]+"px")}))}}),"ContextPad#_updatePosition")},hu.prototype._updateVisibility=function(){this._scheduler.schedule((()=>{if(this.isOpen()){var e=this,t=this._current.target;(r(t)?t:[t]).some((function(t){return e._canvas.hasMarker(t,"djs-element-hidden")}))?e.hide():e.show()}}),"ContextPad#_updateVisibility")},hu.prototype._getTargetBounds=function(e){var t=this;return(r(e)?e:[e]).map((function(e){return t._canvas.getGraphics(e)})).reduce((function(e,t){const n=t.getBoundingClientRect();return e.top=Math.min(e.top,n.top),e.right=Math.max(e.right,n.right),e.bottom=Math.max(e.bottom,n.bottom),e.left=Math.min(e.left,n.left),e.x=e.left,e.y=e.top,e.width=e.right-e.left,e.height=e.bottom-e.top,e}),{top:1/0,right:-1/0,bottom:-1/0,left:1/0})};var du={__depends__:[Oa,cu,La],contextPad:["type",hu]};function pu(e,t,n,i){function r(e,t){return i.allowed("connection.create",{source:e,target:t})}e.on("connect.hover",(function(e){var t,n=e.context,i=n.start,s=e.hover;if(n.hover=s,!o(t=n.canExecute=r(i,s))){if(!1!==t)return n.source=i,void(n.target=s);o(t=n.canExecute=r(s,i))||!1!==t&&(n.source=s,n.target=i)}})),e.on(["connect.out","connect.cleanup"],(function(e){var t=e.context;t.hover=null,t.source=null,t.target=null,t.canExecute=!1})),e.on("connect.end",(function(e){var t=e.context,i=t.canExecute,o=t.connectionStart,r={x:e.x,y:e.y},a=t.source,l=t.target;if(!i)return!1;var c=null,u={connectionStart:fu(t)?r:o,connectionEnd:fu(t)?o:r};s(i)&&(c=i),t.connection=n.connect(a,l,c,u)})),this.start=function(e,n,i,o){s(i)||(o=i,i=mo(n)),t.init(e,"connect",{autoActivate:o,data:{shape:n,context:{start:n,connectionStart:i}}})}}function fu(e){var t=e.hover,n=e.source,i=e.target;return t&&n&&t===n&&n!==i}pu.$inject=["eventBus","dragging","modeling","rules"];var gu="connect-ok",mu="connect-not-ok";function vu(e,t,n){var i=e.get("connectionPreview",!1);i&&t.on("connect.move",(function(e){var t=e.context,n=t.canExecute,o=t.hover,r=t.source,s=t.start,a=t.startPosition,l=t.target,c=t.connectionStart||a,u=t.connectionEnd||{x:e.x,y:e.y},h=c,d=u;fu(t)&&(h=u,d=c),i.drawPreview(t,n,{source:r||s,target:l||o,connectionStart:h,connectionEnd:d})})),t.on("connect.hover",900,(function(e){var t=e.context,i=e.hover,o=t.canExecute;null!==o&&n.addMarker(i,o?gu:mu)})),t.on(["connect.out","connect.cleanup"],1100,(function(e){var t=e.hover;t&&(n.removeMarker(t,gu),n.removeMarker(t,mu))})),i&&t.on("connect.cleanup",(function(e){i.cleanUp(e.context)}))}vu.$inject=["injector","eventBus","canvas"];var yu={__depends__:[Aa,gc,uc],__init__:["connectPreview"],connect:["type",pu],connectPreview:["type",vu]};const xu=new Pa("ps");var bu=["marker-start","marker-mid","marker-end"],_u=["circle","ellipse","line","path","polygon","polyline","path","rect"];function wu(e,t,n,i){this._elementRegistry=e,this._canvas=n,this._styles=i}wu.$inject=["elementRegistry","eventBus","canvas","styles"],wu.prototype.cleanUp=function(){console.warn("PreviewSupport#cleanUp is deprecated and will be removed in future versions. You do not need to manually clean up previews anymore. cf. https://github.com/bpmn-io/diagram-js/pull/906")},wu.prototype.getGfx=function(e){return this._elementRegistry.getGraphics(e)},wu.prototype.addDragger=function(e,t,n,i="djs-dragger"){var o=qn(n=n||this.getGfx(e)),r=n.getBoundingClientRect();return this._cloneMarkers(Vo(o),i),jn(o,this._styles.cls(i,[],{x:r.top,y:r.left})),An(t,o),jn(o,"data-preview-support-element-id",e.id),o},wu.prototype.addFrame=function(e,t){var n=Qn("rect",{class:"djs-resize-overlay",width:e.width,height:e.height,x:e.x,y:e.y});return An(t,n),jn(n,"data-preview-support-element-id",e.id),n},wu.prototype._cloneMarkers=function(e,t="djs-dragger",n=e){var i=this;e.childNodes&&e.childNodes.forEach((e=>{i._cloneMarkers(e,t,n)})),function(e){return-1!==_u.indexOf(e.nodeName)}(e)&&bu.forEach((function(o){if(jn(e,o)){var r=function(e,t,n){var i=(o=jn(e,t),o.match(/url\(['"]?#([^'"]*)['"]?\)/)[1]);var o;return Zt("marker#"+i,n||document)}(e,o,i._canvas.getContainer());r&&i._cloneMarker(n,e,r,o,t)}}))},wu.prototype._cloneMarker=function(e,t,n,i,o="djs-dragger"){var r=[n.id,o,xu.next()].join("-"),s=Zt("marker#"+n.id,e);e=e||this._canvas._svg;var a=s||qn(n);a.id=r,Bn(a).add(o);var l=Zt(":scope > defs",e);l||An(e,l=Qn("defs")),An(l,a);var c=function(e){return"url(#"+e+")"}(a.id);jn(t,i,c)};var Cu={__init__:["previewSupport"],previewSupport:["type",wu]},Ou="drop-ok",ku="drop-not-ok",Eu="attach-ok",Su="new-parent",Ru="create";function Tu(e,t,n,i,o){function s(t,n){[Eu,Ou,ku,Su].forEach((function(i){i===n?e.addMarker(t,i):e.removeMarker(t,i)}))}function l(){var e=t.context();e&&e.prefix===Ru&&t.cancel()}n.on(["create.move","create.hover"],(function(e){var t=e.context,n=t.elements,i=e.hover,r=t.source,a=t.hints||{};if(!i)return t.canExecute=!1,void(t.target=null);Mu(e);var l={x:e.x,y:e.y},c=t.canExecute=i&&function(e,t,n,i,r){if(!t)return!1;var s=h(e=d(e,(function(t){var n=t.labelTarget;return!(t.parent||uo(t)&&-1!==e.indexOf(n))})),(function(e){return!co(e)})),a=!1,l=!1,c=!1;Au(e)&&(a=o.allowed("shape.attach",{position:n,shape:s,target:t})),a||(c=Au(e)?o.allowed("shape.create",{position:n,shape:s,source:i,target:t}):o.allowed("elements.create",{elements:e,position:n,target:t}));var u=r.connectionTarget;return c||a?(s&&i&&(l=o.allowed("connection.create",{source:u===i?s:i,target:u===i?i:s,hints:{targetParent:t,targetAttach:a}})),{attach:a,connect:l}):(null===c||null===a)&&null}(n,i,l,r,a);i&&null!==c&&(t.target=i,c&&c.attach?s(i,Eu):s(i,c?Su:ku))})),n.on(["create.end","create.out","create.cleanup"],(function(e){var t=e.hover;t&&s(t,null)})),n.on("create.end",(function(e){var t=e.context,n=t.source,o=t.shape,r=t.elements,s=t.target,a=t.canExecute,l=a&&a.attach,c=a&&a.connect,u=t.hints||{};if(!1===a||!s)return!1;Mu(e);var d={x:e.x,y:e.y};o=c?i.appendShape(n,o,d,s,{attach:l,connection:!0===c?{}:c,connectionTarget:u.connectionTarget}):h(r=i.createElements(r,d,s,M({},u,{attach:l})),(function(e){return!co(e)})),M(t,{elements:r,shape:o}),M(e,{elements:r,shape:o})})),n.on("create.init",(function(){n.on("elements.changed",l),n.once(["create.cancel","create.end"],2e3,(function(){n.off("elements.changed",l)}))})),this.start=function(e,n,i){r(n)||(n=[n]);var o=h(n,(function(e){return!co(e)}));if(o){i=M({elements:n,hints:{},shape:o},i||{}),p(n,(function(e){a(e.x)||(e.x=0),a(e.y)||(e.y=0)}));var s=mi(d(n,(function(e){return!e.hidden})));p(n,(function(e){co(e)&&(e.waypoints=v(e.waypoints,(function(e){return{x:e.x-s.x-s.width/2,y:e.y-s.y-s.height/2}}))),M(e,{x:e.x-s.x-s.width/2,y:e.y-s.y-s.height/2})})),t.init(e,Ru,{cursor:"grabbing",autoActivate:!0,data:{shape:o,elements:n,context:i}})}}}function Mu(e){var t=e.context.createConstraints;t&&(t.left&&(e.x=Math.max(e.x,t.left)),t.right&&(e.x=Math.min(e.x,t.right)),t.top&&(e.y=Math.max(e.y,t.top)),t.bottom&&(e.y=Math.min(e.y,t.bottom)))}function Au(e){return e&&1===e.length&&!co(e[0])}Tu.$inject=["canvas","dragging","eventBus","modeling","rules"];function Pu(e,t,n,i,o){t.on("create.move",750,(function(t){var r=t.hover,s=t.context,a=s.elements,l=s.dragGroup;l||(l=s.dragGroup=function(e){var t=Qn("g");jn(t,o.cls("djs-drag-group",["no-events"]));var r=Qn("g");return e.forEach((function(e){var o;e.hidden||(e.waypoints?(o=n._createContainer("connection",r),n.drawConnection(Vo(o),e)):(o=n._createContainer("shape",r),n.drawShape(Vo(o),e),Fo(o,e.x,e.y)),i.addDragger(e,t,o))})),t}(a)),r?(l.parentNode||An(e.getActiveLayer(),l),Fo(l,t.x,t.y)):ti(l)})),t.on("create.cleanup",(function(e){var t=e.context.dragGroup;t&&ti(t)}))}Pu.$inject=["canvas","eventBus","graphicsFactory","previewSupport","styles"];var Du,$u,ju,Iu,Bu,Lu,Nu,qu,Vu,Fu,zu={__depends__:[uc,Cu,gc,Aa],__init__:["create","createPreview"],create:["type",Tu],createPreview:["type",Pu]},Qu={},Hu=[],Wu=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Uu=Array.isArray;function Xu(e,t){for(var n in t)e[n]=t[n];return e}function Ku(e){var t=e.parentNode;t&&t.removeChild(e)}function Gu(e,t,n){var i,o,r,s={};for(r in t)"key"==r?i=t[r]:"ref"==r?o=t[r]:s[r]=t[r];if(arguments.length>2&&(s.children=arguments.length>3?Du.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(r in e.defaultProps)void 0===s[r]&&(s[r]=e.defaultProps[r]);return Yu(e,s,i,o,null)}function Yu(e,t,n,i,o){var r={type:e,props:t,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==o?++ju:o,__i:-1,__u:0};return null==o&&null!=$u.vnode&&$u.vnode(r),r}function Zu(e){return e.children}function Ju(e,t){this.props=e,this.context=t}function eh(e,t){if(null==t)return e.__?eh(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?eh(e):null}function th(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return th(e)}}function nh(e){(!e.__d&&(e.__d=!0)&&Iu.push(e)&&!ih.__r++||Bu!==$u.debounceRendering)&&((Bu=$u.debounceRendering)||Lu)(ih)}function ih(){var e,t,n,i,o,r,s,a;for(Iu.sort(Nu);e=Iu.shift();)e.__d&&(t=Iu.length,i=void 0,r=(o=(n=e).__v).__e,s=[],a=[],n.__P&&((i=Xu({},o)).__v=o.__v+1,$u.vnode&&$u.vnode(i),hh(n.__P,i,o,n.__n,void 0!==n.__P.ownerSVGElement,32&o.__u?[r]:null,s,null==r?eh(o):r,!!(32&o.__u),a),i.__v=o.__v,i.__.__k[i.__i]=i,dh(s,i,a),i.__e!=r&&th(i)),Iu.length>t&&Iu.sort(Nu));ih.__r=0}function oh(e,t,n,i,o,r,s,a,l,c,u){var h,d,p,f,g,m=i&&i.__k||Hu,v=t.length;for(n.__d=l,rh(n,t,m),l=n.__d,h=0;h<v;h++)null!=(p=n.__k[h])&&"boolean"!=typeof p&&"function"!=typeof p&&(d=-1===p.__i?Qu:m[p.__i]||Qu,p.__i=h,hh(e,p,d,o,r,s,a,l,c,u),f=p.__e,p.ref&&d.ref!=p.ref&&(d.ref&&ph(d.ref,null,p),u.push(p.ref,p.__c||f,p)),null==g&&null!=f&&(g=f),65536&p.__u||d.__k===p.__k?(l&&!l.isConnected&&(l=eh(d)),l=sh(p,l,e)):"function"==typeof p.type&&void 0!==p.__d?l=p.__d:f&&(l=f.nextSibling),p.__d=void 0,p.__u&=-196609);n.__d=l,n.__e=g}function rh(e,t,n){var i,o,r,s,a,l=t.length,c=n.length,u=c,h=0;for(e.__k=[],i=0;i<l;i++)s=i+h,null!=(o=e.__k[i]=null==(o=t[i])||"boolean"==typeof o||"function"==typeof o?null:"string"==typeof o||"number"==typeof o||"bigint"==typeof o||o.constructor==String?Yu(null,o,null,null,null):Uu(o)?Yu(Zu,{children:o},null,null,null):void 0===o.constructor&&o.__b>0?Yu(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o)?(o.__=e,o.__b=e.__b+1,a=ah(o,n,s,u),o.__i=a,r=null,-1!==a&&(u--,(r=n[a])&&(r.__u|=131072)),null==r||null===r.__v?(-1==a&&h--,"function"!=typeof o.type&&(o.__u|=65536)):a!==s&&(a===s+1?h++:a>s?u>l-s?h+=a-s:h--:a<s?a==s-1&&(h=a-s):h=0,a!==i+h&&(o.__u|=65536))):(r=n[s])&&null==r.key&&r.__e&&!(131072&r.__u)&&(r.__e==e.__d&&(e.__d=eh(r)),fh(r,r,!1),n[s]=null,u--);if(u)for(i=0;i<c;i++)null!=(r=n[i])&&!(131072&r.__u)&&(r.__e==e.__d&&(e.__d=eh(r)),fh(r,r))}function sh(e,t,n){var i,o;if("function"==typeof e.type){for(i=e.__k,o=0;i&&o<i.length;o++)i[o]&&(i[o].__=e,t=sh(i[o],t,n));return t}e.__e!=t&&(n.insertBefore(e.__e,t||null),t=e.__e);do{t=t&&t.nextSibling}while(null!=t&&8===t.nodeType);return t}function ah(e,t,n,i){var o=e.key,r=e.type,s=n-1,a=n+1,l=t[n];if(null===l||l&&o==l.key&&r===l.type&&!(131072&l.__u))return n;if(i>(null==l||131072&l.__u?0:1))for(;s>=0||a<t.length;){if(s>=0){if((l=t[s])&&!(131072&l.__u)&&o==l.key&&r===l.type)return s;s--}if(a<t.length){if((l=t[a])&&!(131072&l.__u)&&o==l.key&&r===l.type)return a;a++}}return-1}function lh(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||Wu.test(t)?n:n+"px"}function ch(e,t,n,i,o){var r;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof i&&(e.style.cssText=i=""),i)for(t in i)n&&t in n||lh(e.style,t,"");if(n)for(t in n)i&&n[t]===i[t]||lh(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])r=t!==(t=t.replace(/(PointerCapture)$|Capture$/i,"$1")),t=t.toLowerCase()in e||"onFocusOut"===t||"onFocusIn"===t?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+r]=n,n?i?n.u=i.u:(n.u=qu,e.addEventListener(t,r?Fu:Vu,r)):e.removeEventListener(t,r?Fu:Vu,r);else{if(o)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=t&&"height"!=t&&"href"!=t&&"list"!=t&&"form"!=t&&"tabIndex"!=t&&"download"!=t&&"rowSpan"!=t&&"colSpan"!=t&&"role"!=t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&"-"!==t[4]?e.removeAttribute(t):e.setAttribute(t,n))}}function uh(e){return function(t){if(this.l){var n=this.l[t.type+e];if(null==t.t)t.t=qu++;else if(t.t<n.u)return;return n($u.event?$u.event(t):t)}}}function hh(e,t,n,i,o,r,s,a,l,c){var u,h,d,p,f,g,m,v,y,x,b,_,w,C,O,k=t.type;if(void 0!==t.constructor)return null;128&n.__u&&(l=!!(32&n.__u),r=[a=t.__e=n.__e]),(u=$u.__b)&&u(t);e:if("function"==typeof k)try{if(v=t.props,y=(u=k.contextType)&&i[u.__c],x=u?y?y.props.value:u.__:i,n.__c?m=(h=t.__c=n.__c).__=h.__E:("prototype"in k&&k.prototype.render?t.__c=h=new k(v,x):(t.__c=h=new Ju(v,x),h.constructor=k,h.render=gh),y&&y.sub(h),h.props=v,h.state||(h.state={}),h.context=x,h.__n=i,d=h.__d=!0,h.__h=[],h._sb=[]),null==h.__s&&(h.__s=h.state),null!=k.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=Xu({},h.__s)),Xu(h.__s,k.getDerivedStateFromProps(v,h.__s))),p=h.props,f=h.state,h.__v=t,d)null==k.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else{if(null==k.getDerivedStateFromProps&&v!==p&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(v,x),!h.__e&&(null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(v,h.__s,x)||t.__v===n.__v)){for(t.__v!==n.__v&&(h.props=v,h.state=h.__s,h.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach((function(e){e&&(e.__=t)})),b=0;b<h._sb.length;b++)h.__h.push(h._sb[b]);h._sb=[],h.__h.length&&s.push(h);break e}null!=h.componentWillUpdate&&h.componentWillUpdate(v,h.__s,x),null!=h.componentDidUpdate&&h.__h.push((function(){h.componentDidUpdate(p,f,g)}))}if(h.context=x,h.props=v,h.__P=e,h.__e=!1,_=$u.__r,w=0,"prototype"in k&&k.prototype.render){for(h.state=h.__s,h.__d=!1,_&&_(t),u=h.render(h.props,h.state,h.context),C=0;C<h._sb.length;C++)h.__h.push(h._sb[C]);h._sb=[]}else do{h.__d=!1,_&&_(t),u=h.render(h.props,h.state,h.context),h.state=h.__s}while(h.__d&&++w<25);h.state=h.__s,null!=h.getChildContext&&(i=Xu(Xu({},i),h.getChildContext())),d||null==h.getSnapshotBeforeUpdate||(g=h.getSnapshotBeforeUpdate(p,f)),oh(e,Uu(O=null!=u&&u.type===Zu&&null==u.key?u.props.children:u)?O:[O],t,n,i,o,r,s,a,l,c),h.base=t.__e,t.__u&=-161,h.__h.length&&s.push(h),m&&(h.__E=h.__=null)}catch(e){t.__v=null,l||null!=r?(t.__e=a,t.__u|=l?160:32,r[r.indexOf(a)]=null):(t.__e=n.__e,t.__k=n.__k),$u.__e(e,t,n)}else null==r&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=function(e,t,n,i,o,r,s,a,l){var c,u,h,d,p,f,g,m=n.props,v=t.props,y=t.type;if("svg"===y&&(o=!0),null!=r)for(c=0;c<r.length;c++)if((p=r[c])&&"setAttribute"in p==!!y&&(y?p.localName===y:3===p.nodeType)){e=p,r[c]=null;break}if(null==e){if(null===y)return document.createTextNode(v);e=o?document.createElementNS("http://www.w3.org/2000/svg",y):document.createElement(y,v.is&&v),r=null,a=!1}if(null===y)m===v||a&&e.data===v||(e.data=v);else{if(r=r&&Du.call(e.childNodes),m=n.props||Qu,!a&&null!=r)for(m={},c=0;c<e.attributes.length;c++)m[(p=e.attributes[c]).name]=p.value;for(c in m)p=m[c],"children"==c||("dangerouslySetInnerHTML"==c?h=p:"key"===c||c in v||ch(e,c,null,p,o));for(c in v)p=v[c],"children"==c?d=p:"dangerouslySetInnerHTML"==c?u=p:"value"==c?f=p:"checked"==c?g=p:"key"===c||a&&"function"!=typeof p||m[c]===p||ch(e,c,p,m[c],o);if(u)a||h&&(u.__html===h.__html||u.__html===e.innerHTML)||(e.innerHTML=u.__html),t.__k=[];else if(h&&(e.innerHTML=""),oh(e,Uu(d)?d:[d],t,n,i,o&&"foreignObject"!==y,r,s,r?r[0]:n.__k&&eh(n,0),a,l),null!=r)for(c=r.length;c--;)null!=r[c]&&Ku(r[c]);a||(c="value",void 0!==f&&(f!==e[c]||"progress"===y&&!f||"option"===y&&f!==m[c])&&ch(e,c,f,m[c],!1),c="checked",void 0!==g&&g!==e[c]&&ch(e,c,g,m[c],!1))}return e}(n.__e,t,n,i,o,r,s,l,c);(u=$u.diffed)&&u(t)}function dh(e,t,n){t.__d=void 0;for(var i=0;i<n.length;i++)ph(n[i],n[++i],n[++i]);$u.__c&&$u.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){$u.__e(e,t.__v)}}))}function ph(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){$u.__e(e,n)}}function fh(e,t,n){var i,o;if($u.unmount&&$u.unmount(e),(i=e.ref)&&(i.current&&i.current!==e.__e||ph(i,null,t)),null!=(i=e.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(e){$u.__e(e,t)}i.base=i.__P=null}if(i=e.__k)for(o=0;o<i.length;o++)i[o]&&fh(i[o],t,n||"function"!=typeof e.type);n||null==e.__e||Ku(e.__e),e.__c=e.__=e.__e=e.__d=void 0}function gh(e,t,n){return this.constructor(e,n)}function mh(e,t,n){var i,o,r,s;$u.__&&$u.__(e,t),o=(i="function"==typeof n)?null:t.__k,r=[],s=[],hh(t,e=(!i&&n||t).__k=Gu(Zu,null,[e]),o||Qu,Qu,void 0!==t.ownerSVGElement,!i&&n?[n]:o?null:t.firstChild?Du.call(t.childNodes):null,r,!i&&n?n:o?o.__e:t.firstChild,i,s),dh(r,e,s)}Du=Hu.slice,$u={__e:function(e,t,n,i){for(var o,r,s;t=t.__;)if((o=t.__c)&&!o.__)try{if((r=o.constructor)&&null!=r.getDerivedStateFromError&&(o.setState(r.getDerivedStateFromError(e)),s=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(e,i||{}),s=o.__d),s)return o.__E=o}catch(t){e=t}throw e}},ju=0,Ju.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=Xu({},this.state),"function"==typeof e&&(e=e(Xu({},n),this.props)),e&&Xu(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),nh(this))},Ju.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),nh(this))},Ju.prototype.render=Zu,Iu=[],Lu="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Nu=function(e,t){return e.__v.__b-t.__v.__b},ih.__r=0,qu=0,Vu=uh(!1),Fu=uh(!0);var vh=function(e,t,n,i){var o;t[0]=0;for(var r=1;r<t.length;r++){var s=t[r++],a=t[r]?(t[0]|=s?1:2,n[t[r++]]):t[++r];3===s?i[0]=a:4===s?i[1]=Object.assign(i[1]||{},a):5===s?(i[1]=i[1]||{})[t[++r]]=a:6===s?i[1][t[++r]]+=a+"":s?(o=e.apply(a,vh(e,a,n,["",null])),i.push(o),a[0]?t[0]|=2:(t[r-2]=0,t[r]=o)):i.push(a)}return i},yh=new Map;var xh,bh,_h,wh,Ch=function(e){var t=yh.get(this);return t||(t=new Map,yh.set(this,t)),(t=vh(this,t.get(e)||(t.set(e,t=function(e){for(var t,n,i=1,o="",r="",s=[0],a=function(e){1===i&&(e||(o=o.replace(/^\s*\n\s*|\s*\n\s*$/g,"")))?s.push(0,e,o):3===i&&(e||o)?(s.push(3,e,o),i=2):2===i&&"..."===o&&e?s.push(4,e,0):2===i&&o&&!e?s.push(5,0,!0,o):i>=5&&((o||!e&&5===i)&&(s.push(i,0,o,n),i=6),e&&(s.push(i,e,0,n),i=6)),o=""},l=0;l<e.length;l++){l&&(1===i&&a(),a(l));for(var c=0;c<e[l].length;c++)t=e[l][c],1===i?"<"===t?(a(),s=[s],i=3):o+=t:4===i?"--"===o&&">"===t?(i=1,o=""):o=t+o[0]:r?t===r?r="":o+=t:'"'===t||"'"===t?r=t:">"===t?(a(),i=1):i&&("="===t?(i=5,n=o,o=""):"/"===t&&(i<5||">"===e[l][c+1])?(a(),3===i&&(s=s[0]),i=s,(s=s[0]).push(2,0,i),i=0):" "===t||"\t"===t||"\n"===t||"\r"===t?(a(),i=2):o+=t),3===i&&"!--"===o&&(i=4,s=s[0])}return a(),s}(e)),t),arguments,[])).length>1?t:t[0]}.bind(Gu),Oh=0,kh=[],Eh=[],Sh=$u,Rh=Sh.__b,Th=Sh.__r,Mh=Sh.diffed,Ah=Sh.__c,Ph=Sh.unmount,Dh=Sh.__;function $h(e,t){Sh.__h&&Sh.__h(bh,e,Oh||t),Oh=0;var n=bh.__H||(bh.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:Eh}),n.__[e]}function jh(e){return Oh=1,function(e,t,n){var i=$h(xh++,2);if(i.t=e,!i.__c&&(i.__=[Uh(void 0,t),function(e){var t=i.__N?i.__N[0]:i.__[0],n=i.t(t,e);t!==n&&(i.__N=[n,i.__[1]],i.__c.setState({}))}],i.__c=bh,!bh.u)){var o=function(e,t,n){if(!i.__c.__H)return!0;var o=i.__c.__H.__.filter((function(e){return!!e.__c}));if(o.every((function(e){return!e.__N})))return!r||r.call(this,e,t,n);var s=!1;return o.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(s=!0)}})),!(!s&&i.__c.props===e)&&(!r||r.call(this,e,t,n))};bh.u=!0;var r=bh.shouldComponentUpdate,s=bh.componentWillUpdate;bh.componentWillUpdate=function(e,t,n){if(this.__e){var i=r;r=void 0,o(e,t,n),r=i}s&&s.call(this,e,t,n)},bh.shouldComponentUpdate=o}return i.__N||i.__}(Uh,e)}function Ih(e,t){var n=$h(xh++,3);!Sh.__s&&Wh(n.__H,t)&&(n.__=e,n.i=t,bh.__H.__h.push(n))}function Bh(e,t){var n=$h(xh++,4);!Sh.__s&&Wh(n.__H,t)&&(n.__=e,n.i=t,bh.__h.push(n))}function Lh(e){return Oh=5,Nh((function(){return{current:e}}),[])}function Nh(e,t){var n=$h(xh++,7);return Wh(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function qh(e,t){return Oh=8,Nh((function(){return e}),t)}function Vh(){for(var e;e=kh.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Qh),e.__H.__h.forEach(Hh),e.__H.__h=[]}catch(t){e.__H.__h=[],Sh.__e(t,e.__v)}}Sh.__b=function(e){bh=null,Rh&&Rh(e)},Sh.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Dh&&Dh(e,t)},Sh.__r=function(e){Th&&Th(e),xh=0;var t=(bh=e.__c).__H;t&&(_h===bh?(t.__h=[],bh.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=Eh,e.__N=e.i=void 0}))):(t.__h.forEach(Qh),t.__h.forEach(Hh),t.__h=[],xh=0)),_h=bh},Sh.diffed=function(e){Mh&&Mh(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==kh.push(t)&&wh===Sh.requestAnimationFrame||((wh=Sh.requestAnimationFrame)||zh)(Vh)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==Eh&&(e.__=e.__V),e.i=void 0,e.__V=Eh}))),_h=bh=null},Sh.__c=function(e,t){t.some((function(e){try{e.__h.forEach(Qh),e.__h=e.__h.filter((function(e){return!e.__||Hh(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],Sh.__e(n,e.__v)}})),Ah&&Ah(e,t)},Sh.unmount=function(e){Ph&&Ph(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{Qh(e)}catch(e){t=e}})),n.__H=void 0,t&&Sh.__e(t,n.__v))};var Fh="function"==typeof requestAnimationFrame;function zh(e){var t,n=function(){clearTimeout(i),Fh&&cancelAnimationFrame(t),setTimeout(e)},i=setTimeout(n,100);Fh&&(t=requestAnimationFrame(n))}function Qh(e){var t=bh,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),bh=t}function Hh(e){var t=bh;e.__c=e.__(),bh=t}function Wh(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function Uh(e,t){return"function"==typeof t?t(e):t}function Xh(e){var t,n,i="";if("string"==typeof e||"number"==typeof e)i+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Xh(e[t]))&&(i&&(i+=" "),i+=n)}else for(n in e)e[n]&&(i&&(i+=" "),i+=n);return i}function Kh(){for(var e,t,n=0,i="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Xh(e))&&(i&&(i+=" "),i+=t);return i}function Gh(e){const{headerEntries:t,onSelect:n,selectedEntry:i,setSelectedEntry:o,title:r}=e,s=Nh((()=>t.reduce(((e,t)=>{const n=t.group||"default",i=e.find((e=>e.id===n));return i?i.entries.push(t):e.push({id:n,entries:[t]}),e}),[])),[t]);return Ch` variable
/plugin/c3chart/assets/
H A Dd3.min.js2 …e&&define.amd?define(["exports"],n):n(t.d3=t.d3||{})})(this,function(t){"use strict";function n(t,…
/plugin/bpmnioeditor/vendor/bpmnio-js/
H A Dbpmn-modeler.production.min.js34 …s=function(e){if(e.CSS&&e.CSS.escape)return e.CSS.escape;var t=function(e){if(0==arguments.length)… class in AnonymousFunction238dff8748d00
/plugin/bpmnio/vendor/bpmn-js/dist/
H A Dbpmn-modeler.production.min.js194 `,this._current.container)},jc.prototype.open=function(e,t,n,i){if(!e)throw new Error("Element is missing");if(!t)throw new Error("No registered providers for: "+t);if(!n)throw global() class
/plugin/mermaid/
H A Dmermaid.min.js1324 `,Nu(Ia(t,e[0])))>=0;)++e[0]}function kD(t,e){this.e=e,this.a=Gee(t),this.a<54?this.f=qv(t):this.c=KD(t)}function JJt(t,e,n,r){Ai(),gv.call(this,26),this.c=t,this.a=e,this.d=n,this global() function
[all...]
/plugin/aichat/vendor/mehrab-wj/tiktoken-php/data/
H A Dencoder.json1 {"!": 0, "\"": 1, "#": 2, "$": 3, "%": 4, "&": 5, "'": 6, "(": 7, ")": 8, "*": 9, "+": 10, ",": 11, "-": 12, ".": 13, "/": 14, "0": 15, "1": 16, "2": 17, "3": 18, "4": 19, "5": 20, "6": 21, "7": 22, "8": 23, "9": 24, ":": 25, ";": 26, "<": 27, "=": 28, ">": 29, "?": 30, "@": 31, "A": 32, "B": 33, "C": 34, "D": 35, "E": 36, "F": 37, "G": 38, "H": 39, "I": 40, "J": 41, "K": 42, "L": 43, "M": 44, "N": 45, "O": 46, "P": 47, "Q": 48, "R": 49, "S": 50, "T": 51, "U": 52, "V": 53, "W": 54, "X": 55, "Y": 56, "Z": 57, "[": 58, "\\": 59, "]": 60, "^": 61, "_": 62, "`": 63, "a": 64, "b": 65, "c": 66, "d": 67, "e": 68, "f": 69, "g": 70, "h": 71, "i": 72, "j": 73, "k": 74, "l": 75, "m": 76, "n": 77, "o": 78, "p": 79, "q": 80, "r": 81, "s": 82, "t": 83, "u": 84, "v": 85, "w": 86, "x": 87, "y": 88, "z": 89, "{": 90, "|": 91, "}": 92, "~": 93, "\u00a1": 94, "\u00a2": 95, "\u00a3": 96, "\u00a4": 97, "\u00a5": 98, "\u00a6": 99, "\u00a7": 100, "\u00a8": 101, "\u00a9": 102, "\u00aa": 103, "\u00ab": 104, "\u00ac": 105, "\u00ae": 106, "\u00af": 107, "\u00b0": 108, "\u00b1": 109, "\u00b2": 110, "\u00b3": 111, "\u00b4": 112, "\u00b5": 113, "\u00b6": 114, "\u00b7": 115, "\u00b8": 116, "\u00b9": 117, "\u00ba": 118, "\u00bb": 119, "\u00bc": 120, "\u00bd": 121, "\u00be": 122, "\u00bf": 123, "\u00c0": 124, "\u00c1": 125, "\u00c2": 126, "\u00c3": 127, "\u00c4": 128, "\u00c5": 129, "\u00c6": 130, "\u00c7": 131, "\u00c8": 132, "\u00c9": 133, "\u00ca": 134, "\u00cb": 135, "\u00cc": 136, "\u00cd": 137, "\u00ce": 138, "\u00cf": 139, "\u00d0": 140, "\u00d1": 141, "\u00d2": 142, "\u00d3": 143, "\u00d4": 144, "\u00d5": 145, "\u00d6": 146, "\u00d7": 147, "\u00d8": 148, "\u00d9": 149, "\u00da": 150, "\u00db": 151, "\u00dc": 152, "\u00dd": 153, "\u00de": 154, "\u00df": 155, "\u00e0": 156, "\u00e1": 157, "\u00e2": 158, "\u00e3": 159, "\u00e4": 160, "\u00e5": 161, "\u00e6": 162, "\u00e7": 163, "\u00e8": 164, "\u00e9": 165, "\u00ea": 166, "\u00eb": 167, "\u00ec": 168, "\u00ed": 169, "\u00ee": 170, "\u00ef": 171, "\u00f0": 172, "\u00f1": 173, "\u00f2": 174, "\u00f3": 175, "\u00f4": 176, "\u00f5": 177, "\u00f6": 178, "\u00f7": 179, "\u00f8": 180, "\u00f9": 181, "\u00fa": 182, "\u00fb": 183, "\u00fc": 184, "\u00fd": 185, "\u00fe": 186, "\u00ff": 187, "\u0100": 188, "\u0101": 189, "\u0102": 190, "\u0103": 191, "\u0104": 192, "\u0105": 193, "\u0106": 194, "\u0107": 195, "\u0108": 196, "\u0109": 197, "\u010a": 198, "\u010b": 199, "\u010c": 200, "\u010d": 201, "\u010e": 202, "\u010f": 203, "\u0110": 204, "\u0111": 205, "\u0112": 206, "\u0113": 207, "\u0114": 208, "\u0115": 209, "\u0116": 210, "\u0117": 211, "\u0118": 212, "\u0119": 213, "\u011a": 214, "\u011b": 215, "\u011c": 216, "\u011d": 217, "\u011e": 218, "\u011f": 219, "\u0120": 220, "\u0121": 221, "\u0122": 222, "\u0123": 223, "\u0124": 224, "\u0125": 225, "\u0126": 226, "\u0127": 227, "\u0128": 228, "\u0129": 229, "\u012a": 230, "\u012b": 231, "\u012c": 232, "\u012d": 233, "\u012e": 234, "\u012f": 235, "\u0130": 236, "\u0131": 237, "\u0132": 238, "\u0133": 239, "\u0134": 240, "\u0135": 241, "\u0136": 242, "\u0137": 243, "\u0138": 244, "\u0139": 245, "\u013a": 246, "\u013b": 247, "\u013c": 248, "\u013d": 249, "\u013e": 250, "\u013f": 251, "\u0140": 252, "\u0141": 253, "\u0142": 254, "\u0143": 255, "\u0120t": 256, "\u0120a": 257, "he": 258, "in": 259, "re": 260, "on": 261, "\u0120the": 262, "er": 263, "\u0120s": 264, "at": 265, "\u0120w": 266, "\u0120o": 267, "en": 268, "\u0120c": 269, "it": 270, "is": 271, "an": 272, "or": 273, "es": 274, "\u0120b": 275, "ed": 276, "\u0120f": 277, "ing": 278, "\u0120p": 279, "ou": 280, "\u0120an": 281, "al": 282, "ar": 283, "\u0120to": 284, "\u0120m": 285, "\u0120of": 286, "\u0120in": 287, "\u0120d": 288, "\u0120h": 289, "\u0120and": 290, "ic": 291, "as": 292, "le": 293, "\u0120th": 294, "ion": 295, "om": 296, "ll": 297, "ent": 298, "\u0120n": 299, "\u0120l": 300, "st": 301, "\u0120re": 302, "ve": 303, "\u0120e": 304, "ro": 305, "ly": 306, "\u0120be": 307, "\u0120g": 308, "\u0120T": 309, "ct": 310, "\u0120S": 311, "id": 312, "ot": 313, "\u0120I": 314, "ut": 315, "et": 316, "\u0120A": 317, "\u0120is": 318, "\u0120on": 319, "im": 320, "am": 321, "ow": 322, "ay": 323, "ad": 324, "se": 325, "\u0120that": 326, "\u0120C": 327, "ig": 328, "\u0120for": 329, "ac": 330, "\u0120y": 331, "ver": 332, "ur": 333, "\u0120u": 334, "ld": 335, "\u0120st": 336, "\u0120M": 337, "'s": 338, "\u0120he": 339, "\u0120it": 340, "ation": 341, "ith": 342, "ir": 343, "ce": 344, "\u0120you": 345, "il": 346, "\u0120B": 347, "\u0120wh": 348, "ol": 349, "\u0120P": 350, "\u0120with": 351, "\u01201": 352, "ter": 353, "ch": 354, "\u0120as": 355, "\u0120we": 356, "\u0120(": 357, "nd": 358, "ill": 359, "\u0120D": 360, "if": 361, "\u01202": 362, "ag": 363, "ers": 364, "ke": 365, "\u0120\"": 366, "\u0120H": 367, "em": 368, "\u0120con": 369, "\u0120W": 370, "\u0120R": 371, "her": 372, "\u0120was": 373, "\u0120r": 374, "od": 375, "\u0120F": 376, "ul": 377, "ate": 378, "\u0120at": 379, "ri": 380, "pp": 381, "ore": 382, "\u0120The": 383, "\u0120se": 384, "us": 385, "\u0120pro": 386, "\u0120ha": 387, "um": 388, "\u0120are": 389, "\u0120de": 390, "ain": 391, "and": 392, "\u0120or": 393, "igh": 394, "est": 395, "ist": 396, "ab": 397, "rom": 398, "\u0120N": 399, "th": 400, "\u0120com": 401, "\u0120G": 402, "un": 403, "op": 404, "00": 405, "\u0120L": 406, "\u0120not": 407, "ess": 408, "\u0120ex": 409, "\u0120v": 410, "res": 411, "\u0120E": 412, "ew": 413, "ity": 414, "ant": 415, "\u0120by": 416, "el": 417, "os": 418, "ort": 419, "oc": 420, "qu": 421, "\u0120from": 422, "\u0120have": 423, "\u0120su": 424, "ive": 425, "ould": 426, "\u0120sh": 427, "\u0120this": 428, "nt": 429, "ra": 430, "pe": 431, "ight": 432, "art": 433, "ment": 434, "\u0120al": 435, "ust": 436, "end": 437, "--": 438, "all": 439, "\u0120O": 440, "ack": 441, "\u0120ch": 442, "\u0120le": 443, "ies": 444, "red": 445, "ard": 446, "\u00e2\u0122": 447, "out": 448, "\u0120J": 449, "\u0120ab": 450, "ear": 451, "iv": 452, "ally": 453, "our": 454, "ost": 455, "gh": 456, "pt": 457, "\u0120pl": 458, "ast": 459, "\u0120can": 460, "ak": 461, "ome": 462, "ud": 463, "The": 464, "\u0120his": 465, "\u0120do": 466, "\u0120go": 467, "\u0120has": 468, "ge": 469, "'t": 470, "\u0120U": 471, "rou": 472, "\u0120sa": 473, "\u0120j": 474, "\u0120but": 475, "\u0120wor": 476, "\u0120all": 477, "ect": 478, "\u0120k": 479, "ame": 480, "\u0120will": 481, "ok": 482, "\u0120whe": 483, "\u0120they": 484, "ide": 485, "01": 486, "ff": 487, "ich": 488, "pl": 489, "ther": 490, "\u0120tr": 491, "..": 492, "\u0120int": 493, "ie": 494, "ure": 495, "age": 496, "\u0120ne": 497, "ial": 498, "ap": 499, "ine": 500, "ice": 501, "\u0120me": 502, "\u0120out": 503, "ans": 504, "one": 505, "ong": 506, "ions": 507, "\u0120who": 508, "\u0120K": 509, "\u0120up": 510, "\u0120their": 511, "\u0120ad": 512, "\u01203": 513, "\u0120us": 514, "ated": 515, "ous": 516, "\u0120more": 517, "ue": 518, "og": 519, "\u0120St": 520, "ind": 521, "ike": 522, "\u0120so": 523, "ime": 524, "per": 525, ".\"": 526, "ber": 527, "iz": 528, "act": 529, "\u0120one": 530, "\u0120said": 531, "\u0120-": 532, "are": 533, "\u0120your": 534, "cc": 535, "\u0120Th": 536, "\u0120cl": 537, "ep": 538, "ake": 539, "able": 540, "ip": 541, "\u0120cont": 542, "\u0120which": 543, "ia": 544, "\u0120im": 545, "\u0120about": 546, "\u0120were": 547, "very": 548, "ub": 549, "\u0120had": 550, "\u0120en": 551, "\u0120comp": 552, ",\"": 553, "\u0120In": 554, "\u0120un": 555, "\u0120ag": 556, "ire": 557, "ace": 558, "au": 559, "ary": 560, "\u0120would": 561, "ass": 562, "ry": 563, "\u0120\u00e2\u0122": 564, "cl": 565, "ook": 566, "ere": 567, "so": 568, "\u0120V": 569, "ign": 570, "ib": 571, "\u0120off": 572, "\u0120te": 573, "ven": 574, "\u0120Y": 575, "ile": 576, "ose": 577, "ite": 578, "orm": 579, "\u0120201": 580, "\u0120res": 581, "\u0120man": 582, "\u0120per": 583, "\u0120other": 584, "ord": 585, "ult": 586, "\u0120been": 587, "\u0120like": 588, "ase": 589, "ance": 590, "ks": 591, "ays": 592, "own": 593, "ence": 594, "\u0120dis": 595, "ction": 596, "\u0120any": 597, "\u0120app": 598, "\u0120sp": 599, "int": 600, "ress": 601, "ations": 602, "ail": 603, "\u01204": 604, "ical": 605, "\u0120them": 606, "\u0120her": 607, "ount": 608, "\u0120Ch": 609, "\u0120ar": 610, "\u0120if": 611, "\u0120there": 612, "\u0120pe": 613, "\u0120year": 614, "av": 615, "\u0120my": 616, "\u0120some": 617, "\u0120when": 618, "ough": 619, "ach": 620, "\u0120than": 621, "ru": 622, "ond": 623, "ick": 624, "\u0120over": 625, "vel": 626, "\u0120qu": 627, "\u010a\u010a": 628, "\u0120sc": 629, "reat": 630, "ree": 631, "\u0120It": 632, "ound": 633, "port": 634, "\u0120also": 635, "\u0120part": 636, "fter": 637, "\u0120kn": 638, "\u0120bec": 639, "\u0120time": 640, "ens": 641, "\u01205": 642, "ople": 643, "\u0120what": 644, "\u0120no": 645, "du": 646, "mer": 647, "ang": 648, "\u0120new": 649, "----": 650, "\u0120get": 651, "ory": 652, "ition": 653, "ings": 654, "\u0120just": 655, "\u0120into": 656, "\u01200": 657, "ents": 658, "ove": 659, "te": 660, "\u0120people": 661, "\u0120pre": 662, "\u0120its": 663, "\u0120rec": 664, "\u0120tw": 665, "ian": 666, "irst": 667, "ark": 668, "ors": 669, "\u0120work": 670, "ade": 671, "ob": 672, "\u0120she": 673, "\u0120our": 674, "wn": 675, "ink": 676, "lic": 677, "\u012019": 678, "\u0120He": 679, "ish": 680, "nder": 681, "ause": 682, "\u0120him": 683, "ons": 684, "\u0120[": 685, "\u0120ro": 686, "form": 687, "ild": 688, "ates": 689, "vers": 690, "\u0120only": 691, "oll": 692, "\u0120spe": 693, "ck": 694, "ell": 695, "amp": 696, "\u0120acc": 697, "\u0120bl": 698, "ious": 699, "urn": 700, "ft": 701, "ood": 702, "\u0120how": 703, "hed": 704, "\u0120'": 705, "\u0120after": 706, "aw": 707, "\u0120att": 708, "ov": 709, "ne": 710, "\u0120play": 711, "erv": 712, "ict": 713, "\u0120could": 714, "itt": 715, "\u0120am": 716, "\u0120first": 717, "\u01206": 718, "\u0120act": 719, "\u0120$": 720, "ec": 721, "hing": 722, "ual": 723, "ull": 724, "\u0120comm": 725, "oy": 726, "old": 727, "ces": 728, "ater": 729, "\u0120fe": 730, "\u0120bet": 731, "we": 732, "iff": 733, "\u0120two": 734, "ock": 735, "\u0120back": 736, ").": 737, "ident": 738, "\u0120under": 739, "rough": 740, "sel": 741, "xt": 742, "\u0120may": 743, "round": 744, "\u0120po": 745, "ph": 746, "iss": 747, "\u0120des": 748, "\u0120most": 749, "\u0120did": 750, "\u0120add": 751, "ject": 752, "\u0120inc": 753, "fore": 754, "\u0120pol": 755, "ont": 756, "\u0120again": 757, "clud": 758, "tern": 759, "\u0120know": 760, "\u0120need": 761, "\u0120cons": 762, "\u0120co": 763, "\u0120.": 764, "\u0120want": 765, "\u0120see": 766, "\u01207": 767, "ning": 768, "iew": 769, "\u0120This": 770, "ced": 771, "\u0120even": 772, "\u0120ind": 773, "ty": 774, "\u0120We": 775, "ath": 776, "\u0120these": 777, "\u0120pr": 778, "\u0120use": 779, "\u0120because": 780, "\u0120fl": 781, "ng": 782, "\u0120now": 783, "\u0120\u00e2\u0122\u0135": 784, "com": 785, "ise": 786, "\u0120make": 787, "\u0120then": 788, "ower": 789, "\u0120every": 790, "\u0120Un": 791, "\u0120sec": 792, "oss": 793, "uch": 794, "\u0120em": 795, "\u0120=": 796, "\u0120Re": 797, "ied": 798, "rit": 799, "\u0120inv": 800, "lect": 801, "\u0120supp": 802, "ating": 803, "\u0120look": 804, "man": 805, "pect": 806, "\u01208": 807, "row": 808, "\u0120bu": 809, "\u0120where": 810, "ific": 811, "\u0120years": 812, "ily": 813, "\u0120diff": 814, "\u0120should": 815, "\u0120rem": 816, "Th": 817, "In": 818, "\u0120ev": 819, "day": 820, "'re": 821, "rib": 822, "\u0120rel": 823, "ss": 824, "\u0120def": 825, "\u0120right": 826, "\u0120sy": 827, "),": 828, "les": 829, "000": 830, "hen": 831, "\u0120through": 832, "\u0120Tr": 833, "__": 834, "\u0120way": 835, "\u0120don": 836, "\u0120,": 837, "\u012010": 838, "ased": 839, "\u0120ass": 840, "ublic": 841, "\u0120reg": 842, "\u0120And": 843, "ix": 844, "\u0120very": 845, "\u0120includ": 846, "other": 847, "\u0120imp": 848, "oth": 849, "\u0120sub": 850, "\u0120\u00e2\u0122\u0136": 851, "\u0120being": 852, "arg": 853, "\u0120Wh": 854, "==": 855, "ible": 856, "\u0120does": 857, "ange": 858, "ram": 859, "\u01209": 860, "ert": 861, "ps": 862, "ited": 863, "ational": 864, "\u0120br": 865, "\u0120down": 866, "\u0120many": 867, "aking": 868, "\u0120call": 869, "uring": 870, "ities": 871, "\u0120ph": 872, "ics": 873, "als": 874, "\u0120dec": 875, "ative": 876, "ener": 877, "\u0120before": 878, "ility": 879, "\u0120well": 880, "\u0120much": 881, "erson": 882, "\u0120those": 883, "\u0120such": 884, "\u0120ke": 885, "\u0120end": 886, "\u0120But": 887, "ason": 888, "ting": 889, "\u0120long": 890, "ef": 891, "\u0120think": 892, "ys": 893, "\u0120bel": 894, "\u0120sm": 895, "its": 896, "ax": 897, "\u0120own": 898, "\u0120prov": 899, "\u0120set": 900, "ife": 901, "ments": 902, "ble": 903, "ward": 904, "\u0120show": 905, "\u0120pres": 906, "ms": 907, "omet": 908, "\u0120ob": 909, "\u0120say": 910, "\u0120Sh": 911, "ts": 912, "ful": 913, "\u0120eff": 914, "\u0120gu": 915, "\u0120inst": 916, "und": 917, "ren": 918, "cess": 919, "\u0120ent": 920, "\u0120You": 921, "\u0120good": 922, "\u0120start": 923, "ince": 924, "\u0120made": 925, "tt": 926, "stem": 927, "olog": 928, "up": 929, "\u0120|": 930, "ump": 931, "\u0120hel": 932, "vern": 933, "ular": 934, "ually": 935, "\u0120ac": 936, "\u0120mon": 937, "\u0120last": 938, "\u0120200": 939, "10": 940, "\u0120stud": 941, "ures": 942, "\u0120Ar": 943, "self": 944, "ars": 945, "meric": 946, "ues": 947, "cy": 948, "\u0120min": 949, "ollow": 950, "\u0120col": 951, "io": 952, "\u0120mod": 953, "\u0120count": 954, "\u0120Com": 955, "hes": 956, "\u0120fin": 957, "air": 958, "ier": 959, "\u00e2\u0122\u0136": 960, "read": 961, "ank": 962, "atch": 963, "ever": 964, "\u0120str": 965, "\u0120point": 966, "ork": 967, "\u0120New": 968, "\u0120sur": 969, "ool": 970, "alk": 971, "ement": 972, "\u0120used": 973, "ract": 974, "ween": 975, "\u0120same": 976, "oun": 977, "\u0120Al": 978, "ci": 979, "\u0120differe": 980, "\u0120while": 981, "--------": 982, "\u0120game": 983, "cept": 984, "\u0120sim": 985, "...": 986, "\u0120inter": 987, "ek": 988, "\u0120report": 989, "\u0120produ": 990, "\u0120still": 991, "led": 992, "ah": 993, "\u0120here": 994, "\u0120world": 995, "\u0120though": 996, "\u0120num": 997, "arch": 998, "imes": 999, "ale": 1000, "\u0120Se": 1001, "\u0120If": 1002, "//": 1003, "\u0120Le": 1004, "\u0120ret": 1005, "\u0120ref": 1006, "\u0120trans": 1007, "ner": 1008, "ution": 1009, "ters": 1010, "\u0120take": 1011, "\u0120Cl": 1012, "\u0120conf": 1013, "way": 1014, "ave": 1015, "\u0120going": 1016, "\u0120sl": 1017, "ug": 1018, "\u0120Americ": 1019, "\u0120spec": 1020, "\u0120hand": 1021, "\u0120between": 1022, "ists": 1023, "\u0120De": 1024, "oot": 1025, "It": 1026, "\u0120ear": 1027, "\u0120against": 1028, "\u0120high": 1029, "gan": 1030, "az": 1031, "ather": 1032, "\u0120exp": 1033, "\u0120op": 1034, "\u0120ins": 1035, "\u0120gr": 1036, "\u0120help": 1037, "\u0120requ": 1038, "ets": 1039, "ins": 1040, "\u0120Pro": 1041, "ism": 1042, "\u0120found": 1043, "land": 1044, "ata": 1045, "uss": 1046, "ames": 1047, "\u0120person": 1048, "\u0120great": 1049, "pr": 1050, "\u0120sign": 1051, "\u0120An": 1052, "'ve": 1053, "\u0120somet": 1054, "\u0120ser": 1055, "hip": 1056, "\u0120run": 1057, "\u0120:": 1058, "\u0120ter": 1059, "irect": 1060, "\u0120follow": 1061, "\u0120det": 1062, "ices": 1063, "\u0120find": 1064, "12": 1065, "\u0120mem": 1066, "\u0120cr": 1067, "ered": 1068, "ex": 1069, "\u0120ext": 1070, "uth": 1071, "ense": 1072, "co": 1073, "\u0120team": 1074, "ving": 1075, "ouse": 1076, "ash": 1077, "att": 1078, "ved": 1079, "\u0120system": 1080, "\u0120As": 1081, "der": 1082, "ives": 1083, "min": 1084, "\u0120lead": 1085, "\u0120Bl": 1086, "cent": 1087, "\u0120around": 1088, "\u0120govern": 1089, "\u0120cur": 1090, "velop": 1091, "any": 1092, "\u0120cour": 1093, "alth": 1094, "ages": 1095, "ize": 1096, "\u0120car": 1097, "ode": 1098, "\u0120law": 1099, "\u0120read": 1100, "'m": 1101, "con": 1102, "\u0120real": 1103, "\u0120support": 1104, "\u012012": 1105, "....": 1106, "\u0120really": 1107, "ness": 1108, "\u0120fact": 1109, "\u0120day": 1110, "\u0120both": 1111, "ying": 1112, "\u0120serv": 1113, "\u0120For": 1114, "\u0120three": 1115, "\u0120wom": 1116, "\u0120med": 1117, "ody": 1118, "\u0120They": 1119, "50": 1120, "\u0120exper": 1121, "ton": 1122, "\u0120each": 1123, "akes": 1124, "\u0120che": 1125, "\u0120cre": 1126, "ines": 1127, "\u0120rep": 1128, "19": 1129, "gg": 1130, "illion": 1131, "\u0120grou": 1132, "ute": 1133, "ik": 1134, "We": 1135, "get": 1136, "ER": 1137, "\u0120met": 1138, "\u0120says": 1139, "ox": 1140, "\u0120during": 1141, "ern": 1142, "ized": 1143, "ared": 1144, "\u0120fam": 1145, "ically": 1146, "\u0120happ": 1147, "\u0120Is": 1148, "\u0120char": 1149, "med": 1150, "vent": 1151, "\u0120gener": 1152, "ient": 1153, "ple": 1154, "iet": 1155, "rent": 1156, "11": 1157, "ves": 1158, "ption": 1159, "\u012020": 1160, "formation": 1161, "\u0120cor": 1162, "\u0120offic": 1163, "ield": 1164, "\u0120too": 1165, "ision": 1166, "\u0120inf": 1167, "\u0120Z": 1168, "the": 1169, "oad": 1170, "\u0120public": 1171, "\u0120prog": 1172, "ric": 1173, "**": 1174, "\u0120war": 1175, "\u0120power": 1176, "view": 1177, "\u0120few": 1178, "\u0120loc": 1179, "\u0120different": 1180, "\u0120state": 1181, "\u0120head": 1182, "'ll": 1183, "\u0120poss": 1184, "\u0120stat": 1185, "ret": 1186, "ants": 1187, "\u0120val": 1188, "\u0120iss": 1189, "\u0120cle": 1190, "ivers": 1191, "anc": 1192, "\u0120expl": 1193, "\u0120another": 1194, "\u0120Q": 1195, "\u0120av": 1196, "thing": 1197, "nce": 1198, "Wh": 1199, "\u0120child": 1200, "\u0120since": 1201, "ired": 1202, "less": 1203, "\u0120life": 1204, "\u0120develop": 1205, "ittle": 1206, "\u0120dep": 1207, "\u0120pass": 1208, "\u00e3\u0125": 1209, "\u0120turn": 1210, "orn": 1211, "This": 1212, "bers": 1213, "ross": 1214, "\u0120Ad": 1215, "\u0120fr": 1216, "\u0120resp": 1217, "\u0120second": 1218, "oh": 1219, "\u0120/": 1220, "\u0120disc": 1221, "\u0120&": 1222, "\u0120something": 1223, "\u0120comple": 1224, "\u0120ed": 1225, "\u0120fil": 1226, "\u0120month": 1227, "aj": 1228, "uc": 1229, "\u0120government": 1230, "\u0120without": 1231, "\u0120leg": 1232, "\u0120dist": 1233, "\u0120put": 1234, "\u0120quest": 1235, "ann": 1236, "\u0120prot": 1237, "20": 1238, "\u0120never": 1239, "ience": 1240, "\u0120level": 1241, "\u0120art": 1242, "\u0120things": 1243, "\u0120might": 1244, "\u0120effect": 1245, "\u0120contro": 1246, "\u0120cent": 1247, "\u012018": 1248, "\u0120allow": 1249, "\u0120belie": 1250, "chool": 1251, "ott": 1252, "\u0120incre": 1253, "\u0120feel": 1254, "\u0120result": 1255, "\u0120lot": 1256, "\u0120fun": 1257, "ote": 1258, "\u0120ty": 1259, "erest": 1260, "\u0120contin": 1261, "\u0120using": 1262, "\u0120big": 1263, "201": 1264, "\u0120ask": 1265, "\u0120best": 1266, "\u0120)": 1267, "IN": 1268, "\u0120opp": 1269, "30": 1270, "\u0120number": 1271, "iness": 1272, "St": 1273, "lease": 1274, "\u0120ca": 1275, "\u0120must": 1276, "\u0120direct": 1277, "\u0120gl": 1278, "\u0120<": 1279, "\u0120open": 1280, "\u0120post": 1281, "\u0120come": 1282, "\u0120seem": 1283, "ording": 1284, "\u0120week": 1285, "ately": 1286, "ital": 1287, "\u0120el": 1288, "riend": 1289, "\u0120far": 1290, "\u0120tra": 1291, "inal": 1292, "\u0120pri": 1293, "\u0120US": 1294, "\u0120place": 1295, "\u0120form": 1296, "\u0120told": 1297, "\":": 1298, "ains": 1299, "ature": 1300, "\u0120Trump": 1301, "\u0120stand": 1302, "\u0120#": 1303, "ider": 1304, "\u0120Fr": 1305, "\u0120next": 1306, "\u0120soc": 1307, "\u0120pur": 1308, "\u0120let": 1309, "\u0120little": 1310, "\u0120hum": 1311, "\u0120i": 1312, "ron": 1313, "15": 1314, "\u012015": 1315, "\u0120commun": 1316, "\u0120mark": 1317, "\u0120There": 1318, "\u0120wr": 1319, "\u0120That": 1320, "\u0120information": 1321, "ways": 1322, "\u0120bus": 1323, "app": 1324, "\u0120invest": 1325, "me": 1326, "\u0120hard": 1327, "ained": 1328, "ead": 1329, "\u0120import": 1330, "\u0120appro": 1331, "\u0120test": 1332, "\u0120tri": 1333, "\u0120rest": 1334, "osed": 1335, "\u0120full": 1336, "\u0120care": 1337, "\u0120Sp": 1338, "\u0120case": 1339, "ON": 1340, "\u0120sk": 1341, "\u0120less": 1342, "\u0120+": 1343, "\u0120partic": 1344, "\u0120Pl": 1345, "ably": 1346, "uck": 1347, "ished": 1348, "chn": 1349, "be": 1350, "\u0120list": 1351, "ator": 1352, "\u0120top": 1353, "\u0120adv": 1354, "\u0120Be": 1355, "ruct": 1356, "\u0120dem": 1357, "ration": 1358, "ling": 1359, "gy": 1360, "reen": 1361, "ger": 1362, "\u0120home": 1363, "\u0120left": 1364, "\u0120better": 1365, "\u0120data": 1366, "\u012011": 1367, "\u0120attack": 1368, "\u0120proble": 1369, "line": 1370, "ards": 1371, "\u0120beh": 1372, "ral": 1373, "\u0120How": 1374, "\u0120She": 1375, "arge": 1376, "\u0120--": 1377, "://": 1378, "\u0120bro": 1379, "\u0120Ph": 1380, "ats": 1381, "\u0120build": 1382, "ww": 1383, "ided": 1384, "aim": 1385, "ases": 1386, "ency": 1387, "\u0120main": 1388, "ined": 1389, "\u0120including": 1390, "\u0120{": 1391, "\u0120got": 1392, "\u0120interest": 1393, "\u0120keep": 1394, "\u0120X": 1395, "\u0120eas": 1396, "aining": 1397, "\u0120class": 1398, "\u00e2\u0122\u00a6": 1399, "\u0120No": 1400, "\u0120var": 1401, "\u0120small": 1402, "ample": 1403, "AT": 1404, "\u0120ide": 1405, "\u0120So": 1406, "\u0120rece": 1407, "\u0120polit": 1408, "\u0120mov": 1409, "\u0120plan": 1410, "\u0120percent": 1411, "iving": 1412, "\u0120camp": 1413, "\u0120pay": 1414, "14": 1415, "sc": 1416, "ised": 1417, "\u0120unt": 1418, "oney": 1419, "ploy": 1420, "====": 1421, "\u0120didn": 1422, "\u0120Ind": 1423, "els": 1424, "ertain": 1425, "\u0120pos": 1426, "____": 1427, "iver": 1428, "\u0120process": 1429, "\u0120program": 1430, "ified": 1431, "\u0120Rep": 1432, "16": 1433, "uro": 1434, "ology": 1435, "atter": 1436, "ina": 1437, "\u0120name": 1438, "\u0120All": 1439, "\u0120four": 1440, "\u0120return": 1441, "vious": 1442, "bs": 1443, "\u0120called": 1444, "\u0120move": 1445, "\u0120Sc": 1446, "ird": 1447, "\u0120group": 1448, "\u0120bre": 1449, "\u0120men": 1450, "\u0120cap": 1451, "ten": 1452, "ee": 1453, "\u0120dri": 1454, "leg": 1455, "here": 1456, "uthor": 1457, "\u0120pat": 1458, "\u0120current": 1459, "ides": 1460, "\u0120pop": 1461, "to": 1462, "ention": 1463, "\u0120always": 1464, "\u0120mil": 1465, "\u0120women": 1466, "\u012016": 1467, "\u0120old": 1468, "iven": 1469, "raph": 1470, "\u0120Or": 1471, "ror": 1472, "ently": 1473, "\u0120near": 1474, "\u0120Ex": 1475, "ream": 1476, "sh": 1477, "\u012014": 1478, "\u0120free": 1479, "ission": 1480, "stand": 1481, "\u0120Con": 1482, "ality": 1483, "used": 1484, "13": 1485, "\u0120design": 1486, "\u0120change": 1487, "\u0120chang": 1488, "\u0120bo": 1489, "\u0120vis": 1490, "ember": 1491, "\u0120book": 1492, "ready": 1493, "\u0120kill": 1494, "25": 1495, "pped": 1496, "\u0120away": 1497, "\u0120able": 1498, "\u0120country": 1499, "\u0120const": 1500, "arn": 1501, "\u0120order": 1502, "AR": 1503, "ior": 1504, "ium": 1505, "orth": 1506, "18": 1507, "ailable": 1508, "\u0120sw": 1509, "\u0120million": 1510, "\u012013": 1511, "atic": 1512, "ted": 1513, "\u0120Go": 1514, "\u0120oper": 1515, "eng": 1516, "\u0120thing": 1517, "ajor": 1518, "conom": 1519, "\u0120Comm": 1520, "\u0120why": 1521, "ured": 1522, "ural": 1523, "\u0120school": 1524, "by": 1525, "\u0120Mar": 1526, "\u0120aff": 1527, "\u0120days": 1528, "\u0120ann": 1529, "ush": 1530, "ane": 1531, "If": 1532, "eg": 1533, "\u0120prof": 1534, "\u0120health": 1535, "outh": 1536, "But": 1537, "ional": 1538, ".,": 1539, "\u0120sol": 1540, "\u0120already": 1541, "\u012030": 1542, "\u0120charact": 1543, "He": 1544, "\u0120friend": 1545, "ES": 1546, "ians": 1547, "icle": 1548, "'d": 1549, "\u0120On": 1550, "\u0120least": 1551, "\u0120prom": 1552, "\u0120dr": 1553, "\u0120hist": 1554, "ither": 1555, "\u0120est": 1556, "iqu": 1557, "17": 1558, "son": 1559, "\u0120tell": 1560, "\u0120talk": 1561, "ohn": 1562, "oint": 1563, "lection": 1564, "AN": 1565, "\u0120until": 1566, "augh": 1567, "\u0120later": 1568, "\u0120ve": 1569, "\u0120view": 1570, "ending": 1571, "ived": 1572, "\u0120word": 1573, "ware": 1574, "\u0120cost": 1575, "\u0120enough": 1576, "\u0120give": 1577, "\u0120United": 1578, "\u0120techn": 1579, "arent": 1580, "OR": 1581, "\u0120par": 1582, "\u0120Dr": 1583, "\u01202016": 1584, "rist": 1585, "ering": 1586, "\u0120\u00c2": 1587, "\u0120large": 1588, "side": 1589, "acy": 1590, "ccess": 1591, "\u0120win": 1592, "\u0120important": 1593, "\u0120199": 1594, "\u0120doesn": 1595, "\u012017": 1596, "\u0120business": 1597, "\u0120clear": 1598, "\u0120rese": 1599, "\",": 1600, "ury": 1601, "\u0120equ": 1602, "aster": 1603, "alf": 1604, "\u0120American": 1605, "nect": 1606, "\u0120expect": 1607, "iversity": 1608, "\u0120occ": 1609, "\u0120Fl": 1610, "\u0120kind": 1611, "\u0120mean": 1612, "\u0120past": 1613, "\u0120dev": 1614, "\u0120bas": 1615, "let": 1616, "raft": 1617, "\u0120organ": 1618, "\u0120del": 1619, "\u0120perform": 1620, "\u0120story": 1621, "\u0120season": 1622, "\u0120Col": 1623, "\u0120claim": 1624, "\u0120came": 1625, "\u0120within": 1626, "\u0120line": 1627, "\u0120project": 1628, "\u0120At": 1629, "\u0120control": 1630, "ended": 1631, "\u0120Sy": 1632, "\u0120air": 1633, "ization": 1634, "\u0120*": 1635, "ley": 1636, "\u0120money": 1637, "idd": 1638, "You": 1639, "for": 1640, "\u0120family": 1641, "\u0120making": 1642, "\u0120bit": 1643, "\u0120police": 1644, "\u0120happen": 1645, "\u0120vers": 1646, "ony": 1647, "uff": 1648, "\u0120When": 1649, "\u0120sit": 1650, "ideo": 1651, "lf": 1652, "ison": 1653, "\u0120sure": 1654, "gin": 1655, "\u0120appear": 1656, "\u0120light": 1657, "\u0120es": 1658, "of": 1659, "\u0120water": 1660, "\u0120times": 1661, "not": 1662, "\u0120grow": 1663, "\u0120company": 1664, "\u0120Te": 1665, "ows": 1666, "\u0120mar": 1667, "ource": 1668, "iol": 1669, "arm": 1670, "br": 1671, "\u0120example": 1672, "\u0120conc": 1673, "\u0120fore": 1674, "\u0120To": 1675, "pro": 1676, "EN": 1677, "ries": 1678, "\u012025": 1679, "\u0120Can": 1680, "ney": 1681, "\u0120actually": 1682, "\u0120ever": 1683, "urity": 1684, "aken": 1685, "aps": 1686, "\u0120tax": 1687, "\u0120major": 1688, "ama": 1689, "\u0120often": 1690, "eral": 1691, "\u0120human": 1692, "\u0120job": 1693, "ister": 1694, "\u0120available": 1695, "ocr": 1696, "enn": 1697, "aid": 1698, "ivid": 1699, "\u0120record": 1700, "?\"": 1701, "\u0120sing": 1702, "\u0120Am": 1703, "idence": 1704, "\u0120news": 1705, "ster": 1706, "\u0120econom": 1707, "\u0120following": 1708, "\u0120Br": 1709, "ising": 1710, "\u0120hour": 1711, "most": 1712, "ument": 1713, "\u0120sex": 1714, "\u0120desc": 1715, "\u0120become": 1716, "\u0120Ed": 1717, "\u0120took": 1718, "\u0120having": 1719, "\u0120product": 1720, "ault": 1721, "As": 1722, "aring": 1723, "\u0120means": 1724, "\u0120hop": 1725, "une": 1726, "\u0120cho": 1727, "\u0120certain": 1728, "\u0120non": 1729, "\u0120deal": 1730, "24": 1731, "lement": 1732, "oci": 1733, "ene": 1734, "\u0120side": 1735, "\u0120Pr": 1736, "\u0120May": 1737, "\u0120reason": 1738, "ued": 1739, "ched": 1740, "ulation": 1741, "\u0120elect": 1742, "\u0120official": 1743, "\u0120possible": 1744, "\u0120hold": 1745, "ands": 1746, "ots": 1747, "\u0120city": 1748, "ories": 1749, "\u0120sever": 1750, "\u0120children": 1751, "\u0120once": 1752, "\u0120activ": 1753, "ler": 1754, "\u0120night": 1755, "itions": 1756, "\u0120John": 1757, "ape": 1758, "play": 1759, "\u0120done": 1760, "\u0120lim": 1761, "\u0120working": 1762, "\u0120Pres": 1763, "orld": 1764, "eb": 1765, "\u0120Co": 1766, "\u0120body": 1767, "ails": 1768, "utes": 1769, "\u0120Mr": 1770, "\u0120whether": 1771, "\u0120author": 1772, "rop": 1773, "\u0120proper": 1774, "\u0120seen": 1775, ");": 1776, "\u0120fac": 1777, "\u0120Su": 1778, "\u0120cond": 1779, "iting": 1780, "\u0120course": 1781, "\u0120}": 1782, "----------------": 1783, "aign": 1784, "\u0120event": 1785, "\u0120eng": 1786, "\u0120pot": 1787, "\u0120intern": 1788, "iam": 1789, "\u0120short": 1790, "empt": 1791, "\u00e3\u0124": 1792, "\u0120God": 1793, "ilar": 1794, "80": 1795, "\u0120orig": 1796, "IS": 1797, "ourn": 1798, "ability": 1799, "itive": 1800, "\u0120dam": 1801, "\u0120100": 1802, "\u0120press": 1803, "\u0120doing": 1804, "\u0120protect": 1805, "ring": 1806, "\u0120thought": 1807, "\u0120question": 1808, "rew": 1809, "\u0120War": 1810, "\u0120several": 1811, "\u0120State": 1812, "\u0120given": 1813, "\u0120fund": 1814, "\u0120Tw": 1815, "\u0120went": 1816, "ances": 1817, "work": 1818, "por": 1819, "my": 1820, "40": 1821, "\u0120arg": 1822, "artment": 1823, "ustom": 1824, "\u0120polic": 1825, "\u0120meet": 1826, "\u0120creat": 1827, "22": 1828, "\u0120States": 1829, "\u0120games": 1830, "raw": 1831, "uture": 1832, "\u0120understand": 1833, "urs": 1834, "\u0120Ob": 1835, "lish": 1836, "sy": 1837, "\u0120makes": 1838, "\u0120won": 1839, "agon": 1840, "\u0120htt": 1841, "\u0120love": 1842, "ential": 1843, "\u0120complete": 1844, "par": 1845, "\u0120Im": 1846, "AL": 1847, "\u0120account": 1848, "\u00c2\u0142": 1849, "ored": 1850, "vert": 1851, "\u0120ident": 1852, "\u01202015": 1853, "\u0120others": 1854, "\u0120Min": 1855, "iber": 1856, "verage": 1857, "There": 1858, "itional": 1859, "dd": 1860, "\u0120prob": 1861, "\u0120young": 1862, "\u0120along": 1863, "\u0120according": 1864, "\u0120yet": 1865, "\u0120members": 1866, "\u0120What": 1867, "oid": 1868, "\u0120Man": 1869, "And": 1870, "\u0120among": 1871, "ai": 1872, "\u0120employ": 1873, "\u0120Res": 1874, "\u0120>": 1875, "\u0120invol": 1876, "\u0120low": 1877, "af": 1878, "\u0120Car": 1879, "\u0120hig": 1880, "\u0120One": 1881, "\u0120Sec": 1882, "ination": 1883, "\u0120likely": 1884, "\u0120ant": 1885, "aged": 1886, "\u0120Russ": 1887, "\u0120ben": 1888, "\u0120rele": 1889, "For": 1890, "back": 1891, "\u0120Not": 1892, "\u0120president": 1893, "ball": 1894, "\u0120access": 1895, "ividual": 1896, "\u0120Dem": 1897, "\u0120Euro": 1898, "60": 1899, "\u0120known": 1900, "irl": 1901, "\u0120Gr": 1902, "\u0120early": 1903, "use": 1904, "iety": 1905, "\u00e2\u0122\u0135": 1906, "\u0120fight": 1907, "\u0120sent": 1908, "\u0120today": 1909, "\u0120market": 1910, "\".": 1911, "\u0120based": 1912, "\u0120strong": 1913, "urther": 1914, "\u0120deb": 1915, "mber": 1916, "\u0120problem": 1917, "\u0120death": 1918, "\u0120social": 1919, "imate": 1920, "AS": 1921, "ortun": 1922, "\u0120campaign": 1923, "ery": 1924, "Ch": 1925, "\u0120ey": 1926, "ially": 1927, "\u0120mus": 1928, "wh": 1929, "pos": 1930, "\u0120er": 1931, "\u0120saf": 1932, "\u0120months": 1933, "iron": 1934, "\u0120viol": 1935, "\u0120five": 1936, "\u0120stre": 1937, "\u0120players": 1938, "inc": 1939, "ald": 1940, "year": 1941, "aun": 1942, "\u0120success": 1943, "\u0120present": 1944, "erence": 1945, "\u01202014": 1946, "\u0120sugg": 1947, "\u0120particular": 1948, "\u0120try": 1949, "\u0120suggest": 1950, "\u0120Christ": 1951, "ones": 1952, "\u0120priv": 1953, "23": 1954, "\u0120crit": 1955, "\u0120land": 1956, "\u0120local": 1957, "ify": 1958, "29": 1959, "\u0120aut": 1960, "ED": 1961, "\u0120Gu": 1962, "\u0120mult": 1963, "\u0120political": 1964, "\u0120asked": 1965, "\u0120former": 1966, "itter": 1967, "ript": 1968, "\u0120close": 1969, "\u0120pract": 1970, "\u0120York": 1971, "\u0120getting": 1972, "\u0120across": 1973, "\u0120comb": 1974, "\u0120believe": 1975, "\u0120z": 1976, "\u0120toget": 1977, "\u0120together": 1978, "\u0120Cent": 1979, "irc": 1980, "\u0120individual": 1981, "\u0120Mc": 1982, "27": 1983, "isk": 1984, "\u0120Eng": 1985, "\u0120face": 1986, "\u012024": 1987, "\u0120value": 1988, "\u0120area": 1989, "ev": 1990, "\u0120writ": 1991, "\u0120President": 1992, "\u0120vot": 1993, "\u0120key": 1994, "\u0120mom": 1995, "put": 1996, "\u0120anything": 1997, "\u0120experience": 1998, "attle": 1999, "\u0120mind": 2000, "aff": 2001, "omm": 2002, "\u0120future": 2003, "ged": 2004, "\u0120cut": 2005, "\u0120tot": 2006, "itch": 2007, "\u0120video": 2008, "\u0120investig": 2009, "\u0120net": 2010, "\u0120My": 2011, "rict": 2012, "ien": 2013, ".)": 2014, "\u0120impro": 2015, "though": 2016, "wards": 2017, "\u0120connect": 2018, "\u0120Med": 2019, "selves": 2020, "ensive": 2021, "mb": 2022, "ober": 2023, "ators": 2024, "An": 2025, "\u012050": 2026, "\u0120redu": 2027, "resent": 2028, "\u0120above": 2029, "\u0120fre": 2030, "\u0120Europe": 2031, "sw": 2032, "\u0120amount": 2033, "\u0120App": 2034, "\u0120either": 2035, "\u0120milit": 2036, "\u0120anal": 2037, "\u0120fail": 2038, "\u0120En": 2039, "ales": 2040, "\u0120special": 2041, "\u0120black": 2042, "IT": 2043, "cher": 2044, "\u0120looking": 2045, "\u0120fire": 2046, "yn": 2047, "\u0120almost": 2048, "oon": 2049, "\u0120study": 2050, "\u0120miss": 2051, "ches": 2052, "rown": 2053, "\u0120tre": 2054, "\u0120community": 2055, "\u0120media": 2056, "\u0120food": 2057, "\u0120comes": 2058, "\u0120University": 2059, "\u0120single": 2060, "What": 2061, "uly": 2062, "\u0120half": 2063, "ague": 2064, "hod": 2065, "\u0120Republic": 2066, "\u0120started": 2067, "\u0120quick": 2068, "oto": 2069, "book": 2070, "\u0120issue": 2071, "itor": 2072, "\u0120else": 2073, "\u0120consider": 2074, "26": 2075, "rodu": 2076, "\u0120taken": 2077, "28": 2078, "99": 2079, "\u0120With": 2080, "\u0120true": 2081, "\u0120wa": 2082, "\u0120trad": 2083, "\u0120ago": 2084, "\u0120mess": 2085, "ief": 2086, "\u0120added": 2087, "oke": 2088, "\u0120bad": 2089, "\u0120fav": 2090, "33": 2091, "\u0120similar": 2092, "ask": 2093, "\u0120Don": 2094, "\u0120character": 2095, "orts": 2096, "\u0120House": 2097, "\u0120reported": 2098, "\u0120type": 2099, "val": 2100, "iod": 2101, "\u0120However": 2102, "\u0120targ": 2103, "\u0120entire": 2104, "pping": 2105, "\u0120history": 2106, "\u0120live": 2107, "ffic": 2108, "........": 2109, "ederal": 2110, "\u0120trying": 2111, "\u0120discuss": 2112, "\u0120Har": 2113, "aces": 2114, "lished": 2115, "\u0120self": 2116, "osp": 2117, "rest": 2118, "\u0120room": 2119, "elt": 2120, "\u0120fall": 2121, "olution": 2122, "\u0120et": 2123, "\u0120x": 2124, "\u0120isn": 2125, "\u0120idea": 2126, "bo": 2127, "\u0120sound": 2128, "\u0120Dep": 2129, "\u0120someone": 2130, "cially": 2131, "ully": 2132, "\u0120foc": 2133, "\u0120object": 2134, "ift": 2135, "aper": 2136, "\u0120player": 2137, "\u0120rather": 2138, "\u0120service": 2139, "ashing": 2140, "\u0120Do": 2141, "\u0120Part": 2142, "rug": 2143, "mon": 2144, "ply": 2145, "\u0120mor": 2146, "\u0120nothing": 2147, "\u0120provide": 2148, "IC": 2149, "ung": 2150, "\u0120party": 2151, "\u0120exist": 2152, "\u0120mag": 2153, "70": 2154, "\u0120rul": 2155, "\u0120house": 2156, "\u0120behind": 2157, "\u0120however": 2158, "\u0120World": 2159, "\u0120sum": 2160, "\u0120applic": 2161, "\u0120;": 2162, "\u0120function": 2163, "gr": 2164, "\u0120Pol": 2165, "\u0120front": 2166, "200": 2167, "\u0120series": 2168, "\u0120tem": 2169, "\u0120typ": 2170, "ills": 2171, "\u0120opt": 2172, "\u0120points": 2173, "\u0120below": 2174, "itted": 2175, "\u0120specific": 2176, "\u01202017": 2177, "umb": 2178, "\u0120ra": 2179, "\u0120previous": 2180, "\u0120pret": 2181, "reme": 2182, "\u0120custom": 2183, "\u0120court": 2184, "\u0120Me": 2185, "\u0120repl": 2186, "\u0120whole": 2187, "go": 2188, "cer": 2189, "\u0120treat": 2190, "\u0120Act": 2191, "\u0120probably": 2192, "\u0120learn": 2193, "ender": 2194, "\u0120Ass": 2195, "\u0120version": 2196, "now": 2197, "\u0120check": 2198, "\u0120Cal": 2199, "RE": 2200, "minist": 2201, "On": 2202, "ources": 2203, "\u0120benef": 2204, "\u0120doc": 2205, "\u0120deter": 2206, "\u0120enc": 2207, "\u0120super": 2208, "\u0120address": 2209, "\u0120vict": 2210, "\u01202013": 2211, "\u0120meas": 2212, "tr": 2213, "\u0120field": 2214, "When": 2215, "\u0120signific": 2216, "uge": 2217, "\u0120feat": 2218, "\u0120common": 2219, "load": 2220, "\u0120begin": 2221, "\u0120bring": 2222, "\u0120action": 2223, "erman": 2224, "\u0120describ": 2225, "\u0120indust": 2226, "\u0120wanted": 2227, "ried": 2228, "ming": 2229, "\u0120attempt": 2230, "45": 2231, "fer": 2232, "\u0120due": 2233, "ression": 2234, "##": 2235, "\u0120shall": 2236, "\u0120six": 2237, "oo": 2238, "\u0120step": 2239, "\u0120pub": 2240, "\u0120himself": 2241, "\u012023": 2242, "\u0120cop": 2243, "\u0120dest": 2244, "\u0120stop": 2245, "AC": 2246, "ibility": 2247, "\u0120lab": 2248, "icult": 2249, "\u0120hours": 2250, "\u0120create": 2251, "\u0120further": 2252, "\u0120America": 2253, "\u0120City": 2254, "\u0120dou": 2255, "head": 2256, "ST": 2257, "\u0120North": 2258, "cing": 2259, "\u0120national": 2260, "ule": 2261, "\u0120Inst": 2262, "\u0120taking": 2263, "\u0120Qu": 2264, "irt": 2265, "\u0120red": 2266, "\u0120research": 2267, "viron": 2268, "\u0120Ge": 2269, "\u0120break": 2270, "ana": 2271, "\u0120space": 2272, "aterial": 2273, "\u0120recent": 2274, "\u0120Ab": 2275, "\u0120general": 2276, "\u0120hit": 2277, "\u0120period": 2278, "\u0120everything": 2279, "ively": 2280, "\u0120phys": 2281, "\u0120saying": 2282, "anks": 2283, "\u0120cou": 2284, "\u0120cult": 2285, "aced": 2286, "eal": 2287, "uation": 2288, "\u0120coun": 2289, "lu": 2290, "\u0120include": 2291, "\u0120position": 2292, "\u0120After": 2293, "\u0120Canad": 2294, "\u0120Em": 2295, "\u0120imm": 2296, "\u0120Red": 2297, "\u0120pick": 2298, "\u0120compl": 2299, "\u0120matter": 2300, "reg": 2301, "ext": 2302, "angu": 2303, "isc": 2304, "ole": 2305, "aut": 2306, "\u0120compet": 2307, "eed": 2308, "fect": 2309, "\u012021": 2310, "\u0120Sen": 2311, "\u0120These": 2312, "asing": 2313, "\u0120cannot": 2314, "\u0120init": 2315, "\u0120relations": 2316, "ached": 2317, "\u0120bar": 2318, "\u012040": 2319, "\u0120TH": 2320, "\u01202012": 2321, "\u0120vol": 2322, "\u0120ground": 2323, "\u0120security": 2324, "\u0120upd": 2325, "ilt": 2326, "35": 2327, "\u0120concern": 2328, "\u0120Just": 2329, "\u0120white": 2330, "\u0120seems": 2331, "\u0120Her": 2332, "pecially": 2333, "ients": 2334, "\u0120announ": 2335, "\u0120fig": 2336, "ights": 2337, "\u0120stri": 2338, "like": 2339, "ids": 2340, "\u0120sus": 2341, "\u0120watch": 2342, "\u0120\u00e2": 2343, "\u0120wind": 2344, "\u0120Cont": 2345, "\u0120itself": 2346, "\u0120mass": 2347, "Al": 2348, "yle": 2349, "ique": 2350, "\u0120National": 2351, "\u0120abs": 2352, "\u0120pack": 2353, "\u0120outside": 2354, "\u0120anim": 2355, "\u0120pain": 2356, "eter": 2357, "\u0120manag": 2358, "duct": 2359, "ogn": 2360, "\u0120]": 2361, "\u0120Sept": 2362, "sec": 2363, "off": 2364, "\u0120Jan": 2365, "\u0120foot": 2366, "ades": 2367, "\u0120third": 2368, "\u0120mot": 2369, "\u0120evidence": 2370, "inton": 2371, "\u0120threat": 2372, "apt": 2373, "ples": 2374, "cle": 2375, "\u0120lo": 2376, "\u0120decl": 2377, "\u0120item": 2378, "medi": 2379, "\u0120represent": 2380, "omb": 2381, "amer": 2382, "\u0120significant": 2383, "ograph": 2384, "su": 2385, "\u0120cal": 2386, "ires": 2387, "0000": 2388, "ID": 2389, "AM": 2390, "\u0120simply": 2391, "\u0120longer": 2392, "\u0120file": 2393, "OT": 2394, "che": 2395, "So": 2396, "ateg": 2397, "org": 2398, "\u0120His": 2399, "\u0120ener": 2400, "\u0120dom": 2401, "\u0120upon": 2402, "ili": 2403, "\":\"": 2404, "\u0120themselves": 2405, "\u0120coming": 2406, "\u0120quite": 2407, "\u0120difficult": 2408, "\u0120Bar": 2409, "ilities": 2410, "rel": 2411, "ends": 2412, "cial": 2413, "64": 2414, "\u0120woman": 2415, "rap": 2416, "yr": 2417, "\u0120necess": 2418, "ips": 2419, "\u0120text": 2420, "\u0120require": 2421, "\u0120military": 2422, "\u0120review": 2423, "\u0120respons": 2424, "75": 2425, "\u0120subject": 2426, "\u0120instead": 2427, "\u0120issues": 2428, "\u0120gen": 2429, "\",\"": 2430, "\u0120minutes": 2431, "\u0120weap": 2432, "ray": 2433, "amed": 2434, "time": 2435, "bl": 2436, "How": 2437, "\u0120code": 2438, "\u0120Sm": 2439, "\u0120higher": 2440, "\u0120Ste": 2441, "ris": 2442, "\u0120page": 2443, "\u0120students": 2444, "\u0120Intern": 2445, "\u0120method": 2446, "\u0120Aug": 2447, "\u0120Per": 2448, "\u0120Ag": 2449, "\u0120policy": 2450, "\u0120Sw": 2451, "\u0120exec": 2452, "\u0120accept": 2453, "ume": 2454, "ribut": 2455, "\u0120words": 2456, "\u0120final": 2457, "\u0120changes": 2458, "\u0120Democr": 2459, "\u0120friends": 2460, "\u0120respect": 2461, "\u0120ep": 2462, "\u0120compan": 2463, "ivil": 2464, "\u0120damage": 2465, "****": 2466, "ogle": 2467, "vironment": 2468, "\u0120neg": 2469, "ental": 2470, "\u0120ap": 2471, "\u0120total": 2472, "ival": 2473, "!\"": 2474, "lim": 2475, "\u0120needs": 2476, "\u0120agre": 2477, "\u0120development": 2478, "\u0120age": 2479, "iple": 2480, "21": 2481, "\u0120results": 2482, "\u0120Af": 2483, "Sh": 2484, "\u0120gun": 2485, "\u0120Obama": 2486, "roll": 2487, "\u0120@": 2488, "\u0120rights": 2489, "\u0120Brit": 2490, "\u0120running": 2491, "\u0120wasn": 2492, "\u0120port": 2493, "\u0120rate": 2494, "\u0120pretty": 2495, "\u0120target": 2496, "\u0120saw": 2497, "\u0120circ": 2498, "\u0120works": 2499, "icro": 2500, "alt": 2501, "over": 2502, "www": 2503, "That": 2504, "lier": 2505, "\u0120everyone": 2506, "ude": 2507, "\u0120pie": 2508, "iddle": 2509, "rael": 2510, "\u0120rad": 2511, "\u0120block": 2512, "\u0120walk": 2513, "To": 2514, "\u00e3\u0123": 2515, "nes": 2516, "\u0120Aust": 2517, "aul": 2518, "rote": 2519, "\u0120South": 2520, "ession": 2521, "oph": 2522, "\u0120shows": 2523, "\u0120site": 2524, "\u0120jo": 2525, "\u0120risk": 2526, "clus": 2527, "lt": 2528, "\u0120inj": 2529, "iding": 2530, "\u0120Spe": 2531, "\u0120chall": 2532, "irm": 2533, "\u012022": 2534, "itting": 2535, "str": 2536, "\u0120hy": 2537, "LE": 2538, "key": 2539, "\u0120began": 2540, "atur": 2541, "ashington": 2542, "lam": 2543, "\u0120Dav": 2544, "bit": 2545, "\u0120size": 2546, "\u0120Par": 2547, "38": 2548, "ournal": 2549, "face": 2550, "\u0120decision": 2551, "\u0120larg": 2552, "\u0120jud": 2553, "rect": 2554, "\u0120continue": 2555, "\u0120Oct": 2556, "overed": 2557, "\u0120Int": 2558, "========": 2559, "\u0120parent": 2560, "\u0120Will": 2561, "\u0120easy": 2562, "\u0120drug": 2563, "anger": 2564, "\u0120sense": 2565, "\u0120di": 2566, "iday": 2567, "\u0120energy": 2568, "istic": 2569, "\u0120associ": 2570, "arter": 2571, "obal": 2572, "eks": 2573, "\u0120El": 2574, "urch": 2575, "\u0120girl": 2576, "oe": 2577, "itle": 2578, "\u012028": 2579, "\u0120Che": 2580, "\u0120request": 2581, "\u0120soon": 2582, "\u0120host": 2583, "ky": 2584, "\u0120states": 2585, "omes": 2586, "\u0120material": 2587, "lex": 2588, "\u0120moment": 2589, "\u0120answ": 2590, "onse": 2591, "\u0120especially": 2592, "\u0120norm": 2593, "\u0120services": 2594, "pite": 2595, "ran": 2596, "\u0120role": 2597, "44": 2598, "):": 2599, "\u0120cred": 2600, "Cl": 2601, "________": 2602, "\u0120mat": 2603, "\u0120log": 2604, "\u0120Clinton": 2605, "OU": 2606, "\u0120office": 2607, "\u012026": 2608, "\u0120charg": 2609, "\u0120track": 2610, "ma": 2611, "\u0120heart": 2612, "\u0120ball": 2613, "\u0120personal": 2614, "\u0120building": 2615, "na": 2616, "set": 2617, "body": 2618, "\u0120Black": 2619, "\u0120increase": 2620, "itten": 2621, "\u0120needed": 2622, "36": 2623, "32": 2624, "=\"": 2625, "\u0120lost": 2626, "\u0120became": 2627, "\u0120groups": 2628, "\u0120Mus": 2629, "\u0120wrote": 2630, "\u0120Pe": 2631, "\u0120prop": 2632, "joy": 2633, "\u00c3\u00a9": 2634, "\u0120White": 2635, "\u0120dead": 2636, ".'": 2637, "\u0120http": 2638, "\u0120webs": 2639, "OS": 2640, "\u0120inside": 2641, "\u0120wrong": 2642, "\u0120statement": 2643, "\u0120...": 2644, "yl": 2645, "\u0120film": 2646, "\u0120music": 2647, "\u0120share": 2648, "ification": 2649, "\u0120release": 2650, "\u0120forward": 2651, "\u0120stay": 2652, "\u0120comput": 2653, "itte": 2654, "ser": 2655, "\u0120original": 2656, "\u0120card": 2657, "\u0120cand": 2658, "\u0120div": 2659, "atural": 2660, "\u0120favor": 2661, "OM": 2662, "\u0120cases": 2663, "uses": 2664, "\u0120section": 2665, "\u0120leave": 2666, "ging": 2667, "oved": 2668, "\u0120Washington": 2669, "39": 2670, "\u0120Gl": 2671, "\u0120required": 2672, "action": 2673, "apan": 2674, "oor": 2675, "iter": 2676, "\u0120King": 2677, "\u0120countries": 2678, "\u0120German": 2679, "lling": 2680, "\u012027": 2681, "34": 2682, "\u0120questions": 2683, "\u0120prim": 2684, "\u0120cell": 2685, "\u0120shoot": 2686, "\u0120anyone": 2687, "\u0120West": 2688, "\u0120affect": 2689, "epend": 2690, "\u0120online": 2691, "\u0120Israel": 2692, "\u0120September": 2693, "\u0120ability": 2694, "\u0120content": 2695, "ises": 2696, "\u0120reve": 2697, "\u0120laun": 2698, "\u0120indic": 2699, "\u0120force": 2700, "cast": 2701, "\u0120sold": 2702, "aving": 2703, "fl": 2704, "\u0120soft": 2705, "\u0120companies": 2706, "ceed": 2707, "\u0120article": 2708, "\u0120aud": 2709, "\u0120rev": 2710, "\u0120educ": 2711, "\u0120playing": 2712, "05": 2713, "\u0120held": 2714, "ctor": 2715, "\u0120released": 2716, "\u0120federal": 2717, "37": 2718, "\u0120administ": 2719, "\u0120interview": 2720, "\u0120install": 2721, "\u0120received": 2722, "\u0120source": 2723, "uk": 2724, "Ph": 2725, "\u0120serious": 2726, "\u0120created": 2727, "\u0120cause": 2728, "\u0120immedi": 2729, "\u0120defin": 2730, "uel": 2731, "\u0120Department": 2732, "ctions": 2733, "\u0120Cour": 2734, "\u0120Now": 2735, "ze": 2736, "ites": 2737, "itution": 2738, "\u0120late": 2739, "\u0120speak": 2740, "ners": 2741, "\u0120legal": 2742, "ari": 2743, "\u0120Cor": 2744, "\u0120weeks": 2745, "\u0120model": 2746, "\u0120pred": 2747, "\u0120exact": 2748, "BC": 2749, "\u0120By": 2750, "ING": 2751, "osing": 2752, "\u0120takes": 2753, "\u0120regard": 2754, "\u0120opportun": 2755, "\u0120price": 2756, "\u0120198": 2757, "\u0120Apr": 2758, "fully": 2759, "\u0120ord": 2760, "\u0120problems": 2761, "ruction": 2762, "ham": 2763, "\u0120Count": 2764, "lege": 2765, "\u0120leaders": 2766, "ET": 2767, "lev": 2768, "\u0120deep": 2769, "ological": 2770, "ese": 2771, "haps": 2772, "\u0120Some": 2773, "\u0120pers": 2774, "\u0120contract": 2775, "\u0120relationship": 2776, "sp": 2777, "oud": 2778, "\u0120base": 2779, "48": 2780, "mit": 2781, "Ad": 2782, "ancial": 2783, "\u0120consum": 2784, "\u0120potential": 2785, "\u0120langu": 2786, "rem": 2787, "eth": 2788, "\u0120relig": 2789, "ressed": 2790, "66": 2791, "\u0120link": 2792, "\u0120lower": 2793, "ayer": 2794, "\u0120June": 2795, "\u0120fem": 2796, "unt": 2797, "erc": 2798, "urd": 2799, "\u0120contact": 2800, "\u0120ill": 2801, "\u0120mother": 2802, "\u0120estab": 2803, "htt": 2804, "\u0120March": 2805, "\u0120Bro": 2806, "\u0120China": 2807, "\u012029": 2808, "\u0120squ": 2809, "\u0120provided": 2810, "\u0120average": 2811, "asons": 2812, "\u01202011": 2813, "\u0120exam": 2814, "lin": 2815, "55": 2816, "ned": 2817, "\u0120perfect": 2818, "\u0120tou": 2819, "alse": 2820, "ux": 2821, "\u0120buy": 2822, "\u0120shot": 2823, "\u0120collect": 2824, "\u0120phot": 2825, "\u0120played": 2826, "\u0120surpr": 2827, "\u0120officials": 2828, "\u0120simple": 2829, "avy": 2830, "\u0120industry": 2831, "\u0120hands": 2832, "ground": 2833, "\u0120pull": 2834, "\u0120round": 2835, "\u0120user": 2836, "\u0120range": 2837, "uary": 2838, "\u0120private": 2839, "ops": 2840, "ees": 2841, "\u0120ways": 2842, "\u0120Mich": 2843, "\u0120veh": 2844, "\u0120except": 2845, "\u0120terms": 2846, "imum": 2847, "pper": 2848, "ION": 2849, "ores": 2850, "\u0120Dragon": 2851, "oul": 2852, "\u0120den": 2853, "\u0120performance": 2854, "\u0120bill": 2855, "cil": 2856, "47": 2857, "\u0120environment": 2858, "\u0120exc": 2859, "add": 2860, "\u0120worth": 2861, "\u0120pict": 2862, "\u0120chance": 2863, "\u01202018": 2864, "bor": 2865, "\u0120speed": 2866, "iction": 2867, "\u0120alleg": 2868, "\u0120Japan": 2869, "atory": 2870, "reet": 2871, "\u0120match": 2872, "\u0120II": 2873, "\u0120stru": 2874, "order": 2875, "\u0120ste": 2876, "\u0120living": 2877, "\u0120struct": 2878, "ino": 2879, "\u0120separ": 2880, "hern": 2881, "\u0120response": 2882, "\u0120enjoy": 2883, "\u0120via": 2884, "AD": 2885, "uments": 2886, "acebook": 2887, "\u0120member": 2888, "ibr": 2889, "izing": 2890, "\u0120tool": 2891, "\u0120Mon": 2892, "\u0120While": 2893, "hood": 2894, "\u0120Ang": 2895, "\u0120Def": 2896, "\u0120offer": 2897, "Tr": 2898, "aur": 2899, "\u0120turned": 2900, "\u0120July": 2901, "down": 2902, "anced": 2903, "\u0120recently": 2904, "\u0120Ear": 2905, "\u0120ce": 2906, "\u0120Star": 2907, "\u0120Cong": 2908, "rought": 2909, "\u0120blood": 2910, "\u0120hope": 2911, "\u0120comment": 2912, "aint": 2913, "\u0120arri": 2914, "iles": 2915, "\u0120particip": 2916, "ought": 2917, "ription": 2918, "08": 2919, "49": 2920, "\u0120gave": 2921, "\u0120select": 2922, "\u0120killed": 2923, "sych": 2924, "\u0120goes": 2925, "ij": 2926, "\u0120coll": 2927, "\u0120impact": 2928, "atives": 2929, "\u0120Ser": 2930, "09": 2931, "\u0120August": 2932, "\u0120boy": 2933, "de": 2934, "\u0120Des": 2935, "\u0120felt": 2936, "US": 2937, "\u0120expected": 2938, "\u0120image": 2939, "\u0120Mark": 2940, "ccording": 2941, "oice": 2942, "EC": 2943, "\u0120Mag": 2944, "ened": 2945, "hold": 2946, "\u0120Post": 2947, "\u0120prevent": 2948, "No": 2949, "\u0120involved": 2950, "\u0120eyes": 2951, "\u0120quickly": 2952, "At": 2953, "unk": 2954, "\u0120behav": 2955, "\u0120ur": 2956, "\u0120led": 2957, "come": 2958, "ey": 2959, "\u0120candid": 2960, "\u0120earlier": 2961, "\u0120focus": 2962, "ety": 2963, "Pro": 2964, "ledge": 2965, "ixed": 2966, "illed": 2967, "\u0120popular": 2968, "AP": 2969, "\u0120sett": 2970, "light": 2971, "\u0120various": 2972, "inks": 2973, "\u0120levels": 2974, "\u0120road": 2975, "ellig": 2976, "ables": 2977, "hel": 2978, "ittee": 2979, "\u0120Gener": 2980, "ype": 2981, "\u0120heard": 2982, "icles": 2983, "\u0120mis": 2984, "\u0120users": 2985, "\u0120San": 2986, "\u0120improve": 2987, "\u0120father": 2988, "\u0120search": 2989, "They": 2990, "vil": 2991, "\u0120profess": 2992, "\u0120knew": 2993, "\u0120loss": 2994, "\u0120events": 2995, "65": 2996, "\u0120billion": 2997, "07": 2998, "02": 2999, "\u0120News": 3000, "\u0120AM": 3001, "\u0120cover": 3002, "where": 3003, "ension": 3004, "\u0120bott": 3005, "\u0120areas": 3006, "ences": 3007, "ope": 3008, "\u0120Twitter": 3009, "ael": 3010, "\u0120gets": 3011, "\u0120Google": 3012, "\u0120sn": 3013, "iant": 3014, "\u0120vote": 3015, "\u0120nearly": 3016, "\u0120included": 3017, "\u0120recogn": 3018, "zz": 3019, "mm": 3020, "aled": 3021, "\u0120happened": 3022, "04": 3023, "\u0120hot": 3024, "\u0120whose": 3025, "\u0120civil": 3026, "\u0120suff": 3027, "oes": 3028, "itiz": 3029, "\u0120Syri": 3030, "\u0120respond": 3031, "\u0120hon": 3032, "\u0120features": 3033, "\u0120economic": 3034, "\u0120April": 3035, "rim": 3036, "\u0120technology": 3037, "\u0120option": 3038, "aging": 3039, "\u0120purch": 3040, "Re": 3041, "\u0120lat": 3042, "chie": 3043, "isl": 3044, "\u0120recomm": 3045, "uf": 3046, "\u0120training": 3047, "\u0120effects": 3048, "\u0120fast": 3049, "\u01202010": 3050, "\u0120occur": 3051, "\u0120website": 3052, "\u0120email": 3053, "\u0120sens": 3054, "ech": 3055, "\u0120oil": 3056, "\u0120influ": 3057, "\u0120currently": 3058, "\u0120Sch": 3059, "\u0120Add": 3060, "\u0120goal": 3061, "\u0120scient": 3062, "\u0120conv": 3063, "100": 3064, "emy": 3065, "\u0120decided": 3066, "\u0120travel": 3067, "\u0120mention": 3068, "LL": 3069, "03": 3070, "\u0120election": 3071, "\u0120phone": 3072, "\u0120looks": 3073, "\u0120situation": 3074, "\u0120cy": 3075, "\u0120hor": 3076, "bed": 3077, "\u0120Court": 3078, "aily": 3079, "aves": 3080, "\u0120quality": 3081, "\u0120Comp": 3082, "wise": 3083, "\u0120table": 3084, "\u0120staff": 3085, "\u0120Wind": 3086, "ett": 3087, "\u0120tried": 3088, "idered": 3089, "\u0120addition": 3090, "\u0120box": 3091, "\u0120lack": 3092, "arily": 3093, "\u0120wide": 3094, "\u0120mid": 3095, "\u0120board": 3096, "ysis": 3097, "\u0120anti": 3098, "ha": 3099, "\u0120dig": 3100, "ening": 3101, "\u0120dro": 3102, "Con": 3103, "68": 3104, "\u0120slow": 3105, "based": 3106, "sequ": 3107, "\u0120path": 3108, "Ex": 3109, "aker": 3110, "\u0120worked": 3111, "\u0120pen": 3112, "\u0120engine": 3113, "\u0120looked": 3114, "\u0120Super": 3115, "\u0120Serv": 3116, "\u0120victim": 3117, "Un": 3118, "\u0120property": 3119, "\u0120introdu": 3120, "\u0120execut": 3121, "\u0120PM": 3122, "Le": 3123, "\u0120color": 3124, "\u0120More": 3125, "\u012060": 3126, "\u0120network": 3127, "\u0120date": 3128, "cul": 3129, "idge": 3130, "\u0120extra": 3131, "31": 3132, "\u0120sle": 3133, "67": 3134, "\u0120wond": 3135, "\u0120reports": 3136, "just": 3137, "\u0120Austral": 3138, "\u0120capital": 3139, "\u0120ens": 3140, "\u0120command": 3141, "\u0120allowed": 3142, "\u0120prep": 3143, "\u0120capt": 3144, "hib": 3145, "\u0120numbers": 3146, "chan": 3147, "\u0120fair": 3148, "mp": 3149, "oms": 3150, "\u0120reach": 3151, "With": 3152, "tain": 3153, "\u0120broad": 3154, "\u0120couple": 3155, "ecause": 3156, "lying": 3157, "\u0120Feb": 3158, "\u0120screen": 3159, "\u0120lives": 3160, "\u0120prior": 3161, "\u0120Congress": 3162, "Ar": 3163, "\u0120approach": 3164, "\u0120emer": 3165, "aries": 3166, "\u0120Dis": 3167, "serv": 3168, "\u0120Ne": 3169, "\u0120built": 3170, "cies": 3171, "\u0120repe": 3172, "\u0120rules": 3173, "force": 3174, "\u0120Pal": 3175, "\u0120financial": 3176, "\u0120considered": 3177, "\u0120Char": 3178, "nces": 3179, "\u0120IS": 3180, "\u0120brought": 3181, "\u0120bi": 3182, "iers": 3183, "\u0120Sim": 3184, "OP": 3185, "\u0120products": 3186, "\u0120visit": 3187, "\u0120document": 3188, "\u0120conduct": 3189, "\u0120completely": 3190, "ining": 3191, "\u0120Calif": 3192, "ibly": 3193, "\u0120written": 3194, "\u0120TV": 3195, "ements": 3196, "\u0120draw": 3197, "One": 3198, "\u0120published": 3199, "\u0120secret": 3200, "rain": 3201, "het": 3202, "\u0120Facebook": 3203, "onday": 3204, "\u0120Up": 3205, "\u0120sexual": 3206, "\u0120thous": 3207, "\u0120Pat": 3208, "\u0120ess": 3209, "\u0120standard": 3210, "\u0120arm": 3211, "ges": 3212, "ection": 3213, "\u0120fell": 3214, "\u0120foreign": 3215, "ani": 3216, "\u0120Friday": 3217, "\u0120regular": 3218, "inary": 3219, "\u0120increased": 3220, "\u0120usually": 3221, "\u0120demon": 3222, "\u0120dark": 3223, "\u0120additional": 3224, "rol": 3225, "\u0120Of": 3226, "\u0120production": 3227, "!!": 3228, "undred": 3229, "\u0120international": 3230, "idents": 3231, "\u0120Free": 3232, "roup": 3233, "\u0120race": 3234, "\u0120mach": 3235, "\u0120huge": 3236, "All": 3237, "lear": 3238, "ovember": 3239, "\u0120town": 3240, "\u0120attention": 3241, "\u0120Off": 3242, "yond": 3243, "\u0120Then": 3244, "field": 3245, "\u0120terror": 3246, "raz": 3247, "\u0120Bo": 3248, "\u0120meeting": 3249, "\u0120Park": 3250, "\u0120arrest": 3251, "\u0120fear": 3252, "\u0120aw": 3253, "\u0120Val": 3254, "oring": 3255, "',": 3256, "\u0120extreme": 3257, "arr": 3258, "\u0120workers": 3259, "After": 3260, "\u012031": 3261, "net": 3262, "ament": 3263, "\u0120directly": 3264, "\u0120population": 3265, "ube": 3266, "\u0120October": 3267, "\u0120IN": 3268, "\u0120January": 3269, "59": 3270, "\u0120David": 3271, "\u0120cross": 3272, "cember": 3273, "\u0120First": 3274, "\u0120message": 3275, "irit": 3276, "\u0120nation": 3277, "\u0120poll": 3278, "isions": 3279, "\u0120answer": 3280, "ny": 3281, "isode": 3282, "\u0120carry": 3283, "\u0120Russia": 3284, "\u0120hear": 3285, "ength": 3286, "roy": 3287, "\u0120natural": 3288, "inally": 3289, "\u0120dog": 3290, "mitted": 3291, "\u0120trade": 3292, "\u0120subst": 3293, "\u0120multiple": 3294, "\u0120Afric": 3295, "\u0120fans": 3296, "\u0120sort": 3297, "\u0120global": 3298, "ication": 3299, "\u0120Wed": 3300, "ara": 3301, "\u0120achie": 3302, "\u0120language": 3303, "vey": 3304, "\u0120tal": 3305, "\u0120necessary": 3306, "\u0120details": 3307, "\u0120sen": 3308, "\u0120Sund": 3309, "\u0120Reg": 3310, "\u0120Rec": 3311, "06": 3312, "\u0120sil": 3313, "ressive": 3314, "\u0120medical": 3315, "unch": 3316, "ornia": 3317, "\u0120und": 3318, "fort": 3319, "ocks": 3320, "\u0120Monday": 3321, "uesday": 3322, "craft": 3323, "77": 3324, "urt": 3325, "\u0120ver": 3326, "\u0120Hill": 3327, "\u0120receive": 3328, "\u0120morning": 3329, "estern": 3330, "\u0120bank": 3331, "\u0120sat": 3332, "irth": 3333, "\u0120High": 3334, "\u0120device": 3335, "\u0120THE": 3336, "\u0120Center": 3337, "\u0120safe": 3338, "\u0120ple": 3339, "\u0120Canada": 3340, "\u0120systems": 3341, "\u0120assist": 3342, "\u0120surv": 3343, "\u0120battle": 3344, "\u0120Soc": 3345, "vertis": 3346, "She": 3347, "\u0120paper": 3348, "\u0120growth": 3349, "\u0120cast": 3350, "Sc": 3351, "\u0120plans": 3352, "lled": 3353, "\u0120parts": 3354, "\u0120wall": 3355, "\u0120movement": 3356, "\u0120practice": 3357, "imately": 3358, "\u0120display": 3359, "\u0120sometimes": 3360, "omp": 3361, "\u0120Paul": 3362, "\u0120Yes": 3363, "king": 3364, "58": 3365, "oly": 3366, "\u0120son": 3367, "\u0120avoid": 3368, "okes": 3369, "\u0120Jew": 3370, "\u0120towards": 3371, "asc": 3372, "\u0120//": 3373, "\u0120Kore": 3374, "\u0120talking": 3375, "\u0120correct": 3376, "\u0120spent": 3377, "icks": 3378, "iable": 3379, "eared": 3380, "\u0120term": 3381, "\u0120wants": 3382, "oming": 3383, "\u0120ut": 3384, "\u0120doub": 3385, "\u0120forces": 3386, "\u0120please": 3387, "69": 3388, "\u0120November": 3389, "atform": 3390, "ondon": 3391, "\u0120ones": 3392, "\u0120immediately": 3393, "\u0120Russian": 3394, "\u0120Met": 3395, "\u0120deg": 3396, "\u0120parents": 3397, "CH": 3398, "\u0120Americans": 3399, "aly": 3400, "\u0120Mod": 3401, "\u0120shown": 3402, "\u0120conditions": 3403, "\u0120stuff": 3404, "\u0120reb": 3405, "\u0120Your": 3406, "\u0120includes": 3407, "nown": 3408, "\u0120Sam": 3409, "\u0120experien": 3410, "mission": 3411, "\u0120Even": 3412, "aught": 3413, "\u0120announced": 3414, "\u0120Republican": 3415, "\u0120determin": 3416, "\u0120described": 3417, "\u0120County": 3418, "()": 3419, "\u0120door": 3420, "\u0120changed": 3421, "\u0120neigh": 3422, "\u0120Here": 3423, "\u0120clean": 3424, "\u0120pan": 3425, "\u0120December": 3426, "\u0120European": 3427, "iring": 3428, "apter": 3429, "\u0120club": 3430, "\u0120Tuesday": 3431, "\u0120paid": 3432, "\u0120Net": 3433, "\u0120attacks": 3434, "\u0120characters": 3435, "\u0120alone": 3436, "\u0120director": 3437, "dom": 3438, "\u012035": 3439, "\u0120load": 3440, "\u0120rout": 3441, "\u0120California": 3442, "\u0120finally": 3443, "\u0120rac": 3444, "\u0120contr": 3445, "\u0120exactly": 3446, "resh": 3447, "pri": 3448, "\u0120Islam": 3449, "\u0120nature": 3450, "\u0120career": 3451, "\u0120latest": 3452, "\u0120convers": 3453, "\u0120Sl": 3454, "pose": 3455, "cient": 3456, "\u0120Inc": 3457, "ivity": 3458, "88": 3459, "\u0120Att": 3460, "\u0120Mor": 3461, "nesday": 3462, "\u0120weight": 3463, "ken": 3464, "\u0120note": 3465, "\u0120teams": 3466, "\u0120\\": 3467, "airs": 3468, "\u0120Green": 3469, "\u0120hundred": 3470, "onent": 3471, "\u0120streng": 3472, "\u0120consist": 3473, "icated": 3474, "\u0120regul": 3475, "\u0120lic": 3476, "astic": 3477, "\u0120ten": 3478, "ursday": 3479, "elligence": 3480, "ously": 3481, "\u0120UK": 3482, "BI": 3483, "\u0120costs": 3484, "\u0120independ": 3485, "\u0120AP": 3486, "\u0120normal": 3487, "\u0120hom": 3488, "\u0120obvious": 3489, "\u0120swe": 3490, "\u0120star": 3491, "\u0120ready": 3492, "acher": 3493, "\u0120implement": 3494, "gest": 3495, "\u0120song": 3496, "\u0120Get": 3497, "\u0120Lab": 3498, "\u0120interesting": 3499, "using": 3500, "\u0120giving": 3501, "\u0120Sunday": 3502, "\u0120etc": 3503, "\u0120middle": 3504, "\u0120remember": 3505, "right": 3506, "osition": 3507, "utions": 3508, "\u0120max": 3509, "46": 3510, "\u0120yourself": 3511, "\u0120demand": 3512, "\u0120treatment": 3513, "\u0120danger": 3514, "\u0120Cons": 3515, "\u0120guy": 3516, "\u0120British": 3517, "\u0120physical": 3518, "\u0120related": 3519, "\u0120remain": 3520, "\u0120couldn": 3521, "\u0120refer": 3522, "\u0120citiz": 3523, "box": 3524, "ENT": 3525, "board": 3526, "\u0120inn": 3527, "IG": 3528, "ero": 3529, "\u0120Street": 3530, "ospital": 3531, "rench": 3532, "chers": 3533, "\u0120stra": 3534, "OL": 3535, "ager": 3536, "\u0120AN": 3537, "\u0120easily": 3538, "IA": 3539, "enge": 3540, "iny": 3541, "\u0120clos": 3542, "ocked": 3543, "\u0120uses": 3544, "\u0120Coun": 3545, "Im": 3546, "uild": 3547, "??": 3548, "more": 3549, "\u0120ang": 3550, "\u0120write": 3551, "olute": 3552, "57": 3553, "\u0120leader": 3554, "\u0120reading": 3555, "</": 3556, "\u0120autom": 3557, "ests": 3558, "43": 3559, "\u0120legisl": 3560, "\u0120Gold": 3561, "\u0120designed": 3562, "\u0120ST": 3563, "\u0120Leg": 3564, "ares": 3565, "\u0120beaut": 3566, "\u0120Tex": 3567, "\u0120appears": 3568, "\u0120strugg": 3569, "\u0120Rom": 3570, "\u012000": 3571, "\u0120choice": 3572, "\u0120particularly": 3573, "\u0120From": 3574, "oper": 3575, "\u0120London": 3576, "anned": 3577, "\u0120allows": 3578, "obile": 3579, "\u0120difference": 3580, "\u00e2\u0122\u00a2": 3581, "\u0120View": 3582, "\u0120Wednesday": 3583, "\u0120although": 3584, "\u0120relative": 3585, "\u0120application": 3586, "atever": 3587, "\u0120aren": 3588, "\u0120myself": 3589, "\u0120imag": 3590, "\u0120dise": 3591, "\u0120society": 3592, "\u0120frequ": 3593, "\u0120English": 3594, "\u0120poor": 3595, "\u0120Day": 3596, "\u0120writing": 3597, "\u0120seven": 3598, "\u0120starting": 3599, "\u0120bud": 3600, "\u0120print": 3601, "\u0120Trans": 3602, "ufact": 3603, "\u0120Stud": 3604, "new": 3605, "\u0120crim": 3606, "\u0120gives": 3607, "\u0120cool": 3608, "ae": 3609, "iance": 3610, "\u0120General": 3611, "\u0120thinking": 3612, "\u0120save": 3613, "\u0120limited": 3614, "\u0120Party": 3615, "\u0120meaning": 3616, "pen": 3617, "owers": 3618, "\u0120Jack": 3619, "EM": 3620, "\u0120nice": 3621, "rupt": 3622, "\u0120gas": 3623, "\u0120eight": 3624, "\u0120feet": 3625, "\u0120effort": 3626, "\u0120ign": 3627, "icit": 3628, "Bl": 3629, "coin": 3630, "\u0120opin": 3631, "\u0120brain": 3632, "While": 3633, "hest": 3634, "\u0120Thursday": 3635, "\u0120wouldn": 3636, "aughter": 3637, "\u0120touch": 3638, "lements": 3639, "\u0120studies": 3640, "\u0120center": 3641, "cont": 3642, "orge": 3643, "\u0120computer": 3644, "\u0120investigation": 3645, "Pl": 3646, "orks": 3647, "\u01202008": 3648, "\u0120increasing": 3649, "\u0120store": 3650, "\u0120co (…) number