@openmrs/esm-form-builder-app 2.0.2-pre.509 → 2.0.2-pre.511
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/153.js +1 -1
- package/dist/153.js.map +1 -1
- package/dist/682.js +2 -0
- package/dist/682.js.map +1 -0
- package/dist/952.js +1 -0
- package/dist/952.js.map +1 -0
- package/dist/990.js +1 -1
- package/dist/990.js.map +1 -1
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/openmrs-esm-form-builder-app.js +1 -1
- package/dist/openmrs-esm-form-builder-app.js.buildmanifest.json +175 -175
- package/dist/openmrs-esm-form-builder-app.js.map +1 -1
- package/dist/routes.json +1 -1
- package/package.json +5 -1
- package/src/components/interactive-builder/draggable-question.component.tsx +101 -0
- package/src/components/interactive-builder/draggable-question.scss +51 -0
- package/src/components/interactive-builder/droppable-container.component.tsx +23 -0
- package/src/components/interactive-builder/interactive-builder.component.tsx +230 -191
- package/dist/19.js +0 -1
- package/dist/19.js.map +0 -1
- package/dist/265.js +0 -2
- package/dist/265.js.map +0 -1
- /package/dist/{265.js.LICENSE.txt → 682.js.LICENSE.txt} +0 -0
package/dist/682.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 682.js.LICENSE.txt */
|
|
2
|
+
(globalThis.webpackChunk_openmrs_esm_form_builder_app=globalThis.webpackChunk_openmrs_esm_form_builder_app||[]).push([[682],{19675:(e,t,n)=>{"use strict";n.d(t,{rJ:()=>a});var i,r=n(81672),o=n.n(r),s=n(68838);const a=o().forwardRef((function(e,t){let{children:n,size:r=16,...a}=e;return o().createElement(s.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...a},i||(i=o().createElement("path",{d:"M28 8h2V4a2.0021 2.0021 0 00-2-2H24V4h4zM17 2H21V4H17zM28 11H30V15H28zM28 18v4H24V10a2.0023 2.0023 0 00-2-2H10V4h4V2H10A2.0023 2.0023 0 008 4V8H4a2.0023 2.0023 0 00-2 2V28a2.0023 2.0023 0 002 2H22a2.0023 2.0023 0 002-2V24h4a2.0023 2.0023 0 002-2V18zM22 28H4V10H22z"})),n)}))},60887:(e,t,n)=>{"use strict";n.d(t,{LB:()=>De,Lg:()=>J,MA:()=>se,O1:()=>Be,Zj:()=>He,VT:()=>v,Dy:()=>b});var i=n(81672),r=n.n(i),o=n(5183),s=n(24285);const a={display:"none"};function l(e){let{id:t,value:n}=e;return r().createElement("div",{id:t,style:a},n)}const c={position:"fixed",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};function u(e){let{id:t,announcement:n}=e;return r().createElement("div",{id:t,style:c,role:"status","aria-live":"assertive","aria-atomic":!0},n)}const d=(0,i.createContext)(null),h={draggable:"\n To pick up a draggable item, press the space bar.\n While dragging, use the arrow keys to move the item.\n Press space again to drop the item in its new position, or press escape to cancel.\n "},f={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function p(e){let{announcements:t=f,container:n,hiddenTextDescribedById:a,screenReaderInstructions:c=h}=e;const{announce:p,announcement:g}=function(){const[e,t]=(0,i.useState)("");return{announce:(0,i.useCallback)((e=>{null!=e&&t(e)}),[]),announcement:e}}(),m=(0,s.Ld)("DndLiveRegion"),[v,b]=(0,i.useState)(!1);if((0,i.useEffect)((()=>{b(!0)}),[]),function(e){const t=(0,i.useContext)(d);(0,i.useEffect)((()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)}),[e,t])}((0,i.useMemo)((()=>({onDragStart(e){let{active:n}=e;p(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:i}=e;t.onDragMove&&p(t.onDragMove({active:n,over:i}))},onDragOver(e){let{active:n,over:i}=e;p(t.onDragOver({active:n,over:i}))},onDragEnd(e){let{active:n,over:i}=e;p(t.onDragEnd({active:n,over:i}))},onDragCancel(e){let{active:n,over:i}=e;p(t.onDragCancel({active:n,over:i}))}})),[p,t])),!v)return null;const y=r().createElement(r().Fragment,null,r().createElement(l,{id:a,value:c.draggable}),r().createElement(u,{id:m,announcement:g}));return n?(0,o.createPortal)(y,n):y}var g;function m(){}function v(e,t){return(0,i.useMemo)((()=>({sensor:e,options:null!=t?t:{}})),[e,t])}function b(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,i.useMemo)((()=>[...t].filter((e=>null!=e))),[...t])}!function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"}(g||(g={}));const y=Object.freeze({x:0,y:0});function w(e,t){let{data:{value:n}}=e,{data:{value:i}}=t;return i-n}function _(e,t){const n=Math.max(t.top,e.top),i=Math.max(t.left,e.left),r=Math.min(t.left+t.width,e.left+e.width),o=Math.min(t.top+t.height,e.top+e.height),s=r-i,a=o-n;if(i<r&&n<o){const n=t.width*t.height,i=e.width*e.height,r=s*a;return Number((r/(n+i-r)).toFixed(4))}return 0}const A=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:i}=e;const r=[];for(const e of i){const{id:i}=e,o=n.get(i);if(o){const n=_(o,t);n>0&&r.push({id:i,data:{droppableContainer:e,value:n}})}}return r.sort(w)};function x(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:y}function C(e){return function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return i.reduce(((t,n)=>({...t,top:t.top+e*n.y,bottom:t.bottom+e*n.y,left:t.left+e*n.x,right:t.right+e*n.x})),{...t})}}const S=C(1);const E={ignoreTransform:!1};function k(e,t){void 0===t&&(t=E);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:t,transformOrigin:i}=(0,s.Jj)(e).getComputedStyle(e);t&&(n=function(e,t,n){const i=function(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}(t);if(!i)return e;const{scaleX:r,scaleY:o,x:s,y:a}=i,l=e.left-s-(1-r)*parseFloat(n),c=e.top-a-(1-o)*parseFloat(n.slice(n.indexOf(" ")+1)),u=r?e.width/r:e.width,d=o?e.height/o:e.height;return{width:u,height:d,top:c,right:l+u,bottom:c+d,left:l}}(n,t,i))}const{top:i,left:r,width:o,height:a,bottom:l,right:c}=n;return{top:i,left:r,width:o,height:a,bottom:l,right:c}}function $(e){return k(e,{ignoreTransform:!0})}function M(e,t){const n=[];return e?function i(r){if(null!=t&&n.length>=t)return n;if(!r)return n;if((0,s.qk)(r)&&null!=r.scrollingElement&&!n.includes(r.scrollingElement))return n.push(r.scrollingElement),n;if(!(0,s.Re)(r)||(0,s.vZ)(r))return n;if(n.includes(r))return n;const o=(0,s.Jj)(e).getComputedStyle(r);return r!==e&&function(e,t){void 0===t&&(t=(0,s.Jj)(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some((e=>{const i=t[e];return"string"==typeof i&&n.test(i)}))}(r,o)&&n.push(r),function(e,t){return void 0===t&&(t=(0,s.Jj)(e).getComputedStyle(e)),"fixed"===t.position}(r,o)?n:i(r.parentNode)}(e):n}function T(e){const[t]=M(e,1);return null!=t?t:null}function R(e){return s.Nq&&e?(0,s.FJ)(e)?e:(0,s.UG)(e)?(0,s.qk)(e)||e===(0,s.r3)(e).scrollingElement?window:(0,s.Re)(e)?e:null:null:null}function L(e){return(0,s.FJ)(e)?e.scrollX:e.scrollLeft}function O(e){return(0,s.FJ)(e)?e.scrollY:e.scrollTop}function F(e){return{x:L(e),y:O(e)}}var D;function I(e){return!(!s.Nq||!e)&&e===document.scrollingElement}function j(e){const t={x:0,y:0},n=I(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},i={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=i.y,isRight:e.scrollLeft>=i.x,maxScroll:i,minScroll:t}}!function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"}(D||(D={}));const P={x:.2,y:.2};function B(e,t,n,i,r){let{top:o,left:s,right:a,bottom:l}=n;void 0===i&&(i=10),void 0===r&&(r=P);const{isTop:c,isBottom:u,isLeft:d,isRight:h}=j(e),f={x:0,y:0},p={x:0,y:0},g=t.height*r.y,m=t.width*r.x;return!c&&o<=t.top+g?(f.y=D.Backward,p.y=i*Math.abs((t.top+g-o)/g)):!u&&l>=t.bottom-g&&(f.y=D.Forward,p.y=i*Math.abs((t.bottom-g-l)/g)),!h&&a>=t.right-m?(f.x=D.Forward,p.x=i*Math.abs((t.right-m-a)/m)):!d&&s<=t.left+m&&(f.x=D.Backward,p.x=i*Math.abs((t.left+m-s)/m)),{direction:f,speed:p}}function U(e){if(e===document.scrollingElement){const{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}const{top:t,left:n,right:i,bottom:r}=e.getBoundingClientRect();return{top:t,left:n,right:i,bottom:r,width:e.clientWidth,height:e.clientHeight}}function N(e){return e.reduce(((e,t)=>(0,s.IH)(e,F(t))),y)}const H=[["x",["left","right"],function(e){return e.reduce(((e,t)=>e+L(t)),0)}],["y",["top","bottom"],function(e){return e.reduce(((e,t)=>e+O(t)),0)}]];class W{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const n=M(t),i=N(n);this.rect={...e},this.width=e.width,this.height=e.height;for(const[e,t,r]of H)for(const o of t)Object.defineProperty(this,o,{get:()=>{const t=r(n),s=i[e]-t;return this.rect[o]+s},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class z{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach((e=>{var t;return null==(t=this.target)?void 0:t.removeEventListener(...e)}))},this.target=e}add(e,t,n){var i;null==(i=this.target)||i.addEventListener(e,t,n),this.listeners.push([e,t,n])}}function V(e,t){const n=Math.abs(e.x),i=Math.abs(e.y);return"number"==typeof t?Math.sqrt(n**2+i**2)>t:"x"in t&&"y"in t?n>t.x&&i>t.y:"x"in t?n>t.x:"y"in t&&i>t.y}var G,q;function K(e){e.preventDefault()}function Z(e){e.stopPropagation()}!function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"}(G||(G={})),function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter"}(q||(q={}));const Y={start:[q.Space,q.Enter],cancel:[q.Esc],end:[q.Space,q.Enter]},X=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case q.Right:return{...n,x:n.x+25};case q.Left:return{...n,x:n.x-25};case q.Down:return{...n,y:n.y+25};case q.Up:return{...n,y:n.y-25}}};class J{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:t}}=e;this.props=e,this.listeners=new z((0,s.r3)(t)),this.windowListeners=new z((0,s.Jj)(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(G.Resize,this.handleCancel),this.windowListeners.add(G.VisibilityChange,this.handleCancel),setTimeout((()=>this.listeners.add(G.Keydown,this.handleKeyDown)))}handleStart(){const{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&function(e,t){if(void 0===t&&(t=k),!e)return;const{top:n,left:i,bottom:r,right:o}=t(e);T(e)&&(r<=0||o<=0||n>=window.innerHeight||i>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}(n),t(y)}handleKeyDown(e){if((0,s.vd)(e)){const{active:t,context:n,options:i}=this.props,{keyboardCodes:r=Y,coordinateGetter:o=X,scrollBehavior:a="smooth"}=i,{code:l}=e;if(r.end.includes(l))return void this.handleEnd(e);if(r.cancel.includes(l))return void this.handleCancel(e);const{collisionRect:c}=n.current,u=c?{x:c.left,y:c.top}:y;this.referenceCoordinates||(this.referenceCoordinates=u);const d=o(e,{active:t,context:n.current,currentCoordinates:u});if(d){const t=(0,s.$X)(d,u),i={x:0,y:0},{scrollableAncestors:r}=n.current;for(const n of r){const r=e.code,{isTop:o,isRight:s,isLeft:l,isBottom:c,maxScroll:u,minScroll:h}=j(n),f=U(n),p={x:Math.min(r===q.Right?f.right-f.width/2:f.right,Math.max(r===q.Right?f.left:f.left+f.width/2,d.x)),y:Math.min(r===q.Down?f.bottom-f.height/2:f.bottom,Math.max(r===q.Down?f.top:f.top+f.height/2,d.y))},g=r===q.Right&&!s||r===q.Left&&!l,m=r===q.Down&&!c||r===q.Up&&!o;if(g&&p.x!==d.x){const e=n.scrollLeft+t.x,o=r===q.Right&&e<=u.x||r===q.Left&&e>=h.x;if(o&&!t.y)return void n.scrollTo({left:e,behavior:a});i.x=o?n.scrollLeft-e:r===q.Right?n.scrollLeft-u.x:n.scrollLeft-h.x,i.x&&n.scrollBy({left:-i.x,behavior:a});break}if(m&&p.y!==d.y){const e=n.scrollTop+t.y,o=r===q.Down&&e<=u.y||r===q.Up&&e>=h.y;if(o&&!t.x)return void n.scrollTo({top:e,behavior:a});i.y=o?n.scrollTop-e:r===q.Down?n.scrollTop-u.y:n.scrollTop-h.y,i.y&&n.scrollBy({top:-i.y,behavior:a});break}}this.handleMove(e,(0,s.IH)((0,s.$X)(d,this.referenceCoordinates),i))}}}handleMove(e,t){const{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){const{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){const{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}function Q(e){return Boolean(e&&"distance"in e)}function ee(e){return Boolean(e&&"delay"in e)}J.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:i=Y,onActivation:r}=t,{active:o}=n;const{code:s}=e.nativeEvent;if(i.start.includes(s)){const t=o.activatorNode.current;return!(t&&e.target!==t||(e.preventDefault(),null==r||r({event:e.nativeEvent}),0))}return!1}}];class te{constructor(e,t,n){var i;void 0===n&&(n=function(e){const{EventTarget:t}=(0,s.Jj)(e);return e instanceof t?e:(0,s.r3)(e)}(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;const{event:r}=e,{target:o}=r;this.props=e,this.events=t,this.document=(0,s.r3)(o),this.documentListeners=new z(this.document),this.listeners=new z(n),this.windowListeners=new z((0,s.Jj)(o)),this.initialCoordinates=null!=(i=(0,s.DC)(r))?i:y,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:t}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),this.windowListeners.add(G.Resize,this.handleCancel),this.windowListeners.add(G.DragStart,K),this.windowListeners.add(G.VisibilityChange,this.handleCancel),this.windowListeners.add(G.ContextMenu,K),this.documentListeners.add(G.Keydown,this.handleKeydown),t){if(Q(t))return;if(ee(t))return void(this.timeoutId=setTimeout(this.handleStart,t.delay))}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),null!==this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handleStart(){const{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(G.Click,Z,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(G.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;const{activated:n,initialCoordinates:i,props:r}=this,{onMove:o,options:{activationConstraint:a}}=r;if(!i)return;const l=null!=(t=(0,s.DC)(e))?t:y,c=(0,s.$X)(i,l);if(!n&&a){if(ee(a))return V(c,a.tolerance)?this.handleCancel():void 0;if(Q(a))return null!=a.tolerance&&V(c,a.tolerance)?this.handleCancel():V(c,a.distance)?this.handleStart():void 0}e.cancelable&&e.preventDefault(),o(l)}handleEnd(){const{onEnd:e}=this.props;this.detach(),e()}handleCancel(){const{onCancel:e}=this.props;this.detach(),e()}handleKeydown(e){e.code===q.Esc&&this.handleCancel()}removeTextSelection(){var e;null==(e=this.document.getSelection())||e.removeAllRanges()}}const ne={move:{name:"pointermove"},end:{name:"pointerup"}};class ie extends te{constructor(e){const{event:t}=e,n=(0,s.r3)(t.target);super(e,ne,n)}}ie.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:i}=t;return!(!n.isPrimary||0!==n.button||(null==i||i({event:n}),0))}}];const re={move:{name:"mousemove"},end:{name:"mouseup"}};var oe;!function(e){e[e.RightClick=2]="RightClick"}(oe||(oe={}));class se extends te{constructor(e){super(e,re,(0,s.r3)(e.event.target))}}se.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:i}=t;return n.button!==oe.RightClick&&(null==i||i({event:n}),!0)}}];const ae={move:{name:"touchmove"},end:{name:"touchend"}};var le,ce;(class extends te{constructor(e){super(e,ae)}static setup(){return window.addEventListener(ae.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(ae.move.name,e)};function e(){}}}).activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:i}=t;const{touches:r}=n;return!(r.length>1||(null==i||i({event:n}),0))}}],function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"}(le||(le={})),function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"}(ce||(ce={}));const ue={x:{[D.Backward]:!1,[D.Forward]:!1},y:{[D.Backward]:!1,[D.Forward]:!1}};var de,he;!function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"}(de||(de={})),function(e){e.Optimized="optimized"}(he||(he={}));const fe=new Map;function pe(e,t){return(0,s.Gj)((n=>e?n||("function"==typeof t?t(e):e):null),[t,e])}function ge(e){let{callback:t,disabled:n}=e;const r=(0,s.zX)(t),o=(0,i.useMemo)((()=>{if(n||"undefined"==typeof window||void 0===window.ResizeObserver)return;const{ResizeObserver:e}=window;return new e(r)}),[n]);return(0,i.useEffect)((()=>()=>null==o?void 0:o.disconnect()),[o]),o}function me(e){return new W(k(e),e)}function ve(e,t,n){void 0===t&&(t=me);const[r,o]=(0,i.useReducer)((function(i){if(!e)return null;var r;if(!1===e.isConnected)return null!=(r=null!=i?i:n)?r:null;const o=t(e);return JSON.stringify(i)===JSON.stringify(o)?i:o}),null),a=function(e){let{callback:t,disabled:n}=e;const r=(0,s.zX)(t),o=(0,i.useMemo)((()=>{if(n||"undefined"==typeof window||void 0===window.MutationObserver)return;const{MutationObserver:e}=window;return new e(r)}),[r,n]);return(0,i.useEffect)((()=>()=>null==o?void 0:o.disconnect()),[o]),o}({callback(t){if(e)for(const n of t){const{type:t,target:i}=n;if("childList"===t&&i instanceof HTMLElement&&i.contains(e)){o();break}}}}),l=ge({callback:o});return(0,s.LI)((()=>{o(),e?(null==l||l.observe(e),null==a||a.observe(document.body,{childList:!0,subtree:!0})):(null==l||l.disconnect(),null==a||a.disconnect())}),[e]),r}const be=[];function ye(e,t){void 0===t&&(t=[]);const n=(0,i.useRef)(null);return(0,i.useEffect)((()=>{n.current=null}),t),(0,i.useEffect)((()=>{const t=e!==y;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)}),[e]),n.current?(0,s.$X)(e,n.current):y}function we(e){return(0,i.useMemo)((()=>e?function(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}(e):null),[e])}const _e=[];const Ae=[{sensor:ie,options:{}},{sensor:J,options:{}}],xe={current:{}},Ce={draggable:{measure:$},droppable:{measure:$,strategy:de.WhileDragging,frequency:he.Optimized},dragOverlay:{measure:k}};class Se extends Map{get(e){var t;return null!=e&&null!=(t=super.get(e))?t:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter((e=>{let{disabled:t}=e;return!t}))}getNodeFor(e){var t,n;return null!=(t=null==(n=this.get(e))?void 0:n.node.current)?t:void 0}}const Ee={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Se,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:m},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Ce,measureDroppableContainers:m,windowRect:null,measuringScheduled:!1},ke={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:m,draggableNodes:new Map,over:null,measureDroppableContainers:m},$e=(0,i.createContext)(ke),Me=(0,i.createContext)(Ee);function Te(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Se}}}function Re(e,t){switch(t.type){case g.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case g.DragMove:return e.draggable.active?{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}}:e;case g.DragEnd:case g.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case g.RegisterDroppable:{const{element:n}=t,{id:i}=n,r=new Se(e.droppable.containers);return r.set(i,n),{...e,droppable:{...e.droppable,containers:r}}}case g.SetDroppableDisabled:{const{id:n,key:i,disabled:r}=t,o=e.droppable.containers.get(n);if(!o||i!==o.key)return e;const s=new Se(e.droppable.containers);return s.set(n,{...o,disabled:r}),{...e,droppable:{...e.droppable,containers:s}}}case g.UnregisterDroppable:{const{id:n,key:i}=t,r=e.droppable.containers.get(n);if(!r||i!==r.key)return e;const o=new Se(e.droppable.containers);return o.delete(n),{...e,droppable:{...e.droppable,containers:o}}}default:return e}}function Le(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:o}=(0,i.useContext)($e),a=(0,s.D9)(r),l=(0,s.D9)(null==n?void 0:n.id);return(0,i.useEffect)((()=>{if(!t&&!r&&a&&null!=l){if(!(0,s.vd)(a))return;if(document.activeElement===a.target)return;const e=o.get(l);if(!e)return;const{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame((()=>{for(const e of[t.current,n.current]){if(!e)continue;const t=(0,s.so)(e);if(t){t.focus();break}}}))}}),[r,t,o,l,a]),null}const Oe=(0,i.createContext)({...y,scaleX:1,scaleY:1});var Fe;!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"}(Fe||(Fe={}));const De=(0,i.memo)((function(e){var t,n,a,l;let{id:c,accessibility:u,autoScroll:h=!0,children:f,sensors:m=Ae,collisionDetection:v=A,measuring:b,modifiers:w,..._}=e;const C=(0,i.useReducer)(Re,void 0,Te),[E,$]=C,[L,O]=function(){const[e]=(0,i.useState)((()=>new Set)),t=(0,i.useCallback)((t=>(e.add(t),()=>e.delete(t))),[e]);return[(0,i.useCallback)((t=>{let{type:n,event:i}=t;e.forEach((e=>{var t;return null==(t=e[n])?void 0:t.call(e,i)}))}),[e]),t]}(),[j,P]=(0,i.useState)(Fe.Uninitialized),U=j===Fe.Initialized,{draggable:{active:H,nodes:z,translate:V},droppable:{containers:G}}=E,q=H?z.get(H):null,K=(0,i.useRef)({initial:null,translated:null}),Z=(0,i.useMemo)((()=>{var e;return null!=H?{id:H,data:null!=(e=null==q?void 0:q.data)?e:xe,rect:K}:null}),[H,q]),Y=(0,i.useRef)(null),[X,J]=(0,i.useState)(null),[Q,ee]=(0,i.useState)(null),te=(0,s.Ey)(_,Object.values(_)),ne=(0,s.Ld)("DndDescribedBy",c),ie=(0,i.useMemo)((()=>G.getEnabled()),[G]),re=(oe=b,(0,i.useMemo)((()=>({draggable:{...Ce.draggable,...null==oe?void 0:oe.draggable},droppable:{...Ce.droppable,...null==oe?void 0:oe.droppable},dragOverlay:{...Ce.dragOverlay,...null==oe?void 0:oe.dragOverlay}})),[null==oe?void 0:oe.draggable,null==oe?void 0:oe.droppable,null==oe?void 0:oe.dragOverlay]));var oe;const{droppableRects:se,measureDroppableContainers:ae,measuringScheduled:he}=function(e,t){let{dragging:n,dependencies:r,config:o}=t;const[a,l]=(0,i.useState)(null),{frequency:c,measure:u,strategy:d}=o,h=(0,i.useRef)(e),f=function(){switch(d){case de.Always:return!1;case de.BeforeDragging:return n;default:return!n}}(),p=(0,s.Ey)(f),g=(0,i.useCallback)((function(e){void 0===e&&(e=[]),p.current||l((t=>null===t?e:t.concat(e.filter((e=>!t.includes(e))))))}),[p]),m=(0,i.useRef)(null),v=(0,s.Gj)((t=>{if(f&&!n)return fe;if(!t||t===fe||h.current!==e||null!=a){const t=new Map;for(let n of e){if(!n)continue;if(a&&a.length>0&&!a.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}const e=n.node.current,i=e?new W(u(e),e):null;n.rect.current=i,i&&t.set(n.id,i)}return t}return t}),[e,a,n,f,u]);return(0,i.useEffect)((()=>{h.current=e}),[e]),(0,i.useEffect)((()=>{f||g()}),[n,f]),(0,i.useEffect)((()=>{a&&a.length>0&&l(null)}),[JSON.stringify(a)]),(0,i.useEffect)((()=>{f||"number"!=typeof c||null!==m.current||(m.current=setTimeout((()=>{g(),m.current=null}),c))}),[c,f,g,...r]),{droppableRects:v,measureDroppableContainers:g,measuringScheduled:null!=a}}(ie,{dragging:U,dependencies:[V.x,V.y],config:re.droppable}),me=function(e,t){const n=null!==t?e.get(t):void 0,i=n?n.node.current:null;return(0,s.Gj)((e=>{var n;return null===t?null:null!=(n=null!=i?i:e)?n:null}),[i,t])}(z,H),Se=(0,i.useMemo)((()=>Q?(0,s.DC)(Q):null),[Q]),Ee=function(){const e=!1===(null==X?void 0:X.autoScrollEnabled),t="object"==typeof h?!1===h.enabled:!1===h,n=U&&!e&&!t;return"object"==typeof h?{...h,enabled:n}:{enabled:n}}(),ke=function(e,t){return pe(e,t)}(me,re.draggable.measure);!function(e){let{activeNode:t,measure:n,initialRect:r,config:o=!0}=e;const a=(0,i.useRef)(!1),{x:l,y:c}="boolean"==typeof o?{x:o,y:o}:o;(0,s.LI)((()=>{if(!l&&!c||!t)return void(a.current=!1);if(a.current||!r)return;const e=null==t?void 0:t.node.current;if(!e||!1===e.isConnected)return;const i=x(n(e),r);if(l||(i.x=0),c||(i.y=0),a.current=!0,Math.abs(i.x)>0||Math.abs(i.y)>0){const t=T(e);t&&t.scrollBy({top:i.y,left:i.x})}}),[t,l,c,r,n])}({activeNode:H?z.get(H):null,config:Ee.layoutShiftCompensation,initialRect:ke,measure:re.draggable.measure});const De=ve(me,re.draggable.measure,ke),Ie=ve(me?me.parentElement:null),je=(0,i.useRef)({activatorEvent:null,active:null,activeNode:me,collisionRect:null,collisions:null,droppableRects:se,draggableNodes:z,draggingNode:null,draggingNodeRect:null,droppableContainers:G,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Pe=G.getNodeFor(null==(t=je.current.over)?void 0:t.id),Be=function(e){let{measure:t}=e;const[n,r]=(0,i.useState)(null),o=ge({callback:(0,i.useCallback)((e=>{for(const{target:n}of e)if((0,s.Re)(n)){r((e=>{const i=t(n);return e?{...e,width:i.width,height:i.height}:i}));break}}),[t])}),a=(0,i.useCallback)((e=>{const n=function(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return(0,s.Re)(t)?t:e}(e);null==o||o.disconnect(),n&&(null==o||o.observe(n)),r(n?t(n):null)}),[t,o]),[l,c]=(0,s.wm)(a);return(0,i.useMemo)((()=>({nodeRef:l,rect:n,setRef:c})),[n,l,c])}({measure:re.dragOverlay.measure}),Ue=null!=(n=Be.nodeRef.current)?n:me,Ne=U?null!=(a=Be.rect)?a:De:null,He=Boolean(Be.nodeRef.current&&Be.rect),We=x(ze=He?null:De,pe(ze));var ze;const Ve=we(Ue?(0,s.Jj)(Ue):null),Ge=function(e){const t=(0,i.useRef)(e),n=(0,s.Gj)((n=>e?n&&n!==be&&e&&t.current&&e.parentNode===t.current.parentNode?n:M(e):be),[e]);return(0,i.useEffect)((()=>{t.current=e}),[e]),n}(U?null!=Pe?Pe:me:null),qe=function(e,t){void 0===t&&(t=k);const[n]=e,r=we(n?(0,s.Jj)(n):null),[o,a]=(0,i.useReducer)((function(){return e.length?e.map((e=>I(e)?r:new W(t(e),e))):_e}),_e),l=ge({callback:a});return e.length>0&&o===_e&&a(),(0,s.LI)((()=>{e.length?e.forEach((e=>null==l?void 0:l.observe(e))):(null==l||l.disconnect(),a())}),[e]),o}(Ge),Ke=function(e,t){let{transform:n,...i}=t;return null!=e&&e.length?e.reduce(((e,t)=>t({transform:e,...i})),n):n}(w,{transform:{x:V.x-We.x,y:V.y-We.y,scaleX:1,scaleY:1},activatorEvent:Q,active:Z,activeNodeRect:De,containerNodeRect:Ie,draggingNodeRect:Ne,over:je.current.over,overlayNodeRect:Be.rect,scrollableAncestors:Ge,scrollableAncestorRects:qe,windowRect:Ve}),Ze=Se?(0,s.IH)(Se,V):null,Ye=function(e){const[t,n]=(0,i.useState)(null),r=(0,i.useRef)(e),o=(0,i.useCallback)((e=>{const t=R(e.target);t&&n((e=>e?(e.set(t,F(t)),new Map(e)):null))}),[]);return(0,i.useEffect)((()=>{const t=r.current;if(e!==t){i(t);const s=e.map((e=>{const t=R(e);return t?(t.addEventListener("scroll",o,{passive:!0}),[t,F(t)]):null})).filter((e=>null!=e));n(s.length?new Map(s):null),r.current=e}return()=>{i(e),i(t)};function i(e){e.forEach((e=>{const t=R(e);null==t||t.removeEventListener("scroll",o)}))}}),[o,e]),(0,i.useMemo)((()=>e.length?t?Array.from(t.values()).reduce(((e,t)=>(0,s.IH)(e,t)),y):N(e):y),[e,t])}(Ge),Xe=ye(Ye),Je=ye(Ye,[De]),Qe=(0,s.IH)(Ke,Xe),et=Ne?S(Ne,Ke):null,tt=Z&&et?v({active:Z,collisionRect:et,droppableRects:se,droppableContainers:ie,pointerCoordinates:Ze}):null,nt=function(e,t){if(!e||0===e.length)return null;const[n]=e;return n.id}(tt),[it,rt]=(0,i.useState)(null),ot=function(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}(He?Ke:(0,s.IH)(Ke,Je),null!=(l=null==it?void 0:it.rect)?l:null,De),st=(0,i.useCallback)(((e,t)=>{let{sensor:n,options:i}=t;if(null==Y.current)return;const r=z.get(Y.current);if(!r)return;const s=e.nativeEvent,a=new n({active:Y.current,activeNode:r,event:s,options:i,context:je,onStart(e){const t=Y.current;if(null==t)return;const n=z.get(t);if(!n)return;const{onDragStart:i}=te.current,r={active:{id:t,data:n.data,rect:K}};(0,o.unstable_batchedUpdates)((()=>{null==i||i(r),P(Fe.Initializing),$({type:g.DragStart,initialCoordinates:e,active:t}),L({type:"onDragStart",event:r})}))},onMove(e){$({type:g.DragMove,coordinates:e})},onEnd:l(g.DragEnd),onCancel:l(g.DragCancel)});function l(e){return async function(){const{active:t,collisions:n,over:i,scrollAdjustedTranslate:r}=je.current;let a=null;if(t&&r){const{cancelDrop:o}=te.current;a={activatorEvent:s,active:t,collisions:n,delta:r,over:i},e===g.DragEnd&&"function"==typeof o&&await Promise.resolve(o(a))&&(e=g.DragCancel)}Y.current=null,(0,o.unstable_batchedUpdates)((()=>{$({type:e}),P(Fe.Uninitialized),rt(null),J(null),ee(null);const t=e===g.DragEnd?"onDragEnd":"onDragCancel";if(a){const e=te.current[t];null==e||e(a),L({type:t,event:a})}}))}}(0,o.unstable_batchedUpdates)((()=>{J(a),ee(e.nativeEvent)}))}),[z]),at=(0,i.useCallback)(((e,t)=>(n,i)=>{const r=n.nativeEvent,o=z.get(i);if(null!==Y.current||!o||r.dndKit||r.defaultPrevented)return;const s={active:o};!0===e(n,t.options,s)&&(r.dndKit={capturedBy:t.sensor},Y.current=i,st(n,t))}),[z,st]),lt=function(e,t){return(0,i.useMemo)((()=>e.reduce(((e,n)=>{const{sensor:i}=n;return[...e,...i.activators.map((e=>({eventName:e.eventName,handler:t(e.handler,n)})))]}),[])),[e,t])}(m,at);!function(e){(0,i.useEffect)((()=>{if(!s.Nq)return;const t=e.map((e=>{let{sensor:t}=e;return null==t.setup?void 0:t.setup()}));return()=>{for(const e of t)null==e||e()}}),e.map((e=>{let{sensor:t}=e;return t})))}(m),(0,s.LI)((()=>{De&&j===Fe.Initializing&&P(Fe.Initialized)}),[De,j]),(0,i.useEffect)((()=>{const{onDragMove:e}=te.current,{active:t,activatorEvent:n,collisions:i,over:r}=je.current;if(!t||!n)return;const s={active:t,activatorEvent:n,collisions:i,delta:{x:Qe.x,y:Qe.y},over:r};(0,o.unstable_batchedUpdates)((()=>{null==e||e(s),L({type:"onDragMove",event:s})}))}),[Qe.x,Qe.y]),(0,i.useEffect)((()=>{const{active:e,activatorEvent:t,collisions:n,droppableContainers:i,scrollAdjustedTranslate:r}=je.current;if(!e||null==Y.current||!t||!r)return;const{onDragOver:s}=te.current,a=i.get(nt),l=a&&a.rect.current?{id:a.id,rect:a.rect.current,data:a.data,disabled:a.disabled}:null,c={active:e,activatorEvent:t,collisions:n,delta:{x:r.x,y:r.y},over:l};(0,o.unstable_batchedUpdates)((()=>{rt(l),null==s||s(c),L({type:"onDragOver",event:c})}))}),[nt]),(0,s.LI)((()=>{je.current={activatorEvent:Q,active:Z,activeNode:me,collisionRect:et,collisions:tt,droppableRects:se,draggableNodes:z,draggingNode:Ue,draggingNodeRect:Ne,droppableContainers:G,over:it,scrollableAncestors:Ge,scrollAdjustedTranslate:Qe},K.current={initial:Ne,translated:et}}),[Z,me,tt,et,z,Ue,Ne,se,G,it,Ge,Qe]),function(e){let{acceleration:t,activator:n=le.Pointer,canScroll:r,draggingRect:o,enabled:a,interval:l=5,order:c=ce.TreeOrder,pointerCoordinates:u,scrollableAncestors:d,scrollableAncestorRects:h,delta:f,threshold:p}=e;const g=function(e){let{delta:t,disabled:n}=e;const i=(0,s.D9)(t);return(0,s.Gj)((e=>{if(n||!i||!e)return ue;const r=Math.sign(t.x-i.x),o=Math.sign(t.y-i.y);return{x:{[D.Backward]:e.x[D.Backward]||-1===r,[D.Forward]:e.x[D.Forward]||1===r},y:{[D.Backward]:e.y[D.Backward]||-1===o,[D.Forward]:e.y[D.Forward]||1===o}}}),[n,t,i])}({delta:f,disabled:!a}),[m,v]=(0,s.Yz)(),b=(0,i.useRef)({x:0,y:0}),y=(0,i.useRef)({x:0,y:0}),w=(0,i.useMemo)((()=>{switch(n){case le.Pointer:return u?{top:u.y,bottom:u.y,left:u.x,right:u.x}:null;case le.DraggableRect:return o}}),[n,o,u]),_=(0,i.useRef)(null),A=(0,i.useCallback)((()=>{const e=_.current;if(!e)return;const t=b.current.x*y.current.x,n=b.current.y*y.current.y;e.scrollBy(t,n)}),[]),x=(0,i.useMemo)((()=>c===ce.TreeOrder?[...d].reverse():d),[c,d]);(0,i.useEffect)((()=>{if(a&&d.length&&w){for(const e of x){if(!1===(null==r?void 0:r(e)))continue;const n=d.indexOf(e),i=h[n];if(!i)continue;const{direction:o,speed:s}=B(e,i,w,t,p);for(const e of["x","y"])g[e][o[e]]||(s[e]=0,o[e]=0);if(s.x>0||s.y>0)return v(),_.current=e,m(A,l),b.current=s,void(y.current=o)}b.current={x:0,y:0},y.current={x:0,y:0},v()}else v()}),[t,A,r,v,a,l,JSON.stringify(w),JSON.stringify(g),m,d,x,h,JSON.stringify(p)])}({...Ee,delta:V,draggingRect:et,pointerCoordinates:Ze,scrollableAncestors:Ge,scrollableAncestorRects:qe});const ct=(0,i.useMemo)((()=>({active:Z,activeNode:me,activeNodeRect:De,activatorEvent:Q,collisions:tt,containerNodeRect:Ie,dragOverlay:Be,draggableNodes:z,droppableContainers:G,droppableRects:se,over:it,measureDroppableContainers:ae,scrollableAncestors:Ge,scrollableAncestorRects:qe,measuringConfiguration:re,measuringScheduled:he,windowRect:Ve})),[Z,me,De,Q,tt,Ie,Be,z,G,se,it,ae,Ge,qe,re,he,Ve]),ut=(0,i.useMemo)((()=>({activatorEvent:Q,activators:lt,active:Z,activeNodeRect:De,ariaDescribedById:{draggable:ne},dispatch:$,draggableNodes:z,over:it,measureDroppableContainers:ae})),[Q,lt,Z,De,$,ne,z,it,ae]);return r().createElement(d.Provider,{value:O},r().createElement($e.Provider,{value:ut},r().createElement(Me.Provider,{value:ct},r().createElement(Oe.Provider,{value:ot},f)),r().createElement(Le,{disabled:!1===(null==u?void 0:u.restoreFocus)})),r().createElement(p,{...u,hiddenTextDescribedById:ne}))})),Ie=(0,i.createContext)(null),je="button",Pe="Droppable";function Be(e){let{id:t,data:n,disabled:r=!1,attributes:o}=e;const a=(0,s.Ld)(Pe),{activators:l,activatorEvent:c,active:u,activeNodeRect:d,ariaDescribedById:h,draggableNodes:f,over:p}=(0,i.useContext)($e),{role:g=je,roleDescription:m="draggable",tabIndex:v=0}=null!=o?o:{},b=(null==u?void 0:u.id)===t,y=(0,i.useContext)(b?Oe:Ie),[w,_]=(0,s.wm)(),[A,x]=(0,s.wm)(),C=function(e,t){return(0,i.useMemo)((()=>e.reduce(((e,n)=>{let{eventName:i,handler:r}=n;return e[i]=e=>{r(e,t)},e}),{})),[e,t])}(l,t),S=(0,s.Ey)(n);return(0,s.LI)((()=>(f.set(t,{id:t,key:a,node:w,activatorNode:A,data:S}),()=>{const e=f.get(t);e&&e.key===a&&f.delete(t)})),[f,t]),{active:u,activatorEvent:c,activeNodeRect:d,attributes:(0,i.useMemo)((()=>({role:g,tabIndex:v,"aria-disabled":r,"aria-pressed":!(!b||g!==je)||void 0,"aria-roledescription":m,"aria-describedby":h.draggable})),[r,g,v,b,m,h.draggable]),isDragging:b,listeners:r?void 0:C,node:w,over:p,setNodeRef:_,setActivatorNodeRef:x,transform:y}}const Ue="Droppable",Ne={timeout:25};function He(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:o}=e;const a=(0,s.Ld)(Ue),{active:l,dispatch:c,over:u,measureDroppableContainers:d}=(0,i.useContext)($e),h=(0,i.useRef)({disabled:n}),f=(0,i.useRef)(!1),p=(0,i.useRef)(null),m=(0,i.useRef)(null),{disabled:v,updateMeasurementsFor:b,timeout:y}={...Ne,...o},w=(0,s.Ey)(null!=b?b:r),_=ge({callback:(0,i.useCallback)((()=>{f.current?(null!=m.current&&clearTimeout(m.current),m.current=setTimeout((()=>{d(Array.isArray(w.current)?w.current:[w.current]),m.current=null}),y)):f.current=!0}),[y]),disabled:v||!l}),A=(0,i.useCallback)(((e,t)=>{_&&(t&&(_.unobserve(t),f.current=!1),e&&_.observe(e))}),[_]),[x,C]=(0,s.wm)(A),S=(0,s.Ey)(t);return(0,i.useEffect)((()=>{_&&x.current&&(_.disconnect(),f.current=!1,_.observe(x.current))}),[x,_]),(0,s.LI)((()=>(c({type:g.RegisterDroppable,element:{id:r,key:a,disabled:n,node:x,rect:p,data:S}}),()=>c({type:g.UnregisterDroppable,key:a,id:r}))),[r]),(0,i.useEffect)((()=>{n!==h.current.disabled&&(c({type:g.SetDroppableDisabled,id:r,key:a,disabled:n}),h.current.disabled=n)}),[r,a,n,c]),{active:l,rect:p,isOver:(null==u?void 0:u.id)===r,node:x,over:u,setNodeRef:C}}},24285:(e,t,n)=>{"use strict";n.d(t,{$X:()=>x,D9:()=>b,DC:()=>S,Ey:()=>g,FJ:()=>o,Gj:()=>m,IH:()=>A,Jj:()=>a,LI:()=>h,Ld:()=>w,Nq:()=>r,Re:()=>c,UG:()=>s,Yz:()=>p,qk:()=>l,r3:()=>d,so:()=>$,ux:()=>E,vZ:()=>u,vd:()=>C,wm:()=>v,zX:()=>f});var i=n(81672);const r="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function o(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function s(e){return"nodeType"in e}function a(e){var t,n;return e?o(e)?e:s(e)&&null!=(t=null==(n=e.ownerDocument)?void 0:n.defaultView)?t:window:window}function l(e){const{Document:t}=a(e);return e instanceof t}function c(e){return!o(e)&&e instanceof a(e).HTMLElement}function u(e){return e instanceof a(e).SVGElement}function d(e){return e?o(e)?e.document:s(e)?l(e)?e:c(e)?e.ownerDocument:document:document:document}const h=r?i.useLayoutEffect:i.useEffect;function f(e){const t=(0,i.useRef)(e);return h((()=>{t.current=e})),(0,i.useCallback)((function(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return null==t.current?void 0:t.current(...n)}),[])}function p(){const e=(0,i.useRef)(null);return[(0,i.useCallback)(((t,n)=>{e.current=setInterval(t,n)}),[]),(0,i.useCallback)((()=>{null!==e.current&&(clearInterval(e.current),e.current=null)}),[])]}function g(e,t){void 0===t&&(t=[e]);const n=(0,i.useRef)(e);return h((()=>{n.current!==e&&(n.current=e)}),t),n}function m(e,t){const n=(0,i.useRef)();return(0,i.useMemo)((()=>{const t=e(n.current);return n.current=t,t}),[...t])}function v(e){const t=f(e),n=(0,i.useRef)(null),r=(0,i.useCallback)((e=>{e!==n.current&&(null==t||t(e,n.current)),n.current=e}),[]);return[n,r]}function b(e){const t=(0,i.useRef)();return(0,i.useEffect)((()=>{t.current=e}),[e]),t.current}let y={};function w(e,t){return(0,i.useMemo)((()=>{if(t)return t;const n=null==y[e]?0:y[e]+1;return y[e]=n,e+"-"+n}),[e,t])}function _(e){return function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return i.reduce(((t,n)=>{const i=Object.entries(n);for(const[n,r]of i){const i=t[n];null!=i&&(t[n]=i+e*r)}return t}),{...t})}}const A=_(1),x=_(-1);function C(e){if(!e)return!1;const{KeyboardEvent:t}=a(e.target);return t&&e instanceof t}function S(e){if(function(e){if(!e)return!1;const{TouchEvent:t}=a(e.target);return t&&e instanceof t}(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return function(e){return"clientX"in e&&"clientY"in e}(e)?{x:e.clientX,y:e.clientY}:null}const E=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[E.Translate.toString(e),E.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:i}=e;return t+" "+n+"ms "+i}}}),k="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function $(e){return e.matches(k)?e:e.querySelector(k)}},12599:(e,t,n)=>{"use strict";function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},i.apply(this,arguments)}var r;n.d(t,{RQ:()=>M,WK:()=>O,X3:()=>R,Zn:()=>E,aU:()=>r,cP:()=>u,fp:()=>f,kG:()=>k,lX:()=>s}),function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(r||(r={}));const o="popstate";function s(e){return void 0===e&&(e={}),function(e,t,n,s){void 0===s&&(s={});let{window:u=document.defaultView,v5Compat:h=!1}=s,f=u.history,p=r.Pop,g=null;function m(){p=r.Pop,g&&g({action:p,location:v.location})}let v={get action(){return p},get location(){return e(u,f)},listen(e){if(g)throw new Error("A history only accepts one active listener");return u.addEventListener(o,m),g=e,()=>{u.removeEventListener(o,m),g=null}},createHref:e=>t(u,e),encodeLocation(e){let t=d(c(e));return i({},e,{pathname:t.pathname,search:t.search,hash:t.hash})},push:function(e,t){p=r.Push;let i=l(v.location,e,t);n&&n(i,e);let o=a(i),s=v.createHref(i);try{f.pushState(o,"",s)}catch(e){u.location.assign(s)}h&&g&&g({action:p,location:v.location})},replace:function(e,t){p=r.Replace;let i=l(v.location,e,t);n&&n(i,e);let o=a(i),s=v.createHref(i);f.replaceState(o,"",s),h&&g&&g({action:p,location:v.location})},go:e=>f.go(e)};return v}((function(e,t){let{pathname:n,search:i,hash:r}=e.location;return l("",{pathname:n,search:i,hash:r},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){return"string"==typeof t?t:c(t)}),null,e)}function a(e){return{usr:e.state,key:e.key}}function l(e,t,n,r){return void 0===n&&(n=null),i({pathname:"string"==typeof e?e:e.pathname,search:"",hash:""},"string"==typeof t?u(t):t,{state:n,key:t&&t.key||r||Math.random().toString(36).substr(2,8)})}function c(e){let{pathname:t="/",search:n="",hash:i=""}=e;return n&&"?"!==n&&(t+="?"===n.charAt(0)?n:"?"+n),i&&"#"!==i&&(t+="#"===i.charAt(0)?i:"#"+i),t}function u(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let i=e.indexOf("?");i>=0&&(t.search=e.substr(i),e=e.substr(0,i)),e&&(t.pathname=e)}return t}function d(e){let t="undefined"!=typeof window&&void 0!==window.location&&"null"!==window.location.origin?window.location.origin:"unknown://unknown",n="string"==typeof e?e:c(e);return new URL(n,t)}var h;function f(e,t,n){void 0===n&&(n="/");let i=E(("string"==typeof t?u(t):t).pathname||"/",n);if(null==i)return null;let r=p(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){return e.length===t.length&&e.slice(0,-1).every(((e,n)=>e===t[n]))?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(r);let o=null;for(let e=0;null==o&&e<r.length;++e)o=x(r[e],S(i));return o}function p(e,t,n,i){return void 0===t&&(t=[]),void 0===n&&(n=[]),void 0===i&&(i=""),e.forEach(((e,r)=>{let o={relativePath:e.path||"",caseSensitive:!0===e.caseSensitive,childrenIndex:r,route:e};o.relativePath.startsWith("/")&&(k(o.relativePath.startsWith(i),'Absolute route path "'+o.relativePath+'" nested under path "'+i+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),o.relativePath=o.relativePath.slice(i.length));let s=M([i,o.relativePath]),a=n.concat(o);e.children&&e.children.length>0&&(k(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+s+'".'),p(e.children,t,a,s)),(null!=e.path||e.index)&&t.push({path:s,score:A(s,e.index),routesMeta:a})})),t}!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(h||(h={}));const g=/^:\w+$/,m=3,v=2,b=1,y=10,w=-2,_=e=>"*"===e;function A(e,t){let n=e.split("/"),i=n.length;return n.some(_)&&(i+=w),t&&(i+=v),n.filter((e=>!_(e))).reduce(((e,t)=>e+(g.test(t)?m:""===t?b:y)),i)}function x(e,t){let{routesMeta:n}=e,i={},r="/",o=[];for(let e=0;e<n.length;++e){let s=n[e],a=e===n.length-1,l="/"===r?t:t.slice(r.length)||"/",c=C({path:s.relativePath,caseSensitive:s.caseSensitive,end:a},l);if(!c)return null;Object.assign(i,c.params);let u=s.route;o.push({params:i,pathname:M([r,c.pathname]),pathnameBase:T(M([r,c.pathnameBase])),route:u}),"/"!==c.pathnameBase&&(r=M([r,c.pathnameBase]))}return o}function C(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,i]=function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!0),$("*"===e||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were "'+e.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+e.replace(/\*$/,"/*")+'".');let i=[],r="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/:(\w+)/g,((e,t)=>(i.push(t),"([^\\/]+)")));return e.endsWith("*")?(i.push("*"),r+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?r+="\\/*$":""!==e&&"/"!==e&&(r+="(?:(?=\\/|$))"),[new RegExp(r,t?void 0:"i"),i]}(e.path,e.caseSensitive,e.end),r=t.match(n);if(!r)return null;let o=r[0],s=o.replace(/(.)\/+$/,"$1"),a=r.slice(1);return{params:i.reduce(((e,t,n)=>{if("*"===t){let e=a[n]||"";s=o.slice(0,o.length-e.length).replace(/(.)\/+$/,"$1")}return e[t]=function(e,t){try{return decodeURIComponent(e)}catch(n){return $(!1,'The value for the URL param "'+t+'" will not be decoded because the string "'+e+'" is a malformed URL segment. This is probably due to a bad percent encoding ('+n+")."),e}}(a[n]||"",t),e}),{}),pathname:o,pathnameBase:s,pattern:e}}function S(e){try{return decodeURI(e)}catch(t){return $(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function E(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,i=e.charAt(n);return i&&"/"!==i?null:e.slice(n)||"/"}function k(e,t){if(!1===e||null==e)throw new Error(t)}function $(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(e){}}}const M=e=>e.join("/").replace(/\/\/+/g,"/"),T=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/");class R extends Error{}class L{constructor(e,t,n){this.status=e,this.statusText=t||"",this.data=n}}function O(e){return e instanceof L}"undefined"!=typeof window&&void 0!==window.document&&window.document.createElement;const F=new Set(["POST","PUT","PATCH","DELETE"]);new Set(["GET","HEAD",...F])},53239:(e,t,n)=>{e=n.nmd(e),function(){var e=function(){return this}();e||"undefined"==typeof window||(e=window);var t=function(e,n,i){"string"==typeof e?(2==arguments.length&&(i=n),t.modules[e]||(t.payloads[e]=i,t.modules[e]=null)):t.original?t.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace())};t.modules={},t.payloads={};var n,i,r=function(e,t,n){if("string"==typeof t){var i=a(e,t);if(null!=i)return n&&n(),i}else if("[object Array]"===Object.prototype.toString.call(t)){for(var r=[],s=0,l=t.length;s<l;++s){var c=a(e,t[s]);if(null==c&&o.original)return;r.push(c)}return n&&n.apply(null,r)||!0}},o=function(e,t){var n=r("",e,t);return null==n&&o.original?o.original.apply(this,arguments):n},s=function(e,t){if(-1!==t.indexOf("!")){var n=t.split("!");return s(e,n[0])+"!"+s(e,n[1])}if("."==t.charAt(0))for(t=e.split("/").slice(0,-1).join("/")+"/"+t;-1!==t.indexOf(".")&&i!=t;){var i=t;t=t.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}return t},a=function(e,n){n=s(e,n);var i=t.modules[n];if(!i){if("function"==typeof(i=t.payloads[n])){var o={},a={id:n,uri:"",exports:o,packaged:!0};o=i((function(e,t){return r(n,e,t)}),o,a)||a.exports,t.modules[n]=o,delete t.payloads[n]}i=t.modules[n]=o||i}return i};i=e,(n="ace")&&(e[n]||(e[n]={}),i=e[n]),i.define&&i.define.packaged||(t.original=i.define,i.define=t,i.define.packaged=!0),i.require&&i.require.packaged||(o.original=i.require,i.require=o,i.require.packaged=!0)}(),ace.define("ace/lib/es6-shim",["require","exports","module"],(function(e,t,n){function i(e,t,n){Object.defineProperty(e,t,{value:n,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||i(String.prototype,"startsWith",(function(e,t){return t=t||0,this.lastIndexOf(e,t)===t})),String.prototype.endsWith||i(String.prototype,"endsWith",(function(e,t){var n=this;(void 0===t||t>n.length)&&(t=n.length),t-=e.length;var i=n.indexOf(e,t);return-1!==i&&i===t})),String.prototype.repeat||i(String.prototype,"repeat",(function(e){for(var t="",n=this;e>0;)1&e&&(t+=n),(e>>=1)&&(n+=n);return t})),String.prototype.includes||i(String.prototype,"includes",(function(e,t){return-1!=this.indexOf(e,t)})),Object.assign||(Object.assign=function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n<arguments.length;n++){var i=arguments[n];null!=i&&Object.keys(i).forEach((function(e){t[e]=i[e]}))}return t}),Object.values||(Object.values=function(e){return Object.keys(e).map((function(t){return e[t]}))}),Array.prototype.find||i(Array.prototype,"find",(function(e){for(var t=this.length,n=arguments[1],i=0;i<t;i++){var r=this[i];if(e.call(n,r,i,this))return r}})),Array.prototype.findIndex||i(Array.prototype,"findIndex",(function(e){for(var t=this.length,n=arguments[1],i=0;i<t;i++){var r=this[i];if(e.call(n,r,i,this))return i}})),Array.prototype.includes||i(Array.prototype,"includes",(function(e,t){return-1!=this.indexOf(e,t)})),Array.prototype.fill||i(Array.prototype,"fill",(function(e){for(var t=this,n=t.length>>>0,i=arguments[1]>>0,r=i<0?Math.max(n+i,0):Math.min(i,n),o=arguments[2],s=void 0===o?n:o>>0,a=s<0?Math.max(n+s,0):Math.min(s,n);r<a;)t[r]=e,r++;return t})),Array.of||i(Array,"of",(function(){return Array.prototype.slice.call(arguments)}))})),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],(function(e,t,n){"use strict";e("./es6-shim")})),ace.define("ace/lib/lang",["require","exports","module"],(function(e,t,n){"use strict";t.last=function(e){return e[e.length-1]},t.stringReverse=function(e){return e.split("").reverse().join("")},t.stringRepeat=function(e,t){for(var n="";t>0;)1&t&&(n+=e),(t>>=1)&&(e+=e);return n};var i=/^\s\s*/,r=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(i,"")},t.stringTrimRight=function(e){return e.replace(r,"")},t.copyObject=function(e){var t={};for(var n in e)t[n]=e[n];return t},t.copyArray=function(e){for(var t=[],n=0,i=e.length;n<i;n++)e[n]&&"object"==typeof e[n]?t[n]=this.copyObject(e[n]):t[n]=e[n];return t},t.deepCopy=function e(t){if("object"!=typeof t||!t)return t;var n;if(Array.isArray(t)){n=[];for(var i=0;i<t.length;i++)n[i]=e(t[i]);return n}if("[object Object]"!==Object.prototype.toString.call(t))return t;for(var i in n={},t)n[i]=e(t[i]);return n},t.arrayToMap=function(e){for(var t={},n=0;n<e.length;n++)t[e[n]]=1;return t},t.createMap=function(e){var t=Object.create(null);for(var n in e)t[n]=e[n];return t},t.arrayRemove=function(e,t){for(var n=0;n<=e.length;n++)t===e[n]&&e.splice(n,1)},t.escapeRegExp=function(e){return e.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},t.escapeHTML=function(e){return(""+e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<")},t.getMatchOffsets=function(e,t){var n=[];return e.replace(t,(function(e){n.push({offset:arguments[arguments.length-2],length:e.length})})),n},t.deferredCall=function(e){var t=null,n=function(){t=null,e()},i=function(e){return i.cancel(),t=setTimeout(n,e||0),i};return i.schedule=i,i.call=function(){return this.cancel(),e(),i},i.cancel=function(){return clearTimeout(t),t=null,i},i.isPending=function(){return t},i},t.delayedCall=function(e,t){var n=null,i=function(){n=null,e()},r=function(e){null==n&&(n=setTimeout(i,e||t))};return r.delay=function(e){n&&clearTimeout(n),n=setTimeout(i,e||t)},r.schedule=r,r.call=function(){this.cancel(),e()},r.cancel=function(){n&&clearTimeout(n),n=null},r.isPending=function(){return n},r}})),ace.define("ace/lib/oop",["require","exports","module"],(function(e,t,n){"use strict";t.inherits=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})},t.mixin=function(e,t){for(var n in t)e[n]=t[n];return e},t.implement=function(e,n){t.mixin(e,n)}})),ace.define("ace/lib/useragent",["require","exports","module"],(function(e,t,n){"use strict";t.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},t.getOS=function(){return t.isMac?t.OS.MAC:t.isLinux?t.OS.LINUX:t.OS.WINDOWS};var i="object"==typeof navigator?navigator:{},r=(/mac|win|linux/i.exec(i.platform)||["other"])[0].toLowerCase(),o=i.userAgent||"",s=i.appName||"";t.isWin="win"==r,t.isMac="mac"==r,t.isLinux="linux"==r,t.isIE="Microsoft Internet Explorer"==s||s.indexOf("MSAppHost")>=0?parseFloat((o.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((o.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),t.isOldIE=t.isIE&&t.isIE<9,t.isGecko=t.isMozilla=o.match(/ Gecko\/\d+/),t.isOpera="object"==typeof opera&&"[object Opera]"==Object.prototype.toString.call(window.opera),t.isWebKit=parseFloat(o.split("WebKit/")[1])||void 0,t.isChrome=parseFloat(o.split(" Chrome/")[1])||void 0,t.isEdge=parseFloat(o.split(" Edge/")[1])||void 0,t.isAIR=o.indexOf("AdobeAIR")>=0,t.isAndroid=o.indexOf("Android")>=0,t.isChromeOS=o.indexOf(" CrOS ")>=0,t.isIOS=/iPad|iPhone|iPod/.test(o)&&!window.MSStream,t.isIOS&&(t.isMac=!0),t.isMobile=t.isIOS||t.isAndroid})),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],(function(e,t,n){"use strict";var i,r=e("./useragent");t.buildDom=function e(t,n,i){if("string"==typeof t&&t){var r=document.createTextNode(t);return n&&n.appendChild(r),r}if(!Array.isArray(t))return t&&t.appendChild&&n&&n.appendChild(t),t;if("string"!=typeof t[0]||!t[0]){for(var o=[],s=0;s<t.length;s++){var a=e(t[s],n,i);a&&o.push(a)}return o}var l=document.createElement(t[0]),c=t[1],u=1;for(c&&"object"==typeof c&&!Array.isArray(c)&&(u=2),s=u;s<t.length;s++)e(t[s],l,i);return 2==u&&Object.keys(c).forEach((function(e){var t=c[e];"class"===e?l.className=Array.isArray(t)?t.join(" "):t:"function"==typeof t||"value"==e||"$"==e[0]?l[e]=t:"ref"===e?i&&(i[t]=l):"style"===e?"string"==typeof t&&(l.style.cssText=t):null!=t&&l.setAttribute(e,t)})),n&&n.appendChild(l),l},t.getDocumentHead=function(e){return e||(e=document),e.head||e.getElementsByTagName("head")[0]||e.documentElement},t.createElement=function(e,t){return document.createElementNS?document.createElementNS(t||"http://www.w3.org/1999/xhtml",e):document.createElement(e)},t.removeChildren=function(e){e.innerHTML=""},t.createTextNode=function(e,t){return(t?t.ownerDocument:document).createTextNode(e)},t.createFragment=function(e){return(e?e.ownerDocument:document).createDocumentFragment()},t.hasCssClass=function(e,t){return-1!==(e.className+"").split(/\s+/g).indexOf(t)},t.addCssClass=function(e,n){t.hasCssClass(e,n)||(e.className+=" "+n)},t.removeCssClass=function(e,t){for(var n=e.className.split(/\s+/g);;){var i=n.indexOf(t);if(-1==i)break;n.splice(i,1)}e.className=n.join(" ")},t.toggleCssClass=function(e,t){for(var n=e.className.split(/\s+/g),i=!0;;){var r=n.indexOf(t);if(-1==r)break;i=!1,n.splice(r,1)}return i&&n.push(t),e.className=n.join(" "),i},t.setCssClass=function(e,n,i){i?t.addCssClass(e,n):t.removeCssClass(e,n)},t.hasCssString=function(e,t){var n,i=0;if(n=(t=t||document).querySelectorAll("style"))for(;i<n.length;)if(n[i++].id===e)return!0},t.removeElementById=function(e,t){(t=t||document).getElementById(e)&&t.getElementById(e).remove()};var o=[];function s(){var e=o;o=null,e&&e.forEach((function(e){a(e[0],e[1])}))}function a(e,n,r){if("undefined"!=typeof document){if(o)if(r)s();else if(!1===r)return o.push([e,n]);if(!i){var a=r;r&&r.getRootNode&&(a=r.getRootNode())&&a!=r||(a=document);var l=a.ownerDocument||a;if(n&&t.hasCssString(n,a))return null;n&&(e+="\n/*# sourceURL=ace/css/"+n+" */");var c=t.createElement("style");c.appendChild(l.createTextNode(e)),n&&(c.id=n),a==l&&(a=t.getDocumentHead(l)),a.insertBefore(c,a.firstChild)}}}if(t.useStrictCSP=function(e){i=e,0==e?s():o||(o=[])},t.importCssString=a,t.importCssStylsheet=function(e,n){t.buildDom(["link",{rel:"stylesheet",href:e}],t.getDocumentHead(n))},t.scrollbarWidth=function(e){var n=t.createElement("ace_inner");n.style.width="100%",n.style.minWidth="0px",n.style.height="200px",n.style.display="block";var i=t.createElement("ace_outer"),r=i.style;r.position="absolute",r.left="-10000px",r.overflow="hidden",r.width="200px",r.minWidth="0px",r.height="150px",r.display="block",i.appendChild(n);var o=e&&e.documentElement||document&&document.documentElement;if(!o)return 0;o.appendChild(i);var s=n.offsetWidth;r.overflow="scroll";var a=n.offsetWidth;return s===a&&(a=i.clientWidth),o.removeChild(i),s-a},t.computedStyle=function(e,t){return window.getComputedStyle(e,"")||{}},t.setStyle=function(e,t,n){e[t]!==n&&(e[t]=n)},t.HAS_CSS_ANIMATION=!1,t.HAS_CSS_TRANSFORMS=!1,t.HI_DPI=!r.isWin||"undefined"!=typeof window&&window.devicePixelRatio>=1.5,r.isChromeOS&&(t.HI_DPI=!1),"undefined"!=typeof document){var l=document.createElement("div");t.HI_DPI&&void 0!==l.style.transform&&(t.HAS_CSS_TRANSFORMS=!0),r.isEdge||void 0===l.style.animationName||(t.HAS_CSS_ANIMATION=!0),l=null}t.HAS_CSS_TRANSFORMS?t.translate=function(e,t,n){e.style.transform="translate("+Math.round(t)+"px, "+Math.round(n)+"px)"}:t.translate=function(e,t,n){e.style.top=Math.round(n)+"px",e.style.left=Math.round(t)+"px"}})),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],(function(e,t,n){"use strict";var i=e("./dom");t.get=function(e,t){var n=new XMLHttpRequest;n.open("GET",e,!0),n.onreadystatechange=function(){4===n.readyState&&t(n.responseText)},n.send(null)},t.loadScript=function(e,t){var n=i.getDocumentHead(),r=document.createElement("script");r.src=e,n.appendChild(r),r.onload=r.onreadystatechange=function(e,n){!n&&r.readyState&&"loaded"!=r.readyState&&"complete"!=r.readyState||(r=r.onload=r.onreadystatechange=null,n||t())}},t.qualifyURL=function(e){var t=document.createElement("a");return t.href=e,t.href}})),ace.define("ace/lib/event_emitter",["require","exports","module"],(function(e,t,n){"use strict";var i={},r=function(){this.propagationStopped=!0},o=function(){this.defaultPrevented=!0};i._emit=i._dispatchEvent=function(e,t){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var n=this._eventRegistry[e]||[],i=this._defaultHandlers[e];if(n.length||i){"object"==typeof t&&t||(t={}),t.type||(t.type=e),t.stopPropagation||(t.stopPropagation=r),t.preventDefault||(t.preventDefault=o),n=n.slice();for(var s=0;s<n.length&&(n[s](t,this),!t.propagationStopped);s++);return i&&!t.defaultPrevented?i(t,this):void 0}},i._signal=function(e,t){var n=(this._eventRegistry||{})[e];if(n){n=n.slice();for(var i=0;i<n.length;i++)n[i](t,this)}},i.once=function(e,t){var n=this;if(this.on(e,(function i(){n.off(e,i),t.apply(null,arguments)})),!t)return new Promise((function(e){t=e}))},i.setDefaultHandler=function(e,t){var n=this._defaultHandlers;if(n||(n=this._defaultHandlers={_disabled_:{}}),n[e]){var i=n[e],r=n._disabled_[e];r||(n._disabled_[e]=r=[]),r.push(i);var o=r.indexOf(t);-1!=o&&r.splice(o,1)}n[e]=t},i.removeDefaultHandler=function(e,t){var n=this._defaultHandlers;if(n){var i=n._disabled_[e];if(n[e]==t)i&&this.setDefaultHandler(e,i.pop());else if(i){var r=i.indexOf(t);-1!=r&&i.splice(r,1)}}},i.on=i.addEventListener=function(e,t,n){this._eventRegistry=this._eventRegistry||{};var i=this._eventRegistry[e];return i||(i=this._eventRegistry[e]=[]),-1==i.indexOf(t)&&i[n?"unshift":"push"](t),t},i.off=i.removeListener=i.removeEventListener=function(e,t){this._eventRegistry=this._eventRegistry||{};var n=this._eventRegistry[e];if(n){var i=n.indexOf(t);-1!==i&&n.splice(i,1)}},i.removeAllListeners=function(e){e||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[e]=void 0),this._defaultHandlers&&(this._defaultHandlers[e]=void 0)},t.EventEmitter=i})),ace.define("ace/lib/app_config",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],(function(e,t,n){var i=e("./oop"),r=e("./event_emitter").EventEmitter,o={setOptions:function(e){Object.keys(e).forEach((function(t){this.setOption(t,e[t])}),this)},getOptions:function(e){var t={};if(e)Array.isArray(e)||(t=e,e=Object.keys(t));else{var n=this.$options;e=Object.keys(n).filter((function(e){return!n[e].hidden}))}return e.forEach((function(e){t[e]=this.getOption(e)}),this),t},setOption:function(e,t){if(this["$"+e]!==t){var n=this.$options[e];if(!n)return s('misspelled option "'+e+'"');if(n.forwardTo)return this[n.forwardTo]&&this[n.forwardTo].setOption(e,t);n.handlesSet||(this["$"+e]=t),n&&n.set&&n.set.call(this,t)}},getOption:function(e){var t=this.$options[e];return t?t.forwardTo?this[t.forwardTo]&&this[t.forwardTo].getOption(e):t&&t.get?t.get.call(this):this["$"+e]:s('misspelled option "'+e+'"')}};function s(e){"undefined"!=typeof console&&console.warn&&console.warn.apply(console,arguments)}function a(e,t){var n=new Error(e);n.data=t,"object"==typeof console&&console.error&&console.error(n),setTimeout((function(){throw n}))}var l=function(){this.$defaultOptions={}};(function(){i.implement(this,r),this.defineOptions=function(e,t,n){return e.$options||(this.$defaultOptions[t]=e.$options={}),Object.keys(n).forEach((function(t){var i=n[t];"string"==typeof i&&(i={forwardTo:i}),i.name||(i.name=t),e.$options[i.name]=i,"initialValue"in i&&(e["$"+i.name]=i.initialValue)})),i.implement(e,o),this},this.resetOptions=function(e){Object.keys(e.$options).forEach((function(t){var n=e.$options[t];"value"in n&&e.setOption(t,n.value)}))},this.setDefaultValue=function(e,t,n){if(!e){for(e in this.$defaultOptions)if(this.$defaultOptions[e][t])break;if(!this.$defaultOptions[e][t])return!1}var i=this.$defaultOptions[e]||(this.$defaultOptions[e]={});i[t]&&(i.forwardTo?this.setDefaultValue(i.forwardTo,t,n):i[t].value=n)},this.setDefaultValues=function(e,t){Object.keys(t).forEach((function(n){this.setDefaultValue(e,n,t[n])}),this)},this.warn=s,this.reportError=a}).call(l.prototype),t.AppConfig=l})),ace.define("ace/theme/textmate.css",["require","exports","module"],(function(e,t,n){n.exports='.ace-tm .ace_gutter {\n background: #f0f0f0;\n color: #333;\n}\n\n.ace-tm .ace_print-margin {\n width: 1px;\n background: #e8e8e8;\n}\n\n.ace-tm .ace_fold {\n background-color: #6B72E6;\n}\n\n.ace-tm {\n background-color: #FFFFFF;\n color: black;\n}\n\n.ace-tm .ace_cursor {\n color: black;\n}\n \n.ace-tm .ace_invisible {\n color: rgb(191, 191, 191);\n}\n\n.ace-tm .ace_storage,\n.ace-tm .ace_keyword {\n color: blue;\n}\n\n.ace-tm .ace_constant {\n color: rgb(197, 6, 11);\n}\n\n.ace-tm .ace_constant.ace_buildin {\n color: rgb(88, 72, 246);\n}\n\n.ace-tm .ace_constant.ace_language {\n color: rgb(88, 92, 246);\n}\n\n.ace-tm .ace_constant.ace_library {\n color: rgb(6, 150, 14);\n}\n\n.ace-tm .ace_invalid {\n background-color: rgba(255, 0, 0, 0.1);\n color: red;\n}\n\n.ace-tm .ace_support.ace_function {\n color: rgb(60, 76, 114);\n}\n\n.ace-tm .ace_support.ace_constant {\n color: rgb(6, 150, 14);\n}\n\n.ace-tm .ace_support.ace_type,\n.ace-tm .ace_support.ace_class {\n color: rgb(109, 121, 222);\n}\n\n.ace-tm .ace_keyword.ace_operator {\n color: rgb(104, 118, 135);\n}\n\n.ace-tm .ace_string {\n color: rgb(3, 106, 7);\n}\n\n.ace-tm .ace_comment {\n color: rgb(76, 136, 107);\n}\n\n.ace-tm .ace_comment.ace_doc {\n color: rgb(0, 102, 255);\n}\n\n.ace-tm .ace_comment.ace_doc.ace_tag {\n color: rgb(128, 159, 191);\n}\n\n.ace-tm .ace_constant.ace_numeric {\n color: rgb(0, 0, 205);\n}\n\n.ace-tm .ace_variable {\n color: rgb(49, 132, 149);\n}\n\n.ace-tm .ace_xml-pe {\n color: rgb(104, 104, 91);\n}\n\n.ace-tm .ace_entity.ace_name.ace_function {\n color: #0000A2;\n}\n\n\n.ace-tm .ace_heading {\n color: rgb(12, 7, 255);\n}\n\n.ace-tm .ace_list {\n color:rgb(185, 6, 144);\n}\n\n.ace-tm .ace_meta.ace_tag {\n color:rgb(0, 22, 142);\n}\n\n.ace-tm .ace_string.ace_regex {\n color: rgb(255, 0, 0)\n}\n\n.ace-tm .ace_marker-layer .ace_selection {\n background: rgb(181, 213, 255);\n}\n.ace-tm.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0px white;\n}\n.ace-tm .ace_marker-layer .ace_step {\n background: rgb(252, 255, 0);\n}\n\n.ace-tm .ace_marker-layer .ace_stack {\n background: rgb(164, 229, 101);\n}\n\n.ace-tm .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid rgb(192, 192, 192);\n}\n\n.ace-tm .ace_marker-layer .ace_active-line {\n background: rgba(0, 0, 0, 0.07);\n}\n\n.ace-tm .ace_gutter-active-line {\n background-color : #dcdcdc;\n}\n\n.ace-tm .ace_marker-layer .ace_selected-word {\n background: rgb(250, 250, 255);\n border: 1px solid rgb(200, 200, 250);\n}\n\n.ace-tm .ace_indent-guide {\n background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;\n}\n\n.ace-tm .ace_indent-guide-active {\n background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;\n}\n'})),ace.define("ace/theme/textmate",["require","exports","module","ace/theme/textmate.css","ace/lib/dom"],(function(e,t,n){"use strict";t.isDark=!1,t.cssClass="ace-tm",t.cssText=e("./textmate.css"),t.$id="ace/theme/textmate",e("../lib/dom").importCssString(t.cssText,t.cssClass,!1)})),ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/lib/net","ace/lib/dom","ace/lib/app_config","ace/theme/textmate"],(function(e,t,n){var i=e("./lib/lang"),r=(e("./lib/oop"),e("./lib/net")),o=e("./lib/dom"),s=e("./lib/app_config").AppConfig;n.exports=t=new s;var a={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};t.get=function(e){if(!a.hasOwnProperty(e))throw new Error("Unknown config key: "+e);return a[e]},t.set=function(e,t){if(a.hasOwnProperty(e))a[e]=t;else if(0==this.setDefaultValue("",e,t))throw new Error("Unknown config key: "+e);"useStrictCSP"==e&&o.useStrictCSP(t)},t.all=function(){return i.copyObject(a)},t.$modes={},t.moduleUrl=function(e,t){if(a.$moduleUrls[e])return a.$moduleUrls[e];var n=e.split("/"),i="snippets"==(t=t||n[n.length-2]||"")?"/":"-",r=n[n.length-1];if("worker"==t&&"-"==i){var o=new RegExp("^"+t+"[\\-_]|[\\-_]"+t+"$","g");r=r.replace(o,"")}(!r||r==t)&&n.length>1&&(r=n[n.length-2]);var s=a[t+"Path"];return null==s?s=a.basePath:"/"==i&&(t=i=""),s&&"/"!=s.slice(-1)&&(s+="/"),s+t+i+r+this.get("suffix")},t.setModuleUrl=function(e,t){return a.$moduleUrls[e]=t};var l=function(t,n){return"ace/theme/textmate"==t?n(null,e("./theme/textmate")):console.error("loader is not configured")};t.setLoader=function(e){l=e},t.$loading={},t.loadModule=function(n,i){var o,s;Array.isArray(n)&&(s=n[0],n=n[1]);try{o=e(n)}catch(e){}if(o&&!t.$loading[n])return i&&i(o);if(t.$loading[n]||(t.$loading[n]=[]),t.$loading[n].push(i),!(t.$loading[n].length>1)){var a=function(){l(n,(function(e,i){t._emit("load.module",{name:n,module:i});var r=t.$loading[n];t.$loading[n]=null,r.forEach((function(e){e&&e(i)}))}))};if(!t.get("packaged"))return a();r.loadScript(t.moduleUrl(n,s),a),c()}};var c=function(){a.basePath||a.workerPath||a.modePath||a.themePath||Object.keys(a.$moduleUrls).length||(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),c=function(){})};t.version="1.13.1"})),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],(function(e,t,i){"use strict";e("./lib/fixoldbrowsers");var r=e("./config");r.setLoader((function(t,n){e([t],(function(e){n(null,e)}))}));var o=function(){return this||"undefined"!=typeof window&&window}();function s(t){if(o&&o.document){r.set("packaged",t||e.packaged||i.packaged||o.define&&n.amdD.packaged);for(var s,a={},l="",c=document.currentScript||document._currentScript,u=(c&&c.ownerDocument||document).getElementsByTagName("script"),d=0;d<u.length;d++){var h=u[d],f=h.src||h.getAttribute("src");if(f){for(var p=h.attributes,g=0,m=p.length;g<m;g++){var v=p[g];0===v.name.indexOf("data-ace-")&&(a[(s=v.name.replace(/^data-ace-/,""),s.replace(/-(.)/g,(function(e,t){return t.toUpperCase()})))]=v.value)}var b=f.match(/^(.*)\/ace(\-\w+)?\.js(\?|$)/);b&&(l=b[1])}}for(var y in l&&(a.base=a.base||l,a.packaged=!0),a.basePath=a.base,a.workerPath=a.workerPath||a.base,a.modePath=a.modePath||a.base,a.themePath=a.themePath||a.base,delete a.base,a)void 0!==a[y]&&r.set(y,a[y])}}i.exports=function(t){r.init=s,t.require=e,t.define=n.amdD},s(!0)})),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],(function(e,t,n){"use strict";var i=e("./oop"),r=function(){var e,t,n={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta",91:"MetaLeft",92:"MetaRight",93:"ContextMenu"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8,control:1},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9","-13":"NumpadEnter",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}};for(t in n.PRINTABLE_KEYS[173]="-",n.FUNCTION_KEYS)e=n.FUNCTION_KEYS[t].toLowerCase(),n[e]=parseInt(t,10);for(t in n.PRINTABLE_KEYS)e=n.PRINTABLE_KEYS[t].toLowerCase(),n[e]=parseInt(t,10);return i.mixin(n,n.MODIFIER_KEYS),i.mixin(n,n.PRINTABLE_KEYS),i.mixin(n,n.FUNCTION_KEYS),n.enter=n.return,n.escape=n.esc,n.del=n.delete,function(){for(var e=["cmd","ctrl","alt","shift"],t=Math.pow(2,e.length);t--;)n.KEY_MODS[t]=e.filter((function(e){return t&n.KEY_MODS[e]})).join("-")+"-"}(),n.KEY_MODS[0]="",n.KEY_MODS[-1]="input-",n}();i.mixin(t,r),t.keyCodeToString=function(e){var t=r[e];return"string"!=typeof t&&(t=String.fromCharCode(e)),t.toLowerCase()}})),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],(function(e,t,n){"use strict";var i,r=e("./keys"),o=e("./useragent"),s=null,a=0;function l(){return null==i&&function(){i=!1;try{document.createComment("").addEventListener("test",(function(){}),{get passive(){i={passive:!1}}})}catch(e){}}(),i}function c(e,t,n){this.elem=e,this.type=t,this.callback=n}c.prototype.destroy=function(){d(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var u=t.addListener=function(e,t,n,i){e.addEventListener(t,n,l()),i&&i.$toDestroy.push(new c(e,t,n))},d=t.removeListener=function(e,t,n){e.removeEventListener(t,n,l())};t.stopEvent=function(e){return t.stopPropagation(e),t.preventDefault(e),!1},t.stopPropagation=function(e){e.stopPropagation&&e.stopPropagation()},t.preventDefault=function(e){e.preventDefault&&e.preventDefault()},t.getButton=function(e){return"dblclick"==e.type?0:"contextmenu"==e.type||o.isMac&&e.ctrlKey&&!e.altKey&&!e.shiftKey?2:e.button},t.capture=function(e,t,n){var i=e&&e.ownerDocument||document;function r(e){t&&t(e),n&&n(e),d(i,"mousemove",t),d(i,"mouseup",r),d(i,"dragstart",r)}return u(i,"mousemove",t),u(i,"mouseup",r),u(i,"dragstart",r),r},t.addMouseWheelListener=function(e,t,n){u(e,"wheel",(function(e){var n=e.deltaX||0,i=e.deltaY||0;switch(e.deltaMode){case e.DOM_DELTA_PIXEL:e.wheelX=.15*n,e.wheelY=.15*i;break;case e.DOM_DELTA_LINE:e.wheelX=15*n,e.wheelY=15*i;break;case e.DOM_DELTA_PAGE:e.wheelX=150*n,e.wheelY=150*i}t(e)}),n)},t.addMultiMouseDownListener=function(e,n,i,r,s){var a,l,c,d=0,h={2:"dblclick",3:"tripleclick",4:"quadclick"};function f(e){if(0!==t.getButton(e)?d=0:e.detail>1?++d>4&&(d=1):d=1,o.isIE){var s=Math.abs(e.clientX-a)>5||Math.abs(e.clientY-l)>5;c&&!s||(d=1),c&&clearTimeout(c),c=setTimeout((function(){c=null}),n[d-1]||600),1==d&&(a=e.clientX,l=e.clientY)}if(e._clicks=d,i[r]("mousedown",e),d>4)d=0;else if(d>1)return i[r](h[d],e)}Array.isArray(e)||(e=[e]),e.forEach((function(e){u(e,"mousedown",f,s)}))};var h=function(e){return 0|(e.ctrlKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.metaKey?8:0)};function f(e,t,n){var i=h(t);if(!o.isMac&&s){if(t.getModifierState&&(t.getModifierState("OS")||t.getModifierState("Win"))&&(i|=8),s.altGr){if(3==(3&i))return;s.altGr=0}if(18===n||17===n){var l="location"in t?t.location:t.keyLocation;17===n&&1===l?1==s[n]&&(a=t.timeStamp):18===n&&3===i&&2===l&&t.timeStamp-a<50&&(s.altGr=!0)}}if(n in r.MODIFIER_KEYS&&(n=-1),i||13!==n||3!==(l="location"in t?t.location:t.keyLocation)||(e(t,i,-n),!t.defaultPrevented)){if(o.isChromeOS&&8&i){if(e(t,i,n),t.defaultPrevented)return;i&=-9}return!!(i||n in r.FUNCTION_KEYS||n in r.PRINTABLE_KEYS)&&e(t,i,n)}}function p(){s=Object.create(null)}if(t.getModifierString=function(e){return r.KEY_MODS[h(e)]},t.addCommandKeyListener=function(e,n,i){if(o.isOldGecko||o.isOpera&&!("KeyboardEvent"in window)){var r=null;u(e,"keydown",(function(e){r=e.keyCode}),i),u(e,"keypress",(function(e){return f(n,e,r)}),i)}else{var a=null;u(e,"keydown",(function(e){s[e.keyCode]=(s[e.keyCode]||0)+1;var t=f(n,e,e.keyCode);return a=e.defaultPrevented,t}),i),u(e,"keypress",(function(e){a&&(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)&&(t.stopEvent(e),a=null)}),i),u(e,"keyup",(function(e){s[e.keyCode]=null}),i),s||(p(),u(window,"focus",p))}},"object"==typeof window&&window.postMessage&&!o.isOldIE){var g=1;t.nextTick=function(e,n){n=n||window;var i="zero-timeout-message-"+g++,r=function(o){o.data==i&&(t.stopPropagation(o),d(n,"message",r),e())};u(n,"message",r),n.postMessage(i,"*")}}t.$idleBlocked=!1,t.onIdle=function(e,n){return setTimeout((function n(){t.$idleBlocked?setTimeout(n,100):e()}),n)},t.$idleBlockId=null,t.blockIdle=function(e){t.$idleBlockId&&clearTimeout(t.$idleBlockId),t.$idleBlocked=!0,t.$idleBlockId=setTimeout((function(){t.$idleBlocked=!1}),e||100)},t.nextFrame="object"==typeof window&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),t.nextFrame?t.nextFrame=t.nextFrame.bind(window):t.nextFrame=function(e){setTimeout(e,17)}})),ace.define("ace/range",["require","exports","module"],(function(e,t,n){"use strict";var i=function(e,t,n,i){this.start={row:e,column:t},this.end={row:n,column:i}};(function(){this.isEqual=function(e){return this.start.row===e.start.row&&this.end.row===e.end.row&&this.start.column===e.start.column&&this.end.column===e.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(e,t){return 0==this.compare(e,t)},this.compareRange=function(e){var t,n=e.end,i=e.start;return 1==(t=this.compare(n.row,n.column))?1==(t=this.compare(i.row,i.column))?2:0==t?1:0:-1==t?-2:-1==(t=this.compare(i.row,i.column))?-1:1==t?42:0},this.comparePoint=function(e){return this.compare(e.row,e.column)},this.containsRange=function(e){return 0==this.comparePoint(e.start)&&0==this.comparePoint(e.end)},this.intersects=function(e){var t=this.compareRange(e);return-1==t||0==t||1==t},this.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},this.isStart=function(e,t){return this.start.row==e&&this.start.column==t},this.setStart=function(e,t){"object"==typeof e?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},this.setEnd=function(e,t){"object"==typeof e?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},this.inside=function(e,t){return 0==this.compare(e,t)&&!this.isEnd(e,t)&&!this.isStart(e,t)},this.insideStart=function(e,t){return 0==this.compare(e,t)&&!this.isEnd(e,t)},this.insideEnd=function(e,t){return 0==this.compare(e,t)&&!this.isStart(e,t)},this.compare=function(e,t){return this.isMultiLine()||e!==this.start.row?e<this.start.row?-1:e>this.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0:t<this.start.column?-1:t>this.end.column?1:0},this.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},this.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.clipRows=function(e,t){if(this.end.row>t)var n={row:t+1,column:0};else this.end.row<e&&(n={row:e,column:0});if(this.start.row>t)var r={row:t+1,column:0};else this.start.row<e&&(r={row:e,column:0});return i.fromPoints(r||this.start,n||this.end)},this.extend=function(e,t){var n=this.compare(e,t);if(0==n)return this;if(-1==n)var r={row:e,column:t};else var o={row:e,column:t};return i.fromPoints(r||this.start,o||this.end)},this.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},this.isMultiLine=function(){return this.start.row!==this.end.row},this.clone=function(){return i.fromPoints(this.start,this.end)},this.collapseRows=function(){return 0==this.end.column?new i(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new i(this.start.row,0,this.end.row,0)},this.toScreenRange=function(e){var t=e.documentToScreenPosition(this.start),n=e.documentToScreenPosition(this.end);return new i(t.row,t.column,n.row,n.column)},this.moveBy=function(e,t){this.start.row+=e,this.start.column+=t,this.end.row+=e,this.end.column+=t}}).call(i.prototype),i.fromPoints=function(e,t){return new i(e.row,e.column,t.row,t.column)},i.comparePoints=function(e,t){return e.row-t.row||e.column-t.column},i.comparePoints=function(e,t){return e.row-t.row||e.column-t.column},t.Range=i})),ace.define("ace/clipboard",["require","exports","module"],(function(e,t,n){"use strict";var i;n.exports={lineMode:!1,pasteCancelled:function(){return!!(i&&i>Date.now()-50)||(i=!1)},cancel:function(){i=Date.now()}}})),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],(function(e,t,n){"use strict";var i=e("../lib/event"),r=e("../lib/useragent"),o=e("../lib/dom"),s=e("../lib/lang"),a=e("../clipboard"),l=r.isChrome<18,c=r.isIE,u=r.isChrome>63,d=400,h=e("../lib/keys"),f=h.KEY_MODS,p=r.isIOS,g=p?/\s/:/\n/,m=r.isMobile;t.TextInput=function(e,t){var n=o.createElement("textarea");n.className="ace_text-input",n.setAttribute("wrap","off"),n.setAttribute("autocorrect","off"),n.setAttribute("autocapitalize","off"),n.setAttribute("spellcheck",!1),n.style.opacity="0",e.insertBefore(n,e.firstChild);var v=!1,b=!1,y=!1,w=!1,_="";m||(n.style.fontSize="1px");var A=!1,x=!1,C="",S=0,E=0,k=0;try{var $=document.activeElement===n}catch(e){}i.addListener(n,"blur",(function(e){x||(t.onBlur(e),$=!1)}),t),i.addListener(n,"focus",(function(e){if(!x){if($=!0,r.isEdge)try{if(!document.hasFocus())return}catch(e){}t.onFocus(e),r.isEdge?setTimeout(M):M()}}),t),this.$focusScroll=!1,this.focus=function(){if(_||u||"browser"==this.$focusScroll)return n.focus({preventScroll:!0});var e=n.style.top;n.style.position="fixed",n.style.top="0px";try{var t=0!=n.getBoundingClientRect().top}catch(e){return}var i=[];if(t)for(var r=n.parentElement;r&&1==r.nodeType;)i.push(r),r.setAttribute("ace_nocontext",!0),r=!r.parentElement&&r.getRootNode?r.getRootNode().host:r.parentElement;n.focus({preventScroll:!0}),t&&i.forEach((function(e){e.removeAttribute("ace_nocontext")})),setTimeout((function(){n.style.position="","0px"==n.style.top&&(n.style.top=e)}),0)},this.blur=function(){n.blur()},this.isFocused=function(){return $},t.on("beforeEndOperation",(function(){var e=t.curOp,i=e&&e.command&&e.command.name;if("insertstring"!=i){var r=i&&(e.docChanged||e.selectionChanged);y&&r&&(C=n.value="",U()),M()}}));var M=p?function(e){if($&&(!v||e)&&!w){e||(e="");var i="\n ab"+e+"cde fg\n";i!=n.value&&(n.value=C=i);var r=4+(e.length||(t.selection.isEmpty()?0:1));4==S&&E==r||n.setSelectionRange(4,r),S=4,E=r}}:function(){if(!y&&!w&&($||R)){y=!0;var e=0,i=0,r="";if(t.session){var o=t.selection,s=o.getRange(),a=o.cursor.row;if(e=s.start.column,i=s.end.column,r=t.session.getLine(a),s.start.row!=a){var l=t.session.getLine(a-1);e=s.start.row<a-1?0:e,i+=l.length+1,r=l+"\n"+r}else if(s.end.row!=a){var c=t.session.getLine(a+1);i=s.end.row>a+1?c.length:i,i+=r.length+1,r=r+"\n"+c}else m&&a>0&&(r="\n"+r,i+=1,e+=1);r.length>d&&(e<d&&i<d?r=r.slice(0,d):(r="\n",e==i?e=i=0:(e=0,i=1)))}var u=r+"\n\n";if(u!=C&&(n.value=C=u,S=E=u.length),R&&(S=n.selectionStart,E=n.selectionEnd),E!=i||S!=e||n.selectionEnd!=E)try{n.setSelectionRange(e,i),S=e,E=i}catch(e){}y=!1}};this.resetSelection=M,$&&t.onFocus();var T=null;this.setInputHandler=function(e){T=e},this.getInputHandler=function(){return T};var R=!1,L=function(e,i){if(R&&(R=!1),b)return M(),e&&t.onPaste(e),b=!1,"";for(var o=n.selectionStart,s=n.selectionEnd,a=S,l=C.length-E,c=e,u=e.length-o,d=e.length-s,h=0;a>0&&C[h]==e[h];)h++,a--;for(c=c.slice(h),h=1;l>0&&C.length-h>S-1&&C[C.length-h]==e[e.length-h];)h++,l--;u-=h-1,d-=h-1;var f=c.length-h+1;if(f<0&&(a=-f,f=0),c=c.slice(0,f),!(i||c||u||a||l||d))return"";w=!0;var p=!1;return r.isAndroid&&". "==c&&(c=" ",p=!0),c&&!a&&!l&&!u&&!d||A?t.onTextInput(c):t.onTextInput(c,{extendLeft:a,extendRight:l,restoreStart:u,restoreEnd:d}),w=!1,C=e,S=o,E=s,k=d,p?"\n":c},O=function(e){if(y)return B();if(e&&e.inputType){if("historyUndo"==e.inputType)return t.execCommand("undo");if("historyRedo"==e.inputType)return t.execCommand("redo")}var i=n.value,r=L(i,!0);(i.length>500||g.test(r)||m&&S<1&&S==E)&&M()},F=function(e,t,n){var i=e.clipboardData||window.clipboardData;if(i&&!l){var r=c||n?"Text":"text/plain";try{return t?!1!==i.setData(r,t):i.getData(r)}catch(e){if(!n)return F(e,t,!0)}}},D=function(e,r){var o=t.getCopyText();if(!o)return i.preventDefault(e);F(e,o)?(p&&(M(o),v=o,setTimeout((function(){v=!1}),10)),r?t.onCut():t.onCopy(),i.preventDefault(e)):(v=!0,n.value=o,n.select(),setTimeout((function(){v=!1,M(),r?t.onCut():t.onCopy()})))},I=function(e){D(e,!0)},j=function(e){D(e,!1)},P=function(e){var o=F(e);a.pasteCancelled()||("string"==typeof o?(o&&t.onPaste(o,e),r.isIE&&setTimeout(M),i.preventDefault(e)):(n.value="",b=!0))};i.addCommandKeyListener(n,t.onCommandKey.bind(t),t),i.addListener(n,"select",(function(e){y||(v?v=!1:function(e){return 0===e.selectionStart&&e.selectionEnd>=C.length&&e.value===C&&C&&e.selectionEnd!==E}(n)?(t.selectAll(),M()):m&&n.selectionStart!=S&&M())}),t),i.addListener(n,"input",O,t),i.addListener(n,"cut",I,t),i.addListener(n,"copy",j,t),i.addListener(n,"paste",P,t),"oncut"in n&&"oncopy"in n&&"onpaste"in n||i.addListener(e,"keydown",(function(e){if((!r.isMac||e.metaKey)&&e.ctrlKey)switch(e.keyCode){case 67:j(e);break;case 86:P(e);break;case 88:I(e)}}),t);var B=function(){if(y&&t.onCompositionUpdate&&!t.$readOnly){if(A)return N();if(y.useTextareaForIME)t.onCompositionUpdate(n.value);else{var e=n.value;L(e),y.markerRange&&(y.context&&(y.markerRange.start.column=y.selectionStart=y.context.compositionStartOffset),y.markerRange.end.column=y.markerRange.start.column+E-y.selectionStart+k)}}},U=function(e){t.onCompositionEnd&&!t.$readOnly&&(y=!1,t.onCompositionEnd(),t.off("mousedown",N),e&&O())};function N(){x=!0,n.blur(),n.focus(),x=!1}var H,W=s.delayedCall(B,50).schedule.bind(null,null);function z(){clearTimeout(H),H=setTimeout((function(){_&&(n.style.cssText=_,_=""),t.renderer.$isMousePressed=!1,t.renderer.$keepTextAreaAtCursor&&t.renderer.$moveTextAreaToCursor()}),0)}i.addListener(n,"compositionstart",(function(e){if(!y&&t.onCompositionStart&&!t.$readOnly&&(y={},!A)){e.data&&(y.useTextareaForIME=!1),setTimeout(B,0),t._signal("compositionStart"),t.on("mousedown",N);var i=t.getSelectionRange();i.end.row=i.start.row,i.end.column=i.start.column,y.markerRange=i,y.selectionStart=S,t.onCompositionStart(y),y.useTextareaForIME?(C=n.value="",S=0,E=0):(n.msGetInputContext&&(y.context=n.msGetInputContext()),n.getInputContext&&(y.context=n.getInputContext()))}}),t),i.addListener(n,"compositionupdate",B,t),i.addListener(n,"keyup",(function(e){27==e.keyCode&&n.value.length<n.selectionStart&&(y||(C=n.value),S=E=-1,M()),W()}),t),i.addListener(n,"keydown",W,t),i.addListener(n,"compositionend",U,t),this.getElement=function(){return n},this.setCommandMode=function(e){A=e,n.readOnly=!1},this.setReadOnly=function(e){A||(n.readOnly=e)},this.setCopyWithEmptySelection=function(e){},this.onContextMenu=function(e){R=!0,M(),t._emit("nativecontextmenu",{target:t,domEvent:e}),this.moveToMouse(e,!0)},this.moveToMouse=function(e,s){_||(_=n.style.cssText),n.style.cssText=(s?"z-index:100000;":"")+(r.isIE?"opacity:0.1;":"")+"text-indent: -"+(S+E)*t.renderer.characterWidth*.5+"px;";var a=t.container.getBoundingClientRect(),l=o.computedStyle(t.container),c=a.top+(parseInt(l.borderTopWidth)||0),u=a.left+(parseInt(a.borderLeftWidth)||0),d=a.bottom-c-n.clientHeight-2,h=function(e){o.translate(n,e.clientX-u-2,Math.min(e.clientY-c-2,d))};h(e),"mousedown"==e.type&&(t.renderer.$isMousePressed=!0,clearTimeout(H),r.isWin&&i.capture(t.container,h,z))},this.onContextMenuClose=z;var V=function(e){t.textInput.onContextMenu(e),z()};i.addListener(n,"mouseup",V,t),i.addListener(n,"mousedown",(function(e){e.preventDefault(),z()}),t),i.addListener(t.renderer.scroller,"contextmenu",V,t),i.addListener(n,"contextmenu",V,t),p&&function(e,t,n){var i=null,r=!1;n.addEventListener("keydown",(function(e){i&&clearTimeout(i),r=!0}),!0),n.addEventListener("keyup",(function(e){i=setTimeout((function(){r=!1}),100)}),!0);var o=function(e){if(document.activeElement===n&&!(r||y||t.$mouseHandler.isMousePressed||v)){var i=n.selectionStart,o=n.selectionEnd,s=null,a=0;if(0==i?s=h.up:1==i?s=h.home:o>E&&"\n"==C[o]?s=h.end:i<S&&" "==C[i-1]?(s=h.left,a=f.option):i<S||i==S&&E!=S&&i==o?s=h.left:o>E&&C.slice(0,o).split("\n").length>2?s=h.down:o>E&&" "==C[o-1]?(s=h.right,a=f.option):(o>E||o==E&&E!=S&&i==o)&&(s=h.right),i!==o&&(a|=f.shift),s){if(!t.onCommandKey({},a,s)&&t.commands){s=h.keyCodeToString(s);var l=t.commands.findKeyCommand(a,s);l&&t.execCommand(l)}S=i,E=o,M("")}}};document.addEventListener("selectionchange",o),t.on("destroy",(function(){document.removeEventListener("selectionchange",o)}))}(0,t,n),this.destroy=function(){n.parentElement&&n.parentElement.removeChild(n)}},t.$setUserAgentForTests=function(e,t){m=e,p=t}})),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],(function(e,t,n){"use strict";var i=e("../lib/useragent");function r(e){e.$clickSelection=null;var t=e.editor;t.setDefaultHandler("mousedown",this.onMouseDown.bind(e)),t.setDefaultHandler("dblclick",this.onDoubleClick.bind(e)),t.setDefaultHandler("tripleclick",this.onTripleClick.bind(e)),t.setDefaultHandler("quadclick",this.onQuadClick.bind(e)),t.setDefaultHandler("mousewheel",this.onMouseWheel.bind(e)),["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"].forEach((function(t){e[t]=this[t]}),this),e.selectByLines=this.extendSelectionBy.bind(e,"getLineRange"),e.selectByWords=this.extendSelectionBy.bind(e,"getWordRange")}function o(e,t){if(e.start.row==e.end.row)var n=2*t.column-e.start.column-e.end.column;else if(e.start.row!=e.end.row-1||e.start.column||e.end.column)n=2*t.row-e.start.row-e.end.row;else n=t.column-4;return n<0?{cursor:e.start,anchor:e.end}:{cursor:e.end,anchor:e.start}}(function(){this.onMouseDown=function(e){var t=e.inSelection(),n=e.getDocumentPosition();this.mousedownEvent=e;var r=this.editor,o=e.getButton();return 0!==o?((r.getSelectionRange().isEmpty()||1==o)&&r.selection.moveToPosition(n),void(2==o&&(r.textInput.onContextMenu(e.domEvent),i.isMozilla||e.preventDefault()))):(this.mousedownEvent.time=Date.now(),!t||r.isFocused()||(r.focus(),!this.$focusTimeout||this.$clickSelection||r.inMultiSelectMode)?(this.captureMouse(e),this.startSelect(n,e.domEvent._clicks>1),e.preventDefault()):(this.setState("focusWait"),void this.captureMouse(e)))},this.startSelect=function(e,t){e=e||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var n=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?n.selection.selectToPosition(e):t||n.selection.moveToPosition(e),t||this.select(),n.renderer.scroller.setCapture&&n.renderer.scroller.setCapture(),n.setStyle("ace_selecting"),this.setState("select"))},this.select=function(){var e,t=this.editor,n=t.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var i=this.$clickSelection.comparePoint(n);if(-1==i)e=this.$clickSelection.end;else if(1==i)e=this.$clickSelection.start;else{var r=o(this.$clickSelection,n);n=r.cursor,e=r.anchor}t.selection.setSelectionAnchor(e.row,e.column)}t.selection.selectToPosition(n),t.renderer.scrollCursorIntoView()},this.extendSelectionBy=function(e){var t,n=this.editor,i=n.renderer.screenToTextCoordinates(this.x,this.y),r=n.selection[e](i.row,i.column);if(this.$clickSelection){var s=this.$clickSelection.comparePoint(r.start),a=this.$clickSelection.comparePoint(r.end);if(-1==s&&a<=0)t=this.$clickSelection.end,r.end.row==i.row&&r.end.column==i.column||(i=r.start);else if(1==a&&s>=0)t=this.$clickSelection.start,r.start.row==i.row&&r.start.column==i.column||(i=r.end);else if(-1==s&&1==a)i=r.end,t=r.start;else{var l=o(this.$clickSelection,i);i=l.cursor,t=l.anchor}n.selection.setSelectionAnchor(t.row,t.column)}n.selection.selectToPosition(i),n.renderer.scrollCursorIntoView()},this.selectEnd=this.selectAllEnd=this.selectByWordsEnd=this.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting"),this.editor.renderer.scroller.releaseCapture&&this.editor.renderer.scroller.releaseCapture()},this.focusWait=function(){var e,t,n,i,r=(e=this.mousedownEvent.x,t=this.mousedownEvent.y,n=this.x,i=this.y,Math.sqrt(Math.pow(n-e,2)+Math.pow(i-t,2))),o=Date.now();(r>0||o-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},this.onDoubleClick=function(e){var t=e.getDocumentPosition(),n=this.editor,i=n.session.getBracketRange(t);i?(i.isEmpty()&&(i.start.column--,i.end.column++),this.setState("select")):(i=n.selection.getWordRange(t.row,t.column),this.setState("selectByWords")),this.$clickSelection=i,this.select()},this.onTripleClick=function(e){var t=e.getDocumentPosition(),n=this.editor;this.setState("selectByLines");var i=n.getSelectionRange();i.isMultiLine()&&i.contains(t.row,t.column)?(this.$clickSelection=n.selection.getLineRange(i.start.row),this.$clickSelection.end=n.selection.getLineRange(i.end.row).end):this.$clickSelection=n.selection.getLineRange(t.row),this.select()},this.onQuadClick=function(e){var t=this.editor;t.selectAll(),this.$clickSelection=t.getSelectionRange(),this.setState("selectAll")},this.onMouseWheel=function(e){if(!e.getAccelKey()){e.getShiftKey()&&e.wheelY&&!e.wheelX&&(e.wheelX=e.wheelY,e.wheelY=0);var t=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var n=this.$lastScroll,i=e.domEvent.timeStamp,r=i-n.t,o=r?e.wheelX/r:n.vx,s=r?e.wheelY/r:n.vy;r<550&&(o=(o+n.vx)/2,s=(s+n.vy)/2);var a=Math.abs(o/s),l=!1;return a>=1&&t.renderer.isScrollableBy(e.wheelX*e.speed,0)&&(l=!0),a<=1&&t.renderer.isScrollableBy(0,e.wheelY*e.speed)&&(l=!0),l?n.allowed=i:i-n.allowed<550&&(Math.abs(o)<=1.5*Math.abs(n.vx)&&Math.abs(s)<=1.5*Math.abs(n.vy)?(l=!0,n.allowed=i):n.allowed=0),n.t=i,n.vx=o,n.vy=s,l?(t.renderer.scrollBy(e.wheelX*e.speed,e.wheelY*e.speed),e.stop()):void 0}}}).call(r.prototype),t.DefaultHandlers=r})),ace.define("ace/tooltip",["require","exports","module","ace/lib/oop","ace/lib/dom"],(function(e,t,n){"use strict";e("./lib/oop");var i=e("./lib/dom"),r="ace_tooltip";function o(e){this.isOpen=!1,this.$element=null,this.$parentNode=e}(function(){this.$init=function(){return this.$element=i.createElement("div"),this.$element.className=r,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},this.getElement=function(){return this.$element||this.$init()},this.setText=function(e){this.getElement().textContent=e},this.setHtml=function(e){this.getElement().innerHTML=e},this.setPosition=function(e,t){this.getElement().style.left=e+"px",this.getElement().style.top=t+"px"},this.setClassName=function(e){i.addCssClass(this.getElement(),e)},this.show=function(e,t,n){null!=e&&this.setText(e),null!=t&&null!=n&&this.setPosition(t,n),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},this.hide=function(){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=r,this.isOpen=!1)},this.getHeight=function(){return this.getElement().offsetHeight},this.getWidth=function(){return this.getElement().offsetWidth},this.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)}}).call(o.prototype),t.Tooltip=o})),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event","ace/tooltip"],(function(e,t,n){"use strict";var i=e("../lib/dom"),r=e("../lib/oop"),o=e("../lib/event"),s=e("../tooltip").Tooltip;function a(e){s.call(this,e)}r.inherits(a,s),function(){this.setPosition=function(e,t){var n=window.innerWidth||document.documentElement.clientWidth,i=window.innerHeight||document.documentElement.clientHeight,r=this.getWidth(),o=this.getHeight();(e+=15)+r>n&&(e-=e+r-n),(t+=15)+o>i&&(t-=20+o),s.prototype.setPosition.call(this,e,t)}}.call(a.prototype),t.GutterHandler=function(e){var t,n,r,s=e.editor,l=s.renderer.$gutterLayer,c=new a(s.container);function u(){t&&(t=clearTimeout(t)),r&&(c.hide(),r=null,s._signal("hideGutterTooltip",c),s.off("mousewheel",u))}function d(e){c.setPosition(e.x,e.y)}e.editor.setDefaultHandler("guttermousedown",(function(t){if(s.isFocused()&&0==t.getButton()&&"foldWidgets"!=l.getRegion(t)){var n=t.getDocumentPosition().row,i=s.session.selection;if(t.getShiftKey())i.selectTo(n,0);else{if(2==t.domEvent.detail)return s.selectAll(),t.preventDefault();e.$clickSelection=s.selection.getLineRange(n)}return e.setState("selectByLines"),e.captureMouse(t),t.preventDefault()}})),e.editor.setDefaultHandler("guttermousemove",(function(o){var a=o.domEvent.target||o.domEvent.srcElement;if(i.hasCssClass(a,"ace_fold-widget"))return u();r&&e.$tooltipFollowsMouse&&d(o),n=o,t||(t=setTimeout((function(){t=null,n&&!e.isMousePressed?function(){var t=n.getDocumentPosition().row,i=l.$annotations[t];if(!i)return u();if(t==s.session.getLength()){var o=s.renderer.pixelToScreenCoordinates(0,n.y).row,a=n.$pos;if(o>s.session.documentToScreenRow(a.row,a.column))return u()}if(r!=i){r=i.text.join("<br/>"),c.setHtml(r);var h=i.className;if(h&&c.setClassName(h.trim()),c.show(),s._signal("showGutterTooltip",c),s.on("mousewheel",u),e.$tooltipFollowsMouse)d(n);else{var f=n.domEvent.target.getBoundingClientRect(),p=c.getElement().style;p.left=f.right+"px",p.top=f.bottom+"px"}}}():u()}),50))})),o.addListener(s.renderer.$gutter,"mouseout",(function(e){n=null,r&&!t&&(t=setTimeout((function(){t=null,u()}),50))}),s),s.on("changeSession",u)}})),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],(function(e,t,n){"use strict";var i=e("../lib/event"),r=e("../lib/useragent"),o=t.MouseEvent=function(e,t){this.domEvent=e,this.editor=t,this.x=this.clientX=e.clientX,this.y=this.clientY=e.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1};(function(){this.stopPropagation=function(){i.stopPropagation(this.domEvent),this.propagationStopped=!0},this.preventDefault=function(){i.preventDefault(this.domEvent),this.defaultPrevented=!0},this.stop=function(){this.stopPropagation(),this.preventDefault()},this.getDocumentPosition=function(){return this.$pos||(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY)),this.$pos},this.inSelection=function(){if(null!==this.$inSelection)return this.$inSelection;var e=this.editor.getSelectionRange();if(e.isEmpty())this.$inSelection=!1;else{var t=this.getDocumentPosition();this.$inSelection=e.contains(t.row,t.column)}return this.$inSelection},this.getButton=function(){return i.getButton(this.domEvent)},this.getShiftKey=function(){return this.domEvent.shiftKey},this.getAccelKey=r.isMac?function(){return this.domEvent.metaKey}:function(){return this.domEvent.ctrlKey}}).call(o.prototype)})),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],(function(e,t,n){"use strict";var i=e("../lib/dom"),r=e("../lib/event"),o=e("../lib/useragent");function s(e){var t=e.editor,n=i.createElement("div");n.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",n.textContent=" ",["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"].forEach((function(t){e[t]=this[t]}),this),t.on("mousedown",this.onMouseDown.bind(e));var s,l,c,u,d,h,f,p,g,m,v,b=t.container,y=0;function w(){var e=h;(function(e,n){var i=Date.now(),r=!n||e.row!=n.row,o=!n||e.column!=n.column;!m||r||o?(t.moveCursorToPosition(e),m=i,v={x:l,y:c}):a(v.x,v.y,l,c)>5?m=null:i-m>=200&&(t.renderer.scrollCursorIntoView(),m=null)})(h=t.renderer.screenToTextCoordinates(l,c),e),function(e,n){var i=Date.now(),r=t.renderer.layerConfig.lineHeight,o=t.renderer.layerConfig.characterWidth,s=t.renderer.scroller.getBoundingClientRect(),a={x:{left:l-s.left,right:s.right-l},y:{top:c-s.top,bottom:s.bottom-c}},u=Math.min(a.x.left,a.x.right),d=Math.min(a.y.top,a.y.bottom),h={row:e.row,column:e.column};u/o<=2&&(h.column+=a.x.left<a.x.right?-3:2),d/r<=1&&(h.row+=a.y.top<a.y.bottom?-1:1);var f=e.row!=h.row,p=e.column!=h.column,m=!n||e.row!=n.row;f||p&&!m?g?i-g>=200&&t.renderer.scrollCursorIntoView(h):g=i:g=null}(h,e)}function _(){d=t.selection.toOrientedRange(),s=t.session.addMarker(d,"ace_selection",t.getSelectionStyle()),t.clearSelection(),t.isFocused()&&t.renderer.$cursorLayer.setBlinking(!1),clearInterval(u),w(),u=setInterval(w,20),y=0,r.addListener(document,"mousemove",C)}function A(){clearInterval(u),t.session.removeMarker(s),s=null,t.selection.fromOrientedRange(d),t.isFocused()&&!p&&t.$resetCursorStyle(),d=null,h=null,y=0,g=null,m=null,r.removeListener(document,"mousemove",C)}this.onDragStart=function(e){if(this.cancelDrag||!b.draggable){var i=this;return setTimeout((function(){i.startSelect(),i.captureMouse(e)}),0),e.preventDefault()}d=t.getSelectionRange();var r=e.dataTransfer;r.effectAllowed=t.getReadOnly()?"copy":"copyMove",t.container.appendChild(n),r.setDragImage&&r.setDragImage(n,0,0),setTimeout((function(){t.container.removeChild(n)})),r.clearData(),r.setData("Text",t.session.getTextRange()),p=!0,this.setState("drag")},this.onDragEnd=function(e){if(b.draggable=!1,p=!1,this.setState(null),!t.getReadOnly()){var n=e.dataTransfer.dropEffect;f||"move"!=n||t.session.remove(t.getSelectionRange()),t.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(e){if(!t.getReadOnly()&&S(e.dataTransfer))return l=e.clientX,c=e.clientY,s||_(),y++,e.dataTransfer.dropEffect=f=E(e),r.preventDefault(e)},this.onDragOver=function(e){if(!t.getReadOnly()&&S(e.dataTransfer))return l=e.clientX,c=e.clientY,s||(_(),y++),null!==x&&(x=null),e.dataTransfer.dropEffect=f=E(e),r.preventDefault(e)},this.onDragLeave=function(e){if(--y<=0&&s)return A(),f=null,r.preventDefault(e)},this.onDrop=function(e){if(h){var n=e.dataTransfer;if(p)switch(f){case"move":d=d.contains(h.row,h.column)?{start:h,end:h}:t.moveText(d,h);break;case"copy":d=t.moveText(d,h,!0)}else{var i=n.getData("Text");d={start:h,end:t.session.insert(h,i)},t.focus(),f=null}return A(),r.preventDefault(e)}},r.addListener(b,"dragstart",this.onDragStart.bind(e),t),r.addListener(b,"dragend",this.onDragEnd.bind(e),t),r.addListener(b,"dragenter",this.onDragEnter.bind(e),t),r.addListener(b,"dragover",this.onDragOver.bind(e),t),r.addListener(b,"dragleave",this.onDragLeave.bind(e),t),r.addListener(b,"drop",this.onDrop.bind(e),t);var x=null;function C(){null==x&&(x=setTimeout((function(){null!=x&&s&&A()}),20))}function S(e){var t=e.types;return!t||Array.prototype.some.call(t,(function(e){return"text/plain"==e||"Text"==e}))}function E(e){var t=["copy","copymove","all","uninitialized"],n=o.isMac?e.altKey:e.ctrlKey,i="uninitialized";try{i=e.dataTransfer.effectAllowed.toLowerCase()}catch(e){}var r="none";return n&&t.indexOf(i)>=0?r="copy":["move","copymove","linkmove","all","uninitialized"].indexOf(i)>=0?r="move":t.indexOf(i)>=0&&(r="copy"),r}}function a(e,t,n,i){return Math.sqrt(Math.pow(n-e,2)+Math.pow(i-t,2))}(function(){this.dragWait=function(){Date.now()-this.mousedownEvent.time>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){this.editor.container.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(e){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var e=this.editor;e.container.draggable=!0,e.renderer.$cursorLayer.setBlinking(!1),e.setStyle("ace_dragging");var t=o.isWin?"default":"move";e.renderer.setCursorStyle(t),this.setState("dragReady")},this.onMouseDrag=function(e){var t=this.editor.container;o.isIE&&"dragReady"==this.state&&a(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>3&&t.dragDrop(),"dragWait"===this.state&&a(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>0&&(t.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))},this.onMouseDown=function(e){if(this.$dragEnabled){this.mousedownEvent=e;var t=this.editor,n=e.inSelection(),i=e.getButton();if(1===(e.domEvent.detail||1)&&0===i&&n){if(e.editor.inMultiSelectMode&&(e.getAccelKey()||e.getShiftKey()))return;this.mousedownEvent.time=Date.now();var r=e.domEvent.target||e.domEvent.srcElement;"unselectable"in r&&(r.unselectable="on"),t.getDragDelay()?(o.isWebKit&&(this.cancelDrag=!0,t.container.draggable=!0),this.setState("dragWait")):this.startDrag(),this.captureMouse(e,this.onMouseDrag.bind(this)),e.defaultPrevented=!0}}}}).call(s.prototype),t.DragdropHandler=s})),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],(function(e,t,n){"use strict";var i=e("./mouse_event").MouseEvent,r=e("../lib/event"),o=e("../lib/dom");t.addTouchListeners=function(e,t){var n,s,a,l,c,u,d,h,f,p="scroll",g=0,m=0,v=0,b=0;function y(){var e,n,i;f||(e=window.navigator&&window.navigator.clipboard,n=!1,i=function(i){var r,s,a=i.target.getAttribute("action");if("more"==a||!n)return n=!n,r=t.getCopyText(),s=t.session.getUndoManager().hasUndo(),void f.replaceChild(o.buildDom(n?["span",!r&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],r&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],r&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],e&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],s&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],["span",{class:"ace_mobile-button",action:"find"},"Find"],["span",{class:"ace_mobile-button",action:"openCommandPallete"},"Palette"]]:["span"]),f.firstChild);"paste"==a?e.readText().then((function(e){t.execCommand(a,e)})):a&&("cut"!=a&&"copy"!=a||(e?e.writeText(t.getCopyText()):document.execCommand("copy")),t.execCommand(a)),f.firstChild.style.display="none",n=!1,"openCommandPallete"!=a&&t.focus()},f=o.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(e){p="menu",e.stopPropagation(),e.preventDefault(),t.textInput.focus()},ontouchend:function(e){e.stopPropagation(),e.preventDefault(),i(e)},onclick:i},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],t.container));var r=t.selection.cursor,s=t.renderer.textToScreenCoordinates(r.row,r.column),a=t.renderer.textToScreenCoordinates(0,0).pageX,l=t.renderer.scrollLeft,c=t.container.getBoundingClientRect();f.style.top=s.pageY-c.top-3+"px",s.pageX-c.left<c.width-70?(f.style.left="",f.style.right="10px"):(f.style.right="",f.style.left=a+l-c.left+"px"),f.style.display="",f.firstChild.style.display="none",t.on("input",w)}function w(e){f&&(f.style.display="none"),t.off("input",w)}function _(){c=null,clearTimeout(c);var e=t.selection.getRange(),n=e.contains(d.row,d.column);!e.isEmpty()&&n||(t.selection.moveToPosition(d),t.selection.selectWord()),p="wait",y()}r.addListener(e,"contextmenu",(function(e){h&&t.textInput.getElement().focus()}),t),r.addListener(e,"touchstart",(function(e){var r=e.touches;if(c||r.length>1)return clearTimeout(c),c=null,a=-1,void(p="zoom");h=t.$mouseHandler.isMousePressed=!0;var o=t.renderer.layerConfig.lineHeight,u=t.renderer.layerConfig.lineHeight,f=e.timeStamp;l=f;var y=r[0],w=y.clientX,A=y.clientY;Math.abs(n-w)+Math.abs(s-A)>o&&(a=-1),n=e.clientX=w,s=e.clientY=A,v=b=0;var x=new i(e,t);if(d=x.getDocumentPosition(),f-a<500&&1==r.length&&!g)m++,e.preventDefault(),e.button=0,function(){c=null,clearTimeout(c),t.selection.moveToPosition(d);var e=m>=2?t.selection.getLineRange(d.row):t.session.getBracketRange(d);e&&!e.isEmpty()?t.selection.setRange(e):t.selection.selectWord(),p="wait"}();else{m=0;var C=t.selection.cursor,S=t.selection.isEmpty()?C:t.selection.anchor,E=t.renderer.$cursorLayer.getPixelPosition(C,!0),k=t.renderer.$cursorLayer.getPixelPosition(S,!0),$=t.renderer.scroller.getBoundingClientRect(),M=t.renderer.layerConfig.offset,T=t.renderer.scrollLeft,R=function(e,t){return(e/=u)*e+(t=t/o-.75)*t};if(e.clientX<$.left)return void(p="zoom");var L=R(e.clientX-$.left-E.left+T,e.clientY-$.top-E.top+M),O=R(e.clientX-$.left-k.left+T,e.clientY-$.top-k.top+M);L<3.5&&O<3.5&&(p=L>O?"cursor":"anchor"),p=O<3.5?"anchor":L<3.5?"cursor":"scroll",c=setTimeout(_,450)}a=f}),t),r.addListener(e,"touchend",(function(e){h=t.$mouseHandler.isMousePressed=!1,u&&clearInterval(u),"zoom"==p?(p="",g=0):c?(t.selection.moveToPosition(d),g=0,y()):"scroll"==p?(g+=60,u=setInterval((function(){g--<=0&&(clearInterval(u),u=null),Math.abs(v)<.01&&(v=0),Math.abs(b)<.01&&(b=0),g<20&&(v*=.9),g<20&&(b*=.9);var e=t.session.getScrollTop();t.renderer.scrollBy(10*v,10*b),e==t.session.getScrollTop()&&(g=0)}),10),w()):y(),clearTimeout(c),c=null}),t),r.addListener(e,"touchmove",(function(e){c&&(clearTimeout(c),c=null);var r=e.touches;if(!(r.length>1||"zoom"==p)){var o=r[0],a=n-o.clientX,u=s-o.clientY;if("wait"==p){if(!(a*a+u*u>4))return e.preventDefault();p="cursor"}n=o.clientX,s=o.clientY,e.clientX=o.clientX,e.clientY=o.clientY;var d=e.timeStamp,h=d-l;if(l=d,"scroll"==p){var f=new i(e,t);f.speed=1,f.wheelX=a,f.wheelY=u,10*Math.abs(a)<Math.abs(u)&&(a=0),10*Math.abs(u)<Math.abs(a)&&(u=0),0!=h&&(v=a/h,b=u/h),t._emit("mousewheel",f),f.propagationStopped||(v=b=0)}else{var g=new i(e,t).getDocumentPosition();"cursor"==p?t.selection.moveCursorToPosition(g):"anchor"==p&&t.selection.setSelectionAnchor(g.row,g.column),t.renderer.scrollCursorIntoView(g),e.preventDefault()}}}),t)}})),ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/mouse/touch_handler","ace/config"],(function(e,t,n){"use strict";var i=e("../lib/event"),r=e("../lib/useragent"),o=e("./default_handlers").DefaultHandlers,s=e("./default_gutter_handler").GutterHandler,a=e("./mouse_event").MouseEvent,l=e("./dragdrop_handler").DragdropHandler,c=e("./touch_handler").addTouchListeners,u=e("../config"),d=function(e){var t=this;this.editor=e,new o(this),new s(this),new l(this);var n=function(t){(!document.hasFocus||!document.hasFocus()||!e.isFocused()&&document.activeElement==(e.textInput&&e.textInput.getElement()))&&window.focus(),e.focus(),setTimeout((function(){e.isFocused()||e.focus()}))},a=e.renderer.getMouseEventTarget();i.addListener(a,"click",this.onMouseEvent.bind(this,"click"),e),i.addListener(a,"mousemove",this.onMouseMove.bind(this,"mousemove"),e),i.addMultiMouseDownListener([a,e.renderer.scrollBarV&&e.renderer.scrollBarV.inner,e.renderer.scrollBarH&&e.renderer.scrollBarH.inner,e.textInput&&e.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",e),i.addMouseWheelListener(e.container,this.onMouseWheel.bind(this,"mousewheel"),e),c(e.container,e);var u=e.renderer.$gutter;i.addListener(u,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),e),i.addListener(u,"click",this.onMouseEvent.bind(this,"gutterclick"),e),i.addListener(u,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),e),i.addListener(u,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),e),i.addListener(a,"mousedown",n,e),i.addListener(u,"mousedown",n,e),r.isIE&&e.renderer.scrollBarV&&(i.addListener(e.renderer.scrollBarV.element,"mousedown",n,e),i.addListener(e.renderer.scrollBarH.element,"mousedown",n,e)),e.on("mousemove",(function(n){if(!t.state&&!t.$dragDelay&&t.$dragEnabled){var i=e.renderer.screenToTextCoordinates(n.x,n.y),r=e.session.selection.getRange(),o=e.renderer;!r.isEmpty()&&r.insideStart(i.row,i.column)?o.setCursorStyle("default"):o.setCursorStyle("")}}),e)};(function(){this.onMouseEvent=function(e,t){this.editor.session&&this.editor._emit(e,new a(t,this.editor))},this.onMouseMove=function(e,t){var n=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;n&&n.length&&this.editor._emit(e,new a(t,this.editor))},this.onMouseWheel=function(e,t){var n=new a(t,this.editor);n.speed=2*this.$scrollSpeed,n.wheelX=t.wheelX,n.wheelY=t.wheelY,this.editor._emit(e,n)},this.setState=function(e){this.state=e},this.captureMouse=function(e,t){this.x=e.x,this.y=e.y,this.isMousePressed=!0;var n=this.editor,o=this.editor.renderer;o.$isMousePressed=!0;var s=this,l=function(e){if(e){if(r.isWebKit&&!e.which&&s.releaseMouse)return s.releaseMouse();s.x=e.clientX,s.y=e.clientY,t&&t(e),s.mouseEvent=new a(e,s.editor),s.$mouseMoved=!0}},c=function(e){n.off("beforeEndOperation",d),clearInterval(h),n.session&&u(),s[s.state+"End"]&&s[s.state+"End"](e),s.state="",s.isMousePressed=o.$isMousePressed=!1,o.$keepTextAreaAtCursor&&o.$moveTextAreaToCursor(),s.$onCaptureMouseMove=s.releaseMouse=null,e&&s.onMouseEvent("mouseup",e),n.endOperation()},u=function(){s[s.state]&&s[s.state](),s.$mouseMoved=!1};if(r.isOldIE&&"dblclick"==e.domEvent.type)return setTimeout((function(){c(e)}));var d=function(e){s.releaseMouse&&n.curOp.command.name&&n.curOp.selectionChanged&&(s[s.state+"End"]&&s[s.state+"End"](),s.state="",s.releaseMouse())};n.on("beforeEndOperation",d),n.startOperation({command:{name:"mouse"}}),s.$onCaptureMouseMove=l,s.releaseMouse=i.capture(this.editor.container,l,c);var h=setInterval(u,20)},this.releaseMouse=null,this.cancelContextMenu=function(){var e=function(t){t&&t.domEvent&&"contextmenu"!=t.domEvent.type||(this.editor.off("nativecontextmenu",e),t&&t.domEvent&&i.stopEvent(t.domEvent))}.bind(this);setTimeout(e,10),this.editor.on("nativecontextmenu",e)},this.destroy=function(){this.releaseMouse&&this.releaseMouse()}}).call(d.prototype),u.defineOptions(d.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:r.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),t.MouseHandler=d})),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],(function(e,t,n){"use strict";var i=e("../lib/dom");t.FoldHandler=function(e){e.on("click",(function(t){var n=t.getDocumentPosition(),r=e.session,o=r.getFoldAt(n.row,n.column,1);o&&(t.getAccelKey()?r.removeFold(o):r.expandFold(o),t.stop());var s=t.domEvent&&t.domEvent.target;s&&i.hasCssClass(s,"ace_inline_button")&&i.hasCssClass(s,"ace_toggle_wrap")&&(r.setOption("wrap",!r.getUseWrapMode()),e.renderer.scrollCursorIntoView())})),e.on("gutterclick",(function(t){if("foldWidgets"==e.renderer.$gutterLayer.getRegion(t)){var n=t.getDocumentPosition().row,i=e.session;i.foldWidgets&&i.foldWidgets[n]&&e.session.onFoldWidgetClick(n,t),e.isFocused()||e.focus(),t.stop()}})),e.on("gutterdblclick",(function(t){if("foldWidgets"==e.renderer.$gutterLayer.getRegion(t)){var n=t.getDocumentPosition().row,i=e.session,r=i.getParentFoldRangeData(n,!0),o=r.range||r.firstRange;if(o){n=o.start.row;var s=i.getFoldAt(n,i.getLine(n).length,1);s?i.removeFold(s):(i.addFold("...",o),e.renderer.scrollCursorIntoView({row:o.start.row,column:0}))}t.stop()}}))}})),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],(function(e,t,n){"use strict";var i=e("../lib/keys"),r=e("../lib/event"),o=function(e){this.$editor=e,this.$data={editor:e},this.$handlers=[],this.setDefaultHandler(e.commands)};(function(){this.setDefaultHandler=function(e){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=e,this.addKeyboardHandler(e,0)},this.setKeyboardHandler=function(e){var t=this.$handlers;if(t[t.length-1]!=e){for(;t[t.length-1]&&t[t.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(t[t.length-1]);this.addKeyboardHandler(e,1)}},this.addKeyboardHandler=function(e,t){if(e){"function"!=typeof e||e.handleKeyboard||(e.handleKeyboard=e);var n=this.$handlers.indexOf(e);-1!=n&&this.$handlers.splice(n,1),null==t?this.$handlers.push(e):this.$handlers.splice(t,0,e),-1==n&&e.attach&&e.attach(this.$editor)}},this.removeKeyboardHandler=function(e){var t=this.$handlers.indexOf(e);return-1!=t&&(this.$handlers.splice(t,1),e.detach&&e.detach(this.$editor),!0)},this.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},this.getStatusText=function(){var e=this.$data,t=e.editor;return this.$handlers.map((function(n){return n.getStatusText&&n.getStatusText(t,e)||""})).filter(Boolean).join(" ")},this.$callKeyboardHandlers=function(e,t,n,i){for(var o,s=!1,a=this.$editor.commands,l=this.$handlers.length;l--&&!((o=this.$handlers[l].handleKeyboard(this.$data,e,t,n,i))&&o.command&&((s="null"==o.command||a.exec(o.command,this.$editor,o.args,i))&&i&&-1!=e&&1!=o.passEvent&&1!=o.command.passEvent&&r.stopEvent(i),s)););return s||-1!=e||(o={command:"insertstring"},s=a.exec("insertstring",this.$editor,t)),s&&this.$editor._signal&&this.$editor._signal("keyboardActivity",o),s},this.onCommandKey=function(e,t,n){var r=i.keyCodeToString(n);return this.$callKeyboardHandlers(t,r,n,e)},this.onTextInput=function(e){return this.$callKeyboardHandlers(-1,e)}}).call(o.prototype),t.KeyBinding=o})),ace.define("ace/lib/bidiutil",["require","exports","module"],(function(e,t,n){"use strict";var i=0,r=0,o=!1,s=!1,a=!1,l=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],c=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],u=11,d=18,h=[d,d,d,d,d,d,d,d,d,6,5,6,8,5,d,d,d,d,d,d,d,d,d,d,d,d,d,d,5,5,5,6,8,4,4,u,u,u,4,4,4,4,4,10,9,10,9,9,2,2,2,2,2,2,2,2,2,2,9,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,d,d,d,d,d,d,5,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,9,4,u,u,u,u,4,4,4,4,0,4,4,d,4,4,u,u,2,2,4,0,4,4,4,2,0,4,4,4,4,4],f=[8,8,8,8,8,8,8,8,8,8,8,d,d,d,0,1,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,8,5,13,14,15,16,17,9,u,u,u,u,u,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,9,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,8];function p(e,t,n){if(!(r<e))if(1!=e||1!=i||s)for(var o,a,l,c,u=n.length,d=0;d<u;){if(t[d]>=e){for(o=d+1;o<u&&t[o]>=e;)o++;for(a=d,l=o-1;a<l;a++,l--)c=n[a],n[a]=n[l],n[l]=c;d=o}d++}else n.reverse()}function g(e,t,n,r){var l,c,h,f,p=t[r];switch(p){case 0:case 1:o=!1;case 4:case 3:return p;case 2:return o?3:2;case 7:return o=!0,1;case 8:return 4;case 9:return r<1||r+1>=t.length||2!=(l=n[r-1])&&3!=l||2!=(c=t[r+1])&&3!=c?4:(o&&(c=3),c==l?c:4);case 10:return 2==(l=r>0?n[r-1]:5)&&r+1<t.length&&2==t[r+1]?2:4;case u:if(r>0&&2==n[r-1])return 2;if(o)return 4;for(f=r+1,h=t.length;f<h&&t[f]==u;)f++;return f<h&&2==t[f]?2:4;case 12:for(h=t.length,f=r+1;f<h&&12==t[f];)f++;if(f<h){var g=e[r],m=g>=1425&&g<=2303||64286==g;if(l=t[f],m&&(1==l||7==l))return 1}return r<1||5==(l=t[r-1])?4:n[r-1];case 5:return o=!1,s=!0,i;case 6:return a=!0,4;case 13:case 14:case 16:case 17:case 15:o=!1;case d:return 4}}function m(e){var t=e.charCodeAt(0),n=t>>8;return 0==n?t>191?0:h[t]:5==n?/[\u0591-\u05f4]/.test(e)?1:0:6==n?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(e)?12:/[\u0660-\u0669\u066b-\u066c]/.test(e)?3:1642==t?u:/[\u06f0-\u06f9]/.test(e)?2:7:32==n&&t<=8287?f[255&t]:254==n&&t>=65136?7:4}t.L=0,t.R=1,t.EN=2,t.ON_R=3,t.AN=4,t.R_H=5,t.B=6,t.RLE=7,t.DOT="·",t.doBidiReorder=function(e,n,u){if(e.length<2)return{};var h=e.split(""),f=new Array(h.length),v=new Array(h.length),b=[];i=u?1:0,function(e,t,n,u){var d=i?c:l,h=null,f=null,p=null,v=0,b=null,y=-1,w=null,_=null,A=[];if(!u)for(w=0,u=[];w<n;w++)u[w]=m(e[w]);for(r=i,o=!1,s=!1,a=!1,_=0;_<n;_++){if(h=v,A[_]=f=g(e,u,A,_),b=240&(v=d[h][f]),v&=15,t[_]=p=d[v][5],b>0)if(16==b){for(w=y;w<_;w++)t[w]=1;y=-1}else y=-1;if(d[v][6])-1==y&&(y=_);else if(y>-1){for(w=y;w<_;w++)t[w]=p;y=-1}5==u[_]&&(t[_]=0),r|=p}if(a)for(w=0;w<n;w++)if(6==u[w]){t[w]=i;for(var x=w-1;x>=0&&8==u[x];x--)t[x]=i}}(h,b,h.length,n);for(var y=0;y<f.length;f[y]=y,y++);for(p(2,b,f),p(1,b,f),y=0;y<f.length-1;y++)3===n[y]?b[y]=t.AN:1===b[y]&&(n[y]>7&&n[y]<13||4===n[y]||n[y]===d)?b[y]=t.ON_R:y>0&&"ل"===h[y-1]&&/\u0622|\u0623|\u0625|\u0627/.test(h[y])&&(b[y-1]=b[y]=t.R_H,y++);for(h[h.length-1]===t.DOT&&(b[h.length-1]=t.B),""===h[0]&&(b[0]=t.RLE),y=0;y<f.length;y++)v[y]=b[f[y]];return{logicalFromVisual:f,bidiLevels:v}},t.hasBidiCharacters=function(e,t){for(var n=!1,i=0;i<e.length;i++)t[i]=m(e.charAt(i)),n||1!=t[i]&&7!=t[i]&&3!=t[i]||(n=!0);return n},t.getVisualFromLogicalIdx=function(e,t){for(var n=0;n<t.logicalFromVisual.length;n++)if(t.logicalFromVisual[n]==e)return n;return 0}})),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],(function(e,t,n){"use strict";var i=e("./lib/bidiutil"),r=e("./lib/lang"),o=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,s=function(e){this.session=e,this.bidiMap={},this.currentRow=null,this.bidiUtil=i,this.charWidths=[],this.EOL="¬",this.showInvisibles=!0,this.isRtlDir=!1,this.$isRtl=!1,this.line="",this.wrapIndent=0,this.EOF="¶",this.RLE="",this.contentWidth=0,this.fontMetrics=null,this.rtlLineOffset=0,this.wrapOffset=0,this.isMoveLeftOperation=!1,this.seenBidi=o.test(e.getValue())};(function(){this.isBidiRow=function(e,t,n){return!!this.seenBidi&&(e!==this.currentRow&&(this.currentRow=e,this.updateRowLine(t,n),this.updateBidiMap()),this.bidiMap.bidiLevels)},this.onChange=function(e){this.seenBidi?this.currentRow=null:"insert"==e.action&&o.test(e.lines.join("\n"))&&(this.seenBidi=!0,this.currentRow=null)},this.getDocumentRow=function(){var e=0,t=this.session.$screenRowCache;if(t.length){var n=this.session.$getRowCacheIndex(t,this.currentRow);n>=0&&(e=this.session.$docRowCache[n])}return e},this.getSplitIndex=function(){var e=0,t=this.session.$screenRowCache;if(t.length)for(var n,i=this.session.$getRowCacheIndex(t,this.currentRow);this.currentRow-e>0&&(n=this.session.$getRowCacheIndex(t,this.currentRow-e-1))===i;)i=n,e++;else e=this.currentRow;return e},this.updateRowLine=function(e,t){void 0===e&&(e=this.getDocumentRow());var n=e===this.session.getLength()-1?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(e),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var o=this.session.$wrapData[e];o&&(void 0===t&&(t=this.getSplitIndex()),t>0&&o.length?(this.wrapIndent=o.indent,this.wrapOffset=this.wrapIndent*this.charWidths[i.L],this.line=t<o.length?this.line.substring(o[t-1],o[t]):this.line.substring(o[o.length-1])):this.line=this.line.substring(0,o[t]),t==o.length&&(this.line+=this.showInvisibles?n:i.DOT))}else this.line+=this.showInvisibles?n:i.DOT;var s,a=this.session,l=0;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,(function(e,t){return"\t"===e||a.isFullWidth(e.charCodeAt(0))?(s="\t"===e?a.getScreenTabSize(t+l):2,l+=s-1,r.stringRepeat(i.DOT,s)):e})),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==i.DOT?this.line.substr(0,this.line.length-1):this.line,this.rtlLineOffset=this.contentWidth-this.fontMetrics.$main.getBoundingClientRect().width)},this.updateBidiMap=function(){var e=[];i.hasBidiCharacters(this.line,e)||this.isRtlDir?this.bidiMap=i.doBidiReorder(this.line,e,this.isRtlDir):this.bidiMap={}},this.markAsDirty=function(){this.currentRow=null},this.updateCharacterWidths=function(e){if(this.characterWidth!==e.$characterSize.width){this.fontMetrics=e;var t=this.characterWidth=e.$characterSize.width,n=e.$measureCharWidth("ה");this.charWidths[i.L]=this.charWidths[i.EN]=this.charWidths[i.ON_R]=t,this.charWidths[i.R]=this.charWidths[i.AN]=n,this.charWidths[i.R_H]=.45*n,this.charWidths[i.B]=this.charWidths[i.RLE]=0,this.currentRow=null}},this.setShowInvisibles=function(e){this.showInvisibles=e,this.currentRow=null},this.setEolChar=function(e){this.EOL=e},this.setContentWidth=function(e){this.contentWidth=e},this.isRtlLine=function(e){return!!this.$isRtl||(null!=e?this.session.getLine(e).charAt(0)==this.RLE:this.isRtlDir)},this.setRtlDirection=function(e,t){for(var n=e.getCursorPosition(),i=e.selection.getSelectionAnchor().row;i<=n.row;i++)t||e.session.getLine(i).charAt(0)!==e.session.$bidiHandler.RLE?t&&e.session.getLine(i).charAt(0)!==e.session.$bidiHandler.RLE&&e.session.doc.insert({column:0,row:i},e.session.$bidiHandler.RLE):e.session.doc.removeInLine(i,0,1)},this.getPosLeft=function(e){e-=this.wrapIndent;var t=this.line.charAt(0)===this.RLE?1:0,n=e>t?this.session.getOverwrite()?e:e-1:t,r=i.getVisualFromLogicalIdx(n,this.bidiMap),o=this.bidiMap.bidiLevels,s=0;!this.session.getOverwrite()&&e<=t&&o[r]%2!=0&&r++;for(var a=0;a<r;a++)s+=this.charWidths[o[a]];return!this.session.getOverwrite()&&e>t&&o[r]%2==0&&(s+=this.charWidths[o[r]]),this.wrapIndent&&(s+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(s+=this.rtlLineOffset),s},this.getSelections=function(e,t){var n,i=this.bidiMap,r=i.bidiLevels,o=[],s=0,a=Math.min(e,t)-this.wrapIndent,l=Math.max(e,t)-this.wrapIndent,c=!1,u=!1,d=0;this.wrapIndent&&(s+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var h,f=0;f<r.length;f++)h=i.logicalFromVisual[f],n=r[f],(c=h>=a&&h<l)&&!u?d=s:!c&&u&&o.push({left:d,width:s-d}),s+=this.charWidths[n],u=c;if(c&&f===r.length&&o.push({left:d,width:s-d}),this.isRtlDir)for(var p=0;p<o.length;p++)o[p].left+=this.rtlLineOffset;return o},this.offsetToCol=function(e){this.isRtlDir&&(e-=this.rtlLineOffset);var t=0,n=(e=Math.max(e,0),0),i=0,r=this.bidiMap.bidiLevels,o=this.charWidths[r[i]];for(this.wrapIndent&&(e-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);e>n+o/2;){if(n+=o,i===r.length-1){o=0;break}o=this.charWidths[r[++i]]}return i>0&&r[i-1]%2!=0&&r[i]%2==0?(e<n&&i--,t=this.bidiMap.logicalFromVisual[i]):i>0&&r[i-1]%2==0&&r[i]%2!=0?t=1+(e>n?this.bidiMap.logicalFromVisual[i]:this.bidiMap.logicalFromVisual[i-1]):this.isRtlDir&&i===r.length-1&&0===o&&r[i-1]%2==0||!this.isRtlDir&&0===i&&r[i]%2!=0?t=1+this.bidiMap.logicalFromVisual[i]:(i>0&&r[i-1]%2!=0&&0!==o&&i--,t=this.bidiMap.logicalFromVisual[i]),0===t&&this.isRtlDir&&t++,t+this.wrapIndent}}).call(s.prototype),t.BidiHandler=s})),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],(function(e,t,n){"use strict";var i=e("./lib/oop"),r=e("./lib/lang"),o=e("./lib/event_emitter").EventEmitter,s=e("./range").Range,a=function(e){this.session=e,this.doc=e.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var t=this;this.cursor.on("change",(function(e){t.$cursorChanged=!0,t.$silent||t._emit("changeCursor"),t.$isEmpty||t.$silent||t._emit("changeSelection"),t.$keepDesiredColumnOnChange||e.old.column==e.value.column||(t.$desiredColumn=null)})),this.anchor.on("change",(function(){t.$anchorChanged=!0,t.$isEmpty||t.$silent||t._emit("changeSelection")}))};(function(){i.implement(this,o),this.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},this.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},this.getCursor=function(){return this.lead.getPosition()},this.setSelectionAnchor=function(e,t){this.$isEmpty=!1,this.anchor.setPosition(e,t)},this.getAnchor=this.getSelectionAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},this.getSelectionLead=function(){return this.lead.getPosition()},this.isBackwards=function(){var e=this.anchor,t=this.lead;return e.row>t.row||e.row==t.row&&e.column>t.column},this.getRange=function(){var e=this.anchor,t=this.lead;return this.$isEmpty?s.fromPoints(t,t):this.isBackwards()?s.fromPoints(t,e):s.fromPoints(e,t)},this.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},this.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},this.setRange=this.setSelectionRange=function(e,t){var n=t?e.end:e.start,i=t?e.start:e.end;this.$setSelection(n.row,n.column,i.row,i.column)},this.$setSelection=function(e,t,n,i){if(!this.$silent){var r=this.$isEmpty,o=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(e,t),this.cursor.setPosition(n,i),this.$isEmpty=!s.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||r!=this.$isEmpty||o)&&this._emit("changeSelection")}},this.$moveSelection=function(e){var t=this.lead;this.$isEmpty&&this.setSelectionAnchor(t.row,t.column),e.call(this)},this.selectTo=function(e,t){this.$moveSelection((function(){this.moveCursorTo(e,t)}))},this.selectToPosition=function(e){this.$moveSelection((function(){this.moveCursorToPosition(e)}))},this.moveTo=function(e,t){this.clearSelection(),this.moveCursorTo(e,t)},this.moveToPosition=function(e){this.clearSelection(),this.moveCursorToPosition(e)},this.selectUp=function(){this.$moveSelection(this.moveCursorUp)},this.selectDown=function(){this.$moveSelection(this.moveCursorDown)},this.selectRight=function(){this.$moveSelection(this.moveCursorRight)},this.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},this.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},this.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},this.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},this.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},this.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},this.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},this.getWordRange=function(e,t){if(void 0===t){var n=e||this.lead;e=n.row,t=n.column}return this.session.getWordRange(e,t)},this.selectWord=function(){this.setSelectionRange(this.getWordRange())},this.selectAWord=function(){var e=this.getCursor(),t=this.session.getAWordRange(e.row,e.column);this.setSelectionRange(t)},this.getLineRange=function(e,t){var n,i="number"==typeof e?e:this.lead.row,r=this.session.getFoldLine(i);return r?(i=r.start.row,n=r.end.row):n=i,!0===t?new s(i,0,n,this.session.getLine(n).length):new s(i,0,n+1,0)},this.selectLine=function(){this.setSelectionRange(this.getLineRange())},this.moveCursorUp=function(){this.moveCursorBy(-1,0)},this.moveCursorDown=function(){this.moveCursorBy(1,0)},this.wouldMoveIntoSoftTab=function(e,t,n){var i=e.column,r=e.column+t;return n<0&&(i=e.column-t,r=e.column),this.session.isTabStop(e)&&this.doc.getLine(e.row).slice(i,r).split(" ").length-1==t},this.moveCursorLeft=function(){var e,t=this.lead.getPosition();if(e=this.session.getFoldAt(t.row,t.column,-1))this.moveCursorTo(e.start.row,e.start.column);else if(0===t.column)t.row>0&&this.moveCursorTo(t.row-1,this.doc.getLine(t.row-1).length);else{var n=this.session.getTabSize();this.wouldMoveIntoSoftTab(t,n,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-n):this.moveCursorBy(0,-1)}},this.moveCursorRight=function(){var e,t=this.lead.getPosition();if(e=this.session.getFoldAt(t.row,t.column,1))this.moveCursorTo(e.end.row,e.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0);else{var n=this.session.getTabSize();t=this.lead,this.wouldMoveIntoSoftTab(t,n,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,n):this.moveCursorBy(0,1)}},this.moveCursorLineStart=function(){var e=this.lead.row,t=this.lead.column,n=this.session.documentToScreenRow(e,t),i=this.session.screenToDocumentPosition(n,0),r=this.session.getDisplayLine(e,null,i.row,i.column).match(/^\s*/);r[0].length==t||this.session.$useEmacsStyleLineStart||(i.column+=r[0].length),this.moveCursorToPosition(i)},this.moveCursorLineEnd=function(){var e=this.lead,t=this.session.getDocumentLastRowColumnPosition(e.row,e.column);if(this.lead.column==t.column){var n=this.session.getLine(t.row);if(t.column==n.length){var i=n.search(/\s+$/);i>0&&(t.column=i)}}this.moveCursorTo(t.row,t.column)},this.moveCursorFileEnd=function(){var e=this.doc.getLength()-1,t=this.doc.getLine(e).length;this.moveCursorTo(e,t)},this.moveCursorFileStart=function(){this.moveCursorTo(0,0)},this.moveCursorLongWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),i=n.substring(t);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var r=this.session.getFoldAt(e,t,1);if(r)this.moveCursorTo(r.end.row,r.end.column);else{if(this.session.nonTokenRe.exec(i)&&(t+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,i=n.substring(t)),t>=n.length)return this.moveCursorTo(e,n.length),this.moveCursorRight(),void(e<this.doc.getLength()-1&&this.moveCursorWordRight());this.session.tokenRe.exec(i)&&(t+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(e,t)}},this.moveCursorLongWordLeft=function(){var e,t=this.lead.row,n=this.lead.column;if(e=this.session.getFoldAt(t,n,-1))this.moveCursorTo(e.start.row,e.start.column);else{var i=this.session.getFoldStringAt(t,n,-1);null==i&&(i=this.doc.getLine(t).substring(0,n));var o=r.stringReverse(i);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(o)&&(n-=this.session.nonTokenRe.lastIndex,o=o.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),n<=0)return this.moveCursorTo(t,0),this.moveCursorLeft(),void(t>0&&this.moveCursorWordLeft());this.session.tokenRe.exec(o)&&(n-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(t,n)}},this.$shortWordEndIndex=function(e){var t,n=0,i=/\s/,r=this.session.tokenRe;if(r.lastIndex=0,this.session.tokenRe.exec(e))n=this.session.tokenRe.lastIndex;else{for(;(t=e[n])&&i.test(t);)n++;if(n<1)for(r.lastIndex=0;(t=e[n])&&!r.test(t);)if(r.lastIndex=0,n++,i.test(t)){if(n>2){n--;break}for(;(t=e[n])&&i.test(t);)n++;if(n>2)break}}return r.lastIndex=0,n},this.moveCursorShortWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),i=n.substring(t),r=this.session.getFoldAt(e,t,1);if(r)return this.moveCursorTo(r.end.row,r.end.column);if(t==n.length){var o=this.doc.getLength();do{e++,i=this.doc.getLine(e)}while(e<o&&/^\s*$/.test(i));/^\s+/.test(i)||(i=""),t=0}var s=this.$shortWordEndIndex(i);this.moveCursorTo(e,t+s)},this.moveCursorShortWordLeft=function(){var e,t=this.lead.row,n=this.lead.column;if(e=this.session.getFoldAt(t,n,-1))return this.moveCursorTo(e.start.row,e.start.column);var i=this.session.getLine(t).substring(0,n);if(0===n){do{t--,i=this.doc.getLine(t)}while(t>0&&/^\s*$/.test(i));n=i.length,/\s+$/.test(i)||(i="")}var o=r.stringReverse(i),s=this.$shortWordEndIndex(o);return this.moveCursorTo(t,n-s)},this.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},this.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},this.moveCursorBy=function(e,t){var n,i=this.session.documentToScreenPosition(this.lead.row,this.lead.column);if(0===t&&(0!==e&&(this.session.$bidiHandler.isBidiRow(i.row,this.lead.row)?(n=this.session.$bidiHandler.getPosLeft(i.column),i.column=Math.round(n/this.session.$bidiHandler.charWidths[0])):n=i.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?i.column=this.$desiredColumn:this.$desiredColumn=i.column),0!=e&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var r=this.session.lineWidgets[this.lead.row];e<0?e-=r.rowsAbove||0:e>0&&(e+=r.rowCount-(r.rowsAbove||0))}var o=this.session.screenToDocumentPosition(i.row+e,i.column,n);0!==e&&0===t&&o.row===this.lead.row&&(o.column,this.lead.column),this.moveCursorTo(o.row,o.column+t,0===t)},this.moveCursorToPosition=function(e){this.moveCursorTo(e.row,e.column)},this.moveCursorTo=function(e,t,n){var i=this.session.getFoldAt(e,t,1);i&&(e=i.start.row,t=i.start.column),this.$keepDesiredColumnOnChange=!0;var r=this.session.getLine(e);/[\uDC00-\uDFFF]/.test(r.charAt(t))&&r.charAt(t-1)&&(this.lead.row==e&&this.lead.column==t+1?t-=1:t+=1),this.lead.setPosition(e,t),this.$keepDesiredColumnOnChange=!1,n||(this.$desiredColumn=null)},this.moveCursorToScreen=function(e,t,n){var i=this.session.screenToDocumentPosition(e,t);this.moveCursorTo(i.row,i.column,n)},this.detach=function(){this.lead.detach(),this.anchor.detach()},this.fromOrientedRange=function(e){this.setSelectionRange(e,e.cursor==e.start),this.$desiredColumn=e.desiredColumn||this.$desiredColumn},this.toOrientedRange=function(e){var t=this.getRange();return e?(e.start.column=t.start.column,e.start.row=t.start.row,e.end.column=t.end.column,e.end.row=t.end.row):e=t,e.cursor=this.isBackwards()?e.start:e.end,e.desiredColumn=this.$desiredColumn,e},this.getRangeOfMovements=function(e){var t=this.getCursor();try{e(this);var n=this.getCursor();return s.fromPoints(t,n)}catch(e){return s.fromPoints(t,t)}finally{this.moveCursorToPosition(t)}},this.toJSON=function(){if(this.rangeCount)var e=this.ranges.map((function(e){var t=e.clone();return t.isBackwards=e.cursor==e.start,t}));else(e=this.getRange()).isBackwards=this.isBackwards();return e},this.fromJSON=function(e){if(null==e.start){if(this.rangeList&&e.length>1){this.toSingleRange(e[0]);for(var t=e.length;t--;){var n=s.fromPoints(e[t].start,e[t].end);e[t].isBackwards&&(n.cursor=n.start),this.addRange(n,!0)}return}e=e[0]}this.rangeList&&this.toSingleRange(e),this.setSelectionRange(e,e.isBackwards)},this.isEqual=function(e){if((e.length||this.rangeCount)&&e.length!=this.rangeCount)return!1;if(!e.length||!this.ranges)return this.getRange().isEqual(e);for(var t=this.ranges.length;t--;)if(!this.ranges[t].isEqual(e[t]))return!1;return!0}}).call(a.prototype),t.Selection=a})),ace.define("ace/tokenizer",["require","exports","module","ace/config"],(function(e,t,n){"use strict";var i=e("./config"),r=2e3,o=function(e){for(var t in this.states=e,this.regExps={},this.matchMappings={},this.states){for(var n=this.states[t],i=[],r=0,o=this.matchMappings[t]={defaultToken:"text"},s="g",a=[],l=0;l<n.length;l++){var c=n[l];if(c.defaultToken&&(o.defaultToken=c.defaultToken),c.caseInsensitive&&-1===s.indexOf("i")&&(s+="i"),c.unicode&&-1===s.indexOf("u")&&(s+="u"),null!=c.regex){c.regex instanceof RegExp&&(c.regex=c.regex.toString().slice(1,-1));var u=c.regex,d=new RegExp("(?:("+u+")|(.))").exec("a").length-2;Array.isArray(c.token)?1==c.token.length||1==d?c.token=c.token[0]:d-1!=c.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:c,groupCount:d-1}),c.token=c.token[0]):(c.tokenArray=c.token,c.token=null,c.onMatch=this.$arrayTokens):"function"!=typeof c.token||c.onMatch||(c.onMatch=d>1?this.$applyToken:c.token),d>1&&(/\\\d/.test(c.regex)?u=c.regex.replace(/\\([0-9]+)/g,(function(e,t){return"\\"+(parseInt(t,10)+r+1)})):(d=1,u=this.removeCapturingGroups(c.regex)),c.splitRegex||"string"==typeof c.token||a.push(c)),o[r]=l,r+=d,i.push(u),c.onMatch||(c.onMatch=null)}}i.length||(o[0]=0,i.push("$")),a.forEach((function(e){e.splitRegex=this.createSplitterRegexp(e.regex,s)}),this),this.regExps[t]=new RegExp("("+i.join(")|(")+")|($)",s)}};(function(){this.$setMaxTokenCount=function(e){r=0|e},this.$applyToken=function(e){var t=this.splitRegex.exec(e).slice(1),n=this.token.apply(this,t);if("string"==typeof n)return[{type:n,value:e}];for(var i=[],r=0,o=n.length;r<o;r++)t[r]&&(i[i.length]={type:n[r],value:t[r]});return i},this.$arrayTokens=function(e){if(!e)return[];var t=this.splitRegex.exec(e);if(!t)return"text";for(var n=[],i=this.tokenArray,r=0,o=i.length;r<o;r++)t[r+1]&&(n[n.length]={type:i[r],value:t[r+1]});return n},this.removeCapturingGroups=function(e){return e.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,(function(e,t){return t?"(?:":e}))},this.createSplitterRegexp=function(e,t){if(-1!=e.indexOf("(?=")){var n=0,i=!1,r={};e.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,(function(e,t,o,s,a,l){return i?i="]"!=a:a?i=!0:s?(n==r.stack&&(r.end=l+1,r.stack=-1),n--):o&&(n++,1!=o.length&&(r.stack=n,r.start=l)),e})),null!=r.end&&/^\)*$/.test(e.substr(r.end))&&(e=e.substring(0,r.start)+e.substr(r.end))}return"^"!=e.charAt(0)&&(e="^"+e),"$"!=e.charAt(e.length-1)&&(e+="$"),new RegExp(e,(t||"").replace("g",""))},this.getLineTokens=function(e,t){if(t&&"string"!=typeof t){var n=t.slice(0);"#tmp"===(t=n[0])&&(n.shift(),t=n.shift())}else n=[];var i=t||"start",o=this.states[i];o||(i="start",o=this.states[i]);var s=this.matchMappings[i],a=this.regExps[i];a.lastIndex=0;for(var l,c=[],u=0,d=0,h={type:null,value:""};l=a.exec(e);){var f=s.defaultToken,p=null,g=l[0],m=a.lastIndex;if(m-g.length>u){var v=e.substring(u,m-g.length);h.type==f?h.value+=v:(h.type&&c.push(h),h={type:f,value:v})}for(var b=0;b<l.length-2;b++)if(void 0!==l[b+1]){f=(p=o[s[b]]).onMatch?p.onMatch(g,i,n,e):p.token,p.next&&(i="string"==typeof p.next?p.next:p.next(i,n),(o=this.states[i])||(this.reportError("state doesn't exist",i),i="start",o=this.states[i]),s=this.matchMappings[i],u=m,(a=this.regExps[i]).lastIndex=m),p.consumeLineEnd&&(u=m);break}if(g)if("string"==typeof f)p&&!1===p.merge||h.type!==f?(h.type&&c.push(h),h={type:f,value:g}):h.value+=g;else if(f)for(h.type&&c.push(h),h={type:null,value:""},b=0;b<f.length;b++)c.push(f[b]);if(u==e.length)break;if(u=m,d++>r){for(d>2*e.length&&this.reportError("infinite loop with in ace tokenizer",{startState:t,line:e});u<e.length;)h.type&&c.push(h),h={value:e.substring(u,u+=500),type:"overflow"};i="start",n=[];break}}return h.type&&c.push(h),n.length>1&&n[0]!==i&&n.unshift("#tmp",i),{tokens:c,state:n.length?n:i}},this.reportError=i.reportError}).call(o.prototype),t.Tokenizer=o})),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"],(function(e,t,n){"use strict";var i=e("../lib/lang"),r=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}};(function(){this.addRules=function(e,t){if(t)for(var n in e){for(var i=e[n],r=0;r<i.length;r++){var o=i[r];(o.next||o.onMatch)&&("string"==typeof o.next&&0!==o.next.indexOf(t)&&(o.next=t+o.next),o.nextState&&0!==o.nextState.indexOf(t)&&(o.nextState=t+o.nextState))}this.$rules[t+n]=i}else for(var n in e)this.$rules[n]=e[n]},this.getRules=function(){return this.$rules},this.embedRules=function(e,t,n,r,o){var s="function"==typeof e?(new e).getRules():e;if(r)for(var a=0;a<r.length;a++)r[a]=t+r[a];else for(var l in r=[],s)r.push(t+l);if(this.addRules(s,t),n){var c=Array.prototype[o?"push":"unshift"];for(a=0;a<r.length;a++)c.apply(this.$rules[r[a]],i.deepCopy(n))}this.$embeds||(this.$embeds=[]),this.$embeds.push(t)},this.getEmbeds=function(){return this.$embeds};var e=function(e,t){return("start"!=e||t.length)&&t.unshift(this.nextState,e),this.nextState},t=function(e,t){return t.shift(),t.shift()||"start"};this.normalizeRules=function(){var n=0,i=this.$rules;Object.keys(i).forEach((function r(o){var s=i[o];s.processed=!0;for(var a=0;a<s.length;a++){var l=s[a],c=null;Array.isArray(l)&&(c=l,l={}),!l.regex&&l.start&&(l.regex=l.start,l.next||(l.next=[]),l.next.push({defaultToken:l.token},{token:l.token+".end",regex:l.end||l.start,next:"pop"}),l.token=l.token+".start",l.push=!0);var u=l.next||l.push;if(u&&Array.isArray(u)){var d=l.stateName;d||("string"!=typeof(d=l.token)&&(d=d[0]||""),i[d]&&(d+=n++)),i[d]=u,l.next=d,r(d)}else"pop"==u&&(l.next=t);if(l.push&&(l.nextState=l.next||l.push,l.next=e,delete l.push),l.rules)for(var h in l.rules)i[h]?i[h].push&&i[h].push.apply(i[h],l.rules[h]):i[h]=l.rules[h];var f="string"==typeof l?l:l.include;if(f&&(c=Array.isArray(f)?f.map((function(e){return i[e]})):i[f]),c){var p=[a,1].concat(c);l.noEscape&&(p=p.filter((function(e){return!e.next}))),s.splice.apply(s,p),a--}l.keywordMap&&(l.token=this.createKeywordMapper(l.keywordMap,l.defaultToken||"text",l.caseInsensitive),delete l.defaultToken)}}),this)},this.createKeywordMapper=function(e,t,n,i){var r=Object.create(null);return this.$keywordList=[],Object.keys(e).forEach((function(t){for(var o=e[t].split(i||"|"),s=o.length;s--;){var a=o[s];this.$keywordList.push(a),n&&(a=a.toLowerCase()),r[a]=t}}),this),e=null,n?function(e){return r[e.toLowerCase()]||t}:function(e){return r[e]||t}},this.getKeywords=function(){return this.$keywords}}).call(r.prototype),t.TextHighlightRules=r})),ace.define("ace/mode/behaviour",["require","exports","module"],(function(e,t,n){"use strict";var i=function(){this.$behaviours={}};(function(){this.add=function(e,t,n){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[e]:this.$behaviours[e]={}}this.$behaviours[e][t]=n},this.addBehaviours=function(e){for(var t in e)for(var n in e[t])this.add(t,n,e[t][n])},this.remove=function(e){this.$behaviours&&this.$behaviours[e]&&delete this.$behaviours[e]},this.inherit=function(e,t){if("function"==typeof e)var n=(new e).getBehaviours(t);else n=e.getBehaviours(t);this.addBehaviours(n)},this.getBehaviours=function(e){if(e){for(var t={},n=0;n<e.length;n++)this.$behaviours[e[n]]&&(t[e[n]]=this.$behaviours[e[n]]);return t}return this.$behaviours}}).call(i.prototype),t.Behaviour=i})),ace.define("ace/token_iterator",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var i=e("./range").Range,r=function(e,t,n){this.$session=e,this.$row=t,this.$rowTokens=e.getTokens(t);var i=e.getTokenAt(t,n);this.$tokenIndex=i?i.index:-1};(function(){this.stepBackward=function(){for(this.$tokenIndex-=1;this.$tokenIndex<0;){if(this.$row-=1,this.$row<0)return this.$row=0,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=this.$rowTokens.length-1}return this.$rowTokens[this.$tokenIndex]},this.stepForward=function(){var e;for(this.$tokenIndex+=1;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,e||(e=this.$session.getLength()),this.$row>=e)return this.$row=e-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},this.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},this.getCurrentTokenRow=function(){return this.$row},this.getCurrentTokenColumn=function(){var e=this.$rowTokens,t=this.$tokenIndex,n=e[t].start;if(void 0!==n)return n;for(n=0;t>0;)n+=e[t-=1].value.length;return n},this.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},this.getCurrentTokenRange=function(){var e=this.$rowTokens[this.$tokenIndex],t=this.getCurrentTokenColumn();return new i(this.$row,t,this.$row,t+e.value.length)}}).call(r.prototype),t.TokenIterator=r})),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],(function(e,t,n){"use strict";var i,r=e("../../lib/oop"),o=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,a=e("../../lib/lang"),l=["text","paren.rparen","rparen","paren","punctuation.operator"],c=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],u={},d={'"':'"',"'":"'"},h=function(e){var t=-1;if(e.multiSelect&&(t=e.selection.index,u.rangeCount!=e.multiSelect.rangeCount&&(u={rangeCount:e.multiSelect.rangeCount})),u[t])return i=u[t];i=u[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},f=function(e,t,n,i){var r=e.end.row-e.start.row;return{text:n+t+i,selection:[0,e.start.column+1,r,e.end.column+(r?0:1)]}},p=function(e){this.add("braces","insertion",(function(t,n,r,o,s){var l=r.getCursorPosition(),c=o.doc.getLine(l.row);if("{"==s){h(r);var u=r.getSelectionRange(),d=o.doc.getTextRange(u);if(""!==d&&"{"!==d&&r.getWrapBehavioursEnabled())return f(u,d,"{","}");if(p.isSaneInsertion(r,o))return/[\]\}\)]/.test(c[l.column])||r.inMultiSelectMode||e&&e.braces?(p.recordAutoInsert(r,o,"}"),{text:"{}",selection:[1,1]}):(p.recordMaybeInsert(r,o,"{"),{text:"{",selection:[1,1]})}else if("}"==s){if(h(r),"}"==c.substring(l.column,l.column+1)&&null!==o.$findOpeningBracket("}",{column:l.column+1,row:l.row})&&p.isAutoInsertedClosing(l,c,s))return p.popAutoInsertedClosing(),{text:"",selection:[1,1]}}else{if("\n"==s||"\r\n"==s){h(r);var g="";if(p.isMaybeInsertedClosing(l,c)&&(g=a.stringRepeat("}",i.maybeInsertedBrackets),p.clearMaybeInsertedClosing()),"}"===c.substring(l.column,l.column+1)){var m=o.findMatchingBracket({row:l.row,column:l.column+1},"}");if(!m)return null;var v=this.$getIndent(o.getLine(m.row))}else{if(!g)return void p.clearMaybeInsertedClosing();v=this.$getIndent(c)}var b=v+o.getTabString();return{text:"\n"+b+"\n"+v+g,selection:[1,b.length,1,b.length]}}p.clearMaybeInsertedClosing()}})),this.add("braces","deletion",(function(e,t,n,r,o){var s=r.doc.getTextRange(o);if(!o.isMultiLine()&&"{"==s){if(h(n),"}"==r.doc.getLine(o.start.row).substring(o.end.column,o.end.column+1))return o.end.column++,o;i.maybeInsertedBrackets--}})),this.add("parens","insertion",(function(e,t,n,i,r){if("("==r){h(n);var o=n.getSelectionRange(),s=i.doc.getTextRange(o);if(""!==s&&n.getWrapBehavioursEnabled())return f(o,s,"(",")");if(p.isSaneInsertion(n,i))return p.recordAutoInsert(n,i,")"),{text:"()",selection:[1,1]}}else if(")"==r){h(n);var a=n.getCursorPosition(),l=i.doc.getLine(a.row);if(")"==l.substring(a.column,a.column+1)&&null!==i.$findOpeningBracket(")",{column:a.column+1,row:a.row})&&p.isAutoInsertedClosing(a,l,r))return p.popAutoInsertedClosing(),{text:"",selection:[1,1]}}})),this.add("parens","deletion",(function(e,t,n,i,r){var o=i.doc.getTextRange(r);if(!r.isMultiLine()&&"("==o&&(h(n),")"==i.doc.getLine(r.start.row).substring(r.start.column+1,r.start.column+2)))return r.end.column++,r})),this.add("brackets","insertion",(function(e,t,n,i,r){if("["==r){h(n);var o=n.getSelectionRange(),s=i.doc.getTextRange(o);if(""!==s&&n.getWrapBehavioursEnabled())return f(o,s,"[","]");if(p.isSaneInsertion(n,i))return p.recordAutoInsert(n,i,"]"),{text:"[]",selection:[1,1]}}else if("]"==r){h(n);var a=n.getCursorPosition(),l=i.doc.getLine(a.row);if("]"==l.substring(a.column,a.column+1)&&null!==i.$findOpeningBracket("]",{column:a.column+1,row:a.row})&&p.isAutoInsertedClosing(a,l,r))return p.popAutoInsertedClosing(),{text:"",selection:[1,1]}}})),this.add("brackets","deletion",(function(e,t,n,i,r){var o=i.doc.getTextRange(r);if(!r.isMultiLine()&&"["==o&&(h(n),"]"==i.doc.getLine(r.start.row).substring(r.start.column+1,r.start.column+2)))return r.end.column++,r})),this.add("string_dquotes","insertion",(function(e,t,n,i,r){var o=i.$mode.$quotes||d;if(1==r.length&&o[r]){if(this.lineCommentStart&&-1!=this.lineCommentStart.indexOf(r))return;h(n);var s=r,a=n.getSelectionRange(),l=i.doc.getTextRange(a);if(!(""===l||1==l.length&&o[l])&&n.getWrapBehavioursEnabled())return f(a,l,s,s);if(!l){var c=n.getCursorPosition(),u=i.doc.getLine(c.row),p=u.substring(c.column-1,c.column),g=u.substring(c.column,c.column+1),m=i.getTokenAt(c.row,c.column),v=i.getTokenAt(c.row,c.column+1);if("\\"==p&&m&&/escape/.test(m.type))return null;var b,y=m&&/string|escape/.test(m.type),w=!v||/string|escape/.test(v.type);if(g==s)(b=y!==w)&&/string\.end/.test(v.type)&&(b=!1);else{if(y&&!w)return null;if(y&&w)return null;var _=i.$mode.tokenRe;_.lastIndex=0;var A=_.test(p);_.lastIndex=0;var x=_.test(p);if(A||x)return null;if(g&&!/[\s;,.})\]\\]/.test(g))return null;var C=u[c.column-2];if(p==s&&(C==s||_.test(C)))return null;b=!0}return{text:b?s+s:"",selection:[1,1]}}}})),this.add("string_dquotes","deletion",(function(e,t,n,i,r){var o=i.$mode.$quotes||d,s=i.doc.getTextRange(r);if(!r.isMultiLine()&&o.hasOwnProperty(s)&&(h(n),i.doc.getLine(r.start.row).substring(r.start.column+1,r.start.column+2)==s))return r.end.column++,r}))};p.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),i=new s(t,n.row,n.column);if(!this.$matchTokenType(i.getCurrentToken()||"text",l)){if(/[)}\]]/.test(e.session.getLine(n.row)[n.column]))return!0;var r=new s(t,n.row,n.column+1);if(!this.$matchTokenType(r.getCurrentToken()||"text",l))return!1}return i.stepForward(),i.getCurrentTokenRow()!==n.row||this.$matchTokenType(i.getCurrentToken()||"text",c)},p.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},p.recordAutoInsert=function(e,t,n){var r=e.getCursorPosition(),o=t.doc.getLine(r.row);this.isAutoInsertedClosing(r,o,i.autoInsertedLineEnd[0])||(i.autoInsertedBrackets=0),i.autoInsertedRow=r.row,i.autoInsertedLineEnd=n+o.substr(r.column),i.autoInsertedBrackets++},p.recordMaybeInsert=function(e,t,n){var r=e.getCursorPosition(),o=t.doc.getLine(r.row);this.isMaybeInsertedClosing(r,o)||(i.maybeInsertedBrackets=0),i.maybeInsertedRow=r.row,i.maybeInsertedLineStart=o.substr(0,r.column)+n,i.maybeInsertedLineEnd=o.substr(r.column),i.maybeInsertedBrackets++},p.isAutoInsertedClosing=function(e,t,n){return i.autoInsertedBrackets>0&&e.row===i.autoInsertedRow&&n===i.autoInsertedLineEnd[0]&&t.substr(e.column)===i.autoInsertedLineEnd},p.isMaybeInsertedClosing=function(e,t){return i.maybeInsertedBrackets>0&&e.row===i.maybeInsertedRow&&t.substr(e.column)===i.maybeInsertedLineEnd&&t.substr(0,e.column)==i.maybeInsertedLineStart},p.popAutoInsertedClosing=function(){i.autoInsertedLineEnd=i.autoInsertedLineEnd.substr(1),i.autoInsertedBrackets--},p.clearMaybeInsertedClosing=function(){i&&(i.maybeInsertedBrackets=0,i.maybeInsertedRow=-1)},r.inherits(p,o),t.CstyleBehaviour=p})),ace.define("ace/unicode",["require","exports","module"],(function(e,t,n){"use strict";for(var i=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],r=0,o=[],s=0;s<i.length;s+=2)o.push(r+=i[s]),i[s+1]&&o.push(45,r+=i[s+1]);t.wordChars=String.fromCharCode.apply(null,o)})),ace.define("ace/mode/text",["require","exports","module","ace/config","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour/cstyle","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],(function(e,t,n){"use strict";var i=e("../config"),r=e("../tokenizer").Tokenizer,o=e("./text_highlight_rules").TextHighlightRules,s=e("./behaviour/cstyle").CstyleBehaviour,a=e("../unicode"),l=e("../lib/lang"),c=e("../token_iterator").TokenIterator,u=e("../range").Range,d=function(){this.HighlightRules=o};(function(){this.$defaultBehaviour=new s,this.tokenRe=new RegExp("^["+a.wordChars+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+a.wordChars+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new r(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(e,t,n,i){var r=t.doc,o=!0,s=!0,a=1/0,c=t.getTabSize(),u=!1;if(this.lineCommentStart){Array.isArray(this.lineCommentStart)?(g=this.lineCommentStart.map(l.escapeRegExp).join("|"),f=this.lineCommentStart[0]):(g=l.escapeRegExp(this.lineCommentStart),f=this.lineCommentStart),g=new RegExp("^(\\s*)(?:"+g+") ?"),u=t.getUseSoftTabs(),b=function(e,t){var n=e.match(g);if(n){var i=n[1].length,o=n[0].length;h(e,i,o)||" "!=n[0][o-1]||o--,r.removeInLine(t,i,o)}};var d=f+" ",h=(v=function(e,t){o&&!/\S/.test(e)||(h(e,a,a)?r.insertInLine({row:t,column:a},d):r.insertInLine({row:t,column:a},f))},y=function(e,t){return g.test(e)},function(e,t,n){for(var i=0;t--&&" "==e.charAt(t);)i++;if(i%c!=0)return!1;for(i=0;" "==e.charAt(n++);)i++;return c>2?i%c!=c-1:i%c==0})}else{if(!this.blockComment)return!1;var f=this.blockComment.start,p=this.blockComment.end,g=new RegExp("^(\\s*)(?:"+l.escapeRegExp(f)+")"),m=new RegExp("(?:"+l.escapeRegExp(p)+")\\s*$"),v=function(e,t){y(e,t)||o&&!/\S/.test(e)||(r.insertInLine({row:t,column:e.length},p),r.insertInLine({row:t,column:a},f))},b=function(e,t){var n;(n=e.match(m))&&r.removeInLine(t,e.length-n[0].length,e.length),(n=e.match(g))&&r.removeInLine(t,n[1].length,n[0].length)},y=function(e,n){if(g.test(e))return!0;for(var i=t.getTokens(n),r=0;r<i.length;r++)if("comment"===i[r].type)return!0}}function w(e){for(var t=n;t<=i;t++)e(r.getLine(t),t)}var _=1/0;w((function(e,t){var n=e.search(/\S/);-1!==n?(n<a&&(a=n),s&&!y(e,t)&&(s=!1)):_>e.length&&(_=e.length)})),a==1/0&&(a=_,o=!1,s=!1),u&&a%c!=0&&(a=Math.floor(a/c)*c),w(s?b:v)},this.toggleBlockComment=function(e,t,n,i){var r=this.blockComment;if(r){!r.start&&r[0]&&(r=r[0]);var o,s,a=(g=new c(t,i.row,i.column)).getCurrentToken(),l=(t.selection,t.selection.toOrientedRange());if(a&&/comment/.test(a.type)){for(var d,h;a&&/comment/.test(a.type);){if(-1!=(m=a.value.indexOf(r.start))){var f=g.getCurrentTokenRow(),p=g.getCurrentTokenColumn()+m;d=new u(f,p,f,p+r.start.length);break}a=g.stepBackward()}var g;for(a=(g=new c(t,i.row,i.column)).getCurrentToken();a&&/comment/.test(a.type);){var m;if(-1!=(m=a.value.indexOf(r.end))){f=g.getCurrentTokenRow(),p=g.getCurrentTokenColumn()+m,h=new u(f,p,f,p+r.end.length);break}a=g.stepForward()}h&&t.remove(h),d&&(t.remove(d),o=d.start.row,s=-r.start.length)}else s=r.start.length,o=n.start.row,t.insert(n.end,r.end),t.insert(n.start,r.start);l.start.row==o&&(l.start.column+=s),l.end.row==o&&(l.end.column+=s),t.selection.fromOrientedRange(l)}},this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.autoOutdent=function(e,t,n){},this.$getIndent=function(e){return e.match(/^\s*/)[0]},this.createWorker=function(e){return null},this.createModeDelegates=function(e){for(var t in this.$embeds=[],this.$modes={},e)if(e[t]){var n=e[t],r=n.prototype.$id,o=i.$modes[r];o||(i.$modes[r]=o=new n),i.$modes[t]||(i.$modes[t]=o),this.$embeds.push(t),this.$modes[t]=o}var s=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"];for(t=0;t<s.length;t++)!function(e){var n=s[t],i=e[n];e[s[t]]=function(){return this.$delegator(n,arguments,i)}}(this)},this.$delegator=function(e,t,n){var i=t[0]||"start";if("string"!=typeof i){if(Array.isArray(i[2])){var r=i[2][i[2].length-1];if(s=this.$modes[r])return s[e].apply(s,[i[1]].concat([].slice.call(t,1)))}i=i[0]||"start"}for(var o=0;o<this.$embeds.length;o++)if(this.$modes[this.$embeds[o]]){var s,a=i.split(this.$embeds[o]);if(!a[0]&&a[1])return t[0]=a[1],(s=this.$modes[this.$embeds[o]])[e].apply(s,t)}var l=n.apply(this,t);return n?l:void 0},this.transformAction=function(e,t,n,i,r){if(this.$behaviour){var o=this.$behaviour.getBehaviours();for(var s in o)if(o[s][t]){var a=o[s][t].apply(this,arguments);if(a)return a}}},this.getKeywords=function(e){if(!this.completionKeywords){var t=this.$tokenizer.rules,n=[];for(var i in t)for(var r=t[i],o=0,s=r.length;o<s;o++)if("string"==typeof r[o].token)/keyword|support|storage/.test(r[o].token)&&n.push(r[o].regex);else if("object"==typeof r[o].token)for(var a=0,l=r[o].token.length;a<l;a++)/keyword|support|storage/.test(r[o].token[a])&&(i=r[o].regex.match(/\(.+?\)/g)[a],n.push(i.substr(1,i.length-2)));this.completionKeywords=n}return e?n.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(e,t,n,i){return(this.$keywordList||this.$createKeywordList()).map((function(e){return{name:e,value:e,score:0,meta:"keyword"}}))},this.$id="ace/mode/text"}).call(d.prototype),t.Mode=d})),ace.define("ace/apply_delta",["require","exports","module"],(function(e,t,n){"use strict";t.applyDelta=function(e,t,n){var i=t.start.row,r=t.start.column,o=e[i]||"";switch(t.action){case"insert":if(1===t.lines.length)e[i]=o.substring(0,r)+t.lines[0]+o.substring(r);else{var s=[i,1].concat(t.lines);e.splice.apply(e,s),e[i]=o.substring(0,r)+e[i],e[i+t.lines.length-1]+=o.substring(r)}break;case"remove":var a=t.end.column,l=t.end.row;i===l?e[i]=o.substring(0,r)+o.substring(a):e.splice(i,l-i+1,o.substring(0,r)+e[l].substring(a))}}})),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],(function(e,t,n){"use strict";var i=e("./lib/oop"),r=e("./lib/event_emitter").EventEmitter,o=t.Anchor=function(e,t,n){this.$onChange=this.onChange.bind(this),this.attach(e),void 0===n?this.setPosition(t.row,t.column):this.setPosition(t,n)};(function(){function e(e,t,n){var i=n?e.column<=t.column:e.column<t.column;return e.row<t.row||e.row==t.row&&i}i.implement(this,r),this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){return this.document},this.$insertRight=!1,this.onChange=function(t){if(!(t.start.row==t.end.row&&t.start.row!=this.row||t.start.row>this.row)){var n=function(t,n,i){var r="insert"==t.action,o=(r?1:-1)*(t.end.row-t.start.row),s=(r?1:-1)*(t.end.column-t.start.column),a=t.start,l=r?a:t.end;return e(n,a,i)?{row:n.row,column:n.column}:e(l,n,!i)?{row:n.row+o,column:n.column+(n.row==l.row?s:0)}:{row:a.row,column:a.column}}(t,{row:this.row,column:this.column},this.$insertRight);this.setPosition(n.row,n.column,!0)}},this.setPosition=function(e,t,n){var i;if(i=n?{row:e,column:t}:this.$clipPositionToDocument(e,t),this.row!=i.row||this.column!=i.column){var r={row:this.row,column:this.column};this.row=i.row,this.column=i.column,this._signal("change",{old:r,value:i})}},this.detach=function(){this.document.off("change",this.$onChange)},this.attach=function(e){this.document=e||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(e,t){var n={};return e>=this.document.getLength()?(n.row=Math.max(0,this.document.getLength()-1),n.column=this.document.getLine(n.row).length):e<0?(n.row=0,n.column=0):(n.row=e,n.column=Math.min(this.document.getLine(n.row).length,Math.max(0,t))),t<0&&(n.column=0),n}}).call(o.prototype)})),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],(function(e,t,n){"use strict";var i=e("./lib/oop"),r=e("./apply_delta").applyDelta,o=e("./lib/event_emitter").EventEmitter,s=e("./range").Range,a=e("./anchor").Anchor,l=function(e){this.$lines=[""],0===e.length?this.$lines=[""]:Array.isArray(e)?this.insertMergedLines({row:0,column:0},e):this.insert({row:0,column:0},e)};(function(){i.implement(this,o),this.setValue=function(e){var t=this.getLength()-1;this.remove(new s(0,0,t,this.getLine(t).length)),this.insert({row:0,column:0},e||"")},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(e,t){return new a(this,e,t)},0==="aaa".split(/a/).length?this.$split=function(e){return e.replace(/\r\n|\r/g,"\n").split("\n")}:this.$split=function(e){return e.split(/\r\n|\r|\n/)},this.$detectNewLine=function(e){var t=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:"\n",this._signal("changeNewLineMode")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(e){this.$newLineMode!==e&&(this.$newLineMode=e,this._signal("changeNewLineMode"))},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(e){return"\r\n"==e||"\r"==e||"\n"==e},this.getLine=function(e){return this.$lines[e]||""},this.getLines=function(e,t){return this.$lines.slice(e,t+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(e){return this.getLinesForRange(e).join(this.getNewLineCharacter())},this.getLinesForRange=function(e){var t;if(e.start.row===e.end.row)t=[this.getLine(e.start.row).substring(e.start.column,e.end.column)];else{(t=this.getLines(e.start.row,e.end.row))[0]=(t[0]||"").substring(e.start.column);var n=t.length-1;e.end.row-e.start.row==n&&(t[n]=t[n].substring(0,e.end.column))}return t},this.insertLines=function(e,t){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(e,t)},this.removeLines=function(e,t){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(e,t)},this.insertNewLine=function(e){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(e,["",""])},this.insert=function(e,t){return this.getLength()<=1&&this.$detectNewLine(t),this.insertMergedLines(e,this.$split(t))},this.insertInLine=function(e,t){var n=this.clippedPos(e.row,e.column),i=this.pos(e.row,e.column+t.length);return this.applyDelta({start:n,end:i,action:"insert",lines:[t]},!0),this.clonePos(i)},this.clippedPos=function(e,t){var n=this.getLength();void 0===e?e=n:e<0?e=0:e>=n&&(e=n-1,t=void 0);var i=this.getLine(e);return null==t&&(t=i.length),{row:e,column:t=Math.min(Math.max(t,0),i.length)}},this.clonePos=function(e){return{row:e.row,column:e.column}},this.pos=function(e,t){return{row:e,column:t}},this.$clipPosition=function(e){var t=this.getLength();return e.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):(e.row=Math.max(0,e.row),e.column=Math.min(Math.max(e.column,0),this.getLine(e.row).length)),e},this.insertFullLines=function(e,t){var n=0;(e=Math.min(Math.max(e,0),this.getLength()))<this.getLength()?(t=t.concat([""]),n=0):(t=[""].concat(t),e--,n=this.$lines[e].length),this.insertMergedLines({row:e,column:n},t)},this.insertMergedLines=function(e,t){var n=this.clippedPos(e.row,e.column),i={row:n.row+t.length-1,column:(1==t.length?n.column:0)+t[t.length-1].length};return this.applyDelta({start:n,end:i,action:"insert",lines:t}),this.clonePos(i)},this.remove=function(e){var t=this.clippedPos(e.start.row,e.start.column),n=this.clippedPos(e.end.row,e.end.column);return this.applyDelta({start:t,end:n,action:"remove",lines:this.getLinesForRange({start:t,end:n})}),this.clonePos(t)},this.removeInLine=function(e,t,n){var i=this.clippedPos(e,t),r=this.clippedPos(e,n);return this.applyDelta({start:i,end:r,action:"remove",lines:this.getLinesForRange({start:i,end:r})},!0),this.clonePos(i)},this.removeFullLines=function(e,t){e=Math.min(Math.max(0,e),this.getLength()-1);var n=(t=Math.min(Math.max(0,t),this.getLength()-1))==this.getLength()-1&&e>0,i=t<this.getLength()-1,r=n?e-1:e,o=n?this.getLine(r).length:0,a=i?t+1:t,l=i?0:this.getLine(a).length,c=new s(r,o,a,l),u=this.$lines.slice(e,t+1);return this.applyDelta({start:c.start,end:c.end,action:"remove",lines:this.getLinesForRange(c)}),u},this.removeNewLine=function(e){e<this.getLength()-1&&e>=0&&this.applyDelta({start:this.pos(e,this.getLine(e).length),end:this.pos(e+1,0),action:"remove",lines:["",""]})},this.replace=function(e,t){return e instanceof s||(e=s.fromPoints(e.start,e.end)),0===t.length&&e.isEmpty()?e.start:t==this.getTextRange(e)?e.end:(this.remove(e),t?this.insert(e.start,t):e.start)},this.applyDeltas=function(e){for(var t=0;t<e.length;t++)this.applyDelta(e[t])},this.revertDeltas=function(e){for(var t=e.length-1;t>=0;t--)this.revertDelta(e[t])},this.applyDelta=function(e,t){var n="insert"==e.action;(n?e.lines.length<=1&&!e.lines[0]:!s.comparePoints(e.start,e.end))||(n&&e.lines.length>2e4?this.$splitAndapplyLargeDelta(e,2e4):(r(this.$lines,e,t),this._signal("change",e)))},this.$safeApplyDelta=function(e){var t=this.$lines.length;("remove"==e.action&&e.start.row<t&&e.end.row<t||"insert"==e.action&&e.start.row<=t)&&this.applyDelta(e)},this.$splitAndapplyLargeDelta=function(e,t){for(var n=e.lines,i=n.length-t+1,r=e.start.row,o=e.start.column,s=0,a=0;s<i;s=a){a+=t-1;var l=n.slice(s,a);l.push(""),this.applyDelta({start:this.pos(r+s,o),end:this.pos(r+a,o=0),action:e.action,lines:l},!0)}e.lines=n.slice(s),e.start.row=r+s,e.start.column=o,this.applyDelta(e,!0)},this.revertDelta=function(e){this.$safeApplyDelta({start:this.clonePos(e.start),end:this.clonePos(e.end),action:"insert"==e.action?"remove":"insert",lines:e.lines.slice()})},this.indexToPosition=function(e,t){for(var n=this.$lines||this.getAllLines(),i=this.getNewLineCharacter().length,r=t||0,o=n.length;r<o;r++)if((e-=n[r].length+i)<0)return{row:r,column:e+n[r].length+i};return{row:o-1,column:e+n[o-1].length+i}},this.positionToIndex=function(e,t){for(var n=this.$lines||this.getAllLines(),i=this.getNewLineCharacter().length,r=0,o=Math.min(e.row,n.length),s=t||0;s<o;++s)r+=n[s].length+i;return r+e.column}}).call(l.prototype),t.Document=l})),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],(function(e,t,n){"use strict";var i=e("./lib/oop"),r=e("./lib/event_emitter").EventEmitter,o=function(e,t){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=e;var n=this;this.$worker=function(){if(n.running){for(var e=new Date,t=n.currentLine,i=-1,r=n.doc,o=t;n.lines[t];)t++;var s=r.getLength(),a=0;for(n.running=!1;t<s;){n.$tokenizeRow(t),i=t;do{t++}while(n.lines[t]);if(++a%5==0&&new Date-e>20){n.running=setTimeout(n.$worker,20);break}}n.currentLine=t,-1==i&&(i=t),o<=i&&n.fireUpdateEvent(o,i)}}};(function(){i.implement(this,r),this.setTokenizer=function(e){this.tokenizer=e,this.lines=[],this.states=[],this.start(0)},this.setDocument=function(e){this.doc=e,this.lines=[],this.states=[],this.stop()},this.fireUpdateEvent=function(e,t){var n={first:e,last:t};this._signal("update",{data:n})},this.start=function(e){this.currentLine=Math.min(e||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},this.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},this.$updateOnChange=function(e){var t=e.start.row,n=e.end.row-t;if(0===n)this.lines[t]=null;else if("remove"==e.action)this.lines.splice(t,n+1,null),this.states.splice(t,n+1,null);else{var i=Array(n+1);i.unshift(t,1),this.lines.splice.apply(this.lines,i),this.states.splice.apply(this.states,i)}this.currentLine=Math.min(t,this.currentLine,this.doc.getLength()),this.stop()},this.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},this.getTokens=function(e){return this.lines[e]||this.$tokenizeRow(e)},this.getState=function(e){return this.currentLine==e&&this.$tokenizeRow(e),this.states[e]||"start"},this.$tokenizeRow=function(e){var t=this.doc.getLine(e),n=this.states[e-1],i=this.tokenizer.getLineTokens(t,n,e);return this.states[e]+""!=i.state+""?(this.states[e]=i.state,this.lines[e+1]=null,this.currentLine>e+1&&(this.currentLine=e+1)):this.currentLine==e&&(this.currentLine=e+1),this.lines[e]=i.tokens},this.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()}}).call(o.prototype),t.BackgroundTokenizer=o})),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],(function(e,t,n){"use strict";var i=e("./lib/lang"),r=(e("./lib/oop"),e("./range").Range),o=function(e,t,n){this.setRegexp(e),this.clazz=t,this.type=n||"text"};(function(){this.MAX_RANGES=500,this.setRegexp=function(e){this.regExp+""!=e+""&&(this.regExp=e,this.cache=[])},this.update=function(e,t,n,o){if(this.regExp)for(var s=o.firstRow,a=o.lastRow,l={},c=s;c<=a;c++){var u=this.cache[c];null==u&&((u=i.getMatchOffsets(n.getLine(c),this.regExp)).length>this.MAX_RANGES&&(u=u.slice(0,this.MAX_RANGES)),u=u.map((function(e){return new r(c,e.offset,c,e.offset+e.length)})),this.cache[c]=u.length?u:"");for(var d=u.length;d--;){var h=u[d].toScreenRange(n),f=h.toString();l[f]||(l[f]=!0,t.drawSingleLineMarker(e,h,this.clazz,o))}}}}).call(o.prototype),t.SearchHighlight=o})),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var i=e("../range").Range;function r(e,t){this.foldData=e,Array.isArray(t)?this.folds=t:t=this.folds=[t];var n=t[t.length-1];this.range=new i(t[0].start.row,t[0].start.column,n.end.row,n.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach((function(e){e.setFoldLine(this)}),this)}(function(){this.shiftRow=function(e){this.start.row+=e,this.end.row+=e,this.folds.forEach((function(t){t.start.row+=e,t.end.row+=e}))},this.addFold=function(e){if(e.sameRow){if(e.start.row<this.startRow||e.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(e),this.folds.sort((function(e,t){return-e.range.compareEnd(t.start.row,t.start.column)})),this.range.compareEnd(e.start.row,e.start.column)>0?(this.end.row=e.end.row,this.end.column=e.end.column):this.range.compareStart(e.end.row,e.end.column)<0&&(this.start.row=e.start.row,this.start.column=e.start.column)}else if(e.start.row==this.end.row)this.folds.push(e),this.end.row=e.end.row,this.end.column=e.end.column;else{if(e.end.row!=this.start.row)throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");this.folds.unshift(e),this.start.row=e.start.row,this.start.column=e.start.column}e.foldLine=this},this.containsRow=function(e){return e>=this.start.row&&e<=this.end.row},this.walk=function(e,t,n){var i,r,o=0,s=this.folds,a=!0;null==t&&(t=this.end.row,n=this.end.column);for(var l=0;l<s.length;l++){if(-1==(r=(i=s[l]).range.compareStart(t,n)))return void e(null,t,n,o,a);if(!e(null,i.start.row,i.start.column,o,a)&&e(i.placeholder,i.start.row,i.start.column,o)||0===r)return;a=!i.sameRow,o=i.end.column}e(null,t,n,o,a)},this.getNextFoldTo=function(e,t){for(var n,i,r=0;r<this.folds.length;r++){if(-1==(i=(n=this.folds[r]).range.compareEnd(e,t)))return{fold:n,kind:"after"};if(0===i)return{fold:n,kind:"inside"}}return null},this.addRemoveChars=function(e,t,n){var i,r,o=this.getNextFoldTo(e,t);if(o)if(i=o.fold,"inside"==o.kind&&i.start.column!=t&&i.start.row!=e)window.console&&window.console.log(e,t,i);else if(i.start.row==e){var s=(r=this.folds).indexOf(i);for(0===s&&(this.start.column+=n);s<r.length;s++){if((i=r[s]).start.column+=n,!i.sameRow)return;i.end.column+=n}this.end.column+=n}},this.split=function(e,t){var n=this.getNextFoldTo(e,t);if(!n||"inside"==n.kind)return null;var i=n.fold,o=this.folds,s=this.foldData,a=o.indexOf(i),l=o[a-1];this.end.row=l.end.row,this.end.column=l.end.column;var c=new r(s,o=o.splice(a,o.length-a));return s.splice(s.indexOf(this)+1,0,c),c},this.merge=function(e){for(var t=e.folds,n=0;n<t.length;n++)this.addFold(t[n]);var i=this.foldData;i.splice(i.indexOf(e),1)},this.toString=function(){var e=[this.range.toString()+": ["];return this.folds.forEach((function(t){e.push(" "+t.toString())})),e.push("]"),e.join("\n")},this.idxToPosition=function(e){for(var t=0,n=0;n<this.folds.length;n++){var i=this.folds[n];if((e-=i.start.column-t)<0)return{row:i.start.row,column:i.start.column+e};if((e-=i.placeholder.length)<0)return i.start;t=i.end.column}return{row:this.end.row,column:this.end.column+e}}}).call(r.prototype),t.FoldLine=r})),ace.define("ace/range_list",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var i=e("./range").Range.comparePoints,r=function(){this.ranges=[],this.$bias=1};(function(){this.comparePoints=i,this.pointIndex=function(e,t,n){for(var r=this.ranges,o=n||0;o<r.length;o++){var s=r[o],a=i(e,s.end);if(!(a>0)){var l=i(e,s.start);return 0===a?t&&0!==l?-o-2:o:l>0||0===l&&!t?o:-o-1}}return-o-1},this.add=function(e){var t=!e.isEmpty(),n=this.pointIndex(e.start,t);n<0&&(n=-n-1);var i=this.pointIndex(e.end,t,n);return i<0?i=-i-1:i++,this.ranges.splice(n,i-n,e)},this.addList=function(e){for(var t=[],n=e.length;n--;)t.push.apply(t,this.add(e[n]));return t},this.substractPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges.splice(t,1)},this.merge=function(){for(var e,t=[],n=this.ranges,r=(n=n.sort((function(e,t){return i(e.start,t.start)})))[0],o=1;o<n.length;o++){e=r,r=n[o];var s=i(e.end,r.start);s<0||(0!=s||e.isEmpty()||r.isEmpty())&&(i(e.end,r.end)<0&&(e.end.row=r.end.row,e.end.column=r.end.column),n.splice(o,1),t.push(r),r=e,o--)}return this.ranges=n,t},this.contains=function(e,t){return this.pointIndex({row:e,column:t})>=0},this.containsPoint=function(e){return this.pointIndex(e)>=0},this.rangeAtPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges[t]},this.clipRows=function(e,t){var n=this.ranges;if(n[0].start.row>t||n[n.length-1].start.row<e)return[];var i=this.pointIndex({row:e,column:0});i<0&&(i=-i-1);var r=this.pointIndex({row:t,column:0},i);r<0&&(r=-r-1);for(var o=[],s=i;s<r;s++)o.push(n[s]);return o},this.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},this.attach=function(e){this.session&&this.detach(),this.session=e,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},this.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},this.$onChange=function(e){for(var t=e.start,n=e.end,i=t.row,r=n.row,o=this.ranges,s=0,a=o.length;s<a&&!((u=o[s]).end.row>=i);s++);if("insert"==e.action){for(var l=r-i,c=-t.column+n.column;s<a&&!((u=o[s]).start.row>i);s++)if(u.start.row==i&&u.start.column>=t.column&&(u.start.column==t.column&&this.$bias<=0||(u.start.column+=c,u.start.row+=l)),u.end.row==i&&u.end.column>=t.column){if(u.end.column==t.column&&this.$bias<0)continue;u.end.column==t.column&&c>0&&s<a-1&&u.end.column>u.start.column&&u.end.column==o[s+1].start.column&&(u.end.column-=c),u.end.column+=c,u.end.row+=l}}else for(l=i-r,c=t.column-n.column;s<a&&!((u=o[s]).start.row>r);s++)u.end.row<r&&(i<u.end.row||i==u.end.row&&t.column<u.end.column)?(u.end.row=i,u.end.column=t.column):u.end.row==r?u.end.column<=n.column?(l||u.end.column>t.column)&&(u.end.column=t.column,u.end.row=t.row):(u.end.column+=c,u.end.row+=l):u.end.row>r&&(u.end.row+=l),u.start.row<r&&(i<u.start.row||i==u.start.row&&t.column<u.start.column)?(u.start.row=i,u.start.column=t.column):u.start.row==r?u.start.column<=n.column?(l||u.start.column>t.column)&&(u.start.column=t.column,u.start.row=t.row):(u.start.column+=c,u.start.row+=l):u.start.row>r&&(u.start.row+=l);if(0!=l&&s<a)for(;s<a;s++){var u;(u=o[s]).start.row+=l,u.end.row+=l}}}).call(r.prototype),t.RangeList=r})),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list","ace/lib/oop"],(function(e,t,n){"use strict";var i=e("../range_list").RangeList,r=e("../lib/oop"),o=t.Fold=function(e,t){this.foldLine=null,this.placeholder=t,this.range=e,this.start=e.start,this.end=e.end,this.sameRow=e.start.row==e.end.row,this.subFolds=this.ranges=[]};function s(e,t){e.row-=t.row,0==e.row&&(e.column-=t.column)}function a(e,t){0==e.row&&(e.column+=t.column),e.row+=t.row}r.inherits(o,i),function(){this.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},this.setFoldLine=function(e){this.foldLine=e,this.subFolds.forEach((function(t){t.setFoldLine(e)}))},this.clone=function(){var e=this.range.clone(),t=new o(e,this.placeholder);return this.subFolds.forEach((function(e){t.subFolds.push(e.clone())})),t.collapseChildren=this.collapseChildren,t},this.addSubFold=function(e){if(!this.range.isEqual(e)){var t,n;t=e,n=this.start,s(t.start,n),s(t.end,n);for(var i=e.start.row,r=e.start.column,o=0,a=-1;o<this.subFolds.length&&1==(a=this.subFolds[o].range.compare(i,r));o++);var l=this.subFolds[o],c=0;if(0==a){if(l.range.containsRange(e))return l.addSubFold(e);c=1}i=e.range.end.row,r=e.range.end.column;var u=o;for(a=-1;u<this.subFolds.length&&1==(a=this.subFolds[u].range.compare(i,r));u++);0==a&&u++;for(var d=this.subFolds.splice(o,u-o,e),h=0==a?d.length-1:d.length,f=c;f<h;f++)e.addSubFold(d[f]);return e.setFoldLine(this.foldLine),e}},this.restoreRange=function(e){return function(e,t){a(e.start,t),a(e.end,t)}(e,this.start)}}.call(o.prototype)})),ace.define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator"],(function(e,t,n){"use strict";var i=e("../range").Range,r=e("./fold_line").FoldLine,o=e("./fold").Fold,s=e("../token_iterator").TokenIterator;t.Folding=function(){this.getFoldAt=function(e,t,n){var i=this.getFoldLine(e);if(!i)return null;for(var r=i.folds,o=0;o<r.length;o++){var s=r[o].range;if(s.contains(e,t)){if(1==n&&s.isEnd(e,t)&&!s.isEmpty())continue;if(-1==n&&s.isStart(e,t)&&!s.isEmpty())continue;return r[o]}}},this.getFoldsInRange=function(e){var t=e.start,n=e.end,i=this.$foldData,r=[];t.column+=1,n.column-=1;for(var o=0;o<i.length;o++){var s=i[o].range.compareRange(e);if(2!=s){if(-2==s)break;for(var a=i[o].folds,l=0;l<a.length;l++){var c=a[l];if(-2==(s=c.range.compareRange(e)))break;if(2!=s){if(42==s)break;r.push(c)}}}}return t.column-=1,n.column+=1,r},this.getFoldsInRangeList=function(e){if(Array.isArray(e)){var t=[];e.forEach((function(e){t=t.concat(this.getFoldsInRange(e))}),this)}else t=this.getFoldsInRange(e);return t},this.getAllFolds=function(){for(var e=[],t=this.$foldData,n=0;n<t.length;n++)for(var i=0;i<t[n].folds.length;i++)e.push(t[n].folds[i]);return e},this.getFoldStringAt=function(e,t,n,i){if(!(i=i||this.getFoldLine(e)))return null;for(var r,o,s={end:{column:0}},a=0;a<i.folds.length;a++){var l=(o=i.folds[a]).range.compareEnd(e,t);if(-1==l){r=this.getLine(o.start.row).substring(s.end.column,o.start.column);break}if(0===l)return null;s=o}return r||(r=this.getLine(o.start.row).substring(s.end.column)),-1==n?r.substring(0,t-s.end.column):1==n?r.substring(t-s.end.column):r},this.getFoldLine=function(e,t){var n=this.$foldData,i=0;for(t&&(i=n.indexOf(t)),-1==i&&(i=0);i<n.length;i++){var r=n[i];if(r.start.row<=e&&r.end.row>=e)return r;if(r.end.row>e)return null}return null},this.getNextFoldLine=function(e,t){var n=this.$foldData,i=0;for(t&&(i=n.indexOf(t)),-1==i&&(i=0);i<n.length;i++){var r=n[i];if(r.end.row>=e)return r}return null},this.getFoldedRowCount=function(e,t){for(var n=this.$foldData,i=t-e+1,r=0;r<n.length;r++){var o=n[r],s=o.end.row,a=o.start.row;if(s>=t){a<t&&(a>=e?i-=t-a:i=0);break}s>=e&&(i-=a>=e?s-a:s-e+1)}return i},this.$addFoldLine=function(e){return this.$foldData.push(e),this.$foldData.sort((function(e,t){return e.start.row-t.start.row})),e},this.addFold=function(e,t){var n,i=this.$foldData,s=!1;e instanceof o?n=e:(n=new o(t,e)).collapseChildren=t.collapseChildren,this.$clipRangeToDocument(n.range);var a=n.start.row,l=n.start.column,c=n.end.row,u=n.end.column,d=this.getFoldAt(a,l,1),h=this.getFoldAt(c,u,-1);if(d&&h==d)return d.addSubFold(n);d&&!d.range.isStart(a,l)&&this.removeFold(d),h&&!h.range.isEnd(c,u)&&this.removeFold(h);var f=this.getFoldsInRange(n.range);f.length>0&&(this.removeFolds(f),n.collapseChildren||f.forEach((function(e){n.addSubFold(e)})));for(var p=0;p<i.length;p++){var g=i[p];if(c==g.start.row){g.addFold(n),s=!0;break}if(a==g.end.row){if(g.addFold(n),s=!0,!n.sameRow){var m=i[p+1];if(m&&m.start.row==c){g.merge(m);break}}break}if(c<=g.start.row)break}return s||(g=this.$addFoldLine(new r(this.$foldData,n))),this.$useWrapMode?this.$updateWrapData(g.start.row,g.start.row):this.$updateRowLengthCache(g.start.row,g.start.row),this.$modified=!0,this._signal("changeFold",{data:n,action:"add"}),n},this.addFolds=function(e){e.forEach((function(e){this.addFold(e)}),this)},this.removeFold=function(e){var t=e.foldLine,n=t.start.row,i=t.end.row,r=this.$foldData,o=t.folds;if(1==o.length)r.splice(r.indexOf(t),1);else if(t.range.isEnd(e.end.row,e.end.column))o.pop(),t.end.row=o[o.length-1].end.row,t.end.column=o[o.length-1].end.column;else if(t.range.isStart(e.start.row,e.start.column))o.shift(),t.start.row=o[0].start.row,t.start.column=o[0].start.column;else if(e.sameRow)o.splice(o.indexOf(e),1);else{var s=t.split(e.start.row,e.start.column);(o=s.folds).shift(),s.start.row=o[0].start.row,s.start.column=o[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(n,i):this.$updateRowLengthCache(n,i)),this.$modified=!0,this._signal("changeFold",{data:e,action:"remove"})},this.removeFolds=function(e){for(var t=[],n=0;n<e.length;n++)t.push(e[n]);t.forEach((function(e){this.removeFold(e)}),this),this.$modified=!0},this.expandFold=function(e){this.removeFold(e),e.subFolds.forEach((function(t){e.restoreRange(t),this.addFold(t)}),this),e.collapseChildren>0&&this.foldAll(e.start.row+1,e.end.row,e.collapseChildren-1),e.subFolds=[]},this.expandFolds=function(e){e.forEach((function(e){this.expandFold(e)}),this)},this.unfold=function(e,t){var n,r;if(null==e)n=new i(0,0,this.getLength(),0),null==t&&(t=!0);else if("number"==typeof e)n=new i(e,0,e,this.getLine(e).length);else if("row"in e)n=i.fromPoints(e,e);else{if(Array.isArray(e))return r=[],e.forEach((function(e){r=r.concat(this.unfold(e))}),this),r;n=e}for(var o=r=this.getFoldsInRangeList(n);1==r.length&&i.comparePoints(r[0].start,n.start)<0&&i.comparePoints(r[0].end,n.end)>0;)this.expandFolds(r),r=this.getFoldsInRangeList(n);if(0!=t?this.removeFolds(r):this.expandFolds(r),o.length)return o},this.isRowFolded=function(e,t){return!!this.getFoldLine(e,t)},this.getRowFoldEnd=function(e,t){var n=this.getFoldLine(e,t);return n?n.end.row:e},this.getRowFoldStart=function(e,t){var n=this.getFoldLine(e,t);return n?n.start.row:e},this.getFoldDisplayLine=function(e,t,n,i,r){null==i&&(i=e.start.row),null==r&&(r=0),null==t&&(t=e.end.row),null==n&&(n=this.getLine(t).length);var o=this.doc,s="";return e.walk((function(e,t,n,a){if(!(t<i)){if(t==i){if(n<r)return;a=Math.max(r,a)}s+=null!=e?e:o.getLine(t).substring(a,n)}}),t,n),s},this.getDisplayLine=function(e,t,n,i){var r,o=this.getFoldLine(e);return o?this.getFoldDisplayLine(o,e,t,n,i):(r=this.doc.getLine(e)).substring(i||0,t||r.length)},this.$cloneFoldData=function(){var e=[];return e=this.$foldData.map((function(t){var n=t.folds.map((function(e){return e.clone()}));return new r(e,n)}))},this.toggleFold=function(e){var t,n,i=this.selection.getRange();if(i.isEmpty()){var r=i.start;if(t=this.getFoldAt(r.row,r.column))return void this.expandFold(t);(n=this.findMatchingBracket(r))?1==i.comparePoint(n)?i.end=n:(i.start=n,i.start.column++,i.end.column--):(n=this.findMatchingBracket({row:r.row,column:r.column+1}))?(1==i.comparePoint(n)?i.end=n:i.start=n,i.start.column++):i=this.getCommentFoldRange(r.row,r.column)||i}else{var o=this.getFoldsInRange(i);if(e&&o.length)return void this.expandFolds(o);1==o.length&&(t=o[0])}if(t||(t=this.getFoldAt(i.start.row,i.start.column)),t&&t.range.toString()==i.toString())this.expandFold(t);else{var s="...";if(!i.isMultiLine()){if((s=this.getTextRange(i)).length<4)return;s=s.trim().substring(0,2)+".."}this.addFold(s,i)}},this.getCommentFoldRange=function(e,t,n){var r=new s(this,e,t),o=r.getCurrentToken(),a=o&&o.type;if(o&&/^comment|string/.test(a)){"comment"==(a=a.match(/comment|string/)[0])&&(a+="|doc-start");var l=new RegExp(a),c=new i;if(1!=n){do{o=r.stepBackward()}while(o&&l.test(o.type)&&!/^comment.end/.test(o.type));o=r.stepForward()}if(c.start.row=r.getCurrentTokenRow(),c.start.column=r.getCurrentTokenColumn()+(/^comment.start/.test(o.type)?o.value.length:2),r=new s(this,e,t),-1!=n){var u=-1;do{if(o=r.stepForward(),-1==u){var d=this.getState(r.$row);l.test(d)||(u=r.$row)}else if(r.$row>u)break}while(o&&l.test(o.type)&&!/^comment.start/.test(o.type));o=r.stepBackward()}else o=r.getCurrentToken();return c.end.row=r.getCurrentTokenRow(),c.end.column=r.getCurrentTokenColumn(),/^comment.end/.test(o.type)||(c.end.column+=o.value.length-2),c}},this.foldAll=function(e,t,n,i){null==n&&(n=1e5);var r=this.foldWidgets;if(r){t=t||this.getLength();for(var o=e=e||0;o<t;o++)if(null==r[o]&&(r[o]=this.getFoldWidget(o)),"start"==r[o]&&(!i||i(o))){var s=this.getFoldWidgetRange(o);s&&s.isMultiLine()&&s.end.row<=t&&s.start.row>=e&&(o=s.end.row,s.collapseChildren=n,this.addFold("...",s))}}},this.foldToLevel=function(e){for(this.foldAll();e-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var e=this;this.foldAll(null,null,null,(function(t){for(var n=e.getTokens(t),i=0;i<n.length;i++){var r=n[i];if("text"!=r.type||!/^\s+$/.test(r.value))return!!/comment/.test(r.type)}}))},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(e){if(!this.$foldStyles[e])throw new Error("invalid fold style: "+e+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=e){this.$foldStyle=e,"manual"==e&&this.unfold();var t=this.$foldMode;this.$setFolding(null),this.$setFolding(t)}},this.$setFolding=function(e){this.$foldMode!=e&&(this.$foldMode=e,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),e&&"manual"!=this.$foldStyle?(this.foldWidgets=[],this.getFoldWidget=e.getFoldWidget.bind(e,this,this.$foldStyle),this.getFoldWidgetRange=e.getFoldWidgetRange.bind(e,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets),this.on("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets)):this.foldWidgets=null)},this.getParentFoldRangeData=function(e,t){var n=this.foldWidgets;if(!n||t&&n[e])return{};for(var i,r=e-1;r>=0;){var o=n[r];if(null==o&&(o=n[r]=this.getFoldWidget(r)),"start"==o){var s=this.getFoldWidgetRange(r);if(i||(i=s),s&&s.end.row>=e)break}r--}return{range:-1!==r&&s,firstRange:i}},this.onFoldWidgetClick=function(e,t){var n={children:(t=t.domEvent).shiftKey,all:t.ctrlKey||t.metaKey,siblings:t.altKey};if(!this.$toggleFoldWidget(e,n)){var i=t.target||t.srcElement;i&&/ace_fold-widget/.test(i.className)&&(i.className+=" ace_invalid")}},this.$toggleFoldWidget=function(e,t){if(this.getFoldWidget){var n=this.getFoldWidget(e),i=this.getLine(e),r="end"===n?-1:1,o=this.getFoldAt(e,-1===r?0:i.length,r);if(o)return t.children||t.all?this.removeFold(o):this.expandFold(o),o;var s=this.getFoldWidgetRange(e,!0);if(s&&!s.isMultiLine()&&(o=this.getFoldAt(s.start.row,s.start.column,1))&&s.isEqual(o.range))return this.removeFold(o),o;if(t.siblings){var a=this.getParentFoldRangeData(e);if(a.range)var l=a.range.start.row+1,c=a.range.end.row;this.foldAll(l,c,t.all?1e4:0)}else t.children?(c=s?s.end.row:this.getLength(),this.foldAll(e+1,c,t.all?1e4:0)):s&&(t.all&&(s.collapseChildren=1e4),this.addFold("...",s));return s}},this.toggleFoldWidget=function(e){var t=this.selection.getCursor().row;t=this.getRowFoldStart(t);var n=this.$toggleFoldWidget(t,{});if(!n){var i=this.getParentFoldRangeData(t,!0);if(n=i.range||i.firstRange){t=n.start.row;var r=this.getFoldAt(t,this.getLine(t).length,1);r?this.removeFold(r):this.addFold("...",n)}}},this.updateFoldWidgets=function(e){var t=e.start.row,n=e.end.row-t;if(0===n)this.foldWidgets[t]=null;else if("remove"==e.action)this.foldWidgets.splice(t,n+1,null);else{var i=Array(n+1);i.unshift(t,1),this.foldWidgets.splice.apply(this.foldWidgets,i)}},this.tokenizerUpdateFoldWidgets=function(e){var t=e.data;t.first!=t.last&&this.foldWidgets.length>t.first&&this.foldWidgets.splice(t.first,this.foldWidgets.length)}}})),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],(function(e,t,n){"use strict";var i=e("../token_iterator").TokenIterator,r=e("../range").Range;t.BracketMatch=function(){this.findMatchingBracket=function(e,t){if(0==e.column)return null;var n=t||this.getLine(e.row).charAt(e.column-1);if(""==n)return null;var i=n.match(/([\(\[\{])|([\)\]\}])/);return i?i[1]?this.$findClosingBracket(i[1],e):this.$findOpeningBracket(i[2],e):null},this.getBracketRange=function(e){var t,n=this.getLine(e.row),i=!0,o=n.charAt(e.column-1),s=o&&o.match(/([\(\[\{])|([\)\]\}])/);if(s||(o=n.charAt(e.column),e={row:e.row,column:e.column+1},s=o&&o.match(/([\(\[\{])|([\)\]\}])/),i=!1),!s)return null;if(s[1]){if(!(a=this.$findClosingBracket(s[1],e)))return null;t=r.fromPoints(e,a),i||(t.end.column++,t.start.column--),t.cursor=t.end}else{var a;if(!(a=this.$findOpeningBracket(s[2],e)))return null;t=r.fromPoints(a,e),i||(t.start.column++,t.end.column--),t.cursor=t.start}return t},this.getMatchingBracketRanges=function(e,t){var n=this.getLine(e.row),i=/([\(\[\{])|([\)\]\}])/,o=!t&&n.charAt(e.column-1),s=o&&o.match(i);if(s||(o=(void 0===t||t)&&n.charAt(e.column),e={row:e.row,column:e.column+1},s=o&&o.match(i)),!s)return null;var a=new r(e.row,e.column-1,e.row,e.column),l=s[1]?this.$findClosingBracket(s[1],e):this.$findOpeningBracket(s[2],e);return l?[a,new r(l.row,l.column,l.row,l.column+1)]:[a]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(e,t,n){var r=this.$brackets[e],o=1,s=new i(this,t.row,t.column),a=s.getCurrentToken();if(a||(a=s.stepForward()),a){n||(n=new RegExp("(\\.?"+a.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)")+")+"));for(var l=t.column-s.getCurrentTokenColumn()-2,c=a.value;;){for(;l>=0;){var u=c.charAt(l);if(u==r){if(0==(o-=1))return{row:s.getCurrentTokenRow(),column:l+s.getCurrentTokenColumn()}}else u==e&&(o+=1);l-=1}do{a=s.stepBackward()}while(a&&!n.test(a.type));if(null==a)break;l=(c=a.value).length-1}return null}},this.$findClosingBracket=function(e,t,n){var r=this.$brackets[e],o=1,s=new i(this,t.row,t.column),a=s.getCurrentToken();if(a||(a=s.stepForward()),a){n||(n=new RegExp("(\\.?"+a.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)")+")+"));for(var l=t.column-s.getCurrentTokenColumn();;){for(var c=a.value,u=c.length;l<u;){var d=c.charAt(l);if(d==r){if(0==(o-=1))return{row:s.getCurrentTokenRow(),column:l+s.getCurrentTokenColumn()}}else d==e&&(o+=1);l+=1}do{a=s.stepForward()}while(a&&!n.test(a.type));if(null==a)break;l=0}return null}},this.getMatchingTags=function(e){var t=new i(this,e.row,e.column),n=this.$findTagName(t);if(n)return"<"===t.stepBackward().value?this.$findClosingTag(t,n):this.$findOpeningTag(t,n)},this.$findTagName=function(e){var t=e.getCurrentToken(),n=!1,i=!1;if(t&&-1===t.type.indexOf("tag-name"))do{(t=i?e.stepBackward():e.stepForward())&&("/>"===t.value?i=!0:-1!==t.type.indexOf("tag-name")&&(n=!0))}while(t&&!n);return t},this.$findClosingTag=function(e,t){var n,i=t.value,o=t.value,s=0,a=new r(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);t=e.stepForward();var l=new r(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+t.value.length),c=!1;do{if(n=t,t=e.stepForward()){if(">"===t.value&&!c){var u=new r(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);c=!0}if(-1!==t.type.indexOf("tag-name")){if(o===(i=t.value))if("<"===n.value)s++;else if("</"===n.value&&--s<0){e.stepBackward();var d=new r(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+2);t=e.stepForward();var h=new r(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+t.value.length);if(!(t=e.stepForward())||">"!==t.value)return;var f=new r(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1)}}else o===i&&"/>"===t.value&&--s<0&&(f=h=d=new r(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+2),u=new r(l.end.row,l.end.column,l.end.row,l.end.column+1))}}while(t&&s>=0);if(a&&u&&d&&f&&l&&h)return{openTag:new r(a.start.row,a.start.column,u.end.row,u.end.column),closeTag:new r(d.start.row,d.start.column,f.end.row,f.end.column),openTagName:l,closeTagName:h}},this.$findOpeningTag=function(e,t){var n=e.getCurrentToken(),i=t.value,o=0,s=e.getCurrentTokenRow(),a=e.getCurrentTokenColumn(),l=a+2,c=new r(s,a,s,l);e.stepForward();var u=new r(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+t.value.length);if((t=e.stepForward())&&">"===t.value){var d=new r(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);e.stepBackward(),e.stepBackward();do{if(t=n,s=e.getCurrentTokenRow(),l=(a=e.getCurrentTokenColumn())+t.value.length,n=e.stepBackward(),t)if(-1!==t.type.indexOf("tag-name")){if(i===t.value)if("<"===n.value){if(++o>0){var h=new r(s,a,s,l),f=new r(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);do{t=e.stepForward()}while(t&&">"!==t.value);var p=new r(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1)}}else"</"===n.value&&o--}else if("/>"===t.value){for(var g=0,m=n;m;){if(-1!==m.type.indexOf("tag-name")&&m.value===i){o--;break}if("<"===m.value)break;m=e.stepBackward(),g++}for(var v=0;v<g;v++)e.stepForward()}}while(n&&o<=0);return f&&p&&c&&d&&h&&u?{openTag:new r(f.start.row,f.start.column,p.end.row,p.end.column),closeTag:new r(c.start.row,c.start.column,d.end.row,d.end.column),openTagName:h,closeTagName:u}:void 0}}}})),ace.define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/bidihandler","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/document","ace/background_tokenizer","ace/search_highlight","ace/edit_session/folding","ace/edit_session/bracket_match"],(function(e,t,n){"use strict";var i=e("./lib/oop"),r=e("./lib/lang"),o=e("./bidihandler").BidiHandler,s=e("./config"),a=e("./lib/event_emitter").EventEmitter,l=e("./selection").Selection,c=e("./mode/text").Mode,u=e("./range").Range,d=e("./document").Document,h=e("./background_tokenizer").BackgroundTokenizer,f=e("./search_highlight").SearchHighlight,p=function(e,t){this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$foldData=[],this.id="session"+ ++p.$uid,this.$foldData.toString=function(){return this.join("\n")},this.bgTokenizer=new h((new c).getTokenizer(),this);var n=this;this.bgTokenizer.on("update",(function(e){n._signal("tokenizerUpdate",e)})),this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),"object"==typeof e&&e.getLine||(e=new d(e)),this.setDocument(e),this.selection=new l(this),this.$bidiHandler=new o(this),s.resetOptions(this),this.setMode(t),s._signal("session",this),this.destroyed=!1};p.$uid=0,function(){i.implement(this,a),this.setDocument=function(e){this.doc&&this.doc.off("change",this.$onChange),this.doc=e,e.on("change",this.$onChange,!0),this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},this.getDocument=function(){return this.doc},this.$resetRowCache=function(e){if(!e)return this.$docRowCache=[],void(this.$screenRowCache=[]);var t=this.$docRowCache.length,n=this.$getRowCacheIndex(this.$docRowCache,e)+1;t>n&&(this.$docRowCache.splice(n,t),this.$screenRowCache.splice(n,t))},this.$getRowCacheIndex=function(e,t){for(var n=0,i=e.length-1;n<=i;){var r=n+i>>1,o=e[r];if(t>o)n=r+1;else{if(!(t<o))return r;i=r-1}}return n-1},this.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.destroyed||this.bgTokenizer.start(0)},this.onChangeFold=function(e){var t=e.data;this.$resetRowCache(t.start.row)},this.onChange=function(e){this.$modified=!0,this.$bidiHandler.onChange(e),this.$resetRowCache(e.start.row);var t=this.$updateInternalDataOnChange(e);!this.$fromUndo&&this.$undoManager&&(t&&t.length&&(this.$undoManager.add({action:"removeFolds",folds:t},this.mergeUndoDeltas),this.mergeUndoDeltas=!0),this.$undoManager.add(e,this.mergeUndoDeltas),this.mergeUndoDeltas=!0,this.$informUndoManager.schedule()),this.bgTokenizer.$updateOnChange(e),this._signal("change",e)},this.setValue=function(e){this.doc.setValue(e),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},this.getValue=this.toString=function(){return this.doc.getValue()},this.getSelection=function(){return this.selection},this.getState=function(e){return this.bgTokenizer.getState(e)},this.getTokens=function(e){return this.bgTokenizer.getTokens(e)},this.getTokenAt=function(e,t){var n,i=this.bgTokenizer.getTokens(e),r=0;if(null==t){var o=i.length-1;r=this.getLine(e).length}else for(o=0;o<i.length&&!((r+=i[o].value.length)>=t);o++);return(n=i[o])?(n.index=o,n.start=r-n.value.length,n):null},this.setUndoManager=function(e){if(this.$undoManager=e,this.$informUndoManager&&this.$informUndoManager.cancel(),e){var t=this;e.addSession(this),this.$syncInformUndoManager=function(){t.$informUndoManager.cancel(),t.mergeUndoDeltas=!1},this.$informUndoManager=r.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},this.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},this.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},this.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},this.getTabString=function(){return this.getUseSoftTabs()?r.stringRepeat(" ",this.getTabSize()):"\t"},this.setUseSoftTabs=function(e){this.setOption("useSoftTabs",e)},this.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},this.setTabSize=function(e){this.setOption("tabSize",e)},this.getTabSize=function(){return this.$tabSize},this.isTabStop=function(e){return this.$useSoftTabs&&e.column%this.$tabSize==0},this.setNavigateWithinSoftTabs=function(e){this.setOption("navigateWithinSoftTabs",e)},this.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},this.$overwrite=!1,this.setOverwrite=function(e){this.setOption("overwrite",e)},this.getOverwrite=function(){return this.$overwrite},this.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},this.addGutterDecoration=function(e,t){this.$decorations[e]||(this.$decorations[e]=""),this.$decorations[e]+=" "+t,this._signal("changeBreakpoint",{})},this.removeGutterDecoration=function(e,t){this.$decorations[e]=(this.$decorations[e]||"").replace(" "+t,""),this._signal("changeBreakpoint",{})},this.getBreakpoints=function(){return this.$breakpoints},this.setBreakpoints=function(e){this.$breakpoints=[];for(var t=0;t<e.length;t++)this.$breakpoints[e[t]]="ace_breakpoint";this._signal("changeBreakpoint",{})},this.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},this.setBreakpoint=function(e,t){void 0===t&&(t="ace_breakpoint"),t?this.$breakpoints[e]=t:delete this.$breakpoints[e],this._signal("changeBreakpoint",{})},this.clearBreakpoint=function(e){delete this.$breakpoints[e],this._signal("changeBreakpoint",{})},this.addMarker=function(e,t,n,i){var r=this.$markerId++,o={range:e,type:n||"line",renderer:"function"==typeof n?n:null,clazz:t,inFront:!!i,id:r};return i?(this.$frontMarkers[r]=o,this._signal("changeFrontMarker")):(this.$backMarkers[r]=o,this._signal("changeBackMarker")),r},this.addDynamicMarker=function(e,t){if(e.update){var n=this.$markerId++;return e.id=n,e.inFront=!!t,t?(this.$frontMarkers[n]=e,this._signal("changeFrontMarker")):(this.$backMarkers[n]=e,this._signal("changeBackMarker")),e}},this.removeMarker=function(e){var t=this.$frontMarkers[e]||this.$backMarkers[e];t&&(delete(t.inFront?this.$frontMarkers:this.$backMarkers)[e],this._signal(t.inFront?"changeFrontMarker":"changeBackMarker"))},this.getMarkers=function(e){return e?this.$frontMarkers:this.$backMarkers},this.highlight=function(e){if(!this.$searchHighlight){var t=new f(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(t)}this.$searchHighlight.setRegexp(e)},this.highlightLines=function(e,t,n,i){"number"!=typeof t&&(n=t,t=e),n||(n="ace_step");var r=new u(e,0,t,1/0);return r.id=this.addMarker(r,n,"fullLine",i),r},this.setAnnotations=function(e){this.$annotations=e,this._signal("changeAnnotation",{})},this.getAnnotations=function(){return this.$annotations||[]},this.clearAnnotations=function(){this.setAnnotations([])},this.$detectNewLine=function(e){var t=e.match(/^.*?(\r?\n)/m);this.$autoNewLine=t?t[1]:"\n"},this.getWordRange=function(e,t){var n=this.getLine(e),i=!1;if(t>0&&(i=!!n.charAt(t-1).match(this.tokenRe)),i||(i=!!n.charAt(t).match(this.tokenRe)),i)var r=this.tokenRe;else r=/^\s+$/.test(n.slice(t-1,t+1))?/\s/:this.nonTokenRe;var o=t;if(o>0){do{o--}while(o>=0&&n.charAt(o).match(r));o++}for(var s=t;s<n.length&&n.charAt(s).match(r);)s++;return new u(e,o,e,s)},this.getAWordRange=function(e,t){for(var n=this.getWordRange(e,t),i=this.getLine(n.end.row);i.charAt(n.end.column).match(/[ \t]/);)n.end.column+=1;return n},this.setNewLineMode=function(e){this.doc.setNewLineMode(e)},this.getNewLineMode=function(){return this.doc.getNewLineMode()},this.setUseWorker=function(e){this.setOption("useWorker",e)},this.getUseWorker=function(){return this.$useWorker},this.onReloadTokenizer=function(e){var t=e.data;this.bgTokenizer.start(t.first),this._signal("tokenizerUpdate",e)},this.$modes=s.$modes,this.$mode=null,this.$modeId=null,this.setMode=function(e,t){if(e&&"object"==typeof e){if(e.getTokenizer)return this.$onChangeMode(e);var n=e,i=n.path}else i=e||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new c),this.$modes[i]&&!n)return this.$onChangeMode(this.$modes[i]),void(t&&t());this.$modeId=i,s.loadModule(["mode",i],function(e){if(this.$modeId!==i)return t&&t();this.$modes[i]&&!n?this.$onChangeMode(this.$modes[i]):e&&e.Mode&&(e=new e.Mode(n),n||(this.$modes[i]=e,e.$id=i),this.$onChangeMode(e)),t&&t()}.bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},this.$onChangeMode=function(e,t){if(t||(this.$modeId=e.$id),this.$mode!==e){var n=this.$mode;this.$mode=e,this.$stopWorker(),this.$useWorker&&this.$startWorker();var i=e.getTokenizer();if(void 0!==i.on){var r=this.onReloadTokenizer.bind(this);i.on("update",r)}this.bgTokenizer.setTokenizer(i),this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=e.tokenRe,this.nonTokenRe=e.nonTokenRe,t||(e.attachToSession&&e.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(e.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode",{oldMode:n,mode:e}))}},this.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},this.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(e){s.warn("Could not load worker",e),this.$worker=null}},this.getMode=function(){return this.$mode},this.$scrollTop=0,this.setScrollTop=function(e){this.$scrollTop===e||isNaN(e)||(this.$scrollTop=e,this._signal("changeScrollTop",e))},this.getScrollTop=function(){return this.$scrollTop},this.$scrollLeft=0,this.setScrollLeft=function(e){this.$scrollLeft===e||isNaN(e)||(this.$scrollLeft=e,this._signal("changeScrollLeft",e))},this.getScrollLeft=function(){return this.$scrollLeft},this.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},this.getLineWidgetMaxWidth=function(){if(null!=this.lineWidgetsWidth)return this.lineWidgetsWidth;var e=0;return this.lineWidgets.forEach((function(t){t&&t.screenWidth>e&&(e=t.screenWidth)})),this.lineWidgetWidth=e},this.$computeWidth=function(e){if(this.$modified||e){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var t=this.doc.getAllLines(),n=this.$rowLengthCache,i=0,r=0,o=this.$foldData[r],s=o?o.start.row:1/0,a=t.length,l=0;l<a;l++){if(l>s){if((l=o.end.row+1)>=a)break;s=(o=this.$foldData[r++])?o.start.row:1/0}null==n[l]&&(n[l]=this.$getStringScreenWidth(t[l])[0]),n[l]>i&&(i=n[l])}this.screenWidth=i}},this.getLine=function(e){return this.doc.getLine(e)},this.getLines=function(e,t){return this.doc.getLines(e,t)},this.getLength=function(){return this.doc.getLength()},this.getTextRange=function(e){return this.doc.getTextRange(e||this.selection.getRange())},this.insert=function(e,t){return this.doc.insert(e,t)},this.remove=function(e){return this.doc.remove(e)},this.removeFullLines=function(e,t){return this.doc.removeFullLines(e,t)},this.undoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var n=e.length-1;-1!=n;n--){var i=e[n];"insert"==i.action||"remove"==i.action?this.doc.revertDelta(i):i.folds&&this.addFolds(i.folds)}!t&&this.$undoSelect&&(e.selectionBefore?this.selection.fromJSON(e.selectionBefore):this.selection.setRange(this.$getUndoSelection(e,!0))),this.$fromUndo=!1}},this.redoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var n=0;n<e.length;n++){var i=e[n];"insert"!=i.action&&"remove"!=i.action||this.doc.$safeApplyDelta(i)}!t&&this.$undoSelect&&(e.selectionAfter?this.selection.fromJSON(e.selectionAfter):this.selection.setRange(this.$getUndoSelection(e,!1))),this.$fromUndo=!1}},this.setUndoSelect=function(e){this.$undoSelect=e},this.$getUndoSelection=function(e,t){function n(e){return t?"insert"!==e.action:"insert"===e.action}for(var i,r,o=0;o<e.length;o++){var s=e[o];s.start&&(i?n(s)?(r=s.start,-1==i.compare(r.row,r.column)&&i.setStart(r),r=s.end,1==i.compare(r.row,r.column)&&i.setEnd(r)):(r=s.start,-1==i.compare(r.row,r.column)&&(i=u.fromPoints(s.start,s.start))):i=n(s)?u.fromPoints(s.start,s.end):u.fromPoints(s.start,s.start))}return i},this.replace=function(e,t){return this.doc.replace(e,t)},this.moveText=function(e,t,n){var i=this.getTextRange(e),r=this.getFoldsInRange(e),o=u.fromPoints(t,t);if(!n){this.remove(e);var s=e.start.row-e.end.row;(c=s?-e.end.column:e.start.column-e.end.column)&&(o.start.row==e.end.row&&o.start.column>e.end.column&&(o.start.column+=c),o.end.row==e.end.row&&o.end.column>e.end.column&&(o.end.column+=c)),s&&o.start.row>=e.end.row&&(o.start.row+=s,o.end.row+=s)}if(o.end=this.insert(o.start,i),r.length){var a=e.start,l=o.start,c=(s=l.row-a.row,l.column-a.column);this.addFolds(r.map((function(e){return(e=e.clone()).start.row==a.row&&(e.start.column+=c),e.end.row==a.row&&(e.end.column+=c),e.start.row+=s,e.end.row+=s,e})))}return o},this.indentRows=function(e,t,n){n=n.replace(/\t/g,this.getTabString());for(var i=e;i<=t;i++)this.doc.insertInLine({row:i,column:0},n)},this.outdentRows=function(e){for(var t=e.collapseRows(),n=new u(0,0,0,0),i=this.getTabSize(),r=t.start.row;r<=t.end.row;++r){var o=this.getLine(r);n.start.row=r,n.end.row=r;for(var s=0;s<i&&" "==o.charAt(s);++s);s<i&&"\t"==o.charAt(s)?(n.start.column=s,n.end.column=s+1):(n.start.column=0,n.end.column=s),this.remove(n)}},this.$moveLines=function(e,t,n){if(e=this.getRowFoldStart(e),t=this.getRowFoldEnd(t),n<0){if((r=this.getRowFoldStart(e+n))<0)return 0;var i=r-e}else if(n>0){var r;if((r=this.getRowFoldEnd(t+n))>this.doc.getLength()-1)return 0;i=r-t}else e=this.$clipRowToDocument(e),i=(t=this.$clipRowToDocument(t))-e+1;var o=new u(e,0,t,Number.MAX_VALUE),s=this.getFoldsInRange(o).map((function(e){return(e=e.clone()).start.row+=i,e.end.row+=i,e})),a=0==n?this.doc.getLines(e,t):this.doc.removeFullLines(e,t);return this.doc.insertFullLines(e+i,a),s.length&&this.addFolds(s),i},this.moveLinesUp=function(e,t){return this.$moveLines(e,t,-1)},this.moveLinesDown=function(e,t){return this.$moveLines(e,t,1)},this.duplicateLines=function(e,t){return this.$moveLines(e,t,0)},this.$clipRowToDocument=function(e){return Math.max(0,Math.min(e,this.doc.getLength()-1))},this.$clipColumnToRow=function(e,t){return t<0?0:Math.min(this.doc.getLine(e).length,t)},this.$clipPositionToDocument=function(e,t){if(t=Math.max(0,t),e<0)e=0,t=0;else{var n=this.doc.getLength();e>=n?(e=n-1,t=this.doc.getLine(n-1).length):t=Math.min(this.doc.getLine(e).length,t)}return{row:e,column:t}},this.$clipRangeToDocument=function(e){e.start.row<0?(e.start.row=0,e.start.column=0):e.start.column=this.$clipColumnToRow(e.start.row,e.start.column);var t=this.doc.getLength()-1;return e.end.row>t?(e.end.row=t,e.end.column=this.doc.getLine(t).length):e.end.column=this.$clipColumnToRow(e.end.row,e.end.column),e},this.$wrapLimit=80,this.$useWrapMode=!1,this.$wrapLimitRange={min:null,max:null},this.setUseWrapMode=function(e){if(e!=this.$useWrapMode){if(this.$useWrapMode=e,this.$modified=!0,this.$resetRowCache(0),e){var t=this.getLength();this.$wrapData=Array(t),this.$updateWrapData(0,t-1)}this._signal("changeWrapMode")}},this.getUseWrapMode=function(){return this.$useWrapMode},this.setWrapLimitRange=function(e,t){this.$wrapLimitRange.min===e&&this.$wrapLimitRange.max===t||(this.$wrapLimitRange={min:e,max:t},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},this.adjustWrapLimit=function(e,t){var n=this.$wrapLimitRange;n.max<0&&(n={min:t,max:t});var i=this.$constrainWrapLimit(e,n.min,n.max);return i!=this.$wrapLimit&&i>1&&(this.$wrapLimit=i,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0)},this.$constrainWrapLimit=function(e,t,n){return t&&(e=Math.max(t,e)),n&&(e=Math.min(n,e)),e},this.getWrapLimit=function(){return this.$wrapLimit},this.setWrapLimit=function(e){this.setWrapLimitRange(e,e)},this.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},this.$updateInternalDataOnChange=function(e){var t=this.$useWrapMode,n=e.action,i=e.start,r=e.end,o=i.row,s=r.row,a=s-o,l=null;if(this.$updating=!0,0!=a)if("remove"===n){this[t?"$wrapData":"$rowLengthCache"].splice(o,a);var c=this.$foldData;l=this.getFoldsInRange(e),this.removeFolds(l);var u=0;if(g=this.getFoldLine(r.row)){g.addRemoveChars(r.row,r.column,i.column-r.column),g.shiftRow(-a);var d=this.getFoldLine(o);d&&d!==g&&(d.merge(g),g=d),u=c.indexOf(g)+1}for(;u<c.length;u++)(g=c[u]).start.row>=r.row&&g.shiftRow(-a);s=o}else{var h=Array(a);h.unshift(o,0);var f=t?this.$wrapData:this.$rowLengthCache;if(f.splice.apply(f,h),c=this.$foldData,u=0,g=this.getFoldLine(o)){var p=g.range.compareInside(i.row,i.column);0==p?(g=g.split(i.row,i.column))&&(g.shiftRow(a),g.addRemoveChars(s,0,r.column-i.column)):-1==p&&(g.addRemoveChars(o,0,r.column-i.column),g.shiftRow(a)),u=c.indexOf(g)+1}for(;u<c.length;u++){var g;(g=c[u]).start.row>=o&&g.shiftRow(a)}}else a=Math.abs(e.start.column-e.end.column),"remove"===n&&(l=this.getFoldsInRange(e),this.removeFolds(l),a=-a),(g=this.getFoldLine(o))&&g.addRemoveChars(o,i.column,a);return t&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,t?this.$updateWrapData(o,s):this.$updateRowLengthCache(o,s),l},this.$updateRowLengthCache=function(e,t,n){this.$rowLengthCache[e]=null,this.$rowLengthCache[t]=null},this.$updateWrapData=function(n,i){var r,o,s=this.doc.getAllLines(),a=this.getTabSize(),l=this.$wrapData,c=this.$wrapLimit,u=n;for(i=Math.min(i,s.length-1);u<=i;)(o=this.getFoldLine(u,o))?(r=[],o.walk(function(n,i,o,a){var l;if(null!=n){(l=this.$getDisplayTokens(n,r.length))[0]=e;for(var c=1;c<l.length;c++)l[c]=t}else l=this.$getDisplayTokens(s[i].substring(a,o),r.length);r=r.concat(l)}.bind(this),o.end.row,s[o.end.row].length+1),l[o.start.row]=this.$computeWrapSplits(r,c,a),u=o.end.row+1):(r=this.$getDisplayTokens(s[u]),l[u]=this.$computeWrapSplits(r,c,a),u++)};var e=3,t=4;function n(e){return!(e<4352)&&(e>=4352&&e<=4447||e>=4515&&e<=4519||e>=4602&&e<=4607||e>=9001&&e<=9002||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12283||e>=12288&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12589||e>=12593&&e<=12686||e>=12688&&e<=12730||e>=12736&&e<=12771||e>=12784&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=13054||e>=13056&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=55216&&e<=55238||e>=55243&&e<=55291||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=65281&&e<=65376||e>=65504&&e<=65510)}this.$computeWrapSplits=function(n,i,r){if(0==n.length)return[];var o=[],s=n.length,a=0,l=0,c=this.$wrapAsCode,u=this.$indentedSoftWrap,d=i<=Math.max(2*r,8)||!1===u?0:Math.floor(i/2);function h(e){for(var t=e-a,i=a;i<e;i++){var s=n[i];12!==s&&2!==s||(t-=1)}o.length||(f=function(){var e=0;if(0===d)return e;if(u)for(var t=0;t<n.length;t++){var i=n[t];if(10==i)e+=1;else{if(11!=i){if(12==i)continue;break}e+=r}}return c&&!1!==u&&(e+=r),Math.min(e,d)}(),o.indent=f),l+=t,o.push(l),a=e}for(var f=0;s-a>i-f;){var p=a+i-f;if(n[p-1]>=10&&n[p]>=10)h(p);else if(n[p]!=e&&n[p]!=t){for(var g=Math.max(p-(i-(i>>2)),a-1);p>g&&n[p]<e;)p--;if(c){for(;p>g&&n[p]<e;)p--;for(;p>g&&9==n[p];)p--}else for(;p>g&&n[p]<10;)p--;p>g?h(++p):(2==n[p=a+i]&&p--,h(p-f))}else{for(;p!=a-1&&n[p]!=e;p--);if(p>a){h(p);continue}for(p=a+i;p<n.length&&n[p]==t;p++);if(p==n.length)break;h(p)}}return o},this.$getDisplayTokens=function(e,t){var i,r=[];t=t||0;for(var o=0;o<e.length;o++){var s=e.charCodeAt(o);if(9==s){i=this.getScreenTabSize(r.length+t),r.push(11);for(var a=1;a<i;a++)r.push(12)}else 32==s?r.push(10):s>39&&s<48||s>57&&s<64?r.push(9):s>=4352&&n(s)?r.push(1,2):r.push(1)}return r},this.$getStringScreenWidth=function(e,t,i){if(0==t)return[0,0];var r,o;for(null==t&&(t=1/0),i=i||0,o=0;o<e.length&&(9==(r=e.charCodeAt(o))?i+=this.getScreenTabSize(i):r>=4352&&n(r)?i+=2:i+=1,!(i>t));o++);return[i,o]},this.lineWidgets=null,this.getRowLength=function(e){var t=1;return this.lineWidgets&&(t+=this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0),this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+t:t},this.getRowLineCount=function(e){return this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1:1},this.getRowWrapIndent=function(e){if(this.$useWrapMode){var t=this.screenToDocumentPosition(e,Number.MAX_VALUE),n=this.$wrapData[t.row];return n.length&&n[0]<t.column?n.indent:0}return 0},this.getScreenLastRowColumn=function(e){var t=this.screenToDocumentPosition(e,Number.MAX_VALUE);return this.documentToScreenColumn(t.row,t.column)},this.getDocumentLastRowColumn=function(e,t){var n=this.documentToScreenRow(e,t);return this.getScreenLastRowColumn(n)},this.getDocumentLastRowColumnPosition=function(e,t){var n=this.documentToScreenRow(e,t);return this.screenToDocumentPosition(n,Number.MAX_VALUE/10)},this.getRowSplitData=function(e){return this.$useWrapMode?this.$wrapData[e]:void 0},this.getScreenTabSize=function(e){return this.$tabSize-(e%this.$tabSize|0)},this.screenToDocumentRow=function(e,t){return this.screenToDocumentPosition(e,t).row},this.screenToDocumentColumn=function(e,t){return this.screenToDocumentPosition(e,t).column},this.screenToDocumentPosition=function(e,t,n){if(e<0)return{row:0,column:0};var i,r,o=0,s=0,a=0,l=0,c=this.$screenRowCache,u=this.$getRowCacheIndex(c,e),d=c.length;if(d&&u>=0){a=c[u],o=this.$docRowCache[u];var h=e>c[d-1]}else h=!d;for(var f=this.getLength()-1,p=this.getNextFoldLine(o),g=p?p.start.row:1/0;a<=e&&!(a+(l=this.getRowLength(o))>e||o>=f);)a+=l,++o>g&&(o=p.end.row+1,g=(p=this.getNextFoldLine(o,p))?p.start.row:1/0),h&&(this.$docRowCache.push(o),this.$screenRowCache.push(a));if(p&&p.start.row<=o)i=this.getFoldDisplayLine(p),o=p.start.row;else{if(a+l<=e||o>f)return{row:f,column:this.getLine(f).length};i=this.getLine(o),p=null}var m=0,v=Math.floor(e-a);if(this.$useWrapMode){var b=this.$wrapData[o];b&&(r=b[v],v>0&&b.length&&(m=b.indent,s=b[v-1]||b[b.length-1],i=i.substring(s)))}return void 0!==n&&this.$bidiHandler.isBidiRow(a+v,o,v)&&(t=this.$bidiHandler.offsetToCol(n)),s+=this.$getStringScreenWidth(i,t-m)[1],this.$useWrapMode&&s>=r&&(s=r-1),p?p.idxToPosition(s):{row:o,column:s}},this.documentToScreenPosition=function(e,t){if(void 0===t)var n=this.$clipPositionToDocument(e.row,e.column);else n=this.$clipPositionToDocument(e,t);e=n.row,t=n.column;var i,r=0,o=null;(i=this.getFoldAt(e,t,1))&&(e=i.start.row,t=i.start.column);var s,a=0,l=this.$docRowCache,c=this.$getRowCacheIndex(l,e),u=l.length;if(u&&c>=0){a=l[c],r=this.$screenRowCache[c];var d=e>l[u-1]}else d=!u;for(var h=this.getNextFoldLine(a),f=h?h.start.row:1/0;a<e;){if(a>=f){if((s=h.end.row+1)>e)break;f=(h=this.getNextFoldLine(s,h))?h.start.row:1/0}else s=a+1;r+=this.getRowLength(a),a=s,d&&(this.$docRowCache.push(a),this.$screenRowCache.push(r))}var p="";h&&a>=f?(p=this.getFoldDisplayLine(h,e,t),o=h.start.row):(p=this.getLine(e).substring(0,t),o=e);var g=0;if(this.$useWrapMode){var m=this.$wrapData[o];if(m){for(var v=0;p.length>=m[v];)r++,v++;p=p.substring(m[v-1]||0,p.length),g=v>0?m.indent:0}}return this.lineWidgets&&this.lineWidgets[a]&&this.lineWidgets[a].rowsAbove&&(r+=this.lineWidgets[a].rowsAbove),{row:r,column:g+this.$getStringScreenWidth(p)[0]}},this.documentToScreenColumn=function(e,t){return this.documentToScreenPosition(e,t).column},this.documentToScreenRow=function(e,t){return this.documentToScreenPosition(e,t).row},this.getScreenLength=function(){var e=0,t=null;if(this.$useWrapMode)for(var n=this.$wrapData.length,i=0,r=(a=0,(t=this.$foldData[a++])?t.start.row:1/0);i<n;){var o=this.$wrapData[i];e+=o?o.length+1:1,++i>r&&(i=t.end.row+1,r=(t=this.$foldData[a++])?t.start.row:1/0)}else{e=this.getLength();for(var s=this.$foldData,a=0;a<s.length;a++)e-=(t=s[a]).end.row-t.start.row}return this.lineWidgets&&(e+=this.$getWidgetScreenLength()),e},this.$setFontMetrics=function(e){this.$enableVarChar&&(this.$getStringScreenWidth=function(t,n,i){if(0===n)return[0,0];var r,o;for(n||(n=1/0),i=i||0,o=0;o<t.length&&!((i+="\t"===(r=t.charAt(o))?this.getScreenTabSize(i):e.getCharacterWidth(r))>n);o++);return[i,o]})},this.destroy=function(){this.destroyed||(this.bgTokenizer.setDocument(null),this.bgTokenizer.cleanup(),this.destroyed=!0),this.$stopWorker(),this.removeAllListeners(),this.doc&&this.doc.off("change",this.$onChange),this.selection.detach()},this.isFullWidth=n}.call(p.prototype),e("./edit_session/folding").Folding.call(p.prototype),e("./edit_session/bracket_match").BracketMatch.call(p.prototype),s.defineOptions(p.prototype,"session",{wrap:{set:function(e){if(e&&"off"!=e?"free"==e?e=!0:"printMargin"==e?e=-1:"string"==typeof e&&(e=parseInt(e,10)||!1):e=!1,this.$wrap!=e)if(this.$wrap=e,e){var t="number"==typeof e?e:null;this.setWrapLimitRange(t,t),this.setUseWrapMode(!0)}else this.setUseWrapMode(!1)},get:function(){return this.getUseWrapMode()?-1==this.$wrap?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(e){(e="auto"==e?"text"!=this.$mode.type:"text"!=e)!=this.$wrapAsCode&&(this.$wrapAsCode=e,this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0)))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(e){this.$useWorker=e,this.$stopWorker(),e&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(e){(e=parseInt(e))>0&&this.$tabSize!==e&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=e,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(e){this.setFoldStyle(e)},handlesSet:!0},overwrite:{set:function(e){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(e){this.doc.setNewLineMode(e)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(e){this.setMode(e)},get:function(){return this.$modeId},handlesSet:!0}}),t.EditSession=p})),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],(function(e,t,n){"use strict";var i=e("./lib/lang"),r=e("./lib/oop"),o=e("./range").Range,s=function(){this.$options={}};(function(){this.set=function(e){return r.mixin(this.$options,e),this},this.getOptions=function(){return i.copyObject(this.$options)},this.setOptions=function(e){this.$options=e},this.find=function(e){var t=this.$options,n=this.$matchIterator(e,t);if(!n)return!1;var i=null;return n.forEach((function(e,n,r,s){return i=new o(e,n,r,s),!(n==s&&t.start&&t.start.start&&0!=t.skipCurrent&&i.isEqual(t.start)&&(i=null,1))})),i},this.findAll=function(e){var t=this.$options;if(!t.needle)return[];this.$assembleRegExp(t);var n=t.range,r=n?e.getLines(n.start.row,n.end.row):e.doc.getAllLines(),s=[],a=t.re;if(t.$isMultiLine){var l,c=a.length,u=r.length-c;e:for(var d=a.offset||0;d<=u;d++){for(var h=0;h<c;h++)if(-1==r[d+h].search(a[h]))continue e;var f=r[d],p=r[d+c-1],g=f.length-f.match(a[0])[0].length,m=p.match(a[c-1])[0].length;l&&l.end.row===d&&l.end.column>g||(s.push(l=new o(d,g,d+c-1,m)),c>2&&(d=d+c-2))}}else for(var v=0;v<r.length;v++){var b=i.getMatchOffsets(r[v],a);for(h=0;h<b.length;h++){var y=b[h];s.push(new o(v,y.offset,v,y.offset+y.length))}}if(n){var w=n.start.column,_=n.end.column;for(v=0,h=s.length-1;v<h&&s[v].start.column<w&&0==s[v].start.row;)v++;for(var A=n.end.row-n.start.row;v<h&&s[h].end.column>_&&s[h].end.row==A;)h--;for(s=s.slice(v,h+1),v=0,h=s.length;v<h;v++)s[v].start.row+=n.start.row,s[v].end.row+=n.start.row}return s},this.replace=function(e,t){var n=this.$options,i=this.$assembleRegExp(n);if(n.$isMultiLine)return t;if(i){var r=i.exec(e);if(!r||r[0].length!=e.length)return null;if(t=e.replace(i,t),n.preserveCase){t=t.split("");for(var o=Math.min(e.length,e.length);o--;){var s=e[o];s&&s.toLowerCase()!=s?t[o]=t[o].toUpperCase():t[o]=t[o].toLowerCase()}t=t.join("")}return t}},this.$assembleRegExp=function(e,t){if(e.needle instanceof RegExp)return e.re=e.needle;var n=e.needle;if(!e.needle)return e.re=!1;e.regExp||(n=i.escapeRegExp(n)),e.wholeWord&&(n=function(e,t){function n(e){return/\w/.test(e)||t.regExp?"\\b":""}return n(e[0])+e+n(e[e.length-1])}(n,e));var r=e.caseSensitive?"gm":"gmi";if(e.$isMultiLine=!t&&/[\n\r]/.test(n),e.$isMultiLine)return e.re=this.$assembleMultilineRegExp(n,r);try{var o=new RegExp(n,r)}catch(e){o=!1}return e.re=o},this.$assembleMultilineRegExp=function(e,t){for(var n=e.replace(/\r\n|\r|\n/g,"$\n^").split("\n"),i=[],r=0;r<n.length;r++)try{i.push(new RegExp(n[r],t))}catch(e){return!1}return i},this.$matchIterator=function(e,t){var n=this.$assembleRegExp(t);if(!n)return!1;var i=1==t.backwards,r=0!=t.skipCurrent,o=t.range,s=t.start;s||(s=o?o[i?"end":"start"]:e.selection.getRange()),s.start&&(s=s[r!=i?"end":"start"]);var a=o?o.start.row:0,l=o?o.end.row:e.getLength()-1;if(i)var c=function(e){var n=s.row;if(!d(n,s.column,e)){for(n--;n>=a;n--)if(d(n,Number.MAX_VALUE,e))return;if(0!=t.wrap)for(n=l,a=s.row;n>=a;n--)if(d(n,Number.MAX_VALUE,e))return}};else c=function(e){var n=s.row;if(!d(n,s.column,e)){for(n+=1;n<=l;n++)if(d(n,0,e))return;if(0!=t.wrap)for(n=a,l=s.row;n<=l;n++)if(d(n,0,e))return}};if(t.$isMultiLine)var u=n.length,d=function(t,r,o){var s=i?t-u+1:t;if(!(s<0||s+u>e.getLength())){var a=e.getLine(s),l=a.search(n[0]);if(!(!i&&l<r||-1===l)){for(var c=1;c<u;c++)if(-1==(a=e.getLine(s+c)).search(n[c]))return;var d=a.match(n[u-1])[0].length;if(!(i&&d>r))return!!o(s,l,s+u-1,d)||void 0}}};else d=i?function(t,i,r){var o,s=e.getLine(t),a=[],l=0;for(n.lastIndex=0;o=n.exec(s);){var c=o[0].length;if(l=o.index,!c){if(l>=s.length)break;n.lastIndex=l+=1}if(o.index+c>i)break;a.push(o.index,c)}for(var u=a.length-1;u>=0;u-=2){var d=a[u-1];if(r(t,d,t,d+(c=a[u])))return!0}}:function(t,i,r){var o,s,a=e.getLine(t);for(n.lastIndex=i;s=n.exec(a);){var l=s[0].length;if(r(t,o=s.index,t,o+l))return!0;if(!l&&(n.lastIndex=o+=1,o>=a.length))return!1}};return{forEach:c}}}).call(s.prototype),t.Search=s})),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],(function(e,t,n){"use strict";var i=e("../lib/keys"),r=e("../lib/useragent"),o=i.KEY_MODS;function s(e,t){this.platform=t||(r.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(e),this.$singleCommand=!0}function a(e,t){s.call(this,e,t),this.$singleCommand=!1}a.prototype=s.prototype,function(){function e(e){return"object"==typeof e&&e.bindKey&&e.bindKey.position||(e.isDefault?-100:0)}this.addCommand=function(e){this.commands[e.name]&&this.removeCommand(e),this.commands[e.name]=e,e.bindKey&&this._buildKeyHash(e)},this.removeCommand=function(e,t){var n=e&&("string"==typeof e?e:e.name);e=this.commands[n],t||delete this.commands[n];var i=this.commandKeyBinding;for(var r in i){var o=i[r];if(o==e)delete i[r];else if(Array.isArray(o)){var s=o.indexOf(e);-1!=s&&(o.splice(s,1),1==o.length&&(i[r]=o[0]))}}},this.bindKey=function(e,t,n){if("object"==typeof e&&e&&(null==n&&(n=e.position),e=e[this.platform]),e)return"function"==typeof t?this.addCommand({exec:t,bindKey:e,name:t.name||e}):void e.split("|").forEach((function(e){var i="";if(-1!=e.indexOf(" ")){var r=e.split(/\s+/);e=r.pop(),r.forEach((function(e){var t=this.parseKeys(e),n=o[t.hashId]+t.key;i+=(i?" ":"")+n,this._addCommandToBinding(i,"chainKeys")}),this),i+=" "}var s=this.parseKeys(e),a=o[s.hashId]+s.key;this._addCommandToBinding(i+a,t,n)}),this)},this._addCommandToBinding=function(t,n,i){var r,o=this.commandKeyBinding;if(n)if(!o[t]||this.$singleCommand)o[t]=n;else{Array.isArray(o[t])?-1!=(r=o[t].indexOf(n))&&o[t].splice(r,1):o[t]=[o[t]],"number"!=typeof i&&(i=e(n));var s=o[t];for(r=0;r<s.length&&!(e(s[r])>i);r++);s.splice(r,0,n)}else delete o[t]},this.addCommands=function(e){e&&Object.keys(e).forEach((function(t){var n=e[t];if(n){if("string"==typeof n)return this.bindKey(n,t);"function"==typeof n&&(n={exec:n}),"object"==typeof n&&(n.name||(n.name=t),this.addCommand(n))}}),this)},this.removeCommands=function(e){Object.keys(e).forEach((function(t){this.removeCommand(e[t])}),this)},this.bindKeys=function(e){Object.keys(e).forEach((function(t){this.bindKey(t,e[t])}),this)},this._buildKeyHash=function(e){this.bindKey(e.bindKey,e)},this.parseKeys=function(e){var t=e.toLowerCase().split(/[\-\+]([\-\+])?/).filter((function(e){return e})),n=t.pop(),r=i[n];if(i.FUNCTION_KEYS[r])n=i.FUNCTION_KEYS[r].toLowerCase();else{if(!t.length)return{key:n,hashId:-1};if(1==t.length&&"shift"==t[0])return{key:n.toUpperCase(),hashId:-1}}for(var o=0,s=t.length;s--;){var a=i.KEY_MODS[t[s]];if(null==a)return"undefined"!=typeof console&&console.error("invalid modifier "+t[s]+" in "+e),!1;o|=a}return{key:n,hashId:o}},this.findKeyCommand=function(e,t){var n=o[e]+t;return this.commandKeyBinding[n]},this.handleKeyboard=function(e,t,n,i){if(!(i<0)){var r=o[t]+n,s=this.commandKeyBinding[r];return e.$keyChain&&(e.$keyChain+=" "+r,s=this.commandKeyBinding[e.$keyChain]||s),!s||"chainKeys"!=s&&"chainKeys"!=s[s.length-1]?(e.$keyChain&&(t&&4!=t||1!=n.length?(-1==t||i>0)&&(e.$keyChain=""):e.$keyChain=e.$keyChain.slice(0,-r.length-1)),{command:s}):(e.$keyChain=e.$keyChain||r,{command:"null"})}},this.getStatusText=function(e,t){return t.$keyChain||""}}.call(s.prototype),t.HashHandler=s,t.MultiHashHandler=a})),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],(function(e,t,n){"use strict";var i=e("../lib/oop"),r=e("../keyboard/hash_handler").MultiHashHandler,o=e("../lib/event_emitter").EventEmitter,s=function(e,t){r.call(this,t,e),this.byName=this.commands,this.setDefaultHandler("exec",(function(e){return e.args?e.command.exec(e.editor,e.args,e.event,!1):e.command.exec(e.editor,{},e.event,!0)}))};i.inherits(s,r),function(){i.implement(this,o),this.exec=function(e,t,n){if(Array.isArray(e)){for(var i=e.length;i--;)if(this.exec(e[i],t,n))return!0;return!1}if("string"==typeof e&&(e=this.commands[e]),!e)return!1;if(t&&t.$readOnly&&!e.readOnly)return!1;if(0!=this.$checkCommandState&&e.isAvailable&&!e.isAvailable(t))return!1;var r={editor:t,command:e,args:n};return r.returnValue=this._emit("exec",r),this._signal("afterExec",r),!1!==r.returnValue},this.toggleRecording=function(e){if(!this.$inReplay)return e&&e._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(e){this.macro.push([e.command,e.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},this.replay=function(e){if(!this.$inReplay&&this.macro){if(this.recording)return this.toggleRecording(e);try{this.$inReplay=!0,this.macro.forEach((function(t){"string"==typeof t?this.exec(t,e):this.exec(t[0],e,t[1])}),this)}finally{this.$inReplay=!1}}},this.trimMacro=function(e){return e.map((function(e){return"string"!=typeof e[0]&&(e[0]=e[0].name),e[1]||(e=e[0]),e}))}}.call(s.prototype),t.CommandManager=s})),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],(function(e,t,n){"use strict";var i=e("../lib/lang"),r=e("../config"),o=e("../range").Range;function s(e,t){return{win:e,mac:t}}t.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:s("Ctrl-,","Command-,"),exec:function(e){r.loadModule("ace/ext/settings_menu",(function(t){t.init(e),e.showSettingsMenu()}))},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:s("Alt-E","F4"),exec:function(e){r.loadModule("./ext/error_marker",(function(t){t.showErrorMarker(e,1)}))},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:s("Alt-Shift-E","Shift-F4"),exec:function(e){r.loadModule("./ext/error_marker",(function(t){t.showErrorMarker(e,-1)}))},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:s("Ctrl-A","Command-A"),exec:function(e){e.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:s(null,"Ctrl-L"),exec:function(e){e.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:s("Ctrl-L","Command-L"),exec:function(e,t){"number"!=typeof t||isNaN(t)||e.gotoLine(t),e.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:s("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(e){e.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:s("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(e){e.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:s("F2","F2"),exec:function(e){e.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:s("Alt-F2","Alt-F2"),exec:function(e){e.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:s(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:s(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:s("Alt-0","Command-Option-0"),exec:function(e){e.session.foldAll(),e.session.unfold(e.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:s("Alt-Shift-0","Command-Option-Shift-0"),exec:function(e){e.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:s("Ctrl-K","Command-G"),exec:function(e){e.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:s("Ctrl-Shift-K","Command-Shift-G"),exec:function(e){e.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:s("Alt-K","Ctrl-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:s("Alt-Shift-K","Ctrl-Shift-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:s("Ctrl-F","Command-F"),exec:function(e){r.loadModule("ace/ext/searchbox",(function(t){t.Search(e)}))},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(e){e.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:s("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(e){e.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:s("Ctrl-Home","Command-Home|Command-Up"),exec:function(e){e.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:s("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(e){e.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:s("Up","Up|Ctrl-P"),exec:function(e,t){e.navigateUp(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:s("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(e){e.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:s("Ctrl-End","Command-End|Command-Down"),exec:function(e){e.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:s("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(e){e.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:s("Down","Down|Ctrl-N"),exec:function(e,t){e.navigateDown(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:s("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(e){e.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:s("Ctrl-Left","Option-Left"),exec:function(e){e.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:s("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:s("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(e){e.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:s("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(e){e.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:s("Left","Left|Ctrl-B"),exec:function(e,t){e.navigateLeft(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:s("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(e){e.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:s("Ctrl-Right","Option-Right"),exec:function(e){e.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:s("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:s("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(e){e.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:s("Shift-Right","Shift-Right"),exec:function(e){e.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:s("Right","Right|Ctrl-F"),exec:function(e,t){e.navigateRight(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(e){e.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:s(null,"Option-PageDown"),exec:function(e){e.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:s("PageDown","PageDown|Ctrl-V"),exec:function(e){e.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(e){e.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:s(null,"Option-PageUp"),exec:function(e){e.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(e){e.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:s("Ctrl-Up",null),exec:function(e){e.renderer.scrollBy(0,-2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:s("Ctrl-Down",null),exec:function(e){e.renderer.scrollBy(0,2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:s("Ctrl-Alt-E","Command-Option-E"),exec:function(e){e.commands.toggleRecording(e)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:s("Ctrl-Shift-E","Command-Shift-E"),exec:function(e){e.commands.replay(e)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:s("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(e){e.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:s("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(e){e.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:s("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(e){e.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:s(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(e){},readOnly:!0},{name:"cut",description:"Cut",exec:function(e){var t=e.$copyWithEmptySelection&&e.selection.isEmpty()?e.selection.getLineRange():e.selection.getRange();e._emit("cut",t),t.isEmpty()||e.session.remove(t),e.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(e,t){e.$handlePaste(t)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:s("Ctrl-D","Command-D"),exec:function(e){e.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:s("Ctrl-Shift-D","Command-Shift-D"),exec:function(e){e.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:s("Ctrl-Alt-S","Command-Alt-S"),exec:function(e){e.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:s("Ctrl-/","Command-/"),exec:function(e){e.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:s("Ctrl-Shift-/","Command-Shift-/"),exec:function(e){e.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:s("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(e){e.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:s("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(e){e.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:s("Ctrl-H","Command-Option-F"),exec:function(e){r.loadModule("ace/ext/searchbox",(function(t){t.Search(e,!0)}))}},{name:"undo",description:"Undo",bindKey:s("Ctrl-Z","Command-Z"),exec:function(e){e.undo()}},{name:"redo",description:"Redo",bindKey:s("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(e){e.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:s("Alt-Shift-Up","Command-Option-Up"),exec:function(e){e.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:s("Alt-Up","Option-Up"),exec:function(e){e.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:s("Alt-Shift-Down","Command-Option-Down"),exec:function(e){e.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:s("Alt-Down","Option-Down"),exec:function(e){e.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:s("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(e){e.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:s("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(e){e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:s("Shift-Delete",null),exec:function(e){if(!e.selection.isEmpty())return!1;e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:s("Alt-Backspace","Command-Backspace"),exec:function(e){e.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:s("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(e){e.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:s("Ctrl-Shift-Backspace",null),exec:function(e){var t=e.selection.getRange();t.start.column=0,e.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:s("Ctrl-Shift-Delete",null),exec:function(e){var t=e.selection.getRange();t.end.column=Number.MAX_VALUE,e.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:s("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(e){e.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:s("Ctrl-Delete","Alt-Delete"),exec:function(e){e.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:s("Shift-Tab","Shift-Tab"),exec:function(e){e.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:s("Tab","Tab"),exec:function(e){e.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:s("Ctrl-[","Ctrl-["),exec:function(e){e.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:s("Ctrl-]","Ctrl-]"),exec:function(e){e.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(e,t){e.insert(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(e,t){e.insert(i.stringRepeat(t.text||"",t.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:s(null,"Ctrl-O"),exec:function(e){e.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:s("Alt-Shift-X","Ctrl-T"),exec:function(e){e.transposeLetters()},multiSelectAction:function(e){e.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:s("Ctrl-U","Ctrl-U"),exec:function(e){e.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:s("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(e){e.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:s(null,null),exec:function(e){e.autoIndent()},multiSelectAction:"forEachLine",scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:s("Ctrl-Shift-L","Command-Shift-L"),exec:function(e){var t=e.selection.getRange();t.start.column=t.end.column=0,t.end.row++,e.selection.setRange(t,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:s("Ctrl+F3","F3"),exec:function(e){e.openLink()}},{name:"joinlines",description:"Join lines",bindKey:s(null,null),exec:function(e){for(var t=e.selection.isBackwards(),n=t?e.selection.getSelectionLead():e.selection.getSelectionAnchor(),r=t?e.selection.getSelectionAnchor():e.selection.getSelectionLead(),s=e.session.doc.getLine(n.row).length,a=e.session.doc.getTextRange(e.selection.getRange()).replace(/\n\s*/," ").length,l=e.session.doc.getLine(n.row),c=n.row+1;c<=r.row+1;c++){var u=i.stringTrimLeft(i.stringTrimRight(e.session.doc.getLine(c)));0!==u.length&&(u=" "+u),l+=u}r.row+1<e.session.doc.getLength()-1&&(l+=e.session.doc.getNewLineCharacter()),e.clearSelection(),e.session.doc.replace(new o(n.row,0,r.row+2,0),l),a>0?(e.selection.moveCursorTo(n.row,n.column),e.selection.selectTo(n.row,n.column+a)):(s=e.session.doc.getLine(n.row).length>s?s+1:s,e.selection.moveCursorTo(n.row,s))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:s(null,null),exec:function(e){var t=e.session.doc.getLength()-1,n=e.session.doc.getLine(t).length,i=e.selection.rangeList.ranges,r=[];i.length<1&&(i=[e.selection.getRange()]);for(var s=0;s<i.length;s++)s==i.length-1&&(i[s].end.row===t&&i[s].end.column===n||r.push(new o(i[s].end.row,i[s].end.column,t,n))),0===s?0===i[s].start.row&&0===i[s].start.column||r.push(new o(0,0,i[s].start.row,i[s].start.column)):r.push(new o(i[s-1].end.row,i[s-1].end.column,i[s].start.row,i[s].start.column));for(e.exitMultiSelectMode(),e.clearSelection(),s=0;s<r.length;s++)e.selection.addRange(r[s],!1)},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",description:"Add new line after the current line",exec:function(e){e.selection.clearSelection(),e.navigateLineEnd(),e.insert("\n")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"addLineBefore",description:"Add new line before the current line",exec:function(e){e.selection.clearSelection();var t=e.getCursorPosition();e.selection.moveTo(t.row-1,Number.MAX_VALUE),e.insert("\n"),0===t.row&&e.navigateUp()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",description:"Open command palette",bindKey:s("F1","F1"),exec:function(e){e.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:s(null,null),exec:function(e){e.prompt({$type:"modes"})},readOnly:!0}];for(var a=1;a<9;a++)t.commands.push({name:"foldToLevel"+a,description:"Fold To Level "+a,level:a,exec:function(e){e.session.foldToLevel(this.level)},scrollIntoView:"center",readOnly:!0})})),ace.define("ace/editor",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator","ace/clipboard"],(function(e,t,n){"use strict";var i=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},r=e("./lib/oop"),o=e("./lib/dom"),s=e("./lib/lang"),a=e("./lib/useragent"),l=e("./keyboard/textinput").TextInput,c=e("./mouse/mouse_handler").MouseHandler,u=e("./mouse/fold_handler").FoldHandler,d=e("./keyboard/keybinding").KeyBinding,h=e("./edit_session").EditSession,f=e("./search").Search,p=e("./range").Range,g=e("./lib/event_emitter").EventEmitter,m=e("./commands/command_manager").CommandManager,v=e("./commands/default_commands").commands,b=e("./config"),y=e("./token_iterator").TokenIterator,w=e("./clipboard"),_=function(e,t,n){this.$toDestroy=[];var i=e.getContainerElement();this.container=i,this.renderer=e,this.id="editor"+ ++_.$uid,this.commands=new m(a.isMac?"mac":"win",v),"object"==typeof document&&(this.textInput=new l(e.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new c(this),new u(this)),this.keyBinding=new d(this),this.$search=(new f).set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=s.delayedCall(function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}.bind(this)),this.on("change",(function(e,t){t._$emitInputEvent.schedule(31)})),this.setSession(t||n&&n.session||new h("")),b.resetOptions(this),n&&this.setOptions(n),b._signal("editor",this)};_.$uid=0,function(){r.implement(this,g),this.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0),this.$opResetTimer=s.delayedCall(this.endOperation.bind(this,!0)),this.on("change",function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.docChanged=!0}.bind(this),!0),this.on("changeSelection",function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.selectionChanged=!0}.bind(this),!0)},this.curOp=null,this.prevOp={},this.startOperation=function(e){if(this.curOp){if(!e||this.curOp.command)return;this.prevOp=this.curOp}e||(this.previousCommand=null,e={}),this.$opResetTimer.schedule(),this.curOp=this.session.curOp={command:e.command||{},args:e.args,scrollTop:this.renderer.scrollTop},this.curOp.selectionBefore=this.selection.toJSON()},this.endOperation=function(e){if(this.curOp&&this.session){if(e&&!1===e.returnValue||!this.session)return this.curOp=null;if(1==e&&this.curOp.command&&"mouse"==this.curOp.command.name)return;if(this._signal("beforeEndOperation"),!this.curOp)return;var t=this.curOp.command,n=t&&t.scrollIntoView;if(n){switch(n){case"center-animate":n="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var i=this.selection.getRange(),r=this.renderer.layerConfig;(i.start.row>=r.lastRow||i.end.row<=r.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead)}"animate"==n&&this.renderer.animateScrolling(this.curOp.scrollTop)}var o=this.selection.toJSON();this.curOp.selectionAfter=o,this.$lastSel=this.selection.toJSON(),this.session.getUndoManager().addSelection(o),this.prevOp=this.curOp,this.curOp=null}},this.$mergeableCommands=["backspace","del","insertstring"],this.$historyTracker=function(e){if(this.$mergeUndoDeltas){var t=this.prevOp,n=this.$mergeableCommands,i=t.command&&e.command.name==t.command.name;if("insertstring"==e.command.name){var r=e.args;void 0===this.mergeNextCommand&&(this.mergeNextCommand=!0),i=i&&this.mergeNextCommand&&(!/\s/.test(r)||/\s/.test(t.args)),this.mergeNextCommand=!0}else i=i&&-1!==n.indexOf(e.command.name);"always"!=this.$mergeUndoDeltas&&Date.now()-this.sequenceStartTime>2e3&&(i=!1),i?this.session.mergeUndoDeltas=!0:-1!==n.indexOf(e.command.name)&&(this.sequenceStartTime=Date.now())}},this.setKeyboardHandler=function(e,t){if(e&&"string"==typeof e&&"ace"!=e){this.$keybindingId=e;var n=this;b.loadModule(["keybinding",e],(function(i){n.$keybindingId==e&&n.keyBinding.setKeyboardHandler(i&&i.handler),t&&t()}))}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(e),t&&t()},this.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},this.setSession=function(e){if(this.session!=e){this.curOp&&this.endOperation(),this.curOp={};var t=this.session;if(t){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange);var n=this.session.getSelection();n.off("changeCursor",this.$onCursorChange),n.off("changeSelection",this.$onSelectionChange)}this.session=e,e?(this.$onDocumentChange=this.onDocumentChange.bind(this),e.on("change",this.$onDocumentChange),this.renderer.setSession(e),this.$onChangeMode=this.onChangeMode.bind(this),e.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),e.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),e.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),e.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),e.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),e.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=e.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(e)),this._signal("changeSession",{session:e,oldSession:t}),this.curOp=null,t&&t._signal("changeEditor",{oldEditor:this}),e&&e._signal("changeEditor",{editor:this}),e&&!e.destroyed&&e.bgTokenizer.scheduleStart()}},this.getSession=function(){return this.session},this.setValue=function(e,t){return this.session.doc.setValue(e),t?1==t?this.navigateFileEnd():-1==t&&this.navigateFileStart():this.selectAll(),e},this.getValue=function(){return this.session.getValue()},this.getSelection=function(){return this.selection},this.resize=function(e){this.renderer.onResize(e)},this.setTheme=function(e,t){this.renderer.setTheme(e,t)},this.getTheme=function(){return this.renderer.getTheme()},this.setStyle=function(e){this.renderer.setStyle(e)},this.unsetStyle=function(e){this.renderer.unsetStyle(e)},this.getFontSize=function(){return this.getOption("fontSize")||o.computedStyle(this.container).fontSize},this.setFontSize=function(e){this.setOption("fontSize",e)},this.$highlightBrackets=function(){if(!this.$highlightPending){var e=this;this.$highlightPending=!0,setTimeout((function(){e.$highlightPending=!1;var t=e.session;if(t&&!t.destroyed){t.$bracketHighlight&&(t.$bracketHighlight.markerIds.forEach((function(e){t.removeMarker(e)})),t.$bracketHighlight=null);var n=e.getCursorPosition(),i=e.getKeyboardHandler(),r=i&&i.$getDirectionForHighlight&&i.$getDirectionForHighlight(e),o=t.getMatchingBracketRanges(n,r);if(!o){var s=new y(t,n.row,n.column).getCurrentToken();if(s&&/\b(?:tag-open|tag-name)/.test(s.type)){var a=t.getMatchingTags(n);a&&(o=[a.openTagName,a.closeTagName])}}if(!o&&t.$mode.getMatching&&(o=t.$mode.getMatching(e.session)),o){var l="ace_bracket";Array.isArray(o)?1==o.length&&(l="ace_error_bracket"):o=[o],2==o.length&&(0==p.comparePoints(o[0].end,o[1].start)?o=[p.fromPoints(o[0].start,o[1].end)]:0==p.comparePoints(o[0].start,o[1].end)&&(o=[p.fromPoints(o[1].start,o[0].end)])),t.$bracketHighlight={ranges:o,markerIds:o.map((function(e){return t.addMarker(e,l,"text")}))},e.getHighlightIndentGuides()&&e.renderer.$textLayer.$highlightIndentGuide()}else e.getHighlightIndentGuides()&&e.renderer.$textLayer.$highlightIndentGuide()}}),50)}},this.focus=function(){this.textInput.focus()},this.isFocused=function(){return this.textInput.isFocused()},this.blur=function(){this.textInput.blur()},this.onFocus=function(e){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",e))},this.onBlur=function(e){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",e))},this.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},this.onDocumentChange=function(e){var t=this.session.$useWrapMode,n=e.start.row==e.end.row?e.end.row:1/0;this.renderer.updateLines(e.start.row,n,t),this._signal("change",e),this.$cursorChange()},this.onTokenizerUpdate=function(e){var t=e.data;this.renderer.updateLines(t.first,t.last)},this.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},this.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},this.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},this.$updateHighlightActiveLine=function(){var e,t=this.getSession();if(this.$highlightActiveLine&&("line"==this.$selectionStyle&&this.selection.isMultiLine()||(e=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(e=!1),!this.renderer.$maxLines||1!==this.session.getLength()||this.renderer.$minLines>1||(e=!1)),t.$highlightLineMarker&&!e)t.removeMarker(t.$highlightLineMarker.id),t.$highlightLineMarker=null;else if(!t.$highlightLineMarker&&e){var n=new p(e.row,e.column,e.row,1/0);n.id=t.addMarker(n,"ace_active-line","screenLine"),t.$highlightLineMarker=n}else e&&(t.$highlightLineMarker.start.row=e.row,t.$highlightLineMarker.end.row=e.row,t.$highlightLineMarker.start.column=e.column,t._signal("changeBackMarker"))},this.onSelectionChange=function(e){var t=this.session;if(t.$selectionMarker&&t.removeMarker(t.$selectionMarker),t.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var n=this.selection.getRange(),i=this.getSelectionStyle();t.$selectionMarker=t.addMarker(n,"ace_selection",i)}var r=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(r),this._signal("changeSelection")},this.$getSelectionHighLightRegexp=function(){var e=this.session,t=this.getSelectionRange();if(!t.isEmpty()&&!t.isMultiLine()){var n=t.start.column,i=t.end.column,r=e.getLine(t.start.row),o=r.substring(n,i);if(!(o.length>5e3)&&/[\w\d]/.test(o)){var s=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:o}),a=r.substring(n-1,i+1);if(s.test(a))return s}}},this.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},this.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},this.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},this.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},this.onChangeMode=function(e){this.renderer.updateText(),this._emit("changeMode",e)},this.onChangeWrapLimit=function(){this.renderer.updateFull()},this.onChangeWrapMode=function(){this.renderer.onResize(!0)},this.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},this.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},this.getCopyText=function(){var e=this.getSelectedText(),t=this.session.doc.getNewLineCharacter(),n=!1;if(!e&&this.$copyWithEmptySelection){n=!0;for(var i=this.selection.getAllRanges(),r=0;r<i.length;r++){var o=i[r];r&&i[r-1].start.row==o.start.row||(e+=this.session.getLine(o.start.row)+t)}}var s={text:e};return this._signal("copy",s),w.lineMode=!!n&&s.text,s.text},this.onCopy=function(){this.commands.exec("copy",this)},this.onCut=function(){this.commands.exec("cut",this)},this.onPaste=function(e,t){var n={text:e,event:t};this.commands.exec("paste",this,n)},this.$handlePaste=function(e){"string"==typeof e&&(e={text:e}),this._signal("paste",e);var t=e.text,n=t===w.lineMode,i=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)n?i.insert({row:this.selection.lead.row,column:0},t):this.insert(t);else if(n)this.selection.rangeList.ranges.forEach((function(e){i.insert({row:e.start.row,column:0},t)}));else{var r=t.split(/\r\n|\r|\n/),o=this.selection.rangeList.ranges,s=!(2!=r.length||r[0]&&r[1]);if(r.length!=o.length||s)return this.commands.exec("insertstring",this,t);for(var a=o.length;a--;){var l=o[a];l.isEmpty()||i.remove(l),i.insert(l.start,r[a])}}},this.execCommand=function(e,t){return this.commands.exec(e,this,t)},this.insert=function(e,t){var n=this.session,i=n.getMode(),r=this.getCursorPosition();if(this.getBehavioursEnabled()&&!t){var o=i.transformAction(n.getState(r.row),"insertion",this,n,e);o&&(e!==o.text&&(this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1)),e=o.text)}if("\t"==e&&(e=this.session.getTabString()),this.selection.isEmpty())this.session.getOverwrite()&&-1==e.indexOf("\n")&&((s=new p.fromPoints(r,r)).end.column+=e.length,this.session.remove(s));else{var s=this.getSelectionRange();r=this.session.remove(s),this.clearSelection()}if("\n"==e||"\r\n"==e){var a=n.getLine(r.row);if(r.column>a.search(/\S|$/)){var l=a.substr(r.column).search(/\S|$/);n.doc.removeInLine(r.row,r.column,r.column+l)}}this.clearSelection();var c=r.column,u=n.getState(r.row),d=(a=n.getLine(r.row),i.checkOutdent(u,a,e));if(n.insert(r,e),o&&o.selection&&(2==o.selection.length?this.selection.setSelectionRange(new p(r.row,c+o.selection[0],r.row,c+o.selection[1])):this.selection.setSelectionRange(new p(r.row+o.selection[0],o.selection[1],r.row+o.selection[2],o.selection[3]))),this.$enableAutoIndent){if(n.getDocument().isNewLine(e)){var h=i.getNextLineIndent(u,a.slice(0,r.column),n.getTabString());n.insert({row:r.row+1,column:0},h)}d&&i.autoOutdent(u,n,r.row)}},this.autoIndent=function(){var e,t,n=this.session,i=n.getMode();if(this.selection.isEmpty())e=0,t=n.doc.getLength()-1;else{var r=this.getSelectionRange();e=r.start.row,t=r.end.row}for(var o,s,a,l="",c="",u="",d=n.getTabString(),h=e;h<=t;h++)h>0&&(l=n.getState(h-1),c=n.getLine(h-1),u=i.getNextLineIndent(l,c,d)),o=n.getLine(h),u!==(s=i.$getIndent(o))&&(s.length>0&&(a=new p(h,0,h,s.length),n.remove(a)),u.length>0&&n.insert({row:h,column:0},u)),i.autoOutdent(l,n,h)},this.onTextInput=function(e,t){if(!t)return this.keyBinding.onTextInput(e);this.startOperation({command:{name:"insertstring"}});var n=this.applyComposition.bind(this,e,t);this.selection.rangeCount?this.forEachSelection(n):n(),this.endOperation()},this.applyComposition=function(e,t){var n;(t.extendLeft||t.extendRight)&&((n=this.selection.getRange()).start.column-=t.extendLeft,n.end.column+=t.extendRight,n.start.column<0&&(n.start.row--,n.start.column+=this.session.getLine(n.start.row).length+1),this.selection.setRange(n),e||n.isEmpty()||this.remove()),!e&&this.selection.isEmpty()||this.insert(e,!0),(t.restoreStart||t.restoreEnd)&&((n=this.selection.getRange()).start.column-=t.restoreStart,n.end.column-=t.restoreEnd,this.selection.setRange(n))},this.onCommandKey=function(e,t,n){return this.keyBinding.onCommandKey(e,t,n)},this.setOverwrite=function(e){this.session.setOverwrite(e)},this.getOverwrite=function(){return this.session.getOverwrite()},this.toggleOverwrite=function(){this.session.toggleOverwrite()},this.setScrollSpeed=function(e){this.setOption("scrollSpeed",e)},this.getScrollSpeed=function(){return this.getOption("scrollSpeed")},this.setDragDelay=function(e){this.setOption("dragDelay",e)},this.getDragDelay=function(){return this.getOption("dragDelay")},this.setSelectionStyle=function(e){this.setOption("selectionStyle",e)},this.getSelectionStyle=function(){return this.getOption("selectionStyle")},this.setHighlightActiveLine=function(e){this.setOption("highlightActiveLine",e)},this.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.setHighlightSelectedWord=function(e){this.setOption("highlightSelectedWord",e)},this.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},this.setAnimatedScroll=function(e){this.renderer.setAnimatedScroll(e)},this.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},this.setShowInvisibles=function(e){this.renderer.setShowInvisibles(e)},this.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},this.setDisplayIndentGuides=function(e){this.renderer.setDisplayIndentGuides(e)},this.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},this.setHighlightIndentGuides=function(e){this.renderer.setHighlightIndentGuides(e)},this.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},this.setShowPrintMargin=function(e){this.renderer.setShowPrintMargin(e)},this.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},this.setPrintMarginColumn=function(e){this.renderer.setPrintMarginColumn(e)},this.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},this.setReadOnly=function(e){this.setOption("readOnly",e)},this.getReadOnly=function(){return this.getOption("readOnly")},this.setBehavioursEnabled=function(e){this.setOption("behavioursEnabled",e)},this.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},this.setWrapBehavioursEnabled=function(e){this.setOption("wrapBehavioursEnabled",e)},this.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},this.setShowFoldWidgets=function(e){this.setOption("showFoldWidgets",e)},this.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.remove=function(e){this.selection.isEmpty()&&("left"==e?this.selection.selectLeft():this.selection.selectRight());var t=this.getSelectionRange();if(this.getBehavioursEnabled()){var n=this.session,i=n.getState(t.start.row),r=n.getMode().transformAction(i,"deletion",this,n,t);if(0===t.end.column){var o=n.getTextRange(t);if("\n"==o[o.length-1]){var s=n.getLine(t.end.row);/^\s+$/.test(s)&&(t.end.column=s.length)}}r&&(t=r)}this.session.remove(t),this.clearSelection()},this.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var e=this.getSelectionRange();e.start.column==e.end.column&&e.start.row==e.end.row&&(e.end.column=0,e.end.row++),this.session.remove(e),this.clearSelection()},this.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var e=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(e)},this.transposeLetters=function(){if(this.selection.isEmpty()){var e=this.getCursorPosition(),t=e.column;if(0!==t){var n,i,r=this.session.getLine(e.row);t<r.length?(n=r.charAt(t)+r.charAt(t-1),i=new p(e.row,t-1,e.row,t+1)):(n=r.charAt(t-1)+r.charAt(t-2),i=new p(e.row,t-2,e.row,t)),this.session.replace(i,n),this.session.selection.moveToPosition(i.end)}}},this.toLowerCase=function(){var e=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var t=this.getSelectionRange(),n=this.session.getTextRange(t);this.session.replace(t,n.toLowerCase()),this.selection.setSelectionRange(e)},this.toUpperCase=function(){var e=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var t=this.getSelectionRange(),n=this.session.getTextRange(t);this.session.replace(t,n.toUpperCase()),this.selection.setSelectionRange(e)},this.indent=function(){var e=this.session,t=this.getSelectionRange();if(!(t.start.row<t.end.row)){if(t.start.column<t.end.column){var n=e.getTextRange(t);if(!/^\s+$/.test(n))return u=this.$getSelectedRows(),void e.indentRows(u.first,u.last,"\t")}var i=e.getLine(t.start.row),r=t.start,o=e.getTabSize(),a=e.documentToScreenColumn(r.row,r.column);if(this.session.getUseSoftTabs())var l=o-a%o,c=s.stringRepeat(" ",l);else{for(l=a%o;" "==i[t.start.column-1]&&l;)t.start.column--,l--;this.selection.setSelectionRange(t),c="\t"}return this.insert(c)}var u=this.$getSelectedRows();e.indentRows(u.first,u.last,"\t")},this.blockIndent=function(){var e=this.$getSelectedRows();this.session.indentRows(e.first,e.last,"\t")},this.blockOutdent=function(){var e=this.session.getSelection();this.session.outdentRows(e.getRange())},this.sortLines=function(){for(var e=this.$getSelectedRows(),t=this.session,n=[],i=e.first;i<=e.last;i++)n.push(t.getLine(i));n.sort((function(e,t){return e.toLowerCase()<t.toLowerCase()?-1:e.toLowerCase()>t.toLowerCase()?1:0}));var r=new p(0,0,0,0);for(i=e.first;i<=e.last;i++){var o=t.getLine(i);r.start.row=i,r.end.row=i,r.end.column=o.length,t.replace(r,n[i-e.first])}},this.toggleCommentLines=function(){var e=this.session.getState(this.getCursorPosition().row),t=this.$getSelectedRows();this.session.getMode().toggleCommentLines(e,this.session,t.first,t.last)},this.toggleBlockComment=function(){var e=this.getCursorPosition(),t=this.session.getState(e.row),n=this.getSelectionRange();this.session.getMode().toggleBlockComment(t,this.session,n,e)},this.getNumberAt=function(e,t){var n=/[\-]?[0-9]+(?:\.[0-9]+)?/g;n.lastIndex=0;for(var i=this.session.getLine(e);n.lastIndex<t;){var r=n.exec(i);if(r.index<=t&&r.index+r[0].length>=t)return{value:r[0],start:r.index,end:r.index+r[0].length}}return null},this.modifyNumber=function(e){var t=this.selection.getCursor().row,n=this.selection.getCursor().column,i=new p(t,n-1,t,n),r=this.session.getTextRange(i);if(!isNaN(parseFloat(r))&&isFinite(r)){var o=this.getNumberAt(t,n);if(o){var s=o.value.indexOf(".")>=0?o.start+o.value.indexOf(".")+1:o.end,a=o.start+o.value.length-s,l=parseFloat(o.value);l*=Math.pow(10,a),s!==o.end&&n<s?e*=Math.pow(10,o.end-n-1):e*=Math.pow(10,o.end-n),l+=e;var c=(l/=Math.pow(10,a)).toFixed(a),u=new p(t,o.start,t,o.end);this.session.replace(u,c),this.moveCursorTo(t,Math.max(o.start+1,n+c.length-o.value.length))}}else this.toggleWord()},this.$toggleWordPairs=[["first","last"],["true","false"],["yes","no"],["width","height"],["top","bottom"],["right","left"],["on","off"],["x","y"],["get","set"],["max","min"],["horizontal","vertical"],["show","hide"],["add","remove"],["up","down"],["before","after"],["even","odd"],["in","out"],["inside","outside"],["next","previous"],["increase","decrease"],["attach","detach"],["&&","||"],["==","!="]],this.toggleWord=function(){var e=this.selection.getCursor().row,t=this.selection.getCursor().column;this.selection.selectWord();var n=this.getSelectedText(),i=this.selection.getWordRange().start.column,r=n.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),o=t-i-1;o<0&&(o=0);var a=0,l=0,c=this;n.match(/[A-Za-z0-9_]+/)&&r.forEach((function(t,r){l=a+t.length,o>=a&&o<=l&&(n=t,c.selection.clearSelection(),c.moveCursorTo(e,a+i),c.selection.selectTo(e,l+i)),a=l}));for(var u,d=this.$toggleWordPairs,h=0;h<d.length;h++)for(var f=d[h],p=0;p<=1;p++){var g=+!p,m=n.match(new RegExp("^\\s?_?("+s.escapeRegExp(f[p])+")\\s?$","i"));m&&n.match(new RegExp("([_]|^|\\s)("+s.escapeRegExp(m[1])+")($|\\s)","g"))&&(u=n.replace(new RegExp(s.escapeRegExp(f[p]),"i"),(function(e){var t=f[g];return e.toUpperCase()==e?t=t.toUpperCase():e.charAt(0).toUpperCase()==e.charAt(0)&&(t=t.substr(0,0)+f[g].charAt(0).toUpperCase()+t.substr(1)),t})),this.insert(u),u="")}},this.findLinkAt=function(e,t){var n,r,o=this.session.getLine(e).split(/((?:https?|ftp):\/\/[\S]+)/),s=t;s<0&&(s=0);var a,l=0,c=0;try{for(var u=i(o),d=u.next();!d.done;d=u.next()){var h=d.value;if(c=l+h.length,s>=l&&s<=c&&h.match(/((?:https?|ftp):\/\/[\S]+)/)){a=h.replace(/[\s:.,'";}\]]+$/,"");break}l=c}}catch(e){n={error:e}}finally{try{d&&!d.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}return a},this.openLink=function(){var e=this.selection.getCursor(),t=this.findLinkAt(e.row,e.column);return t&&window.open(t,"_blank"),null!=t},this.removeLines=function(){var e=this.$getSelectedRows();this.session.removeFullLines(e.first,e.last),this.clearSelection()},this.duplicateSelection=function(){var e=this.selection,t=this.session,n=e.getRange(),i=e.isBackwards();if(n.isEmpty()){var r=n.start.row;t.duplicateLines(r,r)}else{var o=i?n.start:n.end,s=t.insert(o,t.getTextRange(n),!1);n.start=o,n.end=s,e.setSelectionRange(n,i)}},this.moveLinesDown=function(){this.$moveLines(1,!1)},this.moveLinesUp=function(){this.$moveLines(-1,!1)},this.moveText=function(e,t,n){return this.session.moveText(e,t,n)},this.copyLinesUp=function(){this.$moveLines(-1,!0)},this.copyLinesDown=function(){this.$moveLines(1,!0)},this.$moveLines=function(e,t){var n,i,r=this.selection;if(!r.inMultiSelectMode||this.inVirtualSelectionMode){var o=r.toOrientedRange();n=this.$getSelectedRows(o),i=this.session.$moveLines(n.first,n.last,t?0:e),t&&-1==e&&(i=0),o.moveBy(i,0),r.fromOrientedRange(o)}else{var s=r.rangeList.ranges;r.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var a=0,l=0,c=s.length,u=0;u<c;u++){var d=u;s[u].moveBy(a,0);for(var h=(n=this.$getSelectedRows(s[u])).first,f=n.last;++u<c;){l&&s[u].moveBy(l,0);var p=this.$getSelectedRows(s[u]);if(t&&p.first!=f)break;if(!t&&p.first>f+1)break;f=p.last}for(u--,a=this.session.$moveLines(h,f,t?0:e),t&&-1==e&&(d=u+1);d<=u;)s[d].moveBy(a,0),d++;t||(a=0),l+=a}r.fromOrientedRange(r.ranges[0]),r.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},this.$getSelectedRows=function(e){return e=(e||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(e.start.row),last:this.session.getRowFoldEnd(e.end.row)}},this.onCompositionStart=function(e){this.renderer.showComposition(e)},this.onCompositionUpdate=function(e){this.renderer.setCompositionText(e)},this.onCompositionEnd=function(){this.renderer.hideComposition()},this.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},this.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},this.isRowVisible=function(e){return e>=this.getFirstVisibleRow()&&e<=this.getLastVisibleRow()},this.isRowFullyVisible=function(e){return e>=this.renderer.getFirstFullyVisibleRow()&&e<=this.renderer.getLastFullyVisibleRow()},this.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},this.$moveByPage=function(e,t){var n=this.renderer,i=this.renderer.layerConfig,r=e*Math.floor(i.height/i.lineHeight);!0===t?this.selection.$moveSelection((function(){this.moveCursorBy(r,0)})):!1===t&&(this.selection.moveCursorBy(r,0),this.selection.clearSelection());var o=n.scrollTop;n.scrollBy(0,r*i.lineHeight),null!=t&&n.scrollCursorIntoView(null,.5),n.animateScrolling(o)},this.selectPageDown=function(){this.$moveByPage(1,!0)},this.selectPageUp=function(){this.$moveByPage(-1,!0)},this.gotoPageDown=function(){this.$moveByPage(1,!1)},this.gotoPageUp=function(){this.$moveByPage(-1,!1)},this.scrollPageDown=function(){this.$moveByPage(1)},this.scrollPageUp=function(){this.$moveByPage(-1)},this.scrollToRow=function(e){this.renderer.scrollToRow(e)},this.scrollToLine=function(e,t,n,i){this.renderer.scrollToLine(e,t,n,i)},this.centerSelection=function(){var e=this.getSelectionRange(),t={row:Math.floor(e.start.row+(e.end.row-e.start.row)/2),column:Math.floor(e.start.column+(e.end.column-e.start.column)/2)};this.renderer.alignCursor(t,.5)},this.getCursorPosition=function(){return this.selection.getCursor()},this.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},this.getSelectionRange=function(){return this.selection.getRange()},this.selectAll=function(){this.selection.selectAll()},this.clearSelection=function(){this.selection.clearSelection()},this.moveCursorTo=function(e,t){this.selection.moveCursorTo(e,t)},this.moveCursorToPosition=function(e){this.selection.moveCursorToPosition(e)},this.jumpToMatching=function(e,t){var n=this.getCursorPosition(),i=new y(this.session,n.row,n.column),r=i.getCurrentToken(),o=0;r&&-1!==r.type.indexOf("tag-name")&&(r=i.stepBackward());var s=r||i.stepForward();if(s){var a,l,c=!1,u={},d=n.column-s.start,h={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(s.value.match(/[{}()\[\]]/g)){for(;d<s.value.length&&!c;d++)if(h[s.value[d]])switch(l=h[s.value[d]]+"."+s.type.replace("rparen","lparen"),isNaN(u[l])&&(u[l]=0),s.value[d]){case"(":case"[":case"{":u[l]++;break;case")":case"]":case"}":u[l]--,-1===u[l]&&(a="bracket",c=!0)}}else-1!==s.type.indexOf("tag-name")&&(isNaN(u[s.value])&&(u[s.value]=0),"<"===r.value&&o>1?u[s.value]++:"</"===r.value&&u[s.value]--,-1===u[s.value]&&(a="tag",c=!0));c||(r=s,o++,s=i.stepForward(),d=0)}while(s&&!c);if(a){var f,g;if("bracket"===a)(f=this.session.getBracketRange(n))||(g=(f=new p(i.getCurrentTokenRow(),i.getCurrentTokenColumn()+d-1,i.getCurrentTokenRow(),i.getCurrentTokenColumn()+d-1)).start,(t||g.row===n.row&&Math.abs(g.column-n.column)<2)&&(f=this.session.getBracketRange(g)));else if("tag"===a){if(!s||-1===s.type.indexOf("tag-name"))return;if(0===(f=new p(i.getCurrentTokenRow(),i.getCurrentTokenColumn()-2,i.getCurrentTokenRow(),i.getCurrentTokenColumn()-2)).compare(n.row,n.column)){var m=this.session.getMatchingTags(n);m&&(m.openTag.contains(n.row,n.column)?g=(f=m.closeTag).start:(f=m.openTag,g=m.closeTag.start.row===n.row&&m.closeTag.start.column===n.column?f.end:f.start))}g=g||f.start}(g=f&&f.cursor||g)&&(e?f&&t?this.selection.setRange(f):f&&f.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(g.row,g.column):this.selection.moveTo(g.row,g.column))}}},this.gotoLine=function(e,t,n){this.selection.clearSelection(),this.session.unfold({row:e-1,column:t||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(e-1,t||0),this.isRowFullyVisible(e-1)||this.scrollToLine(e-1,!0,n)},this.navigateTo=function(e,t){this.selection.moveTo(e,t)},this.navigateUp=function(e){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var t=this.selection.anchor.getPosition();return this.moveCursorToPosition(t)}this.selection.clearSelection(),this.selection.moveCursorBy(-e||-1,0)},this.navigateDown=function(e){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var t=this.selection.anchor.getPosition();return this.moveCursorToPosition(t)}this.selection.clearSelection(),this.selection.moveCursorBy(e||1,0)},this.navigateLeft=function(e){if(this.selection.isEmpty())for(e=e||1;e--;)this.selection.moveCursorLeft();else{var t=this.getSelectionRange().start;this.moveCursorToPosition(t)}this.clearSelection()},this.navigateRight=function(e){if(this.selection.isEmpty())for(e=e||1;e--;)this.selection.moveCursorRight();else{var t=this.getSelectionRange().end;this.moveCursorToPosition(t)}this.clearSelection()},this.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},this.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},this.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},this.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},this.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},this.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},this.replace=function(e,t){t&&this.$search.set(t);var n=this.$search.find(this.session),i=0;return n?(this.$tryReplace(n,e)&&(i=1),this.selection.setSelectionRange(n),this.renderer.scrollSelectionIntoView(n.start,n.end),i):i},this.replaceAll=function(e,t){t&&this.$search.set(t);var n=this.$search.findAll(this.session),i=0;if(!n.length)return i;var r=this.getSelectionRange();this.selection.moveTo(0,0);for(var o=n.length-1;o>=0;--o)this.$tryReplace(n[o],e)&&i++;return this.selection.setSelectionRange(r),i},this.$tryReplace=function(e,t){var n=this.session.getTextRange(e);return null!==(t=this.$search.replace(n,t))?(e.end=this.session.replace(e,t),e):null},this.getLastSearchOptions=function(){return this.$search.getOptions()},this.find=function(e,t,n){t||(t={}),"string"==typeof e||e instanceof RegExp?t.needle=e:"object"==typeof e&&r.mixin(t,e);var i=this.selection.getRange();null==t.needle&&((e=this.session.getTextRange(i)||this.$search.$options.needle)||(i=this.session.getWordRange(i.start.row,i.start.column),e=this.session.getTextRange(i)),this.$search.set({needle:e})),this.$search.set(t),t.start||this.$search.set({start:i});var o=this.$search.find(this.session);return t.preventScroll?o:o?(this.revealRange(o,n),o):(t.backwards?i.start=i.end:i.end=i.start,void this.selection.setRange(i))},this.findNext=function(e,t){this.find({skipCurrent:!0,backwards:!1},e,t)},this.findPrevious=function(e,t){this.find(e,{skipCurrent:!0,backwards:!0},t)},this.revealRange=function(e,t){this.session.unfold(e),this.selection.setSelectionRange(e);var n=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(e.start,e.end,.5),!1!==t&&this.renderer.animateScrolling(n)},this.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},this.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},this.destroy=function(){this.$toDestroy&&(this.$toDestroy.forEach((function(e){e.destroy()})),this.$toDestroy=null),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},this.setAutoScrollEditorIntoView=function(e){if(e){var t,n=this,i=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var r=this.$scrollAnchor;r.style.cssText="position:absolute",this.container.insertBefore(r,this.container.firstChild);var o=this.on("changeSelection",(function(){i=!0})),s=this.renderer.on("beforeRender",(function(){i&&(t=n.renderer.container.getBoundingClientRect())})),a=this.renderer.on("afterRender",(function(){if(i&&t&&(n.isFocused()||n.searchBox&&n.searchBox.isFocused())){var e=n.renderer,o=e.$cursorLayer.$pixelPos,s=e.layerConfig,a=o.top-s.offset;null!=(i=o.top>=0&&a+t.top<0||!(o.top<s.height&&o.top+t.top+s.lineHeight>window.innerHeight)&&null)&&(r.style.top=a+"px",r.style.left=o.left+"px",r.style.height=s.lineHeight+"px",r.scrollIntoView(i)),i=t=null}}));this.setAutoScrollEditorIntoView=function(e){e||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",o),this.renderer.off("afterRender",a),this.renderer.off("beforeRender",s))}}},this.$resetCursorStyle=function(){var e=this.$cursorStyle||"ace",t=this.renderer.$cursorLayer;t&&(t.setSmoothBlinking(/smooth/.test(e)),t.isBlinking=!this.$readOnly&&"wide"!=e,o.setCssClass(t.element,"ace_slim-cursors",/slim/.test(e)))},this.prompt=function(e,t,n){var i=this;b.loadModule("./ext/prompt",(function(r){r.prompt(i,e,t,n)}))}}.call(_.prototype),b.defineOptions(_.prototype,"editor",{selectionStyle:{set:function(e){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:e})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(e){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(e){this.textInput.setReadOnly(e),this.$resetCursorStyle()},initialValue:!1},copyWithEmptySelection:{set:function(e){this.textInput.setCopyWithEmptySelection(e)},initialValue:!1},cursorStyle:{set:function(e){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(e){this.setAutoScrollEditorIntoView(e)}},keyboardHandler:{set:function(e){this.setKeyboardHandler(e)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(e){this.session.setValue(e)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(e){this.setSession(e)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(e){this.renderer.$gutterLayer.setShowLineNumbers(e),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),e&&this.$relativeLineNumbers?A.attach(this):A.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(e){this.$showLineNumbers&&e?A.attach(this):A.detach(this)}},placeholder:{set:function(e){this.$updatePlaceholder||(this.$updatePlaceholder=function(){var e=this.session&&(this.renderer.$composition||this.getValue());if(e&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),o.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(e||this.renderer.placeholderNode)!e&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"");else{this.renderer.on("afterRender",this.$updatePlaceholder),o.addCssClass(this.container,"ace_hasPlaceholder");var t=o.createElement("div");t.className="ace_placeholder",t.textContent=this.$placeholder||"",this.renderer.placeholderNode=t,this.renderer.content.appendChild(this.renderer.placeholderNode)}}.bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},customScrollbar:"renderer",hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",highlightIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var A={getText:function(e,t){return(Math.abs(e.selection.lead.row-t)||t+1+(t<9?"·":""))+""},getWidth:function(e,t,n){return Math.max(t.toString().length,(n.lastRow+1).toString().length,2)*n.characterWidth},update:function(e,t){t.renderer.$loop.schedule(t.renderer.CHANGE_GUTTER)},attach:function(e){e.renderer.$gutterLayer.$renderer=this,e.on("changeSelection",this.update),this.update(null,e)},detach:function(e){e.renderer.$gutterLayer.$renderer==this&&(e.renderer.$gutterLayer.$renderer=null),e.off("changeSelection",this.update),this.update(null,e)}};t.Editor=_})),ace.define("ace/undomanager",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var i=function(){this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()};(function(){this.addSession=function(e){this.$session=e},this.add=function(e,t,n){if(!this.$fromUndo&&e!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),!1===t||!this.lastDeltas){this.lastDeltas=[];var i=this.$undoStack.length;i>this.$undoDepth-1&&this.$undoStack.splice(0,i-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),e.id=this.$rev=++this.$maxRev}"remove"!=e.action&&"insert"!=e.action||(this.$lastDelta=e),this.lastDeltas.push(e)}},this.addSelection=function(e,t){this.selections.push({value:e,rev:t||this.$rev})},this.startNewGroup=function(){return this.lastDeltas=null,this.$rev},this.markIgnored=function(e,t){null==t&&(t=this.$rev+1);for(var n=this.$undoStack,i=n.length;i--;){var r=n[i][0];if(r.id<=e)break;r.id<t&&(r.ignore=!0)}this.lastDeltas=null},this.getSelection=function(e,t){for(var n=this.selections,i=n.length;i--;){var r=n[i];if(r.rev<e)return t&&(r=n[i+1]),r}},this.getRevision=function(){return this.$rev},this.getDeltas=function(e,t){null==t&&(t=this.$rev+1);for(var n=this.$undoStack,i=null,r=0,o=n.length;o--;){var s=n[o][0];if(s.id<t&&!i&&(i=o+1),s.id<=e){r=o+1;break}}return n.slice(r,i)},this.getChangedRanges=function(e,t){null==t&&(t=this.$rev+1)},this.getChangedLines=function(e,t){null==t&&(t=this.$rev+1)},this.undo=function(e,t){this.lastDeltas=null;var n=this.$undoStack;if(function(e,t){for(var n=t;n--;){var i=e[n];if(i&&!i[0].ignore){for(;n<t-1;){var r=u(e[n],e[n+1]);e[n]=r[0],e[n+1]=r[1],n++}return!0}}}(n,n.length)){e||(e=this.$session),this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0;var i=n.pop(),r=null;return i&&(r=e.undoChanges(i,t),this.$redoStack.push(i),this.$syncRev()),this.$fromUndo=!1,r}},this.redo=function(e,t){if(this.lastDeltas=null,e||(e=this.$session),this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){var n=this.getDeltas(this.$redoStackBaseRev,this.$rev+1);!function(e,t){for(var n=0;n<t.length;n++)for(var i=t[n],r=0;r<i.length;r++)g(e,i[r])}(this.$redoStack,n),this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach((function(e){e[0].id=++this.$maxRev}),this)}var i=this.$redoStack.pop(),r=null;return i&&(r=e.redoChanges(i,t),this.$undoStack.push(i),this.$syncRev()),this.$fromUndo=!1,r},this.$syncRev=function(){var e=this.$undoStack,t=e[e.length-1],n=t&&t[0].id||0;this.$redoStackBaseRev=n,this.$rev=n},this.reset=function(){this.lastDeltas=null,this.$lastDelta=null,this.$undoStack=[],this.$redoStack=[],this.$rev=0,this.mark=0,this.$redoStackBaseRev=this.$rev,this.selections=[]},this.canUndo=function(){return this.$undoStack.length>0},this.canRedo=function(){return this.$redoStack.length>0},this.bookmark=function(e){null==e&&(e=this.$rev),this.mark=e},this.isAtBookmark=function(){return this.$rev===this.mark},this.toJSON=function(){},this.fromJSON=function(){},this.hasUndo=this.canUndo,this.hasRedo=this.canRedo,this.isClean=this.isAtBookmark,this.markClean=this.bookmark,this.$prettyPrint=function(e){return e?a(e):a(this.$undoStack)+"\n---\n"+a(this.$redoStack)}}).call(i.prototype);var r=e("./range").Range,o=r.comparePoints;function s(e){return{row:e.row,column:e.column}}function a(e){if(e=e||this,Array.isArray(e))return e.map(a).join("\n");var t="";return e.action?(t="insert"==e.action?"+":"-",t+="["+e.lines+"]"):e.value&&(t=Array.isArray(e.value)?e.value.map(l).join("\n"):l(e.value)),e.start&&(t+=l(e)),(e.id||e.rev)&&(t+="\t("+(e.id||e.rev)+")"),t}function l(e){return e.start.row+":"+e.start.column+"=>"+e.end.row+":"+e.end.column}function c(e,t){var n="insert"==e.action,i="insert"==t.action;if(n&&i)if(o(t.start,e.end)>=0)h(t,e,-1);else{if(!(o(t.start,e.start)<=0))return null;h(e,t,1)}else if(n&&!i)if(o(t.start,e.end)>=0)h(t,e,-1);else{if(!(o(t.end,e.start)<=0))return null;h(e,t,-1)}else if(!n&&i)if(o(t.start,e.start)>=0)h(t,e,1);else{if(!(o(t.start,e.start)<=0))return null;h(e,t,1)}else if(!n&&!i)if(o(t.start,e.start)>=0)h(t,e,1);else{if(!(o(t.end,e.start)<=0))return null;h(e,t,-1)}return[t,e]}function u(e,t){for(var n=e.length;n--;)for(var i=0;i<t.length;i++)if(!c(e[n],t[i])){for(;n<e.length;){for(;i--;)c(t[i],e[n]);i=t.length,n++}return[e,t]}return e.selectionBefore=t.selectionBefore=e.selectionAfter=t.selectionAfter=null,[t,e]}function d(e,t){var n="insert"==e.action,i="insert"==t.action;if(n&&i)o(e.start,t.start)<0?h(t,e,1):h(e,t,1);else if(n&&!i)o(e.start,t.end)>=0?h(e,t,-1):(o(e.start,t.start)<=0||h(e,r.fromPoints(t.start,e.start),-1),h(t,e,1));else if(!n&&i)o(t.start,e.end)>=0?h(t,e,-1):(o(t.start,e.start)<=0||h(t,r.fromPoints(e.start,t.start),-1),h(e,t,1));else if(!n&&!i)if(o(t.start,e.end)>=0)h(t,e,-1);else{var s,a;if(!(o(t.end,e.start)<=0))return o(e.start,t.start)<0&&(s=e,e=p(e,t.start)),o(e.end,t.end)>0&&(a=p(e,t.end)),f(t.end,e.start,e.end,-1),a&&!s&&(e.lines=a.lines,e.start=a.start,e.end=a.end,a=e),[t,s,a].filter(Boolean);h(e,t,-1)}return[t,e]}function h(e,t,n){f(e.start,t.start,t.end,n),f(e.end,t.start,t.end,n)}function f(e,t,n,i){e.row==(1==i?t:n).row&&(e.column+=i*(n.column-t.column)),e.row+=i*(n.row-t.row)}function p(e,t){var n=e.lines,i=e.end;e.end=s(t);var r=e.end.row-e.start.row,o=n.splice(r,n.length),a=r?t.column:t.column-e.start.column;return n.push(o[0].substring(0,a)),o[0]=o[0].substr(a),{start:s(t),end:i,lines:o,action:e.action}}function g(e,t){t=function(e){return{start:s(e.start),end:s(e.end),action:e.action,lines:e.lines.slice()}}(t);for(var n=e.length;n--;){for(var i=e[n],r=0;r<i.length;r++){var o=d(i[r],t);t=o[0],2!=o.length&&(o[2]?(i.splice(r+1,1,o[1],o[2]),r++):o[1]||(i.splice(r,1),r--))}i.length||e.splice(n,1)}return e}r.comparePoints,t.UndoManager=i})),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],(function(e,t,n){"use strict";var i=e("../lib/dom"),r=function(e,t){this.element=e,this.canvasHeight=t||5e5,this.element.style.height=2*this.canvasHeight+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0};(function(){this.moveContainer=function(e){i.translate(this.element,0,-e.firstRowScreen*e.lineHeight%this.canvasHeight-e.offset*this.$offsetCoefficient)},this.pageChanged=function(e,t){return Math.floor(e.firstRowScreen*e.lineHeight/this.canvasHeight)!==Math.floor(t.firstRowScreen*t.lineHeight/this.canvasHeight)},this.computeLineTop=function(e,t,n){var i=t.firstRowScreen*t.lineHeight,r=Math.floor(i/this.canvasHeight);return n.documentToScreenRow(e,0)*t.lineHeight-r*this.canvasHeight},this.computeLineHeight=function(e,t,n){return t.lineHeight*n.getRowLineCount(e)},this.getLength=function(){return this.cells.length},this.get=function(e){return this.cells[e]},this.shift=function(){this.$cacheCell(this.cells.shift())},this.pop=function(){this.$cacheCell(this.cells.pop())},this.push=function(e){if(Array.isArray(e)){this.cells.push.apply(this.cells,e);for(var t=i.createFragment(this.element),n=0;n<e.length;n++)t.appendChild(e[n].element);this.element.appendChild(t)}else this.cells.push(e),this.element.appendChild(e.element)},this.unshift=function(e){if(Array.isArray(e)){this.cells.unshift.apply(this.cells,e);for(var t=i.createFragment(this.element),n=0;n<e.length;n++)t.appendChild(e[n].element);this.element.firstChild?this.element.insertBefore(t,this.element.firstChild):this.element.appendChild(t)}else this.cells.unshift(e),this.element.insertAdjacentElement("afterbegin",e.element)},this.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},this.$cacheCell=function(e){e&&(e.element.remove(),this.cellCache.push(e))},this.createCell=function(e,t,n,r){var o=this.cellCache.pop();if(!o){var s=i.createElement("div");r&&r(s),this.element.appendChild(s),o={element:s,text:"",row:e}}return o.row=e,o}}).call(r.prototype),t.Lines=r})),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/layer/lines"],(function(e,t,n){"use strict";var i=e("../lib/dom"),r=e("../lib/oop"),o=e("../lib/lang"),s=e("../lib/event_emitter").EventEmitter,a=e("./lines").Lines,l=function(e){this.element=i.createElement("div"),this.element.className="ace_layer ace_gutter-layer",e.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$lines=new a(this.element),this.$lines.$offsetCoefficient=1};function c(e){var t=document.createTextNode("");e.appendChild(t);var n=i.createElement("span");return e.appendChild(n),e}(function(){r.implement(this,s),this.setSession=function(e){this.session&&this.session.off("change",this.$updateAnnotations),this.session=e,e&&e.on("change",this.$updateAnnotations)},this.addGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(e,t)},this.removeGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(e,t)},this.setAnnotations=function(e){this.$annotations=[];for(var t=0;t<e.length;t++){var n=e[t],i=n.row,r=this.$annotations[i];r||(r=this.$annotations[i]={text:[]});var s=n.text;s=s?o.escapeHTML(s):n.html||"",-1===r.text.indexOf(s)&&r.text.push(s);var a=n.type,l=n.className;l?r.className=l:"error"==a?r.className=" ace_error":"warning"==a&&" ace_error"!=r.className?r.className=" ace_warning":"info"!=a||r.className||(r.className=" ace_info")}},this.$updateAnnotations=function(e){if(this.$annotations.length){var t=e.start.row,n=e.end.row-t;if(0===n);else if("remove"==e.action)this.$annotations.splice(t,n+1,null);else{var i=new Array(n+1);i.unshift(t,1),this.$annotations.splice.apply(this.$annotations,i)}}},this.update=function(e){this.config=e;var t=this.session,n=e.firstRow,i=Math.min(e.lastRow+e.gutterOffset,t.getLength()-1);this.oldLastRow=i,this.config=e,this.$lines.moveContainer(e),this.$updateCursorRow();for(var r=t.getNextFoldLine(n),o=r?r.start.row:1/0,s=null,a=-1,l=n;;){if(l>o&&(l=r.end.row+1,o=(r=t.getNextFoldLine(l,r))?r.start.row:1/0),l>i){for(;this.$lines.getLength()>a+1;)this.$lines.pop();break}(s=this.$lines.get(++a))?s.row=l:(s=this.$lines.createCell(l,e,this.session,c),this.$lines.push(s)),this.$renderCell(s,e,r,l),l++}this._signal("afterRender"),this.$updateGutterWidth(e)},this.$updateGutterWidth=function(e){var t=this.session,n=t.gutterRenderer||this.$renderer,i=t.$firstLineNumber,r=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||t.$useWrapMode)&&(r=t.getLength()+i-1);var o=n?n.getWidth(t,r,e):r.toString().length*e.characterWidth,s=this.$padding||this.$computePadding();(o+=s.left+s.right)===this.gutterWidth||isNaN(o)||(this.gutterWidth=o,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",o))},this.$updateCursorRow=function(){if(this.$highlightGutterLine){var e=this.session.selection.getCursor();this.$cursorRow!==e.row&&(this.$cursorRow=e.row)}},this.updateLineHighlight=function(){if(this.$highlightGutterLine){var e=this.session.selection.cursor.row;if(this.$cursorRow=e,!this.$cursorCell||this.$cursorCell.row!=e){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var t=this.$lines.cells;this.$cursorCell=null;for(var n=0;n<t.length;n++){var i=t[n];if(i.row>=this.$cursorRow){if(i.row>this.$cursorRow){var r=this.session.getFoldLine(this.$cursorRow);if(!(n>0&&r&&r.start.row==t[n-1].row))break;i=t[n-1]}i.element.className="ace_gutter-active-line "+i.element.className,this.$cursorCell=i;break}}}}},this.scrollLines=function(e){var t=this.config;if(this.config=e,this.$updateCursorRow(),this.$lines.pageChanged(t,e))return this.update(e);this.$lines.moveContainer(e);var n=Math.min(e.lastRow+e.gutterOffset,this.session.getLength()-1),i=this.oldLastRow;if(this.oldLastRow=n,!t||i<e.firstRow)return this.update(e);if(n<t.firstRow)return this.update(e);if(t.firstRow<e.firstRow)for(var r=this.session.getFoldedRowCount(t.firstRow,e.firstRow-1);r>0;r--)this.$lines.shift();if(i>n)for(r=this.session.getFoldedRowCount(n+1,i);r>0;r--)this.$lines.pop();e.firstRow<t.firstRow&&this.$lines.unshift(this.$renderLines(e,e.firstRow,t.firstRow-1)),n>i&&this.$lines.push(this.$renderLines(e,i+1,n)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(e)},this.$renderLines=function(e,t,n){for(var i=[],r=t,o=this.session.getNextFoldLine(r),s=o?o.start.row:1/0;r>s&&(r=o.end.row+1,s=(o=this.session.getNextFoldLine(r,o))?o.start.row:1/0),!(r>n);){var a=this.$lines.createCell(r,e,this.session,c);this.$renderCell(a,e,o,r),i.push(a),r++}return i},this.$renderCell=function(e,t,n,r){var o=e.element,s=this.session,a=o.childNodes[0],l=o.childNodes[1],c=s.$firstLineNumber,u=s.$breakpoints,d=s.$decorations,h=s.gutterRenderer||this.$renderer,f=this.$showFoldWidgets&&s.foldWidgets,p=n?n.start.row:Number.MAX_VALUE,g="ace_gutter-cell ";if(this.$highlightGutterLine&&(r==this.$cursorRow||n&&r<this.$cursorRow&&r>=p&&this.$cursorRow<=n.end.row)&&(g+="ace_gutter-active-line ",this.$cursorCell!=e&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=e)),u[r]&&(g+=u[r]),d[r]&&(g+=d[r]),this.$annotations[r]&&(g+=this.$annotations[r].className),o.className!=g&&(o.className=g),f){var m=f[r];null==m&&(m=f[r]=s.getFoldWidget(r))}if(m){g="ace_fold-widget ace_"+m,"start"==m&&r==p&&r<n.end.row?g+=" ace_closed":g+=" ace_open",l.className!=g&&(l.className=g);var v=t.lineHeight+"px";i.setStyle(l.style,"height",v),i.setStyle(l.style,"display","inline-block")}else l&&i.setStyle(l.style,"display","none");var b=(h?h.getText(s,r):r+c).toString();return b!==a.data&&(a.data=b),i.setStyle(e.element.style,"height",this.$lines.computeLineHeight(r,t,s)+"px"),i.setStyle(e.element.style,"top",this.$lines.computeLineTop(r,t,s)+"px"),e.text=b,e},this.$fixedWidth=!1,this.$highlightGutterLine=!0,this.$renderer="",this.setHighlightGutterLine=function(e){this.$highlightGutterLine=e},this.$showLineNumbers=!0,this.$renderer="",this.setShowLineNumbers=function(e){this.$renderer=!e&&{getWidth:function(){return 0},getText:function(){return""}}},this.getShowLineNumbers=function(){return this.$showLineNumbers},this.$showFoldWidgets=!0,this.setShowFoldWidgets=function(e){e?i.addCssClass(this.element,"ace_folding-enabled"):i.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=e,this.$padding=null},this.getShowFoldWidgets=function(){return this.$showFoldWidgets},this.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var e=i.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=(parseInt(e.borderLeftWidth)||0)+(parseInt(e.paddingLeft)||0)+1,this.$padding.right=(parseInt(e.borderRightWidth)||0)+(parseInt(e.paddingRight)||0),this.$padding},this.getRegion=function(e){var t=this.$padding||this.$computePadding(),n=this.element.getBoundingClientRect();return e.x<t.left+n.left?"markers":this.$showFoldWidgets&&e.x>n.right-t.right?"foldWidgets":void 0}}).call(l.prototype),t.Gutter=l})),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],(function(e,t,n){"use strict";var i=e("../range").Range,r=e("../lib/dom"),o=function(e){this.element=r.createElement("div"),this.element.className="ace_layer ace_marker-layer",e.appendChild(this.element)};(function(){this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setMarkers=function(e){this.markers=e},this.elt=function(e,t){var n=-1!=this.i&&this.element.childNodes[this.i];n?this.i++:(n=document.createElement("div"),this.element.appendChild(n),this.i=-1),n.style.cssText=t,n.className=e},this.update=function(e){if(e){var t;for(var n in this.config=e,this.i=0,this.markers){var i=this.markers[n];if(i.range){var r=i.range.clipRows(e.firstRow,e.lastRow);if(!r.isEmpty())if(r=r.toScreenRange(this.session),i.renderer){var o=this.$getTop(r.start.row,e),s=this.$padding+r.start.column*e.characterWidth;i.renderer(t,r,s,o,e)}else"fullLine"==i.type?this.drawFullLineMarker(t,r,i.clazz,e):"screenLine"==i.type?this.drawScreenLineMarker(t,r,i.clazz,e):r.isMultiLine()?"text"==i.type?this.drawTextMarker(t,r,i.clazz,e):this.drawMultiLineMarker(t,r,i.clazz,e):this.drawSingleLineMarker(t,r,i.clazz+" ace_start ace_br15",e)}else i.update(t,this,this.session,e)}if(-1!=this.i)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild)}},this.$getTop=function(e,t){return(e-t.firstRowScreen)*t.lineHeight},this.drawTextMarker=function(e,t,n,r,o){for(var s=this.session,a=t.start.row,l=t.end.row,c=a,u=0,d=0,h=s.getScreenLastRowColumn(c),f=new i(c,t.start.column,c,d);c<=l;c++)f.start.row=f.end.row=c,f.start.column=c==a?t.start.column:s.getRowWrapIndent(c),f.end.column=h,u=d,d=h,h=c+1<l?s.getScreenLastRowColumn(c+1):c==l?0:t.end.column,this.drawSingleLineMarker(e,f,n+(c==a?" ace_start":"")+" ace_br"+((c==a||c==a+1&&t.start.column?1:0)|(u<d?2:0)|(d>h?4:0)|(c==l?8:0)),r,c==l?0:1,o)},this.drawMultiLineMarker=function(e,t,n,i,r){var o=this.$padding,s=i.lineHeight,a=this.$getTop(t.start.row,i),l=o+t.start.column*i.characterWidth;if(r=r||"",this.session.$bidiHandler.isBidiRow(t.start.row)?((c=t.clone()).end.row=c.start.row,c.end.column=this.session.getLine(c.start.row).length,this.drawBidiSingleLineMarker(e,c,n+" ace_br1 ace_start",i,null,r)):this.elt(n+" ace_br1 ace_start","height:"+s+"px;right:0;top:"+a+"px;left:"+l+"px;"+(r||"")),this.session.$bidiHandler.isBidiRow(t.end.row)){var c;(c=t.clone()).start.row=c.end.row,c.start.column=0,this.drawBidiSingleLineMarker(e,c,n+" ace_br12",i,null,r)}else{a=this.$getTop(t.end.row,i);var u=t.end.column*i.characterWidth;this.elt(n+" ace_br12","height:"+s+"px;width:"+u+"px;top:"+a+"px;left:"+o+"px;"+(r||""))}if(!((s=(t.end.row-t.start.row-1)*i.lineHeight)<=0)){a=this.$getTop(t.start.row+1,i);var d=(t.start.column?1:0)|(t.end.column?0:8);this.elt(n+(d?" ace_br"+d:""),"height:"+s+"px;right:0;top:"+a+"px;left:"+o+"px;"+(r||""))}},this.drawSingleLineMarker=function(e,t,n,i,r,o){if(this.session.$bidiHandler.isBidiRow(t.start.row))return this.drawBidiSingleLineMarker(e,t,n,i,r,o);var s=i.lineHeight,a=(t.end.column+(r||0)-t.start.column)*i.characterWidth,l=this.$getTop(t.start.row,i),c=this.$padding+t.start.column*i.characterWidth;this.elt(n,"height:"+s+"px;width:"+a+"px;top:"+l+"px;left:"+c+"px;"+(o||""))},this.drawBidiSingleLineMarker=function(e,t,n,i,r,o){var s=i.lineHeight,a=this.$getTop(t.start.row,i),l=this.$padding;this.session.$bidiHandler.getSelections(t.start.column,t.end.column).forEach((function(e){this.elt(n,"height:"+s+"px;width:"+e.width+(r||0)+"px;top:"+a+"px;left:"+(l+e.left)+"px;"+(o||""))}),this)},this.drawFullLineMarker=function(e,t,n,i,r){var o=this.$getTop(t.start.row,i),s=i.lineHeight;t.start.row!=t.end.row&&(s+=this.$getTop(t.end.row,i)-o),this.elt(n,"height:"+s+"px;top:"+o+"px;left:0;right:0;"+(r||""))},this.drawScreenLineMarker=function(e,t,n,i,r){var o=this.$getTop(t.start.row,i),s=i.lineHeight;this.elt(n,"height:"+s+"px;top:"+o+"px;left:0;right:0;"+(r||""))}}).call(o.prototype),t.Marker=o})),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter"],(function(e,t,n){"use strict";var i=e("../lib/oop"),r=e("../lib/dom"),o=e("../lib/lang"),s=e("./lines").Lines,a=e("../lib/event_emitter").EventEmitter,l=function(e){this.dom=r,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",e.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new s(this.element)};(function(){i.implement(this,a),this.EOF_CHAR="¶",this.EOL_CHAR_LF="¬",this.EOL_CHAR_CRLF="¤",this.EOL_CHAR=this.EOL_CHAR_LF,this.TAB_CHAR="—",this.SPACE_CHAR="·",this.$padding=0,this.MAX_LINE_LENGTH=1e4,this.MAX_CHUNK_LENGTH=250,this.$updateEolChar=function(){var e=this.session.doc,t="\n"==e.getNewLineCharacter()&&"windows"!=e.getNewLineMode()?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=t)return this.EOL_CHAR=t,!0},this.setPadding=function(e){this.$padding=e,this.element.style.margin="0 "+e+"px"},this.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},this.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},this.$setFontMetrics=function(e){this.$fontMetrics=e,this.$fontMetrics.on("changeCharacterSize",function(e){this._signal("changeCharacterSize",e)}.bind(this)),this.$pollSizeChanges()},this.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},this.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},this.setSession=function(e){this.session=e,e&&this.$computeTabString()},this.showInvisibles=!1,this.showSpaces=!1,this.showTabs=!1,this.showEOL=!1,this.setShowInvisibles=function(e){return this.showInvisibles!=e&&(this.showInvisibles=e,"string"==typeof e?(this.showSpaces=/tab/i.test(e),this.showTabs=/space/i.test(e),this.showEOL=/eol/i.test(e)):this.showSpaces=this.showTabs=this.showEOL=e,this.$computeTabString(),!0)},this.displayIndentGuides=!0,this.setDisplayIndentGuides=function(e){return this.displayIndentGuides!=e&&(this.displayIndentGuides=e,this.$computeTabString(),!0)},this.$highlightIndentGuides=!0,this.setHighlightIndentGuides=function(e){return this.$highlightIndentGuides!==e&&(this.$highlightIndentGuides=e,e)},this.$tabStrings=[],this.onChangeTabSize=this.$computeTabString=function(){var e=this.session.getTabSize();this.tabSize=e;for(var t=this.$tabStrings=[0],n=1;n<e+1;n++)this.showTabs?((i=this.dom.createElement("span")).className="ace_invisible ace_invisible_tab",i.textContent=o.stringRepeat(this.TAB_CHAR,n),t.push(i)):t.push(this.dom.createTextNode(o.stringRepeat(" ",n),this.element));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var i,r="ace_indent-guide",s=this.showSpaces?" ace_invisible ace_invisible_space":"",a=this.showSpaces?o.stringRepeat(this.SPACE_CHAR,this.tabSize):o.stringRepeat(" ",this.tabSize),l=this.showTabs?" ace_invisible ace_invisible_tab":"",c=this.showTabs?o.stringRepeat(this.TAB_CHAR,this.tabSize):a;(i=this.dom.createElement("span")).className=r+s,i.textContent=a,this.$tabStrings[" "]=i,(i=this.dom.createElement("span")).className=r+l,i.textContent=c,this.$tabStrings["\t"]=i}},this.updateLines=function(e,t,n){if(this.config.lastRow!=e.lastRow||this.config.firstRow!=e.firstRow)return this.update(e);this.config=e;for(var i=Math.max(t,e.firstRow),r=Math.min(n,e.lastRow),o=this.element.childNodes,s=0,a=e.firstRow;a<i;a++){if(l=this.session.getFoldLine(a)){if(l.containsRow(i)){i=l.start.row;break}a=l.end.row}s++}for(var l,c=!1,u=(a=i,(l=this.session.getNextFoldLine(a))?l.start.row:1/0);a>u&&(a=l.end.row+1,u=(l=this.session.getNextFoldLine(a,l))?l.start.row:1/0),!(a>r);){var d=o[s++];if(d){this.dom.removeChildren(d),this.$renderLine(d,a,a==u&&l),c&&(d.style.top=this.$lines.computeLineTop(a,e,this.session)+"px");var h=e.lineHeight*this.session.getRowLength(a)+"px";d.style.height!=h&&(c=!0,d.style.height=h)}a++}if(c)for(;s<this.$lines.cells.length;){var f=this.$lines.cells[s++];f.element.style.top=this.$lines.computeLineTop(f.row,e,this.session)+"px"}},this.scrollLines=function(e){var t=this.config;if(this.config=e,this.$lines.pageChanged(t,e))return this.update(e);this.$lines.moveContainer(e);var n=e.lastRow,i=t?t.lastRow:-1;if(!t||i<e.firstRow)return this.update(e);if(n<t.firstRow)return this.update(e);if(!t||t.lastRow<e.firstRow)return this.update(e);if(e.lastRow<t.firstRow)return this.update(e);if(t.firstRow<e.firstRow)for(var r=this.session.getFoldedRowCount(t.firstRow,e.firstRow-1);r>0;r--)this.$lines.shift();if(t.lastRow>e.lastRow)for(r=this.session.getFoldedRowCount(e.lastRow+1,t.lastRow);r>0;r--)this.$lines.pop();e.firstRow<t.firstRow&&this.$lines.unshift(this.$renderLinesFragment(e,e.firstRow,t.firstRow-1)),e.lastRow>t.lastRow&&this.$lines.push(this.$renderLinesFragment(e,t.lastRow+1,e.lastRow)),this.$highlightIndentGuide()},this.$renderLinesFragment=function(e,t,n){for(var i=[],o=t,s=this.session.getNextFoldLine(o),a=s?s.start.row:1/0;o>a&&(o=s.end.row+1,a=(s=this.session.getNextFoldLine(o,s))?s.start.row:1/0),!(o>n);){var l=this.$lines.createCell(o,e,this.session),c=l.element;this.dom.removeChildren(c),r.setStyle(c.style,"height",this.$lines.computeLineHeight(o,e,this.session)+"px"),r.setStyle(c.style,"top",this.$lines.computeLineTop(o,e,this.session)+"px"),this.$renderLine(c,o,o==a&&s),this.$useLineGroups()?c.className="ace_line_group":c.className="ace_line",i.push(l),o++}return i},this.update=function(e){this.$lines.moveContainer(e),this.config=e;for(var t=e.firstRow,n=e.lastRow,i=this.$lines;i.getLength();)i.pop();i.push(this.$renderLinesFragment(e,t,n))},this.$textToken={text:!0,rparen:!0,lparen:!0},this.$renderTokenInChunks=function(e,t,n,i){for(var r,o=0;o<i.length;o+=this.MAX_CHUNK_LENGTH){var s=i.substring(o,o+this.MAX_CHUNK_LENGTH),a={type:n.type,value:s};r=this.$renderToken(e,t+o,a,s)}return r},this.$renderToken=function(e,t,n,i){for(var r,s=this,a=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC\u2066\u2067\u2068\u202A\u202B\u202D\u202E\u202C\u2069]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,l=this.dom.createFragment(this.element),c=0;r=a.exec(i);){var u=r[1],d=r[2],h=r[3],f=r[4],p=r[5];if(s.showSpaces||!d){var g=c!=r.index?i.slice(c,r.index):"";if(c=r.index+r[0].length,g&&l.appendChild(this.dom.createTextNode(g,this.element)),u){var m=s.session.getScreenTabSize(t+r.index);l.appendChild(s.$tabStrings[m].cloneNode(!0)),t+=m-1}else d?s.showSpaces?((v=this.dom.createElement("span")).className="ace_invisible ace_invisible_space",v.textContent=o.stringRepeat(s.SPACE_CHAR,d.length),l.appendChild(v)):l.appendChild(this.com.createTextNode(d,this.element)):h?((v=this.dom.createElement("span")).className="ace_invisible ace_invisible_space ace_invalid",v.textContent=o.stringRepeat(s.SPACE_CHAR,h.length),l.appendChild(v)):f?(t+=1,(v=this.dom.createElement("span")).style.width=2*s.config.characterWidth+"px",v.className=s.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",v.textContent=s.showSpaces?s.SPACE_CHAR:f,l.appendChild(v)):p&&(t+=1,(v=this.dom.createElement("span")).style.width=2*s.config.characterWidth+"px",v.className="ace_cjk",v.textContent=p,l.appendChild(v))}}l.appendChild(this.dom.createTextNode(c?i.slice(c):i,this.element));var v=this.dom.createElement("span");if(!this.$textToken[n.type]){var b="ace_"+n.type.replace(/\./g," ace_");"fold"==n.type&&(v.style.width=n.value.length*this.config.characterWidth+"px"),v.className=b}return v.appendChild(l),e.appendChild(v),t+i.length},this.renderIndentGuide=function(e,t,n){var i=t.search(this.$indentGuideRe);if(i<=0||i>=n)return t;if(" "==t[0]){for(var r=(i-=i%this.tabSize)/this.tabSize,o=0;o<r;o++)e.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),t.substr(i)}if("\t"==t[0]){for(o=0;o<i;o++)e.appendChild(this.$tabStrings["\t"].cloneNode(!0));return this.$highlightIndentGuide(),t.substr(i)}return this.$highlightIndentGuide(),t},this.$highlightIndentGuide=function(){if(this.$highlightIndentGuides&&this.displayIndentGuides){this.$highlightIndentGuideMarker={indentLevel:void 0,start:void 0,end:void 0,dir:void 0};var e=this.session.doc.$lines;if(e){var t=this.session.selection.getCursor(),n=/^\s*/.exec(this.session.doc.getLine(t.row))[0].length,i=Math.floor(n/this.tabSize);if(this.$highlightIndentGuideMarker={indentLevel:i,start:t.row},this.session.$bracketHighlight)for(var r=this.session.$bracketHighlight.ranges,o=0;o<r.length;o++)if(t.row!==r[o].start.row){this.$highlightIndentGuideMarker.end=r[o].start.row,t.row>r[o].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}if(!this.$highlightIndentGuideMarker.end&&""!==e[t.row]&&t.column===e[t.row].length)for(this.$highlightIndentGuideMarker.dir=1,o=t.row+1;o<e.length;o++){var s=e[o],a=/^\s*/.exec(s)[0].length;if(""!==s&&(this.$highlightIndentGuideMarker.end=o,a<=n))break}this.$renderHighlightIndentGuide()}}},this.$clearActiveIndentGuide=function(){for(var e=this.$lines.cells,t=0;t<e.length;t++){var n=e[t].element.childNodes;if(n.length>0)for(var i=0;i<n.length;i++)if(n[i].classList&&n[i].classList.contains("ace_indent-guide-active")){n[i].classList.remove("ace_indent-guide-active");break}}},this.$setIndentGuideActive=function(e,t){if(""!==this.session.doc.getLine(e.row)){var n=e.element.childNodes;if(n){var i=n[t-1];i&&i.classList&&i.classList.contains("ace_indent-guide")&&i.classList.add("ace_indent-guide-active")}}},this.$renderHighlightIndentGuide=function(){if(this.$lines){var e=this.$lines.cells;this.$clearActiveIndentGuide();var t=this.$highlightIndentGuideMarker.indentLevel;if(0!==t)if(1===this.$highlightIndentGuideMarker.dir)for(var n=0;n<e.length;n++){var i=e[n];if(this.$highlightIndentGuideMarker.end&&i.row>=this.$highlightIndentGuideMarker.start+1){if(i.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(i,t)}}else for(n=e.length-1;n>=0;n--)if(i=e[n],this.$highlightIndentGuideMarker.end&&i.row<this.$highlightIndentGuideMarker.start){if(i.row<=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(i,t)}}},this.$createLineElement=function(e){var t=this.dom.createElement("div");return t.className="ace_line",t.style.height=this.config.lineHeight+"px",t},this.$renderWrappedLine=function(e,t,n){var i=0,r=0,s=n[0],a=0,l=this.$createLineElement();e.appendChild(l);for(var c=0;c<t.length;c++){var u=t[c],d=u.value;if(0==c&&this.displayIndentGuides){if(i=d.length,!(d=this.renderIndentGuide(l,d,s)))continue;i-=d.length}if(i+d.length<s)a=this.$renderTokenInChunks(l,a,u,d),i+=d.length;else{for(;i+d.length>=s;)a=this.$renderTokenInChunks(l,a,u,d.substring(0,s-i)),d=d.substring(s-i),i=s,l=this.$createLineElement(),e.appendChild(l),l.appendChild(this.dom.createTextNode(o.stringRepeat(" ",n.indent),this.element)),a=0,s=n[++r]||Number.MAX_VALUE;0!=d.length&&(i+=d.length,a=this.$renderTokenInChunks(l,a,u,d))}}n[n.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(l,a,null,"",!0)},this.$renderSimpleLine=function(e,t){for(var n=0,i=0;i<t.length;i++){var r=t[i],o=r.value;if(0!=i||!this.displayIndentGuides||(o=this.renderIndentGuide(e,o))){if(n+o.length>this.MAX_LINE_LENGTH)return void this.$renderOverflowMessage(e,n,r,o);n=this.$renderTokenInChunks(e,n,r,o)}}},this.$renderOverflowMessage=function(e,t,n,i,r){n&&this.$renderTokenInChunks(e,t,n,i.slice(0,this.MAX_LINE_LENGTH-t));var o=this.dom.createElement("span");o.className="ace_inline_button ace_keyword ace_toggle_wrap",o.textContent=r?"<hide>":"<click to see more...>",e.appendChild(o)},this.$renderLine=function(e,t,n){if(n||0==n||(n=this.session.getFoldLine(t)),n)var i=this.$getFoldLineTokens(t,n);else i=this.session.getTokens(t);var r=e;if(i.length){var o=this.session.getRowSplitData(t);o&&o.length?(this.$renderWrappedLine(e,i,o),r=e.lastChild):(r=e,this.$useLineGroups()&&(r=this.$createLineElement(),e.appendChild(r)),this.$renderSimpleLine(r,i))}else this.$useLineGroups()&&(r=this.$createLineElement(),e.appendChild(r));if(this.showEOL&&r){n&&(t=n.end.row);var s=this.dom.createElement("span");s.className="ace_invisible ace_invisible_eol",s.textContent=t==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,r.appendChild(s)}},this.$getFoldLineTokens=function(e,t){var n=this.session,i=[],r=n.getTokens(e);return t.walk((function(e,t,o,s,a){null!=e?i.push({type:"fold",value:e}):(a&&(r=n.getTokens(t)),r.length&&function(e,t,n){for(var r=0,o=0;o+e[r].value.length<t;)if(o+=e[r].value.length,++r==e.length)return;for(o!=t&&((s=e[r].value.substring(t-o)).length>n-t&&(s=s.substring(0,n-t)),i.push({type:e[r].type,value:s}),o=t+s.length,r+=1);o<n&&r<e.length;){var s;(s=e[r].value).length+o>n?i.push({type:e[r].type,value:s.substring(0,n-o)}):i.push(e[r]),o+=s.length,r+=1}}(r,s,o))}),t.end.row,this.session.getLine(t.end.row).length),i},this.$useLineGroups=function(){return this.session.getUseWrapMode()},this.destroy=function(){}}).call(l.prototype),t.Text=l})),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],(function(e,t,n){"use strict";var i=e("../lib/dom"),r=function(e){this.element=i.createElement("div"),this.element.className="ace_layer ace_cursor-layer",e.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),i.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)};(function(){this.$updateOpacity=function(e){for(var t=this.cursors,n=t.length;n--;)i.setStyle(t[n].style,"opacity",e?"":"0")},this.$startCssAnimation=function(){for(var e=this.cursors,t=e.length;t--;)e[t].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout(function(){this.$isAnimating&&i.addCssClass(this.element,"ace_animate-blinking")}.bind(this))},this.$stopCssAnimation=function(){this.$isAnimating=!1,i.removeCssClass(this.element,"ace_animate-blinking")},this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setBlinking=function(e){e!=this.isBlinking&&(this.isBlinking=e,this.restartTimer())},this.setBlinkInterval=function(e){e!=this.blinkInterval&&(this.blinkInterval=e,this.restartTimer())},this.setSmoothBlinking=function(e){e!=this.smoothBlinking&&(this.smoothBlinking=e,i.setCssClass(this.element,"ace_smooth-blinking",e),this.$updateCursors(!0),this.restartTimer())},this.addCursor=function(){var e=i.createElement("div");return e.className="ace_cursor",this.element.appendChild(e),this.cursors.push(e),e},this.removeCursor=function(){if(this.cursors.length>1){var e=this.cursors.pop();return e.parentNode.removeChild(e),e}},this.hideCursor=function(){this.isVisible=!1,i.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.showCursor=function(){this.isVisible=!0,i.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.restartTimer=function(){var e=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,i.removeCssClass(this.element,"ace_smooth-blinking")),e(!0),this.isBlinking&&this.blinkInterval&&this.isVisible)if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout(function(){this.$isSmoothBlinking&&i.addCssClass(this.element,"ace_smooth-blinking")}.bind(this))),i.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var t=function(){this.timeoutId=setTimeout((function(){e(!1)}),.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval((function(){e(!0),t()}),this.blinkInterval),t()}else this.$stopCssAnimation()},this.getPixelPosition=function(e,t){if(!this.config||!this.session)return{left:0,top:0};e||(e=this.session.selection.getCursor());var n=this.session.documentToScreenPosition(e);return{left:this.$padding+(this.session.$bidiHandler.isBidiRow(n.row,e.row)?this.session.$bidiHandler.getPosLeft(n.column):n.column*this.config.characterWidth),top:(n.row-(t?this.config.firstRowScreen:0))*this.config.lineHeight}},this.isCursorInView=function(e,t){return e.top>=0&&e.top<t.maxHeight},this.update=function(e){this.config=e;var t=this.session.$selectionMarkers,n=0,r=0;void 0!==t&&0!==t.length||(t=[{cursor:null}]),n=0;for(var o=t.length;n<o;n++){var s=this.getPixelPosition(t[n].cursor,!0);if(!((s.top>e.height+e.offset||s.top<0)&&n>1)){var a=this.cursors[r++]||this.addCursor(),l=a.style;this.drawCursor?this.drawCursor(a,s,e,t[n],this.session):this.isCursorInView(s,e)?(i.setStyle(l,"display","block"),i.translate(a,s.left,s.top),i.setStyle(l,"width",Math.round(e.characterWidth)+"px"),i.setStyle(l,"height",e.lineHeight+"px")):i.setStyle(l,"display","none")}}for(;this.cursors.length>r;)this.removeCursor();var c=this.session.getOverwrite();this.$setOverwrite(c),this.$pixelPos=s,this.restartTimer()},this.drawCursor=null,this.$setOverwrite=function(e){e!=this.overwrite&&(this.overwrite=e,e?i.addCssClass(this.element,"ace_overwrite-cursors"):i.removeCssClass(this.element,"ace_overwrite-cursors"))},this.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)}}).call(r.prototype),t.Cursor=r})),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],(function(e,t,n){"use strict";var i=e("./lib/oop"),r=e("./lib/dom"),o=e("./lib/event"),s=e("./lib/event_emitter").EventEmitter,a=32768,l=function(e){this.element=r.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+this.classSuffix,this.inner=r.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,o.addListener(this.element,"scroll",this.onScroll.bind(this)),o.addListener(this.element,"mousedown",o.preventDefault)};(function(){i.implement(this,s),this.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1}}).call(l.prototype);var c=function(e,t){l.call(this,e),this.scrollTop=0,this.scrollHeight=0,t.$scrollbarWidth=this.width=r.scrollbarWidth(e.ownerDocument),this.inner.style.width=this.element.style.width=(this.width||15)+5+"px",this.$minWidth=0};i.inherits(c,l),function(){this.classSuffix="-v",this.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,1!=this.coeff){var e=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-e)/(this.coeff-e)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},this.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},this.setHeight=function(e){this.element.style.height=e+"px"},this.setInnerHeight=this.setScrollHeight=function(e){this.scrollHeight=e,e>a?(this.coeff=a/e,e=a):1!=this.coeff&&(this.coeff=1),this.inner.style.height=e+"px"},this.setScrollTop=function(e){this.scrollTop!=e&&(this.skipEvent=!0,this.scrollTop=e,this.element.scrollTop=e*this.coeff)}}.call(c.prototype);var u=function(e,t){l.call(this,e),this.scrollLeft=0,this.height=t.$scrollbarWidth,this.inner.style.height=this.element.style.height=(this.height||15)+5+"px"};i.inherits(u,l),function(){this.classSuffix="-h",this.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},this.getHeight=function(){return this.isVisible?this.height:0},this.setWidth=function(e){this.element.style.width=e+"px"},this.setInnerWidth=function(e){this.inner.style.width=e+"px"},this.setScrollWidth=function(e){this.inner.style.width=e+"px"},this.setScrollLeft=function(e){this.scrollLeft!=e&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=e)}}.call(u.prototype),t.ScrollBar=c,t.ScrollBarV=c,t.ScrollBarH=u,t.VScrollBar=c,t.HScrollBar=u})),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],(function(e,t,n){"use strict";var i=e("./lib/oop"),r=e("./lib/dom"),o=e("./lib/event"),s=e("./lib/event_emitter").EventEmitter;r.importCssString(".ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{\n position: absolute;\n background: rgba(128, 128, 128, 0.6);\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n border: 1px solid #bbb;\n border-radius: 2px;\n z-index: 8;\n}\n.ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h {\n position: absolute;\n z-index: 6;\n background: none;\n overflow: hidden!important;\n}\n.ace_editor>.ace_sb-v {\n z-index: 6;\n right: 0;\n top: 0;\n width: 12px;\n}\n.ace_editor>.ace_sb-v div {\n z-index: 8;\n right: 0;\n width: 100%;\n}\n.ace_editor>.ace_sb-h {\n bottom: 0;\n left: 0;\n height: 12px;\n}\n.ace_editor>.ace_sb-h div {\n bottom: 0;\n height: 100%;\n}\n.ace_editor>.ace_sb_grabbed {\n z-index: 8;\n background: #000;\n}","ace_scrollbar.css",!1);var a=function(e){this.element=r.createElement("div"),this.element.className="ace_sb"+this.classSuffix,this.inner=r.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,o.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")};(function(){i.implement(this,s),this.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1}}).call(a.prototype);var l=function(e,t){a.call(this,e),this.scrollTop=0,this.scrollHeight=0,this.parent=e,this.width=this.VScrollWidth,this.renderer=t,this.inner.style.width=this.element.style.width=(this.width||15)+"px",this.$minWidth=0};i.inherits(l,a),function(){this.classSuffix="-v",i.implement(this,s),this.onMouseDown=function(e,t){if("mousedown"===e&&0===o.getButton(t)&&2!==t.detail){if(t.target===this.inner){var n=this,i=t.clientY,r=t.clientY,s=this.thumbTop;o.capture(this.inner,(function(e){i=e.clientY}),(function(){clearInterval(a)}));var a=setInterval((function(){if(void 0!==i){var e=n.scrollTopFromThumbTop(s+i-r);e!==n.scrollTop&&n._emit("scroll",{data:e})}}),20);return o.preventDefault(t)}var l=t.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(l)}),o.preventDefault(t)}},this.getHeight=function(){return this.height},this.scrollTopFromThumbTop=function(e){var t=e*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return(t>>=0)<0?t=0:t>this.pageHeight-this.viewHeight&&(t=this.pageHeight-this.viewHeight),t},this.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},this.setHeight=function(e){this.height=Math.max(0,e),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},this.setInnerHeight=this.setScrollHeight=function(e,t){(this.pageHeight!==e||t)&&(this.pageHeight=e,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop})))},this.setScrollTop=function(e){this.scrollTop=e,e<0&&(e=0),this.thumbTop=e*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"}}.call(l.prototype);var c=function(e,t){a.call(this,e),this.scrollLeft=0,this.scrollWidth=0,this.height=this.HScrollHeight,this.inner.style.height=this.element.style.height=(this.height||12)+"px",this.renderer=t};i.inherits(c,a),function(){this.classSuffix="-h",i.implement(this,s),this.onMouseDown=function(e,t){if("mousedown"===e&&0===o.getButton(t)&&2!==t.detail){if(t.target===this.inner){var n=this,i=t.clientX,r=t.clientX,s=this.thumbLeft;o.capture(this.inner,(function(e){i=e.clientX}),(function(){clearInterval(a)}));var a=setInterval((function(){if(void 0!==i){var e=n.scrollLeftFromThumbLeft(s+i-r);e!==n.scrollLeft&&n._emit("scroll",{data:e})}}),20);return o.preventDefault(t)}var l=t.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(l)}),o.preventDefault(t)}},this.getHeight=function(){return this.isVisible?this.height:0},this.scrollLeftFromThumbLeft=function(e){var t=e*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return(t>>=0)<0?t=0:t>this.pageWidth-this.viewWidth&&(t=this.pageWidth-this.viewWidth),t},this.setWidth=function(e){this.width=Math.max(0,e),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},this.setInnerWidth=this.setScrollWidth=function(e,t){(this.pageWidth!==e||t)&&(this.pageWidth=e,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth,this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft})))},this.setScrollLeft=function(e){this.scrollLeft=e,e<0&&(e=0),this.thumbLeft=e*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"}}.call(c.prototype),t.ScrollBar=l,t.ScrollBarV=l,t.ScrollBarH=c,t.VScrollBar=l,t.HScrollBar=c})),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],(function(e,t,n){"use strict";var i=e("./lib/event"),r=function(e,t){this.onRender=e,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=t||window;var n=this;this._flush=function(e){n.pending=!1;var t=n.changes;if(t&&(i.blockIdle(100),n.changes=0,n.onRender(t)),n.changes){if(n.$recursionLimit--<0)return;n.schedule()}else n.$recursionLimit=2}};(function(){this.schedule=function(e){this.changes=this.changes|e,this.changes&&!this.pending&&(i.nextFrame(this._flush),this.pending=!0)},this.clear=function(e){var t=this.changes;return this.changes=0,t}}).call(r.prototype),t.RenderLoop=r})),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],(function(e,t,n){var i=e("../lib/oop"),r=e("../lib/dom"),o=e("../lib/lang"),s=e("../lib/event"),a=e("../lib/useragent"),l=e("../lib/event_emitter").EventEmitter,c="function"==typeof ResizeObserver,u=200,d=t.FontMetrics=function(e,t){this.charCount=t||250,this.el=r.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=r.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=r.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),e.appendChild(this.el),this.$measureNode.textContent=o.stringRepeat("X",this.charCount),this.$characterSize={width:0,height:0},c?this.$addObserver():this.checkForSizeChanges()};(function(){i.implement(this,l),this.$characterSize={width:0,height:0},this.$setMeasureNodeStyles=function(e,t){e.width=e.height="auto",e.left=e.top="0px",e.visibility="hidden",e.position="absolute",e.whiteSpace="pre",a.isIE<8?e["font-family"]="inherit":e.font="inherit",e.overflow=t?"hidden":"visible"},this.checkForSizeChanges=function(e){if(void 0===e&&(e=this.$measureSizes()),e&&(this.$characterSize.width!==e.width||this.$characterSize.height!==e.height)){this.$measureNode.style.fontWeight="bold";var t=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=e,this.charSizes=Object.create(null),this.allowBoldFonts=t&&t.width===e.width&&t.height===e.height,this._emit("changeCharacterSize",{data:e})}},this.$addObserver=function(){var e=this;this.$observer=new window.ResizeObserver((function(t){e.checkForSizeChanges()})),this.$observer.observe(this.$measureNode)},this.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var e=this;return this.$pollSizeChangesTimer=s.onIdle((function t(){e.checkForSizeChanges(),s.onIdle(t,500)}),500)},this.setPolling=function(e){e?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},this.$measureSizes=function(e){var t=(e=e||this.$measureNode).getBoundingClientRect(),n={height:t.height,width:t.width/this.charCount};return 0===n.width||0===n.height?null:n},this.$measureCharWidth=function(e){return this.$main.textContent=o.stringRepeat(e,this.charCount),this.$main.getBoundingClientRect().width/this.charCount},this.getCharacterWidth=function(e){var t=this.charSizes[e];return void 0===t&&(t=this.charSizes[e]=this.$measureCharWidth(e)/this.$characterSize.width),t},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},this.$getZoom=function e(t){return t&&t.parentElement?(window.getComputedStyle(t).zoom||1)*e(t.parentElement):1},this.$initTransformMeasureNodes=function(){var e=function(e,t){return["div",{style:"position: absolute;top:"+e+"px;left:"+t+"px;"}]};this.els=r.buildDom([e(0,0),e(u,0),e(0,u),e(u,u)],this.el)},this.transformCoordinates=function(e,t){function n(e,t,n){var i=e[1]*t[0]-e[0]*t[1];return[(-t[1]*n[0]+t[0]*n[1])/i,(+e[1]*n[0]-e[0]*n[1])/i]}function i(e,t){return[e[0]-t[0],e[1]-t[1]]}function r(e,t){return[e[0]+t[0],e[1]+t[1]]}function o(e,t){return[e*t[0],e*t[1]]}function s(e){var t=e.getBoundingClientRect();return[t.left,t.top]}e&&(e=o(1/this.$getZoom(this.el),e)),this.els||this.$initTransformMeasureNodes();var a=s(this.els[0]),l=s(this.els[1]),c=s(this.els[2]),d=s(this.els[3]),h=n(i(d,l),i(d,c),i(r(l,c),r(d,a))),f=o(1+h[0],i(l,a)),p=o(1+h[1],i(c,a));if(t){var g=t,m=h[0]*g[0]/u+h[1]*g[1]/u+1,v=r(o(g[0],f),o(g[1],p));return r(o(1/m/u,v),a)}var b=i(e,a),y=n(i(f,o(h[0],b)),i(p,o(h[1],b)),b);return o(u,y)}}).call(d.prototype)})),ace.define("ace/css/editor.css",["require","exports","module"],(function(e,t,n){n.exports='/*\nstyles = []\nfor (var i = 1; i < 16; i++) {\n styles.push(".ace_br" + i + "{" + (\n ["top-left", "top-right", "bottom-right", "bottom-left"]\n ).map(function(x, j) {\n return i & (1<<j) ? "border-" + x + "-radius: 3px;" : "" \n }).filter(Boolean).join(" ") + "}")\n}\nstyles.join("\\n")\n*/\n.ace_br1 {border-top-left-radius : 3px;}\n.ace_br2 {border-top-right-radius : 3px;}\n.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}\n.ace_br4 {border-bottom-right-radius: 3px;}\n.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}\n.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}\n.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}\n.ace_br8 {border-bottom-left-radius : 3px;}\n.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}\n.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}\n.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n\n\n.ace_editor {\n position: relative;\n overflow: hidden;\n padding: 0;\n font: 12px/normal \'Monaco\', \'Menlo\', \'Ubuntu Mono\', \'Consolas\', \'source-code-pro\', monospace;\n direction: ltr;\n text-align: left;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\n\n.ace_scroller {\n position: absolute;\n overflow: hidden;\n top: 0;\n bottom: 0;\n background-color: inherit;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n cursor: text;\n}\n\n.ace_content {\n position: absolute;\n box-sizing: border-box;\n min-width: 100%;\n contain: style size layout;\n font-variant-ligatures: no-common-ligatures;\n}\n\n.ace_dragging .ace_scroller:before{\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n content: \'\';\n background: rgba(250, 250, 250, 0.01);\n z-index: 1000;\n}\n.ace_dragging.ace_dark .ace_scroller:before{\n background: rgba(0, 0, 0, 0.01);\n}\n\n.ace_gutter {\n position: absolute;\n overflow : hidden;\n width: auto;\n top: 0;\n bottom: 0;\n left: 0;\n cursor: default;\n z-index: 4;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n contain: style size layout;\n}\n\n.ace_gutter-active-line {\n position: absolute;\n left: 0;\n right: 0;\n}\n\n.ace_scroller.ace_scroll-left {\n box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;\n}\n\n.ace_gutter-cell {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n padding-left: 19px;\n padding-right: 6px;\n background-repeat: no-repeat;\n}\n\n.ace_gutter-cell.ace_error {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");\n background-repeat: no-repeat;\n background-position: 2px center;\n}\n\n.ace_gutter-cell.ace_warning {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");\n background-position: 2px center;\n}\n\n.ace_gutter-cell.ace_info {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");\n background-position: 2px center;\n}\n.ace_dark .ace_gutter-cell.ace_info {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");\n}\n\n.ace_scrollbar {\n contain: strict;\n position: absolute;\n right: 0;\n bottom: 0;\n z-index: 6;\n}\n\n.ace_scrollbar-inner {\n position: absolute;\n cursor: text;\n left: 0;\n top: 0;\n}\n\n.ace_scrollbar-v{\n overflow-x: hidden;\n overflow-y: scroll;\n top: 0;\n}\n\n.ace_scrollbar-h {\n overflow-x: scroll;\n overflow-y: hidden;\n left: 0;\n}\n\n.ace_print-margin {\n position: absolute;\n height: 100%;\n}\n\n.ace_text-input {\n position: absolute;\n z-index: 0;\n width: 0.5em;\n height: 1em;\n opacity: 0;\n background: transparent;\n -moz-appearance: none;\n appearance: none;\n border: none;\n resize: none;\n outline: none;\n overflow: hidden;\n font: inherit;\n padding: 0 1px;\n margin: 0 -1px;\n contain: strict;\n -ms-user-select: text;\n -moz-user-select: text;\n -webkit-user-select: text;\n user-select: text;\n /*with `pre-line` chrome inserts instead of space*/\n white-space: pre!important;\n}\n.ace_text-input.ace_composition {\n background: transparent;\n color: inherit;\n z-index: 1000;\n opacity: 1;\n}\n.ace_composition_placeholder { color: transparent }\n.ace_composition_marker { \n border-bottom: 1px solid;\n position: absolute;\n border-radius: 0;\n margin-top: 1px;\n}\n\n[ace_nocontext=true] {\n transform: none!important;\n filter: none!important;\n clip-path: none!important;\n mask : none!important;\n contain: none!important;\n perspective: none!important;\n mix-blend-mode: initial!important;\n z-index: auto;\n}\n\n.ace_layer {\n z-index: 1;\n position: absolute;\n overflow: hidden;\n /* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/\n word-wrap: normal;\n white-space: pre;\n height: 100%;\n width: 100%;\n box-sizing: border-box;\n /* setting pointer-events: auto; on node under the mouse, which changes\n during scroll, will break mouse wheel scrolling in Safari */\n pointer-events: none;\n}\n\n.ace_gutter-layer {\n position: relative;\n width: auto;\n text-align: right;\n pointer-events: auto;\n height: 1000000px;\n contain: style size layout;\n}\n\n.ace_text-layer {\n font: inherit !important;\n position: absolute;\n height: 1000000px;\n width: 1000000px;\n contain: style size layout;\n}\n\n.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {\n contain: style size layout;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n}\n\n.ace_hidpi .ace_text-layer,\n.ace_hidpi .ace_gutter-layer,\n.ace_hidpi .ace_content,\n.ace_hidpi .ace_gutter {\n contain: strict;\n will-change: transform;\n}\n.ace_hidpi .ace_text-layer > .ace_line, \n.ace_hidpi .ace_text-layer > .ace_line_group {\n contain: strict;\n}\n\n.ace_cjk {\n display: inline-block;\n text-align: center;\n}\n\n.ace_cursor-layer {\n z-index: 4;\n}\n\n.ace_cursor {\n z-index: 4;\n position: absolute;\n box-sizing: border-box;\n border-left: 2px solid;\n /* workaround for smooth cursor repaintng whole screen in chrome */\n transform: translatez(0);\n}\n\n.ace_multiselect .ace_cursor {\n border-left-width: 1px;\n}\n\n.ace_slim-cursors .ace_cursor {\n border-left-width: 1px;\n}\n\n.ace_overwrite-cursors .ace_cursor {\n border-left-width: 0;\n border-bottom: 1px solid;\n}\n\n.ace_hidden-cursors .ace_cursor {\n opacity: 0.2;\n}\n\n.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {\n opacity: 0;\n}\n\n.ace_smooth-blinking .ace_cursor {\n transition: opacity 0.18s;\n}\n\n.ace_animate-blinking .ace_cursor {\n animation-duration: 1000ms;\n animation-timing-function: step-end;\n animation-name: blink-ace-animate;\n animation-iteration-count: infinite;\n}\n\n.ace_animate-blinking.ace_smooth-blinking .ace_cursor {\n animation-duration: 1000ms;\n animation-timing-function: ease-in-out;\n animation-name: blink-ace-animate-smooth;\n}\n \n@keyframes blink-ace-animate {\n from, to { opacity: 1; }\n 60% { opacity: 0; }\n}\n\n@keyframes blink-ace-animate-smooth {\n from, to { opacity: 1; }\n 45% { opacity: 1; }\n 60% { opacity: 0; }\n 85% { opacity: 0; }\n}\n\n.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {\n position: absolute;\n z-index: 3;\n}\n\n.ace_marker-layer .ace_selection {\n position: absolute;\n z-index: 5;\n}\n\n.ace_marker-layer .ace_bracket {\n position: absolute;\n z-index: 6;\n}\n\n.ace_marker-layer .ace_error_bracket {\n position: absolute;\n border-bottom: 1px solid #DE5555;\n border-radius: 0;\n}\n\n.ace_marker-layer .ace_active-line {\n position: absolute;\n z-index: 2;\n}\n\n.ace_marker-layer .ace_selected-word {\n position: absolute;\n z-index: 4;\n box-sizing: border-box;\n}\n\n.ace_line .ace_fold {\n box-sizing: border-box;\n\n display: inline-block;\n height: 11px;\n margin-top: -2px;\n vertical-align: middle;\n\n background-image:\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");\n background-repeat: no-repeat, repeat-x;\n background-position: center center, top left;\n color: transparent;\n\n border: 1px solid black;\n border-radius: 2px;\n\n cursor: pointer;\n pointer-events: auto;\n}\n\n.ace_dark .ace_fold {\n}\n\n.ace_fold:hover{\n background-image:\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");\n}\n\n.ace_tooltip {\n background-color: #FFF;\n background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));\n border: 1px solid gray;\n border-radius: 1px;\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);\n color: black;\n max-width: 100%;\n padding: 3px 4px;\n position: fixed;\n z-index: 999999;\n box-sizing: border-box;\n cursor: default;\n white-space: pre;\n word-wrap: break-word;\n line-height: normal;\n font-style: normal;\n font-weight: normal;\n letter-spacing: normal;\n pointer-events: none;\n}\n\n.ace_folding-enabled > .ace_gutter-cell {\n padding-right: 13px;\n}\n\n.ace_fold-widget {\n box-sizing: border-box;\n\n margin: 0 -12px 0 1px;\n display: none;\n width: 11px;\n vertical-align: top;\n\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");\n background-repeat: no-repeat;\n background-position: center;\n\n border-radius: 3px;\n \n border: 1px solid transparent;\n cursor: pointer;\n}\n\n.ace_folding-enabled .ace_fold-widget {\n display: inline-block; \n}\n\n.ace_fold-widget.ace_end {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");\n}\n\n.ace_fold-widget.ace_closed {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");\n}\n\n.ace_fold-widget:hover {\n border: 1px solid rgba(0, 0, 0, 0.3);\n background-color: rgba(255, 255, 255, 0.2);\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);\n}\n\n.ace_fold-widget:active {\n border: 1px solid rgba(0, 0, 0, 0.4);\n background-color: rgba(0, 0, 0, 0.05);\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);\n}\n/**\n * Dark version for fold widgets\n */\n.ace_dark .ace_fold-widget {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");\n}\n.ace_dark .ace_fold-widget.ace_end {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");\n}\n.ace_dark .ace_fold-widget.ace_closed {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");\n}\n.ace_dark .ace_fold-widget:hover {\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\n background-color: rgba(255, 255, 255, 0.1);\n}\n.ace_dark .ace_fold-widget:active {\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\n}\n\n.ace_inline_button {\n border: 1px solid lightgray;\n display: inline-block;\n margin: -1px 8px;\n padding: 0 5px;\n pointer-events: auto;\n cursor: pointer;\n}\n.ace_inline_button:hover {\n border-color: gray;\n background: rgba(200,200,200,0.2);\n display: inline-block;\n pointer-events: auto;\n}\n\n.ace_fold-widget.ace_invalid {\n background-color: #FFB4B4;\n border-color: #DE5555;\n}\n\n.ace_fade-fold-widgets .ace_fold-widget {\n transition: opacity 0.4s ease 0.05s;\n opacity: 0;\n}\n\n.ace_fade-fold-widgets:hover .ace_fold-widget {\n transition: opacity 0.05s ease 0.05s;\n opacity:1;\n}\n\n.ace_underline {\n text-decoration: underline;\n}\n\n.ace_bold {\n font-weight: bold;\n}\n\n.ace_nobold .ace_bold {\n font-weight: normal;\n}\n\n.ace_italic {\n font-style: italic;\n}\n\n\n.ace_error-marker {\n background-color: rgba(255, 0, 0,0.2);\n position: absolute;\n z-index: 9;\n}\n\n.ace_highlight-marker {\n background-color: rgba(255, 255, 0,0.2);\n position: absolute;\n z-index: 8;\n}\n\n.ace_mobile-menu {\n position: absolute;\n line-height: 1.5;\n border-radius: 4px;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n background: white;\n box-shadow: 1px 3px 2px grey;\n border: 1px solid #dcdcdc;\n color: black;\n}\n.ace_dark > .ace_mobile-menu {\n background: #333;\n color: #ccc;\n box-shadow: 1px 3px 2px grey;\n border: 1px solid #444;\n\n}\n.ace_mobile-button {\n padding: 2px;\n cursor: pointer;\n overflow: hidden;\n}\n.ace_mobile-button:hover {\n background-color: #eee;\n opacity:1;\n}\n.ace_mobile-button:active {\n background-color: #ddd;\n}\n\n.ace_placeholder {\n font-family: arial;\n transform: scale(0.9);\n transform-origin: left;\n white-space: pre;\n opacity: 0.7;\n margin: 0 10px;\n}'})),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],(function(e,t,n){"use strict";var i=e("../lib/dom"),r=e("../lib/oop"),o=e("../lib/event_emitter").EventEmitter,s=function(e,t){this.canvas=i.createElement("canvas"),this.renderer=t,this.pixelRatio=1,this.maxHeight=t.layerConfig.maxHeight,this.lineHeight=t.layerConfig.lineHeight,this.canvasHeight=e.parent.scrollHeight,this.heightRatio=this.canvasHeight/this.maxHeight,this.canvasWidth=e.width,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7px",this.canvas.style.position="absolute",this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},e.element.appendChild(this.canvas)};(function(){r.implement(this,o),this.$updateDecorators=function(e){var t=!0===this.renderer.theme.isDark?this.colors.dark:this.colors.light;e&&(this.maxHeight=e.maxHeight,this.lineHeight=e.lineHeight,this.canvasHeight=e.height,(e.lastRow+1)*this.lineHeight<this.canvasHeight?this.heightRatio=1:this.heightRatio=this.canvasHeight/this.maxHeight);var n=this.canvas.getContext("2d"),i=this.renderer.session.$annotations;if(n.clearRect(0,0,this.canvas.width,this.canvas.height),i){var r={info:1,warning:2,error:3};i.forEach((function(e){e.priority=r[e.type]||null})),i=i.sort((function(e,t){return e.priority<t.priority?-1:e.priority>t.priority?1:0}));for(var o=this.renderer.session.$foldData,s=0;s<i.length;s++){var a=i[s].row,l=this.compensateFoldRows(a,o),c=Math.round((a-l)*this.lineHeight*this.heightRatio),u=Math.round((a-l)*this.lineHeight*this.heightRatio),d=Math.round(((a-l)*this.lineHeight+this.lineHeight)*this.heightRatio);if(d-u<this.minDecorationHeight){var h=(u+d)/2|0;h<this.halfMinDecorationHeight?h=this.halfMinDecorationHeight:h+this.halfMinDecorationHeight>this.canvasHeight&&(h=this.canvasHeight-this.halfMinDecorationHeight),u=Math.round(h-this.halfMinDecorationHeight),d=Math.round(h+this.halfMinDecorationHeight)}n.fillStyle=t[i[s].type]||null,n.fillRect(0,c,this.canvasWidth,d-u)}}var f=this.renderer.session.selection.getCursor();f&&(l=this.compensateFoldRows(f.row,o),c=Math.round((f.row-l)*this.lineHeight*this.heightRatio),n.fillStyle="rgba(0, 0, 0, 0.5)",n.fillRect(0,c,this.canvasWidth,2))},this.compensateFoldRows=function(e,t){var n=0;if(t&&t.length>0)for(var i=0;i<t.length;i++)e>t[i].start.row&&e<t[i].end.row?n+=e-t[i].start.row:e>=t[i].end.row&&(n+=t[i].end.row-t[i].start.row);return n}}).call(s.prototype),t.Decorator=s})),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/scrollbar_custom","ace/scrollbar_custom","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/css/editor.css","ace/layer/decorators","ace/lib/useragent"],(function(e,t,n){"use strict";var i=e("./lib/oop"),r=e("./lib/dom"),o=e("./config"),s=e("./layer/gutter").Gutter,a=e("./layer/marker").Marker,l=e("./layer/text").Text,c=e("./layer/cursor").Cursor,u=e("./scrollbar").HScrollBar,d=e("./scrollbar").VScrollBar,h=e("./scrollbar_custom").HScrollBar,f=e("./scrollbar_custom").VScrollBar,p=e("./renderloop").RenderLoop,g=e("./layer/font_metrics").FontMetrics,m=e("./lib/event_emitter").EventEmitter,v=e("./css/editor.css"),b=e("./layer/decorators").Decorator,y=e("./lib/useragent"),w=y.isIE;r.importCssString(v,"ace_editor.css",!1);var _=function(e,t){var n=this;this.container=e||r.createElement("div"),r.addCssClass(this.container,"ace_editor"),r.HI_DPI&&r.addCssClass(this.container,"ace_hidpi"),this.setTheme(t),null==o.get("useStrictCSP")&&o.set("useStrictCSP",!1),this.$gutter=r.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden",!0),this.scroller=r.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=r.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new s(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new a(this.content);var i=this.$textLayer=new l(this.content);this.canvas=i.element,this.$markerFront=new a(this.content),this.$cursorLayer=new c(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new d(this.container,this),this.scrollBarH=new u(this.container,this),this.scrollBarV.on("scroll",(function(e){n.$scrollAnimation||n.session.setScrollTop(e.data-n.scrollMargin.top)})),this.scrollBarH.on("scroll",(function(e){n.$scrollAnimation||n.session.setScrollLeft(e.data-n.scrollMargin.left)})),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new g(this.container,this.$textLayer.MAX_CHUNK_LENGTH),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",(function(e){n.updateCharacterSize(),n.onResize(!0,n.gutterWidth,n.$size.width,n.$size.height),n._signal("changeCharacterSize",e)})),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!y.isIOS,this.$loop=new p(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),o.resetOptions(this),o._signal("renderer",this)};(function(){this.CHANGE_CURSOR=1,this.CHANGE_MARKER=2,this.CHANGE_GUTTER=4,this.CHANGE_SCROLL=8,this.CHANGE_LINES=16,this.CHANGE_TEXT=32,this.CHANGE_SIZE=64,this.CHANGE_MARKER_BACK=128,this.CHANGE_MARKER_FRONT=256,this.CHANGE_FULL=512,this.CHANGE_H_SCROLL=1024,i.implement(this,m),this.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),r.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},this.setSession=function(e){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=e,e&&this.scrollMargin.top&&e.getScrollTop()<=0&&e.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(e),this.$markerBack.setSession(e),this.$markerFront.setSession(e),this.$gutterLayer.setSession(e),this.$textLayer.setSession(e),e&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},this.updateLines=function(e,t,n){if(void 0===t&&(t=1/0),this.$changedLines?(this.$changedLines.firstRow>e&&(this.$changedLines.firstRow=e),this.$changedLines.lastRow<t&&(this.$changedLines.lastRow=t)):this.$changedLines={firstRow:e,lastRow:t},this.$changedLines.lastRow<this.layerConfig.firstRow){if(!n)return;this.$changedLines.lastRow=this.layerConfig.lastRow}this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},this.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},this.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},this.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},this.updateFull=function(e){e?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},this.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},this.$changes=0,this.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},this.onResize=function(e,t,n,i){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=e?1:0;var r=this.container;i||(i=r.clientHeight||r.scrollHeight),n||(n=r.clientWidth||r.scrollWidth);var o=this.$updateCachedSize(e,t,n,i);if(!this.$size.scrollerHeight||!n&&!i)return this.resizing=0;e&&(this.$gutterLayer.$padding=null),e?this.$renderChanges(o|this.$changes,!0):this.$loop.schedule(o|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},this.$updateCachedSize=function(e,t,n,i){i-=this.$extraHeight||0;var o=0,s=this.$size,a={width:s.width,height:s.height,scrollerHeight:s.scrollerHeight,scrollerWidth:s.scrollerWidth};if(i&&(e||s.height!=i)&&(s.height=i,o|=this.CHANGE_SIZE,s.scrollerHeight=s.height,this.$horizScroll&&(s.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(s.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",o|=this.CHANGE_SCROLL),n&&(e||s.width!=n)){o|=this.CHANGE_SIZE,s.width=n,null==t&&(t=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=t,r.setStyle(this.scrollBarH.element.style,"left",t+"px"),r.setStyle(this.scroller.style,"left",t+this.margin.left+"px"),s.scrollerWidth=Math.max(0,n-t-this.scrollBarV.getWidth()-this.margin.h),r.setStyle(this.$gutter.style,"left",this.margin.left+"px");var l=this.scrollBarV.getWidth()+"px";r.setStyle(this.scrollBarH.element.style,"right",l),r.setStyle(this.scroller.style,"right",l),r.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(s.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||e)&&(o|=this.CHANGE_FULL)}return s.$dirty=!n||!i,o&&this._signal("resize",a),o},this.onGutterResize=function(e){var t=this.$showGutter?e:0;t!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,t,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()||this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},this.adjustWrapLimit=function(){var e=this.$size.scrollerWidth-2*this.$padding,t=Math.floor(e/this.characterWidth);return this.session.adjustWrapLimit(t,this.$showPrintMargin&&this.$printMarginColumn)},this.setAnimatedScroll=function(e){this.setOption("animatedScroll",e)},this.getAnimatedScroll=function(){return this.$animatedScroll},this.setShowInvisibles=function(e){this.setOption("showInvisibles",e),this.session.$bidiHandler.setShowInvisibles(e)},this.getShowInvisibles=function(){return this.getOption("showInvisibles")},this.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},this.setDisplayIndentGuides=function(e){this.setOption("displayIndentGuides",e)},this.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},this.setHighlightIndentGuides=function(e){this.setOption("highlightIndentGuides",e)},this.setShowPrintMargin=function(e){this.setOption("showPrintMargin",e)},this.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},this.setPrintMarginColumn=function(e){this.setOption("printMarginColumn",e)},this.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},this.getShowGutter=function(){return this.getOption("showGutter")},this.setShowGutter=function(e){return this.setOption("showGutter",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.$updatePrintMargin=function(){if(this.$showPrintMargin||this.$printMarginEl){if(!this.$printMarginEl){var e=r.createElement("div");e.className="ace_layer ace_print-margin-layer",this.$printMarginEl=r.createElement("div"),this.$printMarginEl.className="ace_print-margin",e.appendChild(this.$printMarginEl),this.content.insertBefore(e,this.content.firstChild)}var t=this.$printMarginEl.style;t.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",t.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&-1==this.session.$wrap&&this.adjustWrapLimit()}},this.getContainerElement=function(){return this.container},this.getMouseEventTarget=function(){return this.scroller},this.getTextAreaContainer=function(){return this.container},this.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var e=this.textarea.style,t=this.$composition;if(this.$keepTextAreaAtCursor||t){var n=this.$cursorLayer.$pixelPos;if(n){t&&t.markerRange&&(n=this.$cursorLayer.getPixelPosition(t.markerRange.start,!0));var i=this.layerConfig,o=n.top,s=n.left;o-=i.offset;var a=t&&t.useTextareaForIME?this.lineHeight:w?0:1;if(o<0||o>i.height-a)r.translate(this.textarea,0,0);else{var l=1,c=this.$size.height-a;if(t)if(t.useTextareaForIME){var u=this.textarea.value;l=this.characterWidth*this.session.$getStringScreenWidth(u)[0]}else o+=this.lineHeight+2;else o+=this.lineHeight;(s-=this.scrollLeft)>this.$size.scrollerWidth-l&&(s=this.$size.scrollerWidth-l),s+=this.gutterWidth+this.margin.left,r.setStyle(e,"height",a+"px"),r.setStyle(e,"width",l+"px"),r.translate(this.textarea,Math.min(s,this.$size.scrollerWidth-l),Math.min(o,c))}}}else r.translate(this.textarea,-100,0)}},this.getFirstVisibleRow=function(){return this.layerConfig.firstRow},this.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(0===this.layerConfig.offset?0:1)},this.getLastFullyVisibleRow=function(){var e=this.layerConfig,t=e.lastRow;return this.session.documentToScreenRow(t,0)*e.lineHeight-this.session.getScrollTop()>e.height-e.lineHeight?t-1:t},this.getLastVisibleRow=function(){return this.layerConfig.lastRow},this.$padding=null,this.setPadding=function(e){this.$padding=e,this.$textLayer.setPadding(e),this.$cursorLayer.setPadding(e),this.$markerFront.setPadding(e),this.$markerBack.setPadding(e),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},this.setScrollMargin=function(e,t,n,i){var r=this.scrollMargin;r.top=0|e,r.bottom=0|t,r.right=0|i,r.left=0|n,r.v=r.top+r.bottom,r.h=r.left+r.right,r.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-r.top),this.updateFull()},this.setMargin=function(e,t,n,i){var r=this.margin;r.top=0|e,r.bottom=0|t,r.right=0|i,r.left=0|n,r.v=r.top+r.bottom,r.h=r.left+r.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},this.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},this.setHScrollBarAlwaysVisible=function(e){this.setOption("hScrollBarAlwaysVisible",e)},this.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},this.setVScrollBarAlwaysVisible=function(e){this.setOption("vScrollBarAlwaysVisible",e)},this.$updateScrollBarV=function(){var e=this.layerConfig.maxHeight,t=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(e-=(t-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>e-t&&(e=this.scrollTop+t,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(e+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},this.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},this.$frozen=!1,this.freeze=function(){this.$frozen=!0},this.unfreeze=function(){this.$frozen=!1},this.$renderChanges=function(e,t){if(this.$changes&&(e|=this.$changes,this.$changes=0),this.session&&this.container.offsetWidth&&!this.$frozen&&(e||t)){if(this.$size.$dirty)return this.$changes|=e,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",e),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var n=this.layerConfig;if(e&this.CHANGE_FULL||e&this.CHANGE_SIZE||e&this.CHANGE_TEXT||e&this.CHANGE_LINES||e&this.CHANGE_SCROLL||e&this.CHANGE_H_SCROLL){if(e|=this.$computeLayerConfig()|this.$loop.clear(),n.firstRow!=this.layerConfig.firstRow&&n.firstRowScreen==this.layerConfig.firstRowScreen){var i=this.scrollTop+(n.firstRow-this.layerConfig.firstRow)*this.lineHeight;i>0&&(this.scrollTop=i,e|=this.CHANGE_SCROLL,e|=this.$computeLayerConfig()|this.$loop.clear())}n=this.layerConfig,this.$updateScrollBarV(),e&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),r.translate(this.content,-this.scrollLeft,-n.offset);var o=n.width+2*this.$padding+"px",s=n.minHeight+"px";r.setStyle(this.content.style,"width",o),r.setStyle(this.content.style,"height",s)}if(e&this.CHANGE_H_SCROLL&&(r.translate(this.content,-this.scrollLeft,-n.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller":"ace_scroller ace_scroll-left"),e&this.CHANGE_FULL)return this.$changedLines=null,this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),void this._signal("afterRender",e);if(e&this.CHANGE_SCROLL)return this.$changedLines=null,e&this.CHANGE_TEXT||e&this.CHANGE_LINES?this.$textLayer.update(n):this.$textLayer.scrollLines(n),this.$showGutter&&(e&this.CHANGE_GUTTER||e&this.CHANGE_LINES?this.$gutterLayer.update(n):this.$gutterLayer.scrollLines(n)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),void this._signal("afterRender",e);e&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n)):e&this.CHANGE_LINES?((this.$updateLines()||e&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n)):e&this.CHANGE_TEXT||e&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n)):e&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n)),e&this.CHANGE_CURSOR&&(this.$cursorLayer.update(n),this.$moveTextAreaToCursor()),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(n),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(n),this._signal("afterRender",e)}else this.$changes|=e},this.$autosize=function(){var e=this.session.getScreenLength()*this.lineHeight,t=this.$maxLines*this.lineHeight,n=Math.min(t,Math.max((this.$minLines||1)*this.lineHeight,e))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(n+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&n>this.$maxPixelHeight&&(n=this.$maxPixelHeight);var i=!(n<=2*this.lineHeight)&&e>t;if(n!=this.desiredHeight||this.$size.height!=this.desiredHeight||i!=this.$vScroll){i!=this.$vScroll&&(this.$vScroll=i,this.scrollBarV.setVisible(i));var r=this.container.clientWidth;this.container.style.height=n+"px",this.$updateCachedSize(!0,this.$gutterWidth,r,n),this.desiredHeight=n,this._signal("autosize")}},this.$computeLayerConfig=function(){var e=this.session,t=this.$size,n=t.height<=2*this.lineHeight,i=this.session.getScreenLength()*this.lineHeight,r=this.$getLongestLine(),o=!n&&(this.$hScrollBarAlwaysVisible||t.scrollerWidth-r-2*this.$padding<0),s=this.$horizScroll!==o;s&&(this.$horizScroll=o,this.scrollBarH.setVisible(o));var a=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var l=t.scrollerHeight+this.lineHeight,c=!this.$maxLines&&this.$scrollPastEnd?(t.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;i+=c;var u=this.scrollMargin;this.session.setScrollTop(Math.max(-u.top,Math.min(this.scrollTop,i-t.scrollerHeight+u.bottom))),this.session.setScrollLeft(Math.max(-u.left,Math.min(this.scrollLeft,r+2*this.$padding-t.scrollerWidth+u.right)));var d=!n&&(this.$vScrollBarAlwaysVisible||t.scrollerHeight-i+c<0||this.scrollTop>u.top),h=a!==d;h&&(this.$vScroll=d,this.scrollBarV.setVisible(d));var f,p,g=this.scrollTop%this.lineHeight,m=Math.ceil(l/this.lineHeight)-1,v=Math.max(0,Math.round((this.scrollTop-g)/this.lineHeight)),b=v+m,y=this.lineHeight;v=e.screenToDocumentRow(v,0);var w=e.getFoldLine(v);w&&(v=w.start.row),f=e.documentToScreenRow(v,0),p=e.getRowLength(v)*y,b=Math.min(e.screenToDocumentRow(b,0),e.getLength()-1),l=t.scrollerHeight+e.getRowLength(b)*y+p,g=this.scrollTop-f*y;var _=0;return(this.layerConfig.width!=r||s)&&(_=this.CHANGE_H_SCROLL),(s||h)&&(_|=this.$updateCachedSize(!0,this.gutterWidth,t.width,t.height),this._signal("scrollbarVisibilityChanged"),h&&(r=this.$getLongestLine())),this.layerConfig={width:r,padding:this.$padding,firstRow:v,firstRowScreen:f,lastRow:b,lineHeight:y,characterWidth:this.characterWidth,minHeight:l,maxHeight:i,offset:g,gutterOffset:y?Math.max(0,Math.ceil((g+t.height-t.scrollerHeight)/y)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(r-this.$padding),_},this.$updateLines=function(){if(this.$changedLines){var e=this.$changedLines.firstRow,t=this.$changedLines.lastRow;this.$changedLines=null;var n=this.layerConfig;if(!(e>n.lastRow+1||t<n.firstRow))return t===1/0?(this.$showGutter&&this.$gutterLayer.update(n),void this.$textLayer.update(n)):(this.$textLayer.updateLines(n,e,t),!0)}},this.$getLongestLine=function(){var e=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(e+=1),this.$textLayer&&e>this.$textLayer.MAX_LINE_LENGTH&&(e=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(e*this.characterWidth))},this.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},this.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},this.addGutterDecoration=function(e,t){this.$gutterLayer.addGutterDecoration(e,t)},this.removeGutterDecoration=function(e,t){this.$gutterLayer.removeGutterDecoration(e,t)},this.updateBreakpoints=function(e){this.$loop.schedule(this.CHANGE_GUTTER)},this.setAnnotations=function(e){this.$gutterLayer.setAnnotations(e),this.$loop.schedule(this.CHANGE_GUTTER)},this.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},this.hideCursor=function(){this.$cursorLayer.hideCursor()},this.showCursor=function(){this.$cursorLayer.showCursor()},this.scrollSelectionIntoView=function(e,t,n){this.scrollCursorIntoView(e,n),this.scrollCursorIntoView(t,n)},this.scrollCursorIntoView=function(e,t,n){if(0!==this.$size.scrollerHeight){var i=this.$cursorLayer.getPixelPosition(e),r=i.left,o=i.top,s=n&&n.top||0,a=n&&n.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var l=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;l+s>o?(t&&l+s>o+this.lineHeight&&(o-=t*this.$size.scrollerHeight),0===o&&(o=-this.scrollMargin.top),this.session.setScrollTop(o)):l+this.$size.scrollerHeight-a<o+this.lineHeight&&(t&&l+this.$size.scrollerHeight-a<o-this.lineHeight&&(o+=t*this.$size.scrollerHeight),this.session.setScrollTop(o+this.lineHeight+a-this.$size.scrollerHeight));var c=this.scrollLeft;c>r?(r<this.$padding+2*this.layerConfig.characterWidth&&(r=-this.scrollMargin.left),this.session.setScrollLeft(r)):c+this.$size.scrollerWidth<r+this.characterWidth?this.session.setScrollLeft(Math.round(r+this.characterWidth-this.$size.scrollerWidth)):c<=this.$padding&&r-c<this.characterWidth&&this.session.setScrollLeft(0)}},this.getScrollTop=function(){return this.session.getScrollTop()},this.getScrollLeft=function(){return this.session.getScrollLeft()},this.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},this.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},this.scrollToRow=function(e){this.session.setScrollTop(e*this.lineHeight)},this.alignCursor=function(e,t){"number"==typeof e&&(e={row:e,column:0});var n=this.$cursorLayer.getPixelPosition(e),i=this.$size.scrollerHeight-this.lineHeight,r=n.top-i*(t||0);return this.session.setScrollTop(r),r},this.STEPS=8,this.$calcSteps=function(e,t){var n,i,r=0,o=this.STEPS,s=[];for(r=0;r<o;++r)s.push((n=r/this.STEPS,i=e,(t-e)*(Math.pow(n-1,3)+1)+i));return s},this.scrollToLine=function(e,t,n,i){var r=this.$cursorLayer.getPixelPosition({row:e,column:0}).top;t&&(r-=this.$size.scrollerHeight/2);var o=this.scrollTop;this.session.setScrollTop(r),!1!==n&&this.animateScrolling(o,i)},this.animateScrolling=function(e,t){var n=this.scrollTop;if(this.$animatedScroll){var i=this;if(e!=n){if(this.$scrollAnimation){var r=this.$scrollAnimation.steps;if(r.length&&(e=r[0])==n)return}var o=i.$calcSteps(e,n);this.$scrollAnimation={from:e,to:n,steps:o},clearInterval(this.$timer),i.session.setScrollTop(o.shift()),i.session.$scrollTop=n,this.$timer=setInterval((function(){if(!i.$stopAnimation)return i.session?void(o.length?(i.session.setScrollTop(o.shift()),i.session.$scrollTop=n):null!=n?(i.session.$scrollTop=-1,i.session.setScrollTop(n),n=null):s()):clearInterval(i.$timer);s()}),10)}}function s(){i.$timer=clearInterval(i.$timer),i.$scrollAnimation=null,i.$stopAnimation=!1,t&&t()}},this.scrollToY=function(e){this.scrollTop!==e&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=e)},this.scrollToX=function(e){this.scrollLeft!==e&&(this.scrollLeft=e),this.$loop.schedule(this.CHANGE_H_SCROLL)},this.scrollTo=function(e,t){this.session.setScrollTop(t),this.session.setScrollLeft(e)},this.scrollBy=function(e,t){t&&this.session.setScrollTop(this.session.getScrollTop()+t),e&&this.session.setScrollLeft(this.session.getScrollLeft()+e)},this.isScrollableBy=function(e,t){return t<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||t>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||e<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||e>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right||void 0},this.pixelToScreenCoordinates=function(e,t){var n;if(this.$hasCssTransforms){n={top:0,left:0};var i=this.$fontMetrics.transformCoordinates([e,t]);e=i[1]-this.gutterWidth-this.margin.left,t=i[0]}else n=this.scroller.getBoundingClientRect();var r=e+this.scrollLeft-n.left-this.$padding,o=r/this.characterWidth,s=Math.floor((t+this.scrollTop-n.top)/this.lineHeight),a=this.$blockCursor?Math.floor(o):Math.round(o);return{row:s,column:a,side:o-a>0?1:-1,offsetX:r}},this.screenToTextCoordinates=function(e,t){var n;if(this.$hasCssTransforms){n={top:0,left:0};var i=this.$fontMetrics.transformCoordinates([e,t]);e=i[1]-this.gutterWidth-this.margin.left,t=i[0]}else n=this.scroller.getBoundingClientRect();var r=e+this.scrollLeft-n.left-this.$padding,o=r/this.characterWidth,s=this.$blockCursor?Math.floor(o):Math.round(o),a=Math.floor((t+this.scrollTop-n.top)/this.lineHeight);return this.session.screenToDocumentPosition(a,Math.max(s,0),r)},this.textToScreenCoordinates=function(e,t){var n=this.scroller.getBoundingClientRect(),i=this.session.documentToScreenPosition(e,t),r=this.$padding+(this.session.$bidiHandler.isBidiRow(i.row,e)?this.session.$bidiHandler.getPosLeft(i.column):Math.round(i.column*this.characterWidth)),o=i.row*this.lineHeight;return{pageX:n.left+r-this.scrollLeft,pageY:n.top+o-this.scrollTop}},this.visualizeFocus=function(){r.addCssClass(this.container,"ace_focus")},this.visualizeBlur=function(){r.removeCssClass(this.container,"ace_focus")},this.showComposition=function(e){this.$composition=e,e.cssText||(e.cssText=this.textarea.style.cssText),null==e.useTextareaForIME&&(e.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(r.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):e.markerId=this.session.addMarker(e.markerRange,"ace_composition_marker","text")},this.setCompositionText=function(e){var t=this.session.selection.cursor;this.addToken(e,"composition_placeholder",t.row,t.column),this.$moveTextAreaToCursor()},this.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),r.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var e=this.session.selection.cursor;this.removeExtraToken(e.row,e.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},this.addToken=function(e,t,n,i){var r=this.session;r.bgTokenizer.lines[n]=null;var o={type:t,value:e},s=r.getTokens(n);if(null==i)s.push(o);else for(var a=0,l=0;l<s.length;l++){var c=s[l];if(i<=(a+=c.value.length)){var u=c.value.length-(a-i),d=c.value.slice(0,u),h=c.value.slice(u);s.splice(l,1,{type:c.type,value:d},o,{type:c.type,value:h});break}}this.updateLines(n,n)},this.removeExtraToken=function(e,t){this.updateLines(e,e)},this.setTheme=function(e,t){var n=this;if(this.$themeId=e,n._dispatchEvent("themeChange",{theme:e}),e&&"string"!=typeof e)s(e);else{var i=e||this.$options.theme.initialValue;o.loadModule(["theme",i],s)}function s(i){if(n.$themeId!=e)return t&&t();if(!i||!i.cssClass)throw new Error("couldn't load module "+e+" or it didn't call define");i.$id&&(n.$themeId=i.$id),r.importCssString(i.cssText,i.cssClass,n.container),n.theme&&r.removeCssClass(n.container,n.theme.cssClass);var o="padding"in i?i.padding:"padding"in(n.theme||{})?4:n.$padding;n.$padding&&o!=n.$padding&&n.setPadding(o),n.$theme=i.cssClass,n.theme=i,r.addCssClass(n.container,i.cssClass),r.setCssClass(n.container,"ace_dark",i.isDark),n.$size&&(n.$size.width=0,n.$updateSizeAsync()),n._dispatchEvent("themeLoaded",{theme:i}),t&&t()}},this.getTheme=function(){return this.$themeId},this.setStyle=function(e,t){r.setCssClass(this.container,e,!1!==t)},this.unsetStyle=function(e){r.removeCssClass(this.container,e)},this.setCursorStyle=function(e){r.setStyle(this.scroller.style,"cursor",e)},this.setMouseCursor=function(e){r.setStyle(this.scroller.style,"cursor",e)},this.attachToShadowRoot=function(){r.importCssString(v,"ace_editor.css",this.container)},this.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent=""},this.$updateCustomScrollbar=function(e){var t=this;this.$horizScroll=this.$vScroll=null,this.scrollBarV.element.remove(),this.scrollBarH.element.remove(),this.$scrollDecorator&&delete this.$scrollDecorator,!0===e?(this.scrollBarV=new f(this.container,this),this.scrollBarH=new h(this.container,this),this.scrollBarV.setHeight(this.$size.scrollerHeight),this.scrollBarH.setWidth(this.$size.scrollerWidth),this.scrollBarV.addEventListener("scroll",(function(e){t.$scrollAnimation||t.session.setScrollTop(e.data-t.scrollMargin.top)})),this.scrollBarH.addEventListener("scroll",(function(e){t.$scrollAnimation||t.session.setScrollLeft(e.data-t.scrollMargin.left)})),this.$scrollDecorator=new b(this.scrollBarV,this),this.$scrollDecorator.$updateDecorators()):(this.scrollBarV=new d(this.container,this),this.scrollBarH=new u(this.container,this),this.scrollBarV.addEventListener("scroll",(function(e){t.$scrollAnimation||t.session.setScrollTop(e.data-t.scrollMargin.top)})),this.scrollBarH.addEventListener("scroll",(function(e){t.$scrollAnimation||t.session.setScrollLeft(e.data-t.scrollMargin.left)})))}}).call(_.prototype),o.defineOptions(_.prototype,"renderer",{animatedScroll:{initialValue:!1},showInvisibles:{set:function(e){this.$textLayer.setShowInvisibles(e)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(e){"number"==typeof e&&(this.$printMarginColumn=e),this.$showPrintMargin=!!e,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(e){this.$gutter.style.display=e?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},fadeFoldWidgets:{set:function(e){r.setCssClass(this.$gutter,"ace_fade-fold-widgets",e)},initialValue:!1},showFoldWidgets:{set:function(e){this.$gutterLayer.setShowFoldWidgets(e),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(e){this.$textLayer.setDisplayIndentGuides(e)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(e){1==this.$textLayer.setHighlightIndentGuides(e)?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(e){this.$gutterLayer.setHighlightGutterLine(e),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(e){this.$hScrollBarAlwaysVisible&&this.$horizScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(e){this.$vScrollBarAlwaysVisible&&this.$vScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(e){"number"==typeof e&&(e+="px"),this.container.style.fontSize=e,this.updateFontSize()},initialValue:12},fontFamily:{set:function(e){this.container.style.fontFamily=e,this.updateFontSize()}},maxLines:{set:function(e){this.updateFull()}},minLines:{set:function(e){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(e){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(e){e=+e||0,this.$scrollPastEnd!=e&&(this.$scrollPastEnd=e,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(e){this.$gutterLayer.$fixedWidth=!!e,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(e){this.$updateCustomScrollbar(e)},initialValue:!1},theme:{set:function(e){this.setTheme(e)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!y.isMobile&&!y.isIE}}),t.VirtualRenderer=_})),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],(function(e,t,n){"use strict";var i=e("../lib/oop"),r=e("../lib/net"),o=e("../lib/event_emitter").EventEmitter,s=e("../config");function a(e){if("undefined"==typeof Worker)return{postMessage:function(){},terminate:function(){}};if(s.get("loadWorkerFromBlob")){var t=function(e){var t="importScripts('"+r.qualifyURL(e)+"');";try{return new Blob([t],{type:"application/javascript"})}catch(e){var n=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder);return n.append(t),n.getBlob("application/javascript")}}(e),n=(window.URL||window.webkitURL).createObjectURL(t);return new Worker(n)}return new Worker(e)}var l=function(e){e.postMessage||(e=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=e,this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){i.implement(this,o),this.$createWorkerFromOldConfig=function(t,n,i,r,o){if(e.nameToUrl&&!e.toUrl&&(e.toUrl=e.nameToUrl),s.get("packaged")||!e.toUrl)r=r||s.moduleUrl(n,"worker");else{var l=this.$normalizePath;r=r||l(e.toUrl("ace/worker/worker.js",null,"_"));var c={};t.forEach((function(t){c[t]=l(e.toUrl(t,null,"_").replace(/(\.js)?(\?.*)?$/,""))}))}return this.$worker=a(r),o&&this.send("importScripts",o),this.$worker.postMessage({init:!0,tlns:c,module:n,classname:i}),this.$worker},this.onMessage=function(e){var t=e.data;switch(t.type){case"event":this._signal(t.name,{data:t.data});break;case"call":var n=this.callbacks[t.id];n&&(n(t.data),delete this.callbacks[t.id]);break;case"error":this.reportError(t.data);break;case"log":window.console&&console.log&&console.log.apply(console,t.data)}},this.reportError=function(e){window.console&&console.error&&console.error(e)},this.$normalizePath=function(e){return r.qualifyURL(e)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(e,t){this.$worker.postMessage({command:e,args:t})},this.call=function(e,t,n){if(n){var i=this.callbackId++;this.callbacks[i]=n,t.push(i)}this.send(e,t)},this.emit=function(e,t){try{t.data&&t.data.err&&(t.data.err={message:t.data.err.message,stack:t.data.err.stack,code:t.data.err.code}),this.$worker&&this.$worker.postMessage({event:e,data:{data:t.data}})}catch(e){console.error(e.stack)}},this.attachToDocument=function(e){this.$doc&&this.terminate(),this.$doc=e,this.call("setValue",[e.getValue()]),e.on("change",this.changeListener,!0)},this.changeListener=function(e){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),"insert"==e.action?this.deltaQueue.push(e.start,e.lines):this.deltaQueue.push(e.start,e.end)},this.$sendDeltaQueue=function(){var e=this.deltaQueue;e&&(this.deltaQueue=null,e.length>50&&e.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:e}))}}).call(l.prototype),t.UIWorkerClient=function(e,t,n){var i=null,r=!1,a=Object.create(o),c=[],u=new l({messageBuffer:c,terminate:function(){},postMessage:function(e){c.push(e),i&&(r?setTimeout(d):d())}});u.setEmitSync=function(e){r=e};var d=function(){var e=c.shift();e.command?i[e.command].apply(i,e.args):e.event&&a._signal(e.event,e.data)};return a.postMessage=function(e){u.onMessage({data:e})},a.callback=function(e,t){this.postMessage({type:"call",id:t,data:e})},a.emit=function(e,t){this.postMessage({type:"event",name:e,data:t})},s.loadModule(["worker",t],(function(e){for(i=new e[n](a);c.length;)d()})),u},t.WorkerClient=l,t.createWorker=a})),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],(function(e,t,n){"use strict";var i=e("./range").Range,r=e("./lib/event_emitter").EventEmitter,o=e("./lib/oop"),s=function(e,t,n,i,r,o){var s=this;this.length=t,this.session=e,this.doc=e.getDocument(),this.mainClass=r,this.othersClass=o,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=i,this.$onCursorChange=function(){setTimeout((function(){s.onCursorChange()}))},this.$pos=n;var a=e.getUndoManager().$undoStack||e.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=a.length,this.setup(),e.selection.on("changeCursor",this.$onCursorChange)};(function(){o.implement(this,r),this.setup=function(){var e=this,t=this.doc,n=this.session;this.selectionBefore=n.selection.toJSON(),n.selection.inMultiSelectMode&&n.selection.toSingleRange(),this.pos=t.createAnchor(this.$pos.row,this.$pos.column);var r=this.pos;r.$insertRight=!0,r.detach(),r.markerId=n.addMarker(new i(r.row,r.column,r.row,r.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach((function(n){var i=t.createAnchor(n.row,n.column);i.$insertRight=!0,i.detach(),e.others.push(i)})),n.setUndoSelect(!1)},this.showOtherMarkers=function(){if(!this.othersActive){var e=this.session,t=this;this.othersActive=!0,this.others.forEach((function(n){n.markerId=e.addMarker(new i(n.row,n.column,n.row,n.column+t.length),t.othersClass,null,!1)}))}},this.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var e=0;e<this.others.length;e++)this.session.removeMarker(this.others[e].markerId)}},this.onUpdate=function(e){if(this.$updating)return this.updateAnchors(e);var t=e;if(t.start.row===t.end.row&&t.start.row===this.pos.row){this.$updating=!0;var n="insert"===e.action?t.end.column-t.start.column:t.start.column-t.end.column,r=t.start.column>=this.pos.column&&t.start.column<=this.pos.column+this.length+1,o=t.start.column-this.pos.column;if(this.updateAnchors(e),r&&(this.length+=n),r&&!this.session.$fromUndo)if("insert"===e.action)for(var s=this.others.length-1;s>=0;s--){var a={row:(l=this.others[s]).row,column:l.column+o};this.doc.insertMergedLines(a,e.lines)}else if("remove"===e.action)for(s=this.others.length-1;s>=0;s--){var l;a={row:(l=this.others[s]).row,column:l.column+o},this.doc.remove(new i(a.row,a.column,a.row,a.column-n))}this.$updating=!1,this.updateMarkers()}},this.updateAnchors=function(e){this.pos.onChange(e);for(var t=this.others.length;t--;)this.others[t].onChange(e);this.updateMarkers()},this.updateMarkers=function(){if(!this.$updating){var e=this,t=this.session,n=function(n,r){t.removeMarker(n.markerId),n.markerId=t.addMarker(new i(n.row,n.column,n.row,n.column+e.length),r,null,!1)};n(this.pos,this.mainClass);for(var r=this.others.length;r--;)n(this.others[r],this.othersClass)}},this.onCursorChange=function(e){if(!this.$updating&&this.session){var t=this.session.selection.getCursor();t.row===this.pos.row&&t.column>=this.pos.column&&t.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",e)):(this.hideOtherMarkers(),this._emit("cursorLeave",e))}},this.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},this.cancel=function(){if(-1!==this.$undoStackDepth){for(var e=this.session.getUndoManager(),t=(e.$undoStack||e.$undostack).length-this.$undoStackDepth,n=0;n<t;n++)e.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}}}).call(s.prototype),t.PlaceHolder=s})),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],(function(e,t,n){var i=e("../lib/event"),r=e("../lib/useragent");function o(e,t){return e.row==t.row&&e.column==t.column}t.onMouseDown=function(e){var t=e.domEvent,n=t.altKey,s=t.shiftKey,a=t.ctrlKey,l=e.getAccelKey(),c=e.getButton();if(a&&r.isMac&&(c=t.button),e.editor.inMultiSelectMode&&2==c)e.editor.textInput.onContextMenu(e.domEvent);else if(a||n||l){if(0===c){var u,d=e.editor,h=d.selection,f=d.inMultiSelectMode,p=e.getDocumentPosition(),g=h.getCursor(),m=e.inSelection()||h.isEmpty()&&o(p,g),v=e.x,b=e.y,y=d.session,w=d.renderer.pixelToScreenCoordinates(v,b),_=w;if(d.$mouseHandler.$enableJumpToDef)a&&n||l&&n?u=s?"block":"add":n&&d.$blockSelectEnabled&&(u="block");else if(l&&!n){if(u="add",!f&&s)return}else n&&d.$blockSelectEnabled&&(u="block");if(u&&r.isMac&&t.ctrlKey&&d.$mouseHandler.cancelContextMenu(),"add"==u){if(!f&&m)return;if(!f){var A=h.toOrientedRange();d.addSelectionMarker(A)}var x=h.rangeList.rangeAtPoint(p);d.inVirtualSelectionMode=!0,s&&(x=null,A=h.ranges[0]||A,d.removeSelectionMarker(A)),d.once("mouseup",(function(){var e=h.toOrientedRange();x&&e.isEmpty()&&o(x.cursor,e.cursor)?h.substractPoint(e.cursor):(s?h.substractPoint(A.cursor):A&&(d.removeSelectionMarker(A),h.addRange(A)),h.addRange(e)),d.inVirtualSelectionMode=!1}))}else if("block"==u){var C;e.stop(),d.inVirtualSelectionMode=!0;var S=[],E=function(){var e=d.renderer.pixelToScreenCoordinates(v,b),t=y.screenToDocumentPosition(e.row,e.column,e.offsetX);o(_,e)&&o(t,h.lead)||(_=e,d.selection.moveToPosition(t),d.renderer.scrollCursorIntoView(),d.removeSelectionMarkers(S),S=h.rectangularRangeBlock(_,w),d.$mouseHandler.$clickSelection&&1==S.length&&S[0].isEmpty()&&(S[0]=d.$mouseHandler.$clickSelection.clone()),S.forEach(d.addSelectionMarker,d),d.updateSelectionMarkers())};f&&!l?h.toSingleRange():!f&&l&&(C=h.toOrientedRange(),d.addSelectionMarker(C)),s?w=y.documentToScreenPosition(h.lead):h.moveToPosition(p),_={row:-1,column:-1};var k=E;i.capture(d.container,(function(e){v=e.clientX,b=e.clientY}),(function(e){E(),clearInterval($),d.removeSelectionMarkers(S),S.length||(S=[h.toOrientedRange()]),C&&(d.removeSelectionMarker(C),h.toSingleRange(C));for(var t=0;t<S.length;t++)h.addRange(S[t]);d.inVirtualSelectionMode=!1,d.$mouseHandler.$clickSelection=null}));var $=setInterval((function(){k()}),20);return e.preventDefault()}}}else 0===c&&e.editor.inMultiSelectMode&&e.editor.exitMultiSelectMode()}})),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],(function(e,t,n){t.defaultCommands=[{name:"addCursorAbove",description:"Add cursor above",exec:function(e){e.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",description:"Add cursor below",exec:function(e){e.selectMoreLines(1)},bindKey:{win:"Ctrl-Alt-Down",mac:"Ctrl-Alt-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorAboveSkipCurrent",description:"Add cursor above (skip current)",exec:function(e){e.selectMoreLines(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Up",mac:"Ctrl-Alt-Shift-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelowSkipCurrent",description:"Add cursor below (skip current)",exec:function(e){e.selectMoreLines(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Down",mac:"Ctrl-Alt-Shift-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreBefore",description:"Select more before",exec:function(e){e.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",description:"Select more after",exec:function(e){e.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",description:"Select next before",exec:function(e){e.selectMore(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Left",mac:"Ctrl-Alt-Shift-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextAfter",description:"Select next after",exec:function(e){e.selectMore(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Right",mac:"Ctrl-Alt-Shift-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"toggleSplitSelectionIntoLines",description:"Split into lines",exec:function(e){e.multiSelect.rangeCount>1?e.multiSelect.joinSelections():e.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(e){e.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(e){e.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(e){e.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],t.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(e){e.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(e){return e&&e.inMultiSelectMode}}];var i=e("../keyboard/hash_handler").HashHandler;t.keyboardHandler=new i(t.multiSelectCommands)})),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],(function(e,t,n){var i=e("./range_list").RangeList,r=e("./range").Range,o=e("./selection").Selection,s=e("./mouse/multi_select_handler").onMouseDown,a=e("./lib/event"),l=e("./lib/lang"),c=e("./commands/multi_select_commands");t.commands=c.defaultCommands.concat(c.multiSelectCommands);var u=new(0,e("./search").Search),d=e("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(d.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(e,t){if(e){if(!this.inMultiSelectMode&&0===this.rangeCount){var n=this.toOrientedRange();if(this.rangeList.add(n),this.rangeList.add(e),2!=this.rangeList.ranges.length)return this.rangeList.removeAll(),t||this.fromOrientedRange(e);this.rangeList.removeAll(),this.rangeList.add(n),this.$onAddRange(n)}e.cursor||(e.cursor=e.end);var i=this.rangeList.add(e);return this.$onAddRange(e),i.length&&this.$onRemoveRange(i),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),t||this.fromOrientedRange(e)}},this.toSingleRange=function(e){e=e||this.ranges[0];var t=this.rangeList.removeAll();t.length&&this.$onRemoveRange(t),e&&this.fromOrientedRange(e)},this.substractPoint=function(e){var t=this.rangeList.substractPoint(e);if(t)return this.$onRemoveRange(t),t[0]},this.mergeOverlappingRanges=function(){var e=this.rangeList.merge();e.length&&this.$onRemoveRange(e)},this.$onAddRange=function(e){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(e),this._signal("addRange",{range:e})},this.$onRemoveRange=function(e){if(this.rangeCount=this.rangeList.ranges.length,1==this.rangeCount&&this.inMultiSelectMode){var t=this.rangeList.ranges.pop();e.push(t),this.rangeCount=0}for(var n=e.length;n--;){var i=this.ranges.indexOf(e[n]);this.ranges.splice(i,1)}this._signal("removeRange",{ranges:e}),0===this.rangeCount&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),(t=t||this.ranges[0])&&!t.isEqual(this.getRange())&&this.fromOrientedRange(t)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new i,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var e=this.ranges.length?this.ranges:[this.getRange()],t=[],n=0;n<e.length;n++){var i=e[n],o=i.start.row,s=i.end.row;if(o===s)t.push(i.clone());else{for(t.push(new r(o,i.start.column,o,this.session.getLine(o).length));++o<s;)t.push(this.getLineRange(o,!0));t.push(new r(s,0,s,i.end.column))}0!=n||this.isBackwards()||(t=t.reverse())}for(this.toSingleRange(),n=t.length;n--;)this.addRange(t[n])},this.joinSelections=function(){var e=this.rangeList.ranges,t=e[e.length-1],n=r.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(n,t.cursor==t.start)},this.toggleBlockSelection=function(){if(this.rangeCount>1){var e=this.rangeList.ranges,t=e[e.length-1],n=r.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(n,t.cursor==t.start)}else{var i=this.session.documentToScreenPosition(this.cursor),o=this.session.documentToScreenPosition(this.anchor);this.rectangularRangeBlock(i,o).forEach(this.addRange,this)}},this.rectangularRangeBlock=function(e,t,n){var i=[],o=e.column<t.column;if(o)var s=e.column,a=t.column,l=e.offsetX,c=t.offsetX;else s=t.column,a=e.column,l=t.offsetX,c=e.offsetX;var u,d,h,f=e.row<t.row;if(f)var p=e.row,g=t.row;else p=t.row,g=e.row;s<0&&(s=0),p<0&&(p=0),p==g&&(n=!0);for(var m=p;m<=g;m++){var v=r.fromPoints(this.session.screenToDocumentPosition(m,s,l),this.session.screenToDocumentPosition(m,a,c));if(v.isEmpty()){if(u&&(h=u,(d=v.end).row==h.row&&d.column==h.column))break;u=v.end}v.cursor=o?v.start:v.end,i.push(v)}if(f&&i.reverse(),!n){for(var b=i.length-1;i[b].isEmpty()&&b>0;)b--;if(b>0)for(var y=0;i[y].isEmpty();)y++;for(var w=b;w>=y;w--)i[w].isEmpty()&&i.splice(w,1)}return i}}.call(o.prototype);var h=e("./editor").Editor;function f(e){e.$multiselectOnSessionChange||(e.$onAddRange=e.$onAddRange.bind(e),e.$onRemoveRange=e.$onRemoveRange.bind(e),e.$onMultiSelect=e.$onMultiSelect.bind(e),e.$onSingleSelect=e.$onSingleSelect.bind(e),e.$multiselectOnSessionChange=t.onSessionChange.bind(e),e.$checkMultiselectChange=e.$checkMultiselectChange.bind(e),e.$multiselectOnSessionChange(e),e.on("changeSession",e.$multiselectOnSessionChange),e.on("mousedown",s),e.commands.addCommands(c.defaultCommands),function(e){if(e.textInput){var t=e.textInput.getElement(),n=!1;a.addListener(t,"keydown",(function(t){var r=18==t.keyCode&&!(t.ctrlKey||t.shiftKey||t.metaKey);e.$blockSelectEnabled&&r?n||(e.renderer.setMouseCursor("crosshair"),n=!0):n&&i()}),e),a.addListener(t,"keyup",i,e),a.addListener(t,"blur",i,e)}function i(t){n&&(e.renderer.setMouseCursor(""),n=!1)}}(e))}(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(e){e.cursor||(e.cursor=e.end);var t=this.getSelectionStyle();return e.marker=this.session.addMarker(e,"ace_selection",t),this.session.$selectionMarkers.push(e),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,e},this.removeSelectionMarker=function(e){if(e.marker){this.session.removeMarker(e.marker);var t=this.session.$selectionMarkers.indexOf(e);-1!=t&&this.session.$selectionMarkers.splice(t,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(e){for(var t=this.session.$selectionMarkers,n=e.length;n--;){var i=e[n];if(i.marker){this.session.removeMarker(i.marker);var r=t.indexOf(i);-1!=r&&t.splice(r,1)}}this.session.selectionMarkerCount=t.length},this.$onAddRange=function(e){this.addSelectionMarker(e.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(e){this.removeSelectionMarkers(e.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(e){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(c.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(e){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(c.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(e){var t=e.command,n=e.editor;if(n.multiSelect){if(t.multiSelectAction)"forEach"==t.multiSelectAction?i=n.forEachSelection(t,e.args):"forEachLine"==t.multiSelectAction?i=n.forEachSelection(t,e.args,!0):"single"==t.multiSelectAction?(n.exitMultiSelectMode(),i=t.exec(n,e.args||{})):i=t.multiSelectAction(n,e.args||{});else{var i=t.exec(n,e.args||{});n.multiSelect.addRange(n.multiSelect.toOrientedRange()),n.multiSelect.mergeOverlappingRanges()}return i}},this.forEachSelection=function(e,t,n){if(!this.inVirtualSelectionMode){var i,r=n&&n.keepOrder,s=1==n||n&&n.$byLines,a=this.session,l=this.selection,c=l.rangeList,u=(r?l:c).ranges;if(!u.length)return e.exec?e.exec(this,t||{}):e(this,t||{});var d=l._eventRegistry;l._eventRegistry={};var h=new o(a);this.inVirtualSelectionMode=!0;for(var f=u.length;f--;){if(s)for(;f>0&&u[f].start.row==u[f-1].end.row;)f--;h.fromOrientedRange(u[f]),h.index=f,this.selection=a.selection=h;var p=e.exec?e.exec(this,t||{}):e(this,t||{});i||void 0===p||(i=p),h.toOrientedRange(u[f])}h.detach(),this.selection=a.selection=l,this.inVirtualSelectionMode=!1,l._eventRegistry=d,l.mergeOverlappingRanges(),l.ranges[0]&&l.fromOrientedRange(l.ranges[0]);var g=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),g&&g.from==g.to&&this.renderer.animateScrolling(g.from),i}},this.exitMultiSelectMode=function(){this.inMultiSelectMode&&!this.inVirtualSelectionMode&&this.multiSelect.toSingleRange()},this.getSelectedText=function(){var e="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var t=this.multiSelect.rangeList.ranges,n=[],i=0;i<t.length;i++)n.push(this.session.getTextRange(t[i]));var r=this.session.getDocument().getNewLineCharacter();(e=n.join(r)).length==(n.length-1)*r.length&&(e="")}else this.selection.isEmpty()||(e=this.session.getTextRange(this.getSelectionRange()));return e},this.$checkMultiselectChange=function(e,t){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var n=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&t==this.multiSelect.anchor)return;var i=t==this.multiSelect.anchor?n.cursor==n.start?n.end:n.start:n.cursor;i.row!=t.row||this.session.$clipPositionToDocument(i.row,i.column).column!=t.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()}},this.findAll=function(e,t,n){if((t=t||{}).needle=e||t.needle,null==t.needle){var i=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();t.needle=this.session.getTextRange(i)}this.$search.set(t);var r=this.$search.findAll(this.session);if(!r.length)return 0;var o=this.multiSelect;n||o.toSingleRange(r[0]);for(var s=r.length;s--;)o.addRange(r[s],!0);return i&&o.rangeList.rangeAtPoint(i.start)&&o.addRange(i,!0),r.length},this.selectMoreLines=function(e,t){var n=this.selection.toOrientedRange(),i=n.cursor==n.end,o=this.session.documentToScreenPosition(n.cursor);this.selection.$desiredColumn&&(o.column=this.selection.$desiredColumn);var s,a=this.session.screenToDocumentPosition(o.row+e,o.column);if(n.isEmpty())c=a;else var l=this.session.documentToScreenPosition(i?n.end:n.start),c=this.session.screenToDocumentPosition(l.row+e,l.column);if(i?(s=r.fromPoints(a,c)).cursor=s.start:(s=r.fromPoints(c,a)).cursor=s.end,s.desiredColumn=o.column,this.selection.inMultiSelectMode){if(t)var u=n.cursor}else this.selection.addRange(n);this.selection.addRange(s),u&&this.selection.substractPoint(u)},this.transposeSelections=function(e){for(var t=this.session,n=t.multiSelect,i=n.ranges,r=i.length;r--;)if((a=i[r]).isEmpty()){var o=t.getWordRange(a.start.row,a.start.column);a.start.row=o.start.row,a.start.column=o.start.column,a.end.row=o.end.row,a.end.column=o.end.column}n.mergeOverlappingRanges();var s=[];for(r=i.length;r--;){var a=i[r];s.unshift(t.getTextRange(a))}for(e<0?s.unshift(s.pop()):s.push(s.shift()),r=i.length;r--;)o=(a=i[r]).clone(),t.replace(a,s[r]),a.start.row=o.start.row,a.start.column=o.start.column;n.fromOrientedRange(n.ranges[0])},this.selectMore=function(e,t,n){var i=this.session,r=i.multiSelect.toOrientedRange();if(!r.isEmpty()||((r=i.getWordRange(r.start.row,r.start.column)).cursor=-1==e?r.start:r.end,this.multiSelect.addRange(r),!n)){var o=i.getTextRange(r),s=function(e,t,n){return u.$options.wrap=!0,u.$options.needle=t,u.$options.backwards=-1==n,u.find(e)}(i,o,e);s&&(s.cursor=-1==e?s.start:s.end,this.session.unfold(s),this.multiSelect.addRange(s),this.renderer.scrollCursorIntoView(null,.5)),t&&this.multiSelect.substractPoint(r.cursor)}},this.alignCursors=function(){var e=this.session,t=e.multiSelect,n=t.ranges,i=-1,o=n.filter((function(e){if(e.cursor.row==i)return!0;i=e.cursor.row}));if(n.length&&o.length!=n.length-1){o.forEach((function(e){t.substractPoint(e.cursor)}));var s=0,a=1/0,c=n.map((function(t){var n=t.cursor,i=e.getLine(n.row).substr(n.column).search(/\S/g);return-1==i&&(i=0),n.column>s&&(s=n.column),i<a&&(a=i),i}));n.forEach((function(t,n){var i=t.cursor,o=s-i.column,u=c[n]-a;o>u?e.insert(i,l.stringRepeat(" ",o-u)):e.remove(new r(i.row,i.column,i.row,i.column-o+u)),t.start.column=t.end.column=s,t.start.row=t.end.row=i.row,t.cursor=t.end})),t.fromOrientedRange(n[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}else{var u=this.selection.getRange(),d=u.start.row,h=u.end.row,f=d==h;if(f){var p,g=this.session.getLength();do{p=this.session.getLine(h)}while(/[=:]/.test(p)&&++h<g);do{p=this.session.getLine(d)}while(/[=:]/.test(p)&&--d>0);d<0&&(d=0),h>=g&&(h=g-1)}var m=this.session.removeFullLines(d,h);m=this.$reAlignText(m,f),this.session.insert({row:d,column:0},m.join("\n")+"\n"),f||(u.start.column=0,u.end.column=m[m.length-1].length),this.selection.setRange(u)}},this.$reAlignText=function(e,t){var n,i,r,o=!0,s=!0;return e.map((function(e){var t=e.match(/(\s*)(.*?)(\s*)([=:].*)/);return t?null==n?(n=t[1].length,i=t[2].length,r=t[3].length,t):(n+i+r!=t[1].length+t[2].length+t[3].length&&(s=!1),n!=t[1].length&&(o=!1),n>t[1].length&&(n=t[1].length),i<t[2].length&&(i=t[2].length),r>t[3].length&&(r=t[3].length),t):[e]})).map(t?c:o?s?function(e){return e[2]?a(n+i-e[2].length)+e[2]+a(r)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}:c:function(e){return e[2]?a(n)+e[2]+a(r)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]});function a(e){return l.stringRepeat(" ",e)}function c(e){return e[2]?a(n)+e[2]+a(i-e[2].length+r)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}}}).call(h.prototype),t.onSessionChange=function(e){var t=e.session;t&&!t.multiSelect&&(t.$selectionMarkers=[],t.selection.$initRangeList(),t.multiSelect=t.selection),this.multiSelect=t&&t.multiSelect;var n=e.oldSession;n&&(n.multiSelect.off("addRange",this.$onAddRange),n.multiSelect.off("removeRange",this.$onRemoveRange),n.multiSelect.off("multiSelect",this.$onMultiSelect),n.multiSelect.off("singleSelect",this.$onSingleSelect),n.multiSelect.lead.off("change",this.$checkMultiselectChange),n.multiSelect.anchor.off("change",this.$checkMultiselectChange)),t&&(t.multiSelect.on("addRange",this.$onAddRange),t.multiSelect.on("removeRange",this.$onRemoveRange),t.multiSelect.on("multiSelect",this.$onMultiSelect),t.multiSelect.on("singleSelect",this.$onSingleSelect),t.multiSelect.lead.on("change",this.$checkMultiselectChange),t.multiSelect.anchor.on("change",this.$checkMultiselectChange)),t&&this.inMultiSelectMode!=t.selection.inMultiSelectMode&&(t.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},t.MultiSelect=f,e("./config").defineOptions(h.prototype,"editor",{enableMultiselect:{set:function(e){f(this),e?(this.on("changeSession",this.$multiselectOnSessionChange),this.on("mousedown",s)):(this.off("changeSession",this.$multiselectOnSessionChange),this.off("mousedown",s))},value:!0},enableBlockSelect:{set:function(e){this.$blockSelectEnabled=e},value:!0}})})),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var i=e("../../range").Range,r=t.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(e,t,n){var i=e.getLine(n);return this.foldingStartMarker.test(i)?"start":"markbeginend"==t&&this.foldingStopMarker&&this.foldingStopMarker.test(i)?"end":""},this.getFoldWidgetRange=function(e,t,n){return null},this.indentationBlock=function(e,t,n){var r=/\S/,o=e.getLine(t),s=o.search(r);if(-1!=s){for(var a=n||o.length,l=e.getLength(),c=t,u=t;++t<l;){var d=e.getLine(t).search(r);if(-1!=d){if(d<=s){var h=e.getTokenAt(t,0);if(!h||"string"!==h.type)break}u=t}}if(u>c){var f=e.getLine(u).length;return new i(c,a,u,f)}}},this.openingBracketBlock=function(e,t,n,r,o){var s={row:n,column:r+1},a=e.$findClosingBracket(t,s,o);if(a){var l=e.foldWidgets[a.row];return null==l&&(l=e.getFoldWidget(a.row)),"start"==l&&a.row>s.row&&(a.row--,a.column=e.getLine(a.row).length),i.fromPoints(s,a)}},this.closingBracketBlock=function(e,t,n,r,o){var s={row:n,column:r},a=e.$findOpeningBracket(t,s);if(a)return a.column++,s.column--,i.fromPoints(a,s)}}).call(r.prototype)})),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],(function(e,t,n){"use strict";var i=e("./lib/dom");function r(e){this.session=e,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}(function(){this.getRowLength=function(e){var t;return t=this.lineWidgets&&this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0,this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1+t:1+t},this.$getWidgetScreenLength=function(){var e=0;return this.lineWidgets.forEach((function(t){t&&t.rowCount&&!t.hidden&&(e+=t.rowCount)})),e},this.$onChangeEditor=function(e){this.attach(e.editor)},this.attach=function(e){e&&e.widgetManager&&e.widgetManager!=this&&e.widgetManager.detach(),this.editor!=e&&(this.detach(),this.editor=e,e&&(e.widgetManager=this,e.renderer.on("beforeRender",this.measureWidgets),e.renderer.on("afterRender",this.renderWidgets)))},this.detach=function(e){var t=this.editor;if(t){this.editor=null,t.widgetManager=null,t.renderer.off("beforeRender",this.measureWidgets),t.renderer.off("afterRender",this.renderWidgets);var n=this.session.lineWidgets;n&&n.forEach((function(e){e&&e.el&&e.el.parentNode&&(e._inDocument=!1,e.el.parentNode.removeChild(e.el))}))}},this.updateOnFold=function(e,t){var n=t.lineWidgets;if(n&&e.action){for(var i=e.data,r=i.start.row,o=i.end.row,s="add"==e.action,a=r+1;a<o;a++)n[a]&&(n[a].hidden=s);n[o]&&(s?n[r]?n[o].hidden=s:n[r]=n[o]:(n[r]==n[o]&&(n[r]=void 0),n[o].hidden=s))}},this.updateOnChange=function(e){var t=this.session.lineWidgets;if(t){var n=e.start.row,i=e.end.row-n;if(0===i);else if("remove"==e.action){var r=t.splice(n+1,i);!t[n]&&r[r.length-1]&&(t[n]=r.pop()),r.forEach((function(e){e&&this.removeLineWidget(e)}),this),this.$updateRows()}else{var o=new Array(i);t[n]&&null!=t[n].column&&e.start.column>t[n].column&&n++,o.unshift(n,0),t.splice.apply(t,o),this.$updateRows()}}},this.$updateRows=function(){var e=this.session.lineWidgets;if(e){var t=!0;e.forEach((function(e,n){if(e)for(t=!1,e.row=n;e.$oldWidget;)e.$oldWidget.row=n,e=e.$oldWidget})),t&&(this.session.lineWidgets=null)}},this.$registerLineWidget=function(e){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var t=this.session.lineWidgets[e.row];return t&&(e.$oldWidget=t,t.el&&t.el.parentNode&&(t.el.parentNode.removeChild(t.el),t._inDocument=!1)),this.session.lineWidgets[e.row]=e,e},this.addLineWidget=function(e){if(this.$registerLineWidget(e),e.session=this.session,!this.editor)return e;var t=this.editor.renderer;e.html&&!e.el&&(e.el=i.createElement("div"),e.el.innerHTML=e.html),e.el&&(i.addCssClass(e.el,"ace_lineWidgetContainer"),e.el.style.position="absolute",e.el.style.zIndex=5,t.container.appendChild(e.el),e._inDocument=!0,e.coverGutter||(e.el.style.zIndex=3),null==e.pixelHeight&&(e.pixelHeight=e.el.offsetHeight)),null==e.rowCount&&(e.rowCount=e.pixelHeight/t.layerConfig.lineHeight);var n=this.session.getFoldAt(e.row,0);if(e.$fold=n,n){var r=this.session.lineWidgets;e.row!=n.end.row||r[n.start.row]?e.hidden=!0:r[n.start.row]=e}return this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows(),this.renderWidgets(null,t),this.onWidgetChanged(e),e},this.removeLineWidget=function(e){if(e._inDocument=!1,e.session=null,e.el&&e.el.parentNode&&e.el.parentNode.removeChild(e.el),e.editor&&e.editor.destroy)try{e.editor.destroy()}catch(e){}if(this.session.lineWidgets){var t=this.session.lineWidgets[e.row];if(t==e)this.session.lineWidgets[e.row]=e.$oldWidget,e.$oldWidget&&this.onWidgetChanged(e.$oldWidget);else for(;t;){if(t.$oldWidget==e){t.$oldWidget=e.$oldWidget;break}t=t.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows()},this.getWidgetsAtRow=function(e){for(var t=this.session.lineWidgets,n=t&&t[e],i=[];n;)i.push(n),n=n.$oldWidget;return i},this.onWidgetChanged=function(e){this.session._changedWidgets.push(e),this.editor&&this.editor.renderer.updateFull()},this.measureWidgets=function(e,t){var n=this.session._changedWidgets,i=t.layerConfig;if(n&&n.length){for(var r=1/0,o=0;o<n.length;o++){var s=n[o];if(s&&s.el&&s.session==this.session){if(!s._inDocument){if(this.session.lineWidgets[s.row]!=s)continue;s._inDocument=!0,t.container.appendChild(s.el)}s.h=s.el.offsetHeight,s.fixedWidth||(s.w=s.el.offsetWidth,s.screenWidth=Math.ceil(s.w/i.characterWidth));var a=s.h/i.lineHeight;s.coverLine&&(a-=this.session.getRowLineCount(s.row))<0&&(a=0),s.rowCount!=a&&(s.rowCount=a,s.row<r&&(r=s.row))}}r!=1/0&&(this.session._emit("changeFold",{data:{start:{row:r}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},this.renderWidgets=function(e,t){var n=t.layerConfig,i=this.session.lineWidgets;if(i){for(var r=Math.min(this.firstRow,n.firstRow),o=Math.max(this.lastRow,n.lastRow,i.length);r>0&&!i[r];)r--;this.firstRow=n.firstRow,this.lastRow=n.lastRow,t.$cursorLayer.config=n;for(var s=r;s<=o;s++){var a=i[s];if(a&&a.el)if(a.hidden)a.el.style.top=-100-(a.pixelHeight||0)+"px";else{a._inDocument||(a._inDocument=!0,t.container.appendChild(a.el));var l=t.$cursorLayer.getPixelPosition({row:s,column:0},!0).top;a.coverLine||(l+=n.lineHeight*this.session.getRowLineCount(a.row)),a.el.style.top=l-n.offset+"px";var c=a.coverGutter?0:t.gutterWidth;a.fixedWidth||(c-=t.scrollLeft),a.el.style.left=c+"px",a.fullWidth&&a.screenWidth&&(a.el.style.minWidth=n.width+2*n.padding+"px"),a.fixedWidth?a.el.style.right=t.scrollBar.getWidth()+"px":a.el.style.right=""}}}}}).call(r.prototype),t.LineWidgets=r})),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range"],(function(e,t,n){"use strict";var i=e("../line_widgets").LineWidgets,r=e("../lib/dom"),o=e("../range").Range;t.showErrorMarker=function(e,t){var n=e.session;n.widgetManager||(n.widgetManager=new i(n),n.widgetManager.attach(e));var s=e.getCursorPosition(),a=s.row,l=n.widgetManager.getWidgetsAtRow(a).filter((function(e){return"errorMarker"==e.type}))[0];l?l.destroy():a-=t;var c,u=function(e,t,n){var i=e.getAnnotations().sort(o.comparePoints);if(i.length){var r=function(e,t,n){for(var i=0,r=e.length-1;i<=r;){var o=i+r>>1,s=n(t,e[o]);if(s>0)i=o+1;else{if(!(s<0))return o;r=o-1}}return-(i+1)}(i,{row:t,column:-1},o.comparePoints);r<0&&(r=-r-1),r>=i.length?r=n>0?0:i.length-1:0===r&&n<0&&(r=i.length-1);var s=i[r];if(s&&n){if(s.row===t){do{s=i[r+=n]}while(s&&s.row===t);if(!s)return i.slice()}var a=[];t=s.row;do{a[n<0?"unshift":"push"](s),s=i[r+=n]}while(s&&s.row==t);return a.length&&a}}}(n,a,t);if(u){var d=u[0];s.column=(d.pos&&"number"!=typeof d.column?d.pos.sc:d.column)||0,s.row=d.row,c=e.renderer.$gutterLayer.$annotations[s.row]}else{if(l)return;c={text:["Looks good!"],className:"ace_ok"}}e.session.unfold(s.row),e.selection.moveToPosition(s);var h={row:s.row,fixedWidth:!0,coverGutter:!0,el:r.createElement("div"),type:"errorMarker"},f=h.el.appendChild(r.createElement("div")),p=h.el.appendChild(r.createElement("div"));p.className="error_widget_arrow "+c.className;var g=e.renderer.$cursorLayer.getPixelPosition(s).left;p.style.left=g+e.renderer.gutterWidth-5+"px",h.el.className="error_widget_wrapper",f.className="error_widget "+c.className,f.innerHTML=c.text.join("<br>"),f.appendChild(r.createElement("div"));var m=function(e,t,n){if(0===t&&("esc"===n||"return"===n))return h.destroy(),{command:"null"}};h.destroy=function(){e.$mouseHandler.isMousePressed||(e.keyBinding.removeKeyboardHandler(m),n.widgetManager.removeLineWidget(h),e.off("changeSelection",h.destroy),e.off("changeSession",h.destroy),e.off("mouseup",h.destroy),e.off("change",h.destroy))},e.keyBinding.addKeyboardHandler(m),e.on("changeSelection",h.destroy),e.on("changeSession",h.destroy),e.on("mouseup",h.destroy),e.on("change",h.destroy),e.session.widgetManager.addLineWidget(h),h.el.onmousedown=e.focus.bind(e),e.renderer.scrollCursorIntoView(null,.5,{bottom:h.el.offsetHeight})},r.importCssString("\n .error_widget_wrapper {\n background: inherit;\n color: inherit;\n border:none\n }\n .error_widget {\n border-top: solid 2px;\n border-bottom: solid 2px;\n margin: 5px 0;\n padding: 10px 40px;\n white-space: pre-wrap;\n }\n .error_widget.ace_error, .error_widget_arrow.ace_error{\n border-color: #ff5a5a\n }\n .error_widget.ace_warning, .error_widget_arrow.ace_warning{\n border-color: #F1D817\n }\n .error_widget.ace_info, .error_widget_arrow.ace_info{\n border-color: #5a5a5a\n }\n .error_widget.ace_ok, .error_widget_arrow.ace_ok{\n border-color: #5aaa5a\n }\n .error_widget_arrow {\n position: absolute;\n border: solid 5px;\n border-top-color: transparent!important;\n border-right-color: transparent!important;\n border-left-color: transparent!important;\n top: -5px;\n }\n","error_marker.css",!1)})),ace.define("ace/ace",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config","ace/loader_build"],(function(e,t,n){"use strict";e("./loader_build")(t);var i=e("./lib/dom"),r=e("./lib/event"),o=e("./range").Range,s=e("./editor").Editor,a=e("./edit_session").EditSession,l=e("./undomanager").UndoManager,c=e("./virtual_renderer").VirtualRenderer;e("./worker/worker_client"),e("./keyboard/hash_handler"),e("./placeholder"),e("./multi_select"),e("./mode/folding/fold_mode"),e("./theme/textmate"),e("./ext/error_marker"),t.config=e("./config"),t.edit=function(e,n){if("string"==typeof e){var o=e;if(!(e=document.getElementById(o)))throw new Error("ace.edit can't find div #"+o)}if(e&&e.env&&e.env.editor instanceof s)return e.env.editor;var a="";if(e&&/input|textarea/i.test(e.tagName)){var l=e;a=l.value,e=i.createElement("pre"),l.parentNode.replaceChild(e,l)}else e&&(a=e.textContent,e.innerHTML="");var u=t.createEditSession(a),d=new s(new c(e),u,n),h={document:u,editor:d,onResize:d.resize.bind(d,null)};return l&&(h.textarea=l),r.addListener(window,"resize",h.onResize),d.on("destroy",(function(){r.removeListener(window,"resize",h.onResize),h.editor.container.env=null})),d.container.env=d.env=h,d},t.createEditSession=function(e,t){var n=new a(e,t);return n.setUndoManager(new l),n},t.Range=o,t.Editor=s,t.EditSession=a,t.UndoManager=l,t.VirtualRenderer=c,t.version=t.config.version})),ace.require(["ace/ace"],(function(t){for(var n in t&&(t.config.init(!0),t.define=ace.define),window.ace||(window.ace=t),t)t.hasOwnProperty(n)&&(window.ace[n]=t[n]);window.ace.default=window.ace,e&&(e.exports=window.ace)}))},82679:(e,t,n)=>{e=n.nmd(e),ace.define("ace/snippets",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/range_list","ace/keyboard/hash_handler","ace/tokenizer","ace/clipboard","ace/editor"],(function(e,t,n){"use strict";var i=e("./lib/dom"),r=e("./lib/oop"),o=e("./lib/event_emitter").EventEmitter,s=e("./lib/lang"),a=e("./range").Range,l=e("./range_list").RangeList,c=e("./keyboard/hash_handler").HashHandler,u=e("./tokenizer").Tokenizer,d=e("./clipboard"),h={CURRENT_WORD:function(e){return e.session.getTextRange(e.session.getWordRange())},SELECTION:function(e,t,n){var i=e.session.getTextRange();return n?i.replace(/\n\r?([ \t]*\S)/g,"\n"+n+"$1"):i},CURRENT_LINE:function(e){return e.session.getLine(e.getCursorPosition().row)},PREV_LINE:function(e){return e.session.getLine(e.getCursorPosition().row-1)},LINE_INDEX:function(e){return e.getCursorPosition().row},LINE_NUMBER:function(e){return e.getCursorPosition().row+1},SOFT_TABS:function(e){return e.session.getUseSoftTabs()?"YES":"NO"},TAB_SIZE:function(e){return e.session.getTabSize()},CLIPBOARD:function(e){return d.getText&&d.getText()},FILENAME:function(e){return/[^/\\]*$/.exec(this.FILEPATH(e))[0]},FILENAME_BASE:function(e){return/[^/\\]*$/.exec(this.FILEPATH(e))[0].replace(/\.[^.]*$/,"")},DIRECTORY:function(e){return this.FILEPATH(e).replace(/[^/\\]*$/,"")},FILEPATH:function(e){return"/not implemented.txt"},WORKSPACE_NAME:function(){return"Unknown"},FULLNAME:function(){return"Unknown"},BLOCK_COMMENT_START:function(e){var t=e.session.$mode||{};return t.blockComment&&t.blockComment.start||""},BLOCK_COMMENT_END:function(e){var t=e.session.$mode||{};return t.blockComment&&t.blockComment.end||""},LINE_COMMENT:function(e){return(e.session.$mode||{}).lineCommentStart||""},CURRENT_YEAR:f.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:f.bind(null,{year:"2-digit"}),CURRENT_MONTH:f.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:f.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:f.bind(null,{month:"short"}),CURRENT_DATE:f.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:f.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:f.bind(null,{weekday:"short"}),CURRENT_HOUR:f.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:f.bind(null,{minute:"2-digit"}),CURRENT_SECOND:f.bind(null,{second:"2-digit"})};function f(e){var t=(new Date).toLocaleString("en-us",e);return 1==t.length?"0"+t:t}h.SELECTED_TEXT=h.SELECTION;var p=function(){this.snippetMap={},this.snippetNameMap={}};(function(){r.implement(this,o),this.getTokenizer=function(){return p.$tokenizer||this.createTokenizer()},this.createTokenizer=function(){function e(e){return e=e.substr(1),/^\d+$/.test(e)?[{tabstopId:parseInt(e,10)}]:[{text:e}]}function t(e){return"(?:[^\\\\"+e+"]|\\\\.)"}var n={regex:"/("+t("/")+"+)/",onMatch:function(e,t,n){var i=n[0];return i.fmtString=!0,i.guard=e.slice(1,-1),i.flag="",""},next:"formatString"};return p.$tokenizer=new u({start:[{regex:/\\./,onMatch:function(e,t,n){var i=e[1];return("}"==i&&n.length||-1!="`$\\".indexOf(i))&&(e=i),[e]}},{regex:/}/,onMatch:function(e,t,n){return[n.length?n.shift():e]}},{regex:/\$(?:\d+|\w+)/,onMatch:e},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(t,n,i){var r=e(t.substr(1));return i.unshift(r[0]),r},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+t("\\|")+"*\\|",onMatch:function(e,t,n){var i=e.slice(1,-1).replace(/\\[,|\\]|,/g,(function(e){return 2==e.length?e[1]:"\0"})).split("\0").map((function(e){return{value:e}}));return n[0].choices=i,[i[0]]},next:"start"},n,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(e,t,n){return n.length&&n[0].expectElse?(n[0].expectElse=!1,n[0].ifEnd={elseEnd:n[0]},[n[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(e,t,n){var i=e[1];return"}"==i&&n.length||-1!="`$\\".indexOf(i)?e=i:"n"==i?e="\n":"t"==i?e="\t":-1!="ulULE".indexOf(i)&&(e={changeCase:i,local:i>"a"}),[e]}},{regex:"/\\w*}",onMatch:function(e,t,n){var i=n.shift();return i&&(i.flag=e.slice(1,-1)),this.next=i&&i.tabstopId?"start":"",[i||e]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(e,t,n){return[{text:e.slice(1)}]}},{regex:/\${\w+/,onMatch:function(e,t,n){var i={text:e.slice(2)};return n.unshift(i),[i]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(e,t,n){var i=n.shift();return this.next=i&&i.tabstopId?"start":"",[i||e]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(e,t,n){return n[0].formatFunction=e.slice(2,-1),[n.shift()]},next:"formatString"},n,{regex:/:[\?\-+]?/,onMatch:function(e,t,n){"+"==e[1]&&(n[0].ifEnd=n[0]),"?"==e[1]&&(n[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]})},this.tokenizeTmSnippet=function(e,t){return this.getTokenizer().getLineTokens(e,t).tokens.map((function(e){return e.value||e}))},this.getVariableValue=function(e,t,n){if(/^\d+$/.test(t))return(this.variables.__||{})[t]||"";if(/^[A-Z]\d+$/.test(t))return(this.variables[t[0]+"__"]||{})[t.substr(1)]||"";if(t=t.replace(/^TM_/,""),!this.variables.hasOwnProperty(t))return"";var i=this.variables[t];return"function"==typeof i&&(i=this.variables[t](e,t,n)),null==i?"":i},this.variables=h,this.tmStrFormat=function(e,t,n){if(!t.fmt)return e;var i=t.flag||"",r=t.guard;r=new RegExp(r,i.replace(/[^gim]/g,""));var o="string"==typeof t.fmt?this.tokenizeTmSnippet(t.fmt,"formatString"):t.fmt,s=this,a=e.replace(r,(function(){var e=s.variables.__;s.variables.__=[].slice.call(arguments);for(var t=s.resolveVariables(o,n),i="E",r=0;r<t.length;r++){var a=t[r];if("object"==typeof a)if(t[r]="",a.changeCase&&a.local){var l=t[r+1];l&&"string"==typeof l&&("u"==a.changeCase?t[r]=l[0].toUpperCase():t[r]=l[0].toLowerCase(),t[r+1]=l.substr(1))}else a.changeCase&&(i=a.changeCase);else"U"==i?t[r]=a.toUpperCase():"L"==i&&(t[r]=a.toLowerCase())}return s.variables.__=e,t.join("")}));return a},this.tmFormatFunction=function(e,t,n){return"upcase"==t.formatFunction?e.toUpperCase():"downcase"==t.formatFunction?e.toLowerCase():e},this.resolveVariables=function(e,t){for(var n=[],i="",r=!0,o=0;o<e.length;o++){var s=e[o];if("string"!=typeof s){if(s){if(r=!1,s.fmtString){var a=e.indexOf(s,o+1);-1==a&&(a=e.length),s.fmt=e.slice(o+1,a),o=a}if(s.text){var l=this.getVariableValue(t,s.text,i)+"";s.fmtString&&(l=this.tmStrFormat(l,s,t)),s.formatFunction&&(l=this.tmFormatFunction(l,s,t)),l&&!s.ifEnd?(n.push(l),c(s)):!l&&s.ifEnd&&c(s.ifEnd)}else s.elseEnd?c(s.elseEnd):(null!=s.tabstopId||null!=s.changeCase)&&n.push(s)}}else n.push(s),"\n"==s?(r=!0,i=""):r&&(i=/^\t*/.exec(s)[0],r=/\S/.test(s))}function c(t){var n=e.indexOf(t,o+1);-1!=n&&(o=n)}return n},this.insertSnippetForSelection=function(e,t){var n=e.getCursorPosition(),i=e.session.getLine(n.row),r=e.session.getTabString(),o=i.match(/^\s*/)[0];n.column<o.length&&(o=o.slice(0,n.column)),t=t.replace(/\r/g,"");var s=this.tokenizeTmSnippet(t);s=(s=this.resolveVariables(s,e)).map((function(e){return"\n"==e?e+o:"string"==typeof e?e.replace(/\t/g,r):e}));var a=[];s.forEach((function(e,t){if("object"==typeof e){var n=e.tabstopId,i=a[n];if(i||((i=a[n]=[]).index=n,i.value="",i.parents={}),-1===i.indexOf(e)){e.choices&&!i.choices&&(i.choices=e.choices),i.push(e);var r=s.indexOf(e,t+1);if(-1!==r){var o=s.slice(t+1,r);o.some((function(e){return"object"==typeof e}))&&!i.value?i.value=o:!o.length||i.value&&"string"==typeof i.value||(i.value=o.join(""))}}}})),a.forEach((function(e){e.length=0}));var l={};function c(e){for(var t=[],n=0;n<e.length;n++){var i=e[n];if("object"==typeof i){if(l[i.tabstopId])continue;i=t[e.lastIndexOf(i,n-1)]||{tabstopId:i.tabstopId}}t[n]=i}return t}for(var u=0;u<s.length;u++){var d=s[u];if("object"==typeof d){var h=d.tabstopId,f=a[h],p=s.indexOf(d,u+1);if(l[h])l[h]===d&&(delete l[h],Object.keys(l).forEach((function(e){f.parents[e]=!0})));else{l[h]=d;var m=f.value;"string"!=typeof m?m=c(m):d.fmt&&(m=this.tmStrFormat(m,d,e)),s.splice.apply(s,[u+1,Math.max(0,p-u)].concat(m,d)),-1===f.indexOf(d)&&f.push(d)}}}var v=0,b=0,y="";s.forEach((function(e){if("string"==typeof e){var t=e.split("\n");t.length>1?(b=t[t.length-1].length,v+=t.length-1):b+=e.length,y+=e}else e&&(e.start?e.end={row:v,column:b}:e.start={row:v,column:b})}));var w=e.getSelectionRange(),_=e.session.replace(w,y),A=new g(e),x=e.inVirtualSelectionMode&&e.selection.index;A.addTabstops(a,w.start,_,x)},this.insertSnippet=function(e,t){var n=this;if(e.inVirtualSelectionMode)return n.insertSnippetForSelection(e,t);e.forEachSelection((function(){n.insertSnippetForSelection(e,t)}),null,{keepOrder:!0}),e.tabstopManager&&e.tabstopManager.tabNext()},this.$getScope=function(e){var t=e.session.$mode.$id||"";if("html"===(t=t.split("/").pop())||"php"===t){"php"!==t||e.session.$mode.inlinePhp||(t="html");var n=e.getCursorPosition(),i=e.session.getState(n.row);"object"==typeof i&&(i=i[0]),i.substring&&("js-"==i.substring(0,3)?t="javascript":"css-"==i.substring(0,4)?t="css":"php-"==i.substring(0,4)&&(t="php"))}return t},this.getActiveScopes=function(e){var t=this.$getScope(e),n=[t],i=this.snippetMap;return i[t]&&i[t].includeScopes&&n.push.apply(n,i[t].includeScopes),n.push("_"),n},this.expandWithTab=function(e,t){var n=this,i=e.forEachSelection((function(){return n.expandSnippetForSelection(e,t)}),null,{keepOrder:!0});return i&&e.tabstopManager&&e.tabstopManager.tabNext(),i},this.expandSnippetForSelection=function(e,t){var n,i=e.getCursorPosition(),r=e.session.getLine(i.row),o=r.substring(0,i.column),s=r.substr(i.column),a=this.snippetMap;return this.getActiveScopes(e).some((function(e){var t=a[e];return t&&(n=this.findMatchingSnippet(t,o,s)),!!n}),this),!!n&&(t&&t.dryRun||(e.session.doc.removeInLine(i.row,i.column-n.replaceBefore.length,i.column+n.replaceAfter.length),this.variables.M__=n.matchBefore,this.variables.T__=n.matchAfter,this.insertSnippetForSelection(e,n.content),this.variables.M__=this.variables.T__=null),!0)},this.findMatchingSnippet=function(e,t,n){for(var i=e.length;i--;){var r=e[i];if((!r.startRe||r.startRe.test(t))&&(!r.endRe||r.endRe.test(n))&&(r.startRe||r.endRe))return r.matchBefore=r.startRe?r.startRe.exec(t):[""],r.matchAfter=r.endRe?r.endRe.exec(n):[""],r.replaceBefore=r.triggerRe?r.triggerRe.exec(t)[0]:"",r.replaceAfter=r.endTriggerRe?r.endTriggerRe.exec(n)[0]:"",r}},this.snippetMap={},this.snippetNameMap={},this.register=function(e,t){var n=this.snippetMap,i=this.snippetNameMap,r=this;function o(e){return e&&!/^\^?\(.*\)\$?$|^\\b$/.test(e)&&(e="(?:"+e+")"),e||""}function a(e,t,n){return e=o(e),t=o(t),n?(e=t+e)&&"$"!=e[e.length-1]&&(e+="$"):(e+=t)&&"^"!=e[0]&&(e="^"+e),new RegExp(e)}function l(e){e.scope||(e.scope=t||"_"),t=e.scope,n[t]||(n[t]=[],i[t]={});var o=i[t];if(e.name){var l=o[e.name];l&&r.unregister(l),o[e.name]=e}n[t].push(e),e.prefix&&(e.tabTrigger=e.prefix),!e.content&&e.body&&(e.content=Array.isArray(e.body)?e.body.join("\n"):e.body),e.tabTrigger&&!e.trigger&&(!e.guard&&/^\w/.test(e.tabTrigger)&&(e.guard="\\b"),e.trigger=s.escapeRegExp(e.tabTrigger)),(e.trigger||e.guard||e.endTrigger||e.endGuard)&&(e.startRe=a(e.trigger,e.guard,!0),e.triggerRe=new RegExp(e.trigger),e.endRe=a(e.endTrigger,e.endGuard,!0),e.endTriggerRe=new RegExp(e.endTrigger))}e||(e=[]),Array.isArray(e)?e.forEach(l):Object.keys(e).forEach((function(t){l(e[t])})),this._signal("registerSnippets",{scope:t})},this.unregister=function(e,t){var n=this.snippetMap,i=this.snippetNameMap;function r(e){var r=i[e.scope||t];if(r&&r[e.name]){delete r[e.name];var o=n[e.scope||t],s=o&&o.indexOf(e);s>=0&&o.splice(s,1)}}e.content?r(e):Array.isArray(e)&&e.forEach(r)},this.parseSnippetFile=function(e){e=e.replace(/\r/g,"");for(var t,n=[],i={},r=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm;t=r.exec(e);){if(t[1])try{i=JSON.parse(t[1]),n.push(i)}catch(e){}if(t[4])i.content=t[4].replace(/^\t/gm,""),n.push(i),i={};else{var o=t[2],s=t[3];if("regex"==o){var a=/\/((?:[^\/\\]|\\.)*)|$/g;i.guard=a.exec(s)[1],i.trigger=a.exec(s)[1],i.endTrigger=a.exec(s)[1],i.endGuard=a.exec(s)[1]}else"snippet"==o?(i.tabTrigger=s.match(/^\S*/)[0],i.name||(i.name=s)):o&&(i[o]=s)}}return n},this.getSnippetByName=function(e,t){var n,i=this.snippetNameMap;return this.getActiveScopes(t).some((function(t){var r=i[t];return r&&(n=r[e]),!!n}),this),n}}).call(p.prototype);var g=function(e){if(e.tabstopManager)return e.tabstopManager;e.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=s.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(e)};(function(){this.attach=function(e){this.index=0,this.ranges=[],this.tabstops=[],this.$openTabstops=null,this.selectedTabstop=null,this.editor=e,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},this.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges=null,this.tabstops=null,this.selectedTabstop=null,this.editor.removeListener("change",this.$onChange),this.editor.removeListener("changeSelection",this.$onChangeSelection),this.editor.removeListener("changeSession",this.$onChangeSession),this.editor.commands.removeListener("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.editor=null},this.onChange=function(e){for(var t="r"==e.action[0],n=this.selectedTabstop||{},i=n.parents||{},r=(this.tabstops||[]).slice(),o=0;o<r.length;o++){var s=r[o],a=s==n||i[s.index];if(s.rangeList.$bias=a?0:1,"remove"==e.action&&s!==n){var l=s.parents&&s.parents[n.index],c=s.rangeList.pointIndex(e.start,l);c=c<0?-c-1:c+1;var u=s.rangeList.pointIndex(e.end,l);u=u<0?-u-1:u-1;for(var d=s.rangeList.ranges.slice(c,u),h=0;h<d.length;h++)this.removeRange(d[h])}s.rangeList.$onChange(e)}var f=this.editor.session;this.$inChange||!t||1!=f.getLength()||f.getValue()||this.detach()},this.updateLinkedFields=function(){var e=this.selectedTabstop;if(e&&e.hasLinkedRanges&&e.firstNonLinked){this.$inChange=!0;for(var n=this.editor.session,i=n.getTextRange(e.firstNonLinked),r=0;r<e.length;r++){var o=e[r];if(o.linked){var s=o.original,a=t.snippetManager.tmStrFormat(i,s,this.editor);n.replace(o,a)}}this.$inChange=!1}},this.onAfterExec=function(e){e.command&&!e.command.readOnly&&this.updateLinkedFields()},this.onChangeSelection=function(){if(this.editor){for(var e=this.editor.selection.lead,t=this.editor.selection.anchor,n=this.editor.selection.isEmpty(),i=0;i<this.ranges.length;i++)if(!this.ranges[i].linked){var r=this.ranges[i].contains(e.row,e.column),o=n||this.ranges[i].contains(t.row,t.column);if(r&&o)return}this.detach()}},this.onChangeSession=function(){this.detach()},this.tabNext=function(e){var t=this.tabstops.length,n=this.index+(e||1);(n=Math.min(Math.max(n,1),t))==t&&(n=0),this.selectTabstop(n),0===n&&this.detach()},this.selectTabstop=function(e){this.$openTabstops=null;var t=this.tabstops[this.index];if(t&&this.addTabstopMarkers(t),this.index=e,(t=this.tabstops[this.index])&&t.length){this.selectedTabstop=t;var n=t.firstNonLinked||t;if(t.choices&&(n.cursor=n.start),this.editor.inVirtualSelectionMode)this.editor.selection.fromOrientedRange(n);else{var i=this.editor.multiSelect;i.toSingleRange(n);for(var r=0;r<t.length;r++)t.hasLinkedRanges&&t[r].linked||i.addRange(t[r].clone(),!0)}this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler),this.selectedTabstop&&this.selectedTabstop.choices&&this.editor.execCommand("startAutocomplete",{matches:this.selectedTabstop.choices})}},this.addTabstops=function(e,t,n){var i=this.useLink||!this.editor.getOption("enableMultiselect");if(this.$openTabstops||(this.$openTabstops=[]),!e[0]){var r=a.fromPoints(n,n);v(r.start,t),v(r.end,t),e[0]=[r],e[0].index=0}var o=[this.index+1,0],s=this.ranges;e.forEach((function(e,n){for(var r=this.$openTabstops[n]||e,c=0;c<e.length;c++){var u=e[c],d=a.fromPoints(u.start,u.end||u.start);m(d.start,t),m(d.end,t),d.original=u,d.tabstop=r,s.push(d),r!=e?r.unshift(d):r[c]=d,u.fmtString||r.firstNonLinked&&i?(d.linked=!0,r.hasLinkedRanges=!0):r.firstNonLinked||(r.firstNonLinked=d)}r.firstNonLinked||(r.hasLinkedRanges=!1),r===e&&(o.push(r),this.$openTabstops[n]=r),this.addTabstopMarkers(r),r.rangeList=r.rangeList||new l,r.rangeList.$bias=0,r.rangeList.addList(r)}),this),o.length>2&&(this.tabstops.length&&o.push(o.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,o))},this.addTabstopMarkers=function(e){var t=this.editor.session;e.forEach((function(e){e.markerId||(e.markerId=t.addMarker(e,"ace_snippet-marker","text"))}))},this.removeTabstopMarkers=function(e){var t=this.editor.session;e.forEach((function(e){t.removeMarker(e.markerId),e.markerId=null}))},this.removeRange=function(e){var t=e.tabstop.indexOf(e);-1!=t&&e.tabstop.splice(t,1),-1!=(t=this.ranges.indexOf(e))&&this.ranges.splice(t,1),-1!=(t=e.tabstop.rangeList.ranges.indexOf(e))&&e.tabstop.splice(t,1),this.editor.session.removeMarker(e.markerId),e.tabstop.length||(-1!=(t=this.tabstops.indexOf(e.tabstop))&&this.tabstops.splice(t,1),this.tabstops.length||this.detach())},this.keyboardHandler=new c,this.keyboardHandler.bindKeys({Tab:function(e){t.snippetManager&&t.snippetManager.expandWithTab(e)||(e.tabstopManager.tabNext(1),e.renderer.scrollCursorIntoView())},"Shift-Tab":function(e){e.tabstopManager.tabNext(-1),e.renderer.scrollCursorIntoView()},Esc:function(e){e.tabstopManager.detach()}})}).call(g.prototype);var m=function(e,t){0==e.row&&(e.column+=t.column),e.row+=t.row},v=function(e,t){e.row==t.row&&(e.column-=t.column),e.row-=t.row};i.importCssString("\n.ace_snippet-marker {\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n background: rgba(194, 193, 208, 0.09);\n border: 1px dotted rgba(211, 208, 235, 0.62);\n position: absolute;\n}","snippets.css",!1),t.snippetManager=new p;var b=e("./editor").Editor;(function(){this.insertSnippet=function(e,n){return t.snippetManager.insertSnippet(this,e,n)},this.expandSnippet=function(e){return t.snippetManager.expandWithTab(this,e)}}).call(b.prototype)})),ace.define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom"],(function(e,t,n){"use strict";var i=e("../virtual_renderer").VirtualRenderer,r=e("../editor").Editor,o=e("../range").Range,s=e("../lib/event"),a=e("../lib/lang"),l=e("../lib/dom"),c=function(e){var t=new i(e);t.$maxLines=4;var n=new r(t);return n.setHighlightActiveLine(!1),n.setShowPrintMargin(!1),n.renderer.setShowGutter(!1),n.renderer.setHighlightGutterLine(!1),n.$mouseHandler.$focusTimeout=0,n.$highlightTagPending=!0,n};l.importCssString("\n.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\n background-color: #CAD6FA;\n z-index: 1;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\n background-color: #3a674e;\n}\n.ace_editor.ace_autocomplete .ace_line-hover {\n border: 1px solid #abbffe;\n margin-top: -1px;\n background: rgba(233,233,253,0.4);\n position: absolute;\n z-index: 2;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_line-hover {\n border: 1px solid rgba(109, 150, 13, 0.8);\n background: rgba(58, 103, 78, 0.62);\n}\n.ace_completion-meta {\n opacity: 0.5;\n margin: 0.9em;\n}\n.ace_completion-message {\n color: blue;\n}\n.ace_editor.ace_autocomplete .ace_completion-highlight{\n color: #2d69c7;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{\n color: #93ca12;\n}\n.ace_editor.ace_autocomplete {\n width: 300px;\n z-index: 200000;\n border: 1px lightgray solid;\n position: fixed;\n box-shadow: 2px 3px 5px rgba(0,0,0,.2);\n line-height: 1.4;\n background: #fefefe;\n color: #111;\n}\n.ace_dark.ace_editor.ace_autocomplete {\n border: 1px #484747 solid;\n box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51);\n line-height: 1.4;\n background: #25282c;\n color: #c1c1c1;\n}","autocompletion.css",!1),t.AcePopup=function(e){var t=l.createElement("div"),n=new c(t);e&&e.appendChild(t),t.style.display="none",n.renderer.content.style.cursor="default",n.renderer.setStyle("ace_autocomplete"),n.setOption("displayIndentGuides",!1),n.setOption("dragDelay",150);var i,r=function(){};n.focus=r,n.$isFocused=!0,n.renderer.$cursorLayer.restartTimer=r,n.renderer.$cursorLayer.element.style.opacity=0,n.renderer.$maxLines=8,n.renderer.$keepTextAreaAtCursor=!1,n.setHighlightActiveLine(!1),n.session.highlight(""),n.session.$searchHighlight.clazz="ace_highlight-marker",n.on("mousedown",(function(e){var t=e.getDocumentPosition();n.selection.moveToPosition(t),d.start.row=d.end.row=t.row,e.stop()}));var u=new o(-1,0,-1,1/0),d=new o(-1,0,-1,1/0);d.id=n.session.addMarker(d,"ace_active-line","fullLine"),n.setSelectOnHover=function(e){e?u.id&&(n.session.removeMarker(u.id),u.id=null):u.id=n.session.addMarker(u,"ace_line-hover","fullLine")},n.setSelectOnHover(!1),n.on("mousemove",(function(e){if(i){if(i.x!=e.x||i.y!=e.y){(i=e).scrollTop=n.renderer.scrollTop;var t=i.getDocumentPosition().row;u.start.row!=t&&(u.id||n.setRow(t),f(t))}}else i=e})),n.renderer.on("beforeRender",(function(){if(i&&-1!=u.start.row){i.$pos=null;var e=i.getDocumentPosition().row;u.id||n.setRow(e),f(e,!0)}})),n.renderer.on("afterRender",(function(){var e=n.getRow(),t=n.renderer.$textLayer,i=t.element.childNodes[e-t.config.firstRow];i!==t.selectedNode&&t.selectedNode&&l.removeCssClass(t.selectedNode,"ace_selected"),t.selectedNode=i,i&&l.addCssClass(i,"ace_selected")}));var h=function(){f(-1)},f=function(e,t){e!==u.start.row&&(u.start.row=u.end.row=e,t||n.session._emit("changeBackMarker"),n._emit("changeHoverMarker"))};n.getHoveredRow=function(){return u.start.row},s.addListener(n.container,"mouseout",h),n.on("hide",h),n.on("changeSelection",h),n.session.doc.getLength=function(){return n.data.length},n.session.doc.getLine=function(e){var t=n.data[e];return"string"==typeof t?t:t&&t.value||""};var p=n.session.bgTokenizer;return p.$tokenizeRow=function(e){var t=n.data[e],i=[];if(!t)return i;"string"==typeof t&&(t={value:t});var r=t.caption||t.value||t.name;function o(e,n){e&&i.push({type:(t.className||"")+(n||""),value:e})}for(var s=r.toLowerCase(),a=(n.filterText||"").toLowerCase(),l=0,c=0,u=0;u<=a.length;u++)if(u!=c&&(t.matchMask&1<<u||u==a.length)){var d=a.slice(c,u);c=u;var h=s.indexOf(d,l);if(-1==h)continue;o(r.slice(l,h),""),l=h+d.length,o(r.slice(h,l),"completion-highlight")}return o(r.slice(l,r.length),""),t.meta&&i.push({type:"completion-meta",value:t.meta}),t.message&&i.push({type:"completion-message",value:t.message}),i},p.$updateOnChange=r,p.start=r,n.session.$computeWidth=function(){return this.screenWidth=0},n.isOpen=!1,n.isTopdown=!1,n.autoSelect=!0,n.filterText="",n.data=[],n.setData=function(e,t){n.filterText=t||"",n.setValue(a.stringRepeat("\n",e.length),-1),n.data=e||[],n.setRow(0)},n.getData=function(e){return n.data[e]},n.getRow=function(){return d.start.row},n.setRow=function(e){e=Math.max(this.autoSelect?0:-1,Math.min(this.data.length,e)),d.start.row!=e&&(n.selection.clearSelection(),d.start.row=d.end.row=e||0,n.session._emit("changeBackMarker"),n.moveCursorTo(e||0,0),n.isOpen&&n._signal("select"))},n.on("changeSelection",(function(){n.isOpen&&n.setRow(n.selection.lead.row),n.renderer.scrollCursorIntoView()})),n.hide=function(){this.container.style.display="none",this._signal("hide"),n.isOpen=!1},n.show=function(e,t,r){var o=this.container,s=window.innerHeight,a=window.innerWidth,l=this.renderer,c=l.$maxLines*t*1.4,u=e.top+this.$borderSize;u>s/2&&!r&&u+t+c>s?(l.$maxPixelHeight=u-2*this.$borderSize,o.style.top="",o.style.bottom=s-u+"px",n.isTopdown=!1):(u+=t,l.$maxPixelHeight=s-u-.2*t,o.style.top=u+"px",o.style.bottom="",n.isTopdown=!0),o.style.display="";var d=e.left;d+o.offsetWidth>a&&(d=a-o.offsetWidth),o.style.left=d+"px",this._signal("show"),i=null,n.isOpen=!0},n.goTo=function(e){var t=this.getRow(),n=this.session.getLength()-1;switch(e){case"up":t=t<=0?n:t-1;break;case"down":t=t>=n?-1:t+1;break;case"start":t=0;break;case"end":t=n}this.setRow(t)},n.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},n.$imageSize=0,n.$borderSize=1,n},t.$singleLineEditor=c})),ace.define("ace/autocomplete/util",["require","exports","module"],(function(e,t,n){"use strict";t.parForEach=function(e,t,n){var i=0,r=e.length;0===r&&n();for(var o=0;o<r;o++)t(e[o],(function(e,t){++i===r&&n(e,t)}))};var i=/[a-zA-Z_0-9\$\-\u00A2-\u2000\u2070-\uFFFF]/;t.retrievePrecedingIdentifier=function(e,t,n){n=n||i;for(var r=[],o=t-1;o>=0&&n.test(e[o]);o--)r.push(e[o]);return r.reverse().join("")},t.retrieveFollowingIdentifier=function(e,t,n){n=n||i;for(var r=[],o=t;o<e.length&&n.test(e[o]);o++)r.push(e[o]);return r},t.getCompletionPrefix=function(e){var t,n=e.getCursorPosition(),i=e.session.getLine(n.row);return e.completers.forEach(function(e){e.identifierRegexps&&e.identifierRegexps.forEach(function(e){!t&&e&&(t=this.retrievePrecedingIdentifier(i,n.column,e))}.bind(this))}.bind(this)),t||this.retrievePrecedingIdentifier(i,n.column)}})),ace.define("ace/autocomplete",["require","exports","module","ace/keyboard/hash_handler","ace/autocomplete/popup","ace/autocomplete/util","ace/lib/lang","ace/lib/dom","ace/snippets","ace/config"],(function(e,t,n){"use strict";var i=e("./keyboard/hash_handler").HashHandler,r=e("./autocomplete/popup").AcePopup,o=e("./autocomplete/util"),s=e("./lib/lang"),a=e("./lib/dom"),l=e("./snippets").snippetManager,c=e("./config"),u=function(){this.autoInsert=!1,this.autoSelect=!0,this.exactMatch=!1,this.gatherCompletionsId=0,this.keyboardHandler=new i,this.keyboardHandler.bindKeys(this.commands),this.blurListener=this.blurListener.bind(this),this.changeListener=this.changeListener.bind(this),this.mousedownListener=this.mousedownListener.bind(this),this.mousewheelListener=this.mousewheelListener.bind(this),this.changeTimer=s.delayedCall(function(){this.updateCompletions(!0)}.bind(this)),this.tooltipTimer=s.delayedCall(this.updateDocTooltip.bind(this),50)};(function(){this.$init=function(){return this.popup=new r(document.body||document.documentElement),this.popup.on("click",function(e){this.insertMatch(),e.stop()}.bind(this)),this.popup.focus=this.editor.focus.bind(this.editor),this.popup.on("show",this.tooltipTimer.bind(null,null)),this.popup.on("select",this.tooltipTimer.bind(null,null)),this.popup.on("changeHoverMarker",this.tooltipTimer.bind(null,null)),this.popup},this.getPopup=function(){return this.popup||this.$init()},this.openPopup=function(e,t,n){this.popup||this.$init(),this.popup.autoSelect=this.autoSelect,this.popup.setData(this.completions.filtered,this.completions.filterText),e.keyBinding.addKeyboardHandler(this.keyboardHandler);var i=e.renderer;if(this.popup.setRow(this.autoSelect?0:-1),n)n&&!t&&this.detach();else{this.popup.setTheme(e.getTheme()),this.popup.setFontSize(e.getFontSize());var r=i.layerConfig.lineHeight,o=i.$cursorLayer.getPixelPosition(this.base,!0);o.left-=this.popup.getTextLeftOffset();var s=e.container.getBoundingClientRect();o.top+=s.top-i.layerConfig.offset,o.left+=s.left-e.renderer.scrollLeft,o.left+=i.gutterWidth,this.popup.show(o,r)}this.changeTimer.cancel()},this.detach=function(){this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.off("changeSelection",this.changeListener),this.editor.off("blur",this.blurListener),this.editor.off("mousedown",this.mousedownListener),this.editor.off("mousewheel",this.mousewheelListener),this.changeTimer.cancel(),this.hideDocTooltip(),this.gatherCompletionsId+=1,this.popup&&this.popup.isOpen&&this.popup.hide(),this.base&&this.base.detach(),this.activated=!1,this.completions=this.base=null},this.changeListener=function(e){var t=this.editor.selection.lead;(t.row!=this.base.row||t.column<this.base.column)&&this.detach(),this.activated?this.changeTimer.schedule():this.detach()},this.blurListener=function(e){var t=document.activeElement,n=this.editor.textInput.getElement(),i=e.relatedTarget&&this.tooltipNode&&this.tooltipNode.contains(e.relatedTarget),r=this.popup&&this.popup.container;t==n||t.parentNode==r||i||t==this.tooltipNode||e.relatedTarget==n||this.detach()},this.mousedownListener=function(e){this.detach()},this.mousewheelListener=function(e){this.detach()},this.goTo=function(e){this.popup.goTo(e)},this.insertMatch=function(e,t){if(e||(e=this.popup.getData(this.popup.getRow())),!e)return!1;var n=this.completions;if(this.editor.startOperation({command:{name:"insertMatch"}}),e.completer&&e.completer.insertMatch)e.completer.insertMatch(this.editor,e);else{if(!n)return!1;if(n.filterText)for(var i,r=this.editor.selection.getAllRanges(),o=0;i=r[o];o++)i.start.column-=n.filterText.length,this.editor.session.remove(i);e.snippet?l.insertSnippet(this.editor,e.snippet):this.editor.execCommand("insertstring",e.value||e)}this.completions==n&&this.detach(),this.editor.endOperation()},this.commands={Up:function(e){e.completer.goTo("up")},Down:function(e){e.completer.goTo("down")},"Ctrl-Up|Ctrl-Home":function(e){e.completer.goTo("start")},"Ctrl-Down|Ctrl-End":function(e){e.completer.goTo("end")},Esc:function(e){e.completer.detach()},Return:function(e){return e.completer.insertMatch()},"Shift-Return":function(e){e.completer.insertMatch(null,{deleteSuffix:!0})},Tab:function(e){var t=e.completer.insertMatch();if(t||e.tabstopManager)return t;e.completer.goTo("down")},PageUp:function(e){e.completer.popup.gotoPageUp()},PageDown:function(e){e.completer.popup.gotoPageDown()}},this.gatherCompletions=function(e,t){var n=e.getSession(),i=e.getCursorPosition(),r=o.getCompletionPrefix(e);this.base=n.doc.createAnchor(i.row,i.column-r.length),this.base.$insertRight=!0;var s=[],a=e.completers.length;return e.completers.forEach((function(l,c){l.getCompletions(e,n,i,r,(function(n,i){!n&&i&&(s=s.concat(i)),t(null,{prefix:o.getCompletionPrefix(e),matches:s,finished:0==--a})}))})),!0},this.showPopup=function(e,t){this.editor&&this.detach(),this.activated=!0,this.editor=e,e.completer!=this&&(e.completer&&e.completer.detach(),e.completer=this),e.on("changeSelection",this.changeListener),e.on("blur",this.blurListener),e.on("mousedown",this.mousedownListener),e.on("mousewheel",this.mousewheelListener),this.updateCompletions(!1,t)},this.updateCompletions=function(e,t){if(e&&this.base&&this.completions){var n=this.editor.getCursorPosition(),i=this.editor.session.getTextRange({start:this.base,end:n});if(i==this.completions.filterText)return;return this.completions.setFilter(i),this.completions.filtered.length&&(1!=this.completions.filtered.length||this.completions.filtered[0].value!=i||this.completions.filtered[0].snippet)?void this.openPopup(this.editor,i,e):this.detach()}if(t&&t.matches)return n=this.editor.getSelectionRange().start,this.base=this.editor.session.doc.createAnchor(n.row,n.column),this.base.$insertRight=!0,this.completions=new d(t.matches),this.openPopup(this.editor,"",e);var r=this.gatherCompletionsId,o=function(e){if(e.finished)return this.detach()}.bind(this),s=function(t){var n=t.prefix,i=t.matches;this.completions=new d(i),this.exactMatch&&(this.completions.exactMatch=!0),this.completions.setFilter(n);var r=this.completions.filtered;return r.length&&(1!=r.length||r[0].value!=n||r[0].snippet)?this.autoInsert&&1==r.length&&t.finished?this.insertMatch(r[0]):void this.openPopup(this.editor,n,e):o(t)}.bind(this),a=!0,l=null;if(this.gatherCompletions(this.editor,function(e,t){var n=t.prefix,i=t&&t.matches;if(!i||!i.length)return o(t);0===n.indexOf(t.prefix)&&r==this.gatherCompletionsId&&(a?l=t:s(t))}.bind(this)),a=!1,l){var c=l;l=null,s(c)}},this.cancelContextMenu=function(){this.editor.$mouseHandler.cancelContextMenu()},this.updateDocTooltip=function(){var e=this.popup,t=e.data,n=t&&(t[e.getHoveredRow()]||t[e.getRow()]),i=null;return n&&this.editor&&this.popup.isOpen?(this.editor.completers.some((function(e){return e.getDocTooltip&&(i=e.getDocTooltip(n)),i})),i||"string"==typeof n||(i=n),"string"==typeof i&&(i={docText:i}),i&&(i.docHTML||i.docText)?void this.showDocTooltip(i):this.hideDocTooltip()):this.hideDocTooltip()},this.showDocTooltip=function(e){this.tooltipNode||(this.tooltipNode=a.createElement("div"),this.tooltipNode.className="ace_tooltip ace_doc-tooltip",this.tooltipNode.style.margin=0,this.tooltipNode.style.pointerEvents="auto",this.tooltipNode.tabIndex=-1,this.tooltipNode.onblur=this.blurListener.bind(this),this.tooltipNode.onclick=this.onTooltipClick.bind(this));var t=this.tooltipNode;e.docHTML?t.innerHTML=e.docHTML:e.docText&&(t.textContent=e.docText),t.parentNode||document.body.appendChild(t);var n=this.popup,i=n.container.getBoundingClientRect();t.style.top=n.container.style.top,t.style.bottom=n.container.style.bottom,t.style.display="block",window.innerWidth-i.right<320?i.left<320?n.isTopdown?(t.style.top=i.bottom+"px",t.style.left=i.left+"px",t.style.right="",t.style.bottom=""):(t.style.top=n.container.offsetTop-t.offsetHeight+"px",t.style.left=i.left+"px",t.style.right="",t.style.bottom=""):(t.style.right=window.innerWidth-i.left+"px",t.style.left=""):(t.style.left=i.right+1+"px",t.style.right="")},this.hideDocTooltip=function(){if(this.tooltipTimer.cancel(),this.tooltipNode){var e=this.tooltipNode;this.editor.isFocused()||document.activeElement!=e||this.editor.focus(),this.tooltipNode=null,e.parentNode&&e.parentNode.removeChild(e)}},this.onTooltipClick=function(e){for(var t=e.target;t&&t!=this.tooltipNode;){if("A"==t.nodeName&&t.href){t.rel="noreferrer",t.target="_blank";break}t=t.parentNode}},this.destroy=function(){if(this.detach(),this.popup){this.popup.destroy();var e=this.popup.container;e&&e.parentNode&&e.parentNode.removeChild(e)}this.editor&&this.editor.completer==this&&this.editor.completer,this.popup=null}}).call(u.prototype),u.for=function(e){return e.completer||(c.get("sharedPopups")?(u.$shared||(u.$sharedInstance=new u),e.completer=u.$sharedInstance):(e.completer=new u,e.once("destroy",(function(e,t){t.completer.destroy()})))),e.completer},u.startCommand={name:"startAutocomplete",exec:function(e,t){var n=u.for(e);n.autoInsert=!1,n.autoSelect=!0,n.showPopup(e,t),n.cancelContextMenu()},bindKey:"Ctrl-Space|Ctrl-Shift-Space|Alt-Space"};var d=function(e,t){this.all=e,this.filtered=e,this.filterText=t||"",this.exactMatch=!1};(function(){this.setFilter=function(e){if(e.length>this.filterText&&0===e.lastIndexOf(this.filterText,0))var t=this.filtered;else t=this.all;this.filterText=e,t=(t=this.filterCompletions(t,this.filterText)).sort((function(e,t){return t.exactMatch-e.exactMatch||t.$score-e.$score||(e.caption||e.value).localeCompare(t.caption||t.value)}));var n=null;t=t.filter((function(e){var t=e.snippet||e.caption||e.value;return t!==n&&(n=t,!0)})),this.filtered=t},this.filterCompletions=function(e,t){var n=[],i=t.toUpperCase(),r=t.toLowerCase();e:for(var o,s=0;o=e[s];s++){var a=o.caption||o.value||o.snippet;if(a){var l,c,u=-1,d=0,h=0;if(this.exactMatch){if(t!==a.substr(0,t.length))continue e}else{var f=a.toLowerCase().indexOf(r);if(f>-1)h=f;else for(var p=0;p<t.length;p++){var g=a.indexOf(r[p],u+1),m=a.indexOf(i[p],u+1);if((l=g>=0&&(m<0||g<m)?g:m)<0)continue e;(c=l-u-1)>0&&(-1===u&&(h+=10),h+=c,d|=1<<p),u=l}}o.matchMask=d,o.exactMatch=h?0:1,o.$score=(o.score||0)-h,n.push(o)}}return n}}).call(d.prototype),t.Autocomplete=u,t.FilteredList=d})),ace.define("ace/autocomplete/text_completer",["require","exports","module","ace/range"],(function(e,t,n){var i=e("../range").Range,r=/[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;t.getCompletions=function(e,t,n,o,s){var a=function(e,t){var n=function(e,t){return e.getTextRange(i.fromPoints({row:0,column:0},t)).split(r).length-1}(e,t),o=e.getValue().split(r),s=Object.create(null),a=o[n];return o.forEach((function(e,t){if(e&&e!==a){var i=Math.abs(n-t),r=o.length-i;s[e]?s[e]=Math.max(r,s[e]):s[e]=r}})),s}(t,n);s(null,Object.keys(a).map((function(e){return{caption:e,value:e,score:a[e],meta:"local"}})))}})),ace.define("ace/ext/language_tools",["require","exports","module","ace/snippets","ace/autocomplete","ace/config","ace/lib/lang","ace/autocomplete/util","ace/autocomplete/text_completer","ace/editor","ace/config"],(function(e,t,n){"use strict";var i=e("../snippets").snippetManager,r=e("../autocomplete").Autocomplete,o=e("../config"),s=e("../lib/lang"),a=e("../autocomplete/util"),l=e("../autocomplete/text_completer"),c={getCompletions:function(e,t,n,i,r){if(t.$mode.completer)return t.$mode.completer.getCompletions(e,t,n,i,r);var o=e.session.getState(n.row);r(null,t.$mode.getCompletions(o,t,n,i))}},u={getCompletions:function(e,t,n,r,o){var s=[],a=t.getTokenAt(n.row,n.column);a&&a.type.match(/(tag-name|tag-open|tag-whitespace|attribute-name|attribute-value)\.xml$/)?s.push("html-tag"):s=i.getActiveScopes(e);var l=i.snippetMap,c=[];s.forEach((function(e){for(var t=l[e]||[],n=t.length;n--;){var i=t[n],r=i.name||i.tabTrigger;r&&c.push({caption:r,snippet:i.content,meta:i.tabTrigger&&!i.name?i.tabTrigger+"⇥ ":"snippet",type:"snippet"})}}),this),o(null,c)},getDocTooltip:function(e){var t,n;"snippet"!=e.type||e.docHTML||(e.docHTML=["<b>",s.escapeHTML(e.caption),"</b>","<hr></hr>",s.escapeHTML((t=e.snippet,n={},t.replace(/\${(\d+)(:(.*?))?}/g,(function(e,t,i,r){return n[t]=r||""})).replace(/\$(\d+?)/g,(function(e,t){return n[t]}))))].join(""))}},d=[u,l,c];t.setCompleters=function(e){d.length=0,e&&d.push.apply(d,e)},t.addCompleter=function(e){d.push(e)},t.textCompleter=l,t.keyWordCompleter=c,t.snippetCompleter=u;var h={name:"expandSnippet",exec:function(e){return i.expandWithTab(e)},bindKey:"Tab"},f=function(e,t){p(t.session.$mode)},p=function(e){"string"==typeof e&&(e=o.$modes[e]),e&&(i.files||(i.files={}),g(e.$id,e.snippetFileId),e.modes&&e.modes.forEach(p))},g=function(e,t){t&&e&&!i.files[e]&&(i.files[e]={},o.loadModule(t,(function(t){t&&(i.files[e]=t,!t.snippets&&t.snippetText&&(t.snippets=i.parseSnippetFile(t.snippetText)),i.register(t.snippets||[],t.scope),t.includeScopes&&(i.snippetMap[t.scope].includeScopes=t.includeScopes,t.includeScopes.forEach((function(e){p("ace/mode/"+e)}))))})))},m=function(e){var t=e.editor,n=t.completer&&t.completer.activated;if("backspace"===e.command.name)n&&!a.getCompletionPrefix(t)&&t.completer.detach();else if("insertstring"===e.command.name&&a.getCompletionPrefix(t)&&!n){var i=r.for(t);i.autoInsert=!1,i.showPopup(t)}},v=e("../editor").Editor;e("../config").defineOptions(v.prototype,"editor",{enableBasicAutocompletion:{set:function(e){e?(this.completers||(this.completers=Array.isArray(e)?e:d),this.commands.addCommand(r.startCommand)):this.commands.removeCommand(r.startCommand)},value:!1},enableLiveAutocompletion:{set:function(e){e?(this.completers||(this.completers=Array.isArray(e)?e:d),this.commands.on("afterExec",m)):this.commands.removeListener("afterExec",m)},value:!1},enableSnippets:{set:function(e){e?(this.commands.addCommand(h),this.on("changeMode",f),f(0,this)):(this.commands.removeCommand(h),this.off("changeMode",f))},value:!1}})})),ace.require(["ace/ext/language_tools"],(function(t){e&&(e.exports=t)}))},93083:(e,t,n)=>{e=n.nmd(e),ace.define("ace/split",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/editor","ace/virtual_renderer","ace/edit_session"],(function(e,t,n){"use strict";var i=e("./lib/oop"),r=(e("./lib/lang"),e("./lib/event_emitter").EventEmitter),o=e("./editor").Editor,s=e("./virtual_renderer").VirtualRenderer,a=e("./edit_session").EditSession,l=function(e,t,n){this.BELOW=1,this.BESIDE=0,this.$container=e,this.$theme=t,this.$splits=0,this.$editorCSS="",this.$editors=[],this.$orientation=this.BESIDE,this.setSplits(n||1),this.$cEditor=this.$editors[0],this.on("focus",function(e){this.$cEditor=e}.bind(this))};(function(){i.implement(this,r),this.$createEditor=function(){var e=document.createElement("div");e.className=this.$editorCSS,e.style.cssText="position: absolute; top:0px; bottom:0px",this.$container.appendChild(e);var t=new o(new s(e,this.$theme));return t.on("focus",function(){this._emit("focus",t)}.bind(this)),this.$editors.push(t),t.setFontSize(this.$fontSize),t},this.setSplits=function(e){var t;if(e<1)throw"The number of splits have to be > 0!";if(e!=this.$splits){if(e>this.$splits){for(;this.$splits<this.$editors.length&&this.$splits<e;)t=this.$editors[this.$splits],this.$container.appendChild(t.container),t.setFontSize(this.$fontSize),this.$splits++;for(;this.$splits<e;)this.$createEditor(),this.$splits++}else for(;this.$splits>e;)t=this.$editors[this.$splits-1],this.$container.removeChild(t.container),this.$splits--;this.resize()}},this.getSplits=function(){return this.$splits},this.getEditor=function(e){return this.$editors[e]},this.getCurrentEditor=function(){return this.$cEditor},this.focus=function(){this.$cEditor.focus()},this.blur=function(){this.$cEditor.blur()},this.setTheme=function(e){this.$editors.forEach((function(t){t.setTheme(e)}))},this.setKeyboardHandler=function(e){this.$editors.forEach((function(t){t.setKeyboardHandler(e)}))},this.forEach=function(e,t){this.$editors.forEach(e,t)},this.$fontSize="",this.setFontSize=function(e){this.$fontSize=e,this.forEach((function(t){t.setFontSize(e)}))},this.$cloneSession=function(e){var t=new a(e.getDocument(),e.getMode()),n=e.getUndoManager();return t.setUndoManager(n),t.setTabSize(e.getTabSize()),t.setUseSoftTabs(e.getUseSoftTabs()),t.setOverwrite(e.getOverwrite()),t.setBreakpoints(e.getBreakpoints()),t.setUseWrapMode(e.getUseWrapMode()),t.setUseWorker(e.getUseWorker()),t.setWrapLimitRange(e.$wrapLimitRange.min,e.$wrapLimitRange.max),t.$foldData=e.$cloneFoldData(),t},this.setSession=function(e,t){var n;n=null==t?this.$cEditor:this.$editors[t];var i=this.$editors.some((function(t){return t.session===e}));return i&&(e=this.$cloneSession(e)),n.setSession(e),e},this.getOrientation=function(){return this.$orientation},this.setOrientation=function(e){this.$orientation!=e&&(this.$orientation=e,this.resize())},this.resize=function(){var e,t=this.$container.clientWidth,n=this.$container.clientHeight;if(this.$orientation==this.BESIDE)for(var i=t/this.$splits,r=0;r<this.$splits;r++)(e=this.$editors[r]).container.style.width=i+"px",e.container.style.top="0px",e.container.style.left=r*i+"px",e.container.style.height=n+"px",e.resize();else{var o=n/this.$splits;for(r=0;r<this.$splits;r++)(e=this.$editors[r]).container.style.width=t+"px",e.container.style.top=r*o+"px",e.container.style.left="0px",e.container.style.height=o+"px",e.resize()}}}).call(l.prototype),t.Split=l})),ace.define("ace/ext/split",["require","exports","module","ace/split"],(function(e,t,n){"use strict";n.exports=e("../split")})),ace.require(["ace/ext/split"],(function(t){e&&(e.exports=t)}))},66245:(e,t,n)=>{ace.config.setModuleUrl("ace/ext/beautify",n(94277)),ace.config.setModuleUrl("ace/ext/code_lens",n(14113)),ace.config.setModuleUrl("ace/ext/elastic_tabstops_lite",n(81334)),ace.config.setModuleUrl("ace/ext/emmet",n(59503)),ace.config.setModuleUrl("ace/ext/error_marker",n(83823)),ace.config.setModuleUrl("ace/ext/hardwrap",n(83526)),ace.config.setModuleUrl("ace/ext/keyboard_menu",n(8026)),ace.config.setModuleUrl("ace/ext/language_tools",n(75065)),ace.config.setModuleUrl("ace/ext/linking",n(74422)),ace.config.setModuleUrl("ace/ext/modelist",n(29624)),ace.config.setModuleUrl("ace/ext/options",n(7704)),ace.config.setModuleUrl("ace/ext/prompt",n(13172)),ace.config.setModuleUrl("ace/ext/rtl",n(71165)),ace.config.setModuleUrl("ace/ext/searchbox",n(7490)),ace.config.setModuleUrl("ace/ext/settings_menu",n(19159)),ace.config.setModuleUrl("ace/ext/spellcheck",n(44666)),ace.config.setModuleUrl("ace/ext/split",n(82489)),ace.config.setModuleUrl("ace/ext/static_highlight",n(46385)),ace.config.setModuleUrl("ace/ext/statusbar",n(13038)),ace.config.setModuleUrl("ace/ext/textarea",n(37097)),ace.config.setModuleUrl("ace/ext/themelist",n(63603)),ace.config.setModuleUrl("ace/ext/whitespace",n(95367)),ace.config.setModuleUrl("ace/keyboard/emacs",n(67863)),ace.config.setModuleUrl("ace/keyboard/sublime",n(87630)),ace.config.setModuleUrl("ace/keyboard/vim",n(31380)),ace.config.setModuleUrl("ace/keyboard/vscode",n(61366)),ace.config.setModuleUrl("ace/mode/abap",n(91108)),ace.config.setModuleUrl("ace/mode/abc",n(96293)),ace.config.setModuleUrl("ace/mode/actionscript",n(80029)),ace.config.setModuleUrl("ace/mode/ada",n(26375)),ace.config.setModuleUrl("ace/mode/alda",n(39254)),ace.config.setModuleUrl("ace/mode/apache_conf",n(87006)),ace.config.setModuleUrl("ace/mode/apex",n(9027)),ace.config.setModuleUrl("ace/mode/applescript",n(48032)),ace.config.setModuleUrl("ace/mode/aql",n(73398)),ace.config.setModuleUrl("ace/mode/asciidoc",n(23723)),ace.config.setModuleUrl("ace/mode/asl",n(54264)),ace.config.setModuleUrl("ace/mode/assembly_x86",n(42066)),ace.config.setModuleUrl("ace/mode/autohotkey",n(57382)),ace.config.setModuleUrl("ace/mode/batchfile",n(89323)),ace.config.setModuleUrl("ace/mode/bibtex",n(12629)),ace.config.setModuleUrl("ace/mode/c9search",n(51022)),ace.config.setModuleUrl("ace/mode/c_cpp",n(19783)),ace.config.setModuleUrl("ace/mode/cirru",n(73322)),ace.config.setModuleUrl("ace/mode/clojure",n(33068)),ace.config.setModuleUrl("ace/mode/cobol",n(97944)),ace.config.setModuleUrl("ace/mode/coffee",n(56816)),ace.config.setModuleUrl("ace/mode/coldfusion",n(14338)),ace.config.setModuleUrl("ace/mode/crystal",n(15209)),ace.config.setModuleUrl("ace/mode/csharp",n(86147)),ace.config.setModuleUrl("ace/mode/csound_document",n(54967)),ace.config.setModuleUrl("ace/mode/csound_orchestra",n(99681)),ace.config.setModuleUrl("ace/mode/csound_score",n(52988)),ace.config.setModuleUrl("ace/mode/csp",n(31951)),ace.config.setModuleUrl("ace/mode/css",n(31590)),ace.config.setModuleUrl("ace/mode/curly",n(61877)),ace.config.setModuleUrl("ace/mode/d",n(36473)),ace.config.setModuleUrl("ace/mode/dart",n(45029)),ace.config.setModuleUrl("ace/mode/diff",n(62070)),ace.config.setModuleUrl("ace/mode/django",n(68721)),ace.config.setModuleUrl("ace/mode/dockerfile",n(65655)),ace.config.setModuleUrl("ace/mode/dot",n(63030)),ace.config.setModuleUrl("ace/mode/drools",n(35838)),ace.config.setModuleUrl("ace/mode/edifact",n(90751)),ace.config.setModuleUrl("ace/mode/eiffel",n(82501)),ace.config.setModuleUrl("ace/mode/ejs",n(67593)),ace.config.setModuleUrl("ace/mode/elixir",n(16281)),ace.config.setModuleUrl("ace/mode/elm",n(46642)),ace.config.setModuleUrl("ace/mode/erlang",n(29514)),ace.config.setModuleUrl("ace/mode/forth",n(23429)),ace.config.setModuleUrl("ace/mode/fortran",n(95187)),ace.config.setModuleUrl("ace/mode/fsharp",n(61417)),ace.config.setModuleUrl("ace/mode/fsl",n(69306)),ace.config.setModuleUrl("ace/mode/ftl",n(72802)),ace.config.setModuleUrl("ace/mode/gcode",n(59901)),ace.config.setModuleUrl("ace/mode/gherkin",n(58135)),ace.config.setModuleUrl("ace/mode/gitignore",n(48100)),ace.config.setModuleUrl("ace/mode/glsl",n(51975)),ace.config.setModuleUrl("ace/mode/gobstones",n(95623)),ace.config.setModuleUrl("ace/mode/golang",n(40361)),ace.config.setModuleUrl("ace/mode/graphqlschema",n(2550)),ace.config.setModuleUrl("ace/mode/groovy",n(52501)),ace.config.setModuleUrl("ace/mode/haml",n(85521)),ace.config.setModuleUrl("ace/mode/handlebars",n(87605)),ace.config.setModuleUrl("ace/mode/haskell",n(94977)),ace.config.setModuleUrl("ace/mode/haskell_cabal",n(12681)),ace.config.setModuleUrl("ace/mode/haxe",n(70722)),ace.config.setModuleUrl("ace/mode/hjson",n(54217)),ace.config.setModuleUrl("ace/mode/html",n(70557)),ace.config.setModuleUrl("ace/mode/html_elixir",n(35050)),ace.config.setModuleUrl("ace/mode/html_ruby",n(36493)),ace.config.setModuleUrl("ace/mode/ini",n(41580)),ace.config.setModuleUrl("ace/mode/io",n(78019)),ace.config.setModuleUrl("ace/mode/ion",n(61226)),ace.config.setModuleUrl("ace/mode/jack",n(40618)),ace.config.setModuleUrl("ace/mode/jade",n(79461)),ace.config.setModuleUrl("ace/mode/java",n(17002)),ace.config.setModuleUrl("ace/mode/javascript",n(16358)),ace.config.setModuleUrl("ace/mode/jexl",n(4028)),ace.config.setModuleUrl("ace/mode/json",n(92358)),ace.config.setModuleUrl("ace/mode/json5",n(57496)),ace.config.setModuleUrl("ace/mode/jsoniq",n(7905)),ace.config.setModuleUrl("ace/mode/jsp",n(34441)),ace.config.setModuleUrl("ace/mode/jssm",n(53703)),ace.config.setModuleUrl("ace/mode/jsx",n(61531)),ace.config.setModuleUrl("ace/mode/julia",n(23679)),ace.config.setModuleUrl("ace/mode/kotlin",n(42478)),ace.config.setModuleUrl("ace/mode/latex",n(62926)),ace.config.setModuleUrl("ace/mode/latte",n(15460)),ace.config.setModuleUrl("ace/mode/less",n(47051)),ace.config.setModuleUrl("ace/mode/liquid",n(43566)),ace.config.setModuleUrl("ace/mode/lisp",n(85992)),ace.config.setModuleUrl("ace/mode/livescript",n(66846)),ace.config.setModuleUrl("ace/mode/logiql",n(94158)),ace.config.setModuleUrl("ace/mode/logtalk",n(8164)),ace.config.setModuleUrl("ace/mode/lsl",n(97214)),ace.config.setModuleUrl("ace/mode/lua",n(99193)),ace.config.setModuleUrl("ace/mode/luapage",n(27036)),ace.config.setModuleUrl("ace/mode/lucene",n(61145)),ace.config.setModuleUrl("ace/mode/makefile",n(9724)),ace.config.setModuleUrl("ace/mode/markdown",n(23094)),ace.config.setModuleUrl("ace/mode/mask",n(19999)),ace.config.setModuleUrl("ace/mode/matlab",n(12562)),ace.config.setModuleUrl("ace/mode/maze",n(41995)),ace.config.setModuleUrl("ace/mode/mediawiki",n(52699)),ace.config.setModuleUrl("ace/mode/mel",n(71367)),ace.config.setModuleUrl("ace/mode/mips",n(50951)),ace.config.setModuleUrl("ace/mode/mixal",n(79636)),ace.config.setModuleUrl("ace/mode/mushcode",n(58279)),ace.config.setModuleUrl("ace/mode/mysql",n(5765)),ace.config.setModuleUrl("ace/mode/nginx",n(39258)),ace.config.setModuleUrl("ace/mode/nim",n(42583)),ace.config.setModuleUrl("ace/mode/nix",n(50149)),ace.config.setModuleUrl("ace/mode/nsis",n(2726)),ace.config.setModuleUrl("ace/mode/nunjucks",n(14009)),ace.config.setModuleUrl("ace/mode/objectivec",n(36877)),ace.config.setModuleUrl("ace/mode/ocaml",n(75599)),ace.config.setModuleUrl("ace/mode/partiql",n(26744)),ace.config.setModuleUrl("ace/mode/pascal",n(85396)),ace.config.setModuleUrl("ace/mode/perl",n(42893)),ace.config.setModuleUrl("ace/mode/pgsql",n(33665)),ace.config.setModuleUrl("ace/mode/php",n(89030)),ace.config.setModuleUrl("ace/mode/php_laravel_blade",n(17847)),ace.config.setModuleUrl("ace/mode/pig",n(18864)),ace.config.setModuleUrl("ace/mode/plain_text",n(7251)),ace.config.setModuleUrl("ace/mode/powershell",n(69933)),ace.config.setModuleUrl("ace/mode/praat",n(10647)),ace.config.setModuleUrl("ace/mode/prisma",n(68591)),ace.config.setModuleUrl("ace/mode/prolog",n(35661)),ace.config.setModuleUrl("ace/mode/properties",n(69423)),ace.config.setModuleUrl("ace/mode/protobuf",n(10857)),ace.config.setModuleUrl("ace/mode/puppet",n(97906)),ace.config.setModuleUrl("ace/mode/python",n(82198)),ace.config.setModuleUrl("ace/mode/qml",n(58200)),ace.config.setModuleUrl("ace/mode/r",n(9904)),ace.config.setModuleUrl("ace/mode/raku",n(52745)),ace.config.setModuleUrl("ace/mode/razor",n(297)),ace.config.setModuleUrl("ace/mode/rdoc",n(3475)),ace.config.setModuleUrl("ace/mode/red",n(18613)),ace.config.setModuleUrl("ace/mode/redshift",n(63643)),ace.config.setModuleUrl("ace/mode/rhtml",n(49288)),ace.config.setModuleUrl("ace/mode/robot",n(89538)),ace.config.setModuleUrl("ace/mode/rst",n(77374)),ace.config.setModuleUrl("ace/mode/ruby",n(2449)),ace.config.setModuleUrl("ace/mode/rust",n(19934)),ace.config.setModuleUrl("ace/mode/sac",n(24583)),ace.config.setModuleUrl("ace/mode/sass",n(1418)),ace.config.setModuleUrl("ace/mode/scad",n(14129)),ace.config.setModuleUrl("ace/mode/scala",n(26363)),ace.config.setModuleUrl("ace/mode/scheme",n(97439)),ace.config.setModuleUrl("ace/mode/scrypt",n(60832)),ace.config.setModuleUrl("ace/mode/scss",n(3887)),ace.config.setModuleUrl("ace/mode/sh",n(58971)),ace.config.setModuleUrl("ace/mode/sjs",n(50641)),ace.config.setModuleUrl("ace/mode/slim",n(66774)),ace.config.setModuleUrl("ace/mode/smarty",n(70726)),ace.config.setModuleUrl("ace/mode/smithy",n(13378)),ace.config.setModuleUrl("ace/mode/snippets",n(31033)),ace.config.setModuleUrl("ace/mode/soy_template",n(16178)),ace.config.setModuleUrl("ace/mode/space",n(3434)),ace.config.setModuleUrl("ace/mode/sparql",n(19366)),ace.config.setModuleUrl("ace/mode/sql",n(64117)),ace.config.setModuleUrl("ace/mode/sqlserver",n(26979)),ace.config.setModuleUrl("ace/mode/stylus",n(7945)),ace.config.setModuleUrl("ace/mode/svg",n(7857)),ace.config.setModuleUrl("ace/mode/swift",n(94928)),ace.config.setModuleUrl("ace/mode/tcl",n(35545)),ace.config.setModuleUrl("ace/mode/terraform",n(4806)),ace.config.setModuleUrl("ace/mode/tex",n(50965)),ace.config.setModuleUrl("ace/mode/text",n(58322)),ace.config.setModuleUrl("ace/mode/textile",n(16626)),ace.config.setModuleUrl("ace/mode/toml",n(72363)),ace.config.setModuleUrl("ace/mode/tsx",n(53930)),ace.config.setModuleUrl("ace/mode/turtle",n(64205)),ace.config.setModuleUrl("ace/mode/twig",n(58488)),ace.config.setModuleUrl("ace/mode/typescript",n(61947)),ace.config.setModuleUrl("ace/mode/vala",n(99897)),ace.config.setModuleUrl("ace/mode/vbscript",n(46405)),ace.config.setModuleUrl("ace/mode/velocity",n(45794)),ace.config.setModuleUrl("ace/mode/verilog",n(89010)),ace.config.setModuleUrl("ace/mode/vhdl",n(7535)),ace.config.setModuleUrl("ace/mode/visualforce",n(27109)),ace.config.setModuleUrl("ace/mode/wollok",n(69601)),ace.config.setModuleUrl("ace/mode/xml",n(13889)),ace.config.setModuleUrl("ace/mode/xquery",n(42317)),ace.config.setModuleUrl("ace/mode/yaml",n(80577)),ace.config.setModuleUrl("ace/mode/zeek",n(37154)),ace.config.setModuleUrl("ace/theme/ambiance",n(29274)),ace.config.setModuleUrl("ace/theme/chaos",n(19647)),ace.config.setModuleUrl("ace/theme/chrome",n(82434)),ace.config.setModuleUrl("ace/theme/cloud9_day",n(48025)),ace.config.setModuleUrl("ace/theme/cloud9_night",n(85429)),ace.config.setModuleUrl("ace/theme/cloud9_night_low_color",n(5091)),ace.config.setModuleUrl("ace/theme/clouds",n(82776)),ace.config.setModuleUrl("ace/theme/clouds_midnight",n(98557)),ace.config.setModuleUrl("ace/theme/cobalt",n(37479)),ace.config.setModuleUrl("ace/theme/crimson_editor",n(99204)),ace.config.setModuleUrl("ace/theme/dawn",n(77877)),ace.config.setModuleUrl("ace/theme/dracula",n(35056)),ace.config.setModuleUrl("ace/theme/dreamweaver",n(64262)),ace.config.setModuleUrl("ace/theme/eclipse",n(36529)),ace.config.setModuleUrl("ace/theme/github",n(98437)),ace.config.setModuleUrl("ace/theme/gob",n(7722)),ace.config.setModuleUrl("ace/theme/gruvbox",n(79021)),ace.config.setModuleUrl("ace/theme/gruvbox_dark_hard",n(33245)),ace.config.setModuleUrl("ace/theme/gruvbox_light_hard",n(25996)),ace.config.setModuleUrl("ace/theme/idle_fingers",n(21197)),ace.config.setModuleUrl("ace/theme/iplastic",n(77669)),ace.config.setModuleUrl("ace/theme/katzenmilch",n(37533)),ace.config.setModuleUrl("ace/theme/kr_theme",n(45626)),ace.config.setModuleUrl("ace/theme/kuroir",n(46527)),ace.config.setModuleUrl("ace/theme/merbivore",n(7406)),ace.config.setModuleUrl("ace/theme/merbivore_soft",n(38267)),ace.config.setModuleUrl("ace/theme/mono_industrial",n(8845)),ace.config.setModuleUrl("ace/theme/monokai",n(44834)),ace.config.setModuleUrl("ace/theme/nord_dark",n(95498)),ace.config.setModuleUrl("ace/theme/one_dark",n(9061)),ace.config.setModuleUrl("ace/theme/pastel_on_dark",n(79580)),ace.config.setModuleUrl("ace/theme/solarized_dark",n(51502)),ace.config.setModuleUrl("ace/theme/solarized_light",n(82266)),ace.config.setModuleUrl("ace/theme/sqlserver",n(37779)),ace.config.setModuleUrl("ace/theme/terminal",n(35880)),ace.config.setModuleUrl("ace/theme/textmate",n(36722)),ace.config.setModuleUrl("ace/theme/tomorrow",n(76394)),ace.config.setModuleUrl("ace/theme/tomorrow_night",n(10754)),ace.config.setModuleUrl("ace/theme/tomorrow_night_blue",n(24174)),ace.config.setModuleUrl("ace/theme/tomorrow_night_bright",n(11911)),ace.config.setModuleUrl("ace/theme/tomorrow_night_eighties",n(52334)),ace.config.setModuleUrl("ace/theme/twilight",n(24852)),ace.config.setModuleUrl("ace/theme/vibrant_ink",n(13840)),ace.config.setModuleUrl("ace/theme/xcode",n(44884)),ace.config.setModuleUrl("ace/mode/base_worker",n(74474)),ace.config.setModuleUrl("ace/mode/coffee_worker",n(27067)),ace.config.setModuleUrl("ace/mode/css_worker",n(33948)),ace.config.setModuleUrl("ace/mode/html_worker",n(20425)),ace.config.setModuleUrl("ace/mode/javascript_worker",n(21836)),ace.config.setModuleUrl("ace/mode/json_worker",n(36881)),ace.config.setModuleUrl("ace/mode/lua_worker",n(83439)),ace.config.setModuleUrl("ace/mode/php_worker",n(14984)),ace.config.setModuleUrl("ace/mode/xml_worker",n(52980)),ace.config.setModuleUrl("ace/mode/xquery_worker",n(72426)),ace.config.setModuleUrl("ace/mode/yaml_worker",n(79257)),ace.config.setModuleUrl("ace/snippets/abap",n(26504)),ace.config.setModuleUrl("ace/snippets/abc",n(55240)),ace.config.setModuleUrl("ace/snippets/actionscript",n(66816)),ace.config.setModuleUrl("ace/snippets/ada",n(78332)),ace.config.setModuleUrl("ace/snippets/alda",n(44971)),ace.config.setModuleUrl("ace/snippets/apache_conf",n(41072)),ace.config.setModuleUrl("ace/snippets/apex",n(42820)),ace.config.setModuleUrl("ace/snippets/applescript",n(68089)),ace.config.setModuleUrl("ace/snippets/aql",n(92688)),ace.config.setModuleUrl("ace/snippets/asciidoc",n(92950)),ace.config.setModuleUrl("ace/snippets/asl",n(3092)),ace.config.setModuleUrl("ace/snippets/assembly_x86",n(89780)),ace.config.setModuleUrl("ace/snippets/autohotkey",n(91763)),ace.config.setModuleUrl("ace/snippets/batchfile",n(61743)),ace.config.setModuleUrl("ace/snippets/bibtex",n(99022)),ace.config.setModuleUrl("ace/snippets/c9search",n(52545)),ace.config.setModuleUrl("ace/snippets/c_cpp",n(18396)),ace.config.setModuleUrl("ace/snippets/cirru",n(32343)),ace.config.setModuleUrl("ace/snippets/clojure",n(25860)),ace.config.setModuleUrl("ace/snippets/cobol",n(74623)),ace.config.setModuleUrl("ace/snippets/coffee",n(39037)),ace.config.setModuleUrl("ace/snippets/coldfusion",n(45984)),ace.config.setModuleUrl("ace/snippets/crystal",n(84039)),ace.config.setModuleUrl("ace/snippets/csharp",n(23248)),ace.config.setModuleUrl("ace/snippets/csound_document",n(80428)),ace.config.setModuleUrl("ace/snippets/csound_orchestra",n(55823)),ace.config.setModuleUrl("ace/snippets/csound_score",n(3731)),ace.config.setModuleUrl("ace/snippets/csp",n(26557)),ace.config.setModuleUrl("ace/snippets/css",n(27675)),ace.config.setModuleUrl("ace/snippets/curly",n(63790)),ace.config.setModuleUrl("ace/snippets/d",n(24689)),ace.config.setModuleUrl("ace/snippets/dart",n(22505)),ace.config.setModuleUrl("ace/snippets/diff",n(39822)),ace.config.setModuleUrl("ace/snippets/django",n(67986)),ace.config.setModuleUrl("ace/snippets/dockerfile",n(59212)),ace.config.setModuleUrl("ace/snippets/dot",n(48191)),ace.config.setModuleUrl("ace/snippets/drools",n(7879)),ace.config.setModuleUrl("ace/snippets/edifact",n(53737)),ace.config.setModuleUrl("ace/snippets/eiffel",n(9067)),ace.config.setModuleUrl("ace/snippets/ejs",n(50147)),ace.config.setModuleUrl("ace/snippets/elixir",n(61883)),ace.config.setModuleUrl("ace/snippets/elm",n(38572)),ace.config.setModuleUrl("ace/snippets/erlang",n(54135)),ace.config.setModuleUrl("ace/snippets/forth",n(43174)),ace.config.setModuleUrl("ace/snippets/fortran",n(92539)),ace.config.setModuleUrl("ace/snippets/fsharp",n(55250)),ace.config.setModuleUrl("ace/snippets/fsl",n(70490)),ace.config.setModuleUrl("ace/snippets/ftl",n(51805)),ace.config.setModuleUrl("ace/snippets/gcode",n(66143)),ace.config.setModuleUrl("ace/snippets/gherkin",n(96850)),ace.config.setModuleUrl("ace/snippets/gitignore",n(50957)),ace.config.setModuleUrl("ace/snippets/glsl",n(55154)),ace.config.setModuleUrl("ace/snippets/gobstones",n(61523)),ace.config.setModuleUrl("ace/snippets/golang",n(17480)),ace.config.setModuleUrl("ace/snippets/graphqlschema",n(57570)),ace.config.setModuleUrl("ace/snippets/groovy",n(9179)),ace.config.setModuleUrl("ace/snippets/haml",n(38639)),ace.config.setModuleUrl("ace/snippets/handlebars",n(38096)),ace.config.setModuleUrl("ace/snippets/haskell",n(81889)),ace.config.setModuleUrl("ace/snippets/haskell_cabal",n(19478)),ace.config.setModuleUrl("ace/snippets/haxe",n(56639)),ace.config.setModuleUrl("ace/snippets/hjson",n(46754)),ace.config.setModuleUrl("ace/snippets/html",n(14349)),ace.config.setModuleUrl("ace/snippets/html_elixir",n(57204)),ace.config.setModuleUrl("ace/snippets/html_ruby",n(62473)),ace.config.setModuleUrl("ace/snippets/ini",n(22699)),ace.config.setModuleUrl("ace/snippets/io",n(60380)),ace.config.setModuleUrl("ace/snippets/ion",n(3785)),ace.config.setModuleUrl("ace/snippets/jack",n(56051)),ace.config.setModuleUrl("ace/snippets/jade",n(63795)),ace.config.setModuleUrl("ace/snippets/java",n(21666)),ace.config.setModuleUrl("ace/snippets/javascript",n(96014)),ace.config.setModuleUrl("ace/snippets/jexl",n(24565)),ace.config.setModuleUrl("ace/snippets/json",n(83992)),ace.config.setModuleUrl("ace/snippets/json5",n(17841)),ace.config.setModuleUrl("ace/snippets/jsoniq",n(83129)),ace.config.setModuleUrl("ace/snippets/jsp",n(68025)),ace.config.setModuleUrl("ace/snippets/jssm",n(46087)),ace.config.setModuleUrl("ace/snippets/jsx",n(66818)),ace.config.setModuleUrl("ace/snippets/julia",n(28327)),ace.config.setModuleUrl("ace/snippets/kotlin",n(25009)),ace.config.setModuleUrl("ace/snippets/latex",n(33568)),ace.config.setModuleUrl("ace/snippets/latte",n(71353)),ace.config.setModuleUrl("ace/snippets/less",n(94914)),ace.config.setModuleUrl("ace/snippets/liquid",n(98784)),ace.config.setModuleUrl("ace/snippets/lisp",n(41650)),ace.config.setModuleUrl("ace/snippets/livescript",n(84301)),ace.config.setModuleUrl("ace/snippets/logiql",n(21159)),ace.config.setModuleUrl("ace/snippets/logtalk",n(19900)),ace.config.setModuleUrl("ace/snippets/lsl",n(77584)),ace.config.setModuleUrl("ace/snippets/lua",n(26610)),ace.config.setModuleUrl("ace/snippets/luapage",n(43273)),ace.config.setModuleUrl("ace/snippets/lucene",n(88332)),ace.config.setModuleUrl("ace/snippets/makefile",n(8536)),ace.config.setModuleUrl("ace/snippets/markdown",n(40456)),ace.config.setModuleUrl("ace/snippets/mask",n(13946)),ace.config.setModuleUrl("ace/snippets/matlab",n(53801)),ace.config.setModuleUrl("ace/snippets/maze",n(4977)),ace.config.setModuleUrl("ace/snippets/mediawiki",n(40782)),ace.config.setModuleUrl("ace/snippets/mel",n(56622)),ace.config.setModuleUrl("ace/snippets/mips",n(53899)),ace.config.setModuleUrl("ace/snippets/mixal",n(75072)),ace.config.setModuleUrl("ace/snippets/mushcode",n(28719)),ace.config.setModuleUrl("ace/snippets/mysql",n(50239)),ace.config.setModuleUrl("ace/snippets/nginx",n(45591)),ace.config.setModuleUrl("ace/snippets/nim",n(31053)),ace.config.setModuleUrl("ace/snippets/nix",n(68002)),ace.config.setModuleUrl("ace/snippets/nsis",n(60186)),ace.config.setModuleUrl("ace/snippets/nunjucks",n(8262)),ace.config.setModuleUrl("ace/snippets/objectivec",n(14457)),ace.config.setModuleUrl("ace/snippets/ocaml",n(11506)),ace.config.setModuleUrl("ace/snippets/partiql",n(69287)),ace.config.setModuleUrl("ace/snippets/pascal",n(83935)),ace.config.setModuleUrl("ace/snippets/perl",n(89018)),ace.config.setModuleUrl("ace/snippets/pgsql",n(86066)),ace.config.setModuleUrl("ace/snippets/php",n(6132)),ace.config.setModuleUrl("ace/snippets/php_laravel_blade",n(64543)),ace.config.setModuleUrl("ace/snippets/pig",n(11105)),ace.config.setModuleUrl("ace/snippets/plain_text",n(55873)),ace.config.setModuleUrl("ace/snippets/powershell",n(6214)),ace.config.setModuleUrl("ace/snippets/praat",n(82730)),ace.config.setModuleUrl("ace/snippets/prisma",n(60835)),ace.config.setModuleUrl("ace/snippets/prolog",n(80682)),ace.config.setModuleUrl("ace/snippets/properties",n(22554)),ace.config.setModuleUrl("ace/snippets/protobuf",n(39444)),ace.config.setModuleUrl("ace/snippets/puppet",n(58157)),ace.config.setModuleUrl("ace/snippets/python",n(87223)),ace.config.setModuleUrl("ace/snippets/qml",n(94257)),ace.config.setModuleUrl("ace/snippets/r",n(48119)),ace.config.setModuleUrl("ace/snippets/raku",n(19949)),ace.config.setModuleUrl("ace/snippets/razor",n(16048)),ace.config.setModuleUrl("ace/snippets/rdoc",n(82453)),ace.config.setModuleUrl("ace/snippets/red",n(43448)),ace.config.setModuleUrl("ace/snippets/redshift",n(15186)),ace.config.setModuleUrl("ace/snippets/rhtml",n(88298)),ace.config.setModuleUrl("ace/snippets/robot",n(28661)),ace.config.setModuleUrl("ace/snippets/rst",n(51573)),ace.config.setModuleUrl("ace/snippets/ruby",n(1602)),ace.config.setModuleUrl("ace/snippets/rust",n(94334)),ace.config.setModuleUrl("ace/snippets/sac",n(18999)),ace.config.setModuleUrl("ace/snippets/sass",n(8225)),ace.config.setModuleUrl("ace/snippets/scad",n(72551)),ace.config.setModuleUrl("ace/snippets/scala",n(81545)),ace.config.setModuleUrl("ace/snippets/scheme",n(61005)),ace.config.setModuleUrl("ace/snippets/scrypt",n(47544)),ace.config.setModuleUrl("ace/snippets/scss",n(79202)),ace.config.setModuleUrl("ace/snippets/sh",n(9032)),ace.config.setModuleUrl("ace/snippets/sjs",n(32257)),ace.config.setModuleUrl("ace/snippets/slim",n(98051)),ace.config.setModuleUrl("ace/snippets/smarty",n(87393)),ace.config.setModuleUrl("ace/snippets/smithy",n(66154)),ace.config.setModuleUrl("ace/snippets/snippets",n(49495)),ace.config.setModuleUrl("ace/snippets/soy_template",n(25791)),ace.config.setModuleUrl("ace/snippets/space",n(29601)),ace.config.setModuleUrl("ace/snippets/sparql",n(10920)),ace.config.setModuleUrl("ace/snippets/sql",n(6848)),ace.config.setModuleUrl("ace/snippets/sqlserver",n(84980)),ace.config.setModuleUrl("ace/snippets/stylus",n(22147)),ace.config.setModuleUrl("ace/snippets/svg",n(17250)),ace.config.setModuleUrl("ace/snippets/swift",n(10655)),ace.config.setModuleUrl("ace/snippets/tcl",n(52854)),ace.config.setModuleUrl("ace/snippets/terraform",n(87161)),ace.config.setModuleUrl("ace/snippets/tex",n(28337)),ace.config.setModuleUrl("ace/snippets/text",n(83564)),ace.config.setModuleUrl("ace/snippets/textile",n(80673)),ace.config.setModuleUrl("ace/snippets/toml",n(74944)),ace.config.setModuleUrl("ace/snippets/tsx",n(32167)),ace.config.setModuleUrl("ace/snippets/turtle",n(69459)),ace.config.setModuleUrl("ace/snippets/twig",n(68967)),ace.config.setModuleUrl("ace/snippets/typescript",n(48052)),ace.config.setModuleUrl("ace/snippets/vala",n(24675)),ace.config.setModuleUrl("ace/snippets/vbscript",n(33118)),ace.config.setModuleUrl("ace/snippets/velocity",n(54173)),ace.config.setModuleUrl("ace/snippets/verilog",n(90283)),ace.config.setModuleUrl("ace/snippets/vhdl",n(52785)),ace.config.setModuleUrl("ace/snippets/visualforce",n(63104)),ace.config.setModuleUrl("ace/snippets/wollok",n(62061)),ace.config.setModuleUrl("ace/snippets/xml",n(87872)),ace.config.setModuleUrl("ace/snippets/xquery",n(49873)),ace.config.setModuleUrl("ace/snippets/yaml",n(10172)),ace.config.setModuleUrl("ace/snippets/zeek",n(44206))},87421:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(87537),r=n.n(i),o=n(23645),s=n.n(o)()(r());s.push([e.id,".-esm-form-builder__ohri-obs-group__flexColumn___JVcYD{display:flex;flex-direction:column;margin-right:2.5rem;flex:1}.-esm-form-builder__ohri-obs-group__flexRow___EVOsO{display:flex;flex-direction:row;flex-wrap:wrap;width:100%}.-esm-form-builder__ohri-obs-group__obsGroupColumn___uUbRB{max-width:18rem}.-esm-form-builder__ohri-obs-group__obsGroupColumn___uUbRB input[class*=cds--date-picker__input]{width:18rem !important}.-esm-form-builder__ohri-obs-group__obsGroupColumn___uUbRB>div,.-esm-form-builder__ohri-obs-group__obsGroupColumn___uUbRB div[class*=cds--number]{margin-top:0 !important}.-esm-form-builder__ohri-obs-group__obsGroupColumn___uUbRB>div>div>div{max-width:18rem !important}.-esm-form-builder__ohri-obs-group__obsGroupColumn___uUbRB>div>div>div>div{max-width:18rem !important}","",{version:3,sources:["webpack://./node_modules/@openmrs/openmrs-form-engine-lib/src/components/group/ohri-obs-group.scss"],names:[],mappings:"AAAA,uDACE,YAAA,CACA,qBAAA,CACA,mBAAA,CACA,MAAA,CAGF,oDACE,YAAA,CACA,kBAAA,CACA,cAAA,CACA,UAAA,CAGF,2DACE,eAAA,CAGF,iGACE,sBAAA,CAGF,kJACE,uBAAA,CAIF,uEACE,0BAAA,CAIF,2EACE,0BAAA",sourceRoot:""}]),s.locals={flexColumn:"-esm-form-builder__ohri-obs-group__flexColumn___JVcYD",flexRow:"-esm-form-builder__ohri-obs-group__flexRow___EVOsO",obsGroupColumn:"-esm-form-builder__ohri-obs-group__obsGroupColumn___uUbRB"};const a=s},14893:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(87537),r=n.n(i),o=n(23645),s=n.n(o)()(r());s.push([e.id,".-esm-form-builder__ohri-content-switcher__formField____1mmu{margin-top:.625rem}.-esm-form-builder__ohri-content-switcher__formField____1mmu>div>div>label{color:#525252}.-esm-form-builder__ohri-content-switcher__textContainer___geZGE label{font-size:.875rem !important}.-esm-form-builder__ohri-content-switcher__errorLegend___WWdcY legend,.-esm-form-builder__ohri-content-switcher__errorLabel___QaAwN label{color:#da1e28 !important}.-esm-form-builder__ohri-content-switcher__selectedOption___jZidr{border-radius:4px;width:15rem}.-esm-form-builder__ohri-content-switcher__selectedOption___jZidr button{background-color:#f4f4f4}.-esm-form-builder__ohri-content-switcher__selectedOption___jZidr button:before{display:none !important}.-esm-form-builder__ohri-content-switcher__switchOverrides___Lu4H0{background-color:#edf5ff !important;border:1px solid #0f62fe !important;color:#0f62fe !important;padding:0 0 0 1rem}.-esm-form-builder__ohri-content-switcher__switchOverrides___Lu4H0 button:focus{border:none !important}.-esm-form-builder__ohri-content-switcher__sansSwitchOverrides___bARXC{border:solid 1px #a6c8ff !important;background-color:#f4f4f4 !important;padding:0 0 0 1rem}","",{version:3,sources:["webpack://./node_modules/@openmrs/openmrs-form-engine-lib/src/components/inputs/content-switcher/ohri-content-switcher.scss","webpack://./node_modules/@carbon/colors/index.scss"],names:[],mappings:"AAEA,6DACE,kBAAA,CAGF,2EACE,aCyCQ,CDrCR,uEACE,4BAAA,CAIJ,0IACE,wBAAA,CAGF,kEACE,iBAAA,CACA,WAAA,CAEA,yEACC,wBCiBO,CDfP,gFACE,uBAAA,CAKL,mEACE,mCAAA,CACA,mCAAA,CACA,wBAAA,CACA,kBAAA,CAEA,gFACE,sBAAA,CAIJ,uEACE,mCAAA,CACA,mCAAA,CACA,kBAAA",sourceRoot:""}]),s.locals={formField:"-esm-form-builder__ohri-content-switcher__formField____1mmu",textContainer:"-esm-form-builder__ohri-content-switcher__textContainer___geZGE",errorLegend:"-esm-form-builder__ohri-content-switcher__errorLegend___WWdcY",errorLabel:"-esm-form-builder__ohri-content-switcher__errorLabel___QaAwN",selectedOption:"-esm-form-builder__ohri-content-switcher__selectedOption___jZidr",switchOverrides:"-esm-form-builder__ohri-content-switcher__switchOverrides___Lu4H0",sansSwitchOverrides:"-esm-form-builder__ohri-content-switcher__sansSwitchOverrides___bARXC"};const a=s},91850:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(87537),r=n.n(i),o=n(23645),s=n.n(o)()(r());s.push([e.id,".-esm-form-builder__ohri-date__datetime___IQnq6>div{flex:none !important;box-sizing:content-box !important}.-esm-form-builder__ohri-date__datePickerOverrides___YvsVu input{width:22.313rem !important}.-esm-form-builder__ohri-date__disabled___cF_T9 label{color:#525252 !important}.-esm-form-builder__ohri-date__errorLabel___QhJX4 label{color:#da1e28 !important}.-esm-form-builder__ohri-date__formField___ptMVo .bx--time-picker__input-field{width:auto;margin-left:5rem}.-esm-form-builder__ohri-date__formField___ptMVo .bx--label--disabled{margin-left:5rem}.-esm-form-builder__ohri-date__timePicker___pypOy{width:6.57rem;padding-left:.2rem}.-esm-form-builder__ohri-date__row___K2POt{display:flex;flex-direction:row;align-items:baseline}","",{version:3,sources:["webpack://./node_modules/@openmrs/openmrs-form-engine-lib/src/components/inputs/date/ohri-date.scss"],names:[],mappings:"AAEA,oDACE,oBAAA,CACA,iCAAA,CAGF,iEACE,0BAAA,CAGF,sDACE,wBAAA,CAGF,wDACE,wBAAA,CAGF,+EACE,UAAA,CACA,gBAAA,CAGF,sEACE,gBAAA,CAEF,kDACE,aAAA,CACA,kBAAA,CAGF,2CACE,YAAA,CACA,kBAAA,CACA,oBAAA",sourceRoot:""}]),s.locals={datetime:"-esm-form-builder__ohri-date__datetime___IQnq6",datePickerOverrides:"-esm-form-builder__ohri-date__datePickerOverrides___YvsVu",disabled:"-esm-form-builder__ohri-date__disabled___cF_T9",errorLabel:"-esm-form-builder__ohri-date__errorLabel___QhJX4",formField:"-esm-form-builder__ohri-date__formField___ptMVo",timePicker:"-esm-form-builder__ohri-date__timePicker___pypOy",row:"-esm-form-builder__ohri-date__row___K2POt"};const a=s},25123:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(87537),r=n.n(i),o=n(23645),s=n.n(o)()(r());s.push([e.id,".-esm-form-builder__ohri-encounter-location__formField___zMCeM,.-esm-form-builder__ohri-encounter-location__formInputField___JBEqx{margin-top:10px}.-esm-form-builder__ohri-encounter-location__formField___zMCeM>div>div>label,.-esm-form-builder__ohri-encounter-location__formInputField___JBEqx>div>div>label{color:#525252}.-esm-form-builder__ohri-encounter-location__formInputField___JBEqx{width:auto}.-esm-form-builder__ohri-encounter-location__formInputField___JBEqx>div>div>label{max-width:auto}.-esm-form-builder__ohri-encounter-location__formInputField___JBEqx>div>div>div{width:22.313rem !important}.-esm-form-builder__ohri-encounter-location__flexRow___usT8y{display:flex;flex-direction:row;flex-wrap:wrap;width:100%}.-esm-form-builder__ohri-encounter-location__multiselectOverride___I4cxe{width:auto;padding-bottom:15px}.-esm-form-builder__ohri-encounter-location__multiselectOverride___I4cxe>div>div{width:22.313rem !important}.-esm-form-builder__ohri-encounter-location__multiselectOverride___I4cxe>div div div input{border:0 !important;border-bottom:1px solid #8d8d8d !important}","",{version:3,sources:["webpack://./node_modules/@openmrs/openmrs-form-engine-lib/src/components/inputs/location/ohri-encounter-location.scss","webpack://./node_modules/@carbon/colors/index.scss"],names:[],mappings:"AAEA,mIACE,eAAA,CAGF,+JACE,aCyCQ,CDtCV,oEAEE,UAAA,CAEA,kFACE,cAAA,CAGF,gFACE,0BAAA,CAIJ,6DACE,YAAA,CACA,kBAAA,CACA,cAAA,CACA,UAAA,CAGF,yEACE,UAAA,CACA,mBAAA,CAGF,iFACE,0BAAA,CAGF,2FACE,mBAAA,CACA,0CAAA",sourceRoot:""}]),s.locals={formField:"-esm-form-builder__ohri-encounter-location__formField___zMCeM",formInputField:"-esm-form-builder__ohri-encounter-location__formInputField___JBEqx",flexRow:"-esm-form-builder__ohri-encounter-location__flexRow___usT8y",multiselectOverride:"-esm-form-builder__ohri-encounter-location__multiselectOverride___I4cxe"};const a=s},35508:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(87537),r=n.n(i),o=n(23645),s=n.n(o)()(r());s.push([e.id,'.-esm-form-builder__ohri-multi-select__formField___a2WqE{margin-top:10px}.-esm-form-builder__ohri-multi-select__formField___a2WqE>div>div>label{color:#525252}.-esm-form-builder__ohri-multi-select__multiselectOverride___C2y6g{width:auto;padding-bottom:15px}.-esm-form-builder__ohri-multi-select__multiselectOverride___C2y6g>div>div{width:22.313rem !important}.-esm-form-builder__ohri-multi-select__multiselectOverride___C2y6g>div div div input{border:0 !important;border-bottom:1px solid #8d8d8d !important}.-esm-form-builder__ohri-multi-select__errorLabel___wMpTR label{color:#da1e28}.-esm-form-builder__ohri-multi-select__list___mCHup{margin-left:"1rem"}',"",{version:3,sources:["webpack://./node_modules/@openmrs/openmrs-form-engine-lib/src/components/inputs/multi-select/ohri-multi-select.scss","webpack://./node_modules/@carbon/colors/index.scss"],names:[],mappings:"AAEA,yDACE,eAAA,CAGF,uEACE,aCyCQ,CDtCV,mEACE,UAAA,CACA,mBAAA,CAGF,2EACE,0BAAA,CAGF,qFACE,mBAAA,CACA,0CAAA,CAGF,gEACE,aCwEO,CDrET,oDACE,kBAAA",sourceRoot:""}]),s.locals={formField:"-esm-form-builder__ohri-multi-select__formField___a2WqE",multiselectOverride:"-esm-form-builder__ohri-multi-select__multiselectOverride___C2y6g",errorLabel:"-esm-form-builder__ohri-multi-select__errorLabel___wMpTR",list:"-esm-form-builder__ohri-multi-select__list___mCHup"};const a=s},9592:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(87537),r=n.n(i),o=n(23645),s=n.n(o)()(r());s.push([e.id,".-esm-form-builder__ohri-number__formField___WwVyG,.-esm-form-builder__ohri-number__numberInputWrapper___hYJc5 .cds--number{margin-top:10px}.-esm-form-builder__ohri-number__formField___WwVyG>div>div>label,.-esm-form-builder__ohri-number__numberInputWrapper___hYJc5 .cds--number>div>div>label{color:#525252}.-esm-form-builder__ohri-number__numberInputWrapper___hYJc5 .cds--number{width:22.313rem;font-size:.875rem}.-esm-form-builder__ohri-number__row___h69AF{display:flex;flex-direction:row;align-items:baseline}.-esm-form-builder__ohri-number__errorLabel___mvtO3 label{color:#da1e28}","",{version:3,sources:["webpack://./node_modules/@openmrs/openmrs-form-engine-lib/src/components/inputs/number/ohri-number.scss","webpack://./node_modules/@carbon/colors/index.scss"],names:[],mappings:"AAEA,4HACE,eAAA,CAGF,wJACE,aCyCQ,CDtCV,yEAEE,eAAA,CACA,iBAAA,CAGF,6CACE,YAAA,CACA,kBAAA,CACA,oBAAA,CAGF,0DACE,aC0EO",sourceRoot:""}]),s.locals={formField:"-esm-form-builder__ohri-number__formField___WwVyG",numberInputWrapper:"-esm-form-builder__ohri-number__numberInputWrapper___hYJc5",row:"-esm-form-builder__ohri-number__row___h69AF",errorLabel:"-esm-form-builder__ohri-number__errorLabel___mvtO3"};const a=s},66168:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(87537),r=n.n(i),o=n(23645),s=n.n(o)()(r());s.push([e.id,".-esm-form-builder__ohri-radio__formField___TJhLV{margin-top:10px}.-esm-form-builder__ohri-radio__formField___TJhLV>div>div>label{color:#525252}.-esm-form-builder__ohri-radio__row___hgPco{display:flex;flex-direction:row;align-items:center}.-esm-form-builder__ohri-radio__errorLabel___vju38 .cds--form-requirement{display:block;max-height:12.5rem;overflow:visible;font-weight:400;color:#da1e28}.-esm-form-builder__ohri-radio__errorLegend___2DfpY legend{color:#da1e28 !important}.-esm-form-builder__ohri-radio__warningLabel___dJNGl .cds--form-requirement{display:block;max-height:12.5rem;overflow:visible;font-weight:400;color:#525252}","",{version:3,sources:["webpack://./node_modules/@openmrs/openmrs-form-engine-lib/src/components/inputs/radio/ohri-radio.scss","webpack://./node_modules/@carbon/colors/index.scss"],names:[],mappings:"AAEA,kDACE,eAAA,CAGF,gEACE,aCyCQ,CDtCV,4CACE,YAAA,CACA,kBAAA,CACA,kBAAA,CAGF,0EACE,aAAA,CACA,kBAAA,CACA,gBAAA,CACA,eAAA,CACA,aC4EO,CDzET,2DACE,wBAAA,CAGF,4EACE,aAAA,CACA,kBAAA,CACA,gBAAA,CACA,eAAA,CACA,aCeQ",sourceRoot:""}]),s.locals={formField:"-esm-form-builder__ohri-radio__formField___TJhLV",row:"-esm-form-builder__ohri-radio__row___hgPco",errorLabel:"-esm-form-builder__ohri-radio__errorLabel___vju38",errorLegend:"-esm-form-builder__ohri-radio__errorLegend___2DfpY",warningLabel:"-esm-form-builder__ohri-radio__warningLabel___dJNGl"};const a=s},1943:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(87537),r=n.n(i),o=n(23645),s=n.n(o)()(r());s.push([e.id,".-esm-form-builder__ohri-dropdown__formField___s7Ka0,.-esm-form-builder__ohri-dropdown__formInputField___yuJep{margin-top:10px}.-esm-form-builder__ohri-dropdown__formField___s7Ka0>div>div>label,.-esm-form-builder__ohri-dropdown__formInputField___yuJep>div>div>label{color:#525252}.-esm-form-builder__ohri-dropdown__formInputField___yuJep{width:auto}.-esm-form-builder__ohri-dropdown__formInputField___yuJep>div>div>label{max-width:auto}.-esm-form-builder__ohri-dropdown__formInputField___yuJep>div>div>div{width:22.313rem !important}.-esm-form-builder__ohri-dropdown__row___TqeJ7{display:flex;flex-direction:row;align-items:baseline}.-esm-form-builder__ohri-dropdown__errorLabel___kwUjk label{color:#da1e28 !important}.-esm-form-builder__ohri-dropdown__dropdown___VDKDG>div div button{border-bottom:1px solid #8d8d8d !important}","",{version:3,sources:["webpack://./node_modules/@openmrs/openmrs-form-engine-lib/src/components/inputs/select/ohri-dropdown.scss","webpack://./node_modules/@carbon/colors/index.scss"],names:[],mappings:"AAEA,+GACE,eAAA,CAGF,2IACE,aCyCQ,CDtCV,0DAEE,UAAA,CAEA,wEACE,cAAA,CAGF,sEACE,0BAAA,CAGJ,+CACE,YAAA,CACA,kBAAA,CACA,oBAAA,CAGF,4DACE,wBAAA,CAGF,mEACE,0CAAA",sourceRoot:""}]),s.locals={formField:"-esm-form-builder__ohri-dropdown__formField___s7Ka0",formInputField:"-esm-form-builder__ohri-dropdown__formInputField___yuJep",row:"-esm-form-builder__ohri-dropdown__row___TqeJ7",errorLabel:"-esm-form-builder__ohri-dropdown__errorLabel___kwUjk",dropdown:"-esm-form-builder__ohri-dropdown__dropdown___VDKDG"};const a=s},53162:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(87537),r=n.n(i),o=n(23645),s=n.n(o)()(r());s.push([e.id,".-esm-form-builder__ohri-text-area__textInputOverrides___ci1ne>div>div{width:22.313rem}.-esm-form-builder__ohri-text-area__errorLabel___de7hv label{color:#da1e28 !important}.-esm-form-builder__ohri-text-area__formField___p6sqf{margin-top:10px}.-esm-form-builder__ohri-text-area__formField___p6sqf>div>div>label{color:#525252}","",{version:3,sources:["webpack://./node_modules/@openmrs/openmrs-form-engine-lib/src/components/inputs/text-area/ohri-text-area.scss","webpack://./node_modules/@carbon/colors/index.scss"],names:[],mappings:"AAEA,uEACE,eAAA,CAGF,6DACE,wBAAA,CAGF,sDACE,eAAA,CAGF,oEACE,aCiCQ",sourceRoot:""}]),s.locals={textInputOverrides:"-esm-form-builder__ohri-text-area__textInputOverrides___ci1ne",errorLabel:"-esm-form-builder__ohri-text-area__errorLabel___de7hv",formField:"-esm-form-builder__ohri-text-area__formField___p6sqf"};const a=s},39891:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(87537),r=n.n(i),o=n(23645),s=n.n(o)()(r());s.push([e.id,".-esm-form-builder__ohri-text__formField___yVOKF{margin-top:10px}.-esm-form-builder__ohri-text__formField___yVOKF>div>div>label{color:#525252}.-esm-form-builder__ohri-text__row___PndHa{display:flex;flex-direction:row;align-items:baseline}.-esm-form-builder__ohri-text__textInputOverrides___GTSpQ>div>div{width:22.313rem}.-esm-form-builder__ohri-text__errorLabel___oH8vr label{color:#da1e28 !important}","",{version:3,sources:["webpack://./node_modules/@openmrs/openmrs-form-engine-lib/src/components/inputs/text/ohri-text.scss","webpack://./node_modules/@carbon/colors/index.scss"],names:[],mappings:"AAEA,iDACE,eAAA,CAGF,+DACE,aCyCQ,CDtCV,2CACE,YAAA,CACA,kBAAA,CACA,oBAAA,CAGF,kEACE,eAAA,CAGF,wDACE,wBAAA",sourceRoot:""}]),s.locals={formField:"-esm-form-builder__ohri-text__formField___yVOKF",row:"-esm-form-builder__ohri-text__row___PndHa",textInputOverrides:"-esm-form-builder__ohri-text__textInputOverrides___GTSpQ",errorLabel:"-esm-form-builder__ohri-text__errorLabel___oH8vr"};const a=s},44491:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(87537),r=n.n(i),o=n(23645),s=n.n(o)()(r());s.push([e.id,".-esm-form-builder__ohri-toggle__formField___GmqAk{margin-top:10px}.-esm-form-builder__ohri-toggle__formField___GmqAk>div>div>label{color:#525252}","",{version:3,sources:["webpack://./node_modules/@openmrs/openmrs-form-engine-lib/src/components/inputs/toggle/ohri-toggle.scss","webpack://./node_modules/@carbon/colors/index.scss"],names:[],mappings:"AAEA,mDACE,eAAA,CAGF,iEACE,aCyCQ",sourceRoot:""}]),s.locals={formField:"-esm-form-builder__ohri-toggle__formField___GmqAk"};const a=s},62416:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(87537),r=n.n(i),o=n(23645),s=n.n(o)()(r());s.push([e.id,".-esm-form-builder__ohri-unspecified__unspecified___htLwq>div label{font-size:12px;color:#525252;padding-bottom:1rem}","",{version:3,sources:["webpack://./node_modules/@openmrs/openmrs-form-engine-lib/src/components/inputs/unspecified/ohri-unspecified.scss","webpack://./node_modules/@carbon/colors/index.scss"],names:[],mappings:"AAEA,oEACE,cAAA,CACA,aC4CQ,CD3CR,mBAAA",sourceRoot:""}]),s.locals={unspecified:"-esm-form-builder__ohri-unspecified__unspecified___htLwq"};const a=s},14018:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(87537),r=n.n(i),o=n(23645),s=n.n(o)()(r());s.push([e.id,".-esm-form-builder__ohri-label__label___XS0tg{width:auto !important}.-esm-form-builder__ohri-label__label___XS0tg .cds--assistive-text{max-width:30rem !important;font-size:.75rem;white-space:pre-line !important}.-esm-form-builder__ohri-label__label___XS0tg .cds--label{font-weight:bolder}","",{version:3,sources:["webpack://./node_modules/@openmrs/openmrs-form-engine-lib/src/components/label/ohri-label.scss"],names:[],mappings:"AACA,8CACE,qBAAA,CAEA,mEACE,0BAAA,CACA,gBAAA,CACA,+BAAA,CAGF,0DACE,kBAAA",sourceRoot:""}]),s.locals={label:"-esm-form-builder__ohri-label__label___XS0tg"};const a=s},53540:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(87537),r=n.n(i),o=n(23645),s=n.n(o)()(r());s.push([e.id,'.-esm-form-builder__linear-loader__linearActivity___GkfeQ{overflow:hidden;width:100%;height:4px;background-color:var(--brand-03);margin-top:0px}.-esm-form-builder__linear-loader__determinate___fzhk9{position:relative;max-width:100%;height:100%;-webkit-transition:width 500ms ease-out 1s;-moz-transition:width 500ms ease-out 1s;-o-transition:width 500ms ease-out 1s;transition:width 500ms ease-out 1s;background-color:var(--brand-02)}.-esm-form-builder__linear-loader__indeterminate___nms4d{position:relative;width:100%;height:100%}.-esm-form-builder__linear-loader__indeterminate___nms4d:before{content:"";position:absolute;height:100%;background-color:var(--brand-02);animation:-esm-form-builder__linear-loader__indeterminate_first___Sa5cF 2.5s infinite ease-out}.-esm-form-builder__linear-loader__indeterminate___nms4d:after{content:"";position:absolute;height:100%;background-color:var(--brand-01);animation:-esm-form-builder__linear-loader__indeterminate_second___YdRgo 2.5s infinite ease-in}@keyframes -esm-form-builder__linear-loader__indeterminate_first___Sa5cF{0%{left:-100%;width:100%}100%{left:100%;width:10%}}@keyframes -esm-form-builder__linear-loader__indeterminate_second___YdRgo{0%{left:-150%;width:100%}100%{left:100%;width:10%}}',"",{version:3,sources:["webpack://./node_modules/@openmrs/openmrs-form-engine-lib/src/components/loaders/linear-loader.scss"],names:[],mappings:"AAAA,0DACC,eAAA,CACA,UAAA,CACA,UAAA,CACA,gCAAA,CACA,cAAA,CAGD,uDACC,iBAAA,CACA,cAAA,CACA,WAAA,CACA,0CAAA,CACA,uCAAA,CACA,qCAAA,CACA,kCAAA,CACA,gCAAA,CAGD,yDACC,iBAAA,CACA,UAAA,CACA,WAAA,CAGD,gEACC,UAAA,CACA,iBAAA,CACA,WAAA,CACA,gCAAA,CACA,8FAAA,CAGD,+DACC,UAAA,CACA,iBAAA,CACA,WAAA,CACA,gCAAA,CACA,8FAAA,CAGD,yEACC,GACC,UAAA,CACA,UAAA,CAED,KACC,SAAA,CACA,SAAA,CAAA,CAIF,0EACC,GACC,UAAA,CACA,UAAA,CAED,KACC,SAAA,CACA,SAAA,CAAA",sourceRoot:""}]),s.locals={linearActivity:"-esm-form-builder__linear-loader__linearActivity___GkfeQ",determinate:"-esm-form-builder__linear-loader__determinate___fzhk9",indeterminate:"-esm-form-builder__linear-loader__indeterminate___nms4d",indeterminate_first:"-esm-form-builder__linear-loader__indeterminate_first___Sa5cF",indeterminate_second:"-esm-form-builder__linear-loader__indeterminate_second___YdRgo"};const a=s},19714:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(87537),r=n.n(i),o=n(23645),s=n.n(o)()(r());s.push([e.id,".-esm-form-builder__loading__centerLoadingSVG___XVNCz{display:flex;width:100vw;height:100vh;justify-content:center;align-items:center}","",{version:3,sources:["webpack://./node_modules/@openmrs/openmrs-form-engine-lib/src/components/loaders/loading.scss"],names:[],mappings:"AAAA,sDACE,YAAA,CACA,WAAA,CACA,YAAA,CACA,sBAAA,CACA,kBAAA",sourceRoot:""}]),s.locals={centerLoadingSVG:"-esm-form-builder__loading__centerLoadingSVG___XVNCz"};const a=s},3210:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(87537),r=n.n(i),o=n(23645),s=n.n(o)()(r());s.push([e.id,".-esm-form-builder__ohri-form-page__divider___hM2dm{background-color:rgba(107,104,104,.5);margin:25px 0}.-esm-form-builder__ohri-form-page__pageContent___MA2cC:last-child>hr{display:none}.-esm-form-builder__ohri-form-page__pageHeader___gRicT{display:flex;flex-direction:row;margin:.5rem 1rem}.-esm-form-builder__ohri-form-page__pageTitle___ULWs1{font-size:1.25rem;font-weight:600;line-height:1.4;color:#161616;width:100%}.-esm-form-builder__ohri-form-page__required___E9Rsu{margin:.25rem 27rem .5rem 0;font-size:.875rem;line-height:1.29;letter-spacing:.16px;color:#525252;width:100%}.-esm-form-builder__ohri-form-page__formSection___DQghF{flex:1 1 65%}.-esm-form-builder__ohri-form-page__formSection___DQghF>div>fieldset{margin-bottom:0 !important}.-esm-form-builder__ohri-form-page__collapseToggle___YRCmP{margin-Left:-180px;margin-bottom:20px;margin-top:-10px}.-esm-form-builder__ohri-form-page__sectionContent___fW_BX>div{background-color:#f4f4f4}.-esm-form-builder__ohri-form-page__formSection___DQghF>div div div input,.-esm-form-builder__ohri-form-page__formSection___DQghF>div div div textarea,.-esm-form-builder__ohri-form-page__formSection___DQghF>div div div dropdown,.-esm-form-builder__ohri-form-page__formSection___DQghF .cds--dropdown button{background-color:#fff !important}@media(min-width: 640px){.cds--accordion__content{padding-right:2rem !important}}","",{version:3,sources:["webpack://./node_modules/@openmrs/openmrs-form-engine-lib/src/components/page/ohri-form-page.scss","webpack://./node_modules/@carbon/colors/index.scss"],names:[],mappings:"AAEA,oDACE,qCAAA,CACA,aAAA,CAGF,sEACE,YAAA,CAGF,uDACE,YAAA,CACA,kBAAA,CACA,iBAAA,CAGF,sDACE,iBAAA,CACA,eAAA,CACA,eAAA,CACA,aC8BS,CD7BT,UAAA,CAGF,qDACE,2BAAA,CACA,iBAAA,CACA,gBAAA,CACA,oBAAA,CACA,aCkBQ,CDjBR,UAAA,CAGF,wDACE,YAAA,CAGF,qEACE,0BAAA,CAGF,2DACE,kBAAA,CACA,kBAAA,CACA,gBAAA,CAGF,+DACE,wBCPQ,CDUV,kTAIE,gCAAA,CAGF,yBACE,yBACE,6BAAA,CAAA",sourceRoot:""}]),s.locals={divider:"-esm-form-builder__ohri-form-page__divider___hM2dm",pageContent:"-esm-form-builder__ohri-form-page__pageContent___MA2cC",pageHeader:"-esm-form-builder__ohri-form-page__pageHeader___gRicT",pageTitle:"-esm-form-builder__ohri-form-page__pageTitle___ULWs1",required:"-esm-form-builder__ohri-form-page__required___E9Rsu",formSection:"-esm-form-builder__ohri-form-page__formSection___DQghF",collapseToggle:"-esm-form-builder__ohri-form-page__collapseToggle___YRCmP",sectionContent:"-esm-form-builder__ohri-form-page__sectionContent___fW_BX"};const a=s},59428:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(87537),r=n.n(i),o=n(23645),s=n.n(o)()(r());s.push([e.id,".-esm-form-builder__patient-banner__patientBannerContainer___r99qe{display:flex;width:100%;position:sticky;flex-direction:row;align-items:baseline;padding:0}.-esm-form-builder__patient-banner__patientBannerContainer___r99qe>div{width:100%}","",{version:3,sources:["webpack://./node_modules/@openmrs/openmrs-form-engine-lib/src/components/patient-banner/patient-banner.scss"],names:[],mappings:"AAAA,mEACE,YAAA,CACA,UAAA,CACA,eAAA,CACA,kBAAA,CACA,oBAAA,CACA,SAAA,CAGF,uEACE,UAAA",sourceRoot:""}]),s.locals={patientBannerContainer:"-esm-form-builder__patient-banner__patientBannerContainer___r99qe"};const a=s},25581:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(87537),r=n.n(i),o=n(23645),s=n.n(o)()(r());s.push([e.id,".-esm-form-builder__previous-value-review__formField___SID6y{margin-left:2rem;max-width:19rem}.-esm-form-builder__previous-value-review__formField___SID6y>div>div>label{color:#525252}.-esm-form-builder__previous-value-review__row___e5GtS{display:flex;flex-direction:row;align-items:baseline}.-esm-form-builder__previous-value-review__reuseButton___gPowO{margin-left:3rem}","",{version:3,sources:["webpack://./node_modules/@openmrs/openmrs-form-engine-lib/src/components/previous-value-review/previous-value-review.scss","webpack://./node_modules/@carbon/colors/index.scss"],names:[],mappings:"AAEA,6DACE,gBAAA,CACA,eAAA,CAEA,2EACE,aCyCM,CDrCV,uDACE,YAAA,CACA,kBAAA,CACA,oBAAA,CAGF,+DACE,gBAAA",sourceRoot:""}]),s.locals={formField:"-esm-form-builder__previous-value-review__formField___SID6y",row:"-esm-form-builder__previous-value-review__row___e5GtS",reuseButton:"-esm-form-builder__previous-value-review__reuseButton___gPowO"};const a=s},36475:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(87537),r=n.n(i),o=n(23645),s=n.n(o)()(r());s.push([e.id,".-esm-form-builder__ohri-repeat__boldLegend___SZclb>legend{font-weight:bolder}.-esm-form-builder__ohri-repeat__flexColumn___kX35D,.-esm-form-builder__ohri-repeat__removeButton___Zqm_4{display:flex;flex-direction:column;margin-right:2.5rem;flex:1}.-esm-form-builder__ohri-repeat__removeButton___Zqm_4{padding-top:1.2rem;margin-left:.5rem}.-esm-form-builder__ohri-repeat__obsGroupContainer___NKvCf{margin:1rem 0rem}.-esm-form-builder__ohri-repeat__separator___q7dYW{border-top:1px solid #bbb;margin-bottom:2rem;width:85%;float:left}.-esm-form-builder__ohri-repeat__container___wf9vK{margin-top:.65rem;margin-bottom:2rem}","",{version:3,sources:["webpack://./node_modules/@openmrs/openmrs-form-engine-lib/src/components/repeat/ohri-repeat.scss"],names:[],mappings:"AAAA,2DACE,kBAAA,CAGF,0GACE,YAAA,CACA,qBAAA,CACA,mBAAA,CACA,MAAA,CAGF,sDAEE,kBAAA,CACA,iBAAA,CAGF,2DACE,gBAAA,CAGF,mDACE,yBAAA,CACA,kBAAA,CACA,SAAA,CACA,UAAA,CAGF,mDACE,iBAAA,CACA,kBAAA",sourceRoot:""}]),s.locals={boldLegend:"-esm-form-builder__ohri-repeat__boldLegend___SZclb",flexColumn:"-esm-form-builder__ohri-repeat__flexColumn___kX35D",removeButton:"-esm-form-builder__ohri-repeat__removeButton___Zqm_4",obsGroupContainer:"-esm-form-builder__ohri-repeat__obsGroupContainer___NKvCf",separator:"-esm-form-builder__ohri-repeat__separator___q7dYW",container:"-esm-form-builder__ohri-repeat__container___wf9vK"};const a=s},7358:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(87537),r=n.n(i),o=n(23645),s=n.n(o)()(r());s.push([e.id,".-esm-form-builder__ohri-form-section__section___A0nPs{border-radius:solid 1px rgba(107,104,104,.5);margin-bottom:3.063rem}.-esm-form-builder__ohri-form-section__sectionTitle___HjV16{max-width:200px;font-size:1rem;font-weight:600;line-height:1.38;color:#525252;margin-bottom:.5rem}.-esm-form-builder__ohri-form-section__sectionContainer___R6re1{margin-top:1.438rem;width:90%}.-esm-form-builder__ohri-form-section__sectionContainer___R6re1 .cds--fieldset{margin-bottom:0}.-esm-form-builder__ohri-form-section__sectionContainer___R6re1>div{margin-bottom:1rem}.-esm-form-builder__ohri-form-section__sectionContainer___R6re1 .cds--label{text-align:left}","",{version:3,sources:["webpack://./node_modules/@openmrs/openmrs-form-engine-lib/src/components/section/ohri-form-section.scss","webpack://./node_modules/@carbon/colors/index.scss"],names:[],mappings:"AAEA,uDACE,4CAAA,CACA,sBAAA,CAGF,4DACE,eAAA,CACA,cAAA,CACA,eAAA,CACA,gBAAA,CACA,aCoCQ,CDnCR,mBAAA,CAGF,gEACE,mBAAA,CACA,SAAA,CAKF,+EACE,eAAA,CAGF,oEACE,kBAAA,CAGF,4EACE,eAAA",sourceRoot:""}]),s.locals={section:"-esm-form-builder__ohri-form-section__section___A0nPs",sectionTitle:"-esm-form-builder__ohri-form-section__sectionTitle___HjV16",sectionContainer:"-esm-form-builder__ohri-form-section__sectionContainer___R6re1"};const a=s},39855:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(87537),r=n.n(i),o=n(23645),s=n.n(o)()(r());s.push([e.id,".-esm-form-builder__ohri-form-sidebar__sidebar___rxfK9{width:12rem;min-height:8rem;overscroll-behavior:contain;margin-right:1rem}.-esm-form-builder__ohri-form-sidebar__sidebarList___muMFy{max-height:100%}.-esm-form-builder__ohri-form-sidebar__sidenavActions___uBQf8{margin-left:.6rem}@media all and (device-width: 600px)and (device-height: 1024px)and (orientation: portrait){.-esm-form-builder__ohri-form-sidebar__sidebar___rxfK9{width:11rem;max-height:500px;margin-right:20px;position:fixed}.-esm-form-builder__ohri-form-sidebar__sidebarList___muMFy{max-Height:200px;overflow-y:scroll}}.-esm-form-builder__ohri-form-sidebar__link___LYFku{margin:.375rem 0 .375rem .5rem;font-size:1rem;line-height:1.43;letter-spacing:.16px;color:#161616;cursor:pointer}.-esm-form-builder__ohri-form-sidebar__link___LYFku:hover{outline:none}.-esm-form-builder__ohri-form-sidebar__sidebarSection___QmENe,.-esm-form-builder__ohri-form-sidebar__sidebarSectionError___xpqzJ,.-esm-form-builder__ohri-form-sidebar__sidebarSectionDone___Ael3q,.-esm-form-builder__ohri-form-sidebar__sidebarSectionActive___RtkXm{border-left:.5rem solid var(--brand-03);height:2rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:.25rem .5rem;background-color:#fff;cursor:pointer}.-esm-form-builder__ohri-form-sidebar__sidebarSection___QmENe:hover,.-esm-form-builder__ohri-form-sidebar__sidebarSectionError___xpqzJ:hover,.-esm-form-builder__ohri-form-sidebar__sidebarSectionDone___Ael3q:hover,.-esm-form-builder__ohri-form-sidebar__sidebarSectionActive___RtkXm:hover{background-color:#f4f4f4}.-esm-form-builder__ohri-form-sidebar__sidebarSectionActive___RtkXm{font-weight:600;background-color:#e0e0e0}.-esm-form-builder__ohri-form-sidebar__sidebarSectionDone___Ael3q{border-left:.5rem solid var(--brand-02);background-color:#defbe6}.-esm-form-builder__ohri-form-sidebar__sidebarSectionError___xpqzJ{border-left:.5rem solid #da1e28;color:#a2191f !important;background-color:#ffd7d9}.-esm-form-builder__ohri-form-sidebar__sidebarSectionErrorActive___rkwXm{border-left:.5rem solid #da1e28;font-weight:600;color:#a2191f !important;background-color:#ffd7d9}.-esm-form-builder__ohri-form-sidebar__sidebarSectionLink___N1R3m{font-size:.875rem;font-stretch:normal;font-style:normal;line-height:1.43;letter-spacing:.16px;color:#161616}.-esm-form-builder__ohri-form-sidebar__sideBarHorizontalLine___EIsSG{margin-top:1.5rem}","",{version:3,sources:["webpack://./node_modules/@openmrs/openmrs-form-engine-lib/src/components/sidebar/ohri-form-sidebar.scss","webpack://./node_modules/@carbon/colors/index.scss"],names:[],mappings:"AAEA,uDACE,WAAA,CACA,eAAA,CACA,2BAAA,CACA,iBAAA,CAGF,2DACE,eAAA,CAGF,8DACE,iBAAA,CAGF,2FACE,uDACE,WAAA,CACA,gBAAA,CACA,iBAAA,CACA,cAAA,CAGF,2DACE,gBAAA,CACA,iBAAA,CAAA,CAIJ,oDACE,8BAAA,CACA,cAAA,CACA,gBAAA,CACA,oBAAA,CACA,aCeS,CDdT,cAAA,CAEA,0DACE,YAAA,CAIJ,uQACE,uCAAA,CACA,WAAA,CACA,kBAAA,CACA,eAAA,CACA,sBAAA,CACA,oBAAA,CACA,qBCuEQ,CDtER,cAAA,CAEA,+RACE,wBCbM,CDiBV,oEAEE,eAAA,CACA,wBCnBQ,CDsBV,kEAEE,uCAAA,CACA,wBChBS,CDmBX,mEAEE,+BAAA,CACA,wBAAA,CACA,wBCkBO,CDfT,yEACE,+BAAA,CACA,eAAA,CACA,wBAAA,CACA,wBCWO,CDRT,kEACE,iBAAA,CACA,mBAAA,CACA,iBAAA,CACA,gBAAA,CACA,oBAAA,CACA,aCxCS,CD2CX,qEACE,iBAAA",sourceRoot:""}]),s.locals={sidebar:"-esm-form-builder__ohri-form-sidebar__sidebar___rxfK9",sidebarList:"-esm-form-builder__ohri-form-sidebar__sidebarList___muMFy",sidenavActions:"-esm-form-builder__ohri-form-sidebar__sidenavActions___uBQf8",link:"-esm-form-builder__ohri-form-sidebar__link___LYFku",sidebarSection:"-esm-form-builder__ohri-form-sidebar__sidebarSection___QmENe",sidebarSectionError:"-esm-form-builder__ohri-form-sidebar__sidebarSectionError___xpqzJ",sidebarSectionDone:"-esm-form-builder__ohri-form-sidebar__sidebarSectionDone___Ael3q",sidebarSectionActive:"-esm-form-builder__ohri-form-sidebar__sidebarSectionActive___RtkXm",sidebarSectionErrorActive:"-esm-form-builder__ohri-form-sidebar__sidebarSectionErrorActive___rkwXm",sidebarSectionLink:"-esm-form-builder__ohri-form-sidebar__sidebarSectionLink___N1R3m",sideBarHorizontalLine:"-esm-form-builder__ohri-form-sidebar__sideBarHorizontalLine___EIsSG"};const a=s},38388:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(87537),r=n.n(i),o=n(23645),s=n.n(o)()(r());s.push([e.id,".-esm-form-builder__ohri-value__value___GWkBB,.-esm-form-builder__ohri-value__item___spDzw,.-esm-form-builder__ohri-value__empty___l0amb{font-size:.875rem;font-weight:600}.-esm-form-builder__ohri-value__empty___l0amb{color:#c6c6c6}.-esm-form-builder__ohri-value__item___spDzw{margin-bottom:.5rem}","",{version:3,sources:["webpack://./node_modules/@openmrs/openmrs-form-engine-lib/src/components/value/ohri-value.scss","webpack://./node_modules/@carbon/colors/index.scss"],names:[],mappings:"AAEA,yIACE,iBAAA,CACA,eAAA,CAGF,8CAEE,aCmCQ,CDhCV,6CAEE,mBAAA",sourceRoot:""}]),s.locals={value:"-esm-form-builder__ohri-value__value___GWkBB",item:"-esm-form-builder__ohri-value__item___spDzw",empty:"-esm-form-builder__ohri-value__empty___l0amb"};const a=s},93481:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(87537),r=n.n(i),o=n(23645),s=n.n(o)()(r());s.push([e.id,".-esm-form-builder__ohri-field-value-view__formField___zfyY6{margin-top:10px}.-esm-form-builder__ohri-field-value-view__formField___zfyY6>div>div>label{color:#525252}.-esm-form-builder__ohri-field-value-view__readonly___GxZ2l{border-bottom:.5px #c6c6c6;border-style:solid}.-esm-form-builder__ohri-field-value-view__readonly___GxZ2l>div{padding-bottom:7px !important}.-esm-form-builder__ohri-field-value-view__value___czNwR{color:#525252}","",{version:3,sources:["webpack://./node_modules/@openmrs/openmrs-form-engine-lib/src/components/value/view/ohri-field-value-view.scss","webpack://./node_modules/@carbon/colors/index.scss"],names:[],mappings:"AAEA,6DACE,eAAA,CAGF,2EACE,aCyCQ,CDtCV,4DACE,0BAAA,CACA,kBAAA,CAGF,gEACE,6BAAA,CAGF,yDACE,aC4BQ",sourceRoot:""}]),s.locals={formField:"-esm-form-builder__ohri-field-value-view__formField___zfyY6",readonly:"-esm-form-builder__ohri-field-value-view__readonly___GxZ2l",value:"-esm-form-builder__ohri-field-value-view__value___czNwR"};const a=s},83937:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(87537),r=n.n(i),o=n(23645),s=n.n(o)()(r());s.push([e.id,".-esm-form-builder__ohri-form__ohriForm___ffj6r{height:100%;overflow:hidden;flex-grow:1}.-esm-form-builder__ohri-form__ohriFormContainer___pDKKY{display:-webkit-flex;height:100%;overflow-y:hidden;flex-direction:column}.-esm-form-builder__ohri-form__ohriFormBody___TlYni,.-esm-form-builder__ohri-form__loader___QVkQ_{display:-webkit-flex;flex-direction:row;height:100%}.-esm-form-builder__ohri-form__loader___QVkQ_{height:1rem}.-esm-form-builder__ohri-form__ohriFormContainer___pDKKY .cds--label{font-size:.875rem;width:18rem}.-esm-form-builder__ohri-form__formContent___Shu_B{height:calc(100vh - 6rem);margin:0;flex-basis:65%;flex-grow:1;flex-shrink:1;position:relative;overflow-y:hidden;display:flex;flex-direction:column}.-esm-form-builder__ohri-form__formContentBody___KhGka{overflow-y:auto;width:inherit;position:sticky}.-esm-form-builder__ohri-form__minifiedFormContentBody___YpxHU{margin-bottom:3rem !important}.-esm-form-builder__ohri-form__minifiedButtons___JkZB8{width:100%;height:63.5px;position:absolute;bottom:0}.-esm-form-builder__ohri-form__minifiedButtons___JkZB8 .cds--btn{max-width:50%;height:3.9rem}.-esm-form-builder__ohri-form__minifiedButtons___JkZB8>button{width:50%}.-esm-form-builder__ohri-form__markdownContainer___rYHzz{padding:1rem}","",{version:3,sources:["webpack://./node_modules/@openmrs/openmrs-form-engine-lib/src/ohri-form.scss"],names:[],mappings:"AAAA,gDACE,WAAA,CACA,eAAA,CACA,WAAA,CAGF,yDACE,oBAAA,CACA,WAAA,CACA,iBAAA,CACA,qBAAA,CAGF,kGACE,oBAAA,CACA,kBAAA,CACA,WAAA,CAGF,8CAEE,WAAA,CAGF,qEACE,iBAAA,CACA,WAAA,CAGF,mDACE,yBAAA,CACA,QAAA,CACA,cAAA,CACA,WAAA,CACA,aAAA,CACA,iBAAA,CACA,iBAAA,CACA,YAAA,CACA,qBAAA,CAGF,uDACE,eAAA,CACA,aAAA,CACA,eAAA,CAGF,+DACE,6BAAA,CAGF,uDACE,UAAA,CACA,aAAA,CACA,iBAAA,CACA,QAAA,CAGF,iEACE,aAAA,CACA,aAAA,CAGF,8DACE,SAAA,CAGF,yDACE,YAAA",sourceRoot:""}]),s.locals={ohriForm:"-esm-form-builder__ohri-form__ohriForm___ffj6r",ohriFormContainer:"-esm-form-builder__ohri-form__ohriFormContainer___pDKKY",ohriFormBody:"-esm-form-builder__ohri-form__ohriFormBody___TlYni",loader:"-esm-form-builder__ohri-form__loader___QVkQ_",formContent:"-esm-form-builder__ohri-form__formContent___Shu_B",formContentBody:"-esm-form-builder__ohri-form__formContentBody___KhGka",minifiedFormContentBody:"-esm-form-builder__ohri-form__minifiedFormContentBody___YpxHU",minifiedButtons:"-esm-form-builder__ohri-form__minifiedButtons___JkZB8",markdownContainer:"-esm-form-builder__ohri-form__markdownContainer___rYHzz"};const a=s},23645:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",i=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),i&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),i&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,i,r,o){"string"==typeof e&&(e=[[null,e,void 0]]);var s={};if(i)for(var a=0;a<this.length;a++){var l=this[a][0];null!=l&&(s[l]=!0)}for(var c=0;c<e.length;c++){var u=[].concat(e[c]);i&&s[u[0]]||(void 0!==o&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=o),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),r&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=r):u[4]="".concat(r)),t.push(u))}},t}},87537:e=>{"use strict";e.exports=function(e){var t=e[1],n=e[3];if(!n)return t;if("function"==typeof btoa){var i=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),r="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(i),o="/*# ".concat(r," */");return[t].concat([o]).join("\n")}return[t].join("\n")}},27484:function(e){e.exports=function(){"use strict";var e=6e4,t=36e5,n="millisecond",i="second",r="minute",o="hour",s="day",a="week",l="month",c="quarter",u="year",d="date",h="Invalid Date",f=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,p=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],n=e%100;return"["+e+(t[(n-20)%10]||t[n]||t[0])+"]"}},m=function(e,t,n){var i=String(e);return!i||i.length>=t?e:""+Array(t+1-i.length).join(n)+e},v={s:m,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),i=Math.floor(n/60),r=n%60;return(t<=0?"+":"-")+m(i,2,"0")+":"+m(r,2,"0")},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var i=12*(n.year()-t.year())+(n.month()-t.month()),r=t.clone().add(i,l),o=n-r<0,s=t.clone().add(i+(o?-1:1),l);return+(-(i+(n-r)/(o?r-s:s-r))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:l,y:u,w:a,d:s,D:d,h:o,m:r,s:i,ms:n,Q:c}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},b="en",y={};y[b]=g;var w=function(e){return e instanceof C},_=function e(t,n,i){var r;if(!t)return b;if("string"==typeof t){var o=t.toLowerCase();y[o]&&(r=o),n&&(y[o]=n,r=o);var s=t.split("-");if(!r&&s.length>1)return e(s[0])}else{var a=t.name;y[a]=t,r=a}return!i&&r&&(b=r),r||!i&&b},A=function(e,t){if(w(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new C(n)},x=v;x.l=_,x.i=w,x.w=function(e,t){return A(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var C=function(){function g(e){this.$L=_(e.locale,null,!0),this.parse(e)}var m=g.prototype;return m.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(x.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var i=t.match(f);if(i){var r=i[2]-1||0,o=(i[7]||"0").substring(0,3);return n?new Date(Date.UTC(i[1],r,i[3]||1,i[4]||0,i[5]||0,i[6]||0,o)):new Date(i[1],r,i[3]||1,i[4]||0,i[5]||0,i[6]||0,o)}}return new Date(t)}(e),this.$x=e.x||{},this.init()},m.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},m.$utils=function(){return x},m.isValid=function(){return!(this.$d.toString()===h)},m.isSame=function(e,t){var n=A(e);return this.startOf(t)<=n&&n<=this.endOf(t)},m.isAfter=function(e,t){return A(e)<this.startOf(t)},m.isBefore=function(e,t){return this.endOf(t)<A(e)},m.$g=function(e,t,n){return x.u(e)?this[t]:this.set(n,e)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(e,t){var n=this,c=!!x.u(t)||t,h=x.p(e),f=function(e,t){var i=x.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return c?i:i.endOf(s)},p=function(e,t){return x.w(n.toDate()[e].apply(n.toDate("s"),(c?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},g=this.$W,m=this.$M,v=this.$D,b="set"+(this.$u?"UTC":"");switch(h){case u:return c?f(1,0):f(31,11);case l:return c?f(1,m):f(0,m+1);case a:var y=this.$locale().weekStart||0,w=(g<y?g+7:g)-y;return f(c?v-w:v+(6-w),m);case s:case d:return p(b+"Hours",0);case o:return p(b+"Minutes",1);case r:return p(b+"Seconds",2);case i:return p(b+"Milliseconds",3);default:return this.clone()}},m.endOf=function(e){return this.startOf(e,!1)},m.$set=function(e,t){var a,c=x.p(e),h="set"+(this.$u?"UTC":""),f=(a={},a[s]=h+"Date",a[d]=h+"Date",a[l]=h+"Month",a[u]=h+"FullYear",a[o]=h+"Hours",a[r]=h+"Minutes",a[i]=h+"Seconds",a[n]=h+"Milliseconds",a)[c],p=c===s?this.$D+(t-this.$W):t;if(c===l||c===u){var g=this.clone().set(d,1);g.$d[f](p),g.init(),this.$d=g.set(d,Math.min(this.$D,g.daysInMonth())).$d}else f&&this.$d[f](p);return this.init(),this},m.set=function(e,t){return this.clone().$set(e,t)},m.get=function(e){return this[x.p(e)]()},m.add=function(n,c){var d,h=this;n=Number(n);var f=x.p(c),p=function(e){var t=A(h);return x.w(t.date(t.date()+Math.round(e*n)),h)};if(f===l)return this.set(l,this.$M+n);if(f===u)return this.set(u,this.$y+n);if(f===s)return p(1);if(f===a)return p(7);var g=(d={},d[r]=e,d[o]=t,d[i]=1e3,d)[f]||1,m=this.$d.getTime()+n*g;return x.w(m,this)},m.subtract=function(e,t){return this.add(-1*e,t)},m.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||h;var i=e||"YYYY-MM-DDTHH:mm:ssZ",r=x.z(this),o=this.$H,s=this.$m,a=this.$M,l=n.weekdays,c=n.months,u=function(e,n,r,o){return e&&(e[n]||e(t,i))||r[n].slice(0,o)},d=function(e){return x.s(o%12||12,e,"0")},f=n.meridiem||function(e,t,n){var i=e<12?"AM":"PM";return n?i.toLowerCase():i},g={YY:String(this.$y).slice(-2),YYYY:this.$y,M:a+1,MM:x.s(a+1,2,"0"),MMM:u(n.monthsShort,a,c,3),MMMM:u(c,a),D:this.$D,DD:x.s(this.$D,2,"0"),d:String(this.$W),dd:u(n.weekdaysMin,this.$W,l,2),ddd:u(n.weekdaysShort,this.$W,l,3),dddd:l[this.$W],H:String(o),HH:x.s(o,2,"0"),h:d(1),hh:d(2),a:f(o,s,!0),A:f(o,s,!1),m:String(s),mm:x.s(s,2,"0"),s:String(this.$s),ss:x.s(this.$s,2,"0"),SSS:x.s(this.$ms,3,"0"),Z:r};return i.replace(p,(function(e,t){return t||g[e]||r.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(n,d,h){var f,p=x.p(d),g=A(n),m=(g.utcOffset()-this.utcOffset())*e,v=this-g,b=x.m(this,g);return b=(f={},f[u]=b/12,f[l]=b,f[c]=b/3,f[a]=(v-m)/6048e5,f[s]=(v-m)/864e5,f[o]=v/t,f[r]=v/e,f[i]=v/1e3,f)[p]||v,h?b:x.a(b)},m.daysInMonth=function(){return this.endOf(l).$D},m.$locale=function(){return y[this.$L]},m.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),i=_(e,t,!0);return i&&(n.$L=i),n},m.clone=function(){return x.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},g}(),S=C.prototype;return A.prototype=S,[["$ms",n],["$s",i],["$m",r],["$H",o],["$W",s],["$M",l],["$y",u],["$D",d]].forEach((function(e){S[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),A.extend=function(e,t){return e.$i||(e(t,C,A),e.$i=!0),A},A.locale=_,A.isDayjs=w,A.unix=function(e){return A(1e3*e)},A.en=y[b],A.Ls=y,A.p={},A}()},1646:function(e){e.exports=function(){"use strict";var e,t,n=1e3,i=6e4,r=36e5,o=864e5,s=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,a=31536e6,l=2592e6,c=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,u={years:a,months:l,days:o,hours:r,minutes:i,seconds:n,milliseconds:1,weeks:6048e5},d=function(e){return e instanceof b},h=function(e,t,n){return new b(e,n,t.$l)},f=function(e){return t.p(e)+"s"},p=function(e){return e<0},g=function(e){return p(e)?Math.ceil(e):Math.floor(e)},m=function(e){return Math.abs(e)},v=function(e,t){return e?p(e)?{negative:!0,format:""+m(e)+t}:{negative:!1,format:""+e+t}:{negative:!1,format:""}},b=function(){function p(e,t,n){var i=this;if(this.$d={},this.$l=n,void 0===e&&(this.$ms=0,this.parseFromMilliseconds()),t)return h(e*u[f(t)],this);if("number"==typeof e)return this.$ms=e,this.parseFromMilliseconds(),this;if("object"==typeof e)return Object.keys(e).forEach((function(t){i.$d[f(t)]=e[t]})),this.calMilliseconds(),this;if("string"==typeof e){var r=e.match(c);if(r){var o=r.slice(2).map((function(e){return null!=e?Number(e):0}));return this.$d.years=o[0],this.$d.months=o[1],this.$d.weeks=o[2],this.$d.days=o[3],this.$d.hours=o[4],this.$d.minutes=o[5],this.$d.seconds=o[6],this.calMilliseconds(),this}}return this}var m=p.prototype;return m.calMilliseconds=function(){var e=this;this.$ms=Object.keys(this.$d).reduce((function(t,n){return t+(e.$d[n]||0)*u[n]}),0)},m.parseFromMilliseconds=function(){var e=this.$ms;this.$d.years=g(e/a),e%=a,this.$d.months=g(e/l),e%=l,this.$d.days=g(e/o),e%=o,this.$d.hours=g(e/r),e%=r,this.$d.minutes=g(e/i),e%=i,this.$d.seconds=g(e/n),e%=n,this.$d.milliseconds=e},m.toISOString=function(){var e=v(this.$d.years,"Y"),t=v(this.$d.months,"M"),n=+this.$d.days||0;this.$d.weeks&&(n+=7*this.$d.weeks);var i=v(n,"D"),r=v(this.$d.hours,"H"),o=v(this.$d.minutes,"M"),s=this.$d.seconds||0;this.$d.milliseconds&&(s+=this.$d.milliseconds/1e3);var a=v(s,"S"),l=e.negative||t.negative||i.negative||r.negative||o.negative||a.negative,c=r.format||o.format||a.format?"T":"",u=(l?"-":"")+"P"+e.format+t.format+i.format+c+r.format+o.format+a.format;return"P"===u||"-P"===u?"P0D":u},m.toJSON=function(){return this.toISOString()},m.format=function(e){var n=e||"YYYY-MM-DDTHH:mm:ss",i={Y:this.$d.years,YY:t.s(this.$d.years,2,"0"),YYYY:t.s(this.$d.years,4,"0"),M:this.$d.months,MM:t.s(this.$d.months,2,"0"),D:this.$d.days,DD:t.s(this.$d.days,2,"0"),H:this.$d.hours,HH:t.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:t.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:t.s(this.$d.seconds,2,"0"),SSS:t.s(this.$d.milliseconds,3,"0")};return n.replace(s,(function(e,t){return t||String(i[e])}))},m.as=function(e){return this.$ms/u[f(e)]},m.get=function(e){var t=this.$ms,n=f(e);return"milliseconds"===n?t%=1e3:t="weeks"===n?g(t/u[n]):this.$d[n],0===t?0:t},m.add=function(e,t,n){var i;return i=t?e*u[f(t)]:d(e)?e.$ms:h(e,this).$ms,h(this.$ms+i*(n?-1:1),this)},m.subtract=function(e,t){return this.add(e,t,!0)},m.locale=function(e){var t=this.clone();return t.$l=e,t},m.clone=function(){return h(this.$ms,this)},m.humanize=function(t){return e().add(this.$ms,"ms").locale(this.$l).fromNow(!t)},m.milliseconds=function(){return this.get("milliseconds")},m.asMilliseconds=function(){return this.as("milliseconds")},m.seconds=function(){return this.get("seconds")},m.asSeconds=function(){return this.as("seconds")},m.minutes=function(){return this.get("minutes")},m.asMinutes=function(){return this.as("minutes")},m.hours=function(){return this.get("hours")},m.asHours=function(){return this.as("hours")},m.days=function(){return this.get("days")},m.asDays=function(){return this.as("days")},m.weeks=function(){return this.get("weeks")},m.asWeeks=function(){return this.as("weeks")},m.months=function(){return this.get("months")},m.asMonths=function(){return this.as("months")},m.years=function(){return this.get("years")},m.asYears=function(){return this.as("years")},p}();return function(n,i,r){e=r,t=r().$utils(),r.duration=function(e,t){var n=r.locale();return h(e,{$l:n},t)},r.isDuration=d;var o=i.prototype.add,s=i.prototype.subtract;i.prototype.add=function(e,t){return d(e)&&(e=e.asMilliseconds()),o.bind(this)(e,t)},i.prototype.subtract=function(e,t){return d(e)&&(e=e.asMilliseconds()),s.bind(this)(e,t)}}}()},52027:e=>{var t=function(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32},n=-1;t.Diff=function(e,t){return[e,t]},t.prototype.diff_main=function(e,n,i,r){void 0===r&&(r=this.Diff_Timeout<=0?Number.MAX_VALUE:(new Date).getTime()+1e3*this.Diff_Timeout);var o=r;if(null==e||null==n)throw new Error("Null input. (diff_main)");if(e==n)return e?[new t.Diff(0,e)]:[];void 0===i&&(i=!0);var s=i,a=this.diff_commonPrefix(e,n),l=e.substring(0,a);e=e.substring(a),n=n.substring(a),a=this.diff_commonSuffix(e,n);var c=e.substring(e.length-a);e=e.substring(0,e.length-a),n=n.substring(0,n.length-a);var u=this.diff_compute_(e,n,s,o);return l&&u.unshift(new t.Diff(0,l)),c&&u.push(new t.Diff(0,c)),this.diff_cleanupMerge(u),u},t.prototype.diff_compute_=function(e,i,r,o){var s;if(!e)return[new t.Diff(1,i)];if(!i)return[new t.Diff(n,e)];var a=e.length>i.length?e:i,l=e.length>i.length?i:e,c=a.indexOf(l);if(-1!=c)return s=[new t.Diff(1,a.substring(0,c)),new t.Diff(0,l),new t.Diff(1,a.substring(c+l.length))],e.length>i.length&&(s[0][0]=s[2][0]=n),s;if(1==l.length)return[new t.Diff(n,e),new t.Diff(1,i)];var u=this.diff_halfMatch_(e,i);if(u){var d=u[0],h=u[1],f=u[2],p=u[3],g=u[4],m=this.diff_main(d,f,r,o),v=this.diff_main(h,p,r,o);return m.concat([new t.Diff(0,g)],v)}return r&&e.length>100&&i.length>100?this.diff_lineMode_(e,i,o):this.diff_bisect_(e,i,o)},t.prototype.diff_lineMode_=function(e,i,r){var o=this.diff_linesToChars_(e,i);e=o.chars1,i=o.chars2;var s=o.lineArray,a=this.diff_main(e,i,!1,r);this.diff_charsToLines_(a,s),this.diff_cleanupSemantic(a),a.push(new t.Diff(0,""));for(var l=0,c=0,u=0,d="",h="";l<a.length;){switch(a[l][0]){case 1:u++,h+=a[l][1];break;case n:c++,d+=a[l][1];break;case 0:if(c>=1&&u>=1){a.splice(l-c-u,c+u),l=l-c-u;for(var f=this.diff_main(d,h,!1,r),p=f.length-1;p>=0;p--)a.splice(l,0,f[p]);l+=f.length}u=0,c=0,d="",h=""}l++}return a.pop(),a},t.prototype.diff_bisect_=function(e,i,r){for(var o=e.length,s=i.length,a=Math.ceil((o+s)/2),l=a,c=2*a,u=new Array(c),d=new Array(c),h=0;h<c;h++)u[h]=-1,d[h]=-1;u[l+1]=0,d[l+1]=0;for(var f=o-s,p=f%2!=0,g=0,m=0,v=0,b=0,y=0;y<a&&!((new Date).getTime()>r);y++){for(var w=-y+g;w<=y-m;w+=2){for(var _=l+w,A=(k=w==-y||w!=y&&u[_-1]<u[_+1]?u[_+1]:u[_-1]+1)-w;k<o&&A<s&&e.charAt(k)==i.charAt(A);)k++,A++;if(u[_]=k,k>o)m+=2;else if(A>s)g+=2;else if(p&&(S=l+f-w)>=0&&S<c&&-1!=d[S]&&k>=(C=o-d[S]))return this.diff_bisectSplit_(e,i,k,A,r)}for(var x=-y+v;x<=y-b;x+=2){for(var C,S=l+x,E=(C=x==-y||x!=y&&d[S-1]<d[S+1]?d[S+1]:d[S-1]+1)-x;C<o&&E<s&&e.charAt(o-C-1)==i.charAt(s-E-1);)C++,E++;if(d[S]=C,C>o)b+=2;else if(E>s)v+=2;else if(!p){var k;if((_=l+f-x)>=0&&_<c&&-1!=u[_])if(A=l+(k=u[_])-_,k>=(C=o-C))return this.diff_bisectSplit_(e,i,k,A,r)}}}return[new t.Diff(n,e),new t.Diff(1,i)]},t.prototype.diff_bisectSplit_=function(e,t,n,i,r){var o=e.substring(0,n),s=t.substring(0,i),a=e.substring(n),l=t.substring(i),c=this.diff_main(o,s,!1,r),u=this.diff_main(a,l,!1,r);return c.concat(u)},t.prototype.diff_linesToChars_=function(e,t){var n=[],i={};function r(e){for(var t="",r=0,s=-1,a=n.length;s<e.length-1;){-1==(s=e.indexOf("\n",r))&&(s=e.length-1);var l=e.substring(r,s+1);(i.hasOwnProperty?i.hasOwnProperty(l):void 0!==i[l])?t+=String.fromCharCode(i[l]):(a==o&&(l=e.substring(r),s=e.length),t+=String.fromCharCode(a),i[l]=a,n[a++]=l),r=s+1}return t}n[0]="";var o=4e4,s=r(e);return o=65535,{chars1:s,chars2:r(t),lineArray:n}},t.prototype.diff_charsToLines_=function(e,t){for(var n=0;n<e.length;n++){for(var i=e[n][1],r=[],o=0;o<i.length;o++)r[o]=t[i.charCodeAt(o)];e[n][1]=r.join("")}},t.prototype.diff_commonPrefix=function(e,t){if(!e||!t||e.charAt(0)!=t.charAt(0))return 0;for(var n=0,i=Math.min(e.length,t.length),r=i,o=0;n<r;)e.substring(o,r)==t.substring(o,r)?o=n=r:i=r,r=Math.floor((i-n)/2+n);return r},t.prototype.diff_commonSuffix=function(e,t){if(!e||!t||e.charAt(e.length-1)!=t.charAt(t.length-1))return 0;for(var n=0,i=Math.min(e.length,t.length),r=i,o=0;n<r;)e.substring(e.length-r,e.length-o)==t.substring(t.length-r,t.length-o)?o=n=r:i=r,r=Math.floor((i-n)/2+n);return r},t.prototype.diff_commonOverlap_=function(e,t){var n=e.length,i=t.length;if(0==n||0==i)return 0;n>i?e=e.substring(n-i):n<i&&(t=t.substring(0,n));var r=Math.min(n,i);if(e==t)return r;for(var o=0,s=1;;){var a=e.substring(r-s),l=t.indexOf(a);if(-1==l)return o;s+=l,0!=l&&e.substring(r-s)!=t.substring(0,s)||(o=s,s++)}},t.prototype.diff_halfMatch_=function(e,t){if(this.Diff_Timeout<=0)return null;var n=e.length>t.length?e:t,i=e.length>t.length?t:e;if(n.length<4||2*i.length<n.length)return null;var r=this;function o(e,t,n){for(var i,o,s,a,l=e.substring(n,n+Math.floor(e.length/4)),c=-1,u="";-1!=(c=t.indexOf(l,c+1));){var d=r.diff_commonPrefix(e.substring(n),t.substring(c)),h=r.diff_commonSuffix(e.substring(0,n),t.substring(0,c));u.length<h+d&&(u=t.substring(c-h,c)+t.substring(c,c+d),i=e.substring(0,n-h),o=e.substring(n+d),s=t.substring(0,c-h),a=t.substring(c+d))}return 2*u.length>=e.length?[i,o,s,a,u]:null}var s,a,l,c,u,d=o(n,i,Math.ceil(n.length/4)),h=o(n,i,Math.ceil(n.length/2));return d||h?(s=h?d&&d[4].length>h[4].length?d:h:d,e.length>t.length?(a=s[0],l=s[1],c=s[2],u=s[3]):(c=s[0],u=s[1],a=s[2],l=s[3]),[a,l,c,u,s[4]]):null},t.prototype.diff_cleanupSemantic=function(e){for(var i=!1,r=[],o=0,s=null,a=0,l=0,c=0,u=0,d=0;a<e.length;)0==e[a][0]?(r[o++]=a,l=u,c=d,u=0,d=0,s=e[a][1]):(1==e[a][0]?u+=e[a][1].length:d+=e[a][1].length,s&&s.length<=Math.max(l,c)&&s.length<=Math.max(u,d)&&(e.splice(r[o-1],0,new t.Diff(n,s)),e[r[o-1]+1][0]=1,o--,a=--o>0?r[o-1]:-1,l=0,c=0,u=0,d=0,s=null,i=!0)),a++;for(i&&this.diff_cleanupMerge(e),this.diff_cleanupSemanticLossless(e),a=1;a<e.length;){if(e[a-1][0]==n&&1==e[a][0]){var h=e[a-1][1],f=e[a][1],p=this.diff_commonOverlap_(h,f),g=this.diff_commonOverlap_(f,h);p>=g?(p>=h.length/2||p>=f.length/2)&&(e.splice(a,0,new t.Diff(0,f.substring(0,p))),e[a-1][1]=h.substring(0,h.length-p),e[a+1][1]=f.substring(p),a++):(g>=h.length/2||g>=f.length/2)&&(e.splice(a,0,new t.Diff(0,h.substring(0,g))),e[a-1][0]=1,e[a-1][1]=f.substring(0,f.length-g),e[a+1][0]=n,e[a+1][1]=h.substring(g),a++),a++}a++}},t.prototype.diff_cleanupSemanticLossless=function(e){function n(e,n){if(!e||!n)return 6;var i=e.charAt(e.length-1),r=n.charAt(0),o=i.match(t.nonAlphaNumericRegex_),s=r.match(t.nonAlphaNumericRegex_),a=o&&i.match(t.whitespaceRegex_),l=s&&r.match(t.whitespaceRegex_),c=a&&i.match(t.linebreakRegex_),u=l&&r.match(t.linebreakRegex_),d=c&&e.match(t.blanklineEndRegex_),h=u&&n.match(t.blanklineStartRegex_);return d||h?5:c||u?4:o&&!a&&l?3:a||l?2:o||s?1:0}for(var i=1;i<e.length-1;){if(0==e[i-1][0]&&0==e[i+1][0]){var r=e[i-1][1],o=e[i][1],s=e[i+1][1],a=this.diff_commonSuffix(r,o);if(a){var l=o.substring(o.length-a);r=r.substring(0,r.length-a),o=l+o.substring(0,o.length-a),s=l+s}for(var c=r,u=o,d=s,h=n(r,o)+n(o,s);o.charAt(0)===s.charAt(0);){r+=o.charAt(0),o=o.substring(1)+s.charAt(0),s=s.substring(1);var f=n(r,o)+n(o,s);f>=h&&(h=f,c=r,u=o,d=s)}e[i-1][1]!=c&&(c?e[i-1][1]=c:(e.splice(i-1,1),i--),e[i][1]=u,d?e[i+1][1]=d:(e.splice(i+1,1),i--))}i++}},t.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,t.whitespaceRegex_=/\s/,t.linebreakRegex_=/[\r\n]/,t.blanklineEndRegex_=/\n\r?\n$/,t.blanklineStartRegex_=/^\r?\n\r?\n/,t.prototype.diff_cleanupEfficiency=function(e){for(var i=!1,r=[],o=0,s=null,a=0,l=!1,c=!1,u=!1,d=!1;a<e.length;)0==e[a][0]?(e[a][1].length<this.Diff_EditCost&&(u||d)?(r[o++]=a,l=u,c=d,s=e[a][1]):(o=0,s=null),u=d=!1):(e[a][0]==n?d=!0:u=!0,s&&(l&&c&&u&&d||s.length<this.Diff_EditCost/2&&l+c+u+d==3)&&(e.splice(r[o-1],0,new t.Diff(n,s)),e[r[o-1]+1][0]=1,o--,s=null,l&&c?(u=d=!0,o=0):(a=--o>0?r[o-1]:-1,u=d=!1),i=!0)),a++;i&&this.diff_cleanupMerge(e)},t.prototype.diff_cleanupMerge=function(e){e.push(new t.Diff(0,""));for(var i,r=0,o=0,s=0,a="",l="";r<e.length;)switch(e[r][0]){case 1:s++,l+=e[r][1],r++;break;case n:o++,a+=e[r][1],r++;break;case 0:o+s>1?(0!==o&&0!==s&&(0!==(i=this.diff_commonPrefix(l,a))&&(r-o-s>0&&0==e[r-o-s-1][0]?e[r-o-s-1][1]+=l.substring(0,i):(e.splice(0,0,new t.Diff(0,l.substring(0,i))),r++),l=l.substring(i),a=a.substring(i)),0!==(i=this.diff_commonSuffix(l,a))&&(e[r][1]=l.substring(l.length-i)+e[r][1],l=l.substring(0,l.length-i),a=a.substring(0,a.length-i))),r-=o+s,e.splice(r,o+s),a.length&&(e.splice(r,0,new t.Diff(n,a)),r++),l.length&&(e.splice(r,0,new t.Diff(1,l)),r++),r++):0!==r&&0==e[r-1][0]?(e[r-1][1]+=e[r][1],e.splice(r,1)):r++,s=0,o=0,a="",l=""}""===e[e.length-1][1]&&e.pop();var c=!1;for(r=1;r<e.length-1;)0==e[r-1][0]&&0==e[r+1][0]&&(e[r][1].substring(e[r][1].length-e[r-1][1].length)==e[r-1][1]?(e[r][1]=e[r-1][1]+e[r][1].substring(0,e[r][1].length-e[r-1][1].length),e[r+1][1]=e[r-1][1]+e[r+1][1],e.splice(r-1,1),c=!0):e[r][1].substring(0,e[r+1][1].length)==e[r+1][1]&&(e[r-1][1]+=e[r+1][1],e[r][1]=e[r][1].substring(e[r+1][1].length)+e[r+1][1],e.splice(r+1,1),c=!0)),r++;c&&this.diff_cleanupMerge(e)},t.prototype.diff_xIndex=function(e,t){var i,r=0,o=0,s=0,a=0;for(i=0;i<e.length&&(1!==e[i][0]&&(r+=e[i][1].length),e[i][0]!==n&&(o+=e[i][1].length),!(r>t));i++)s=r,a=o;return e.length!=i&&e[i][0]===n?a:a+(t-s)},t.prototype.diff_prettyHtml=function(e){for(var t=[],i=/&/g,r=/</g,o=/>/g,s=/\n/g,a=0;a<e.length;a++){var l=e[a][0],c=e[a][1].replace(i,"&").replace(r,"<").replace(o,">").replace(s,"¶<br>");switch(l){case 1:t[a]='<ins style="background:#e6ffe6;">'+c+"</ins>";break;case n:t[a]='<del style="background:#ffe6e6;">'+c+"</del>";break;case 0:t[a]="<span>"+c+"</span>"}}return t.join("")},t.prototype.diff_text1=function(e){for(var t=[],n=0;n<e.length;n++)1!==e[n][0]&&(t[n]=e[n][1]);return t.join("")},t.prototype.diff_text2=function(e){for(var t=[],i=0;i<e.length;i++)e[i][0]!==n&&(t[i]=e[i][1]);return t.join("")},t.prototype.diff_levenshtein=function(e){for(var t=0,i=0,r=0,o=0;o<e.length;o++){var s=e[o][0],a=e[o][1];switch(s){case 1:i+=a.length;break;case n:r+=a.length;break;case 0:t+=Math.max(i,r),i=0,r=0}}return t+Math.max(i,r)},t.prototype.diff_toDelta=function(e){for(var t=[],i=0;i<e.length;i++)switch(e[i][0]){case 1:t[i]="+"+encodeURI(e[i][1]);break;case n:t[i]="-"+e[i][1].length;break;case 0:t[i]="="+e[i][1].length}return t.join("\t").replace(/%20/g," ")},t.prototype.diff_fromDelta=function(e,i){for(var r=[],o=0,s=0,a=i.split(/\t/g),l=0;l<a.length;l++){var c=a[l].substring(1);switch(a[l].charAt(0)){case"+":try{r[o++]=new t.Diff(1,decodeURI(c))}catch(e){throw new Error("Illegal escape in diff_fromDelta: "+c)}break;case"-":case"=":var u=parseInt(c,10);if(isNaN(u)||u<0)throw new Error("Invalid number in diff_fromDelta: "+c);var d=e.substring(s,s+=u);"="==a[l].charAt(0)?r[o++]=new t.Diff(0,d):r[o++]=new t.Diff(n,d);break;default:if(a[l])throw new Error("Invalid diff operation in diff_fromDelta: "+a[l])}}if(s!=e.length)throw new Error("Delta length ("+s+") does not equal source text length ("+e.length+").");return r},t.prototype.match_main=function(e,t,n){if(null==e||null==t||null==n)throw new Error("Null input. (match_main)");return n=Math.max(0,Math.min(n,e.length)),e==t?0:e.length?e.substring(n,n+t.length)==t?n:this.match_bitap_(e,t,n):-1},t.prototype.match_bitap_=function(e,t,n){if(t.length>this.Match_MaxBits)throw new Error("Pattern too long for this browser.");var i=this.match_alphabet_(t),r=this;function o(e,i){var o=e/t.length,s=Math.abs(n-i);return r.Match_Distance?o+s/r.Match_Distance:s?1:o}var s=this.Match_Threshold,a=e.indexOf(t,n);-1!=a&&(s=Math.min(o(0,a),s),-1!=(a=e.lastIndexOf(t,n+t.length))&&(s=Math.min(o(0,a),s)));var l,c,u=1<<t.length-1;a=-1;for(var d,h=t.length+e.length,f=0;f<t.length;f++){for(l=0,c=h;l<c;)o(f,n+c)<=s?l=c:h=c,c=Math.floor((h-l)/2+l);h=c;var p=Math.max(1,n-c+1),g=Math.min(n+c,e.length)+t.length,m=Array(g+2);m[g+1]=(1<<f)-1;for(var v=g;v>=p;v--){var b=i[e.charAt(v-1)];if(m[v]=0===f?(m[v+1]<<1|1)&b:(m[v+1]<<1|1)&b|(d[v+1]|d[v])<<1|1|d[v+1],m[v]&u){var y=o(f,v-1);if(y<=s){if(s=y,!((a=v-1)>n))break;p=Math.max(1,2*n-a)}}}if(o(f+1,n)>s)break;d=m}return a},t.prototype.match_alphabet_=function(e){for(var t={},n=0;n<e.length;n++)t[e.charAt(n)]=0;for(n=0;n<e.length;n++)t[e.charAt(n)]|=1<<e.length-n-1;return t},t.prototype.patch_addContext_=function(e,n){if(0!=n.length){if(null===e.start2)throw Error("patch not initialized");for(var i=n.substring(e.start2,e.start2+e.length1),r=0;n.indexOf(i)!=n.lastIndexOf(i)&&i.length<this.Match_MaxBits-this.Patch_Margin-this.Patch_Margin;)r+=this.Patch_Margin,i=n.substring(e.start2-r,e.start2+e.length1+r);r+=this.Patch_Margin;var o=n.substring(e.start2-r,e.start2);o&&e.diffs.unshift(new t.Diff(0,o));var s=n.substring(e.start2+e.length1,e.start2+e.length1+r);s&&e.diffs.push(new t.Diff(0,s)),e.start1-=o.length,e.start2-=o.length,e.length1+=o.length+s.length,e.length2+=o.length+s.length}},t.prototype.patch_make=function(e,i,r){var o,s;if("string"==typeof e&&"string"==typeof i&&void 0===r)o=e,(s=this.diff_main(o,i,!0)).length>2&&(this.diff_cleanupSemantic(s),this.diff_cleanupEfficiency(s));else if(e&&"object"==typeof e&&void 0===i&&void 0===r)s=e,o=this.diff_text1(s);else if("string"==typeof e&&i&&"object"==typeof i&&void 0===r)o=e,s=i;else{if("string"!=typeof e||"string"!=typeof i||!r||"object"!=typeof r)throw new Error("Unknown call format to patch_make.");o=e,s=r}if(0===s.length)return[];for(var a=[],l=new t.patch_obj,c=0,u=0,d=0,h=o,f=o,p=0;p<s.length;p++){var g=s[p][0],m=s[p][1];switch(c||0===g||(l.start1=u,l.start2=d),g){case 1:l.diffs[c++]=s[p],l.length2+=m.length,f=f.substring(0,d)+m+f.substring(d);break;case n:l.length1+=m.length,l.diffs[c++]=s[p],f=f.substring(0,d)+f.substring(d+m.length);break;case 0:m.length<=2*this.Patch_Margin&&c&&s.length!=p+1?(l.diffs[c++]=s[p],l.length1+=m.length,l.length2+=m.length):m.length>=2*this.Patch_Margin&&c&&(this.patch_addContext_(l,h),a.push(l),l=new t.patch_obj,c=0,h=f,u=d)}1!==g&&(u+=m.length),g!==n&&(d+=m.length)}return c&&(this.patch_addContext_(l,h),a.push(l)),a},t.prototype.patch_deepCopy=function(e){for(var n=[],i=0;i<e.length;i++){var r=e[i],o=new t.patch_obj;o.diffs=[];for(var s=0;s<r.diffs.length;s++)o.diffs[s]=new t.Diff(r.diffs[s][0],r.diffs[s][1]);o.start1=r.start1,o.start2=r.start2,o.length1=r.length1,o.length2=r.length2,n[i]=o}return n},t.prototype.patch_apply=function(e,t){if(0==e.length)return[t,[]];e=this.patch_deepCopy(e);var i=this.patch_addPadding(e);t=i+t+i,this.patch_splitMax(e);for(var r=0,o=[],s=0;s<e.length;s++){var a,l,c=e[s].start2+r,u=this.diff_text1(e[s].diffs),d=-1;if(u.length>this.Match_MaxBits?-1!=(a=this.match_main(t,u.substring(0,this.Match_MaxBits),c))&&(-1==(d=this.match_main(t,u.substring(u.length-this.Match_MaxBits),c+u.length-this.Match_MaxBits))||a>=d)&&(a=-1):a=this.match_main(t,u,c),-1==a)o[s]=!1,r-=e[s].length2-e[s].length1;else if(o[s]=!0,r=a-c,u==(l=-1==d?t.substring(a,a+u.length):t.substring(a,d+this.Match_MaxBits)))t=t.substring(0,a)+this.diff_text2(e[s].diffs)+t.substring(a+u.length);else{var h=this.diff_main(u,l,!1);if(u.length>this.Match_MaxBits&&this.diff_levenshtein(h)/u.length>this.Patch_DeleteThreshold)o[s]=!1;else{this.diff_cleanupSemanticLossless(h);for(var f,p=0,g=0;g<e[s].diffs.length;g++){var m=e[s].diffs[g];0!==m[0]&&(f=this.diff_xIndex(h,p)),1===m[0]?t=t.substring(0,a+f)+m[1]+t.substring(a+f):m[0]===n&&(t=t.substring(0,a+f)+t.substring(a+this.diff_xIndex(h,p+m[1].length))),m[0]!==n&&(p+=m[1].length)}}}}return[t=t.substring(i.length,t.length-i.length),o]},t.prototype.patch_addPadding=function(e){for(var n=this.Patch_Margin,i="",r=1;r<=n;r++)i+=String.fromCharCode(r);for(r=0;r<e.length;r++)e[r].start1+=n,e[r].start2+=n;var o=e[0],s=o.diffs;if(0==s.length||0!=s[0][0])s.unshift(new t.Diff(0,i)),o.start1-=n,o.start2-=n,o.length1+=n,o.length2+=n;else if(n>s[0][1].length){var a=n-s[0][1].length;s[0][1]=i.substring(s[0][1].length)+s[0][1],o.start1-=a,o.start2-=a,o.length1+=a,o.length2+=a}return 0==(s=(o=e[e.length-1]).diffs).length||0!=s[s.length-1][0]?(s.push(new t.Diff(0,i)),o.length1+=n,o.length2+=n):n>s[s.length-1][1].length&&(a=n-s[s.length-1][1].length,s[s.length-1][1]+=i.substring(0,a),o.length1+=a,o.length2+=a),i},t.prototype.patch_splitMax=function(e){for(var i=this.Match_MaxBits,r=0;r<e.length;r++)if(!(e[r].length1<=i)){var o=e[r];e.splice(r--,1);for(var s=o.start1,a=o.start2,l="";0!==o.diffs.length;){var c=new t.patch_obj,u=!0;for(c.start1=s-l.length,c.start2=a-l.length,""!==l&&(c.length1=c.length2=l.length,c.diffs.push(new t.Diff(0,l)));0!==o.diffs.length&&c.length1<i-this.Patch_Margin;){var d=o.diffs[0][0],h=o.diffs[0][1];1===d?(c.length2+=h.length,a+=h.length,c.diffs.push(o.diffs.shift()),u=!1):d===n&&1==c.diffs.length&&0==c.diffs[0][0]&&h.length>2*i?(c.length1+=h.length,s+=h.length,u=!1,c.diffs.push(new t.Diff(d,h)),o.diffs.shift()):(h=h.substring(0,i-c.length1-this.Patch_Margin),c.length1+=h.length,s+=h.length,0===d?(c.length2+=h.length,a+=h.length):u=!1,c.diffs.push(new t.Diff(d,h)),h==o.diffs[0][1]?o.diffs.shift():o.diffs[0][1]=o.diffs[0][1].substring(h.length))}l=(l=this.diff_text2(c.diffs)).substring(l.length-this.Patch_Margin);var f=this.diff_text1(o.diffs).substring(0,this.Patch_Margin);""!==f&&(c.length1+=f.length,c.length2+=f.length,0!==c.diffs.length&&0===c.diffs[c.diffs.length-1][0]?c.diffs[c.diffs.length-1][1]+=f:c.diffs.push(new t.Diff(0,f))),u||e.splice(++r,0,c)}}},t.prototype.patch_toText=function(e){for(var t=[],n=0;n<e.length;n++)t[n]=e[n];return t.join("")},t.prototype.patch_fromText=function(e){var i=[];if(!e)return i;for(var r=e.split("\n"),o=0,s=/^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/;o<r.length;){var a=r[o].match(s);if(!a)throw new Error("Invalid patch string: "+r[o]);var l=new t.patch_obj;for(i.push(l),l.start1=parseInt(a[1],10),""===a[2]?(l.start1--,l.length1=1):"0"==a[2]?l.length1=0:(l.start1--,l.length1=parseInt(a[2],10)),l.start2=parseInt(a[3],10),""===a[4]?(l.start2--,l.length2=1):"0"==a[4]?l.length2=0:(l.start2--,l.length2=parseInt(a[4],10)),o++;o<r.length;){var c=r[o].charAt(0);try{var u=decodeURI(r[o].substring(1))}catch(e){throw new Error("Illegal escape in patch_fromText: "+u)}if("-"==c)l.diffs.push(new t.Diff(n,u));else if("+"==c)l.diffs.push(new t.Diff(1,u));else if(" "==c)l.diffs.push(new t.Diff(0,u));else{if("@"==c)break;if(""!==c)throw new Error('Invalid patch mode "'+c+'" in: '+u)}o++}}return i},(t.patch_obj=function(){this.diffs=[],this.start1=null,this.start2=null,this.length1=0,this.length2=0}).prototype.toString=function(){for(var e,t=["@@ -"+(0===this.length1?this.start1+",0":1==this.length1?this.start1+1:this.start1+1+","+this.length1)+" +"+(0===this.length2?this.start2+",0":1==this.length2?this.start2+1:this.start2+1+","+this.length2)+" @@\n"],i=0;i<this.diffs.length;i++){switch(this.diffs[i][0]){case 1:e="+";break;case n:e="-";break;case 0:e=" "}t[i+1]=e+encodeURI(this.diffs[i][1])+"\n"}return t.join("").replace(/%20/g," ")},e.exports=t,e.exports.diff_match_patch=t,e.exports.DIFF_DELETE=n,e.exports.DIFF_INSERT=1,e.exports.DIFF_EQUAL=0},94470:e=>{"use strict";var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString,i=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===n.call(e)},s=function(e){if(!e||"[object Object]"!==n.call(e))return!1;var i,r=t.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!o)return!1;for(i in e);return void 0===i||t.call(e,i)},a=function(e,t){i&&"__proto__"===t.name?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,n){if("__proto__"===n){if(!t.call(e,n))return;if(r)return r(e,n).value}return e[n]};e.exports=function e(){var t,n,i,r,c,u,d=arguments[0],h=1,f=arguments.length,p=!1;for("boolean"==typeof d&&(p=d,d=arguments[1]||{},h=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});h<f;++h)if(null!=(t=arguments[h]))for(n in t)i=l(d,n),d!==(r=l(t,n))&&(p&&r&&(s(r)||(c=o(r)))?(c?(c=!1,u=i&&o(i)?i:[]):u=i&&s(i)?i:{},a(d,{name:n,newValue:e(p,u,r)})):void 0!==r&&a(d,{name:n,newValue:r}));return d}},94277:(e,t,n)=>{e.exports=n.p+"852f0ecd7b17e3bfd700a821ff438f7e.js"},14113:(e,t,n)=>{e.exports=n.p+"7d64980faff5b041a461fd0ba3e2f3f5.js"},81334:(e,t,n)=>{e.exports=n.p+"1db8d65ab1ad8dbb0aae7b9ebe280ca7.js"},59503:(e,t,n)=>{e.exports=n.p+"69ec362e03850ff2d49044acbb19b385.js"},83823:(e,t,n)=>{e.exports=n.p+"c530988d2b1966fd10a4d99fa3877e1b.js"},83526:(e,t,n)=>{e.exports=n.p+"2fe2904fc024afaf81732563cb83e547.js"},8026:(e,t,n)=>{e.exports=n.p+"cfe1a9dd61dd943a574fc6c7157372f7.js"},75065:(e,t,n)=>{e.exports=n.p+"46f088332f17d2ea452bd0ef7a5cdbc6.js"},74422:(e,t,n)=>{e.exports=n.p+"fec23c6964d6cf25681d1f3e24b076a4.js"},29624:(e,t,n)=>{e.exports=n.p+"8211ff24c6eb59feeb74cf3ae60e4e5d.js"},7704:(e,t,n)=>{e.exports=n.p+"6b07bdedc12700f257d08813b3c0887f.js"},13172:(e,t,n)=>{e.exports=n.p+"faa809ba713143a2e8b4760a45e1fe89.js"},71165:(e,t,n)=>{e.exports=n.p+"07567125b93045706d81f17f7d04e262.js"},7490:(e,t,n)=>{e.exports=n.p+"f3a21a0f236d2b7d45be954c32efaa14.js"},19159:(e,t,n)=>{e.exports=n.p+"e0d8e58814f40cb5f60e1fe5fb37e9fa.js"},44666:(e,t,n)=>{e.exports=n.p+"2f55cddc8eb85b63ee5b4ce0e5488230.js"},82489:(e,t,n)=>{e.exports=n.p+"6f77d1c97d1c6937d21c4a1034be62b6.js"},46385:(e,t,n)=>{e.exports=n.p+"c92169023ff93e3c3e03bc2f4c73615a.js"},13038:(e,t,n)=>{e.exports=n.p+"cbf021d377207ecc00145a138fd03f0f.js"},37097:(e,t,n)=>{e.exports=n.p+"645b74a0625033669c9d0440b32e3fd0.js"},63603:(e,t,n)=>{e.exports=n.p+"16b5146f5e9b7a1a196f6d11a6187282.js"},95367:(e,t,n)=>{e.exports=n.p+"2f25a4dc442bc9aebc58cae30c50c3e2.js"},67863:(e,t,n)=>{e.exports=n.p+"6365d65802807679247605c8df7ea9ec.js"},87630:(e,t,n)=>{e.exports=n.p+"3b02cca9e95276a74f3ed2bbc7a64ce6.js"},31380:(e,t,n)=>{e.exports=n.p+"aa6c0d1a7dfd344894b8eba8db42ad04.js"},61366:(e,t,n)=>{e.exports=n.p+"e06608fe5b8e7e9d30879d4d91113a08.js"},91108:(e,t,n)=>{e.exports=n.p+"fb08407a1b7ad7f9a2da2a7845f596c5.js"},96293:(e,t,n)=>{e.exports=n.p+"bf37de323316c6ae5745fc11fd576b1c.js"},80029:(e,t,n)=>{e.exports=n.p+"875ae58e8015a6d08dbc9d0c04e24638.js"},26375:(e,t,n)=>{e.exports=n.p+"392e4c8d74cb1c9267a14eb0270ba2d6.js"},39254:(e,t,n)=>{e.exports=n.p+"d4f1a314cb3668f8e17f24bccf0229b6.js"},87006:(e,t,n)=>{e.exports=n.p+"39fea85ed7dd99d7c6c9e59b7040523f.js"},9027:(e,t,n)=>{e.exports=n.p+"686915e134683f72ea5f3c227a6f13be.js"},48032:(e,t,n)=>{e.exports=n.p+"2611b2dc99534665bf6734ddfa6b8de4.js"},73398:(e,t,n)=>{e.exports=n.p+"cd29b6e52c3ebcbaee8c7bb709fd1d8e.js"},23723:(e,t,n)=>{e.exports=n.p+"0b06cbc7edf78b6f2810187262e7630b.js"},54264:(e,t,n)=>{e.exports=n.p+"d3a6de3a3eae748464b9d49001eba546.js"},42066:(e,t,n)=>{e.exports=n.p+"a6b8f5b8c9ce7808c5ca6baccdf1ad1e.js"},57382:(e,t,n)=>{e.exports=n.p+"fa0c561bb37040fc8145e5c70ea64912.js"},89323:(e,t,n)=>{e.exports=n.p+"4b692785a8a6340a89e6067274a7583c.js"},12629:(e,t,n)=>{e.exports=n.p+"5cab33610b8d9c1aee4db4672811cb5f.js"},51022:(e,t,n)=>{e.exports=n.p+"02b97d3c4a7e895228beec69fb63e420.js"},19783:(e,t,n)=>{e.exports=n.p+"efbb5510bc35424b261de45355e3a626.js"},73322:(e,t,n)=>{e.exports=n.p+"92164e5d714ab4cda2b91eede29bc191.js"},33068:(e,t,n)=>{e.exports=n.p+"5061ac5e99882b9f26051a5d73c75271.js"},97944:(e,t,n)=>{e.exports=n.p+"a72ec8ab4a5bdfd6695dfa5fa86ef30d.js"},56816:(e,t,n)=>{e.exports=n.p+"3a3b2fef963d6c2c49c5b11b74a9ea81.js"},14338:(e,t,n)=>{e.exports=n.p+"c2fb2aaf17fa23ca4b9bf7f1c1441caa.js"},15209:(e,t,n)=>{e.exports=n.p+"8f8ce96f0f6ce8d8a30d5f2dcb4eca76.js"},86147:(e,t,n)=>{e.exports=n.p+"039ae6f160cd9781bcbb003484e23cdc.js"},54967:(e,t,n)=>{e.exports=n.p+"b35c9a9d72f02feae440dd385a020ef6.js"},99681:(e,t,n)=>{e.exports=n.p+"2184bcd361a0e38d249bc49439d994cb.js"},52988:(e,t,n)=>{e.exports=n.p+"b992b348ffb6453e4a02a60e71c5304e.js"},31951:(e,t,n)=>{e.exports=n.p+"9b80d1a12acd18c90e41ca92073122a7.js"},31590:(e,t,n)=>{e.exports=n.p+"3564e45dfb2ed064007f910db434889f.js"},61877:(e,t,n)=>{e.exports=n.p+"3bfb519dbb980d6d8fee1bf543dfc5ae.js"},36473:(e,t,n)=>{e.exports=n.p+"ab3d46f8dd12e29e10eb35c5e406bbcb.js"},45029:(e,t,n)=>{e.exports=n.p+"d72f9e2d15bf7a51a613e2f116b1a2df.js"},62070:(e,t,n)=>{e.exports=n.p+"43139bfbcbce9de597b4985dc1e6a03b.js"},68721:(e,t,n)=>{e.exports=n.p+"f2abbd0caa62a607a87be62111595f0c.js"},65655:(e,t,n)=>{e.exports=n.p+"8b0e5da82a1aa923f454ee2e6568850b.js"},63030:(e,t,n)=>{e.exports=n.p+"474c86d7a4a0fa50030c6503fdb52392.js"},35838:(e,t,n)=>{e.exports=n.p+"cd88309c904c403022c51d1fa3ee4bf3.js"},90751:(e,t,n)=>{e.exports=n.p+"3063479c31202a0d1ecf707b2a4ce742.js"},82501:(e,t,n)=>{e.exports=n.p+"2adc6bc4a8a2bf35636e8fc7fe0df2dd.js"},67593:(e,t,n)=>{e.exports=n.p+"438ed06fb7f9516b12edaf7411c832b0.js"},16281:(e,t,n)=>{e.exports=n.p+"277128dcbc226dfeb8fde9391fb24787.js"},46642:(e,t,n)=>{e.exports=n.p+"e0fa6a4fe8bff90d50ce812e666957ca.js"},29514:(e,t,n)=>{e.exports=n.p+"262f489eb59166e1215642b60446d123.js"},23429:(e,t,n)=>{e.exports=n.p+"10c464f3f882bfeeefbc0934c2ee9fbe.js"},95187:(e,t,n)=>{e.exports=n.p+"19017707f34649cae551ee9d5ea1edbf.js"},61417:(e,t,n)=>{e.exports=n.p+"135747176621bcc94e9edd0323a81d3c.js"},69306:(e,t,n)=>{e.exports=n.p+"111d9fdb9864abba36298d1a0807fe6d.js"},72802:(e,t,n)=>{e.exports=n.p+"a13fa501edcc6c9712061e0ca5fd400e.js"},59901:(e,t,n)=>{e.exports=n.p+"ac12519ccf3cc323b28f70e35f922e3f.js"},58135:(e,t,n)=>{e.exports=n.p+"410ecb602443afbd5908a14f39b40eb2.js"},48100:(e,t,n)=>{e.exports=n.p+"73cdbb2580cd6a02d989c86e56bb83f3.js"},51975:(e,t,n)=>{e.exports=n.p+"919edf70e532c72ecd4b9579c1879bc2.js"},95623:(e,t,n)=>{e.exports=n.p+"3bd6e7a72c8b16825ce3a83b17bd681e.js"},40361:(e,t,n)=>{e.exports=n.p+"945ea249c1f1d3595cc55a51046d9032.js"},2550:(e,t,n)=>{e.exports=n.p+"363d3bac8dcd9a83332c3758185ce080.js"},52501:(e,t,n)=>{e.exports=n.p+"252b829e2dab81bc5a4c28d52f34edf5.js"},85521:(e,t,n)=>{e.exports=n.p+"5aedf04cf240c6c43540081c3bf9573e.js"},87605:(e,t,n)=>{e.exports=n.p+"ffb6d262efb0718a20d60b5fecb76ea6.js"},94977:(e,t,n)=>{e.exports=n.p+"5df362c9904925cdf574d9506e4be76d.js"},12681:(e,t,n)=>{e.exports=n.p+"5f8e9f09349e37425d6ef96bf1bf7a2d.js"},70722:(e,t,n)=>{e.exports=n.p+"979239ac9b74c2c57dcc2b66e7e3b353.js"},54217:(e,t,n)=>{e.exports=n.p+"83bd353f98aa901411c82b8af58d1296.js"},70557:(e,t,n)=>{e.exports=n.p+"3053f55c4697117c4c2cd156803b3155.js"},35050:(e,t,n)=>{e.exports=n.p+"3fa11e77942b4cf2c50e845525ae5a9f.js"},36493:(e,t,n)=>{e.exports=n.p+"3fe09c1c283d4a26d228f37a77a018b2.js"},41580:(e,t,n)=>{e.exports=n.p+"4d156ee0485ab4b40b090a3cd7b995a9.js"},78019:(e,t,n)=>{e.exports=n.p+"3a6ca6958d003ae67bb7fefc8713ee93.js"},61226:(e,t,n)=>{e.exports=n.p+"54a7b0b5248e428a4a703329f36e286f.js"},40618:(e,t,n)=>{e.exports=n.p+"5b2b9bc695bfdee92665388010a7e74d.js"},79461:(e,t,n)=>{e.exports=n.p+"4afde8c89469302b064e693fa77035f6.js"},17002:(e,t,n)=>{e.exports=n.p+"494ca3291c219565bfb6e45f8eb8c583.js"},16358:(e,t,n)=>{e.exports=n.p+"275b72e6e6256f50527832ba14ec291e.js"},4028:(e,t,n)=>{e.exports=n.p+"99e41196ce05ad5fb70891b44ac227e8.js"},92358:(e,t,n)=>{e.exports=n.p+"4816d92f4fbed14925ed1946f4135365.js"},57496:(e,t,n)=>{e.exports=n.p+"6257c20a623b032171b358cc95a1adab.js"},7905:(e,t,n)=>{e.exports=n.p+"d8f7ecdd496f3caf14f5afbedfff1937.js"},34441:(e,t,n)=>{e.exports=n.p+"1092154c23dcc20005a669b15497159f.js"},53703:(e,t,n)=>{e.exports=n.p+"a4e021a4b5d5d65cc87fee17c1886c3f.js"},61531:(e,t,n)=>{e.exports=n.p+"023545291c7d55eb893591da836fc73d.js"},23679:(e,t,n)=>{e.exports=n.p+"349237ad9565dc823ce7bcb7527ba7ee.js"},42478:(e,t,n)=>{e.exports=n.p+"6707296f86034ccf2225ce3c27370114.js"},62926:(e,t,n)=>{e.exports=n.p+"6327ff8d569aa463a91e5ea774d1980e.js"},15460:(e,t,n)=>{e.exports=n.p+"727e2cbdf695b3abfe88917062d16a5f.js"},47051:(e,t,n)=>{e.exports=n.p+"bba393726b199f66d8b4314385c1f2f0.js"},43566:(e,t,n)=>{e.exports=n.p+"96efd2775defcf3611fe9a07ed29065f.js"},85992:(e,t,n)=>{e.exports=n.p+"c3174a46927bbec0fbd8946f97bd7170.js"},66846:(e,t,n)=>{e.exports=n.p+"2ad349208b3a727abb3c9f943865a27c.js"},94158:(e,t,n)=>{e.exports=n.p+"b491027881efabe4493ad65daf3368de.js"},8164:(e,t,n)=>{e.exports=n.p+"d1f0ad8ca2a550bc292669b06a614f79.js"},97214:(e,t,n)=>{e.exports=n.p+"ad88ef07c8c702b1a5f1e3d19c1052c7.js"},99193:(e,t,n)=>{e.exports=n.p+"e45a0dfd102b67ad7cdefe10500bf0d7.js"},27036:(e,t,n)=>{e.exports=n.p+"1ef4b371fd98f0144354e57bb89d7fa3.js"},61145:(e,t,n)=>{e.exports=n.p+"50bd9a652785963a5d7d24bda4dee4ca.js"},9724:(e,t,n)=>{e.exports=n.p+"08d12eee2127dc573b757f69752c6704.js"},23094:(e,t,n)=>{e.exports=n.p+"1ff3e5ecc0f8d69a4611a7cd8337f0b2.js"},19999:(e,t,n)=>{e.exports=n.p+"489b22b946f5972fed0daab6ef587c60.js"},12562:(e,t,n)=>{e.exports=n.p+"b943c561d9e064f79f938275bad6e597.js"},41995:(e,t,n)=>{e.exports=n.p+"52fd09d1713345d9ee64dc7daea9fd6f.js"},52699:(e,t,n)=>{e.exports=n.p+"d1db2c4677dd2ee7a0c690c58798a013.js"},71367:(e,t,n)=>{e.exports=n.p+"116d29a13f16f0a9bf9c25eaa2186c24.js"},50951:(e,t,n)=>{e.exports=n.p+"55a1830305eaf8f525aad4c04c138483.js"},79636:(e,t,n)=>{e.exports=n.p+"7620537538da40e17ccbf70a43f4fd0c.js"},58279:(e,t,n)=>{e.exports=n.p+"6231f0100394f756aac18e8d972d8f2b.js"},5765:(e,t,n)=>{e.exports=n.p+"4f89e8c1a691faf5f1bfe3987ddf108a.js"},39258:(e,t,n)=>{e.exports=n.p+"4d6d9020e7e5c8d8dee7a5e374355f05.js"},42583:(e,t,n)=>{e.exports=n.p+"4430c55f023b72fb5e389cee9351b38c.js"},50149:(e,t,n)=>{e.exports=n.p+"d723acafb30584c955c9aeaedb3e03f0.js"},2726:(e,t,n)=>{e.exports=n.p+"9b3441051d8551264ac58b36253b9b10.js"},14009:(e,t,n)=>{e.exports=n.p+"677b2b5d0c9507508a831e4b67d61c6e.js"},36877:(e,t,n)=>{e.exports=n.p+"154e51d48e7dc7f244bf748e4deb64f9.js"},75599:(e,t,n)=>{e.exports=n.p+"8de1f09307a99c5a8bb0a53d32fbaaa9.js"},26744:(e,t,n)=>{e.exports=n.p+"8cfffdd2f772eec8342fdfc4d511e0cc.js"},85396:(e,t,n)=>{e.exports=n.p+"df350f726187b69bcededaaed6cf5f31.js"},42893:(e,t,n)=>{e.exports=n.p+"b8cb123e6c753c6031ab9c6a4acbbcd6.js"},33665:(e,t,n)=>{e.exports=n.p+"99e45b7d238576aa6d4c830bd8715356.js"},89030:(e,t,n)=>{e.exports=n.p+"3b8b51248b6aa0474a02a6c352d1caa1.js"},17847:(e,t,n)=>{e.exports=n.p+"b76ff0f203825dcdefb649d98de32f5b.js"},18864:(e,t,n)=>{e.exports=n.p+"764b59bdd3a89e14f88c9d63020551a1.js"},7251:(e,t,n)=>{e.exports=n.p+"843c762c24f7fac628d8c62519a7b308.js"},69933:(e,t,n)=>{e.exports=n.p+"f5dfa3d3658fddbce84d7c3ecd5504f0.js"},10647:(e,t,n)=>{e.exports=n.p+"7f9a9efc9ab681fcbf6400e2adb368a9.js"},68591:(e,t,n)=>{e.exports=n.p+"23602ad4c88f0f19e7a0a12454ebf556.js"},35661:(e,t,n)=>{e.exports=n.p+"7f79d4bde67c8013b187889b63e25bce.js"},69423:(e,t,n)=>{e.exports=n.p+"0144de97a3c256f81447e7e7135780e5.js"},10857:(e,t,n)=>{e.exports=n.p+"9296988a753e8e251ff627aef2c929e8.js"},97906:(e,t,n)=>{e.exports=n.p+"56ddbe1e119db3c02da97dc04012cf2b.js"},82198:(e,t,n)=>{e.exports=n.p+"8d7988f603ec76ecb92315442285a83d.js"},58200:(e,t,n)=>{e.exports=n.p+"250c230f9465d8affc02c67d41d7e067.js"},9904:(e,t,n)=>{e.exports=n.p+"ff9176b28afa428194276840d85679ef.js"},52745:(e,t,n)=>{e.exports=n.p+"938b32f75aefeab50ba608132c5862c8.js"},297:(e,t,n)=>{e.exports=n.p+"3aa8f5e8ff182ed46cb6570dad4c4eee.js"},3475:(e,t,n)=>{e.exports=n.p+"f59696ab0f6f26c339d7e6bb1d73a5c3.js"},18613:(e,t,n)=>{e.exports=n.p+"5cd4e1282f4409600b942819b7aa4f21.js"},63643:(e,t,n)=>{e.exports=n.p+"151786e5421aae5a57d862be1387a079.js"},49288:(e,t,n)=>{e.exports=n.p+"cd1309ef590ed94ac5735c4c667e6549.js"},89538:(e,t,n)=>{e.exports=n.p+"11e3a2a8fb5bcb9d19298a80cafd3f5a.js"},77374:(e,t,n)=>{e.exports=n.p+"0973bb38b2e3efd2a879fd8e81d50fce.js"},2449:(e,t,n)=>{e.exports=n.p+"b49ae09a10a2a2d6dfc7ba9cb37cbbb3.js"},19934:(e,t,n)=>{e.exports=n.p+"a9ed61bdf8ae777e7a6f68bf7175e839.js"},24583:(e,t,n)=>{e.exports=n.p+"2765855f04cd6d7fb7fcf0a81c1e2022.js"},1418:(e,t,n)=>{e.exports=n.p+"19df93bf1797b4caf8232cc4b544f865.js"},14129:(e,t,n)=>{e.exports=n.p+"7cc98960277ab04470e3ff9ed5fc6028.js"},26363:(e,t,n)=>{e.exports=n.p+"397e6669a1d15065bd742d20079d6a95.js"},97439:(e,t,n)=>{e.exports=n.p+"951a8cbe4efaab1b1451ffd8904fc9dd.js"},60832:(e,t,n)=>{e.exports=n.p+"4686855c499be892779f614770ec2cf7.js"},3887:(e,t,n)=>{e.exports=n.p+"a58f90f6c8db84024327b4d9059c991e.js"},58971:(e,t,n)=>{e.exports=n.p+"4b75999ea99d719689337def2fab50a3.js"},50641:(e,t,n)=>{e.exports=n.p+"49c58e614c06572ffbabe974a7fda21c.js"},66774:(e,t,n)=>{e.exports=n.p+"3db12a05792313b3c537e3256f5e2e93.js"},70726:(e,t,n)=>{e.exports=n.p+"66713913fc89a3bcad5d7804c03dcb43.js"},13378:(e,t,n)=>{e.exports=n.p+"949a350e1d9f92839865e927eb00673f.js"},31033:(e,t,n)=>{e.exports=n.p+"40f9100a898e3396df73051eb7c44cb8.js"},16178:(e,t,n)=>{e.exports=n.p+"e430b621361ebe3a4071e3cca1d0dbe8.js"},3434:(e,t,n)=>{e.exports=n.p+"77c629df0ebf40b066d0ffeb34b7711b.js"},19366:(e,t,n)=>{e.exports=n.p+"069a0d6b093e73e820f6a60a91fa614b.js"},64117:(e,t,n)=>{e.exports=n.p+"f8ee12a5cfa6ff1d3550ef30a238d89a.js"},26979:(e,t,n)=>{e.exports=n.p+"0ec8abb2e91cb079eed4605ea6851cb8.js"},7945:(e,t,n)=>{e.exports=n.p+"8db9f93698f3eea94f936fcb5986f1a3.js"},7857:(e,t,n)=>{e.exports=n.p+"70e2f052e416e2611ded0f57ed53f18a.js"},94928:(e,t,n)=>{e.exports=n.p+"93be766c753e075a3f7d5b89b3ee04ce.js"},35545:(e,t,n)=>{e.exports=n.p+"aefed4953ced506e20b934606ac083f3.js"},4806:(e,t,n)=>{e.exports=n.p+"7e4b5afab13800eedc72d1669997de99.js"},50965:(e,t,n)=>{e.exports=n.p+"0c1e757d25446799bcab87a8607dee60.js"},58322:(e,t,n)=>{e.exports=n.p+"25718a469574ade47e23567d8c543169.js"},16626:(e,t,n)=>{e.exports=n.p+"b934b22e8f8a8b1ba81dbc2cf058b0cd.js"},72363:(e,t,n)=>{e.exports=n.p+"9fd3f255cfd09016ec7f4896bc51864c.js"},53930:(e,t,n)=>{e.exports=n.p+"996d24547b492c3140f64d51f5229f3c.js"},64205:(e,t,n)=>{e.exports=n.p+"84abf03cc94d264bb38020b4ac5f76e1.js"},58488:(e,t,n)=>{e.exports=n.p+"83e2ed887ee6426c8e0aa4d976b76720.js"},61947:(e,t,n)=>{e.exports=n.p+"2e2f30806fe3accb9b340fb082a1494e.js"},99897:(e,t,n)=>{e.exports=n.p+"f5d50af31e924b65e3bd3764e8d1df3a.js"},46405:(e,t,n)=>{e.exports=n.p+"ab237eed5fd16ab99c06f0d28d465edb.js"},45794:(e,t,n)=>{e.exports=n.p+"e0564e4f4ec3f3165b6890be52cf9a5e.js"},89010:(e,t,n)=>{e.exports=n.p+"41469950e6a0ef73a57342235b44c55a.js"},7535:(e,t,n)=>{e.exports=n.p+"71f39fefd16025c224fe31cdb352ae01.js"},27109:(e,t,n)=>{e.exports=n.p+"4f5c3cb0b76fa2978539d8b64a71537d.js"},69601:(e,t,n)=>{e.exports=n.p+"583d06a5b9251de455ebd89550449842.js"},13889:(e,t,n)=>{e.exports=n.p+"e13fc7d468ab9b5797f2a44412ca2f00.js"},42317:(e,t,n)=>{e.exports=n.p+"03452373324e7ceaf58e3830eafd1a28.js"},80577:(e,t,n)=>{e.exports=n.p+"1ab96c77da77918d9160c787732c68a6.js"},37154:(e,t,n)=>{e.exports=n.p+"da3a9dc1f8b62f2221f1040e8d207d0e.js"},26504:(e,t,n)=>{e.exports=n.p+"b02d982ccb1011197a5a24800b178a0a.js"},55240:(e,t,n)=>{e.exports=n.p+"879d6bc1ca1dde95a9a98dc7a2ab0d06.js"},66816:(e,t,n)=>{e.exports=n.p+"b8b6bd460e7da0ba8f3b2218327966ee.js"},78332:(e,t,n)=>{e.exports=n.p+"2f055ac4066041b9008dd6aebf9df34b.js"},44971:(e,t,n)=>{e.exports=n.p+"d542dda7308361c34af2afb9b70d755a.js"},41072:(e,t,n)=>{e.exports=n.p+"a4bedde07e392f8ebf64341b61f75df2.js"},42820:(e,t,n)=>{e.exports=n.p+"77aaca51c1c32acaf32656d45f4dc017.js"},68089:(e,t,n)=>{e.exports=n.p+"725da29f1643c2263a437c08a1454aea.js"},92688:(e,t,n)=>{e.exports=n.p+"efc14cdf19554635e477781704353ec2.js"},92950:(e,t,n)=>{e.exports=n.p+"eaa55a522fb2cb2f0287711f42344984.js"},3092:(e,t,n)=>{e.exports=n.p+"b808fb222140a85b23ebbe0fffa906d9.js"},89780:(e,t,n)=>{e.exports=n.p+"e874d975c9128dc6eb9a513d088bed9f.js"},91763:(e,t,n)=>{e.exports=n.p+"e7e1a807af3160b342e0a3550cf8f7c5.js"},61743:(e,t,n)=>{e.exports=n.p+"48e9351c5623d4da657ce7d5d0267ea6.js"},99022:(e,t,n)=>{e.exports=n.p+"9827973b533de05b338533a0211d97d9.js"},52545:(e,t,n)=>{e.exports=n.p+"bb5bab7a675544fe31ddb7f4a77dffb9.js"},18396:(e,t,n)=>{e.exports=n.p+"a2746fc96d535b19c120d4b87dc86ef1.js"},32343:(e,t,n)=>{e.exports=n.p+"23bb1a9f279e7a732bfd405350aab114.js"},25860:(e,t,n)=>{e.exports=n.p+"b1e349371cb9c226905c846706ad8b93.js"},74623:(e,t,n)=>{e.exports=n.p+"1c57b3481f295105588972ffa1305521.js"},39037:(e,t,n)=>{e.exports=n.p+"87bce6f50196688852142c679227b1b9.js"},45984:(e,t,n)=>{e.exports=n.p+"6c67587c2093ac3a19da9f2196e040b7.js"},84039:(e,t,n)=>{e.exports=n.p+"5a496ae20cc576bef1d35972548207cf.js"},23248:(e,t,n)=>{e.exports=n.p+"5e55b301888460bd06c8e26d1011e01a.js"},80428:(e,t,n)=>{e.exports=n.p+"003671ee2a876e7614cd94390e2255b3.js"},55823:(e,t,n)=>{e.exports=n.p+"3ea020c57c2bbf457a8497df313b2e5c.js"},3731:(e,t,n)=>{e.exports=n.p+"64d6924350bd7706850cdc0dcc76ccf6.js"},26557:(e,t,n)=>{e.exports=n.p+"b1f3f77a9279cdb38846ebe13c3438bc.js"},27675:(e,t,n)=>{e.exports=n.p+"d5999827bd3af6b813a871de344b109a.js"},63790:(e,t,n)=>{e.exports=n.p+"58598705e7012f4ca1eb1dd21d3c59a5.js"},24689:(e,t,n)=>{e.exports=n.p+"70074e0c785c9a808dea76c7c7d17af3.js"},22505:(e,t,n)=>{e.exports=n.p+"1875ecdf54e78b5f07ff1bd944cf794b.js"},39822:(e,t,n)=>{e.exports=n.p+"8eede17ae9e4d25c3c17b8a8a7fc3c3d.js"},67986:(e,t,n)=>{e.exports=n.p+"eff4371180dfac54de25ed3a0105d82f.js"},59212:(e,t,n)=>{e.exports=n.p+"06d958315fc6cdbb28576b03e43203aa.js"},48191:(e,t,n)=>{e.exports=n.p+"c51840077c684be0e7e13339f85cd4a9.js"},7879:(e,t,n)=>{e.exports=n.p+"c3f345c994392d97785925e790513a9f.js"},53737:(e,t,n)=>{e.exports=n.p+"1495a3d68b15b8622c53f6688b64809f.js"},9067:(e,t,n)=>{e.exports=n.p+"7e4099fc2d04c7c1cf96892b962ba4ec.js"},50147:(e,t,n)=>{e.exports=n.p+"6c0a75dc5671c3f237a79f6e45b9891c.js"},61883:(e,t,n)=>{e.exports=n.p+"aa5623ec68d23fedb9c9c115c7d99063.js"},38572:(e,t,n)=>{e.exports=n.p+"4ef80ee74467e0297eec3cc03092da01.js"},54135:(e,t,n)=>{e.exports=n.p+"f6d7091e70dee6c74956acfef2464d08.js"},43174:(e,t,n)=>{e.exports=n.p+"4bf3bc1fbdd26ac698fef1bdf26e3ff4.js"},92539:(e,t,n)=>{e.exports=n.p+"70286c33cab463fd576766adecd2d5d9.js"},55250:(e,t,n)=>{e.exports=n.p+"1533058f0ce13acdaa8d5bdc7d147bef.js"},70490:(e,t,n)=>{e.exports=n.p+"724a16861717b5b4f786d24b56b62614.js"},51805:(e,t,n)=>{e.exports=n.p+"03aae8272914723a7bf85b984385032c.js"},66143:(e,t,n)=>{e.exports=n.p+"029ed9161a8d24a9c2ba97124020989d.js"},96850:(e,t,n)=>{e.exports=n.p+"cb652f200fc3dd740b2e7f678a9272ea.js"},50957:(e,t,n)=>{e.exports=n.p+"d43ad5f9bad9a042b49b2592c7639c28.js"},55154:(e,t,n)=>{e.exports=n.p+"d78d3b050ea95b068380d975fd413fd7.js"},61523:(e,t,n)=>{e.exports=n.p+"4d0ebf4c528cee9b0cdd3e076e06570b.js"},17480:(e,t,n)=>{e.exports=n.p+"28785bea435918d49b290d27bf660baa.js"},57570:(e,t,n)=>{e.exports=n.p+"38b1d18836e38ee7b4deaeba0c35f7b8.js"},9179:(e,t,n)=>{e.exports=n.p+"2dd82c65030101b60dffccedd8741c6e.js"},38639:(e,t,n)=>{e.exports=n.p+"47e5776dff3b80ed69ab5947dba33c76.js"},38096:(e,t,n)=>{e.exports=n.p+"e61779df91186b23e7adf2d1968b2708.js"},81889:(e,t,n)=>{e.exports=n.p+"839e3594798c1942d3c92f9acfaa5f0b.js"},19478:(e,t,n)=>{e.exports=n.p+"3567d1ea443427e944a6f189a0898819.js"},56639:(e,t,n)=>{e.exports=n.p+"c80e89199aef31e48addb2b35ea96365.js"},46754:(e,t,n)=>{e.exports=n.p+"5b6a626249d0bc43e412fffa6a9ee177.js"},14349:(e,t,n)=>{e.exports=n.p+"fd9645aaf1f70c8abc562be41bee25fc.js"},57204:(e,t,n)=>{e.exports=n.p+"57f4109bd1f06be4dc2bcb8ff7eaf1e5.js"},62473:(e,t,n)=>{e.exports=n.p+"cd9a17f94a922c7c88000b1b3cdd67df.js"},22699:(e,t,n)=>{e.exports=n.p+"755114145e5b97e5571a160a39e716db.js"},60380:(e,t,n)=>{e.exports=n.p+"5e8a4f4320a07ae4bb1d8a5cd621d955.js"},3785:(e,t,n)=>{e.exports=n.p+"e9c8f7e13e00284ce126890bf7ac46fd.js"},56051:(e,t,n)=>{e.exports=n.p+"e0adad8a8579bf99f3e22f7c214a5c64.js"},63795:(e,t,n)=>{e.exports=n.p+"3b190e5159c72fb7e27271956772bcba.js"},21666:(e,t,n)=>{e.exports=n.p+"62a96977e725e8bc809dc80afe0fedf1.js"},96014:(e,t,n)=>{e.exports=n.p+"8a31266178067a316bb2503147cdb5cb.js"},24565:(e,t,n)=>{e.exports=n.p+"a9cb92db2399f7ac97ad55fe79fe5c20.js"},83992:(e,t,n)=>{e.exports=n.p+"6d38cef4a006e6cfe54a6117aba7b600.js"},17841:(e,t,n)=>{e.exports=n.p+"8d9bb1799d9b98db107e84f10132e17f.js"},83129:(e,t,n)=>{e.exports=n.p+"432aff60ba31a74d2120031fdc894775.js"},68025:(e,t,n)=>{e.exports=n.p+"e2fe8f0d4fd950b20b30fabaea96b3f8.js"},46087:(e,t,n)=>{e.exports=n.p+"b881dca9d9a80f61d87374b4bd5a2dd5.js"},66818:(e,t,n)=>{e.exports=n.p+"ffd3b83e8b5878f4785591ff54b1dfff.js"},28327:(e,t,n)=>{e.exports=n.p+"88e2feda80ac8cfb28f1dc0ec833b40d.js"},25009:(e,t,n)=>{e.exports=n.p+"64a5f4d62507d032038dcd76d15188e1.js"},33568:(e,t,n)=>{e.exports=n.p+"aa0eee504d52a12d3a30bbd523afcc34.js"},71353:(e,t,n)=>{e.exports=n.p+"cf26dd07f19bcb5b7efbf057a6cfeb8f.js"},94914:(e,t,n)=>{e.exports=n.p+"cbdbd623038183a8c068dd24ecd90682.js"},98784:(e,t,n)=>{e.exports=n.p+"0972f21af3e75388ef55435c0b3b831d.js"},41650:(e,t,n)=>{e.exports=n.p+"4d8cb7033879cb7fcc7a43798e2bde22.js"},84301:(e,t,n)=>{e.exports=n.p+"58aab872dbdb5e1607076e1935130e03.js"},21159:(e,t,n)=>{e.exports=n.p+"ecdb4966f685f3e44b1f28fae46827a3.js"},19900:(e,t,n)=>{e.exports=n.p+"5d3314103b00c8ea165c6f9f6757f794.js"},77584:(e,t,n)=>{e.exports=n.p+"9b5a6ec07bb0a2daade10189696fc399.js"},26610:(e,t,n)=>{e.exports=n.p+"e0c565aadda4787ba4ef4456c0a7ee29.js"},43273:(e,t,n)=>{e.exports=n.p+"d5f79987405c2169278f8de37bcc9d05.js"},88332:(e,t,n)=>{e.exports=n.p+"de0fd4fd7c2d7a4887cbc99eed91f797.js"},8536:(e,t,n)=>{e.exports=n.p+"17632e1e19e438f431784dfd77e01773.js"},40456:(e,t,n)=>{e.exports=n.p+"663ffb67b9683a2126410325d1a5a152.js"},13946:(e,t,n)=>{e.exports=n.p+"e2b38a8393be2cf23f3894ace3efb1c3.js"},53801:(e,t,n)=>{e.exports=n.p+"27730a0bdc6f430cc85049a46a73a029.js"},4977:(e,t,n)=>{e.exports=n.p+"0f147528a6f36ca40c8b3ec796429f58.js"},40782:(e,t,n)=>{e.exports=n.p+"15f3800d33b854ba476c9daf1b9e0326.js"},56622:(e,t,n)=>{e.exports=n.p+"211511e7b374f57ad31acaf49dbdccb1.js"},53899:(e,t,n)=>{e.exports=n.p+"54560f13b36626237959e93b7771a484.js"},75072:(e,t,n)=>{e.exports=n.p+"582e24f5ba929e358fadfc7be4c18025.js"},28719:(e,t,n)=>{e.exports=n.p+"37ee3b5201ae2e2dc5dc8b1b20ad900e.js"},50239:(e,t,n)=>{e.exports=n.p+"cf3f6b1c74c72cb5d02870022dbc9f94.js"},45591:(e,t,n)=>{e.exports=n.p+"9696a4229fb787eeb25b26f1274b75ee.js"},31053:(e,t,n)=>{e.exports=n.p+"cf188b3f83735389d47bb12fc9f7069a.js"},68002:(e,t,n)=>{e.exports=n.p+"ba6b8b3e06cd9d0aee9c69278ee84647.js"},60186:(e,t,n)=>{e.exports=n.p+"130340e2c62b9e858f186dab5f491e55.js"},8262:(e,t,n)=>{e.exports=n.p+"6faa9e5f2a0122d2333fa450337a09b0.js"},14457:(e,t,n)=>{e.exports=n.p+"2fc0239242a898632ca8aa451cb930c2.js"},11506:(e,t,n)=>{e.exports=n.p+"92f4aab5c66f6269c7054c8fbcb3de13.js"},69287:(e,t,n)=>{e.exports=n.p+"63596b4896732fb322ab0496b4be1e74.js"},83935:(e,t,n)=>{e.exports=n.p+"5352ecd8e5f1a2637b48e18cc406edb1.js"},89018:(e,t,n)=>{e.exports=n.p+"07397bd479cbc34bc04576b4f15bdf18.js"},86066:(e,t,n)=>{e.exports=n.p+"5fedbf948ed123687f77167fac1faf8b.js"},6132:(e,t,n)=>{e.exports=n.p+"a709bba98acec5da3ea6258e245514cb.js"},64543:(e,t,n)=>{e.exports=n.p+"25eda4bb98e40a82cfd5b4bf9fbc06ec.js"},11105:(e,t,n)=>{e.exports=n.p+"3b6e7dc98c47eeafd851ca5072db4be6.js"},55873:(e,t,n)=>{e.exports=n.p+"cbdc4ca43a8c940a6c3f59a8b6f17df5.js"},6214:(e,t,n)=>{e.exports=n.p+"3c5b59a666c5d39d9ba9cc054d36a410.js"},82730:(e,t,n)=>{e.exports=n.p+"13eda3507db9cbfb400f46b9b3ff6553.js"},60835:(e,t,n)=>{e.exports=n.p+"894edcaf39c3c95818e3949d737ed459.js"},80682:(e,t,n)=>{e.exports=n.p+"0a1d9862d917663419ac2dd2e8193267.js"},22554:(e,t,n)=>{e.exports=n.p+"51f903c5ce5284a63196247cffb5ca40.js"},39444:(e,t,n)=>{e.exports=n.p+"e4917fa7632b01d28e99304d32d989f7.js"},58157:(e,t,n)=>{e.exports=n.p+"805cb6232d7a9fa46025d48a43622ecf.js"},87223:(e,t,n)=>{e.exports=n.p+"283970c76db99e2d0d90f0e7c45494f9.js"},94257:(e,t,n)=>{e.exports=n.p+"10132993df2cf9c9423b53a8a44379ab.js"},48119:(e,t,n)=>{e.exports=n.p+"1736cea368ae85240f34289307fdf67f.js"},19949:(e,t,n)=>{e.exports=n.p+"cf9c7cbfc2b609b9ae59daeab82719c4.js"},16048:(e,t,n)=>{e.exports=n.p+"119f6c45ea400e3c27e1ce172e4c881d.js"},82453:(e,t,n)=>{e.exports=n.p+"d5a6140d581e5c4eb200259ce372f40b.js"},43448:(e,t,n)=>{e.exports=n.p+"a533e643002830be2da76c9527265860.js"},15186:(e,t,n)=>{e.exports=n.p+"83387cb17a7680f59240e7b399e3ac2b.js"},88298:(e,t,n)=>{e.exports=n.p+"37172facd8a534a38f378ca2a9c7c11b.js"},28661:(e,t,n)=>{e.exports=n.p+"02174460fe8ff6a6bc19db86543b9600.js"},51573:(e,t,n)=>{e.exports=n.p+"c64d6e1e72024bb5d3d3e9bfc19d183d.js"},1602:(e,t,n)=>{e.exports=n.p+"54a10f3bddad1e6da452fee7124fe846.js"},94334:(e,t,n)=>{e.exports=n.p+"24a3ff38afde257888d755ece9bfd704.js"},18999:(e,t,n)=>{e.exports=n.p+"078dd0bd08c93b1512e3d1b777591b21.js"},8225:(e,t,n)=>{e.exports=n.p+"170487867de05784a96608617bdd544d.js"},72551:(e,t,n)=>{e.exports=n.p+"5861dfe4f2c7823623e82d0619c5bf06.js"},81545:(e,t,n)=>{e.exports=n.p+"2272c6632c52c3e402ab27b8045ab8f1.js"},61005:(e,t,n)=>{e.exports=n.p+"03980cb12dacd26148c22bb61fce440f.js"},47544:(e,t,n)=>{e.exports=n.p+"58c35e5c73bbc1664bbd67c570342aa0.js"},79202:(e,t,n)=>{e.exports=n.p+"fd5bc50b18c9f46380cbe5ec1ac2127b.js"},9032:(e,t,n)=>{e.exports=n.p+"714763ddd9bd466c95df7b042900bb87.js"},32257:(e,t,n)=>{e.exports=n.p+"4e389cce6fb8f78845fab249bce43c0b.js"},98051:(e,t,n)=>{e.exports=n.p+"17dc98279d24649d3ca77cbce8c44e83.js"},87393:(e,t,n)=>{e.exports=n.p+"a1c8660c5bcc6b6a43a7fb3c351174d9.js"},66154:(e,t,n)=>{e.exports=n.p+"a4d638b976f02f35740be031f996e088.js"},49495:(e,t,n)=>{e.exports=n.p+"b306285dfd802d091e788de0f96b8cb2.js"},25791:(e,t,n)=>{e.exports=n.p+"ddbc961769cd2ff4d4a7a136168ebf4c.js"},29601:(e,t,n)=>{e.exports=n.p+"3b544bb2c5a4e7b225a4b50235a0fd6d.js"},10920:(e,t,n)=>{e.exports=n.p+"1034e3807d1bcf55cb564491950237ab.js"},6848:(e,t,n)=>{e.exports=n.p+"d83cda12aee0c87c8b381a1234bf7798.js"},84980:(e,t,n)=>{e.exports=n.p+"9ed8c3550b5c3c1e878d0692f0338cb7.js"},22147:(e,t,n)=>{e.exports=n.p+"5f3ce6efab3c679ec1ad25ab0b3f6b2f.js"},17250:(e,t,n)=>{e.exports=n.p+"db8ca5cfb6fe4aaef215f116f6991784.js"},10655:(e,t,n)=>{e.exports=n.p+"53e3600928916423671f3388e2d67844.js"},52854:(e,t,n)=>{e.exports=n.p+"dc8240db39815020378555a4d80571c3.js"},87161:(e,t,n)=>{e.exports=n.p+"1b15b9f88acaf59b96e59c6b5f32da12.js"},28337:(e,t,n)=>{e.exports=n.p+"894052ca1f8f35cc1cf7cfb29ef75027.js"},83564:(e,t,n)=>{e.exports=n.p+"191feb6103c36b202bc01ba262916cdf.js"},80673:(e,t,n)=>{e.exports=n.p+"33b4e371d4983ab56f4db08627119f0b.js"},74944:(e,t,n)=>{e.exports=n.p+"b1170472ae4b50e3b0070eb991e502fe.js"},32167:(e,t,n)=>{e.exports=n.p+"9807cf1e443a7440371904b6525f37eb.js"},69459:(e,t,n)=>{e.exports=n.p+"9b1fd9cf4206cc32e84150c49707d811.js"},68967:(e,t,n)=>{e.exports=n.p+"d7d616d4aa8fd3f51d681242853dcde9.js"},48052:(e,t,n)=>{e.exports=n.p+"e6ad50b520736b595970c9e07029c3f1.js"},24675:(e,t,n)=>{e.exports=n.p+"49582665262ff6179b9f3a98adf7ed5c.js"},33118:(e,t,n)=>{e.exports=n.p+"7080d2a1db1608264a6d9d9fbaf2cce8.js"},54173:(e,t,n)=>{e.exports=n.p+"ef87482c92662e8b69a21f47588474ea.js"},90283:(e,t,n)=>{e.exports=n.p+"f326f2f263b1498fedbe1d07d7254d10.js"},52785:(e,t,n)=>{e.exports=n.p+"962969a46fefcace3305abd4d6e14a2e.js"},63104:(e,t,n)=>{e.exports=n.p+"b33ef9b4202539d3690251cb8213a034.js"},62061:(e,t,n)=>{e.exports=n.p+"80ddbf4f0fdde4ddba57130e61043017.js"},87872:(e,t,n)=>{e.exports=n.p+"8ed58ed9c7e1cb1ae1f2830d29011ffb.js"},49873:(e,t,n)=>{e.exports=n.p+"c4e58637b4d14c303e29d3ce4b4a210f.js"},10172:(e,t,n)=>{e.exports=n.p+"59cc05504a1c823b6d4796bf6b430822.js"},44206:(e,t,n)=>{e.exports=n.p+"b20cd9acf45420fcacfd923754185663.js"},29274:(e,t,n)=>{e.exports=n.p+"acb898eefa176c3f28344f5780cceb63.js"},19647:(e,t,n)=>{e.exports=n.p+"0d419aec4c7e2317238c3502a967b560.js"},82434:(e,t,n)=>{e.exports=n.p+"acaef5b3d4971efbf24be1a229186ff5.js"},48025:(e,t,n)=>{e.exports=n.p+"17b41db8dd7120d3a88417a1490f57b7.js"},85429:(e,t,n)=>{e.exports=n.p+"8a70eec5a46e423328f1e9d7d1a87f41.js"},5091:(e,t,n)=>{e.exports=n.p+"3cd75b9fb238f5af900205216be23a66.js"},82776:(e,t,n)=>{e.exports=n.p+"32f291b1164c2610ed1a9260677d15f0.js"},98557:(e,t,n)=>{e.exports=n.p+"c97c8951af9153f36715121ab359334c.js"},37479:(e,t,n)=>{e.exports=n.p+"f6a1ff9a83e32555a4e3c7b99727e02d.js"},99204:(e,t,n)=>{e.exports=n.p+"700530bc418f23dccca7db36bfa9f745.js"},77877:(e,t,n)=>{e.exports=n.p+"0d8cca845a71e82acc3ffc1fc95c94f3.js"},35056:(e,t,n)=>{e.exports=n.p+"ac0681e93739efad9b6f1b85453d6a1b.js"},64262:(e,t,n)=>{e.exports=n.p+"fc84e4779f22e5f1c9a70f56f47e0ed6.js"},36529:(e,t,n)=>{e.exports=n.p+"d492c085b5834c819ba21542b9147966.js"},98437:(e,t,n)=>{e.exports=n.p+"330c0deacbfbbb6f1249b5bd887d608a.js"},7722:(e,t,n)=>{e.exports=n.p+"7abc8b6c17be848321a446cfd88c27a9.js"},79021:(e,t,n)=>{e.exports=n.p+"4b73278b511eebb4d0f44a0eec778327.js"},33245:(e,t,n)=>{e.exports=n.p+"796a2d1a925ed311f35e5fc5907a3132.js"},25996:(e,t,n)=>{e.exports=n.p+"2772fa250d538d9b7a8702fb6c50d195.js"},21197:(e,t,n)=>{e.exports=n.p+"9d29de85381ba75c190573ea82708954.js"},77669:(e,t,n)=>{e.exports=n.p+"5fc5b7fdc1899b18bee20c7905c76182.js"},37533:(e,t,n)=>{e.exports=n.p+"531e426da5d4c152efe1e9522991e466.js"},45626:(e,t,n)=>{e.exports=n.p+"1d633c2bf495c2c286fe37d00950e1d4.js"},46527:(e,t,n)=>{e.exports=n.p+"4123d5ea3e1f99dd3a5f2a89e16c6e59.js"},7406:(e,t,n)=>{e.exports=n.p+"49c44a682cc7627c4a2e8b4d1cfec022.js"},38267:(e,t,n)=>{e.exports=n.p+"45873024a393c691246898090c972cd3.js"},8845:(e,t,n)=>{e.exports=n.p+"92e96a5183122509403347f8fde3e407.js"},44834:(e,t,n)=>{e.exports=n.p+"78b1ba82f7882d931072c4ef6e87f579.js"},95498:(e,t,n)=>{e.exports=n.p+"30d2b805bcbc5d6bd558d7bdf9137a0e.js"},9061:(e,t,n)=>{e.exports=n.p+"3afb97252c417c5f0dd54e20b1954f63.js"},79580:(e,t,n)=>{e.exports=n.p+"356c61041d30223f74711e79c8bb8ae9.js"},51502:(e,t,n)=>{e.exports=n.p+"0e693b29bbe881d5b78f15fb9cacbedd.js"},82266:(e,t,n)=>{e.exports=n.p+"4dec4bb457555975c148226534ecbdbe.js"},37779:(e,t,n)=>{e.exports=n.p+"4150db3307181a1afef55ab2c9ec191e.js"},35880:(e,t,n)=>{e.exports=n.p+"ebaed1b3f483c7391037315a62571718.js"},36722:(e,t,n)=>{e.exports=n.p+"d3c6f63283deafb27231ec767a161534.js"},76394:(e,t,n)=>{e.exports=n.p+"e4bea9a2a2680d970c13cc4ed89bc1a0.js"},10754:(e,t,n)=>{e.exports=n.p+"002a2ac7b7d3b3b807ddcb210cfc91eb.js"},24174:(e,t,n)=>{e.exports=n.p+"83d1c691b58768e3ec0a1f88450a7ceb.js"},11911:(e,t,n)=>{e.exports=n.p+"6416bde11154c29c4e296eb82fed0bdf.js"},52334:(e,t,n)=>{e.exports=n.p+"53e2fb3b82eafad81897aab9ab79edff.js"},24852:(e,t,n)=>{e.exports=n.p+"3d7fd940e543a183c4c376ef0d65773a.js"},13840:(e,t,n)=>{e.exports=n.p+"e6e768df4733fa1a1c8a9b06a24ff2fd.js"},44884:(e,t,n)=>{e.exports=n.p+"2091e4c01015d7dda392116f3ae59801.js"},74474:(e,t,n)=>{e.exports=n.p+"daad7cddd8afb1713b51cf5882d2da34.js"},27067:(e,t,n)=>{e.exports=n.p+"52c9726f9e52ed3a57c0634718366029.js"},33948:(e,t,n)=>{e.exports=n.p+"6bbbe63c75c85941f855ab27fb5f36db.js"},20425:(e,t,n)=>{e.exports=n.p+"3c1857a15493f62c5c85c13007a6c32c.js"},21836:(e,t,n)=>{e.exports=n.p+"6aa13e92b5cf7d479e73acdc7c05abf3.js"},36881:(e,t,n)=>{e.exports=n.p+"c4ee489cb1eb39f3d31e99fcc78e886e.js"},83439:(e,t,n)=>{e.exports=n.p+"5d833ca045603c1105d2db3b9d931274.js"},14984:(e,t,n)=>{e.exports=n.p+"e542ddbb78bb244c0465f22e0e11ab61.js"},52980:(e,t,n)=>{e.exports=n.p+"52ee9d28ed4c3389951a46084343a993.js"},72426:(e,t,n)=>{e.exports=n.p+"8efee5c45bbfdd52eec7a8a0eec72ec3.js"},79257:(e,t,n)=>{e.exports=n.p+"f93c341314b490174cf67fed1ca62ee0.js"},8679:(e,t,n)=>{"use strict";var i=n(59864),r={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},s={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};function l(e){return i.isMemo(e)?s:a[e.$$typeof]||r}a[i.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},a[i.Memo]=s;var c=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,h=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,p=Object.prototype;e.exports=function e(t,n,i){if("string"!=typeof n){if(p){var r=f(n);r&&r!==p&&e(t,r,i)}var s=u(n);d&&(s=s.concat(d(n)));for(var a=l(t),g=l(n),m=0;m<s.length;++m){var v=s[m];if(!(o[v]||i&&i[v]||g&&g[v]||a&&a[v])){var b=h(n,v);try{c(t,v,b)}catch(e){}}}}return t}},18139:e=>{var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,i=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,l=/^\s+|\s+$/g,c="";function u(e){return e?e.replace(l,c):c}e.exports=function(e,l){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];l=l||{};var d=1,h=1;function f(e){var t=e.match(n);t&&(d+=t.length);var i=e.lastIndexOf("\n");h=~i?e.length-i:h+e.length}function p(){var e={line:d,column:h};return function(t){return t.position=new g(e),y(),t}}function g(e){this.start=e,this.end={line:d,column:h},this.source=l.source}g.prototype.content=e;var m=[];function v(t){var n=new Error(l.source+":"+d+":"+h+": "+t);if(n.reason=t,n.filename=l.source,n.line=d,n.column=h,n.source=e,!l.silent)throw n;m.push(n)}function b(t){var n=t.exec(e);if(n){var i=n[0];return f(i),e=e.slice(i.length),n}}function y(){b(i)}function w(e){var t;for(e=e||[];t=_();)!1!==t&&e.push(t);return e}function _(){var t=p();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;c!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,c===e.charAt(n-1))return v("End of comment missing");var i=e.slice(2,n-2);return h+=2,f(i),e=e.slice(n),h+=2,t({type:"comment",comment:i})}}function A(){var e=p(),n=b(r);if(n){if(_(),!b(o))return v("property missing ':'");var i=b(s),l=e({type:"declaration",property:u(n[0].replace(t,c)),value:i?u(i[0].replace(t,c)):c});return b(a),l}}return y(),function(){var e,t=[];for(w(t);e=A();)!1!==e&&(t.push(e),w(t));return t}()}},48738:e=>{e.exports=function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}},29208:(e,t,n)=>{var i,r="__lodash_hash_undefined__",o=1/0,s="[object Function]",a="[object GeneratorFunction]",l="[object Symbol]",c=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,u=/^\w*$/,d=/^\./,h=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,f=/\\(\\)?/g,p=/^\[object .+?Constructor\]$/,g="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,m="object"==typeof self&&self&&self.Object===Object&&self,v=g||m||Function("return this")(),b=Array.prototype,y=Function.prototype,w=Object.prototype,_=v["__core-js_shared__"],A=(i=/[^.]+$/.exec(_&&_.keys&&_.keys.IE_PROTO||""))?"Symbol(src)_1."+i:"",x=y.toString,C=w.hasOwnProperty,S=w.toString,E=RegExp("^"+x.call(C).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),k=v.Symbol,$=b.splice,M=P(v,"Map"),T=P(Object,"create"),R=k?k.prototype:void 0,L=R?R.toString:void 0;function O(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function F(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function D(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function I(e,t){for(var n,i,r=e.length;r--;)if((n=e[r][0])===(i=t)||n!=n&&i!=i)return r;return-1}function j(e,t){var n,i,r=e.__data__;return("string"==(i=typeof(n=t))||"number"==i||"symbol"==i||"boolean"==i?"__proto__"!==n:null===n)?r["string"==typeof t?"string":"hash"]:r.map}function P(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){if(!W(e)||A&&A in e)return!1;var t=function(e){var t=W(e)?S.call(e):"";return t==s||t==a}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?E:p;return t.test(function(e){if(null!=e){try{return x.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}(n)?n:void 0}O.prototype.clear=function(){this.__data__=T?T(null):{}},O.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},O.prototype.get=function(e){var t=this.__data__;if(T){var n=t[e];return n===r?void 0:n}return C.call(t,e)?t[e]:void 0},O.prototype.has=function(e){var t=this.__data__;return T?void 0!==t[e]:C.call(t,e)},O.prototype.set=function(e,t){return this.__data__[e]=T&&void 0===t?r:t,this},F.prototype.clear=function(){this.__data__=[]},F.prototype.delete=function(e){var t=this.__data__,n=I(t,e);return!(n<0||(n==t.length-1?t.pop():$.call(t,n,1),0))},F.prototype.get=function(e){var t=this.__data__,n=I(t,e);return n<0?void 0:t[n][1]},F.prototype.has=function(e){return I(this.__data__,e)>-1},F.prototype.set=function(e,t){var n=this.__data__,i=I(n,e);return i<0?n.push([e,t]):n[i][1]=t,this},D.prototype.clear=function(){this.__data__={hash:new O,map:new(M||F),string:new O}},D.prototype.delete=function(e){return j(this,e).delete(e)},D.prototype.get=function(e){return j(this,e).get(e)},D.prototype.has=function(e){return j(this,e).has(e)},D.prototype.set=function(e,t){return j(this,e).set(e,t),this};var B=N((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(z(e))return L?L.call(e):"";var t=e+"";return"0"==t&&1/e==-o?"-0":t}(t);var n=[];return d.test(e)&&n.push(""),e.replace(h,(function(e,t,i,r){n.push(i?r.replace(f,"$1"):t||e)})),n}));function U(e){if("string"==typeof e||z(e))return e;var t=e+"";return"0"==t&&1/e==-o?"-0":t}function N(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var i=arguments,r=t?t.apply(this,i):i[0],o=n.cache;if(o.has(r))return o.get(r);var s=e.apply(this,i);return n.cache=o.set(r,s),s};return n.cache=new(N.Cache||D),n}N.Cache=D;var H=Array.isArray;function W(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function z(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&S.call(e)==l}e.exports=function(e,t,n){var i=null==e?void 0:function(e,t){var n;t=function(e,t){if(H(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!z(e))||u.test(e)||!c.test(e)||null!=t&&e in Object(t)}(t,e)?[t]:H(n=t)?n:B(n);for(var i=0,r=t.length;null!=e&&i<r;)e=e[U(t[i++])];return i&&i==r?e:void 0}(e,t);return void 0===i?n:i}},70729:e=>{"use strict";var t={};function n(e,i,r){var o,s,a,l,c,u="";for("string"!=typeof i&&(r=i,i=n.defaultChars),void 0===r&&(r=!0),c=function(e){var n,i,r=t[e];if(r)return r;for(r=t[e]=[],n=0;n<128;n++)i=String.fromCharCode(n),/^[0-9a-z]$/i.test(i)?r.push(i):r.push("%"+("0"+n.toString(16).toUpperCase()).slice(-2));for(n=0;n<e.length;n++)r[e.charCodeAt(n)]=e[n];return r}(i),o=0,s=e.length;o<s;o++)if(a=e.charCodeAt(o),r&&37===a&&o+2<s&&/^[0-9a-f]{2}$/i.test(e.slice(o+1,o+3)))u+=e.slice(o,o+3),o+=2;else if(a<128)u+=c[a];else if(a>=55296&&a<=57343){if(a>=55296&&a<=56319&&o+1<s&&(l=e.charCodeAt(o+1))>=56320&&l<=57343){u+=encodeURIComponent(e[o]+e[o+1]),o++;continue}u+="%EF%BF%BD"}else u+=encodeURIComponent(e[o]);return u}n.defaultChars=";/?:@&=+$,-_.!~*'()#",n.componentChars="-_.!~*'()",e.exports=n},87410:e=>{"use strict";var t=[];function n(e){for(var n=-1,i=0;i<t.length;i++)if(t[i].identifier===e){n=i;break}return n}function i(e,i){for(var o={},s=[],a=0;a<e.length;a++){var l=e[a],c=i.base?l[0]+i.base:l[0],u=o[c]||0,d="".concat(c," ").concat(u);o[c]=u+1;var h=n(d),f={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==h)t[h].references++,t[h].updater(f);else{var p=r(f,i);i.byIndex=a,t.splice(a,0,{identifier:d,updater:p,references:1})}s.push(d)}return s}function r(e,t){var n=t.domAPI(t);return n.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,r){var o=i(e=e||[],r=r||{});return function(e){e=e||[];for(var s=0;s<o.length;s++){var a=n(o[s]);t[a].references--}for(var l=i(e,r),c=0;c<o.length;c++){var u=n(o[c]);0===t[u].references&&(t[u].updater(),t.splice(u,1))}o=l}}},51991:e=>{"use strict";var t={};e.exports=function(e,n){var i=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!i)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");i.appendChild(n)}},12434:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},33702:(e,t,n)=>{"use strict";e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},44766:e=>{"use strict";e.exports=function(e){var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var i="";n.supports&&(i+="@supports (".concat(n.supports,") {")),n.media&&(i+="@media ".concat(n.media," {"));var r=void 0!==n.layer;r&&(i+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),i+=n.css,r&&(i+="}"),n.media&&(i+="}"),n.supports&&(i+="}");var o=n.sourceMap;o&&"undefined"!=typeof btoa&&(i+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),t.styleTagTransform(i,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},81422:e=>{"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},55760:e=>{"use strict";function t(e){this._maxSize=e,this.clear()}t.prototype.clear=function(){this._size=0,this._values=Object.create(null)},t.prototype.get=function(e){return this._values[e]},t.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var n=/[^.^\]^[]+|(?=\[\]|\.\.)/g,i=/^\d+$/,r=/^\d/,o=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,s=/^\s*(['"]?)(.*?)(\1)\s*$/,a=new t(512),l=new t(512),c=new t(512);function u(e){return a.get(e)||a.set(e,d(e).map((function(e){return e.replace(s,"$2")})))}function d(e){return e.match(n)||[""]}function h(e){return"string"==typeof e&&e&&-1!==["'",'"'].indexOf(e.charAt(0))}function f(e){return!h(e)&&(function(e){return e.match(r)&&!e.match(i)}(e)||function(e){return o.test(e)}(e))}e.exports={Cache:t,split:d,normalizePath:u,setter:function(e){var t=u(e);return l.get(e)||l.set(e,(function(e,n){for(var i=0,r=t.length,o=e;i<r-1;){var s=t[i];if("__proto__"===s||"constructor"===s||"prototype"===s)return e;o=o[t[i++]]}o[t[i]]=n}))},getter:function(e,t){var n=u(e);return c.get(e)||c.set(e,(function(e){for(var i=0,r=n.length;i<r;){if(null==e&&t)return;e=e[n[i++]]}return e}))},join:function(e){return e.reduce((function(e,t){return e+(h(t)||i.test(t)?"["+t+"]":(e?".":"")+t)}),"")},forEach:function(e,t,n){!function(e,t,n){var i,r,o,s,a=e.length;for(r=0;r<a;r++)(i=e[r])&&(f(i)&&(i='"'+i+'"'),o=!(s=h(i))&&/^\d+$/.test(i),t.call(n,i,s,o,r,e))}(Array.isArray(e)?e:d(e),t,n)}}},93946:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},o.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var s=n(53239),a=n(45697),l=n(81672),c=n(72307),u=n(1048),d=(0,u.getAceInstance)(),h=function(e){function t(t){var n=e.call(this,t)||this;return u.editorEvents.forEach((function(e){n[e]=n[e].bind(n)})),n.debounce=u.debounce,n}return r(t,e),t.prototype.isInShadow=function(e){for(var t=e&&e.parentNode;t;){if("[object ShadowRoot]"===t.toString())return!0;t=t.parentNode}return!1},t.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.className,i=t.onBeforeLoad,r=t.onValidate,o=t.mode,s=t.focus,a=t.theme,l=t.fontSize,c=t.value,h=t.defaultValue,f=t.showGutter,p=t.wrapEnabled,g=t.showPrintMargin,m=t.scrollMargin,v=void 0===m?[0,0,0,0]:m,b=t.keyboardHandler,y=t.onLoad,w=t.commands,_=t.annotations,A=t.markers,x=t.placeholder;this.editor=d.edit(this.refEditor),i&&i(d);for(var C=Object.keys(this.props.editorProps),S=0;S<C.length;S++)this.editor[C[S]]=this.props.editorProps[C[S]];this.props.debounceChangePeriod&&(this.onChange=this.debounce(this.onChange,this.props.debounceChangePeriod)),this.editor.renderer.setScrollMargin(v[0],v[1],v[2],v[3]),this.isInShadow(this.refEditor)&&this.editor.renderer.attachToShadowRoot(),this.editor.getSession().setMode("string"==typeof o?"ace/mode/".concat(o):o),a&&""!==a&&this.editor.setTheme("ace/theme/".concat(a)),this.editor.setFontSize("number"==typeof l?"".concat(l,"px"):l),this.editor.getSession().setValue(h||c||""),this.props.navigateToFileEnd&&this.editor.navigateFileEnd(),this.editor.renderer.setShowGutter(f),this.editor.getSession().setUseWrapMode(p),this.editor.setShowPrintMargin(g),this.editor.on("focus",this.onFocus),this.editor.on("blur",this.onBlur),this.editor.on("copy",this.onCopy),this.editor.on("paste",this.onPaste),this.editor.on("change",this.onChange),this.editor.on("input",this.onInput),x&&this.updatePlaceholder(),this.editor.getSession().selection.on("changeSelection",this.onSelectionChange),this.editor.getSession().selection.on("changeCursor",this.onCursorChange),r&&this.editor.getSession().on("changeAnnotation",(function(){var t=e.editor.getSession().getAnnotations();e.props.onValidate(t)})),this.editor.session.on("changeScrollTop",this.onScroll),this.editor.getSession().setAnnotations(_||[]),A&&A.length>0&&this.handleMarkers(A);var E=this.editor.$options;u.editorOptions.forEach((function(t){E.hasOwnProperty(t)?e.editor.setOption(t,e.props[t]):e.props[t]&&console.warn("ReactAce: editor option ".concat(t," was activated but not found. Did you need to import a related tool or did you possibly mispell the option?"))})),this.handleOptions(this.props),Array.isArray(w)&&w.forEach((function(t){"string"==typeof t.exec?e.editor.commands.bindKey(t.bindKey,t.exec):e.editor.commands.addCommand(t)})),b&&this.editor.setKeyboardHandler("ace/keyboard/"+b),n&&(this.refEditor.className+=" "+n),y&&y(this.editor),this.editor.resize(),s&&this.editor.focus()},t.prototype.componentDidUpdate=function(e){for(var t=e,n=this.props,i=0;i<u.editorOptions.length;i++){var r=u.editorOptions[i];n[r]!==t[r]&&this.editor.setOption(r,n[r])}if(n.className!==t.className){var o=this.refEditor.className.trim().split(" ");t.className.trim().split(" ").forEach((function(e){var t=o.indexOf(e);o.splice(t,1)})),this.refEditor.className=" "+n.className+" "+o.join(" ")}var s=this.editor&&null!=n.value&&this.editor.getValue()!==n.value;if(s){this.silent=!0;var a=this.editor.session.selection.toJSON();this.editor.setValue(n.value,n.cursorStart),this.editor.session.selection.fromJSON(a),this.silent=!1}n.placeholder!==t.placeholder&&this.updatePlaceholder(),n.mode!==t.mode&&this.editor.getSession().setMode("string"==typeof n.mode?"ace/mode/".concat(n.mode):n.mode),n.theme!==t.theme&&this.editor.setTheme("ace/theme/"+n.theme),n.keyboardHandler!==t.keyboardHandler&&(n.keyboardHandler?this.editor.setKeyboardHandler("ace/keyboard/"+n.keyboardHandler):this.editor.setKeyboardHandler(null)),n.fontSize!==t.fontSize&&this.editor.setFontSize("number"==typeof n.fontSize?"".concat(n.fontSize,"px"):n.fontSize),n.wrapEnabled!==t.wrapEnabled&&this.editor.getSession().setUseWrapMode(n.wrapEnabled),n.showPrintMargin!==t.showPrintMargin&&this.editor.setShowPrintMargin(n.showPrintMargin),n.showGutter!==t.showGutter&&this.editor.renderer.setShowGutter(n.showGutter),c(n.setOptions,t.setOptions)||this.handleOptions(n),!s&&c(n.annotations,t.annotations)||this.editor.getSession().setAnnotations(n.annotations||[]),!c(n.markers,t.markers)&&Array.isArray(n.markers)&&this.handleMarkers(n.markers),c(n.scrollMargin,t.scrollMargin)||this.handleScrollMargins(n.scrollMargin),e.height===this.props.height&&e.width===this.props.width||this.editor.resize(),this.props.focus&&!e.focus&&this.editor.focus()},t.prototype.handleScrollMargins=function(e){void 0===e&&(e=[0,0,0,0]),this.editor.renderer.setScrollMargin(e[0],e[1],e[2],e[3])},t.prototype.componentWillUnmount=function(){this.editor&&(this.editor.destroy(),this.editor=null)},t.prototype.onChange=function(e){if(this.props.onChange&&!this.silent){var t=this.editor.getValue();this.props.onChange(t,e)}},t.prototype.onSelectionChange=function(e){if(this.props.onSelectionChange){var t=this.editor.getSelection();this.props.onSelectionChange(t,e)}},t.prototype.onCursorChange=function(e){if(this.props.onCursorChange){var t=this.editor.getSelection();this.props.onCursorChange(t,e)}},t.prototype.onInput=function(e){this.props.onInput&&this.props.onInput(e),this.props.placeholder&&this.updatePlaceholder()},t.prototype.onFocus=function(e){this.props.onFocus&&this.props.onFocus(e,this.editor)},t.prototype.onBlur=function(e){this.props.onBlur&&this.props.onBlur(e,this.editor)},t.prototype.onCopy=function(e){var t=e.text;this.props.onCopy&&this.props.onCopy(t)},t.prototype.onPaste=function(e){var t=e.text;this.props.onPaste&&this.props.onPaste(t)},t.prototype.onScroll=function(){this.props.onScroll&&this.props.onScroll(this.editor)},t.prototype.handleOptions=function(e){for(var t=Object.keys(e.setOptions),n=0;n<t.length;n++)this.editor.setOption(t[n],e.setOptions[t[n]])},t.prototype.handleMarkers=function(e){var t=this,n=this.editor.getSession().getMarkers(!0);for(var i in n)n.hasOwnProperty(i)&&this.editor.getSession().removeMarker(n[i].id);for(var i in n=this.editor.getSession().getMarkers(!1))n.hasOwnProperty(i)&&"ace_active-line"!==n[i].clazz&&"ace_selected-word"!==n[i].clazz&&this.editor.getSession().removeMarker(n[i].id);e.forEach((function(e){var n=e.startRow,i=e.startCol,r=e.endRow,o=e.endCol,a=e.className,l=e.type,c=e.inFront,u=void 0!==c&&c,d=new s.Range(n,i,r,o);t.editor.getSession().addMarker(d,a,l,u)}))},t.prototype.updatePlaceholder=function(){var e=this.editor,t=this.props.placeholder,n=!e.session.getValue().length,i=e.renderer.placeholderNode;!n&&i?(e.renderer.scroller.removeChild(e.renderer.placeholderNode),e.renderer.placeholderNode=null):n&&!i?((i=e.renderer.placeholderNode=document.createElement("div")).textContent=t||"",i.className="ace_comment ace_placeholder",i.style.padding="0 9px",i.style.position="absolute",i.style.zIndex="3",e.renderer.scroller.appendChild(i)):n&&i&&(i.textContent=t)},t.prototype.updateRef=function(e){this.refEditor=e},t.prototype.render=function(){var e=this.props,t=e.name,n=e.width,i=e.height,r=e.style,s=o({width:n,height:i},r);return l.createElement("div",{ref:this.updateRef,id:t,style:s})},t.propTypes={mode:a.oneOfType([a.string,a.object]),focus:a.bool,theme:a.string,name:a.string,className:a.string,height:a.string,width:a.string,fontSize:a.oneOfType([a.number,a.string]),showGutter:a.bool,onChange:a.func,onCopy:a.func,onPaste:a.func,onFocus:a.func,onInput:a.func,onBlur:a.func,onScroll:a.func,value:a.string,defaultValue:a.string,onLoad:a.func,onSelectionChange:a.func,onCursorChange:a.func,onBeforeLoad:a.func,onValidate:a.func,minLines:a.number,maxLines:a.number,readOnly:a.bool,highlightActiveLine:a.bool,tabSize:a.number,showPrintMargin:a.bool,cursorStart:a.number,debounceChangePeriod:a.number,editorProps:a.object,setOptions:a.object,style:a.object,scrollMargin:a.array,annotations:a.array,markers:a.array,keyboardHandler:a.string,wrapEnabled:a.bool,enableSnippets:a.bool,enableBasicAutocompletion:a.oneOfType([a.bool,a.array]),enableLiveAutocompletion:a.oneOfType([a.bool,a.array]),navigateToFileEnd:a.bool,commands:a.array,placeholder:a.string},t.defaultProps={name:"ace-editor",focus:!1,mode:"",theme:"",height:"500px",width:"500px",fontSize:12,enableSnippets:!1,showGutter:!0,onChange:null,onPaste:null,onLoad:null,onScroll:null,minLines:null,maxLines:null,readOnly:!1,highlightActiveLine:!0,showPrintMargin:!0,tabSize:4,cursorStart:1,editorProps:{},style:{},scrollMargin:[0,0,0,0],setOptions:{},wrapEnabled:!1,enableBasicAutocompletion:!1,enableLiveAutocompletion:!1,placeholder:null,navigateToFileEnd:!0},t}(l.Component);t.default=h},63532:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(45697),s=n(81672),a=n(88663),l=n(52027),c=function(e){function t(t){var n=e.call(this,t)||this;return n.state={value:n.props.value},n.onChange=n.onChange.bind(n),n.diff=n.diff.bind(n),n}return r(t,e),t.prototype.componentDidUpdate=function(){var e=this.props.value;e!==this.state.value&&this.setState({value:e})},t.prototype.onChange=function(e){this.setState({value:e}),this.props.onChange&&this.props.onChange(e)},t.prototype.diff=function(){var e=new l,t=this.state.value[0],n=this.state.value[1];if(0===t.length&&0===n.length)return[];var i=e.diff_main(t,n);e.diff_cleanupSemantic(i);var r=this.generateDiffedLines(i);return this.setCodeMarkers(r)},t.prototype.generateDiffedLines=function(e){var t={left:[],right:[]},n={left:1,right:1};return e.forEach((function(e){var i=e[0],r=e[1],o=r.split("\n").length-1;if(0!==r.length){var s=r[0],a=r[r.length-1],l=0;switch(i){case 0:n.left+=o,n.right+=o;break;case-1:"\n"===s&&(n.left++,o--),0===(l=o)&&t.right.push({startLine:n.right,endLine:n.right}),"\n"===a&&(l-=1),t.left.push({startLine:n.left,endLine:n.left+l}),n.left+=o;break;case 1:"\n"===s&&(n.right++,o--),0===(l=o)&&t.left.push({startLine:n.left,endLine:n.left}),"\n"===a&&(l-=1),t.right.push({startLine:n.right,endLine:n.right+l}),n.right+=o;break;default:throw new Error("Diff type was not defined.")}}})),t},t.prototype.setCodeMarkers=function(e){void 0===e&&(e={left:[],right:[]});for(var t=[],n={left:[],right:[]},i=0;i<e.left.length;i++){var r={startRow:e.left[i].startLine-1,endRow:e.left[i].endLine,type:"text",className:"codeMarker"};n.left.push(r)}for(i=0;i<e.right.length;i++)r={startRow:e.right[i].startLine-1,endRow:e.right[i].endLine,type:"text",className:"codeMarker"},n.right.push(r);return t[0]=n.left,t[1]=n.right,t},t.prototype.render=function(){var e=this.diff();return s.createElement(a.default,{name:this.props.name,className:this.props.className,focus:this.props.focus,orientation:this.props.orientation,splits:this.props.splits,mode:this.props.mode,theme:this.props.theme,height:this.props.height,width:this.props.width,fontSize:this.props.fontSize,showGutter:this.props.showGutter,onChange:this.onChange,onPaste:this.props.onPaste,onLoad:this.props.onLoad,onScroll:this.props.onScroll,minLines:this.props.minLines,maxLines:this.props.maxLines,readOnly:this.props.readOnly,highlightActiveLine:this.props.highlightActiveLine,showPrintMargin:this.props.showPrintMargin,tabSize:this.props.tabSize,cursorStart:this.props.cursorStart,editorProps:this.props.editorProps,style:this.props.style,scrollMargin:this.props.scrollMargin,setOptions:this.props.setOptions,wrapEnabled:this.props.wrapEnabled,enableBasicAutocompletion:this.props.enableBasicAutocompletion,enableLiveAutocompletion:this.props.enableLiveAutocompletion,value:this.state.value,markers:e})},t.propTypes={cursorStart:o.number,editorProps:o.object,enableBasicAutocompletion:o.bool,enableLiveAutocompletion:o.bool,focus:o.bool,fontSize:o.number,height:o.string,highlightActiveLine:o.bool,maxLines:o.number,minLines:o.number,mode:o.string,name:o.string,className:o.string,onLoad:o.func,onPaste:o.func,onScroll:o.func,onChange:o.func,orientation:o.string,readOnly:o.bool,scrollMargin:o.array,setOptions:o.object,showGutter:o.bool,showPrintMargin:o.bool,splits:o.number,style:o.object,tabSize:o.number,theme:o.string,value:o.array,width:o.string,wrapEnabled:o.bool},t.defaultProps={cursorStart:1,editorProps:{},enableBasicAutocompletion:!1,enableLiveAutocompletion:!1,focus:!1,fontSize:12,height:"500px",highlightActiveLine:!0,maxLines:null,minLines:null,mode:"",name:"ace-editor",onLoad:null,onScroll:null,onPaste:null,onChange:null,orientation:"beside",readOnly:!1,scrollMargin:[0,0,0,0],setOptions:{},showGutter:!0,showPrintMargin:!0,splits:2,style:{},tabSize:4,theme:"github",value:["",""],width:"500px",wrapEnabled:!0},t}(s.Component);t.default=c},1048:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAceInstance=t.debounce=t.editorEvents=t.editorOptions=void 0,t.editorOptions=["minLines","maxLines","readOnly","highlightActiveLine","tabSize","enableBasicAutocompletion","enableLiveAutocompletion","enableSnippets"],t.editorEvents=["onChange","onFocus","onInput","onBlur","onCopy","onPaste","onSelectionChange","onCursorChange","onScroll","handleOptions","updateRef"],t.getAceInstance=function(){var e;return"undefined"==typeof window?(n.g.window={},e=n(53239),delete n.g.window):window.ace?(e=window.ace).acequire=window.ace.require||window.ace.acequire:e=n(53239),e},t.debounce=function(e,t){var n=null;return function(){var i=this,r=arguments;clearTimeout(n),n=setTimeout((function(){e.apply(i,r)}),t)}}},74981:(e,t,n)=>{"use strict";var i=n(93946);n(63532).default,n(88663).default,t.ZP=i.default},88663:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},o.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var s=n(1048),a=(0,s.getAceInstance)(),l=n(53239),c=n(93083),u=n(45697),d=n(81672),h=n(72307),f=n(29208),p=function(e){function t(t){var n=e.call(this,t)||this;return s.editorEvents.forEach((function(e){n[e]=n[e].bind(n)})),n.debounce=s.debounce,n}return r(t,e),t.prototype.isInShadow=function(e){for(var t=e&&e.parentNode;t;){if("[object ShadowRoot]"===t.toString())return!0;t=t.parentNode}return!1},t.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.className,i=t.onBeforeLoad,r=t.mode,o=t.focus,l=t.theme,u=t.fontSize,d=t.value,h=t.defaultValue,p=t.cursorStart,g=t.showGutter,m=t.wrapEnabled,v=t.showPrintMargin,b=t.scrollMargin,y=void 0===b?[0,0,0,0]:b,w=t.keyboardHandler,_=t.onLoad,A=t.commands,x=t.annotations,C=t.markers,S=t.splits;this.editor=a.edit(this.refEditor),this.isInShadow(this.refEditor)&&this.editor.renderer.attachToShadowRoot(),this.editor.setTheme("ace/theme/".concat(l)),i&&i(a);var E=Object.keys(this.props.editorProps),k=new c.Split(this.editor.container,"ace/theme/".concat(l),S);this.editor.env.split=k,this.splitEditor=k.getEditor(0),this.split=k,this.editor.setShowPrintMargin(!1),this.editor.renderer.setShowGutter(!1);var $=this.splitEditor.$options;this.props.debounceChangePeriod&&(this.onChange=this.debounce(this.onChange,this.props.debounceChangePeriod)),k.forEach((function(t,n){for(var i=0;i<E.length;i++)t[E[i]]=e.props.editorProps[E[i]];var o=f(h,n),c=f(d,n,"");t.session.setUndoManager(new a.UndoManager),t.setTheme("ace/theme/".concat(l)),t.renderer.setScrollMargin(y[0],y[1],y[2],y[3]),t.getSession().setMode("ace/mode/".concat(r)),t.setFontSize(u),t.renderer.setShowGutter(g),t.getSession().setUseWrapMode(m),t.setShowPrintMargin(v),t.on("focus",e.onFocus),t.on("blur",e.onBlur),t.on("input",e.onInput),t.on("copy",e.onCopy),t.on("paste",e.onPaste),t.on("change",e.onChange),t.getSession().selection.on("changeSelection",e.onSelectionChange),t.getSession().selection.on("changeCursor",e.onCursorChange),t.session.on("changeScrollTop",e.onScroll),t.setValue(void 0===o?c:o,p);var b=f(x,n,[]),_=f(C,n,[]);for(t.getSession().setAnnotations(b),_&&_.length>0&&e.handleMarkers(_,t),i=0;i<s.editorOptions.length;i++){var S=s.editorOptions[i];$.hasOwnProperty(S)?t.setOption(S,e.props[S]):e.props[S]&&console.warn("ReaceAce: editor option ".concat(S," was activated but not found. Did you need to import a related tool or did you possibly mispell the option?"))}e.handleOptions(e.props,t),Array.isArray(A)&&A.forEach((function(e){"string"==typeof e.exec?t.commands.bindKey(e.bindKey,e.exec):t.commands.addCommand(e)})),w&&t.setKeyboardHandler("ace/keyboard/"+w)})),n&&(this.refEditor.className+=" "+n),o&&this.splitEditor.focus();var M=this.editor.env.split;M.setOrientation("below"===this.props.orientation?M.BELOW:M.BESIDE),M.resize(!0),_&&_(M)},t.prototype.componentDidUpdate=function(e){var t=this,n=e,i=this.props,r=this.editor.env.split;if(i.splits!==n.splits&&r.setSplits(i.splits),i.orientation!==n.orientation&&r.setOrientation("below"===i.orientation?r.BELOW:r.BESIDE),r.forEach((function(e,r){i.mode!==n.mode&&e.getSession().setMode("ace/mode/"+i.mode),i.keyboardHandler!==n.keyboardHandler&&(i.keyboardHandler?e.setKeyboardHandler("ace/keyboard/"+i.keyboardHandler):e.setKeyboardHandler(null)),i.fontSize!==n.fontSize&&e.setFontSize(i.fontSize),i.wrapEnabled!==n.wrapEnabled&&e.getSession().setUseWrapMode(i.wrapEnabled),i.showPrintMargin!==n.showPrintMargin&&e.setShowPrintMargin(i.showPrintMargin),i.showGutter!==n.showGutter&&e.renderer.setShowGutter(i.showGutter);for(var o=0;o<s.editorOptions.length;o++){var a=s.editorOptions[o];i[a]!==n[a]&&e.setOption(a,i[a])}h(i.setOptions,n.setOptions)||t.handleOptions(i,e);var l=f(i.value,r,"");if(e.getValue()!==l){t.silent=!0;var c=e.session.selection.toJSON();e.setValue(l,i.cursorStart),e.session.selection.fromJSON(c),t.silent=!1}var u=f(i.annotations,r,[]),d=f(n.annotations,r,[]);h(u,d)||e.getSession().setAnnotations(u);var p=f(i.markers,r,[]),g=f(n.markers,r,[]);!h(p,g)&&Array.isArray(p)&&t.handleMarkers(p,e)})),i.className!==n.className){var o=this.refEditor.className.trim().split(" ");n.className.trim().split(" ").forEach((function(e){var t=o.indexOf(e);o.splice(t,1)})),this.refEditor.className=" "+i.className+" "+o.join(" ")}i.theme!==n.theme&&r.setTheme("ace/theme/"+i.theme),i.focus&&!n.focus&&this.splitEditor.focus(),i.height===this.props.height&&i.width===this.props.width||this.editor.resize()},t.prototype.componentWillUnmount=function(){this.editor.destroy(),this.editor=null},t.prototype.onChange=function(e){if(this.props.onChange&&!this.silent){var t=[];this.editor.env.split.forEach((function(e){t.push(e.getValue())})),this.props.onChange(t,e)}},t.prototype.onSelectionChange=function(e){if(this.props.onSelectionChange){var t=[];this.editor.env.split.forEach((function(e){t.push(e.getSelection())})),this.props.onSelectionChange(t,e)}},t.prototype.onCursorChange=function(e){if(this.props.onCursorChange){var t=[];this.editor.env.split.forEach((function(e){t.push(e.getSelection())})),this.props.onCursorChange(t,e)}},t.prototype.onFocus=function(e){this.props.onFocus&&this.props.onFocus(e)},t.prototype.onInput=function(e){this.props.onInput&&this.props.onInput(e)},t.prototype.onBlur=function(e){this.props.onBlur&&this.props.onBlur(e)},t.prototype.onCopy=function(e){this.props.onCopy&&this.props.onCopy(e)},t.prototype.onPaste=function(e){this.props.onPaste&&this.props.onPaste(e)},t.prototype.onScroll=function(){this.props.onScroll&&this.props.onScroll(this.editor)},t.prototype.handleOptions=function(e,t){for(var n=Object.keys(e.setOptions),i=0;i<n.length;i++)t.setOption(n[i],e.setOptions[n[i]])},t.prototype.handleMarkers=function(e,t){var n=t.getSession().getMarkers(!0);for(var i in n)n.hasOwnProperty(i)&&t.getSession().removeMarker(n[i].id);for(var i in n=t.getSession().getMarkers(!1))n.hasOwnProperty(i)&&t.getSession().removeMarker(n[i].id);e.forEach((function(e){var n=e.startRow,i=e.startCol,r=e.endRow,o=e.endCol,s=e.className,a=e.type,c=e.inFront,u=void 0!==c&&c,d=new l.Range(n,i,r,o);t.getSession().addMarker(d,s,a,u)}))},t.prototype.updateRef=function(e){this.refEditor=e},t.prototype.render=function(){var e=this.props,t=e.name,n=e.width,i=e.height,r=e.style,s=o({width:n,height:i},r);return d.createElement("div",{ref:this.updateRef,id:t,style:s})},t.propTypes={className:u.string,debounceChangePeriod:u.number,defaultValue:u.arrayOf(u.string),focus:u.bool,fontSize:u.oneOfType([u.number,u.string]),height:u.string,mode:u.string,name:u.string,onBlur:u.func,onChange:u.func,onCopy:u.func,onFocus:u.func,onInput:u.func,onLoad:u.func,onPaste:u.func,onScroll:u.func,orientation:u.string,showGutter:u.bool,splits:u.number,theme:u.string,value:u.arrayOf(u.string),width:u.string,onSelectionChange:u.func,onCursorChange:u.func,onBeforeLoad:u.func,minLines:u.number,maxLines:u.number,readOnly:u.bool,highlightActiveLine:u.bool,tabSize:u.number,showPrintMargin:u.bool,cursorStart:u.number,editorProps:u.object,setOptions:u.object,style:u.object,scrollMargin:u.array,annotations:u.array,markers:u.array,keyboardHandler:u.string,wrapEnabled:u.bool,enableBasicAutocompletion:u.oneOfType([u.bool,u.array]),enableLiveAutocompletion:u.oneOfType([u.bool,u.array]),commands:u.array},t.defaultProps={name:"ace-editor",focus:!1,orientation:"beside",splits:2,mode:"",theme:"",height:"500px",width:"500px",value:[],fontSize:12,showGutter:!0,onChange:null,onPaste:null,onLoad:null,onScroll:null,minLines:null,maxLines:null,readOnly:!1,highlightActiveLine:!0,showPrintMargin:!0,tabSize:4,cursorStart:1,editorProps:{},style:{},scrollMargin:[0,0,0,0],setOptions:{},wrapEnabled:!1,enableBasicAutocompletion:!1,enableLiveAutocompletion:!1},t}(d.Component);t.default=p},4511:(e,t,n)=>{"use strict";n.d(t,{SV:()=>s});var i=n(81672);const r=(0,i.createContext)(null),o={didCatch:!1,error:null};class s extends i.Component{constructor(e){super(e),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=o}static getDerivedStateFromError(e){return{didCatch:!0,error:e}}resetErrorBoundary(){const{error:e}=this.state;if(null!==e){for(var t,n,i=arguments.length,r=new Array(i),s=0;s<i;s++)r[s]=arguments[s];null===(t=(n=this.props).onReset)||void 0===t||t.call(n,{args:r,reason:"imperative-api"}),this.setState(o)}}componentDidCatch(e,t){var n,i;null===(n=(i=this.props).onError)||void 0===n||n.call(i,e,t)}componentDidUpdate(e,t){const{didCatch:n}=this.state,{resetKeys:i}=this.props;var r,s;n&&null!==t.error&&function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return e.length!==t.length||e.some(((e,n)=>!Object.is(e,t[n])))}(e.resetKeys,i)&&(null===(r=(s=this.props).onReset)||void 0===r||r.call(s,{next:i,prev:e.resetKeys,reason:"keys"}),this.setState(o))}render(){const{children:e,fallbackRender:t,FallbackComponent:n,fallback:o}=this.props,{didCatch:s,error:a}=this.state;let l=e;if(s){const e={error:a,resetErrorBoundary:this.resetErrorBoundary};if((0,i.isValidElement)(o))l=o;else if("function"==typeof t)l=t(e);else{if(!n)throw new Error("react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop");l=(0,i.createElement)(n,e)}}return(0,i.createElement)(r.Provider,{value:{didCatch:s,error:a,resetErrorBoundary:this.resetErrorBoundary}},l)}}},69590:e=>{"use strict";var t=Array.isArray,n=Object.keys,i=Object.prototype.hasOwnProperty,r="undefined"!=typeof Element;function o(e,s){if(e===s)return!0;if(e&&s&&"object"==typeof e&&"object"==typeof s){var a,l,c,u=t(e),d=t(s);if(u&&d){if((l=e.length)!=s.length)return!1;for(a=l;0!=a--;)if(!o(e[a],s[a]))return!1;return!0}if(u!=d)return!1;var h=e instanceof Date,f=s instanceof Date;if(h!=f)return!1;if(h&&f)return e.getTime()==s.getTime();var p=e instanceof RegExp,g=s instanceof RegExp;if(p!=g)return!1;if(p&&g)return e.toString()==s.toString();var m=n(e);if((l=m.length)!==n(s).length)return!1;for(a=l;0!=a--;)if(!i.call(s,m[a]))return!1;if(r&&e instanceof Element&&s instanceof Element)return e===s;for(a=l;0!=a--;)if(!("_owner"===(c=m[a])&&e.$$typeof||o(e[c],s[c])))return!1;return!0}return e!=e&&s!=s}e.exports=function(e,t){try{return o(e,t)}catch(e){if(e.message&&e.message.match(/stack|recursion/i)||-2146828260===e.number)return console.warn("Warning: react-fast-compare does not handle circular references.",e.name,e.message),!1;throw e}}},71471:(e,t)=>{"use strict";var n=60103,i=60106,r=60107,o=60108,s=60114,a=60109,l=60110,c=60112,u=60113,d=60120,h=60115,f=60116,p=60121,g=60122,m=60117,v=60129,b=60131;if("function"==typeof Symbol&&Symbol.for){var y=Symbol.for;n=y("react.element"),i=y("react.portal"),r=y("react.fragment"),o=y("react.strict_mode"),s=y("react.profiler"),a=y("react.provider"),l=y("react.context"),c=y("react.forward_ref"),u=y("react.suspense"),d=y("react.suspense_list"),h=y("react.memo"),f=y("react.lazy"),p=y("react.block"),g=y("react.server.block"),m=y("react.fundamental"),v=y("react.debug_trace_mode"),b=y("react.legacy_hidden")}function w(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case r:case s:case o:case u:case d:return e;default:switch(e=e&&e.$$typeof){case l:case c:case f:case h:case a:return e;default:return t}}case i:return t}}}var _=a,A=n,x=c,C=r,S=f,E=h,k=i,$=s,M=o,T=u;t.ContextConsumer=l,t.ContextProvider=_,t.Element=A,t.ForwardRef=x,t.Fragment=C,t.Lazy=S,t.Memo=E,t.Portal=k,t.Profiler=$,t.StrictMode=M,t.Suspense=T,t.isAsyncMode=function(){return!1},t.isConcurrentMode=function(){return!1},t.isContextConsumer=function(e){return w(e)===l},t.isContextProvider=function(e){return w(e)===a},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n},t.isForwardRef=function(e){return w(e)===c},t.isFragment=function(e){return w(e)===r},t.isLazy=function(e){return w(e)===f},t.isMemo=function(e){return w(e)===h},t.isPortal=function(e){return w(e)===i},t.isProfiler=function(e){return w(e)===s},t.isStrictMode=function(e){return w(e)===o},t.isSuspense=function(e){return w(e)===u},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===s||e===v||e===o||e===u||e===d||e===b||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===h||e.$$typeof===a||e.$$typeof===l||e.$$typeof===c||e.$$typeof===m||e.$$typeof===p||e[0]===g)},t.typeOf=w},82143:(e,t,n)=>{"use strict";e.exports=n(71471)},79655:(e,t,n)=>{"use strict";n.d(t,{VK:()=>l});var i,r,o=n(81672),s=n(89250),a=n(12599);function l(e){let{basename:t,children:n,window:i}=e,r=o.useRef();null==r.current&&(r.current=(0,a.lX)({window:i,v5Compat:!0}));let l=r.current,[c,u]=o.useState({action:l.action,location:l.location});return o.useLayoutEffect((()=>l.listen(u)),[l]),o.createElement(s.F0,{basename:t,children:n,location:c.location,navigationType:c.action,navigator:l})}(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmitImpl="useSubmitImpl",e.UseFetcher="useFetcher"})(i||(i={})),function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(r||(r={}))},89250:(e,t,n)=>{"use strict";n.d(t,{AW:()=>k,F0:()=>$,UO:()=>w,Z5:()=>M});var i=n(12599),r=n(81672);function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},o.apply(this,arguments)}const s="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},{useState:a,useEffect:l,useLayoutEffect:c,useDebugValue:u}=r;function d(e){const t=e.getSnapshot,n=e.value;try{const e=t();return!s(n,e)}catch(e){return!0}}"undefined"==typeof window||void 0===window.document||window.document.createElement;const h=("useSyncExternalStore"in r&&(e=>{e.useSyncExternalStore})(r),r.createContext(null)),f=r.createContext(null),p=r.createContext(null),g=r.createContext(null),m=r.createContext(null),v=r.createContext({outlet:null,matches:[]}),b=r.createContext(null);function y(){return null!=r.useContext(m)}function w(){let{matches:e}=r.useContext(v),t=e[e.length-1];return t?t.params:{}}function _(){let e=function(){var e;let t=r.useContext(b),n=function(e){let t=r.useContext(p);return t||(0,i.kG)(!1),t}(S.UseRouteError),o=r.useContext(v),s=o.matches[o.matches.length-1];return t||(o||(0,i.kG)(!1),!s.route.id&&(0,i.kG)(!1),null==(e=n.errors)?void 0:e[s.route.id])}(),t=(0,i.WK)(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,o="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:o},a={padding:"2px 4px",backgroundColor:o};return r.createElement(r.Fragment,null,r.createElement("h2",null,"Unhandled Thrown Error!"),r.createElement("h3",{style:{fontStyle:"italic"}},t),n?r.createElement("pre",{style:s},n):null,r.createElement("p",null,"💿 Hey developer 👋"),r.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",r.createElement("code",{style:a},"errorElement")," props on ",r.createElement("code",{style:a},"<Route>")))}class A extends r.Component{constructor(e){super(e),this.state={location:e.location,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location?{error:e.error,location:e.location}:{error:e.error||t.error,location:t.location}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error?r.createElement(b.Provider,{value:this.state.error,children:this.props.component}):this.props.children}}function x(e){let{routeContext:t,match:n,children:i}=e,o=r.useContext(h);return o&&n.route.errorElement&&(o._deepestRenderedBoundaryId=n.route.id),r.createElement(v.Provider,{value:t},i)}var C,S,E;function k(e){(0,i.kG)(!1)}function $(e){let{basename:t="/",children:n=null,location:o,navigationType:s=i.aU.Pop,navigator:a,static:l=!1}=e;y()&&(0,i.kG)(!1);let c=t.replace(/^\/*/,"/"),u=r.useMemo((()=>({basename:c,navigator:a,static:l})),[c,a,l]);"string"==typeof o&&(o=(0,i.cP)(o));let{pathname:d="/",search:h="",hash:f="",state:p=null,key:v="default"}=o,b=r.useMemo((()=>{let e=(0,i.Zn)(d,c);return null==e?null:{pathname:e,search:h,hash:f,state:p,key:v}}),[c,d,h,f,p,v]);return null==b?null:r.createElement(g.Provider,{value:u},r.createElement(m.Provider,{children:n,value:{location:b,navigationType:s}}))}function M(e){let{children:t,location:n}=e,s=r.useContext(f);return function(e,t){y()||(0,i.kG)(!1);let n=r.useContext(p),{matches:s}=r.useContext(v),a=s[s.length-1],l=a?a.params:{},c=(a&&a.pathname,a?a.pathnameBase:"/");a&&a.route;let u,d=(y()||(0,i.kG)(!1),r.useContext(m).location);if(t){var h;let e="string"==typeof t?(0,i.cP)(t):t;"/"===c||(null==(h=e.pathname)?void 0:h.startsWith(c))||(0,i.kG)(!1),u=e}else u=d;let f=u.pathname||"/",g="/"===c?f:f.slice(c.length)||"/",b=(0,i.fp)(e,{pathname:g}),w=function(e,t,n){if(void 0===t&&(t=[]),null==e){if(null==n||!n.errors)return null;e=n.matches}let o=e,s=null==n?void 0:n.errors;if(null!=s){let e=o.findIndex((e=>e.route.id&&(null==s?void 0:s[e.route.id])));e>=0||(0,i.kG)(!1),o=o.slice(0,Math.min(o.length,e+1))}return o.reduceRight(((e,i,a)=>{let l=i.route.id?null==s?void 0:s[i.route.id]:null,c=n?i.route.errorElement||r.createElement(_,null):null,u=()=>r.createElement(x,{match:i,routeContext:{outlet:e,matches:t.concat(o.slice(0,a+1))}},l?c:void 0!==i.route.element?i.route.element:e);return n&&(i.route.errorElement||0===a)?r.createElement(A,{location:n.location,component:c,error:l,children:u()}):u()}),null)}(b&&b.map((e=>Object.assign({},e,{params:Object.assign({},l,e.params),pathname:(0,i.RQ)([c,e.pathname]),pathnameBase:"/"===e.pathnameBase?c:(0,i.RQ)([c,e.pathnameBase])}))),s,n||void 0);return t&&w?r.createElement(m.Provider,{value:{location:o({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:i.aU.Pop}},w):w}(s&&!t?s.router.routes:T(t),n)}function T(e,t){void 0===t&&(t=[]);let n=[];return r.Children.forEach(e,((e,o)=>{if(!r.isValidElement(e))return;if(e.type===r.Fragment)return void n.push.apply(n,T(e.props.children,t));e.type!==k&&(0,i.kG)(!1),e.props.index&&e.props.children&&(0,i.kG)(!1);let s=[...t,o],a={id:e.props.id||s.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,hasErrorBoundary:null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle};e.props.children&&(a.children=T(e.props.children,s)),n.push(a)})),n}!function(e){e.UseRevalidator="useRevalidator"}(C||(C={})),function(e){e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator"}(S||(S={})),function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"}(E||(E={})),new Promise((()=>{})),r.Component},25058:(e,t)=>{"use strict";var n=Symbol.for("react.element"),i=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy");Symbol.for("react.offscreen");Symbol.for("react.module.reference"),t.isForwardRef=function(e){return function(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case r:case s:case o:case d:case h:return e;default:switch(e=e&&e.$$typeof){case c:case l:case u:case p:case f:case a:return e;default:return t}}case i:return t}}}(e)===u}},35834:(e,t,n)=>{"use strict";e.exports=n(25058)},22257:(e,t,n)=>{const i=Symbol("SemVer ANY");class r{static get ANY(){return i}constructor(e,t){if(t=o(t),e instanceof r){if(e.loose===!!t.loose)return e;e=e.value}c("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===i?this.value="":this.value=this.operator+this.semver.version,c("comp",this)}parse(e){const t=this.options.loose?s[a.COMPARATORLOOSE]:s[a.COMPARATOR],n=e.match(t);if(!n)throw new TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==n[1]?n[1]:"","="===this.operator&&(this.operator=""),n[2]?this.semver=new u(n[2],this.options.loose):this.semver=i}toString(){return this.value}test(e){if(c("Comparator.test",e,this.options.loose),this.semver===i||e===i)return!0;if("string"==typeof e)try{e=new u(e,this.options)}catch(e){return!1}return l(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof r))throw new TypeError("a Comparator is required");if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),""===this.operator)return""===this.value||new d(e.value,t).test(this.value);if(""===e.operator)return""===e.value||new d(this.value,t).test(e.semver);const n=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),i=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),o=this.semver.version===e.semver.version,s=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),a=l(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),c=l(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return n||i||o&&s||a||c}}e.exports=r;const o=n(12893),{re:s,t:a}=n(55765),l=n(7539),c=n(74225),u=n(26376),d=n(66902)},66902:(e,t,n)=>{class i{constructor(e,t){if(t=o(t),e instanceof i)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new i(e.raw,t);if(e instanceof s)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split("||").map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${e}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!p(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&g(e[0])){this.set=[e];break}}this.format()}format(){return this.range=this.set.map((e=>e.join(" ").trim())).join("||").trim(),this.range}toString(){return this.range}parseRange(e){e=e.trim();const t=`parseRange:${Object.keys(this.options).join(",")}:${e}`,n=r.get(t);if(n)return n;const i=this.options.loose,o=i?c[u.HYPHENRANGELOOSE]:c[u.HYPHENRANGE];e=e.replace(o,k(this.options.includePrerelease)),a("hyphen replace",e),e=e.replace(c[u.COMPARATORTRIM],d),a("comparator trim",e);let l=(e=(e=(e=e.replace(c[u.TILDETRIM],h)).replace(c[u.CARETTRIM],f)).split(/\s+/).join(" ")).split(" ").map((e=>v(e,this.options))).join(" ").split(/\s+/).map((e=>E(e,this.options)));i&&(l=l.filter((e=>(a("loose invalid filter",e,this.options),!!e.match(c[u.COMPARATORLOOSE]))))),a("range list",l);const g=new Map,m=l.map((e=>new s(e,this.options)));for(const e of m){if(p(e))return[e];g.set(e.value,e)}g.size>1&&g.has("")&&g.delete("");const b=[...g.values()];return r.set(t,b),b}intersects(e,t){if(!(e instanceof i))throw new TypeError("a Range is required");return this.set.some((n=>m(n,t)&&e.set.some((e=>m(e,t)&&n.every((n=>e.every((e=>n.intersects(e,t)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new l(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if($(this.set[t],e,this.options))return!0;return!1}}e.exports=i;const r=new(n(96062))({max:1e3}),o=n(12893),s=n(22257),a=n(74225),l=n(26376),{re:c,t:u,comparatorTrimReplace:d,tildeTrimReplace:h,caretTrimReplace:f}=n(55765),p=e=>"<0.0.0-0"===e.value,g=e=>""===e.value,m=(e,t)=>{let n=!0;const i=e.slice();let r=i.pop();for(;n&&i.length;)n=i.every((e=>r.intersects(e,t))),r=i.pop();return n},v=(e,t)=>(a("comp",e,t),e=_(e,t),a("caret",e),e=y(e,t),a("tildes",e),e=x(e,t),a("xrange",e),e=S(e,t),a("stars",e),e),b=e=>!e||"x"===e.toLowerCase()||"*"===e,y=(e,t)=>e.trim().split(/\s+/).map((e=>w(e,t))).join(" "),w=(e,t)=>{const n=t.loose?c[u.TILDELOOSE]:c[u.TILDE];return e.replace(n,((t,n,i,r,o)=>{let s;return a("tilde",e,t,n,i,r,o),b(n)?s="":b(i)?s=`>=${n}.0.0 <${+n+1}.0.0-0`:b(r)?s=`>=${n}.${i}.0 <${n}.${+i+1}.0-0`:o?(a("replaceTilde pr",o),s=`>=${n}.${i}.${r}-${o} <${n}.${+i+1}.0-0`):s=`>=${n}.${i}.${r} <${n}.${+i+1}.0-0`,a("tilde return",s),s}))},_=(e,t)=>e.trim().split(/\s+/).map((e=>A(e,t))).join(" "),A=(e,t)=>{a("caret",e,t);const n=t.loose?c[u.CARETLOOSE]:c[u.CARET],i=t.includePrerelease?"-0":"";return e.replace(n,((t,n,r,o,s)=>{let l;return a("caret",e,t,n,r,o,s),b(n)?l="":b(r)?l=`>=${n}.0.0${i} <${+n+1}.0.0-0`:b(o)?l="0"===n?`>=${n}.${r}.0${i} <${n}.${+r+1}.0-0`:`>=${n}.${r}.0${i} <${+n+1}.0.0-0`:s?(a("replaceCaret pr",s),l="0"===n?"0"===r?`>=${n}.${r}.${o}-${s} <${n}.${r}.${+o+1}-0`:`>=${n}.${r}.${o}-${s} <${n}.${+r+1}.0-0`:`>=${n}.${r}.${o}-${s} <${+n+1}.0.0-0`):(a("no pr"),l="0"===n?"0"===r?`>=${n}.${r}.${o}${i} <${n}.${r}.${+o+1}-0`:`>=${n}.${r}.${o}${i} <${n}.${+r+1}.0-0`:`>=${n}.${r}.${o} <${+n+1}.0.0-0`),a("caret return",l),l}))},x=(e,t)=>(a("replaceXRanges",e,t),e.split(/\s+/).map((e=>C(e,t))).join(" ")),C=(e,t)=>{e=e.trim();const n=t.loose?c[u.XRANGELOOSE]:c[u.XRANGE];return e.replace(n,((n,i,r,o,s,l)=>{a("xRange",e,n,i,r,o,s,l);const c=b(r),u=c||b(o),d=u||b(s),h=d;return"="===i&&h&&(i=""),l=t.includePrerelease?"-0":"",c?n=">"===i||"<"===i?"<0.0.0-0":"*":i&&h?(u&&(o=0),s=0,">"===i?(i=">=",u?(r=+r+1,o=0,s=0):(o=+o+1,s=0)):"<="===i&&(i="<",u?r=+r+1:o=+o+1),"<"===i&&(l="-0"),n=`${i+r}.${o}.${s}${l}`):u?n=`>=${r}.0.0${l} <${+r+1}.0.0-0`:d&&(n=`>=${r}.${o}.0${l} <${r}.${+o+1}.0-0`),a("xRange return",n),n}))},S=(e,t)=>(a("replaceStars",e,t),e.trim().replace(c[u.STAR],"")),E=(e,t)=>(a("replaceGTE0",e,t),e.trim().replace(c[t.includePrerelease?u.GTE0PRE:u.GTE0],"")),k=e=>(t,n,i,r,o,s,a,l,c,u,d,h,f)=>`${n=b(i)?"":b(r)?`>=${i}.0.0${e?"-0":""}`:b(o)?`>=${i}.${r}.0${e?"-0":""}`:s?`>=${n}`:`>=${n}${e?"-0":""}`} ${l=b(c)?"":b(u)?`<${+c+1}.0.0-0`:b(d)?`<${c}.${+u+1}.0-0`:h?`<=${c}.${u}.${d}-${h}`:e?`<${c}.${u}.${+d+1}-0`:`<=${l}`}`.trim(),$=(e,t,n)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let n=0;n<e.length;n++)if(a(e[n].semver),e[n].semver!==s.ANY&&e[n].semver.prerelease.length>0){const i=e[n].semver;if(i.major===t.major&&i.minor===t.minor&&i.patch===t.patch)return!0}return!1}return!0}},26376:(e,t,n)=>{const i=n(74225),{MAX_LENGTH:r,MAX_SAFE_INTEGER:o}=n(83295),{re:s,t:a}=n(55765),l=n(12893),{compareIdentifiers:c}=n(86742);class u{constructor(e,t){if(t=l(t),e instanceof u){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid Version: ${e}`);if(e.length>r)throw new TypeError(`version is longer than ${r} characters`);i("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const n=e.trim().match(t.loose?s[a.LOOSE]:s[a.FULL]);if(!n)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>o||this.major<0)throw new TypeError("Invalid major version");if(this.minor>o||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>o||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<o)return t}return e})):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(i("SemVer.compare",this.version,this.options,e),!(e instanceof u)){if("string"==typeof e&&e===this.version)return 0;e=new u(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof u||(e=new u(e,this.options)),c(this.major,e.major)||c(this.minor,e.minor)||c(this.patch,e.patch)}comparePre(e){if(e instanceof u||(e=new u(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{const n=this.prerelease[t],r=e.prerelease[t];if(i("prerelease compare",t,n,r),void 0===n&&void 0===r)return 0;if(void 0===r)return 1;if(void 0===n)return-1;if(n!==r)return c(n,r)}while(++t)}compareBuild(e){e instanceof u||(e=new u(e,this.options));let t=0;do{const n=this.build[t],r=e.build[t];if(i("prerelease compare",t,n,r),void 0===n&&void 0===r)return 0;if(void 0===r)return 1;if(void 0===n)return-1;if(n!==r)return c(n,r)}while(++t)}inc(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t),this.inc("pre",t);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{let e=this.prerelease.length;for(;--e>=0;)"number"==typeof this.prerelease[e]&&(this.prerelease[e]++,e=-2);-1===e&&this.prerelease.push(0)}t&&(0===c(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error(`invalid increment argument: ${e}`)}return this.format(),this.raw=this.version,this}}e.exports=u},13507:(e,t,n)=>{const i=n(33959);e.exports=(e,t)=>{const n=i(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null}},7539:(e,t,n)=>{const i=n(58718),r=n(81194),o=n(71312),s=n(25903),a=n(21544),l=n(12056);e.exports=(e,t,n,c)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return i(e,n,c);case"!=":return r(e,n,c);case">":return o(e,n,c);case">=":return s(e,n,c);case"<":return a(e,n,c);case"<=":return l(e,n,c);default:throw new TypeError(`Invalid operator: ${t}`)}}},99038:(e,t,n)=>{const i=n(26376),r=n(33959),{re:o,t:s}=n(55765);e.exports=(e,t)=>{if(e instanceof i)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let n=null;if((t=t||{}).rtl){let t;for(;(t=o[s.COERCERTL].exec(e))&&(!n||n.index+n[0].length!==e.length);)n&&t.index+t[0].length===n.index+n[0].length||(n=t),o[s.COERCERTL].lastIndex=t.index+t[1].length+t[2].length;o[s.COERCERTL].lastIndex=-1}else n=e.match(o[s.COERCE]);return null===n?null:r(`${n[2]}.${n[3]||"0"}.${n[4]||"0"}`,t)}},88880:(e,t,n)=>{const i=n(26376);e.exports=(e,t,n)=>{const r=new i(e,n),o=new i(t,n);return r.compare(o)||r.compareBuild(o)}},27880:(e,t,n)=>{const i=n(46269);e.exports=(e,t)=>i(e,t,!0)},46269:(e,t,n)=>{const i=n(26376);e.exports=(e,t,n)=>new i(e,n).compare(new i(t,n))},62378:(e,t,n)=>{const i=n(33959),r=n(58718);e.exports=(e,t)=>{if(r(e,t))return null;{const n=i(e),r=i(t),o=n.prerelease.length||r.prerelease.length,s=o?"pre":"",a=o?"prerelease":"";for(const e in n)if(("major"===e||"minor"===e||"patch"===e)&&n[e]!==r[e])return s+e;return a}}},58718:(e,t,n)=>{const i=n(46269);e.exports=(e,t,n)=>0===i(e,t,n)},71312:(e,t,n)=>{const i=n(46269);e.exports=(e,t,n)=>i(e,t,n)>0},25903:(e,t,n)=>{const i=n(46269);e.exports=(e,t,n)=>i(e,t,n)>=0},20253:(e,t,n)=>{const i=n(26376);e.exports=(e,t,n,r)=>{"string"==typeof n&&(r=n,n=void 0);try{return new i(e instanceof i?e.version:e,n).inc(t,r).version}catch(e){return null}}},21544:(e,t,n)=>{const i=n(46269);e.exports=(e,t,n)=>i(e,t,n)<0},12056:(e,t,n)=>{const i=n(46269);e.exports=(e,t,n)=>i(e,t,n)<=0},38679:(e,t,n)=>{const i=n(26376);e.exports=(e,t)=>new i(e,t).major},87789:(e,t,n)=>{const i=n(26376);e.exports=(e,t)=>new i(e,t).minor},81194:(e,t,n)=>{const i=n(46269);e.exports=(e,t,n)=>0!==i(e,t,n)},33959:(e,t,n)=>{const{MAX_LENGTH:i}=n(83295),{re:r,t:o}=n(55765),s=n(26376),a=n(12893);e.exports=(e,t)=>{if(t=a(t),e instanceof s)return e;if("string"!=typeof e)return null;if(e.length>i)return null;if(!(t.loose?r[o.LOOSE]:r[o.FULL]).test(e))return null;try{return new s(e,t)}catch(e){return null}}},52358:(e,t,n)=>{const i=n(26376);e.exports=(e,t)=>new i(e,t).patch},57559:(e,t,n)=>{const i=n(33959);e.exports=(e,t)=>{const n=i(e,t);return n&&n.prerelease.length?n.prerelease:null}},79795:(e,t,n)=>{const i=n(46269);e.exports=(e,t,n)=>i(t,e,n)},63657:(e,t,n)=>{const i=n(88880);e.exports=(e,t)=>e.sort(((e,n)=>i(n,e,t)))},45712:(e,t,n)=>{const i=n(66902);e.exports=(e,t,n)=>{try{t=new i(t,n)}catch(e){return!1}return t.test(e)}},21100:(e,t,n)=>{const i=n(88880);e.exports=(e,t)=>e.sort(((e,n)=>i(e,n,t)))},76397:(e,t,n)=>{const i=n(33959);e.exports=(e,t)=>{const n=i(e,t);return n?n.version:null}},81249:(e,t,n)=>{const i=n(55765),r=n(83295),o=n(26376),s=n(86742),a=n(33959),l=n(76397),c=n(13507),u=n(20253),d=n(62378),h=n(38679),f=n(87789),p=n(52358),g=n(57559),m=n(46269),v=n(79795),b=n(27880),y=n(88880),w=n(21100),_=n(63657),A=n(71312),x=n(21544),C=n(58718),S=n(81194),E=n(25903),k=n(12056),$=n(7539),M=n(99038),T=n(22257),R=n(66902),L=n(45712),O=n(51042),F=n(85775),D=n(71657),I=n(18829),j=n(89042),P=n(6826),B=n(97606),U=n(50032),N=n(82937),H=n(87838),W=n(50799);e.exports={parse:a,valid:l,clean:c,inc:u,diff:d,major:h,minor:f,patch:p,prerelease:g,compare:m,rcompare:v,compareLoose:b,compareBuild:y,sort:w,rsort:_,gt:A,lt:x,eq:C,neq:S,gte:E,lte:k,cmp:$,coerce:M,Comparator:T,Range:R,satisfies:L,toComparators:O,maxSatisfying:F,minSatisfying:D,minVersion:I,validRange:j,outside:P,gtr:B,ltr:U,intersects:N,simplifyRange:H,subset:W,SemVer:o,re:i.re,src:i.src,tokens:i.t,SEMVER_SPEC_VERSION:r.SEMVER_SPEC_VERSION,compareIdentifiers:s.compareIdentifiers,rcompareIdentifiers:s.rcompareIdentifiers}},83295:e=>{const t=Number.MAX_SAFE_INTEGER||9007199254740991;e.exports={SEMVER_SPEC_VERSION:"2.0.0",MAX_LENGTH:256,MAX_SAFE_INTEGER:t,MAX_SAFE_COMPONENT_LENGTH:16}},74225:e=>{const t="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=t},86742:e=>{const t=/^[0-9]+$/,n=(e,n)=>{const i=t.test(e),r=t.test(n);return i&&r&&(e=+e,n=+n),e===n?0:i&&!r?-1:r&&!i?1:e<n?-1:1};e.exports={compareIdentifiers:n,rcompareIdentifiers:(e,t)=>n(t,e)}},12893:e=>{const t=["includePrerelease","loose","rtl"];e.exports=e=>e?"object"!=typeof e?{loose:!0}:t.filter((t=>e[t])).reduce(((e,t)=>(e[t]=!0,e)),{}):{}},55765:(e,t,n)=>{const{MAX_SAFE_COMPONENT_LENGTH:i}=n(83295),r=n(74225),o=(t=e.exports={}).re=[],s=t.src=[],a=t.t={};let l=0;const c=(e,t,n)=>{const i=l++;r(e,i,t),a[e]=i,s[i]=t,o[i]=new RegExp(t,n?"g":void 0)};c("NUMERICIDENTIFIER","0|[1-9]\\d*"),c("NUMERICIDENTIFIERLOOSE","[0-9]+"),c("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),c("MAINVERSION",`(${s[a.NUMERICIDENTIFIER]})\\.(${s[a.NUMERICIDENTIFIER]})\\.(${s[a.NUMERICIDENTIFIER]})`),c("MAINVERSIONLOOSE",`(${s[a.NUMERICIDENTIFIERLOOSE]})\\.(${s[a.NUMERICIDENTIFIERLOOSE]})\\.(${s[a.NUMERICIDENTIFIERLOOSE]})`),c("PRERELEASEIDENTIFIER",`(?:${s[a.NUMERICIDENTIFIER]}|${s[a.NONNUMERICIDENTIFIER]})`),c("PRERELEASEIDENTIFIERLOOSE",`(?:${s[a.NUMERICIDENTIFIERLOOSE]}|${s[a.NONNUMERICIDENTIFIER]})`),c("PRERELEASE",`(?:-(${s[a.PRERELEASEIDENTIFIER]}(?:\\.${s[a.PRERELEASEIDENTIFIER]})*))`),c("PRERELEASELOOSE",`(?:-?(${s[a.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${s[a.PRERELEASEIDENTIFIERLOOSE]})*))`),c("BUILDIDENTIFIER","[0-9A-Za-z-]+"),c("BUILD",`(?:\\+(${s[a.BUILDIDENTIFIER]}(?:\\.${s[a.BUILDIDENTIFIER]})*))`),c("FULLPLAIN",`v?${s[a.MAINVERSION]}${s[a.PRERELEASE]}?${s[a.BUILD]}?`),c("FULL",`^${s[a.FULLPLAIN]}$`),c("LOOSEPLAIN",`[v=\\s]*${s[a.MAINVERSIONLOOSE]}${s[a.PRERELEASELOOSE]}?${s[a.BUILD]}?`),c("LOOSE",`^${s[a.LOOSEPLAIN]}$`),c("GTLT","((?:<|>)?=?)"),c("XRANGEIDENTIFIERLOOSE",`${s[a.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),c("XRANGEIDENTIFIER",`${s[a.NUMERICIDENTIFIER]}|x|X|\\*`),c("XRANGEPLAIN",`[v=\\s]*(${s[a.XRANGEIDENTIFIER]})(?:\\.(${s[a.XRANGEIDENTIFIER]})(?:\\.(${s[a.XRANGEIDENTIFIER]})(?:${s[a.PRERELEASE]})?${s[a.BUILD]}?)?)?`),c("XRANGEPLAINLOOSE",`[v=\\s]*(${s[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${s[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${s[a.XRANGEIDENTIFIERLOOSE]})(?:${s[a.PRERELEASELOOSE]})?${s[a.BUILD]}?)?)?`),c("XRANGE",`^${s[a.GTLT]}\\s*${s[a.XRANGEPLAIN]}$`),c("XRANGELOOSE",`^${s[a.GTLT]}\\s*${s[a.XRANGEPLAINLOOSE]}$`),c("COERCE",`(^|[^\\d])(\\d{1,${i}})(?:\\.(\\d{1,${i}}))?(?:\\.(\\d{1,${i}}))?(?:$|[^\\d])`),c("COERCERTL",s[a.COERCE],!0),c("LONETILDE","(?:~>?)"),c("TILDETRIM",`(\\s*)${s[a.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",c("TILDE",`^${s[a.LONETILDE]}${s[a.XRANGEPLAIN]}$`),c("TILDELOOSE",`^${s[a.LONETILDE]}${s[a.XRANGEPLAINLOOSE]}$`),c("LONECARET","(?:\\^)"),c("CARETTRIM",`(\\s*)${s[a.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",c("CARET",`^${s[a.LONECARET]}${s[a.XRANGEPLAIN]}$`),c("CARETLOOSE",`^${s[a.LONECARET]}${s[a.XRANGEPLAINLOOSE]}$`),c("COMPARATORLOOSE",`^${s[a.GTLT]}\\s*(${s[a.LOOSEPLAIN]})$|^$`),c("COMPARATOR",`^${s[a.GTLT]}\\s*(${s[a.FULLPLAIN]})$|^$`),c("COMPARATORTRIM",`(\\s*)${s[a.GTLT]}\\s*(${s[a.LOOSEPLAIN]}|${s[a.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",c("HYPHENRANGE",`^\\s*(${s[a.XRANGEPLAIN]})\\s+-\\s+(${s[a.XRANGEPLAIN]})\\s*$`),c("HYPHENRANGELOOSE",`^\\s*(${s[a.XRANGEPLAINLOOSE]})\\s+-\\s+(${s[a.XRANGEPLAINLOOSE]})\\s*$`),c("STAR","(<|>)?=?\\s*\\*"),c("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),c("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},96062:(e,t,n)=>{"use strict";const i=n(34411),r=Symbol("max"),o=Symbol("length"),s=Symbol("lengthCalculator"),a=Symbol("allowStale"),l=Symbol("maxAge"),c=Symbol("dispose"),u=Symbol("noDisposeOnSet"),d=Symbol("lruList"),h=Symbol("cache"),f=Symbol("updateAgeOnGet"),p=()=>1,g=(e,t,n)=>{const i=e[h].get(t);if(i){const t=i.value;if(m(e,t)){if(b(e,i),!e[a])return}else n&&(e[f]&&(i.value.now=Date.now()),e[d].unshiftNode(i));return t.value}},m=(e,t)=>{if(!t||!t.maxAge&&!e[l])return!1;const n=Date.now()-t.now;return t.maxAge?n>t.maxAge:e[l]&&n>e[l]},v=e=>{if(e[o]>e[r])for(let t=e[d].tail;e[o]>e[r]&&null!==t;){const n=t.prev;b(e,t),t=n}},b=(e,t)=>{if(t){const n=t.value;e[c]&&e[c](n.key,n.value),e[o]-=n.length,e[h].delete(n.key),e[d].removeNode(t)}};class y{constructor(e,t,n,i,r){this.key=e,this.value=t,this.length=n,this.now=i,this.maxAge=r||0}}const w=(e,t,n,i)=>{let r=n.value;m(e,r)&&(b(e,n),e[a]||(r=void 0)),r&&t.call(i,r.value,r.key,e)};e.exports=class{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[r]=e.max||1/0;const t=e.length||p;if(this[s]="function"!=typeof t?p:t,this[a]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[l]=e.maxAge||0,this[c]=e.dispose,this[u]=e.noDisposeOnSet||!1,this[f]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[r]=e||1/0,v(this)}get max(){return this[r]}set allowStale(e){this[a]=!!e}get allowStale(){return this[a]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[l]=e,v(this)}get maxAge(){return this[l]}set lengthCalculator(e){"function"!=typeof e&&(e=p),e!==this[s]&&(this[s]=e,this[o]=0,this[d].forEach((e=>{e.length=this[s](e.value,e.key),this[o]+=e.length}))),v(this)}get lengthCalculator(){return this[s]}get length(){return this[o]}get itemCount(){return this[d].length}rforEach(e,t){t=t||this;for(let n=this[d].tail;null!==n;){const i=n.prev;w(this,e,n,t),n=i}}forEach(e,t){t=t||this;for(let n=this[d].head;null!==n;){const i=n.next;w(this,e,n,t),n=i}}keys(){return this[d].toArray().map((e=>e.key))}values(){return this[d].toArray().map((e=>e.value))}reset(){this[c]&&this[d]&&this[d].length&&this[d].forEach((e=>this[c](e.key,e.value))),this[h]=new Map,this[d]=new i,this[o]=0}dump(){return this[d].map((e=>!m(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[d]}set(e,t,n){if((n=n||this[l])&&"number"!=typeof n)throw new TypeError("maxAge must be a number");const i=n?Date.now():0,a=this[s](t,e);if(this[h].has(e)){if(a>this[r])return b(this,this[h].get(e)),!1;const s=this[h].get(e).value;return this[c]&&(this[u]||this[c](e,s.value)),s.now=i,s.maxAge=n,s.value=t,this[o]+=a-s.length,s.length=a,this.get(e),v(this),!0}const f=new y(e,t,a,i,n);return f.length>this[r]?(this[c]&&this[c](e,t),!1):(this[o]+=f.length,this[d].unshift(f),this[h].set(e,this[d].head),v(this),!0)}has(e){if(!this[h].has(e))return!1;const t=this[h].get(e).value;return!m(this,t)}get(e){return g(this,e,!0)}peek(e){return g(this,e,!1)}pop(){const e=this[d].tail;return e?(b(this,e),e.value):null}del(e){b(this,this[h].get(e))}load(e){this.reset();const t=Date.now();for(let n=e.length-1;n>=0;n--){const i=e[n],r=i.e||0;if(0===r)this.set(i.k,i.v);else{const e=r-t;e>0&&this.set(i.k,i.v,e)}}}prune(){this[h].forEach(((e,t)=>g(this,t,!1)))}}},97606:(e,t,n)=>{const i=n(6826);e.exports=(e,t,n)=>i(e,t,">",n)},82937:(e,t,n)=>{const i=n(66902);e.exports=(e,t,n)=>(e=new i(e,n),t=new i(t,n),e.intersects(t))},50032:(e,t,n)=>{const i=n(6826);e.exports=(e,t,n)=>i(e,t,"<",n)},85775:(e,t,n)=>{const i=n(26376),r=n(66902);e.exports=(e,t,n)=>{let o=null,s=null,a=null;try{a=new r(t,n)}catch(e){return null}return e.forEach((e=>{a.test(e)&&(o&&-1!==s.compare(e)||(o=e,s=new i(o,n)))})),o}},71657:(e,t,n)=>{const i=n(26376),r=n(66902);e.exports=(e,t,n)=>{let o=null,s=null,a=null;try{a=new r(t,n)}catch(e){return null}return e.forEach((e=>{a.test(e)&&(o&&1!==s.compare(e)||(o=e,s=new i(o,n)))})),o}},18829:(e,t,n)=>{const i=n(26376),r=n(66902),o=n(71312);e.exports=(e,t)=>{e=new r(e,t);let n=new i("0.0.0");if(e.test(n))return n;if(n=new i("0.0.0-0"),e.test(n))return n;n=null;for(let t=0;t<e.set.length;++t){const r=e.set[t];let s=null;r.forEach((e=>{const t=new i(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":s&&!o(t,s)||(s=t);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}})),!s||n&&!o(n,s)||(n=s)}return n&&e.test(n)?n:null}},6826:(e,t,n)=>{const i=n(26376),r=n(22257),{ANY:o}=r,s=n(66902),a=n(45712),l=n(71312),c=n(21544),u=n(12056),d=n(25903);e.exports=(e,t,n,h)=>{let f,p,g,m,v;switch(e=new i(e,h),t=new s(t,h),n){case">":f=l,p=u,g=c,m=">",v=">=";break;case"<":f=c,p=d,g=l,m="<",v="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(a(e,t,h))return!1;for(let n=0;n<t.set.length;++n){const i=t.set[n];let s=null,a=null;if(i.forEach((e=>{e.semver===o&&(e=new r(">=0.0.0")),s=s||e,a=a||e,f(e.semver,s.semver,h)?s=e:g(e.semver,a.semver,h)&&(a=e)})),s.operator===m||s.operator===v)return!1;if((!a.operator||a.operator===m)&&p(e,a.semver))return!1;if(a.operator===v&&g(e,a.semver))return!1}return!0}},87838:(e,t,n)=>{const i=n(45712),r=n(46269);e.exports=(e,t,n)=>{const o=[];let s=null,a=null;const l=e.sort(((e,t)=>r(e,t,n)));for(const e of l)i(e,t,n)?(a=e,s||(s=e)):(a&&o.push([s,a]),a=null,s=null);s&&o.push([s,null]);const c=[];for(const[e,t]of o)e===t?c.push(e):t||e!==l[0]?t?e===l[0]?c.push(`<=${t}`):c.push(`${e} - ${t}`):c.push(`>=${e}`):c.push("*");const u=c.join(" || "),d="string"==typeof t.raw?t.raw:String(t);return u.length<d.length?u:t}},50799:(e,t,n)=>{const i=n(66902),r=n(22257),{ANY:o}=r,s=n(45712),a=n(46269),l=(e,t,n)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===o){if(1===t.length&&t[0].semver===o)return!0;e=n.includePrerelease?[new r(">=0.0.0-0")]:[new r(">=0.0.0")]}if(1===t.length&&t[0].semver===o){if(n.includePrerelease)return!0;t=[new r(">=0.0.0")]}const i=new Set;let l,d,h,f,p,g,m;for(const t of e)">"===t.operator||">="===t.operator?l=c(l,t,n):"<"===t.operator||"<="===t.operator?d=u(d,t,n):i.add(t.semver);if(i.size>1)return null;if(l&&d){if(h=a(l.semver,d.semver,n),h>0)return null;if(0===h&&(">="!==l.operator||"<="!==d.operator))return null}for(const e of i){if(l&&!s(e,String(l),n))return null;if(d&&!s(e,String(d),n))return null;for(const i of t)if(!s(e,String(i),n))return!1;return!0}let v=!(!d||n.includePrerelease||!d.semver.prerelease.length)&&d.semver,b=!(!l||n.includePrerelease||!l.semver.prerelease.length)&&l.semver;v&&1===v.prerelease.length&&"<"===d.operator&&0===v.prerelease[0]&&(v=!1);for(const e of t){if(m=m||">"===e.operator||">="===e.operator,g=g||"<"===e.operator||"<="===e.operator,l)if(b&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===b.major&&e.semver.minor===b.minor&&e.semver.patch===b.patch&&(b=!1),">"===e.operator||">="===e.operator){if(f=c(l,e,n),f===e&&f!==l)return!1}else if(">="===l.operator&&!s(l.semver,String(e),n))return!1;if(d)if(v&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===v.major&&e.semver.minor===v.minor&&e.semver.patch===v.patch&&(v=!1),"<"===e.operator||"<="===e.operator){if(p=u(d,e,n),p===e&&p!==d)return!1}else if("<="===d.operator&&!s(d.semver,String(e),n))return!1;if(!e.operator&&(d||l)&&0!==h)return!1}return!(l&&g&&!d&&0!==h||d&&m&&!l&&0!==h||b||v)},c=(e,t,n)=>{if(!e)return t;const i=a(e.semver,t.semver,n);return i>0?e:i<0||">"===t.operator&&">="===e.operator?t:e},u=(e,t,n)=>{if(!e)return t;const i=a(e.semver,t.semver,n);return i<0?e:i>0||"<"===t.operator&&"<="===e.operator?t:e};e.exports=(e,t,n={})=>{if(e===t)return!0;e=new i(e,n),t=new i(t,n);let r=!1;e:for(const i of e.set){for(const e of t.set){const t=l(i,e,n);if(r=r||null!==t,t)continue e}if(r)return!1}return!0}},51042:(e,t,n)=>{const i=n(66902);e.exports=(e,t)=>new i(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")))},89042:(e,t,n)=>{const i=n(66902);e.exports=(e,t)=>{try{return new i(e,t).range||"*"}catch(e){return null}}},57848:(e,t,n)=>{var i=n(18139);e.exports=function(e,t){var n,r=null;if(!e||"string"!=typeof e)return r;for(var o,s,a=i(e),l="function"==typeof t,c=0,u=a.length;c<u;c++)o=(n=a[c]).property,s=n.value,l?t(o,s,n):s&&(r||(r={}),r[o]=s);return r}},11261:(e,t,n)=>{"use strict";n.r(t),n.d(t,{fetchClobData:()=>b,fetchConceptNameByUuid:()=>p,fetchOpenMRSForm:()=>m,getConcept:()=>d,getLatestObs:()=>g,getLocationsByTag:()=>h,getPreviousEncounter:()=>f,saveEncounter:()=>u});var i=n(81132),r=n(29127),o=n(53343),s=n(4354);function a(e,t,n,i,r,o,s){try{var a=e[o](s),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(i,r)}function l(e){return function(){var t=this,n=arguments;return new Promise((function(i,r){var o=e.apply(t,n);function s(e){a(o,i,r,s,l,"next",e)}function l(e){a(o,i,r,s,l,"throw",e)}s(void 0)}))}}function c(e,t){var n,i,r,o,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,i&&(r=2&o[0]?i.return:o[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,i=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((r=(r=s.trys).length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){s.label=o[1];break}if(6===o[0]&&s.label<r[1]){s.label=r[1],r=o;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(o);break}r[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],i=0}finally{n=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}}function u(e,t,n){var r=n?"/ws/rest/v1/encounter/".concat(n,"?v=full"):"/ws/rest/v1/encounter?v=full";return(0,i.openmrsFetch)(r,{headers:{"Content-Type":"application/json"},method:"POST",body:t,signal:e.signal})}function d(e,t){return(0,i.openmrsObservableFetch)("/ws/rest/v1/concept/".concat(e,"?v=").concat(t)).pipe((0,r.U)((function(e){return e.data})))}function h(e){return(0,i.openmrsObservableFetch)("/ws/rest/v1/location?tag=".concat(e,"&v=custom:(uuid,display)")).pipe((0,r.U)((function(e){return e.data.results})))}function f(e,t){var n="encounterType=".concat(t,"&patient=").concat(e);return(0,i.openmrsFetch)("/ws/rest/v1/encounter?".concat(n,"&limit=1&v=").concat(o.Ib)).then((function(e){var t=e.data;return t.results.length?t.results[0]:null}))}function p(e){return(0,i.openmrsFetch)("/ws/rest/v1/concept/".concat(e,"/name?limit=1")).then((function(e){var t=e.data;if(t.results.length)return t.results[t.results.length-1].display}))}function g(e,t,n){var r="patient=".concat(e,"&code=").concat(t).concat(n?"&encounter.type=".concat(n):"");return r+="&_sort=-_lastUpdated&_count=1",(0,i.openmrsFetch)("/ws/fhir2/R4/Observation?".concat(r)).then((function(e){var t,n=e.data;return(null===(t=n.entry)||void 0===t?void 0:t.length)?n.entry[0].resource:null}))}function m(e){return v.apply(this,arguments)}function v(){return(v=l((function(e){var t,n,r,o,a,l;return c(this,(function(c){switch(c.label){case 0:return e?(n=(0,s.K)(e)?{url:"/ws/rest/v1/form/".concat(e,"?v=full"),isUUID:!0}:{url:"/ws/rest/v1/form?q=".concat(e,"&v=full"),isUUID:!1},r=n.url,o=n.isUUID,[4,(0,i.openmrsFetch)(r)]):[2,null];case 1:return a=c.sent(),l=a.data,o?[2,l]:[2,(null===(t=l.results)||void 0===t?void 0:t.length)?l.results[0]:new Error("Form with ".concat(e," was not found"))]}}))}))).apply(this,arguments)}function b(e){return y.apply(this,arguments)}function y(){return(y=l((function(e){var t,n;return c(this,(function(r){switch(r.label){case 0:return e&&(t=e.resources.find((function(e){return"JSON schema"===e.name})))?(n="/ws/rest/v1/clobdata/".concat(t.valueReference),[4,(0,i.openmrsFetch)(n)]):[2,null];case 1:return[2,r.sent().data]}}))}))).apply(this,arguments)}},53343:(e,t,n)=>{"use strict";n.d(t,{Ib:()=>o,Mf:()=>r,ks:()=>i,mk:()=>s,rX:()=>a});var i="cf82933b-3f3f-45e7-a5ab-5d31aaee3da3",r="488b58ff-64f5-4f8a-8979-fa79940b1594",o="custom:(uuid,encounterDatetime,encounterType,location:(uuid,name),patient:(uuid,display),encounterProviders:(uuid,provider:(uuid,name)),obs:(uuid,obsDatetime,voided,groupMembers,formFieldNamespace,formFieldPath,concept:(uuid,name:(uuid,name)),value:(uuid,name:(uuid,name),names:(uuid,conceptNameType,name))))",s="ohri-forms-engine-store",a="patient-chart-workspace-header-slot"},9621:(e,t,n)=>{"use strict";n.d(t,{w9:()=>Sp,Zn:()=>Mi,xb:()=>In.xb});var i={};n.r(i),n.d(i,{attentionMarkers:()=>Ua,contentInitial:()=>Fa,disable:()=>Na,document:()=>Oa,flow:()=>Ia,flowInitial:()=>Da,insideSpan:()=>Ba,string:()=>ja,text:()=>Pa});var r={};function o(e,t,n){var i,r,l=JSON.parse(JSON.stringify(t));return l.defaultPage=null===(i=null===(r=l.availableIntents)||void 0===r?void 0:r.find((function(t){return t.intent===((null==e?void 0:e.intent)||e)})))||void 0===i?void 0:i.defaultPage,l.markdown&&a(l.markdown,e),l.pages=l.pages||[],l.pages.forEach((function(t){var i,r;if(t.isSubform&&(null===(i=t.subform)||void 0===i?void 0:i.form)){var l,c,u=[],d=null===(l=t.subform.behaviours)||void 0===l?void 0:l.find((function(t){return t.intent==(null==e?void 0:e.intent)||e}));void 0===(null==d?void 0:d.readonly)&&null==(null==d?void 0:d.readonly)||u.push({name:"readonly",type:"field",value:null==d?void 0:d.readonly}),t.subform.form=o((null==d?void 0:d.subform_intent)||"*",null===(c=t.subform)||void 0===c?void 0:c.form,u)}var h=null===(r=t.behaviours)||void 0===r?void 0:r.find((function(t){return t.intent===((null==e?void 0:e.intent)||e)}));if(h)t.hide=null==h?void 0:h.hide,t.readonly=null==h?void 0:h.readonly;else{var f,p=null===(f=t.behaviours)||void 0===f?void 0:f.find((function(e){return"*"===e.intent}));t.hide=null==p?void 0:p.hide,t.readonly=null==p?void 0:p.readonly}t.markdown&&a(t.markdown,e),t.sections=t.sections||[],t.sections.forEach((function(t){var i,r=null===(i=t.behaviours)||void 0===i?void 0:i.find((function(t){return t.intent===(null==e?void 0:e.intent)||e}));if(r)t.hide=null==r?void 0:r.hide;else{var o,l,c=null===(o=t.behaviours)||void 0===o?void 0:o.find((function(e){return"*"===e.intent}));t.hide=null!==(l=null==c?void 0:c.hide)&&void 0!==l?l:t.hide}t.markdown&&a(t.markdown,e),t.questions=t.questions||[],t.questions.forEach((function(t){var i;t.behaviours&&(s(t,(null==e?void 0:e.intent)||e),null===(i=null==n?void 0:n.filter((function(e){return"all"==e.type||"field"==e.type})))||void 0===i||i.forEach((function(e){t[e.name]=e.value}))),t.questions&&t.questions.length&&t.questions.forEach((function(t){var i;s(t,(null==e?void 0:e.intent)||e),null===(i=null==n?void 0:n.filter((function(e){return"all"==e.type||"field"==e.type})))||void 0===i||i.forEach((function(e){t[e.name]=e.value}))}))}))}))})),l}function s(e,t){var n,i,r=null===(n=e.behaviours)||void 0===n?void 0:n.find((function(e){return e.intent===t})),o=null===(i=e.behaviours)||void 0===i?void 0:i.find((function(e){return"*"===e.intent}));if(r||o){null==r||delete r.intent,null==o||delete o.intent;var s=Object.assign(o||{},r||{}),a=s.defaultValue;null!=a&&(e.questionOptions.defaultValue=a,delete s.defaultValue),delete(e=Object.assign(e,s)).behaviours}}function a(e,t){var n,i,r=null===(n=e.behaviours)||void 0===n?void 0:n.find((function(e){return e.intent===t})),o=null===(i=e.behaviours)||void 0===i?void 0:i.find((function(e){return"*"===e.intent}));if(r&&o){delete r.intent,delete o.intent;var s=Object.assign(o,r);delete(e=Object.assign(e,s)).behaviours}else!r&&o&&(delete o.intent,delete(e=Object.assign(e,o)).behaviours)}n.r(r),n.d(r,{boolean:()=>Rl,booleanish:()=>Ll,commaOrSpaceSeparated:()=>jl,commaSeparated:()=>Il,number:()=>Fl,overloadedBoolean:()=>Ol,spaceSeparated:()=>Dl}),n(81249);var l=n(81672),c=n.n(l),u=c().createContext(void 0),d=n(5990),h=n(69590),f=n.n(h),p=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===g}(e)}(e)},g="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function m(e,t){return!1!==t.clone&&t.isMergeableObject(e)?b((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function v(e,t,n){return e.concat(t).map((function(e){return m(e,n)}))}function b(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||v,n.isMergeableObject=n.isMergeableObject||p;var i=Array.isArray(t);return i===Array.isArray(e)?i?n.arrayMerge(e,t,n):function(e,t,n){var i={};return n.isMergeableObject(e)&&Object.keys(e).forEach((function(t){i[t]=m(e[t],n)})),Object.keys(t).forEach((function(r){n.isMergeableObject(t[r])&&e[r]?i[r]=b(e[r],t[r],n):i[r]=m(t[r],n)})),i}(e,t,n):m(t,n)}b.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,n){return b(e,n,t)}),{})};const y=b;var w=n(93589);const _=function(e,t){return function(n){return e(t(n))}},A=_(Object.getPrototypeOf,Object);var x=n(18533),C=Function.prototype,S=Object.prototype,E=C.toString,k=S.hasOwnProperty,$=E.call(Object);const M=function(e){if(!(0,x.Z)(e)||"[object Object]"!=(0,w.Z)(e))return!1;var t=A(e);if(null===t)return!0;var n=k.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&E.call(n)==$},T=function(e,t){return e===t||e!=e&&t!=t},R=function(e,t){for(var n=e.length;n--;)if(T(e[n][0],t))return n;return-1};var L=Array.prototype.splice;function O(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}O.prototype.clear=function(){this.__data__=[],this.size=0},O.prototype.delete=function(e){var t=this.__data__,n=R(t,e);return!(n<0||(n==t.length-1?t.pop():L.call(t,n,1),--this.size,0))},O.prototype.get=function(e){var t=this.__data__,n=R(t,e);return n<0?void 0:t[n][1]},O.prototype.has=function(e){return R(this.__data__,e)>-1},O.prototype.set=function(e,t){var n=this.__data__,i=R(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this};const F=O;var D=n(77226);const I=function(e){if(!(0,D.Z)(e))return!1;var t=(0,w.Z)(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t};var j=n(66092);const P=j.Z["__core-js_shared__"];var B,U=(B=/[^.]+$/.exec(P&&P.keys&&P.keys.IE_PROTO||""))?"Symbol(src)_1."+B:"";var N=Function.prototype.toString;const H=function(e){if(null!=e){try{return N.call(e)}catch(e){}try{return e+""}catch(e){}}return""};var W=/^\[object .+?Constructor\]$/,z=Function.prototype,V=Object.prototype,G=z.toString,q=V.hasOwnProperty,K=RegExp("^"+G.call(q).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const Z=function(e){return!(!(0,D.Z)(e)||(t=e,U&&U in t))&&(I(e)?K:W).test(H(e));var t},Y=function(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return Z(n)?n:void 0},X=Y(j.Z,"Map"),J=Y(Object,"create");var Q=Object.prototype.hasOwnProperty;var ee=Object.prototype.hasOwnProperty;function te(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}te.prototype.clear=function(){this.__data__=J?J(null):{},this.size=0},te.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},te.prototype.get=function(e){var t=this.__data__;if(J){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return Q.call(t,e)?t[e]:void 0},te.prototype.has=function(e){var t=this.__data__;return J?void 0!==t[e]:ee.call(t,e)},te.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=J&&void 0===t?"__lodash_hash_undefined__":t,this};const ne=te,ie=function(e,t){var n,i,r=e.__data__;return("string"==(i=typeof(n=t))||"number"==i||"symbol"==i||"boolean"==i?"__proto__"!==n:null===n)?r["string"==typeof t?"string":"hash"]:r.map};function re(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}re.prototype.clear=function(){this.size=0,this.__data__={hash:new ne,map:new(X||F),string:new ne}},re.prototype.delete=function(e){var t=ie(this,e).delete(e);return this.size-=t?1:0,t},re.prototype.get=function(e){return ie(this,e).get(e)},re.prototype.has=function(e){return ie(this,e).has(e)},re.prototype.set=function(e,t){var n=ie(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this};const oe=re;function se(e){var t=this.__data__=new F(e);this.size=t.size}se.prototype.clear=function(){this.__data__=new F,this.size=0},se.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},se.prototype.get=function(e){return this.__data__.get(e)},se.prototype.has=function(e){return this.__data__.has(e)},se.prototype.set=function(e,t){var n=this.__data__;if(n instanceof F){var i=n.__data__;if(!X||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new oe(i)}return n.set(e,t),this.size=n.size,this};const ae=se,le=function(){try{var e=Y(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),ce=function(e,t,n){"__proto__"==t&&le?le(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n};var ue=Object.prototype.hasOwnProperty;const de=function(e,t,n){var i=e[t];ue.call(e,t)&&T(i,n)&&(void 0!==n||t in e)||ce(e,t,n)},he=function(e,t,n,i){var r=!n;n||(n={});for(var o=-1,s=t.length;++o<s;){var a=t[o],l=i?i(n[a],e[a],a,n,e):void 0;void 0===l&&(l=e[a]),r?ce(n,a,l):de(n,a,l)}return n};var fe=n(29169),pe=n(27771);var ge="object"==typeof exports&&exports&&!exports.nodeType&&exports,me=ge&&"object"==typeof module&&module&&!module.nodeType&&module,ve=me&&me.exports===ge?j.Z.Buffer:void 0;const be=(ve?ve.isBuffer:void 0)||function(){return!1};var ye=/^(?:0|[1-9]\d*)$/;const we=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&ye.test(e))&&e>-1&&e%1==0&&e<t},_e=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991};var Ae={};Ae["[object Float32Array]"]=Ae["[object Float64Array]"]=Ae["[object Int8Array]"]=Ae["[object Int16Array]"]=Ae["[object Int32Array]"]=Ae["[object Uint8Array]"]=Ae["[object Uint8ClampedArray]"]=Ae["[object Uint16Array]"]=Ae["[object Uint32Array]"]=!0,Ae["[object Arguments]"]=Ae["[object Array]"]=Ae["[object ArrayBuffer]"]=Ae["[object Boolean]"]=Ae["[object DataView]"]=Ae["[object Date]"]=Ae["[object Error]"]=Ae["[object Function]"]=Ae["[object Map]"]=Ae["[object Number]"]=Ae["[object Object]"]=Ae["[object RegExp]"]=Ae["[object Set]"]=Ae["[object String]"]=Ae["[object WeakMap]"]=!1;const xe=function(e){return function(t){return e(t)}};var Ce=n(13413),Se="object"==typeof exports&&exports&&!exports.nodeType&&exports,Ee=Se&&"object"==typeof module&&module&&!module.nodeType&&module,ke=Ee&&Ee.exports===Se&&Ce.Z.process;const $e=function(){try{return Ee&&Ee.require&&Ee.require("util").types||ke&&ke.binding&&ke.binding("util")}catch(e){}}();var Me=$e&&$e.isTypedArray;const Te=Me?xe(Me):function(e){return(0,x.Z)(e)&&_e(e.length)&&!!Ae[(0,w.Z)(e)]};var Re=Object.prototype.hasOwnProperty;const Le=function(e,t){var n=(0,pe.Z)(e),i=!n&&(0,fe.Z)(e),r=!n&&!i&&be(e),o=!n&&!i&&!r&&Te(e),s=n||i||r||o,a=s?function(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i}(e.length,String):[],l=a.length;for(var c in e)!t&&!Re.call(e,c)||s&&("length"==c||r&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||we(c,l))||a.push(c);return a};var Oe=Object.prototype;const Fe=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Oe)},De=_(Object.keys,Object);var Ie=Object.prototype.hasOwnProperty;const je=function(e){if(!Fe(e))return De(e);var t=[];for(var n in Object(e))Ie.call(e,n)&&"constructor"!=n&&t.push(n);return t},Pe=function(e){return null!=e&&_e(e.length)&&!I(e)},Be=function(e){return Pe(e)?Le(e):je(e)};var Ue=Object.prototype.hasOwnProperty;const Ne=function(e){if(!(0,D.Z)(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=Fe(e),n=[];for(var i in e)("constructor"!=i||!t&&Ue.call(e,i))&&n.push(i);return n},He=function(e){return Pe(e)?Le(e,!0):Ne(e)};var We="object"==typeof exports&&exports&&!exports.nodeType&&exports,ze=We&&"object"==typeof module&&module&&!module.nodeType&&module,Ve=ze&&ze.exports===We?j.Z.Buffer:void 0,Ge=Ve?Ve.allocUnsafe:void 0;const qe=function(e,t){var n=-1,i=e.length;for(t||(t=Array(i));++n<i;)t[n]=e[n];return t},Ke=function(){return[]};var Ze=Object.prototype.propertyIsEnumerable,Ye=Object.getOwnPropertySymbols,Xe=Ye?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,i=null==e?0:e.length,r=0,o=[];++n<i;){var s=e[n];t(s,n,e)&&(o[r++]=s)}return o}(Ye(e),(function(t){return Ze.call(e,t)})))}:Ke;const Je=Xe;var Qe=n(58694),et=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)(0,Qe.Z)(t,Je(e)),e=A(e);return t}:Ke;const tt=et,nt=function(e,t,n){var i=t(e);return(0,pe.Z)(e)?i:(0,Qe.Z)(i,n(e))},it=function(e){return nt(e,Be,Je)},rt=function(e){return nt(e,He,tt)},ot=Y(j.Z,"DataView"),st=Y(j.Z,"Promise"),at=Y(j.Z,"Set"),lt=Y(j.Z,"WeakMap");var ct="[object Map]",ut="[object Promise]",dt="[object Set]",ht="[object WeakMap]",ft="[object DataView]",pt=H(ot),gt=H(X),mt=H(st),vt=H(at),bt=H(lt),yt=w.Z;(ot&&yt(new ot(new ArrayBuffer(1)))!=ft||X&&yt(new X)!=ct||st&&yt(st.resolve())!=ut||at&&yt(new at)!=dt||lt&&yt(new lt)!=ht)&&(yt=function(e){var t=(0,w.Z)(e),n="[object Object]"==t?e.constructor:void 0,i=n?H(n):"";if(i)switch(i){case pt:return ft;case gt:return ct;case mt:return ut;case vt:return dt;case bt:return ht}return t});const wt=yt;var _t=Object.prototype.hasOwnProperty;const At=j.Z.Uint8Array,xt=function(e){var t=new e.constructor(e.byteLength);return new At(t).set(new At(e)),t};var Ct=/\w*$/;var St=n(17685),Et=St.Z?St.Z.prototype:void 0,kt=Et?Et.valueOf:void 0;const $t=function(e,t,n){var i,r,o,s=e.constructor;switch(t){case"[object ArrayBuffer]":return xt(e);case"[object Boolean]":case"[object Date]":return new s(+e);case"[object DataView]":return function(e,t){var n=t?xt(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return function(e,t){var n=t?xt(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}(e,n);case"[object Map]":case"[object Set]":return new s;case"[object Number]":case"[object String]":return new s(e);case"[object RegExp]":return(o=new(r=e).constructor(r.source,Ct.exec(r))).lastIndex=r.lastIndex,o;case"[object Symbol]":return i=e,kt?Object(kt.call(i)):{}}};var Mt=Object.create,Tt=function(){function e(){}return function(t){if(!(0,D.Z)(t))return{};if(Mt)return Mt(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();const Rt=Tt;var Lt=$e&&$e.isMap;const Ot=Lt?xe(Lt):function(e){return(0,x.Z)(e)&&"[object Map]"==wt(e)};var Ft=$e&&$e.isSet;const Dt=Ft?xe(Ft):function(e){return(0,x.Z)(e)&&"[object Set]"==wt(e)};var It="[object Arguments]",jt="[object Function]",Pt="[object Object]",Bt={};Bt[It]=Bt["[object Array]"]=Bt["[object ArrayBuffer]"]=Bt["[object DataView]"]=Bt["[object Boolean]"]=Bt["[object Date]"]=Bt["[object Float32Array]"]=Bt["[object Float64Array]"]=Bt["[object Int8Array]"]=Bt["[object Int16Array]"]=Bt["[object Int32Array]"]=Bt["[object Map]"]=Bt["[object Number]"]=Bt[Pt]=Bt["[object RegExp]"]=Bt["[object Set]"]=Bt["[object String]"]=Bt["[object Symbol]"]=Bt["[object Uint8Array]"]=Bt["[object Uint8ClampedArray]"]=Bt["[object Uint16Array]"]=Bt["[object Uint32Array]"]=!0,Bt["[object Error]"]=Bt[jt]=Bt["[object WeakMap]"]=!1;const Ut=function e(t,n,i,r,o,s){var a,l=1&n,c=2&n,u=4&n;if(i&&(a=o?i(t,r,o,s):i(t)),void 0!==a)return a;if(!(0,D.Z)(t))return t;var d=(0,pe.Z)(t);if(d){if(a=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&_t.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(t),!l)return qe(t,a)}else{var h=wt(t),f=h==jt||"[object GeneratorFunction]"==h;if(be(t))return function(e,t){if(t)return e.slice();var n=e.length,i=Ge?Ge(n):new e.constructor(n);return e.copy(i),i}(t,l);if(h==Pt||h==It||f&&!o){if(a=c||f?{}:function(e){return"function"!=typeof e.constructor||Fe(e)?{}:Rt(A(e))}(t),!l)return c?function(e,t){return he(e,tt(e),t)}(t,function(e,t){return e&&he(t,He(t),e)}(a,t)):function(e,t){return he(e,Je(e),t)}(t,function(e,t){return e&&he(t,Be(t),e)}(a,t))}else{if(!Bt[h])return o?t:{};a=$t(t,h,l)}}s||(s=new ae);var p=s.get(t);if(p)return p;s.set(t,a),Dt(t)?t.forEach((function(r){a.add(e(r,n,i,r,t,s))})):Ot(t)&&t.forEach((function(r,o){a.set(o,e(r,n,i,o,t,s))}));var g=d?void 0:(u?c?rt:it:c?He:Be)(t);return function(e,t){for(var n=-1,i=null==e?0:e.length;++n<i&&!1!==t(e[n],n,e););}(g||t,(function(r,o){g&&(r=t[o=r]),de(a,o,e(r,n,i,o,t,s))})),a},Nt=function(e){return Ut(e,4)},Ht=function(e,t){for(var n=-1,i=null==e?0:e.length,r=Array(i);++n<i;)r[n]=t(e[n],n,e);return r};var Wt=n(72714);function zt(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var i=arguments,r=t?t.apply(this,i):i[0],o=n.cache;if(o.has(r))return o.get(r);var s=e.apply(this,i);return n.cache=o.set(r,s)||o,s};return n.cache=new(zt.Cache||oe),n}zt.Cache=oe;var Vt,Gt,qt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Kt=/\\(\\)?/g,Zt=(Vt=zt((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(qt,(function(e,n,i,r){t.push(i?r.replace(Kt,"$1"):n||e)})),t}),(function(e){return 500===Gt.size&&Gt.clear(),e})),Gt=Vt.cache,Vt);const Yt=Zt,Xt=function(e){if("string"==typeof e||(0,Wt.Z)(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t};var Jt=St.Z?St.Z.prototype:void 0,Qt=Jt?Jt.toString:void 0;const en=function e(t){if("string"==typeof t)return t;if((0,pe.Z)(t))return Ht(t,e)+"";if((0,Wt.Z)(t))return Qt?Qt.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n},tn=function(e){return null==e?"":en(e)},nn=function(e){return(0,pe.Z)(e)?Ht(e,Xt):(0,Wt.Z)(e)?[e]:qe(Yt(tn(e)))},rn=function(e,t){};n(8679);const on=function(e){return Ut(e,5)};function sn(){return sn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},sn.apply(this,arguments)}function an(e,t){if(null==e)return{};var n,i,r={},o=Object.keys(e);for(i=0;i<o.length;i++)n=o[i],t.indexOf(n)>=0||(r[n]=e[n]);return r}function ln(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var cn=function(e){return Array.isArray(e)&&0===e.length},un=function(e){return"function"==typeof e},dn=function(e){return null!==e&&"object"==typeof e},hn=function(e){return String(Math.floor(Number(e)))===e},fn=function(e){return"[object String]"===Object.prototype.toString.call(e)},pn=function(e){return 0===l.Children.count(e)},gn=function(e){return dn(e)&&un(e.then)};function mn(e,t,n,i){void 0===i&&(i=0);for(var r=nn(t);e&&i<r.length;)e=e[r[i++]];return void 0===e?n:e}function vn(e,t,n){for(var i=Nt(e),r=i,o=0,s=nn(t);o<s.length-1;o++){var a=s[o],l=mn(e,s.slice(0,o+1));if(l&&(dn(l)||Array.isArray(l)))r=r[a]=Nt(l);else{var c=s[o+1];r=r[a]=hn(c)&&Number(c)>=0?[]:{}}}return(0===o?e:r)[s[o]]===n?e:(void 0===n?delete r[s[o]]:r[s[o]]=n,0===o&&void 0===n&&delete i[s[o]],i)}function bn(e,t,n,i){void 0===n&&(n=new WeakMap),void 0===i&&(i={});for(var r=0,o=Object.keys(e);r<o.length;r++){var s=o[r],a=e[s];dn(a)?n.get(a)||(n.set(a,!0),i[s]=Array.isArray(a)?[]:{},bn(a,t,n,i[s])):i[s]=t}return i}var yn=(0,l.createContext)(void 0);yn.displayName="FormikContext";var wn=yn.Provider;function _n(){var e=(0,l.useContext)(yn);return e||rn(!1),e}function An(e,t){switch(t.type){case"SET_VALUES":return sn({},e,{values:t.payload});case"SET_TOUCHED":return sn({},e,{touched:t.payload});case"SET_ERRORS":return f()(e.errors,t.payload)?e:sn({},e,{errors:t.payload});case"SET_STATUS":return sn({},e,{status:t.payload});case"SET_ISSUBMITTING":return sn({},e,{isSubmitting:t.payload});case"SET_ISVALIDATING":return sn({},e,{isValidating:t.payload});case"SET_FIELD_VALUE":return sn({},e,{values:vn(e.values,t.payload.field,t.payload.value)});case"SET_FIELD_TOUCHED":return sn({},e,{touched:vn(e.touched,t.payload.field,t.payload.value)});case"SET_FIELD_ERROR":return sn({},e,{errors:vn(e.errors,t.payload.field,t.payload.value)});case"RESET_FORM":return sn({},e,t.payload);case"SET_FORMIK_STATE":return t.payload(e);case"SUBMIT_ATTEMPT":return sn({},e,{touched:bn(e.values,!0),isSubmitting:!0,submitCount:e.submitCount+1});case"SUBMIT_FAILURE":case"SUBMIT_SUCCESS":return sn({},e,{isSubmitting:!1});default:return e}}yn.Consumer;var xn={},Cn={};function Sn(e){var t=e.validateOnChange,n=void 0===t||t,i=e.validateOnBlur,r=void 0===i||i,o=e.validateOnMount,s=void 0!==o&&o,a=e.isInitialValid,c=e.enableReinitialize,u=void 0!==c&&c,d=e.onSubmit,h=an(e,["validateOnChange","validateOnBlur","validateOnMount","isInitialValid","enableReinitialize","onSubmit"]),p=sn({validateOnChange:n,validateOnBlur:r,validateOnMount:s,onSubmit:d},h),g=(0,l.useRef)(p.initialValues),m=(0,l.useRef)(p.initialErrors||xn),v=(0,l.useRef)(p.initialTouched||Cn),b=(0,l.useRef)(p.initialStatus),w=(0,l.useRef)(!1),_=(0,l.useRef)({});(0,l.useEffect)((function(){return w.current=!0,function(){w.current=!1}}),[]);var A=(0,l.useReducer)(An,{values:p.initialValues,errors:p.initialErrors||xn,touched:p.initialTouched||Cn,status:p.initialStatus,isSubmitting:!1,isValidating:!1,submitCount:0}),x=A[0],C=A[1],S=(0,l.useCallback)((function(e,t){return new Promise((function(n,i){var r=p.validate(e,t);null==r?n(xn):gn(r)?r.then((function(e){n(e||xn)}),(function(e){i(e)})):n(r)}))}),[p.validate]),E=(0,l.useCallback)((function(e,t){var n=p.validationSchema,i=un(n)?n(t):n,r=t&&i.validateAt?i.validateAt(t,e):function(e,t,n,i){void 0===n&&(n=!1),void 0===i&&(i={});var r=kn(e);return t[n?"validateSync":"validate"](r,{abortEarly:!1,context:i})}(e,i);return new Promise((function(e,t){r.then((function(){e(xn)}),(function(n){"ValidationError"===n.name?e(function(e){var t={};if(e.inner){if(0===e.inner.length)return vn(t,e.path,e.message);var n=e.inner,i=Array.isArray(n),r=0;for(n=i?n:n[Symbol.iterator]();;){var o;if(i){if(r>=n.length)break;o=n[r++]}else{if((r=n.next()).done)break;o=r.value}var s=o;mn(t,s.path)||(t=vn(t,s.path,s.message))}}return t}(n)):t(n)}))}))}),[p.validationSchema]),k=(0,l.useCallback)((function(e,t){return new Promise((function(n){return n(_.current[e].validate(t))}))}),[]),$=(0,l.useCallback)((function(e){var t=Object.keys(_.current).filter((function(e){return un(_.current[e].validate)})),n=t.length>0?t.map((function(t){return k(t,mn(e,t))})):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all(n).then((function(e){return e.reduce((function(e,n,i){return"DO_NOT_DELETE_YOU_WILL_BE_FIRED"===n||n&&(e=vn(e,t[i],n)),e}),{})}))}),[k]),M=(0,l.useCallback)((function(e){return Promise.all([$(e),p.validationSchema?E(e):{},p.validate?S(e):{}]).then((function(e){var t=e[0],n=e[1],i=e[2];return y.all([t,n,i],{arrayMerge:$n})}))}),[p.validate,p.validationSchema,$,S,E]),T=Tn((function(e){return void 0===e&&(e=x.values),C({type:"SET_ISVALIDATING",payload:!0}),M(e).then((function(e){return w.current&&(C({type:"SET_ISVALIDATING",payload:!1}),C({type:"SET_ERRORS",payload:e})),e}))}));(0,l.useEffect)((function(){s&&!0===w.current&&f()(g.current,p.initialValues)&&T(g.current)}),[s,T]);var R=(0,l.useCallback)((function(e){var t=e&&e.values?e.values:g.current,n=e&&e.errors?e.errors:m.current?m.current:p.initialErrors||{},i=e&&e.touched?e.touched:v.current?v.current:p.initialTouched||{},r=e&&e.status?e.status:b.current?b.current:p.initialStatus;g.current=t,m.current=n,v.current=i,b.current=r;var o=function(){C({type:"RESET_FORM",payload:{isSubmitting:!!e&&!!e.isSubmitting,errors:n,touched:i,status:r,values:t,isValidating:!!e&&!!e.isValidating,submitCount:e&&e.submitCount&&"number"==typeof e.submitCount?e.submitCount:0}})};if(p.onReset){var s=p.onReset(x.values,Y);gn(s)?s.then(o):o()}else o()}),[p.initialErrors,p.initialStatus,p.initialTouched]);(0,l.useEffect)((function(){!0!==w.current||f()(g.current,p.initialValues)||(u&&(g.current=p.initialValues,R()),s&&T(g.current))}),[u,p.initialValues,R,s,T]),(0,l.useEffect)((function(){u&&!0===w.current&&!f()(m.current,p.initialErrors)&&(m.current=p.initialErrors||xn,C({type:"SET_ERRORS",payload:p.initialErrors||xn}))}),[u,p.initialErrors]),(0,l.useEffect)((function(){u&&!0===w.current&&!f()(v.current,p.initialTouched)&&(v.current=p.initialTouched||Cn,C({type:"SET_TOUCHED",payload:p.initialTouched||Cn}))}),[u,p.initialTouched]),(0,l.useEffect)((function(){u&&!0===w.current&&!f()(b.current,p.initialStatus)&&(b.current=p.initialStatus,C({type:"SET_STATUS",payload:p.initialStatus}))}),[u,p.initialStatus,p.initialTouched]);var L=Tn((function(e){if(_.current[e]&&un(_.current[e].validate)){var t=mn(x.values,e),n=_.current[e].validate(t);return gn(n)?(C({type:"SET_ISVALIDATING",payload:!0}),n.then((function(e){return e})).then((function(t){C({type:"SET_FIELD_ERROR",payload:{field:e,value:t}}),C({type:"SET_ISVALIDATING",payload:!1})}))):(C({type:"SET_FIELD_ERROR",payload:{field:e,value:n}}),Promise.resolve(n))}return p.validationSchema?(C({type:"SET_ISVALIDATING",payload:!0}),E(x.values,e).then((function(e){return e})).then((function(t){C({type:"SET_FIELD_ERROR",payload:{field:e,value:t[e]}}),C({type:"SET_ISVALIDATING",payload:!1})}))):Promise.resolve()})),O=(0,l.useCallback)((function(e,t){var n=t.validate;_.current[e]={validate:n}}),[]),F=(0,l.useCallback)((function(e){delete _.current[e]}),[]),D=Tn((function(e,t){return C({type:"SET_TOUCHED",payload:e}),(void 0===t?r:t)?T(x.values):Promise.resolve()})),I=(0,l.useCallback)((function(e){C({type:"SET_ERRORS",payload:e})}),[]),j=Tn((function(e,t){var i=un(e)?e(x.values):e;return C({type:"SET_VALUES",payload:i}),(void 0===t?n:t)?T(i):Promise.resolve()})),P=(0,l.useCallback)((function(e,t){C({type:"SET_FIELD_ERROR",payload:{field:e,value:t}})}),[]),B=Tn((function(e,t,i){return C({type:"SET_FIELD_VALUE",payload:{field:e,value:t}}),(void 0===i?n:i)?T(vn(x.values,e,t)):Promise.resolve()})),U=(0,l.useCallback)((function(e,t){var n,i=t,r=e;if(!fn(e)){e.persist&&e.persist();var o=e.target?e.target:e.currentTarget,s=o.type,a=o.name,l=o.id,c=o.value,u=o.checked,d=(o.outerHTML,o.options),h=o.multiple;i=t||a||l,r=/number|range/.test(s)?(n=parseFloat(c),isNaN(n)?"":n):/checkbox/.test(s)?function(e,t,n){if("boolean"==typeof e)return Boolean(t);var i=[],r=!1,o=-1;if(Array.isArray(e))i=e,r=(o=e.indexOf(n))>=0;else if(!n||"true"==n||"false"==n)return Boolean(t);return t&&n&&!r?i.concat(n):r?i.slice(0,o).concat(i.slice(o+1)):i}(mn(x.values,i),u,c):d&&h?function(e){return Array.from(e).filter((function(e){return e.selected})).map((function(e){return e.value}))}(d):c}i&&B(i,r)}),[B,x.values]),N=Tn((function(e){if(fn(e))return function(t){return U(t,e)};U(e)})),H=Tn((function(e,t,n){return void 0===t&&(t=!0),C({type:"SET_FIELD_TOUCHED",payload:{field:e,value:t}}),(void 0===n?r:n)?T(x.values):Promise.resolve()})),W=(0,l.useCallback)((function(e,t){e.persist&&e.persist();var n=e.target,i=n.name,r=n.id,o=(n.outerHTML,t||i||r);H(o,!0)}),[H]),z=Tn((function(e){if(fn(e))return function(t){return W(t,e)};W(e)})),V=(0,l.useCallback)((function(e){un(e)?C({type:"SET_FORMIK_STATE",payload:e}):C({type:"SET_FORMIK_STATE",payload:function(){return e}})}),[]),G=(0,l.useCallback)((function(e){C({type:"SET_STATUS",payload:e})}),[]),q=(0,l.useCallback)((function(e){C({type:"SET_ISSUBMITTING",payload:e})}),[]),K=Tn((function(){return C({type:"SUBMIT_ATTEMPT"}),T().then((function(e){var t=e instanceof Error;if(!t&&0===Object.keys(e).length){var n;try{if(void 0===(n=X()))return}catch(e){throw e}return Promise.resolve(n).then((function(e){return w.current&&C({type:"SUBMIT_SUCCESS"}),e})).catch((function(e){if(w.current)throw C({type:"SUBMIT_FAILURE"}),e}))}if(w.current&&(C({type:"SUBMIT_FAILURE"}),t))throw e}))})),Z=Tn((function(e){e&&e.preventDefault&&un(e.preventDefault)&&e.preventDefault(),e&&e.stopPropagation&&un(e.stopPropagation)&&e.stopPropagation(),K().catch((function(e){console.warn("Warning: An unhandled error was caught from submitForm()",e)}))})),Y={resetForm:R,validateForm:T,validateField:L,setErrors:I,setFieldError:P,setFieldTouched:H,setFieldValue:B,setStatus:G,setSubmitting:q,setTouched:D,setValues:j,setFormikState:V,submitForm:K},X=Tn((function(){return d(x.values,Y)})),J=Tn((function(e){e&&e.preventDefault&&un(e.preventDefault)&&e.preventDefault(),e&&e.stopPropagation&&un(e.stopPropagation)&&e.stopPropagation(),R()})),Q=(0,l.useCallback)((function(e){return{value:mn(x.values,e),error:mn(x.errors,e),touched:!!mn(x.touched,e),initialValue:mn(g.current,e),initialTouched:!!mn(v.current,e),initialError:mn(m.current,e)}}),[x.errors,x.touched,x.values]),ee=(0,l.useCallback)((function(e){return{setValue:function(t,n){return B(e,t,n)},setTouched:function(t,n){return H(e,t,n)},setError:function(t){return P(e,t)}}}),[B,H,P]),te=(0,l.useCallback)((function(e){var t=dn(e),n=t?e.name:e,i=mn(x.values,n),r={name:n,value:i,onChange:N,onBlur:z};if(t){var o=e.type,s=e.value,a=e.as,l=e.multiple;"checkbox"===o?void 0===s?r.checked=!!i:(r.checked=!(!Array.isArray(i)||!~i.indexOf(s)),r.value=s):"radio"===o?(r.checked=i===s,r.value=s):"select"===a&&l&&(r.value=r.value||[],r.multiple=!0)}return r}),[z,N,x.values]),ne=(0,l.useMemo)((function(){return!f()(g.current,x.values)}),[g.current,x.values]),ie=(0,l.useMemo)((function(){return void 0!==a?ne?x.errors&&0===Object.keys(x.errors).length:!1!==a&&un(a)?a(p):a:x.errors&&0===Object.keys(x.errors).length}),[a,ne,x.errors,p]);return sn({},x,{initialValues:g.current,initialErrors:m.current,initialTouched:v.current,initialStatus:b.current,handleBlur:z,handleChange:N,handleReset:J,handleSubmit:Z,resetForm:R,setErrors:I,setFormikState:V,setFieldTouched:H,setFieldValue:B,setFieldError:P,setStatus:G,setSubmitting:q,setTouched:D,setValues:j,submitForm:K,validateForm:T,validateField:L,isValid:ie,dirty:ne,unregisterField:F,registerField:O,getFieldProps:te,getFieldMeta:Q,getFieldHelpers:ee,validateOnBlur:r,validateOnChange:n,validateOnMount:s})}function En(e){var t=Sn(e),n=e.component,i=e.children,r=e.render,o=e.innerRef;return(0,l.useImperativeHandle)(o,(function(){return t})),(0,l.createElement)(wn,{value:t},n?(0,l.createElement)(n,t):r?r(t):i?un(i)?i(t):pn(i)?null:l.Children.only(i):null)}function kn(e){var t=Array.isArray(e)?[]:{};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var i=String(n);!0===Array.isArray(e[i])?t[i]=e[i].map((function(e){return!0===Array.isArray(e)||M(e)?kn(e):""!==e?e:void 0})):M(e[i])?t[i]=kn(e[i]):t[i]=""!==e[i]?e[i]:void 0}return t}function $n(e,t,n){var i=e.slice();return t.forEach((function(t,r){if(void 0===i[r]){var o=!1!==n.clone&&n.isMergeableObject(t);i[r]=o?y(Array.isArray(t)?[]:{},t,n):t}else n.isMergeableObject(t)?i[r]=y(e[r],t,n):-1===e.indexOf(t)&&i.push(t)})),i}var Mn="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?l.useLayoutEffect:l.useEffect;function Tn(e){var t=(0,l.useRef)(e);return Mn((function(){t.current=e})),(0,l.useCallback)((function(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return t.current.apply(void 0,n)}),[])}function Rn(e){var t=_n(),n=t.getFieldProps,i=t.getFieldMeta,r=t.getFieldHelpers,o=t.registerField,s=t.unregisterField,a=dn(e)?e:{name:e},c=a.name,u=a.validate;return(0,l.useEffect)((function(){return c&&o(c,{validate:u}),function(){c&&s(c)}}),[o,s,c,u]),c||rn(!1),[n(a),i(c),r(c)]}var Ln=(0,l.forwardRef)((function(e,t){var n=e.action,i=an(e,["action"]),r=null!=n?n:"#",o=_n(),s=o.handleReset,a=o.handleSubmit;return(0,l.createElement)("form",Object.assign({onSubmit:a,ref:t,onReset:s,action:r},i))}));Ln.displayName="Form";var On=function(e,t,n){var i=Fn(e);return i.splice(t,0,n),i},Fn=function(e){if(e){if(Array.isArray(e))return[].concat(e);var t=Object.keys(e).map((function(e){return parseInt(e)})).reduce((function(e,t){return t>e?t:e}),0);return Array.from(sn({},e,{length:t+1}))}return[]},Dn=function(e){function t(t){var n;return(n=e.call(this,t)||this).updateArrayField=function(e,t,i){var r=n.props,o=r.name;(0,r.formik.setFormikState)((function(n){var r="function"==typeof i?i:e,s="function"==typeof t?t:e,a=vn(n.values,o,e(mn(n.values,o))),l=i?r(mn(n.errors,o)):void 0,c=t?s(mn(n.touched,o)):void 0;return cn(l)&&(l=void 0),cn(c)&&(c=void 0),sn({},n,{values:a,errors:i?vn(n.errors,o,l):n.errors,touched:t?vn(n.touched,o,c):n.touched})}))},n.push=function(e){return n.updateArrayField((function(t){return[].concat(Fn(t),[on(e)])}),!1,!1)},n.handlePush=function(e){return function(){return n.push(e)}},n.swap=function(e,t){return n.updateArrayField((function(n){return function(e,t,n){var i=Fn(e),r=i[t];return i[t]=i[n],i[n]=r,i}(n,e,t)}),!0,!0)},n.handleSwap=function(e,t){return function(){return n.swap(e,t)}},n.move=function(e,t){return n.updateArrayField((function(n){return function(e,t,n){var i=Fn(e),r=i[t];return i.splice(t,1),i.splice(n,0,r),i}(n,e,t)}),!0,!0)},n.handleMove=function(e,t){return function(){return n.move(e,t)}},n.insert=function(e,t){return n.updateArrayField((function(n){return On(n,e,t)}),(function(t){return On(t,e,null)}),(function(t){return On(t,e,null)}))},n.handleInsert=function(e,t){return function(){return n.insert(e,t)}},n.replace=function(e,t){return n.updateArrayField((function(n){return function(e,t,n){var i=Fn(e);return i[t]=n,i}(n,e,t)}),!1,!1)},n.handleReplace=function(e,t){return function(){return n.replace(e,t)}},n.unshift=function(e){var t=-1;return n.updateArrayField((function(n){var i=n?[e].concat(n):[e];return t<0&&(t=i.length),i}),(function(e){var n=e?[null].concat(e):[null];return t<0&&(t=n.length),n}),(function(e){var n=e?[null].concat(e):[null];return t<0&&(t=n.length),n})),t},n.handleUnshift=function(e){return function(){return n.unshift(e)}},n.handleRemove=function(e){return function(){return n.remove(e)}},n.handlePop=function(){return function(){return n.pop()}},n.remove=n.remove.bind(ln(n)),n.pop=n.pop.bind(ln(n)),n}var n,i;i=e,(n=t).prototype=Object.create(i.prototype),n.prototype.constructor=n,n.__proto__=i;var r=t.prototype;return r.componentDidUpdate=function(e){this.props.validateOnChange&&this.props.formik.validateOnChange&&!f()(mn(e.formik.values,e.name),mn(this.props.formik.values,this.props.name))&&this.props.formik.validateForm(this.props.formik.values)},r.remove=function(e){var t;return this.updateArrayField((function(n){var i=n?Fn(n):[];return t||(t=i[e]),un(i.splice)&&i.splice(e,1),i}),!0,!0),t},r.pop=function(){var e;return this.updateArrayField((function(t){var n=t;return e||(e=n&&n.pop&&n.pop()),n}),!0,!0),e},r.render=function(){var e={push:this.push,pop:this.pop,swap:this.swap,move:this.move,insert:this.insert,replace:this.replace,unshift:this.unshift,remove:this.remove,handlePush:this.handlePush,handlePop:this.handlePop,handleSwap:this.handleSwap,handleMove:this.handleMove,handleInsert:this.handleInsert,handleReplace:this.handleReplace,handleUnshift:this.handleUnshift,handleRemove:this.handleRemove},t=this.props,n=t.component,i=t.render,r=t.children,o=t.name,s=sn({},e,{form:an(t.formik,["validate","validationSchema"]),name:o});return n?(0,l.createElement)(n,s):i?i(s):r?"function"==typeof r?r(s):pn(r)?null:l.Children.only(r):null},t}(l.Component);Dn.defaultProps={validateOnChange:!0};var In=n(25186),jn=n(4354),Pn=n(87410),Bn=n.n(Pn),Un=n(44766),Nn=n.n(Un),Hn=n(51991),Wn=n.n(Hn),zn=n(33702),Vn=n.n(zn),Gn=n(12434),qn=n.n(Gn),Kn=n(81422),Zn=n.n(Kn),Yn=n(62416),Xn={};Xn.styleTagTransform=Zn(),Xn.setAttributes=Vn(),Xn.insert=Wn().bind(null,"head"),Xn.domAPI=Nn(),Xn.insertStyleElement=qn(),Bn()(Yn.Z,Xn);const Jn=Yn.Z&&Yn.Z.locals?Yn.Z.locals:void 0;function Qn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function ei(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,r,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(i=n.next()).done)&&(o.push(i.value),!t||o.length!==t);s=!0);}catch(e){a=!0,r=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw r}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Qn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Qn(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var ti=function(e){var t=e.question,n=e.onChange,i=e.handler,r=ei(Rn("".concat(t.id,"-unspecified")),2),o=r[0],s=(r[1],c().useContext(u)),a=s.setFieldValue,h=s.encounterContext,f=ei((0,l.useState)(!1),2),p=f[0],g=f[1],m="view"==h.sessionMode,v=ei((0,l.useState)([]),2),b=(v[0],v[1]),y=ei((0,l.useState)([]),2),w=(y[0],y[1]);(0,l.useEffect)((function(){if(o.value){g(!0),t.submission={unspecified:!0,errors:[],warnings:[]};var e=null;switch(t.questionOptions.rendering){case"date":e="";break;case"checkbox":e=[]}a(t.id,e),t.value=null}else p&&!t.value&&(t.submission={unspecified:!1,errors:In.Ls.validate(t,null)})}),[o.value]),(0,l.useEffect)((function(){t.submission&&(t.submission.errors&&b(t.submission.errors),t.submission.warnings&&w(t.submission.warnings))}),[t.submission]),(0,l.useEffect)((function(){t.value&&a("".concat(t.id,"-unspecified"),!1)}),[t.value]);var _=(0,l.useCallback)((function(e){a("".concat(t.id,"-unspecified"),e.target.checked),n(t.id,o.value,b,w),t.value=null==i?void 0:i.handleFieldSubmission(t,o.value,h)}),[]);return!t.isHidden&&!(0,jn.o)(t.readonly)&&!m&&c().createElement("div",{className:Jn.unspecified},c().createElement(d.XZJ,{id:"".concat(t.id,"-unspecified"),labelText:"Unspecified",value:"Unspecified",onChange:_,checked:o.value,disabled:t.disabled}))};function ni(e,t,n,i){Object.defineProperty(e,t,{get:n,set:i,enumerable:!0,configurable:!0})}ni({},"ErrorBoundary",(()=>oi)),ni({},"ErrorBoundaryContext",(()=>ii));const ii=(0,l.createContext)(null),ri={didCatch:!1,error:null};class oi extends l.Component{state=ri;static getDerivedStateFromError(e){return{didCatch:!0,error:e}}resetErrorBoundary=(...e)=>{const{error:t}=this.state;null!==t&&(this.props.onReset?.({args:e,reason:"imperative-api"}),this.setState(ri))};componentDidCatch(e,t){this.props.onError?.(e,t)}componentDidUpdate(e,t){const{didCatch:n}=this.state,{resetKeys:i}=this.props;n&&null!==t.error&&function(e=[],t=[]){return e.length!==t.length||e.some(((e,n)=>!Object.is(e,t[n])))}(e.resetKeys,i)&&(this.props.onReset?.({next:i,prev:e.resetKeys,reason:"keys"}),this.setState(ri))}render(){const{children:e,fallbackRender:t,FallbackComponent:n,fallback:i}=this.props,{didCatch:r,error:o}=this.state;let s=e;if(r){const e={error:o,resetErrorBoundary:this.resetErrorBoundary};if((0,l.isValidElement)(i))s=i;else if("function"==typeof t)s=t(e);else{if(!n)throw new Error("react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop");s=(0,l.createElement)(n,e)}}return(0,l.createElement)(ii.Provider,{value:{didCatch:r,error:o,resetErrorBoundary:this.resetErrorBoundary}},s)}}function si(){const e=(0,l.useContext)(ii);!function(e){if(null==e||"boolean"!=typeof e.didCatch||"function"!=typeof e.resetErrorBoundary)throw new Error("ErrorBoundaryContext not found")}(e);const[t,n]=(0,l.useState)({error:null,hasError:!1}),i=(0,l.useMemo)((()=>({resetBoundary:()=>{e?.resetErrorBoundary(),n({error:null,hasError:!1})},showBoundary:e=>n({error:e,hasError:!0})})),[e?.resetErrorBoundary]);if(t.hasError)throw t.error;return i}function ai(e,t){const n=(0,l.forwardRef)(((n,i)=>(0,l.createElement)(oi,t,(0,l.createElement)(e,{...n,ref:i})))),i=e.displayName||e.name||"Unknown";return n.displayName=`withErrorBoundary(${i})`,n}ni({},"useErrorBoundary",(()=>si)),ni({},"withErrorBoundary",(()=>ai));var li=n(7358),ci={};ci.styleTagTransform=Zn(),ci.setAttributes=Vn(),ci.insert=Wn().bind(null,"head"),ci.domAPI=Nn(),ci.insertStyleElement=qn(),Bn()(li.Z,ci);const ui=li.Z&&li.Z.locals?li.Z.locals:void 0;function di(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function hi(e){var t=e.error;return c().createElement(d.Jn6,{ariaLabel:"closes notification",caption:"",hideCloseButton:!0,lowContrast:!0,onClose:function(){},onCloseButtonClick:function(){},statusIconDescription:"notification",subtitle:"Message: ".concat(t.message),title:"Error rendering field"})}function fi(e){return function(e){return"obs"==e.type&&!e.questionOptions.concept&&"fixed-value"!==e.questionOptions.rendering}(e)?(e.disabled=!0,Mc("text")):Mc(e.questionOptions.rendering)}function pi(e){return(0,jn.o)(e.unspecified)&&"toggle"!=e.questionOptions.rendering&&"encounter-location"!=e.questionOptions.rendering}const gi=function(e){var t,n,i=e.fields,r=e.onFieldChange,o=(t=(0,l.useState)([]),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,r,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(i=n.next()).done)&&(o.push(i.value),!t||o.length!==t);s=!0);}catch(e){a=!0,r=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw r}}return o}}(t,n)||function(e,t){if(e){if("string"==typeof e)return di(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?di(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),s=o[0],a=o[1];return(0,l.useEffect)((function(){Promise.all(i.map((function(e){var t;return null===(t=fi(e))||void 0===t?void 0:t.then((function(t){return{field:e,control:t.default}}))}))).then((function(e){a(e)}))}),[i]),c().createElement(oi,{FallbackComponent:hi,onReset:function(){}},c().createElement("div",{className:ui.sectionContainer},s.filter((function(e){return!!e})).map((function(e,t){var n=e.control,i=e.field;if(n){var o=c().createElement(n,{question:i,onChange:r,key:t,handler:Tc(i.type),useField:Rn});return pi(i)&&"group"!=i.questionOptions.rendering?c().createElement("div",{key:t},o,c().createElement(ti,{question:i,onChange:r,handler:Tc(i.type)})):c().createElement("div",{key:t},o)}}))))};var mi=n(87421),vi={};vi.styleTagTransform=Zn(),vi.setAttributes=Vn(),vi.insert=Wn().bind(null,"head"),vi.domAPI=Nn(),vi.insertStyleElement=qn(),Bn()(mi.Z,vi);const bi=mi.Z&&mi.Z.locals?mi.Z.locals:void 0;function yi(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var wi=function(e){var t,n,i=e.question,r=e.onChange,o=e.deleteControl,s=(t=(0,l.useState)([]),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,r,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(i=n.next()).done)&&(o.push(i.value),!t||o.length!==t);s=!0);}catch(e){a=!0,r=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw r}}return o}}(t,n)||function(e,t){if(e){if("string"==typeof e)return yi(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?yi(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=s[0],d=s[1];(0,l.useContext)(u).encounterContext,(0,l.useEffect)((function(){i.questions&&Promise.all(i.questions.map((function(e){var t;return null===(t=fi(e))||void 0===t?void 0:t.then((function(t){return{field:e,control:t.default}}))}))).then((function(e){d(e)}))}),[i.questions]);var h=a.filter((function(e){return!!e&&!e.field.isHidden})).map((function(e,t){var n=e.control,i=e.field;if(n){var o=c().createElement(n,{question:i,onChange:r,key:t,handler:Tc(i.type)});return c().createElement("div",{className:"".concat(bi.flexColumn," ").concat(bi.obsGroupColumn," ")},pi(i)?c().createElement(c().Fragment,null,o,c().createElement(ti,{question:i,onChange:r,handler:Tc(i.type)})):o)}}));return h&&o&&h.push(o),c().createElement("div",{className:bi.flexRow},h)},_i=n(27484),Ai=n.n(_i),xi=n(11261),Ci=n(53343),Si={validate:function(e,t){var n;return["radio","checkbox","select","content-switcher"].includes(e.questionOptions.rendering)&&!(null===(n=e.questionOptions.answers)||void 0===n?void 0:n.find((function(e){return e.concept==t})))?[{resultType:"error",errCode:"invalid.defaultValue",message:"Value not found in coded answers list"}]:"date"!=e.questionOptions.rendering||Ai()(t).isValid()?"number"==e.questionOptions.rendering&&isNaN(t)?[{resultType:"error",errCode:"invalid.defaultValue",message:"Invalid numerical value: '".concat(t,"'")}]:[]:[{resultType:"error",errCode:"invalid.defaultValue",message:"Invalid date value: '".concat(t,"'")}]}};function Ei(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function ki(e,t){if(e){if("string"==typeof e)return Ei(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ei(e,t):void 0}}function $i(e,t,n,i,r){var o=t.questions.map((function(e){return e.id}));n.filter((function(e){return o.includes(e.id)})).forEach((function(t){t.isParentHidden=e,"group"==t.questionOptions.rendering&&t.questions.forEach((function(t){t.isParentHidden=e})),Li(t,i,r)}))}function Mi(e,t,n){return"toggle"==e.questionOptions.rendering?e.questionOptions.defaultValue==Ci.ks:Si.validate(e,e.questionOptions.defaultValue).length?void 0:(n.handleFieldSubmission(e,e.questionOptions.defaultValue,t),e.questionOptions.defaultValue)}function Ti(e){return(0,xi.fetchConceptNameByUuid)(e).then((function(t){return"Concept Name: ".concat(t," \n UUID: ").concat(e)}))}function Ri(e,t,n){return"automatic"==e?"maximized"==n&&t.endsWith("desktop"):"single-line"==e}function Li(e,t,n){if(((0,jn.o)(e.isHidden)||(0,jn.o)(e.isParentHidden))&&e.value){var i=Array.isArray(e.value);(i?e.value:[e.value]).filter((function(e){return!!e.uuid})).forEach((function(e){e.voided=!0,t.push(e)})),e.value=null,n(e.id,i?[]:null)}}function Oi(e){var t=Ai()(e).toDate();try{var n=e.split("T")[1].split(":");t.setHours(parseInt(n[0]),parseInt(n[1]),0)}catch(e){console.error(e)}return t}function Fi(e,t){if(null==e?void 0:e.includes(":")){var n=(o=e.split(":"),s=2,function(e){if(Array.isArray(e))return e}(o)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,r,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(i=n.next()).done)&&(o.push(i.value),!t||o.length!==t);s=!0);}catch(e){a=!0,r=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw r}}return o}}(o,s)||ki(o,s)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),i=n[0],r=n[1];return null==t?void 0:t.find((function(e){var t;return null==e||null===(t=e.conceptMappings)||void 0===t?void 0:t.find((function(e){var t,n,o;return(null==e||null===(t=e.conceptReferenceTerm)||void 0===t||null===(n=t.conceptSource)||void 0===n?void 0:n.name.toUpperCase())===i.toUpperCase()&&(null==e||null===(o=e.conceptReferenceTerm)||void 0===o?void 0:o.code.toUpperCase())===r.toUpperCase()}))}))}var o,s;return null==t?void 0:t.find((function(t){return t.uuid===e}))}var Di=n(14018),Ii={};Ii.styleTagTransform=Zn(),Ii.setAttributes=Vn(),Ii.insert=Wn().bind(null,"head"),Ii.domAPI=Nn(),Ii.insertStyleElement=qn(),Bn()(Di.Z,Ii);const ji=Di.Z&&Di.Z.locals?Di.Z.locals:void 0;var Pi=function(e){var t=e.value,n=e.tooltipText;return c().createElement("div",{className:ji.label},c().createElement(d.IiX,{direction:"bottom",tabIndex:0,tooltipText:n},c().createElement("span",{className:"cds--label"},t)))},Bi=n(38388),Ui={};Ui.styleTagTransform=Zn(),Ui.setAttributes=Vn(),Ui.insert=Wn().bind(null,"head"),Ui.domAPI=Nn(),Ui.insertStyleElement=qn(),Bn()(Bi.Z,Ui);const Ni=Bi.Z&&Bi.Z.locals?Bi.Z.locals:void 0;var Hi=function(){return c().createElement("div",null,c().createElement("span",{className:Ni.empty},"(Blank)"))},Wi=function(e){var t=e.value;return Array.isArray(t)?c().createElement(zi,{valueArray:t}):c().createElement("span",{className:Ni.value},t)},zi=function(e){var t=e.valueArray;return c().createElement("ul",null,t.map((function(e){return c().createElement("li",{className:Ni.item},e)})))},Vi=n(93481),Gi={};Gi.styleTagTransform=Zn(),Gi.setAttributes=Vn(),Gi.insert=Wn().bind(null,"head"),Gi.domAPI=Nn(),Gi.insertStyleElement=qn(),Bn()(Vi.Z,Gi);const qi=Vi.Z&&Vi.Z.locals?Vi.Z.locals:void 0;var Ki=function(e){var t=e.label,n=e.conceptName,i=e.value,r=e.isInline;return c().createElement("div",{className:qi.readonly},r&&c().createElement("div",{className:qi.formField},c().createElement(d.X2j,null,c().createElement(d.sgG,{lg:5,md:5},c().createElement(Pi,{value:t,tooltipText:n})),c().createElement(d.sgG,{className:qi.value},(0,In.xb)(i)?c().createElement(Hi,null):c().createElement(Wi,{value:i})))),!r&&c().createElement("div",{className:qi.formField},c().createElement(Pi,{value:t,tooltipText:n}),c().createElement("div",{className:qi.value},i?c().createElement(Wi,{value:i}):c().createElement(Hi,null))))},Zi=n(14893),Yi={};Yi.styleTagTransform=Zn(),Yi.setAttributes=Vn(),Yi.insert=Wn().bind(null,"head"),Yi.domAPI=Nn(),Yi.insertStyleElement=qn(),Bn()(Zi.Z,Yi);const Xi=Zi.Z&&Zi.Z.locals?Zi.Z.locals:void 0;function Ji(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function Qi(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,r,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(i=n.next()).done)&&(o.push(i.value),!t||o.length!==t);s=!0);}catch(e){a=!0,r=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw r}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Ji(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ji(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var er=function(e){var t=e.question,n=e.onChange,i=e.handler,r=Qi(Rn(t.id),2),o=r[0],s=(r[1],c().useContext(u)),a=s.setFieldValue,h=s.encounterContext,f=s.layoutType,p=s.workspaceLayout,g=Qi((0,l.useState)([]),2),m=g[0],v=g[1],b=Qi((0,l.useState)("Loading..."),2),y=b[0],w=b[1];(0,l.useEffect)((function(){var e,n;(null===(e=t.submission)||void 0===e?void 0:e.errors)&&v(null===(n=t.submission)||void 0===n?void 0:n.errors)}),[t]);var _=(0,l.useMemo)((function(){return t.questionOptions.answers.findIndex((function(e){return e.concept==o.value}))}),[o.value,t.questionOptions.answers]);(0,l.useEffect)((function(){Ti(t.questionOptions.concept).then((function(e){w(e)}))}),[y,t.questionOptions.concept]);var A=(0,l.useMemo)((function(){return!("view"!=h.sessionMode&&!(0,jn.o)(t.readonly))&&Ri(t.inlineRendering,f,p)}),[h.sessionMode,t.readonly,t.inlineRendering,f,p]);return"view"==h.sessionMode||(0,jn.o)(t.readonly)?c().createElement("div",{className:Xi.formField},c().createElement(Ki,{label:t.label,value:o.value?null==i?void 0:i.getDisplayValue(t,o.value):o.value,conceptName:y,isInline:A})):!t.isHidden&&c().createElement("div",{className:Xi.textContainer},c().createElement(d.cwH,{legendText:t.label,className:m.length?Xi.errorLegend:""},c().createElement(d.GHR,{onChange:function(e){a(t.id,null==e?void 0:e.name),n(t.id,null==e?void 0:e.name,v,null),t.value=null==i?void 0:i.handleFieldSubmission(t,null==e?void 0:e.name,h)},selectedIndex:_,className:Xi.selectedOption},t.questionOptions.answers.map((function(e,n){return c().createElement(d.rsf,{className:_===n?Xi.switchOverrides:Xi.sansSwitchOverrides,name:e.concept||e.value,text:e.label,key:n,disabled:t.disabled})})))))},tr=n(63397),nr=n(25581),ir={};ir.styleTagTransform=Zn(),ir.setAttributes=Vn(),ir.insert=Wn().bind(null,"head"),ir.domAPI=Nn(),ir.insertStyleElement=qn(),Bn()(nr.Z,ir);const rr=nr.Z&&nr.Z.locals?nr.Z.locals:void 0;var or=function(e){var t=e.value,n=e.displayText,i=e.setValue,r=e.hideHeader,o=(0,tr.useTranslation)().t;return c().createElement("div",{className:rr.formField},!r&&c().createElement("span",{className:"cds--label"},o("previousValue","Previous value")),c().createElement("div",{className:rr.row},c().createElement(Wi,{value:n}),c().createElement(d.zxk,{className:rr.reuseButton,kind:"ghost",onClick:function(e){e.preventDefault(),i(t)}},o("reuse","Reuse"))))},sr=n(91850),ar={};ar.styleTagTransform=Zn(),ar.setAttributes=Vn(),ar.insert=Wn().bind(null,"head"),ar.domAPI=Nn(),ar.insertStyleElement=qn(),Bn()(sr.Z,ar);const lr=sr.Z&&sr.Z.locals?sr.Z.locals:void 0;function cr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function ur(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function dr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,r,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(i=n.next()).done)&&(o.push(i.value),!t||o.length!==t);s=!0);}catch(e){a=!0,r=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw r}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return cr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?cr(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var hr=new Intl.DateTimeFormat(window.navigator.language);function fr(e,t){var n=e.toLocaleDateString(window.navigator.language);return"datetime"==t?"".concat(n," ").concat(e.toLocaleTimeString()):n}const pr=function(e){var t,n,i=e.question,r=e.onChange,o=e.handler,s=dr(Rn(i.id),2),a=s[0],h=(s[1],c().useContext(u)),f=h.setFieldValue,p=h.encounterContext,g=h.layoutType,m=h.workspaceLayout,v=h.fields,b=dr((0,l.useState)([]),2),y=b[0],w=b[1],_=dr((0,l.useState)([]),2),A=_[0],x=_[1],C=dr((0,l.useState)("Loading..."),2),S=C[0],E=C[1],k=(0,l.useMemo)((function(){var e;return(null===(e=y[0])||void 0===e?void 0:e.errCode)==In.Tv}),[y]),$=dr((0,l.useState)(null),2),M=$[0],T=$[1],R=dr((0,l.useState)(""),2),L=R[0],O=R[1];(0,l.useEffect)((function(){i.submission&&(i.submission.errors&&w(i.submission.errors),i.submission.warnings&&x(i.submission.warnings))}),[i.submission]);var F=(0,l.useMemo)((function(){return!("view"!=p.sessionMode&&!(0,jn.o)(i.readonly))&&Ri(i.inlineRendering,g,m)}),[p.sessionMode,i.readonly,i.inlineRendering,g,m]),D=function(e){var t=dr(e,1)[0],n=ur(t,Date)?new Date(t.getTime()-6e4*t.getTimezoneOffset()):t;f(i.id,n),r(i.id,n,w,x),I(!1,!0),i.value=null==o?void 0:o.handleFieldSubmission(i,n,p)},I=function(e){if(arguments.length>1&&void 0!==arguments[1]&&arguments[1]){var t=(null==p?void 0:p.previousEncounter)&&(null==o?void 0:o.getPreviousValue(i,null==p?void 0:p.previousEncounter,v));O(Ai()(null==t?void 0:t.value).format("hh:mm"))}else{var n,s,l=e.target.value,c=a.value,u=l.split(":");c.setHours(null!==(n=u[0])&&void 0!==n?n:"00",null!==(s=u[1])&&void 0!==s?s:"00"),f(i.id,c),r(i.id,c,w,x),i.value=null==o?void 0:o.handleFieldSubmission(i,c,p),O(l)}},j=(0,l.useMemo)((function(){var e=hr.formatToParts(new Date);return{placeholder:e.map((function(e){switch(e.type){case"day":return"dd";case"month":return"mm";case"year":return"yyyy";default:return e.value}})).join(""),carbonDateformat:e.map((function(e){switch(e.type){case"day":return"d";case"month":return"m";case"year":return"Y";default:return e.value}})).join("")}}),[]),P=j.placeholder,B=j.carbonDateformat;return(0,l.useEffect)((function(){if((null==p?void 0:p.previousEncounter)&&!(0,jn.o)(i.questionOptions.usePreviousValueDisabled)){var e=null==o?void 0:o.getPreviousValue(i,null==p?void 0:p.previousEncounter,v);if(!(0,In.xb)(null==e?void 0:e.value)){if("datetime"===(null==i?void 0:i.questionOptions.rendering)){var t=new Date(e.value);e={display:Ai()(e.value).format("M/D/YYYY HH:mm"),value:[t]}}else e.display=hr.format(e.value),e.value=[e.value];T(e)}}}),[null==p?void 0:p.previousEncounter]),(0,l.useEffect)((function(){Ti(i.questionOptions.concept).then((function(e){E(e)}))}),[S]),(0,l.useEffect)((function(){if(!L&&a.value&&ur(a.value,Date)){var e=a.value.getHours()<10?"0".concat(a.value.getHours()):"".concat(a.value.getHours()),t=a.value.getMinutes()<10?"0".concat(a.value.getMinutes()):"".concat(a.value.getMinutes());O([e,t].join(":"))}}),[a.value,L]),"view"==p.sessionMode||(0,jn.o)(i.readonly)?c().createElement(Ki,{label:i.label,value:ur(a.value,Date)?fr(a.value,i.questionOptions.rendering):a.value,conceptName:S,isInline:F}):!i.isHidden&&c().createElement(c().Fragment,null,c().createElement("div",{className:"".concat(lr.formField," ").concat(lr.row," ").concat(lr.datetime)},c().createElement("div",null,c().createElement(d.Mtg,{datePickerType:"single",onChange:D,className:"".concat(lr.datePickerOverrides," ").concat(k?lr.errorLabel:""," ").concat(i.disabled||(0,jn.o)(i.readonly)?lr.disabled:""),dateFormat:B},c().createElement(d.aj6,{id:i.id,placeholder:P,labelText:i.label,value:ur(a.value,Date)?a.value.toLocaleDateString(window.navigator.language):a.value,onChange:function(e){return D([Ai()(e.target.value,"DD/MM/YYYY").toDate()])},disabled:i.disabled,invalid:!k&&y.length>0,invalidText:null===(t=y[0])||void 0===t?void 0:t.message,warn:A.length>0,warnText:null===(n=A[0])||void 0===n?void 0:n.message}))),"datetime"===(null==i?void 0:i.questionOptions.rendering)?c().createElement(d.jII,{className:lr.timePicker,id:i.id,labelText:"Time:",placeholder:"HH:MM",pattern:"(1[012]|[1-9]):[0-5][0-9])$",type:"time",disabled:!a.value,value:L||(ur(a.value,Date)?a.value.toLocaleDateString(window.navigator.language):a.value),onChange:I}):"",M&&c().createElement("div",{className:"".concat(lr.formField)},c().createElement(or,{value:M.value,displayText:M.display,setValue:D}))))};var gr=n(81132),mr=n(25123),vr={};vr.styleTagTransform=Zn(),vr.setAttributes=Vn(),vr.insert=Wn().bind(null,"head"),vr.domAPI=Nn(),vr.insertStyleElement=qn(),Bn()(mr.Z,vr);const br=mr.Z&&mr.Z.locals?mr.Z.locals:void 0;function yr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function wr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,r,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(i=n.next()).done)&&(o.push(i.value),!t||o.length!==t);s=!0);}catch(e){a=!0,r=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw r}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return yr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?yr(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var _r=function(e){var t=e.question,n=wr(Rn(t.id),2),i=n[0],r=(n[1],(0,l.useContext)(u)),o=r.setEncounterLocation,s=r.setFieldValue,a=r.encounterContext,h=wr((0,l.useState)([]),2),f=h[0],p=h[1],g=wr((0,l.useState)("Loading..."),2),m=g[0],v=g[1];return(0,l.useEffect)((function(){t.questionOptions.locationTag&&(0,xi.getLocationsByTag)(t.questionOptions.locationTag.trim().split(" ").join("%20")).subscribe((function(e){return p(e)}),(function(e){return(0,gr.createErrorHandler)()}))}),[]),(0,l.useEffect)((function(){Ti(t.questionOptions.concept).then((function(e){v(e)}))}),[m]),"view"==a.sessionMode||(0,jn.o)(t.readonly)?c().createElement("div",{className:br.formField},c().createElement(Ki,{label:t.label,value:i.value?i.value.display:i.value,conceptName:m,isInline:!0})):!t.isHidden&&c().createElement("div",{className:"".concat(br.formInputField," ").concat(br.multiselectOverride," ").concat(br.flexRow)},c().createElement(d.Ltx,{id:t.id,titleText:t.label,label:"Choose location",items:f,itemToString:function(e){return e.display},selectedItem:i.value,onChange:function(e){var n=e.selectedItem;s(t.id,n),o(n)},disabled:t.disabled}))},Ar=n(35508),xr={};xr.styleTagTransform=Zn(),xr.setAttributes=Vn(),xr.insert=Wn().bind(null,"head"),xr.domAPI=Nn(),xr.insertStyleElement=qn(),Bn()(Ar.Z,xr);const Cr=Ar.Z&&Ar.Z.locals?Ar.Z.locals:void 0;function Sr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function Er(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,r,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(i=n.next()).done)&&(o.push(i.value),!t||o.length!==t);s=!0);}catch(e){a=!0,r=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw r}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Sr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Sr(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var kr=function(e){var t,n,i,r,o=e.question,s=e.onChange,a=e.handler,h=(0,tr.useTranslation)().t,f=Er(Rn(o.id),2),p=f[0],g=(f[1],c().useContext(u)),m=g.setFieldValue,v=g.encounterContext,b=g.layoutType,y=g.workspaceLayout,w=Er((0,l.useState)([]),2),_=w[0],A=w[1],x=Er((0,l.useState)([]),2),C=x[0],S=x[1],E=Er((0,l.useState)(0),2),k=E[0],$=E[1],M=Er((0,l.useState)(!1),2),T=M[0],R=M[1],L=Er((0,l.useState)("Loading..."),2),O=L[0],F=L[1],D=(0,l.useMemo)((function(){var e;return(null===(e=_[0])||void 0===e?void 0:e.errCode)==In.Tv}),[_]);(0,l.useEffect)((function(){(p.value&&0==p.value.length||!T&&o.value)&&$(k+1)}),[p.value]),(0,l.useEffect)((function(){o.submission&&(o.submission.errors&&A(o.submission.errors),o.submission.warnings&&S(o.submission.warnings))}),[o.submission]);var I=o.questionOptions.answers.filter((function(e){return!e.isHidden})).map((function(e,t){return{id:"".concat(o.id,"-").concat(e.concept),concept:e.concept,label:e.label,key:t}})),j=[];I.forEach((function(e){var t;(null===(t=p.value)||void 0===t?void 0:t.includes(e.concept))&&j.push(e)})),(0,l.useEffect)((function(){Ti(o.questionOptions.concept).then((function(e){F(e)}))}),[O]);var P=(0,l.useMemo)((function(){return!("view"!=v.sessionMode&&!(0,jn.o)(o.readonly))&&Ri(o.inlineRendering,b,y)}),[v.sessionMode,o.readonly,o.inlineRendering,b,y]);return"view"==v.sessionMode||(0,jn.o)(o.readonly)?c().createElement("div",{className:Cr.formField},c().createElement(Ki,{label:o.label,value:p.value?null==a?void 0:a.getDisplayValue(o,p.value):p.value,conceptName:O,isInline:P})):!o.isHidden&&c().createElement(c().Fragment,null,c().createElement("div",{className:D?"".concat(Cr.multiselectOverride," ").concat(Cr.errorLabel):"".concat(Cr.multiselectOverride)},c().createElement(d._nR,{placeholder:h("filterItemsInMultiselect","Search..."),onChange:function(e){var t=e.selectedItems;R(!0);var n=t.map((function(e){return e.concept}));m(o.id,n),s(o.id,n,A,S),o.value=null==a?void 0:a.handleFieldSubmission(o,n,v)},id:o.label,items:I,initialSelectedItems:j,label:"",titleText:o.label,key:k,itemToString:function(e){return e?e.label:" "},disabled:o.disabled,invalid:!D&&_.length>0,invalidText:null===(t=_[0])||void 0===t?void 0:t.message,warn:C.length>0,warnText:null===(n=C[0])||void 0===n?void 0:n.message})),c().createElement("div",{className:Cr.formField,style:{marginTop:"0.125rem"}},(null===(i=p.value)||void 0===i?void 0:i.length)?c().createElement(d.QI$,{className:Cr.list},null===(r=null==a?void 0:a.getDisplayValue(o,p.value))||void 0===r?void 0:r.map((function(e){return e+", "}))):c().createElement(Hi,null)))},$r=n(9592),Mr={};Mr.styleTagTransform=Zn(),Mr.setAttributes=Vn(),Mr.insert=Wn().bind(null,"head"),Mr.domAPI=Nn(),Mr.insertStyleElement=qn(),Bn()($r.Z,Mr);const Tr=$r.Z&&$r.Z.locals?$r.Z.locals:void 0;function Rr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function Lr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Or(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,r,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(i=n.next()).done)&&(o.push(i.value),!t||o.length!==t);s=!0);}catch(e){a=!0,r=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw r}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Rr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Rr(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const Fr=function(e){var t,n,i=e.question,r=e.onChange,o=e.handler,s=Or(Rn(i.id),2),a=s[0],h=(s[1],c().useContext(u)),f=h.setFieldValue,p=h.encounterContext,g=h.layoutType,m=h.workspaceLayout,v=h.fields,b=Or((0,l.useState)(),2),y=b[0],w=b[1],_=Or((0,l.useState)("Loading..."),2),A=_[0],x=_[1],C=Or((0,l.useState)([]),2),S=C[0],E=C[1],k=(0,l.useMemo)((function(){var e;return(null===(e=S[0])||void 0===e?void 0:e.errCode)==In.Tv}),[S]),$=Or((0,l.useState)([]),2),M=$[0],T=$[1],R=Or((0,l.useState)(null),2),L=R[0],O=R[1];(0,l.useEffect)((function(){i.submission&&(i.submission.errors&&E(i.submission.errors),i.submission.warnings&&T(i.submission.warnings))}),[i.submission]),a.onBlur=function(e){e&&e.target.value!=a.value&&(a.value=e.target.value,f(i.id,e.target.value)),a.value&&i.unspecified&&f("".concat(i.id,"-unspecified"),!1),y!==a.value&&(r(i.id,a.value,E,T),i.value=null==o?void 0:o.handleFieldSubmission(i,a.value,p))},(0,l.useEffect)((function(){if((null==p?void 0:p.previousEncounter)&&!(0,jn.o)(i.questionOptions.usePreviousValueDisabled)){var e=null==o?void 0:o.getPreviousValue(i,null==p?void 0:p.previousEncounter,v);(0,In.xb)(null==e?void 0:e.value)||O(e)}}),[null==p?void 0:p.previousEncounter]),(0,l.useEffect)((function(){Ti(i.questionOptions.concept).then((function(e){x(e)}))}),[A]);var F,D,I=(0,l.useMemo)((function(){return!("view"!=p.sessionMode&&!(0,jn.o)(i.readonly))&&Ri(i.inlineRendering,g,m)}),[p.sessionMode,i.readonly,i.inlineRendering,g,m]);return"view"==p.sessionMode||(0,jn.o)(i.readonly)?c().createElement("div",{className:Tr.formField},c().createElement(Ki,{label:i.label,value:a.value?null==o?void 0:o.getDisplayValue(i,a.value):a.value,conceptName:A,isInline:I})):!i.isHidden&&c().createElement("div",{className:"".concat(Tr.numberInputWrapper," ").concat(Tr.row)},c().createElement("div",null,c().createElement(d.Y2U,(F=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),i.forEach((function(t){Lr(e,t,n[t])}))}return e}({},a),D=null!=(D={id:i.id,invalid:!k&&S.length>0,invalidText:null===(t=S[0])||void 0===t?void 0:t.message,label:i.label,max:i.questionOptions.max||void 0,min:i.questionOptions.min||void 0,name:i.id,value:a.value||"",onFocus:function(){return w(a.value)},allowEmpty:!0,size:"lg",hideSteppers:!0,onWheel:function(e){return e.target.blur()},disabled:i.disabled,className:k?Tr.errorLabel:"",warn:M.length>0,warnText:null===(n=M[0])||void 0===n?void 0:n.message,step:"0.01"})?D:{},Object.getOwnPropertyDescriptors?Object.defineProperties(F,Object.getOwnPropertyDescriptors(D)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n.push.apply(n,i)}return n}(Object(D)).forEach((function(e){Object.defineProperty(F,e,Object.getOwnPropertyDescriptor(D,e))})),F))),L&&c().createElement("div",null,c().createElement(or,{value:L.value,displayText:L.display,setValue:function(e){f(i.id,e),a.value=e,a.onBlur(null)}})))};var Dr=n(66168),Ir={};Ir.styleTagTransform=Zn(),Ir.setAttributes=Vn(),Ir.insert=Wn().bind(null,"head"),Ir.domAPI=Nn(),Ir.insertStyleElement=qn(),Bn()(Dr.Z,Ir);const jr=Dr.Z&&Dr.Z.locals?Dr.Z.locals:void 0;function Pr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function Br(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,r,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(i=n.next()).done)&&(o.push(i.value),!t||o.length!==t);s=!0);}catch(e){a=!0,r=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw r}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Pr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Pr(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const Ur=function(e){var t=e.question,n=e.onChange,i=e.handler,r=Br(Rn(t.id),2),o=r[0],s=(r[1],c().useContext(u)),a=s.setFieldValue,h=s.encounterContext,f=s.layoutType,p=s.workspaceLayout,g=s.fields,m=Br((0,l.useState)([]),2),v=m[0],b=m[1],y=Br((0,l.useState)("Loading..."),2),w=y[0],_=y[1],A=(0,l.useMemo)((function(){var e;return(null===(e=v[0])||void 0===e?void 0:e.errCode)==In.Tv}),[v]),x=Br((0,l.useState)(null),2),C=x[0],S=x[1],E=Br((0,l.useState)("3.1rem"),2),k=(E[0],E[1]),$=Br((0,l.useState)([]),2),M=$[0],T=$[1];(0,l.useEffect)((function(){t.submission&&(t.submission.errors&&b(t.submission.errors),t.submission.warnings&&T(t.submission.warnings))}),[t.submission]);var R=function(e){a(t.id,e),n(t.id,e,b,T),t.value=null==i?void 0:i.handleFieldSubmission(t,e,h)};(0,l.useEffect)((function(){Ti(t.questionOptions.concept).then((function(e){_(e)}))}),[w]),(0,l.useEffect)((function(){if((null==h?void 0:h.previousEncounter)&&!(0,jn.o)(t.questionOptions.usePreviousValueDisabled)){var e=null==i?void 0:i.getPreviousValue(t,null==h?void 0:h.previousEncounter,g);(0,In.xb)(null==e?void 0:e.value)||(S(e),k(t.questionOptions.answers.length>2?"3.1rem":"1.2rem"))}}),[null==h?void 0:h.previousEncounter]);var L=(0,l.useMemo)((function(){return!("view"!=h.sessionMode&&!(0,jn.o)(t.readonly))&&Ri(t.inlineRendering,f,p)}),[h.sessionMode,t.readonly,t.inlineRendering,f,p]);return"view"==h.sessionMode||(0,jn.o)(t.readonly)?c().createElement("div",{className:jr.formField},c().createElement(Ki,{label:t.label,value:o.value?null==i?void 0:i.getDisplayValue(t,o.value):o.value,conceptName:w,isInline:L})):!t.isHidden&&c().createElement("div",{className:jr.row},c().createElement(d.cwH,{legendText:t.label,className:A?jr.errorLegend:void 0,disabled:t.disabled,invalid:!A&&v.length>0},c().createElement(d.SYO,{defaultSelected:"default-selected",name:t.id,valueSelected:o.value,onChange:R,orientation:"vertical"},t.questionOptions.answers.filter((function(e){return!e.isHidden})).map((function(e,n){return c().createElement(d.EUY,{id:"".concat(t.id,"-").concat(e.label),labelText:e.label,value:e.concept,key:n})}))),!A&&(null==v?void 0:v.length)>0||M.length>0&&c().createElement("div",{className:v.length?jr.errorLabel:M.length?jr.warningLabel:""},c().createElement("div",{className:"cds--form-requirement"},v.length?v[0].message:M.length?M[0].message:null))),C?c().createElement(d.cwH,{legendText:null},c().createElement(or,{value:C.value,displayText:C.display,setValue:R})):null)};var Nr=n(1943),Hr={};Hr.styleTagTransform=Zn(),Hr.setAttributes=Vn(),Hr.insert=Wn().bind(null,"head"),Hr.domAPI=Nn(),Hr.insertStyleElement=qn(),Bn()(Nr.Z,Hr);const Wr=Nr.Z&&Nr.Z.locals?Nr.Z.locals:void 0;function zr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function Vr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,r,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(i=n.next()).done)&&(o.push(i.value),!t||o.length!==t);s=!0);}catch(e){a=!0,r=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw r}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return zr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?zr(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const Gr=function(e){var t=e.question,n=e.onChange,i=e.handler,r=Vr(Rn(t.id),2),o=r[0],s=(r[1],c().useContext(u)),a=s.setFieldValue,h=s.encounterContext,f=s.layoutType,p=s.workspaceLayout,g=s.fields,m=Vr(c().useState([]),2),v=(m[0],m[1]),b=Vr((0,l.useState)([]),2),y=b[0],w=b[1],_=Vr((0,l.useState)("Loading..."),2),A=_[0],x=_[1],C=(0,l.useMemo)((function(){var e;return(null===(e=y[0])||void 0===e?void 0:e.errCode)==In.Tv}),[y]),S=Vr((0,l.useState)(null),2),E=S[0],k=S[1],$=Vr((0,l.useState)([]),2),M=$[0],T=$[1];(0,l.useEffect)((function(){t.submission&&(t.submission.errors&&w(t.submission.errors),t.submission.warnings&&T(t.submission.warnings))}),[t.submission]);var R=function(e){a(t.id,e),n(t.id,e,w,T),t.value=null==i?void 0:i.handleFieldSubmission(t,e,h)};(0,l.useEffect)((function(){v(t.questionOptions.answers.filter((function(e){return!e.isHidden})).map((function(e){return e.value||e.concept})))}),[t.questionOptions.answers]),(0,l.useEffect)((function(){Ti(t.questionOptions.concept).then((function(e){x(e)}))}),[A]),(0,l.useEffect)((function(){if((null==h?void 0:h.previousEncounter)&&!(0,jn.o)(t.questionOptions.usePreviousValueDisabled)){var e=null==i?void 0:i.getPreviousValue(t,null==h?void 0:h.previousEncounter,g);(0,In.xb)(null==e?void 0:e.value)||k(e)}}),[null==h?void 0:h.previousEncounter]);var L=(0,l.useMemo)((function(){return!("view"!=h.sessionMode&&!(0,jn.o)(t.readonly))&&Ri(t.inlineRendering,f,p)}),[h.sessionMode,t.readonly,t.inlineRendering,f,p]);return"view"==h.sessionMode||(0,jn.o)(t.readonly)?c().createElement(Ki,{label:t.label,value:o.value?null==i?void 0:i.getDisplayValue(t,o.value):o.value,conceptName:A,isInline:L}):!t.isHidden&&c().createElement("div",{className:"".concat(Wr.formInputField," ").concat(Wr.row)},c().createElement("div",{className:C?"".concat(Wr.errorLabel," ").concat(Wr.dropdown):Wr.dropdown},c().createElement(d.Ltx,{id:t.id,titleText:t.label,label:"Choose an option",items:t.questionOptions.answers.filter((function(e){return!e.isHidden})).map((function(e){return e.value||e.concept})),itemToString:function(e){var n=t.questionOptions.answers.find((function(t){return t.value?t.value==e:t.concept==e}));return null==n?void 0:n.label},selectedItem:o.value,onChange:function(e){var t=e.selectedItem;return R(t)},disabled:t.disabled,invalid:!C&&y.length>0,invalidText:y.length&&y[0].message,warn:M.length>0,warnText:M.length&&M[0].message})),E&&c().createElement("div",null,c().createElement(or,{value:E.value,displayText:E.display,setValue:R})))};var qr=n(53162),Kr={};Kr.styleTagTransform=Zn(),Kr.setAttributes=Vn(),Kr.insert=Wn().bind(null,"head"),Kr.domAPI=Nn(),Kr.insertStyleElement=qn(),Bn()(qr.Z,Kr);const Zr=qr.Z&&qr.Z.locals?qr.Z.locals:void 0;function Yr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function Xr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,r,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(i=n.next()).done)&&(o.push(i.value),!t||o.length!==t);s=!0);}catch(e){a=!0,r=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw r}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Yr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Yr(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const Qr=function(e){var t=e.question,n=e.onChange,i=e.handler,r=Jr(Rn(t.id),2),o=r[0],s=(r[1],c().useContext(u)),a=s.setFieldValue,h=s.encounterContext,f=s.layoutType,p=s.workspaceLayout,g=Jr((0,l.useState)(),2),m=g[0],v=g[1],b=Jr((0,l.useState)([]),2),y=b[0],w=b[1],_=Jr((0,l.useState)("Loading..."),2),A=_[0],x=_[1],C=(0,l.useMemo)((function(){var e;return(null===(e=y[0])||void 0===e?void 0:e.errCode)==In.Tv}),[y]),S=Jr((0,l.useState)([]),2),E=S[0],k=S[1];(0,l.useEffect)((function(){t.submission&&(t.submission.errors&&w(t.submission.errors),t.submission.warnings&&k(t.submission.warnings))}),[t.submission]),o.onBlur=function(){o.value&&t.unspecified&&a("".concat(t.id,"-unspecified"),!1),m!==o.value&&(n(t.id,o.value,w,k),t.value=null==i?void 0:i.handleFieldSubmission(t,o.value,h))},(0,l.useEffect)((function(){Ti(t.questionOptions.concept).then((function(e){x(e)}))}),[A]);var $,M,T=(0,l.useMemo)((function(){return!("view"!=h.sessionMode&&!(0,jn.o)(t.readonly))&&Ri(t.inlineRendering,f,p)}),[h.sessionMode,t.readonly,t.inlineRendering,f,p]);return"view"==h.sessionMode||(0,jn.o)(t.readonly)?c().createElement("div",{className:Zr.formField},c().createElement(Ki,{label:t.label,value:o.value,conceptName:A,isInline:T})):!t.isHidden&&c().createElement("div",{className:Zr.formField},c().createElement("div",{className:C?"".concat(Zr.textInputOverrides," ").concat(Zr.errorLabel):Zr.textInputOverrides},c().createElement(d.Kx8,($=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),i.forEach((function(t){Xr(e,t,n[t])}))}return e}({},o),M=null!=(M={id:t.id,labelText:t.label,name:t.id,value:o.value||"",onFocus:function(){return v(o.value)},rows:t.questionOptions.rows||4,disabled:t.disabled,invalid:!C&&y.length>0,invalidText:y.length&&y[0].message,warn:E.length>0,warnText:E.length&&E[0].message})?M:{},Object.getOwnPropertyDescriptors?Object.defineProperties($,Object.getOwnPropertyDescriptors(M)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n.push.apply(n,i)}return n}(Object(M)).forEach((function(e){Object.defineProperty($,e,Object.getOwnPropertyDescriptor(M,e))})),$))))};var eo=Object.prototype.hasOwnProperty;var to=n(39891),no={};no.styleTagTransform=Zn(),no.setAttributes=Vn(),no.insert=Wn().bind(null,"head"),no.domAPI=Nn(),no.insertStyleElement=qn(),Bn()(to.Z,no);const io=to.Z&&to.Z.locals?to.Z.locals:void 0;function ro(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function oo(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function so(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,r,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(i=n.next()).done)&&(o.push(i.value),!t||o.length!==t);s=!0);}catch(e){a=!0,r=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw r}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ro(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ro(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const ao=function(e){var t=e.question,n=e.onChange,i=e.handler,r=so(Rn(t.id),2),o=r[0],s=(r[1],c().useContext(u)),a=s.setFieldValue,h=s.encounterContext,f=s.layoutType,p=s.workspaceLayout,g=s.fields,m=so((0,l.useState)(),2),v=m[0],b=m[1],y=so((0,l.useState)([]),2),w=y[0],_=y[1],A=so((0,l.useState)([]),2),x=A[0],C=A[1],S=so((0,l.useState)("Loading..."),2),E=S[0],k=S[1],$=(0,l.useMemo)((function(){var e;return(null===(e=w[0])||void 0===e?void 0:e.errCode)==In.Tv}),[w]),M=so((0,l.useState)(null),2),T=M[0],R=M[1];(0,l.useEffect)((function(){t.submission&&(t.submission.errors&&_(t.submission.errors),t.submission.warnings&&C(t.submission.warnings))}),[t.submission]),(0,l.useEffect)((function(){if((null==h?void 0:h.previousEncounter)&&!(0,jn.o)(t.questionOptions.usePreviousValueDisabled)){var e=null==i?void 0:i.getPreviousValue(t,null==h?void 0:h.previousEncounter,g);(function(e){if(null==e)return!0;if(Pe(e)&&((0,pe.Z)(e)||"string"==typeof e||"function"==typeof e.splice||be(e)||Te(e)||(0,fe.Z)(e)))return!e.length;var t=wt(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(Fe(e))return!je(e).length;for(var n in e)if(eo.call(e,n))return!1;return!0})(null==e?void 0:e.value)||R(e)}}),[null==h?void 0:h.previousEncounter]),o.onBlur=function(){o.value&&t.unspecified&&a("".concat(t.id,"-unspecified"),!1),v!==o.value&&(n(t.id,o.value,_,C),t.value=null==i?void 0:i.handleFieldSubmission(t,o.value,h))},(0,l.useEffect)((function(){Ti(t.questionOptions.concept).then((function(e){k(e)}))}),[E]);var L,O,F=(0,l.useMemo)((function(){return!("view"!=h.sessionMode&&!(0,jn.o)(t.readonly))&&Ri(t.inlineRendering,f,p)}),[h.sessionMode,t.readonly,t.inlineRendering,f,p]);return"view"==h.sessionMode||(0,jn.o)(t.readonly)?c().createElement("div",{className:io.formField},c().createElement(Ki,{label:t.label,value:o.value,conceptName:E,isInline:F})):!t.isHidden&&c().createElement(c().Fragment,null,c().createElement("div",{className:"".concat(io.formField," ").concat(io.row)},c().createElement("div",{className:$?"".concat(io.textInputOverrides," ").concat(io.errorLabel):io.textInputOverrides},c().createElement(d.oil,(L=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),i.forEach((function(t){oo(e,t,n[t])}))}return e}({},o),O=null!=(O={id:t.id,labelText:t.label,name:t.id,value:o.value||"",onFocus:function(){return b(o.value)},disabled:t.disabled,invalid:!$&&w.length>0,invalidText:w.length&&w[0].message,warn:x.length>0,warnText:x.length&&x[0].message,onInvalid:function(e){return e.preventDefault()},maxLength:t.questionOptions.max||d.oil.maxLength})?O:{},Object.getOwnPropertyDescriptors?Object.defineProperties(L,Object.getOwnPropertyDescriptors(O)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n.push.apply(n,i)}return n}(Object(O)).forEach((function(e){Object.defineProperty(L,e,Object.getOwnPropertyDescriptor(O,e))})),L))),T&&c().createElement("div",null,c().createElement(or,{value:T.value,displayText:T.display,setValue:function(e){a(t.id,e),o.value=e,o.onBlur(null)}}))))};var lo=n(44491),co={};co.styleTagTransform=Zn(),co.setAttributes=Vn(),co.insert=Wn().bind(null,"head"),co.domAPI=Nn(),co.insertStyleElement=qn(),Bn()(lo.Z,co);const uo=lo.Z&&lo.Z.locals?lo.Z.locals:void 0;function ho(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function fo(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,r,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(i=n.next()).done)&&(o.push(i.value),!t||o.length!==t);s=!0);}catch(e){a=!0,r=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw r}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ho(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ho(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const po=function(e){var t=e.question,n=e.onChange,i=e.handler,r=fo(Rn(t.id),2),o=r[0],s=(r[1],c().useContext(u)),a=s.setFieldValue,h=s.encounterContext,f=s.layoutType,p=s.workspaceLayout,g=fo((0,l.useState)("Loading..."),2),m=g[0],v=g[1];(0,l.useEffect)((function(){var e;t.value||"enter"!=h.sessionMode||(t.value=null==i?void 0:i.handleFieldSubmission(t,null!==(e=o.value)&&void 0!==e&&e,h))}),[]),(0,l.useEffect)((function(){Ti(t.questionOptions.concept).then((function(e){v(e)}))}),[m]);var b=(0,l.useMemo)((function(){return!("view"!=h.sessionMode&&!(0,jn.o)(t.readonly))&&Ri(t.inlineRendering,f,p)}),[h.sessionMode,t.readonly,t.inlineRendering,f,p]);return"view"==h.sessionMode||(0,jn.o)(t.readonly)?c().createElement("div",{className:uo.formField},c().createElement(Ki,{label:t.label,value:(0,In.xb)(o.value)?o.value:null==i?void 0:i.getDisplayValue(t,o.value),conceptName:m,isInline:b})):!t.isHidden&&c().createElement("div",{className:uo.formField},c().createElement(d.ZDl,{labelText:t.label,id:t.id,labelA:t.questionOptions.toggleOptions.labelFalse,labelB:t.questionOptions.toggleOptions.labelTrue,onToggle:function(e){a(t.id,e),n(t.id,e,null,null),t.value=null==i?void 0:i.handleFieldSubmission(t,e,h)},toggled:!!o.value,disabled:t.disabled}))};var go=n(32254),mo=n(17141),vo=n(92962),bo=n(36475),yo={};yo.styleTagTransform=Zn(),yo.setAttributes=Vn(),yo.insert=Wn().bind(null,"head"),yo.domAPI=Nn(),yo.insertStyleElement=qn(),Bn()(bo.Z,yo);const wo=bo.Z&&bo.Z.locals?bo.Z.locals:void 0;function _o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function Ao(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,r,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(i=n.next()).done)&&(o.push(i.value),!t||o.length!==t);s=!0);}catch(e){a=!0,r=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw r}}return o}}(e,t)||Co(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function xo(e){return function(e){if(Array.isArray(e))return _o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Co(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Co(e,t){if(e){if("string"==typeof e)return _o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_o(e,t):void 0}}var So=function(e,t,n){return xo(new Set(n)).forEach((function(n){e.match(n)&&(e=e.replace(new RegExp(n,"g"),"".concat(n,"-").concat(t)))})),e},Eo=function(e){var t,n,i=e.question,r=e.onChange,o=(0,tr.useTranslation)().t,s=Ao((0,l.useState)([i]),2),a=s[0],h=s[1],f=c().useContext(u),p=f.fields,g=f.encounterContext,m=f.obsGroupsToVoid,v=_n(),b=v.values,y=v.setValues,w=Ao((0,l.useState)(1),2),_=w[0],A=w[1];(0,l.useEffect)((function(){if(g.encounter&&!_){var e,t=null===(e=i.value)||void 0===e?void 0:e.uuid,n=g.encounter.obs.filter((function(e){return e.concept.uuid===i.questionOptions.concept&&e.uuid!=t})),r=_;n.forEach((function(e){x(r+=1,e)})),A(r)}}),[b]),(0,l.useEffect)((function(){a[0]=i,h(xo(a))}),[i]);var x=function(e,t){var n=[],r=e,o=on(i);o.value=t,o.id="".concat(o.id,"-").concat(r),o.questions.forEach((function(e){n.push(e.id)})),o.questions.forEach((function(e){var i;e.id="".concat(e.id,"-").concat(r),e.groupId=o.id,e.value=null;var s=t?function(e,t){var n,i=e.questionOptions.rendering,r=t.groupMembers.filter((function(t){return t.concept.uuid==e.questionOptions.concept}));return r.length?(e.value=r[0],"radio"!=i&&"content-switcher"!=i||(0,xi.getConcept)(e.questionOptions.concept,"custom:(uuid,display,datatype:(uuid,display,name))").subscribe((function(t){"Boolean"==t.datatype.name&&(e.value.value=r[0].value.uuid)})),"string"==typeof r[0].value||"number"==typeof r[0].value?"date"==e.questionOptions.rendering?Ai()(r[0].value).toDate():r[0].value:"checkbox"==e.questionOptions.rendering?(e.value=r,e.value.map((function(e){return e.value.uuid}))):"toggle"==e.questionOptions.rendering?(e.value.value=r[0].value.uuid,r[0].value==Ci.ks):null===(n=r[0].value)||void 0===n?void 0:n.uuid):""}(e,t):null;if(b["".concat(e.id)]=s||("checkbox"==e.questionOptions.rendering?[]:""),e.hide&&e.hide.hideWhenExpression){var a=So(e.hide.hideWhenExpression,r,n);e.hide.hideWhenExpression=a,e.isHidden=(0,vo.j3)(a,{value:e,type:"field"},p,b,{mode:g.sessionMode,patient:g.patient})}if(e.validators&&e.validators.length>0){var l=!0,c=!1,u=void 0;try{for(var d,h=e.validators[Symbol.iterator]();!(l=(d=h.next()).done);l=!0){var f=d.value;"js_expression"===f.type&&(f.failsWhenExpression=So(f.failsWhenExpression,r,n))}}catch(e){c=!0,u=e}finally{try{l||null==h.return||h.return()}finally{if(c)throw u}}}if(null===(i=e.questionOptions.calculate)||void 0===i?void 0:i.calculateExpression){var m,v=So(null===(m=e.questionOptions.calculate)||void 0===m?void 0:m.calculateExpression,r,n),y=(0,vo.j3)(v,{value:e,type:"field"},p,b,{mode:g.sessionMode,patient:g.patient});(0,In.xb)(y)||(b[e.id]=y,Tc(e.type).handleFieldSubmission(e,y,g))}p.push(e)})),y(b),p.push(o),a.push(o),h(a)},C=a.map((function(e,t){var n=a.length>1?c().createElement("div",null,c().createElement("div",{className:wo.removeButton},c().createElement(d.zxk,{renderIcon:function(){return c().createElement(go.ZN,{size:16})},kind:"danger--tertiary",onClick:function(){return function(e){e.value&&e.value.uuid&&(e.value.voided=!0,delete e.value.value,m.push(e.value)),h(a.filter((function(t){return t.id!==e.id}))),[e.id].concat(xo(e.questions.map((function(e){return e.id})))).forEach((function(e){var t=p.findIndex((function(t){return t.id===e}));p.splice(t,1),delete b[e]})),A(_-1)}(e)},hasIconOnly:!0}))):null;return c().createElement(c().Fragment,null,0!==t&&c().createElement("div",null,c().createElement("hr",{className:wo.separator})),c().createElement("div",{className:wo.obsGroupContainer},c().createElement(wi,{question:e,onChange:r,handler:Tc("obsGroup"),deleteControl:n})))}));return"view"!=g.sessionMode&&C.push(c().createElement("div",null,function(e,t){var n=Number(e);return!(!Number.isNaN(n)&&n>0)||t<n}(null===(t=i.questionOptions.repeatOptions)||void 0===t?void 0:t.limit,_)&&c().createElement(d.zxk,{renderIcon:function(){return c().createElement(mo.mm,{size:16})},className:wo.repeatButton,kind:"tertiary",onClick:function(){var e=_+1;x(e,null),A(e)}},c().createElement("span",null,(null===(n=i.questionOptions.repeatOptions)||void 0===n?void 0:n.addText)||"".concat(o("add","Add")))))),!i.isHidden&&c().createElement("div",{className:wo.container},c().createElement(d.cwH,{legendText:i.label,className:wo.boldLegend},C))},ko=[],$o={handleFieldSubmission:function(e,t,n){if("checkbox"==e.questionOptions.rendering)return Ro(e,t,n);if("toggle"==e.questionOptions.rendering)return Mo(t,n,e);if(e.value)"edit"!=n.sessionMode||t?t?(e.questionOptions.rendering.startsWith("date")?e.value.value=Ai()(t).format("YYYY-MM-DD HH:mm"):e.value.value=t,e.value.voided=!1):e.value=void 0:e.value.voided=!0;else{if(e.questionOptions.rendering.startsWith("date"))return e.value=Mo(Ai()(t).format("YYYY-MM-DD HH:mm"),n,e),e.value;e.value=Mo(t,n,e)}return e.value},getInitialValue:function(e,t,n){var i=To(e.obs,ko,t),r=t.questionOptions.rendering,o=null,s=null;if(i&&t.groupId)return"";if(!i&&t.groupId&&(o=n.find((function(e){return e.id==t.groupId})),(s=To(e.obs,null,o))&&(ko.push(s.uuid),o.value=s,s.groupMembers&&(i=To(s.groupMembers,ko,t)))),i){var a;if(ko.push(i.uuid),t.value=JSON.parse(JSON.stringify(i)),"radio"!=r&&"content-switcher"!=r||(0,xi.getConcept)(t.questionOptions.concept,"custom:(uuid,display,datatype:(uuid,display,name))").subscribe((function(e){"Boolean"==e.datatype.name&&(t.value.value=i.value.uuid)})),"string"==typeof i.value||"number"==typeof i.value){if(t.questionOptions.rendering.startsWith("date")){var l=Oi(t.value.value);return t.value.value=Ai()(l).format("YYYY-MM-DD HH:mm"),l}return i.value}return"checkbox"==t.questionOptions.rendering?(t.value=e.obs.filter((function(e){return e.concept.uuid==t.questionOptions.concept})),!t.value.length&&t.groupId&&(t.value=s.groupMembers.filter((function(e){return e.concept.uuid==t.questionOptions.concept}))),t.value.map((function(e){return e.value.uuid}))):"toggle"==t.questionOptions.rendering?(t.value.value=i.value.uuid,i.value==Ci.ks):"fixed-value"==r?t.fixedValue:null===(a=i.value)||void 0===a?void 0:a.uuid}return""},getDisplayValue:function(e,t){var n,i=e.questionOptions.rendering;if(!e.value)return null;if("checkbox"==e.questionOptions.rendering)return t.map((function(t){var n;return null===(n=e.questionOptions.answers.find((function(e){return e.concept==t})))||void 0===n?void 0:n.label}));if("content-switcher"==i||"select"==i||"toggle"==i){var r,o="object"==typeof e.value.value?e.value.value.uuid:e.value.value;return null===(r=e.questionOptions.answers.find((function(e){return e.concept==o})))||void 0===r?void 0:r.label}return"radio"==i?null===(n=e.questionOptions.answers.find((function(e){return e.concept==t})))||void 0===n?void 0:n.label:t},getPreviousValue:function(e,t,n){var i=To(t.obs,ko,e),r=e.questionOptions.rendering,o=null,s=null;if(i&&e.groupId)return"";if(!i&&e.groupId&&(o=n.find((function(t){return t.id==e.groupId})),(s=To(t.obs,ko,o))&&(ko.push(s.uuid),s.groupMembers&&(i=To(s.groupMembers,ko,e)))),i){var a,l;if(ko.push(i.uuid),"string"==typeof i.value||"number"==typeof i.value){if("date"==r||"datetime"==r){var c=Oi("".concat(i.value));return{value:c,display:Ai()(c).format("YYYY-MM-DD HH:mm")}}return{value:i.value,display:i.value}}return{value:null===(a=i.value)||void 0===a?void 0:a.uuid,display:null===(l=e.questionOptions.answers.find((function(e){var t;return e.concept==(null===(t=i.value)||void 0===t?void 0:t.uuid)})))||void 0===l?void 0:l.label}}return null}},Mo=function(e,t,n){var i;return{person:null===(i=t.patient)||void 0===i?void 0:i.id,obsDatetime:t.encounterDate,concept:n.questionOptions.concept,location:t.location,order:null,groupMembers:[],voided:!1,formFieldNamespace:"ohri-forms",formFieldPath:"ohri-forms-".concat(n.id),value:e}},To=function(e,t,n){var i=e.find((function(e){return e.formFieldPath=="ohri-forms-".concat(n.id)}));if(!i){var r=e.filter((function(e){return e.concept.uuid==n.questionOptions.concept}));return(null==t?void 0:t.length)?r.filter((function(e){return!t.includes(e.uuid)}))[0]:r[0]}return i},Ro=function(e,t,n){return e.value||(e.value=[]),t.forEach((function(t){var i=e.value.find((function(e){return"string"==typeof e.value?e.value==t:e.value.uuid==t}));i&&i.voided?i.voided=!1:i||e.value.push(Mo(t,n,e))})),e.questionOptions.answers.filter((function(e){return!t.some((function(t){return t==e.concept}))})).forEach((function(t){var i=e.value.filter((function(e){return"string"==typeof e.value?e.value==t.concept:e.value.uuid==t.concept}));i.length&&i.forEach((function(i){"edit"==n.sessionMode&&i.uuid?i.voided=!0:e.value=e.value.filter((function(e){return e.value!==t.concept}))}))})),e.value};const Lo=function(e){var t=e.question,n=e.handler,i=c().useContext(u),r=i.encounterContext,o=i.isFieldInitializationComplete;return(0,l.useEffect)((function(){var e,i,s;t.value&&"string"==typeof t.value&&o||(0,D.Z)(t.value)&&(e=t.fixedValue,i=t.value,!((0,D.Z)(i.value)?(null===(s=i.value)||void 0===s?void 0:s.uuid)==e:i.value==e))?(delete t.value,n.handleFieldSubmission(t,t.fixedValue,r)):!(0,jn.o)(t.isHidden)&&(0,In.xb)(t.value)&&n.handleFieldSubmission(t,t.fixedValue,r)}),[t.value,o,t.isHidden]),c().createElement(c().Fragment,null)};var Oo=n(48738);function Fo(e){return e&&"object"==typeof e?"position"in e||"type"in e?Io(e.position):"start"in e||"end"in e?Io(e):"line"in e||"column"in e?Do(e):"":""}function Do(e){return jo(e&&e.line)+":"+jo(e&&e.column)}function Io(e){return Do(e&&e.start)+"-"+Do(e&&e.end)}function jo(e){return e&&"number"==typeof e?e:1}class Po extends Error{constructor(e,t,n){const i=[null,null];let r={start:{line:null,column:null},end:{line:null,column:null}};if(super(),"string"==typeof t&&(n=t,t=void 0),"string"==typeof n){const e=n.indexOf(":");-1===e?i[1]=n:(i[0]=n.slice(0,e),i[1]=n.slice(e+1))}t&&("type"in t||"position"in t?t.position&&(r=t.position):"start"in t||"end"in t?r=t:("line"in t||"column"in t)&&(r.start=t)),this.name=Fo(t)||"1:1",this.message="object"==typeof e?e.message:e,this.stack="","object"==typeof e&&e.stack&&(this.stack=e.stack),this.reason=this.message,this.fatal,this.line=r.start.line,this.column=r.start.column,this.position=r,this.source=i[0],this.ruleId=i[1],this.file,this.actual,this.expected,this.url,this.note}}Po.prototype.file="",Po.prototype.name="",Po.prototype.reason="",Po.prototype.message="",Po.prototype.stack="",Po.prototype.fatal=null,Po.prototype.column=null,Po.prototype.line=null,Po.prototype.source=null,Po.prototype.ruleId=null,Po.prototype.position=null;const Bo=function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');zo(e);let n,i=0,r=-1,o=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;o--;)if(47===e.charCodeAt(o)){if(n){i=o+1;break}}else r<0&&(n=!0,r=o+1);return r<0?"":e.slice(i,r)}if(t===e)return"";let s=-1,a=t.length-1;for(;o--;)if(47===e.charCodeAt(o)){if(n){i=o+1;break}}else s<0&&(n=!0,s=o+1),a>-1&&(e.charCodeAt(o)===t.charCodeAt(a--)?a<0&&(r=o):(a=-1,r=s));return i===r?r=s:r<0&&(r=e.length),e.slice(i,r)},Uo=function(e){if(zo(e),0===e.length)return".";let t,n=-1,i=e.length;for(;--i;)if(47===e.charCodeAt(i)){if(t){n=i;break}}else t||(t=!0);return n<0?47===e.charCodeAt(0)?"/":".":1===n&&47===e.charCodeAt(0)?"//":e.slice(0,n)},No=function(e){zo(e);let t,n=e.length,i=-1,r=0,o=-1,s=0;for(;n--;){const a=e.charCodeAt(n);if(47!==a)i<0&&(t=!0,i=n+1),46===a?o<0?o=n:1!==s&&(s=1):o>-1&&(s=-1);else if(t){r=n+1;break}}return o<0||i<0||0===s||1===s&&o===i-1&&o===r+1?"":e.slice(o,i)},Ho=function(...e){let t,n=-1;for(;++n<e.length;)zo(e[n]),e[n]&&(t=void 0===t?e[n]:t+"/"+e[n]);return void 0===t?".":function(e){zo(e);const t=47===e.charCodeAt(0);let n=function(e,t){let n,i,r="",o=0,s=-1,a=0,l=-1;for(;++l<=e.length;){if(l<e.length)n=e.charCodeAt(l);else{if(47===n)break;n=47}if(47===n){if(s===l-1||1===a);else if(s!==l-1&&2===a){if(r.length<2||2!==o||46!==r.charCodeAt(r.length-1)||46!==r.charCodeAt(r.length-2))if(r.length>2){if(i=r.lastIndexOf("/"),i!==r.length-1){i<0?(r="",o=0):(r=r.slice(0,i),o=r.length-1-r.lastIndexOf("/")),s=l,a=0;continue}}else if(r.length>0){r="",o=0,s=l,a=0;continue}t&&(r=r.length>0?r+"/..":"..",o=2)}else r.length>0?r+="/"+e.slice(s+1,l):r=e.slice(s+1,l),o=l-s-1;s=l,a=0}else 46===n&&a>-1?a++:a=-1}return r}(e,!t);return 0!==n.length||t||(n="."),n.length>0&&47===e.charCodeAt(e.length-1)&&(n+="/"),t?"/"+n:n}(t)},Wo="/";function zo(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Vo=function(){return"/"};function Go(e){return null!==e&&"object"==typeof e&&e.href&&e.origin}const qo=["history","path","basename","stem","extname","dirname"];class Ko{constructor(e){let t;t=e?"string"==typeof e||Oo(e)?{value:e}:Go(e)?{path:e}:e:{},this.data={},this.messages=[],this.history=[],this.cwd=Vo(),this.value,this.stored,this.result,this.map;let n,i=-1;for(;++i<qo.length;){const e=qo[i];e in t&&void 0!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(n in t)qo.includes(n)||(this[n]=t[n])}get path(){return this.history[this.history.length-1]}set path(e){Go(e)&&(e=function(e){if("string"==typeof e)e=new URL(e);else if(!Go(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if("file:"!==e.protocol){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return function(e){if(""!==e.hostname){const e=new TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}const t=e.pathname;let n=-1;for(;++n<t.length;)if(37===t.charCodeAt(n)&&50===t.charCodeAt(n+1)){const e=t.charCodeAt(n+2);if(70===e||102===e){const e=new TypeError("File URL path must not include encoded / characters");throw e.code="ERR_INVALID_FILE_URL_PATH",e}}return decodeURIComponent(t)}(e)}(e)),Yo(e,"path"),this.path!==e&&this.history.push(e)}get dirname(){return"string"==typeof this.path?Uo(this.path):void 0}set dirname(e){Xo(this.basename,"dirname"),this.path=Ho(e||"",this.basename)}get basename(){return"string"==typeof this.path?Bo(this.path):void 0}set basename(e){Yo(e,"basename"),Zo(e,"basename"),this.path=Ho(this.dirname||"",e)}get extname(){return"string"==typeof this.path?No(this.path):void 0}set extname(e){if(Zo(e,"extname"),Xo(this.dirname,"extname"),e){if(46!==e.charCodeAt(0))throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Ho(this.dirname,this.stem+(e||""))}get stem(){return"string"==typeof this.path?Bo(this.path,this.extname):void 0}set stem(e){Yo(e,"stem"),Zo(e,"stem"),this.path=Ho(this.dirname||"",e+(this.extname||""))}toString(e){return(this.value||"").toString(e)}message(e,t,n){const i=new Po(e,t,n);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}info(e,t,n){const i=this.message(e,t,n);return i.fatal=null,i}fail(e,t,n){const i=this.message(e,t,n);throw i.fatal=!0,i}}function Zo(e,t){if(e&&e.includes(Wo))throw new Error("`"+t+"` cannot be a path: did not expect `"+Wo+"`")}function Yo(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Xo(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function Jo(e){if(e)throw e}var Qo=n(94470);function es(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}const ts=function e(){const t=function(){const e=[],t={run:function(...t){let n=-1;const i=t.pop();if("function"!=typeof i)throw new TypeError("Expected function as last argument, not "+i);!function r(o,...s){const a=e[++n];let l=-1;if(o)i(o);else{for(;++l<t.length;)null!==s[l]&&void 0!==s[l]||(s[l]=t[l]);t=s,a?function(e,t){let n;return function(...t){const o=e.length>t.length;let s;o&&t.push(i);try{s=e.apply(this,t)}catch(e){if(o&&n)throw e;return i(e)}o||(s instanceof Promise?s.then(r,i):s instanceof Error?i(s):r(s))};function i(e,...i){n||(n=!0,t(e,...i))}function r(e){i(null,e)}}(a,r)(...s):i(null,...s)}}(null,...t)},use:function(n){if("function"!=typeof n)throw new TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}};return t}(),n=[];let i,r={},o=-1;return s.data=function(e,t){return"string"==typeof e?2===arguments.length?(ss("data",i),r[e]=t,s):ns.call(r,e)&&r[e]||null:e?(ss("data",i),r=e,s):r},s.Parser=void 0,s.Compiler=void 0,s.freeze=function(){if(i)return s;for(;++o<n.length;){const[e,...i]=n[o];if(!1===i[0])continue;!0===i[0]&&(i[0]=void 0);const r=e.call(s,...i);"function"==typeof r&&t.use(r)}return i=!0,o=Number.POSITIVE_INFINITY,s},s.attachers=n,s.use=function(e,...t){let o;if(ss("use",i),null==e);else if("function"==typeof e)u(e,...t);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");Array.isArray(e)?c(e):l(e)}return o&&(r.settings=Object.assign(r.settings||{},o)),s;function a(e){if("function"==typeof e)u(e);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");if(Array.isArray(e)){const[t,...n]=e;u(t,...n)}else l(e)}}function l(e){c(e.plugins),e.settings&&(o=Object.assign(o||{},e.settings))}function c(e){let t=-1;if(null==e);else{if(!Array.isArray(e))throw new TypeError("Expected a list of plugins, not `"+e+"`");for(;++t<e.length;)a(e[t])}}function u(e,t){let i,r=-1;for(;++r<n.length;)if(n[r][0]===e){i=n[r];break}i?(es(i[1])&&es(t)&&(t=Qo(!0,i[1],t)),i[1]=t):n.push([...arguments])}},s.parse=function(e){s.freeze();const t=cs(e),n=s.Parser;return rs("parse",n),is(n,"parse")?new n(String(t),t).parse():n(String(t),t)},s.stringify=function(e,t){s.freeze();const n=cs(t),i=s.Compiler;return os("stringify",i),as(e),is(i,"compile")?new i(e,n).compile():i(e,n)},s.run=function(e,n,i){if(as(e),s.freeze(),i||"function"!=typeof n||(i=n,n=void 0),!i)return new Promise(r);function r(r,o){t.run(e,cs(n),(function(t,n,s){n=n||e,t?o(t):r?r(n):i(null,n,s)}))}r(null,i)},s.runSync=function(e,t){let n,i;return s.run(e,t,(function(e,t){Jo(e),n=t,i=!0})),ls("runSync","run",i),n},s.process=function(e,t){if(s.freeze(),rs("process",s.Parser),os("process",s.Compiler),!t)return new Promise(n);function n(n,i){const r=cs(e);function o(e,r){e||!r?i(e):n?n(r):t(null,r)}s.run(s.parse(r),r,((e,t,n)=>{if(!e&&t&&n){const r=s.stringify(t,n);null==r||("string"==typeof(i=r)||Oo(i)?n.value=r:n.result=r),o(e,n)}else o(e);var i}))}n(null,t)},s.processSync=function(e){let t;s.freeze(),rs("processSync",s.Parser),os("processSync",s.Compiler);const n=cs(e);return s.process(n,(function(e){t=!0,Jo(e)})),ls("processSync","process",t),n},s;function s(){const t=e();let i=-1;for(;++i<n.length;)t.use(...n[i]);return t.data(Qo(!0,{},r)),t}}().freeze(),ns={}.hasOwnProperty;function is(e,t){return"function"==typeof e&&e.prototype&&(function(e){let t;for(t in e)if(ns.call(e,t))return!0;return!1}(e.prototype)||t in e.prototype)}function rs(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `Parser`")}function os(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `Compiler`")}function ss(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function as(e){if(!es(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function ls(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function cs(e){return function(e){return Boolean(e&&"object"==typeof e&&"message"in e&&"messages"in e)}(e)?e:new Ko(e)}function us(e,t){return e&&"object"==typeof e&&(e.value||(t?e.alt:"")||"children"in e&&ds(e.children,t)||Array.isArray(e)&&ds(e,t))||""}function ds(e,t){for(var n=[],i=-1;++i<e.length;)n[i]=us(e[i],t);return n.join("")}function hs(e,t,n,i){const r=e.length;let o,s=0;if(t=t<0?-t>r?0:r+t:t>r?r:t,n=n>0?n:0,i.length<1e4)o=Array.from(i),o.unshift(t,n),[].splice.apply(e,o);else for(n&&[].splice.apply(e,[t,n]);s<i.length;)o=i.slice(s,s+1e4),o.unshift(t,0),[].splice.apply(e,o),s+=1e4,t+=1e4}function fs(e,t){return e.length>0?(hs(e,e.length,0,t),e):t}const ps={}.hasOwnProperty;function gs(e,t){let n;for(n in t){const i=(ps.call(e,n)?e[n]:void 0)||(e[n]={}),r=t[n];let o;for(o in r){ps.call(i,o)||(i[o]=[]);const e=r[o];ms(i[o],Array.isArray(e)?e:e?[e]:[])}}}function ms(e,t){let n=-1;const i=[];for(;++n<t.length;)("after"===t[n].add?e:i).push(t[n]);hs(e,0,0,i)}const vs=Ms(/[A-Za-z]/),bs=Ms(/\d/),ys=Ms(/[\dA-Fa-f]/),ws=Ms(/[\dA-Za-z]/),_s=Ms(/[!-/:-@[-`{-~]/),As=Ms(/[#-'*+\--9=?A-Z^-~]/);function xs(e){return null!==e&&(e<32||127===e)}function Cs(e){return null!==e&&(e<0||32===e)}function Ss(e){return null!==e&&e<-2}function Es(e){return-2===e||-1===e||32===e}const ks=Ms(/\s/),$s=Ms(/[!-/:-@[-`{-~\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/);function Ms(e){return function(t){return null!==t&&e.test(String.fromCharCode(t))}}function Ts(e,t,n,i){const r=i?i-1:Number.POSITIVE_INFINITY;let o=0;return function(i){return Es(i)?(e.enter(n),s(i)):t(i)};function s(i){return Es(i)&&o++<r?(e.consume(i),s):(e.exit(n),t(i))}}const Rs={tokenize:function(e){const t=e.attempt(this.parser.constructs.contentInitial,(function(n){if(null!==n)return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),Ts(e,t,"linePrefix");e.consume(n)}),(function(t){return e.enter("paragraph"),i(t)}));let n;return t;function i(t){const i=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=i),n=i,r(t)}function r(t){return null===t?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(t)):Ss(t)?(e.consume(t),e.exit("chunkText"),i):(e.consume(t),r)}}},Ls={tokenize:function(e){const t=this,n=[];let i,r,o,s=0;return a;function a(i){if(s<n.length){const r=n[s];return t.containerState=r[1],e.attempt(r[0].continuation,l,c)(i)}return c(i)}function l(e){if(s++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&b();const n=t.events.length;let r,o=n;for(;o--;)if("exit"===t.events[o][0]&&"chunkFlow"===t.events[o][1].type){r=t.events[o][1].end;break}v(s);let a=n;for(;a<t.events.length;)t.events[a][1].end=Object.assign({},r),a++;return hs(t.events,o+1,0,t.events.slice(n)),t.events.length=a,c(e)}return a(e)}function c(r){if(s===n.length){if(!i)return h(r);if(i.currentConstruct&&i.currentConstruct.concrete)return p(r);t.interrupt=Boolean(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Os,u,d)(r)}function u(e){return i&&b(),v(s),h(e)}function d(e){return t.parser.lazy[t.now().line]=s!==n.length,o=t.now().offset,p(e)}function h(n){return t.containerState={},e.attempt(Os,f,p)(n)}function f(e){return s++,n.push([t.currentConstruct,t.containerState]),h(e)}function p(n){return null===n?(i&&b(),v(0),void e.consume(n)):(i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{contentType:"flow",previous:r,_tokenizer:i}),g(n))}function g(n){return null===n?(m(e.exit("chunkFlow"),!0),v(0),void e.consume(n)):Ss(n)?(e.consume(n),m(e.exit("chunkFlow")),s=0,t.interrupt=void 0,a):(e.consume(n),g)}function m(e,n){const a=t.sliceStream(e);if(n&&a.push(null),e.previous=r,r&&(r.next=e),r=e,i.defineSkip(e.start),i.write(a),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;const n=t.events.length;let r,a,l=n;for(;l--;)if("exit"===t.events[l][0]&&"chunkFlow"===t.events[l][1].type){if(r){a=t.events[l][1].end;break}r=!0}for(v(s),e=n;e<t.events.length;)t.events[e][1].end=Object.assign({},a),e++;hs(t.events,l+1,0,t.events.slice(n)),t.events.length=e}}function v(i){let r=n.length;for(;r-- >i;){const i=n[r];t.containerState=i[1],i[0].exit.call(t,e)}n.length=i}function b(){i.write([null]),r=void 0,i=void 0,t.containerState._closeFlow=void 0}}},Os={tokenize:function(e,t,n){return Ts(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}},Fs={tokenize:function(e,t,n){return Ts(e,(function(e){return null===e||Ss(e)?t(e):n(e)}),"linePrefix")},partial:!0};function Ds(e){const t={};let n,i,r,o,s,a,l,c=-1;for(;++c<e.length;){for(;c in t;)c=t[c];if(n=e[c],c&&"chunkFlow"===n[1].type&&"listItemPrefix"===e[c-1][1].type&&(a=n[1]._tokenizer.events,r=0,r<a.length&&"lineEndingBlank"===a[r][1].type&&(r+=2),r<a.length&&"content"===a[r][1].type))for(;++r<a.length&&"content"!==a[r][1].type;)"chunkText"===a[r][1].type&&(a[r][1]._isInFirstContentOfListItem=!0,r++);if("enter"===n[0])n[1].contentType&&(Object.assign(t,Is(e,c)),c=t[c],l=!0);else if(n[1]._container){for(r=c,i=void 0;r--&&(o=e[r],"lineEnding"===o[1].type||"lineEndingBlank"===o[1].type);)"enter"===o[0]&&(i&&(e[i][1].type="lineEndingBlank"),o[1].type="lineEnding",i=r);i&&(n[1].end=Object.assign({},e[i][1].start),s=e.slice(i,c),s.unshift(n),hs(e,i,c-i+1,s))}}return!l}function Is(e,t){const n=e[t][1],i=e[t][2];let r=t-1;const o=[],s=n._tokenizer||i.parser[n.contentType](n.start),a=s.events,l=[],c={};let u,d,h=-1,f=n,p=0,g=0;const m=[g];for(;f;){for(;e[++r][1]!==f;);o.push(r),f._tokenizer||(u=i.sliceStream(f),f.next||u.push(null),d&&s.defineSkip(f.start),f._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(u),f._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),d=f,f=f.next}for(f=n;++h<a.length;)"exit"===a[h][0]&&"enter"===a[h-1][0]&&a[h][1].type===a[h-1][1].type&&a[h][1].start.line!==a[h][1].end.line&&(g=h+1,m.push(g),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(s.events=[],f?(f._tokenizer=void 0,f.previous=void 0):m.pop(),h=m.length;h--;){const t=a.slice(m[h],m[h+1]),n=o.pop();l.unshift([n,n+t.length-1]),hs(e,n,2,t)}for(h=-1;++h<l.length;)c[p+l[h][0]]=p+l[h][1],p+=l[h][1]-l[h][0]-1;return c}const js={tokenize:function(e,t){let n;return function(t){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(t)};function i(t){return null===t?r(t):Ss(t)?e.check(Ps,o,r)(t):(e.consume(t),i)}function r(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function o(t){return e.consume(t),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}},resolve:function(e){return Ds(e),e}},Ps={tokenize:function(e,t,n){const i=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),Ts(e,r,"linePrefix")};function r(r){if(null===r||Ss(r))return n(r);const o=i.events[i.events.length-1];return!i.parser.constructs.disable.null.includes("codeIndented")&&o&&"linePrefix"===o[1].type&&o[2].sliceSerialize(o[1],!0).length>=4?t(r):e.interrupt(i.parser.constructs.flow,n,t)(r)}},partial:!0},Bs={tokenize:function(e){const t=this,n=e.attempt(Fs,(function(i){if(null!==i)return e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n;e.consume(i)}),e.attempt(this.parser.constructs.flowInitial,i,Ts(e,e.attempt(this.parser.constructs.flow,i,e.attempt(js,i)),"linePrefix")));return n;function i(i){if(null!==i)return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t.currentConstruct=void 0,n;e.consume(i)}}},Us={resolveAll:zs()},Ns=Ws("string"),Hs=Ws("text");function Ws(e){return{tokenize:function(t){const n=this,i=this.parser.constructs[e],r=t.attempt(i,o,s);return o;function o(e){return l(e)?r(e):s(e)}function s(e){if(null!==e)return t.enter("data"),t.consume(e),a;t.consume(e)}function a(e){return l(e)?(t.exit("data"),r(e)):(t.consume(e),a)}function l(e){if(null===e)return!0;const t=i[e];let r=-1;if(t)for(;++r<t.length;){const e=t[r];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}},resolveAll:zs("text"===e?Vs:void 0)}}function zs(e){return function(t,n){let i,r=-1;for(;++r<=t.length;)void 0===i?t[r]&&"data"===t[r][1].type&&(i=r,r++):t[r]&&"data"===t[r][1].type||(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function Vs(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||"lineEnding"===e[n][1].type)&&"data"===e[n-1][1].type){const i=e[n-1][1],r=t.sliceStream(i);let o,s=r.length,a=-1,l=0;for(;s--;){const e=r[s];if("string"==typeof e){for(a=e.length;32===e.charCodeAt(a-1);)l++,a--;if(a)break;a=-1}else if(-2===e)o=!0,l++;else if(-1!==e){s++;break}}if(l){const r={type:n===e.length||o||l<2?"lineSuffix":"hardBreakTrailing",start:{line:i.end.line,column:i.end.column-l,offset:i.end.offset-l,_index:i.start._index+s,_bufferIndex:s?a:i.start._bufferIndex+a},end:Object.assign({},i.end)};i.end=Object.assign({},r.start),i.start.offset===i.end.offset?Object.assign(i,r):(e.splice(n,0,["enter",r,t],["exit",r,t]),n+=2)}n++}return e}function Gs(e,t,n){const i=[];let r=-1;for(;++r<e.length;){const o=e[r].resolveAll;o&&!i.includes(o)&&(t=o(t,n),i.push(o))}return t}function qs(e,t,n){let i=Object.assign(n?Object.assign({},n):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const r={},o=[];let s=[],a=[],l=!0;const c={consume:function(e){Ss(e)?(i.line++,i.column=1,i.offset+=-3===e?2:1,y()):-1!==e&&(i.column++,i.offset++),i._bufferIndex<0?i._index++:(i._bufferIndex++,i._bufferIndex===s[i._index].length&&(i._bufferIndex=-1,i._index++)),u.previous=e,l=!0},enter:function(e,t){const n=t||{};return n.type=e,n.start=p(),u.events.push(["enter",n,u]),a.push(n),n},exit:function(e){const t=a.pop();return t.end=p(),u.events.push(["exit",t,u]),t},attempt:v((function(e,t){b(e,t.from)})),check:v(m),interrupt:v(m,{interrupt:!0})},u={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:f,sliceSerialize:function(e,t){return function(e,t){let n=-1;const i=[];let r;for(;++n<e.length;){const o=e[n];let s;if("string"==typeof o)s=o;else switch(o){case-5:s="\r";break;case-4:s="\n";break;case-3:s="\r\n";break;case-2:s=t?" ":"\t";break;case-1:if(!t&&r)continue;s=" ";break;default:s=String.fromCharCode(o)}r=-2===o,i.push(s)}return i.join("")}(f(e),t)},now:p,defineSkip:function(e){r[e.line]=e.column,y()},write:function(e){return s=fs(s,e),function(){let e;for(;i._index<s.length;){const t=s[i._index];if("string"==typeof t)for(e=i._index,i._bufferIndex<0&&(i._bufferIndex=0);i._index===e&&i._bufferIndex<t.length;)g(t.charCodeAt(i._bufferIndex));else g(t)}}(),null!==s[s.length-1]?[]:(b(t,0),u.events=Gs(o,u.events,u),u.events)}};let d,h=t.tokenize.call(u,c);return t.resolveAll&&o.push(t),u;function f(e){return function(e,t){const n=t.start._index,i=t.start._bufferIndex,r=t.end._index,o=t.end._bufferIndex;let s;return n===r?s=[e[n].slice(i,o)]:(s=e.slice(n,r),i>-1&&(s[0]=s[0].slice(i)),o>0&&s.push(e[r].slice(0,o))),s}(s,e)}function p(){return Object.assign({},i)}function g(e){l=void 0,d=e,h=h(e)}function m(e,t){t.restore()}function v(e,t){return function(n,r,o){let s,d,h,f;return Array.isArray(n)?m(n):"tokenize"in n?m([n]):(g=n,function(e){const t=null!==e&&g[e],n=null!==e&&g.null;return m([...Array.isArray(t)?t:t?[t]:[],...Array.isArray(n)?n:n?[n]:[]])(e)});var g;function m(e){return s=e,d=0,0===e.length?o:v(e[d])}function v(e){return function(n){return f=function(){const e=p(),t=u.previous,n=u.currentConstruct,r=u.events.length,o=Array.from(a);return{restore:function(){i=e,u.previous=t,u.currentConstruct=n,u.events.length=r,a=o,y()},from:r}}(),h=e,e.partial||(u.currentConstruct=e),e.name&&u.parser.constructs.disable.null.includes(e.name)?w():e.tokenize.call(t?Object.assign(Object.create(u),t):u,c,b,w)(n)}}function b(t){return l=!0,e(h,f),r}function w(e){return l=!0,f.restore(),++d<s.length?v(s[d]):o}}}function b(e,t){e.resolveAll&&!o.includes(e)&&o.push(e),e.resolve&&hs(u.events,t,u.events.length-t,e.resolve(u.events.slice(t),u)),e.resolveTo&&(u.events=e.resolveTo(u.events,u))}function y(){i.line in r&&i.column<2&&(i.column=r[i.line],i.offset+=r[i.line]-1)}}const Ks={name:"thematicBreak",tokenize:function(e,t,n){let i,r=0;return function(t){return e.enter("thematicBreak"),i=t,o(t)};function o(a){return a===i?(e.enter("thematicBreakSequence"),s(a)):Es(a)?Ts(e,o,"whitespace")(a):r<3||null!==a&&!Ss(a)?n(a):(e.exit("thematicBreak"),t(a))}function s(t){return t===i?(e.consume(t),r++,s):(e.exit("thematicBreakSequence"),o(t))}}},Zs={name:"list",tokenize:function(e,t,n){const i=this,r=i.events[i.events.length-1];let o=r&&"linePrefix"===r[1].type?r[2].sliceSerialize(r[1],!0).length:0,s=0;return function(t){const r=i.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===r?!i.containerState.marker||t===i.containerState.marker:bs(t)){if(i.containerState.type||(i.containerState.type=r,e.enter(r,{_container:!0})),"listUnordered"===r)return e.enter("listItemPrefix"),42===t||45===t?e.check(Ks,n,l)(t):l(t);if(!i.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),a(t)}return n(t)};function a(t){return bs(t)&&++s<10?(e.consume(t),a):(!i.interrupt||s<2)&&(i.containerState.marker?t===i.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),l(t)):n(t)}function l(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||t,e.check(Fs,i.interrupt?n:c,e.attempt(Ys,d,u))}function c(e){return i.containerState.initialBlankLine=!0,o++,d(e)}function u(t){return Es(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),d):n(t)}function d(n){return i.containerState.size=o+i.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}},continuation:{tokenize:function(e,t,n){const i=this;return i.containerState._closeFlow=void 0,e.check(Fs,(function(n){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,Ts(e,t,"listItemIndent",i.containerState.size+1)(n)}),(function(n){return i.containerState.furtherBlankLines||!Es(n)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,r(n)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,e.attempt(Xs,t,r)(n))}));function r(r){return i.containerState._closeFlow=!0,i.interrupt=void 0,Ts(e,e.attempt(Zs,t,n),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(r)}}},exit:function(e){e.exit(this.containerState.type)}},Ys={tokenize:function(e,t,n){const i=this;return Ts(e,(function(e){const r=i.events[i.events.length-1];return!Es(e)&&r&&"listItemPrefixWhitespace"===r[1].type?t(e):n(e)}),"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5)},partial:!0},Xs={tokenize:function(e,t,n){const i=this;return Ts(e,(function(e){const r=i.events[i.events.length-1];return r&&"listItemIndent"===r[1].type&&r[2].sliceSerialize(r[1],!0).length===i.containerState.size?t(e):n(e)}),"listItemIndent",i.containerState.size+1)},partial:!0},Js={name:"blockQuote",tokenize:function(e,t,n){const i=this;return function(t){if(62===t){const n=i.containerState;return n.open||(e.enter("blockQuote",{_container:!0}),n.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),r}return n(t)};function r(n){return Es(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}},continuation:{tokenize:function(e,t,n){return Ts(e,e.attempt(Js,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}},exit:function(e){e.exit("blockQuote")}};function Qs(e,t,n,i,r,o,s,a,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return function(t){return 60===t?(e.enter(i),e.enter(r),e.enter(o),e.consume(t),e.exit(o),d):null===t||41===t||xs(t)?n(t):(e.enter(i),e.enter(s),e.enter(a),e.enter("chunkString",{contentType:"string"}),p(t))};function d(n){return 62===n?(e.enter(o),e.consume(n),e.exit(o),e.exit(r),e.exit(i),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),h(n))}function h(t){return 62===t?(e.exit("chunkString"),e.exit(a),d(t)):null===t||60===t||Ss(t)?n(t):(e.consume(t),92===t?f:h)}function f(t){return 60===t||62===t||92===t?(e.consume(t),h):h(t)}function p(r){return 40===r?++u>c?n(r):(e.consume(r),p):41===r?u--?(e.consume(r),p):(e.exit("chunkString"),e.exit(a),e.exit(s),e.exit(i),t(r)):null===r||Cs(r)?u?n(r):(e.exit("chunkString"),e.exit(a),e.exit(s),e.exit(i),t(r)):xs(r)?n(r):(e.consume(r),92===r?g:p)}function g(t){return 40===t||41===t||92===t?(e.consume(t),p):p(t)}}function ea(e,t,n,i,r,o){const s=this;let a,l=0;return function(t){return e.enter(i),e.enter(r),e.consume(t),e.exit(r),e.enter(o),c};function c(d){return null===d||91===d||93===d&&!a||94===d&&!l&&"_hiddenFootnoteSupport"in s.parser.constructs||l>999?n(d):93===d?(e.exit(o),e.enter(r),e.consume(d),e.exit(r),e.exit(i),t):Ss(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),u(d))}function u(t){return null===t||91===t||93===t||Ss(t)||l++>999?(e.exit("chunkString"),c(t)):(e.consume(t),a=a||!Es(t),92===t?d:u)}function d(t){return 91===t||92===t||93===t?(e.consume(t),l++,u):u(t)}}function ta(e,t,n,i,r,o){let s;return function(t){return e.enter(i),e.enter(r),e.consume(t),e.exit(r),s=40===t?41:t,a};function a(n){return n===s?(e.enter(r),e.consume(n),e.exit(r),e.exit(i),t):(e.enter(o),l(n))}function l(t){return t===s?(e.exit(o),a(s)):null===t?n(t):Ss(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),Ts(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(t))}function c(t){return t===s||null===t||Ss(t)?(e.exit("chunkString"),l(t)):(e.consume(t),92===t?u:c)}function u(t){return t===s||92===t?(e.consume(t),c):c(t)}}function na(e,t){let n;return function i(r){return Ss(r)?(e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),n=!0,i):Es(r)?Ts(e,i,n?"linePrefix":"lineSuffix")(r):t(r)}}function ia(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const ra={name:"definition",tokenize:function(e,t,n){const i=this;let r;return function(t){return e.enter("definition"),ea.call(i,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)};function o(t){return r=ia(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),na(e,Qs(e,e.attempt(oa,Ts(e,s,"whitespace"),Ts(e,s,"whitespace")),n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString"))):n(t)}function s(o){return null===o||Ss(o)?(e.exit("definition"),i.parser.defined.includes(r)||i.parser.defined.push(r),t(o)):n(o)}}},oa={tokenize:function(e,t,n){return function(t){return Cs(t)?na(e,i)(t):n(t)};function i(t){return 34===t||39===t||40===t?ta(e,Ts(e,r,"whitespace"),n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t):n(t)}function r(e){return null===e||Ss(e)?t(e):n(e)}},partial:!0},sa={name:"codeIndented",tokenize:function(e,t,n){const i=this;return function(t){return e.enter("codeIndented"),Ts(e,r,"linePrefix",5)(t)};function r(e){const t=i.events[i.events.length-1];return t&&"linePrefix"===t[1].type&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return null===t?a(t):Ss(t)?e.attempt(aa,o,a)(t):(e.enter("codeFlowValue"),s(t))}function s(t){return null===t||Ss(t)?(e.exit("codeFlowValue"),o(t)):(e.consume(t),s)}function a(n){return e.exit("codeIndented"),t(n)}}},aa={tokenize:function(e,t,n){const i=this;return r;function r(t){return i.parser.lazy[i.now().line]?n(t):Ss(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),r):Ts(e,o,"linePrefix",5)(t)}function o(e){const o=i.events[i.events.length-1];return o&&"linePrefix"===o[1].type&&o[2].sliceSerialize(o[1],!0).length>=4?t(e):Ss(e)?r(e):n(e)}},partial:!0},la={name:"headingAtx",tokenize:function(e,t,n){const i=this;let r=0;return function(t){return e.enter("atxHeading"),e.enter("atxHeadingSequence"),o(t)};function o(a){return 35===a&&r++<6?(e.consume(a),o):null===a||Cs(a)?(e.exit("atxHeadingSequence"),i.interrupt?t(a):s(a)):n(a)}function s(n){return 35===n?(e.enter("atxHeadingSequence"),a(n)):null===n||Ss(n)?(e.exit("atxHeading"),t(n)):Es(n)?Ts(e,s,"whitespace")(n):(e.enter("atxHeadingText"),l(n))}function a(t){return 35===t?(e.consume(t),a):(e.exit("atxHeadingSequence"),s(t))}function l(t){return null===t||35===t||Cs(t)?(e.exit("atxHeadingText"),s(t)):(e.consume(t),l)}},resolve:function(e,t){let n,i,r=e.length-2,o=3;return"whitespace"===e[o][1].type&&(o+=2),r-2>o&&"whitespace"===e[r][1].type&&(r-=2),"atxHeadingSequence"===e[r][1].type&&(o===r-1||r-4>o&&"whitespace"===e[r-2][1].type)&&(r-=o+1===r?2:4),r>o&&(n={type:"atxHeadingText",start:e[o][1].start,end:e[r][1].end},i={type:"chunkText",start:e[o][1].start,end:e[r][1].end,contentType:"text"},hs(e,o,r-o+1,[["enter",n,t],["enter",i,t],["exit",i,t],["exit",n,t]])),e}},ca={name:"setextUnderline",tokenize:function(e,t,n){const i=this;let r,o,s=i.events.length;for(;s--;)if("lineEnding"!==i.events[s][1].type&&"linePrefix"!==i.events[s][1].type&&"content"!==i.events[s][1].type){o="paragraph"===i.events[s][1].type;break}return function(t){return i.parser.lazy[i.now().line]||!i.interrupt&&!o?n(t):(e.enter("setextHeadingLine"),e.enter("setextHeadingLineSequence"),r=t,a(t))};function a(t){return t===r?(e.consume(t),a):(e.exit("setextHeadingLineSequence"),Ts(e,l,"lineSuffix")(t))}function l(i){return null===i||Ss(i)?(e.exit("setextHeadingLine"),t(i)):n(i)}},resolveTo:function(e,t){let n,i,r,o=e.length;for(;o--;)if("enter"===e[o][0]){if("content"===e[o][1].type){n=o;break}"paragraph"===e[o][1].type&&(i=o)}else"content"===e[o][1].type&&e.splice(o,1),r||"definition"!==e[o][1].type||(r=o);const s={type:"setextHeading",start:Object.assign({},e[i][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[i][1].type="setextHeadingText",r?(e.splice(i,0,["enter",s,t]),e.splice(r+1,0,["exit",e[n][1],t]),e[n][1].end=Object.assign({},e[r][1].end)):e[n][1]=s,e.push(["exit",s,t]),e}},ua=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],da=["pre","script","style","textarea"],ha={name:"htmlFlow",tokenize:function(e,t,n){const i=this;let r,o,s,a,l;return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),c};function c(a){return 33===a?(e.consume(a),u):47===a?(e.consume(a),f):63===a?(e.consume(a),r=3,i.interrupt?t:F):vs(a)?(e.consume(a),s=String.fromCharCode(a),o=!0,p):n(a)}function u(o){return 45===o?(e.consume(o),r=2,d):91===o?(e.consume(o),r=5,s="CDATA[",a=0,h):vs(o)?(e.consume(o),r=4,i.interrupt?t:F):n(o)}function d(r){return 45===r?(e.consume(r),i.interrupt?t:F):n(r)}function h(r){return r===s.charCodeAt(a++)?(e.consume(r),a===s.length?i.interrupt?t:E:h):n(r)}function f(t){return vs(t)?(e.consume(t),s=String.fromCharCode(t),p):n(t)}function p(a){return null===a||47===a||62===a||Cs(a)?47!==a&&o&&da.includes(s.toLowerCase())?(r=1,i.interrupt?t(a):E(a)):ua.includes(s.toLowerCase())?(r=6,47===a?(e.consume(a),g):i.interrupt?t(a):E(a)):(r=7,i.interrupt&&!i.parser.lazy[i.now().line]?n(a):o?v(a):m(a)):45===a||ws(a)?(e.consume(a),s+=String.fromCharCode(a),p):n(a)}function g(r){return 62===r?(e.consume(r),i.interrupt?t:E):n(r)}function m(t){return Es(t)?(e.consume(t),m):C(t)}function v(t){return 47===t?(e.consume(t),C):58===t||95===t||vs(t)?(e.consume(t),b):Es(t)?(e.consume(t),v):C(t)}function b(t){return 45===t||46===t||58===t||95===t||ws(t)?(e.consume(t),b):y(t)}function y(t){return 61===t?(e.consume(t),w):Es(t)?(e.consume(t),y):v(t)}function w(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),l=t,_):Es(t)?(e.consume(t),w):(l=null,A(t))}function _(t){return null===t||Ss(t)?n(t):t===l?(e.consume(t),x):(e.consume(t),_)}function A(t){return null===t||34===t||39===t||60===t||61===t||62===t||96===t||Cs(t)?y(t):(e.consume(t),A)}function x(e){return 47===e||62===e||Es(e)?v(e):n(e)}function C(t){return 62===t?(e.consume(t),S):n(t)}function S(t){return Es(t)?(e.consume(t),S):null===t||Ss(t)?E(t):n(t)}function E(t){return 45===t&&2===r?(e.consume(t),T):60===t&&1===r?(e.consume(t),R):62===t&&4===r?(e.consume(t),D):63===t&&3===r?(e.consume(t),F):93===t&&5===r?(e.consume(t),O):!Ss(t)||6!==r&&7!==r?null===t||Ss(t)?k(t):(e.consume(t),E):e.check(fa,D,k)(t)}function k(t){return e.exit("htmlFlowData"),$(t)}function $(t){return null===t?I(t):Ss(t)?e.attempt({tokenize:M,partial:!0},$,I)(t):(e.enter("htmlFlowData"),E(t))}function M(e,t,n){return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),r};function r(e){return i.parser.lazy[i.now().line]?n(e):t(e)}}function T(t){return 45===t?(e.consume(t),F):E(t)}function R(t){return 47===t?(e.consume(t),s="",L):E(t)}function L(t){return 62===t&&da.includes(s.toLowerCase())?(e.consume(t),D):vs(t)&&s.length<8?(e.consume(t),s+=String.fromCharCode(t),L):E(t)}function O(t){return 93===t?(e.consume(t),F):E(t)}function F(t){return 62===t?(e.consume(t),D):45===t&&2===r?(e.consume(t),F):E(t)}function D(t){return null===t||Ss(t)?(e.exit("htmlFlowData"),I(t)):(e.consume(t),D)}function I(n){return e.exit("htmlFlow"),t(n)}},resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););return t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e},concrete:!0},fa={tokenize:function(e,t,n){return function(i){return e.exit("htmlFlowData"),e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),e.attempt(Fs,t,n)}},partial:!0},pa={name:"codeFenced",tokenize:function(e,t,n){const i=this,r={tokenize:function(e,t,n){let i=0;return Ts(e,(function(t){return e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),r(t)}),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4);function r(t){return t===l?(e.consume(t),i++,r):i<c?n(t):(e.exit("codeFencedFenceSequence"),Ts(e,o,"whitespace")(t))}function o(i){return null===i||Ss(i)?(e.exit("codeFencedFence"),t(i)):n(i)}},partial:!0},o={tokenize:function(e,t,n){const i=this;return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),r};function r(e){return i.parser.lazy[i.now().line]?n(e):t(e)}},partial:!0},s=this.events[this.events.length-1],a=s&&"linePrefix"===s[1].type?s[2].sliceSerialize(s[1],!0).length:0;let l,c=0;return function(t){return e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),l=t,u(t)};function u(t){return t===l?(e.consume(t),c++,u):(e.exit("codeFencedFenceSequence"),c<3?n(t):Ts(e,d,"whitespace")(t))}function d(t){return null===t||Ss(t)?g(t):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),h(t))}function h(t){return null===t||Cs(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ts(e,f,"whitespace")(t)):96===t&&t===l?n(t):(e.consume(t),h)}function f(t){return null===t||Ss(t)?g(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),p(t))}function p(t){return null===t||Ss(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),g(t)):96===t&&t===l?n(t):(e.consume(t),p)}function g(n){return e.exit("codeFencedFence"),i.interrupt?t(n):m(n)}function m(t){return null===t?b(t):Ss(t)?e.attempt(o,e.attempt(r,b,a?Ts(e,m,"linePrefix",a+1):m),b)(t):(e.enter("codeFlowValue"),v(t))}function v(t){return null===t||Ss(t)?(e.exit("codeFlowValue"),m(t)):(e.consume(t),v)}function b(n){return e.exit("codeFenced"),t(n)}},concrete:!0},ga=document.createElement("i");function ma(e){const t="&"+e+";";ga.innerHTML=t;const n=ga.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&n!==t&&n}const va={name:"characterReference",tokenize:function(e,t,n){const i=this;let r,o,s=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),a};function a(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),r=31,o=ws,c(t))}function l(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),r=6,o=ys,c):(e.enter("characterReferenceValue"),r=7,o=bs,c(t))}function c(a){let l;return 59===a&&s?(l=e.exit("characterReferenceValue"),o!==ws||ma(i.sliceSerialize(l))?(e.enter("characterReferenceMarker"),e.consume(a),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(a)):o(a)&&s++<r?(e.consume(a),c):n(a)}}},ba={name:"characterEscape",tokenize:function(e,t,n){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),i};function i(i){return _s(i)?(e.enter("characterEscapeValue"),e.consume(i),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(i)}}},ya={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),Ts(e,t,"linePrefix")}}},wa={name:"labelEnd",tokenize:function(e,t,n){const i=this;let r,o,s=i.events.length;for(;s--;)if(("labelImage"===i.events[s][1].type||"labelLink"===i.events[s][1].type)&&!i.events[s][1]._balanced){r=i.events[s][1];break}return function(t){return r?r._inactive?l(t):(o=i.parser.defined.includes(ia(i.sliceSerialize({start:r.end,end:i.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),a):n(t)};function a(n){return 40===n?e.attempt(_a,t,o?t:l)(n):91===n?e.attempt(Aa,t,o?e.attempt(xa,t,l):l)(n):o?t(n):l(n)}function l(e){return r._balanced=!0,n(e)}},resolveTo:function(e,t){let n,i,r,o,s=e.length,a=0;for(;s--;)if(n=e[s][1],i){if("link"===n.type||"labelLink"===n.type&&n._inactive)break;"enter"===e[s][0]&&"labelLink"===n.type&&(n._inactive=!0)}else if(r){if("enter"===e[s][0]&&("labelImage"===n.type||"labelLink"===n.type)&&!n._balanced&&(i=s,"labelLink"!==n.type)){a=2;break}}else"labelEnd"===n.type&&(r=s);const l={type:"labelLink"===e[i][1].type?"link":"image",start:Object.assign({},e[i][1].start),end:Object.assign({},e[e.length-1][1].end)},c={type:"label",start:Object.assign({},e[i][1].start),end:Object.assign({},e[r][1].end)},u={type:"labelText",start:Object.assign({},e[i+a+2][1].end),end:Object.assign({},e[r-2][1].start)};return o=[["enter",l,t],["enter",c,t]],o=fs(o,e.slice(i+1,i+a+3)),o=fs(o,[["enter",u,t]]),o=fs(o,Gs(t.parser.constructs.insideSpan.null,e.slice(i+a+4,r-3),t)),o=fs(o,[["exit",u,t],e[r-2],e[r-1],["exit",c,t]]),o=fs(o,e.slice(r+1)),o=fs(o,[["exit",l,t]]),hs(e,i,e.length,o),e},resolveAll:function(e){let t,n=-1;for(;++n<e.length;)t=e[n][1],"labelImage"!==t.type&&"labelLink"!==t.type&&"labelEnd"!==t.type||(e.splice(n+1,"labelImage"===t.type?4:2),t.type="data",n++);return e}},_a={tokenize:function(e,t,n){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),na(e,i)};function i(t){return 41===t?s(t):Qs(e,r,n,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function r(t){return Cs(t)?na(e,o)(t):s(t)}function o(t){return 34===t||39===t||40===t?ta(e,na(e,s),n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):s(t)}function s(i){return 41===i?(e.enter("resourceMarker"),e.consume(i),e.exit("resourceMarker"),e.exit("resource"),t):n(i)}}},Aa={tokenize:function(e,t,n){const i=this;return function(t){return ea.call(i,e,r,n,"reference","referenceMarker","referenceString")(t)};function r(e){return i.parser.defined.includes(ia(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)))?t(e):n(e)}}},xa={tokenize:function(e,t,n){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),i};function i(i){return 93===i?(e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),e.exit("reference"),t):n(i)}}},Ca={name:"labelStartImage",tokenize:function(e,t,n){const i=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),r};function r(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),o):n(t)}function o(e){return 94===e&&"_hiddenFootnoteSupport"in i.parser.constructs?n(e):t(e)}},resolveAll:wa.resolveAll};function Sa(e){return null===e||Cs(e)||ks(e)?1:$s(e)?2:void 0}const Ea={name:"attention",tokenize:function(e,t){const n=this.parser.constructs.attentionMarkers.null,i=this.previous,r=Sa(i);let o;return function(t){return e.enter("attentionSequence"),o=t,s(t)};function s(a){if(a===o)return e.consume(a),s;const l=e.exit("attentionSequence"),c=Sa(a),u=!c||2===c&&r||n.includes(a),d=!r||2===r&&c||n.includes(i);return l._open=Boolean(42===o?u:u&&(r||!d)),l._close=Boolean(42===o?d:d&&(c||!u)),t(a)}},resolveAll:function(e,t){let n,i,r,o,s,a,l,c,u=-1;for(;++u<e.length;)if("enter"===e[u][0]&&"attentionSequence"===e[u][1].type&&e[u][1]._close)for(n=u;n--;)if("exit"===e[n][0]&&"attentionSequence"===e[n][1].type&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[u][1]).charCodeAt(0)){if((e[n][1]._close||e[u][1]._open)&&(e[u][1].end.offset-e[u][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[u][1].end.offset-e[u][1].start.offset)%3))continue;a=e[n][1].end.offset-e[n][1].start.offset>1&&e[u][1].end.offset-e[u][1].start.offset>1?2:1;const d=Object.assign({},e[n][1].end),h=Object.assign({},e[u][1].start);ka(d,-a),ka(h,a),o={type:a>1?"strongSequence":"emphasisSequence",start:d,end:Object.assign({},e[n][1].end)},s={type:a>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[u][1].start),end:h},r={type:a>1?"strongText":"emphasisText",start:Object.assign({},e[n][1].end),end:Object.assign({},e[u][1].start)},i={type:a>1?"strong":"emphasis",start:Object.assign({},o.start),end:Object.assign({},s.end)},e[n][1].end=Object.assign({},o.start),e[u][1].start=Object.assign({},s.end),l=[],e[n][1].end.offset-e[n][1].start.offset&&(l=fs(l,[["enter",e[n][1],t],["exit",e[n][1],t]])),l=fs(l,[["enter",i,t],["enter",o,t],["exit",o,t],["enter",r,t]]),l=fs(l,Gs(t.parser.constructs.insideSpan.null,e.slice(n+1,u),t)),l=fs(l,[["exit",r,t],["enter",s,t],["exit",s,t],["exit",i,t]]),e[u][1].end.offset-e[u][1].start.offset?(c=2,l=fs(l,[["enter",e[u][1],t],["exit",e[u][1],t]])):c=0,hs(e,n-1,u-n+3,l),u=n+l.length-c-2;break}for(u=-1;++u<e.length;)"attentionSequence"===e[u][1].type&&(e[u][1].type="data");return e}};function ka(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const $a={name:"autolink",tokenize:function(e,t,n){let i=1;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),r};function r(t){return vs(t)?(e.consume(t),o):As(t)?l(t):n(t)}function o(e){return 43===e||45===e||46===e||ws(e)?s(e):l(e)}function s(t){return 58===t?(e.consume(t),a):(43===t||45===t||46===t||ws(t))&&i++<32?(e.consume(t),s):l(t)}function a(t){return 62===t?(e.exit("autolinkProtocol"),h(t)):null===t||32===t||60===t||xs(t)?n(t):(e.consume(t),a)}function l(t){return 64===t?(e.consume(t),i=0,c):As(t)?(e.consume(t),l):n(t)}function c(e){return ws(e)?u(e):n(e)}function u(t){return 46===t?(e.consume(t),i=0,c):62===t?(e.exit("autolinkProtocol").type="autolinkEmail",h(t)):d(t)}function d(t){return(45===t||ws(t))&&i++<63?(e.consume(t),45===t?d:u):n(t)}function h(n){return e.enter("autolinkMarker"),e.consume(n),e.exit("autolinkMarker"),e.exit("autolink"),t}}},Ma={name:"htmlText",tokenize:function(e,t,n){const i=this;let r,o,s,a;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),l};function l(t){return 33===t?(e.consume(t),c):47===t?(e.consume(t),A):63===t?(e.consume(t),w):vs(t)?(e.consume(t),S):n(t)}function c(t){return 45===t?(e.consume(t),u):91===t?(e.consume(t),o="CDATA[",s=0,g):vs(t)?(e.consume(t),y):n(t)}function u(t){return 45===t?(e.consume(t),d):n(t)}function d(t){return null===t||62===t?n(t):45===t?(e.consume(t),h):f(t)}function h(e){return null===e||62===e?n(e):f(e)}function f(t){return null===t?n(t):45===t?(e.consume(t),p):Ss(t)?(a=f,O(t)):(e.consume(t),f)}function p(t){return 45===t?(e.consume(t),D):f(t)}function g(t){return t===o.charCodeAt(s++)?(e.consume(t),s===o.length?m:g):n(t)}function m(t){return null===t?n(t):93===t?(e.consume(t),v):Ss(t)?(a=m,O(t)):(e.consume(t),m)}function v(t){return 93===t?(e.consume(t),b):m(t)}function b(t){return 62===t?D(t):93===t?(e.consume(t),b):m(t)}function y(t){return null===t||62===t?D(t):Ss(t)?(a=y,O(t)):(e.consume(t),y)}function w(t){return null===t?n(t):63===t?(e.consume(t),_):Ss(t)?(a=w,O(t)):(e.consume(t),w)}function _(e){return 62===e?D(e):w(e)}function A(t){return vs(t)?(e.consume(t),x):n(t)}function x(t){return 45===t||ws(t)?(e.consume(t),x):C(t)}function C(t){return Ss(t)?(a=C,O(t)):Es(t)?(e.consume(t),C):D(t)}function S(t){return 45===t||ws(t)?(e.consume(t),S):47===t||62===t||Cs(t)?E(t):n(t)}function E(t){return 47===t?(e.consume(t),D):58===t||95===t||vs(t)?(e.consume(t),k):Ss(t)?(a=E,O(t)):Es(t)?(e.consume(t),E):D(t)}function k(t){return 45===t||46===t||58===t||95===t||ws(t)?(e.consume(t),k):$(t)}function $(t){return 61===t?(e.consume(t),M):Ss(t)?(a=$,O(t)):Es(t)?(e.consume(t),$):E(t)}function M(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),r=t,T):Ss(t)?(a=M,O(t)):Es(t)?(e.consume(t),M):(e.consume(t),r=void 0,L)}function T(t){return t===r?(e.consume(t),R):null===t?n(t):Ss(t)?(a=T,O(t)):(e.consume(t),T)}function R(e){return 62===e||47===e||Cs(e)?E(e):n(e)}function L(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):62===t||Cs(t)?E(t):(e.consume(t),L)}function O(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),Ts(e,F,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function F(t){return e.enter("htmlTextData"),a(t)}function D(i){return 62===i?(e.consume(i),e.exit("htmlTextData"),e.exit("htmlText"),t):n(i)}}},Ta={name:"labelStartLink",tokenize:function(e,t,n){const i=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),r};function r(e){return 94===e&&"_hiddenFootnoteSupport"in i.parser.constructs?n(e):t(e)}},resolveAll:wa.resolveAll},Ra={name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.enter("escapeMarker"),e.consume(t),i};function i(i){return Ss(i)?(e.exit("escapeMarker"),e.exit("hardBreakEscape"),t(i)):n(i)}}},La={name:"codeText",tokenize:function(e,t,n){let i,r,o=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),s(t)};function s(t){return 96===t?(e.consume(t),o++,s):(e.exit("codeTextSequence"),a(t))}function a(t){return null===t?n(t):96===t?(r=e.enter("codeTextSequence"),i=0,c(t)):32===t?(e.enter("space"),e.consume(t),e.exit("space"),a):Ss(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a):(e.enter("codeTextData"),l(t))}function l(t){return null===t||32===t||96===t||Ss(t)?(e.exit("codeTextData"),a(t)):(e.consume(t),l)}function c(n){return 96===n?(e.consume(n),i++,c):i===o?(e.exit("codeTextSequence"),e.exit("codeText"),t(n)):(r.type="codeTextData",l(n))}},resolve:function(e){let t,n,i=e.length-4,r=3;if(!("lineEnding"!==e[r][1].type&&"space"!==e[r][1].type||"lineEnding"!==e[i][1].type&&"space"!==e[i][1].type))for(t=r;++t<i;)if("codeTextData"===e[t][1].type){e[r][1].type="codeTextPadding",e[i][1].type="codeTextPadding",r+=2,i-=2;break}for(t=r-1,i++;++t<=i;)void 0===n?t!==i&&"lineEnding"!==e[t][1].type&&(n=t):t!==i&&"lineEnding"!==e[t][1].type||(e[n][1].type="codeTextData",t!==n+2&&(e[n][1].end=e[t-1][1].end,e.splice(n+2,t-n-2),i-=t-n-2,t=n+2),n=void 0);return e},previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type}},Oa={42:Zs,43:Zs,45:Zs,48:Zs,49:Zs,50:Zs,51:Zs,52:Zs,53:Zs,54:Zs,55:Zs,56:Zs,57:Zs,62:Js},Fa={91:ra},Da={[-2]:sa,[-1]:sa,32:sa},Ia={35:la,42:Ks,45:[ca,Ks],60:ha,61:ca,95:Ks,96:pa,126:pa},ja={38:va,92:ba},Pa={[-5]:ya,[-4]:ya,[-3]:ya,33:Ca,38:va,42:Ea,60:[$a,Ma],91:Ta,92:[Ra,ba],93:wa,95:Ea,96:La},Ba={null:[Ea,Us]},Ua={null:[42,95]},Na={null:[]};const Ha=/[\0\t\n\r]/g;function Wa(e,t){const n=Number.parseInt(e,t);return n<9||11===n||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||65535==(65535&n)||65534==(65535&n)||n>1114111?"�":String.fromCharCode(n)}const za=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Va(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){const e=n.charCodeAt(1),t=120===e||88===e;return Wa(n.slice(t?2:1),t?16:10)}return ma(n)||e}const Ga={}.hasOwnProperty,qa=function(e,t,n){return"string"!=typeof t&&(n=t,t=void 0),function(e={}){const t=Ka({transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(_),autolinkProtocol:f,autolinkEmail:f,atxHeading:a(b),blockQuote:a((function(){return{type:"blockquote",children:[]}})),characterEscape:f,characterReference:f,codeFenced:a(v),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:a(v,l),codeText:a((function(){return{type:"inlineCode",value:""}}),l),codeTextData:f,data:f,codeFlowValue:f,definition:a((function(){return{type:"definition",identifier:"",label:null,title:null,url:""}})),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:a((function(){return{type:"emphasis",children:[]}})),hardBreakEscape:a(y),hardBreakTrailing:a(y),htmlFlow:a(w,l),htmlFlowData:f,htmlText:a(w,l),htmlTextData:f,image:a((function(){return{type:"image",title:null,url:"",alt:null}})),label:l,link:a(_),listItem:a((function(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}})),listItemValue:function(e){o("expectingFirstListItemValue")&&(this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),r("expectingFirstListItemValue"))},listOrdered:a(A,(function(){r("expectingFirstListItemValue",!0)})),listUnordered:a(A),paragraph:a((function(){return{type:"paragraph",children:[]}})),reference:function(){r("referenceType","collapsed")},referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:a(b),strong:a((function(){return{type:"strong",children:[]}})),thematicBreak:a((function(){return{type:"thematicBreak"}}))},exit:{atxHeading:u(),atxHeadingSequence:function(e){const t=this.stack[this.stack.length-1];if(!t.depth){const n=this.sliceSerialize(e).length;t.depth=n}},autolink:u(),autolinkEmail:function(e){p.call(this,e),this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)},autolinkProtocol:function(e){p.call(this,e),this.stack[this.stack.length-1].url=this.sliceSerialize(e)},blockQuote:u(),characterEscapeValue:p,characterReferenceMarkerHexadecimal:m,characterReferenceMarkerNumeric:m,characterReferenceValue:function(e){const t=this.sliceSerialize(e),n=o("characterReferenceType");let i;n?(i=Wa(t,"characterReferenceMarkerNumeric"===n?10:16),r("characterReferenceType")):i=ma(t);const a=this.stack.pop();a.value+=i,a.position.end=s(e.end)},codeFenced:u((function(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),r("flowCodeInside")})),codeFencedFence:function(){o("flowCodeInside")||(this.buffer(),r("flowCodeInside",!0))},codeFencedFenceInfo:function(){const e=this.resume();this.stack[this.stack.length-1].lang=e},codeFencedFenceMeta:function(){const e=this.resume();this.stack[this.stack.length-1].meta=e},codeFlowValue:p,codeIndented:u((function(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")})),codeText:u((function(){const e=this.resume();this.stack[this.stack.length-1].value=e})),codeTextData:p,data:p,definition:u(),definitionDestinationString:function(){const e=this.resume();this.stack[this.stack.length-1].url=e},definitionLabelString:function(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=ia(this.sliceSerialize(e)).toLowerCase()},definitionTitleString:function(){const e=this.resume();this.stack[this.stack.length-1].title=e},emphasis:u(),hardBreakEscape:u(g),hardBreakTrailing:u(g),htmlFlow:u((function(){const e=this.resume();this.stack[this.stack.length-1].value=e})),htmlFlowData:p,htmlText:u((function(){const e=this.resume();this.stack[this.stack.length-1].value=e})),htmlTextData:p,image:u((function(){const e=this.stack[this.stack.length-1];o("inReference")?(e.type+="Reference",e.referenceType=o("referenceType")||"shortcut",delete e.url,delete e.title):(delete e.identifier,delete e.label),r("referenceType")})),label:function(){const e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];r("inReference",!0),"link"===n.type?n.children=e.children:n.alt=t},labelText:function(e){const t=this.stack[this.stack.length-2],n=this.sliceSerialize(e);t.label=function(e){return e.replace(za,Va)}(n),t.identifier=ia(n).toLowerCase()},lineEnding:function(e){const n=this.stack[this.stack.length-1];if(o("atHardBreak"))return n.children[n.children.length-1].position.end=s(e.end),void r("atHardBreak");!o("setextHeadingSlurpLineEnding")&&t.canContainEols.includes(n.type)&&(f.call(this,e),p.call(this,e))},link:u((function(){const e=this.stack[this.stack.length-1];o("inReference")?(e.type+="Reference",e.referenceType=o("referenceType")||"shortcut",delete e.url,delete e.title):(delete e.identifier,delete e.label),r("referenceType")})),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:function(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=ia(this.sliceSerialize(e)).toLowerCase(),r("referenceType","full")},resourceDestinationString:function(){const e=this.resume();this.stack[this.stack.length-1].url=e},resourceTitleString:function(){const e=this.resume();this.stack[this.stack.length-1].title=e},resource:function(){r("inReference")},setextHeading:u((function(){r("setextHeadingSlurpLineEnding")})),setextHeadingLineSequence:function(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).charCodeAt(0)?1:2},setextHeadingText:function(){r("setextHeadingSlurpLineEnding",!0)},strong:u(),thematicBreak:u()}},e.mdastExtensions||[]),n={};return function(e){let n={type:"root",children:[]};const a=[],u=[],f={stack:[n],tokenStack:a,config:t,enter:c,exit:d,buffer:l,resume:h,setData:r,getData:o};let p=-1;for(;++p<e.length;)"listOrdered"!==e[p][1].type&&"listUnordered"!==e[p][1].type||("enter"===e[p][0]?u.push(p):p=i(e,u.pop(),p));for(p=-1;++p<e.length;){const n=t[e[p][0]];Ga.call(n,e[p][1].type)&&n[e[p][1].type].call(Object.assign({sliceSerialize:e[p][2].sliceSerialize},f),e[p][1])}if(a.length>0){const e=a[a.length-1];(e[1]||Ya).call(f,void 0,e[0])}for(n.position={start:s(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:s(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},p=-1;++p<t.transforms.length;)n=t.transforms[p](n)||n;return n};function i(e,t,n){let i,r,o,s,a=t-1,l=-1,c=!1;for(;++a<=n;){const t=e[a];if("listUnordered"===t[1].type||"listOrdered"===t[1].type||"blockQuote"===t[1].type?("enter"===t[0]?l++:l--,s=void 0):"lineEndingBlank"===t[1].type?"enter"===t[0]&&(!i||s||l||o||(o=a),s=void 0):"linePrefix"===t[1].type||"listItemValue"===t[1].type||"listItemMarker"===t[1].type||"listItemPrefix"===t[1].type||"listItemPrefixWhitespace"===t[1].type||(s=void 0),!l&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===l&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(i){let s=a;for(r=void 0;s--;){const t=e[s];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;r&&(e[r][1].type="lineEndingBlank",c=!0),t[1].type="lineEnding",r=s}else if("linePrefix"!==t[1].type&&"blockQuotePrefix"!==t[1].type&&"blockQuotePrefixWhitespace"!==t[1].type&&"blockQuoteMarker"!==t[1].type&&"listItemIndent"!==t[1].type)break}o&&(!r||o<r)&&(i._spread=!0),i.end=Object.assign({},r?e[r][1].start:t[1].end),e.splice(r||a,0,["exit",i,t[2]]),a++,n++}"listItemPrefix"===t[1].type&&(i={type:"listItem",_spread:!1,start:Object.assign({},t[1].start)},e.splice(a,0,["enter",i,t[2]]),a++,n++,o=void 0,s=!0)}}return e[t][1]._spread=c,n}function r(e,t){n[e]=t}function o(e){return n[e]}function s(e){return{line:e.line,column:e.column,offset:e.offset}}function a(e,t){return function(n){c.call(this,e(n),n),t&&t.call(this,n)}}function l(){this.stack.push({type:"fragment",children:[]})}function c(e,t,n){return this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n]),e.position={start:s(t.start)},e}function u(e){return function(t){e&&e.call(this,t),d.call(this,t)}}function d(e,t){const n=this.stack.pop(),i=this.tokenStack.pop();if(!i)throw new Error("Cannot close `"+e.type+"` ("+Fo({start:e.start,end:e.end})+"): it’s not open");return i[0].type!==e.type&&(t?t.call(this,e,i[0]):(i[1]||Ya).call(this,e,i[0])),n.position.end=s(e.end),n}function h(){return function(e,t){var{includeImageAlt:n=!0}={};return us(e,n)}(this.stack.pop())}function f(e){const t=this.stack[this.stack.length-1];let n=t.children[t.children.length-1];n&&"text"===n.type||(n={type:"text",value:""},n.position={start:s(e.start)},t.children.push(n)),this.stack.push(n)}function p(e){const t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=s(e.end)}function g(){r("atHardBreak",!0)}function m(e){r("characterReferenceType",e.type)}function v(){return{type:"code",lang:null,meta:null,value:""}}function b(){return{type:"heading",depth:void 0,children:[]}}function y(){return{type:"break"}}function w(){return{type:"html",value:""}}function _(){return{type:"link",title:null,url:"",children:[]}}function A(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}}(n)(function(e){for(;!Ds(e););return e}(function(e={}){const t=function(e){const t={};let n=-1;for(;++n<e.length;)gs(t,e[n]);return t}([i].concat(e.extensions||[])),n={defined:[],lazy:{},constructs:t,content:r(Rs),document:r(Ls),flow:r(Bs),string:r(Ns),text:r(Hs)};return n;function r(e){return function(t){return qs(n,e,t)}}}(n).document().write(function(){let e,t=1,n="",i=!0;return function(r,o,s){const a=[];let l,c,u,d,h;for(r=n+r.toString(o),u=0,n="",i&&(65279===r.charCodeAt(0)&&u++,i=void 0);u<r.length;){if(Ha.lastIndex=u,l=Ha.exec(r),d=l&&void 0!==l.index?l.index:r.length,h=r.charCodeAt(d),!l){n=r.slice(u);break}if(10===h&&u===d&&e)a.push(-3),e=void 0;else switch(e&&(a.push(-5),e=void 0),u<d&&(a.push(r.slice(u,d)),t+=d-u),h){case 0:a.push(65533),t++;break;case 9:for(c=4*Math.ceil(t/4),a.push(-2);t++<c;)a.push(-1);break;case 10:a.push(-4),t=1;break;default:e=!0,t=1}u=d+1}return s&&(e&&a.push(-5),n&&a.push(n),a.push(null)),a}}()(e,t,!0))))};function Ka(e,t){let n=-1;for(;++n<t.length;){const i=t[n];Array.isArray(i)?Ka(e,i):Za(e,i)}return e}function Za(e,t){let n;for(n in t)if(Ga.call(t,n)){const i="canContainEols"===n||"transforms"===n,r=(Ga.call(e,n)?e[n]:void 0)||(e[n]=i?[]:{}),o=t[n];o&&(i?e[n]=[...r,...o]:Object.assign(r,o))}}function Ya(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Fo({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Fo({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Fo({start:t.start,end:t.end})+") is still open")}const Xa=function(e){Object.assign(this,{Parser:t=>{const n=this.data("settings");return qa(t,Object.assign({},n,e,{extensions:this.data("micromarkExtensions")||[],mdastExtensions:this.data("fromMarkdownExtensions")||[]}))}})};var Ja=function(e,t,n){var i={type:String(e)};return null!=n||"string"!=typeof t&&!Array.isArray(t)?Object.assign(i,t):n=t,Array.isArray(n)?i.children=n:null!=n&&(i.value=String(n)),i};const Qa=function(e){if(null==e)return tl;if("string"==typeof e)return t=e,el((function(e){return e&&e.type===t}));var t;if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Qa(e[n]);return el((function(...e){let n=-1;for(;++n<t.length;)if(t[n].call(this,...e))return!0;return!1}))}(e):function(e){return el((function(t){let n;for(n in e)if(t[n]!==e[n])return!1;return!0}))}(e);if("function"==typeof e)return el(e);throw new Error("Expected function, string, or object as test")};function el(e){return function(...t){return Boolean(e.call(this,...t))}}function tl(){return!0}const nl=function(e,t,n,i){"function"==typeof t&&"function"!=typeof n&&(i=n,n=t,t=null),function(e,t,n,i){"function"==typeof t&&"function"!=typeof n&&(i=n,n=t,t=null);const r=Qa(t),o=i?-1:1;!function e(s,a,l){const c="object"==typeof s&&null!==s?s:{};let u;return"string"==typeof c.type&&(u="string"==typeof c.tagName?c.tagName:"string"==typeof c.name?c.name:void 0,Object.defineProperty(d,"name",{value:"node ("+c.type+(u?"<"+u+">":"")+")"})),d;function d(){let c,u,d,h=[];if((!t||r(s,a,l[l.length-1]||null))&&(h=function(e){return Array.isArray(e)?e:"number"==typeof e?[!0,e]:[e]}(n(s,l)),!1===h[0]))return h;if(s.children&&"skip"!==h[0])for(u=(i?s.children.length:-1)+o,d=l.concat(s);u>-1&&u<s.children.length;){if(c=e(s.children[u],u,d)(),!1===c[0])return c;u="number"==typeof c[1]?c[1]:u+o}return h}}(e,null,[])()}(e,t,(function(e,t){const i=t[t.length-1];return n(e,i?i.children.indexOf(e):null,i)}),i)},il=ol("start"),rl=ol("end");function ol(e){return function(t){const n=t&&t.position&&t.position[e]||{};return{line:n.line||null,column:n.column||null,offset:n.offset>-1?n.offset:null}}}const sl={}.hasOwnProperty;function al(e){return String(e||"").toUpperCase()}const ll={}.hasOwnProperty;function cl(e,t){const n=t.data||{};return"value"in t&&!(ll.call(n,"hName")||ll.call(n,"hProperties")||ll.call(n,"hChildren"))?e.augment(t,Ja("text",t.value)):e(t,"div",hl(e,t))}function ul(e,t,n){const i=t&&t.type;let r;if(!i)throw new Error("Expected node, got `"+t+"`");return r=ll.call(e.handlers,i)?e.handlers[i]:e.passThrough&&e.passThrough.includes(i)?dl:e.unknownHandler,("function"==typeof r?r:cl)(e,t,n)}function dl(e,t){return"children"in t?{...t,children:hl(e,t)}:t}function hl(e,t){const n=[];if("children"in t){const i=t.children;let r=-1;for(;++r<i.length;){const o=ul(e,i[r],t);if(o){if(r&&"break"===i[r-1].type&&(Array.isArray(o)||"text"!==o.type||(o.value=o.value.replace(/^\s+/,"")),!Array.isArray(o)&&"element"===o.type)){const e=o.children[0];e&&"text"===e.type&&(e.value=e.value.replace(/^\s+/,""))}Array.isArray(o)?n.push(...o):n.push(o)}}}return n}function fl(e,t){return e(t,"hr")}function pl(e,t){const n=[];let i=-1;for(t&&n.push(Ja("text","\n"));++i<e.length;)i&&n.push(Ja("text","\n")),n.push(e[i]);return t&&e.length>0&&n.push(Ja("text","\n")),n}function gl(e,t){const n={},i=t.ordered?"ol":"ul",r=hl(e,t);let o=-1;for("number"==typeof t.start&&1!==t.start&&(n.start=t.start);++o<r.length;){const e=r[o];if("element"===e.type&&"li"===e.tagName&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}return e(t,i,n,pl(r,!0))}function ml(e,t){const n=e.footnoteOrder,i=String(t.identifier),r=n.indexOf(i),o=String(-1===r?n.push(i):r+1);return e(t,"a",{href:"#fn"+o,className:["footnote-ref"],id:"fnref"+o,role:"doc-noteref"},[e(t.position,"sup",[Ja("text",o)])])}var vl=n(70729);function bl(e,t){const n=t.referenceType;let i="]";if("collapsed"===n?i+="[]":"full"===n&&(i+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return Ja("text","!["+t.alt+i);const r=hl(e,t),o=r[0];o&&"text"===o.type?o.value="["+o.value:r.unshift(Ja("text","["));const s=r[r.length-1];return s&&"text"===s.type?s.value+=i:r.push(Ja("text",i)),r}function yl(e){const t=e.spread;return null==t?e.children.length>1:t}const wl={blockquote:function(e,t){return e(t,"blockquote",pl(hl(e,t),!0))},break:function(e,t){return[e(t,"br"),Ja("text","\n")]},code:function(e,t){const n=t.value?t.value+"\n":"",i=t.lang&&t.lang.match(/^[^ \t]+(?=[ \t]|$)/),r={};i&&(r.className=["language-"+i]);const o=e(t,"code",r,[Ja("text",n)]);return t.meta&&(o.data={meta:t.meta}),e(t.position,"pre",[o])},delete:function(e,t){return e(t,"del",hl(e,t))},emphasis:function(e,t){return e(t,"em",hl(e,t))},footnoteReference:ml,footnote:function(e,t){const n=e.footnoteById,i=e.footnoteOrder;let r=1;for(;r in n;)r++;const o=String(r);return i.push(o),n[o]={type:"footnoteDefinition",identifier:o,children:[{type:"paragraph",children:t.children}],position:t.position},ml(e,{type:"footnoteReference",identifier:o,position:t.position})},heading:function(e,t){return e(t,"h"+t.depth,hl(e,t))},html:function(e,t){return e.dangerous?e.augment(t,Ja("raw",t.value)):null},imageReference:function(e,t){const n=e.definition(t.identifier);if(!n)return bl(e,t);const i={src:vl(n.url||""),alt:t.alt};return null!==n.title&&void 0!==n.title&&(i.title=n.title),e(t,"img",i)},image:function(e,t){const n={src:vl(t.url),alt:t.alt};return null!==t.title&&void 0!==t.title&&(n.title=t.title),e(t,"img",n)},inlineCode:function(e,t){return e(t,"code",[Ja("text",t.value.replace(/\r?\n|\r/g," "))])},linkReference:function(e,t){const n=e.definition(t.identifier);if(!n)return bl(e,t);const i={href:vl(n.url||"")};return null!==n.title&&void 0!==n.title&&(i.title=n.title),e(t,"a",i,hl(e,t))},link:function(e,t){const n={href:vl(t.url)};return null!==t.title&&void 0!==t.title&&(n.title=t.title),e(t,"a",n,hl(e,t))},listItem:function(e,t,n){const i=hl(e,t),r=n?function(e){let t=e.spread;const n=e.children;let i=-1;for(;!t&&++i<n.length;)t=yl(n[i]);return Boolean(t)}(n):yl(t),o={},s=[];if("boolean"==typeof t.checked){let n;i[0]&&"element"===i[0].type&&"p"===i[0].tagName?n=i[0]:(n=e(null,"p",[]),i.unshift(n)),n.children.length>0&&n.children.unshift(Ja("text"," ")),n.children.unshift(e(null,"input",{type:"checkbox",checked:t.checked,disabled:!0})),o.className=["task-list-item"]}let a=-1;for(;++a<i.length;){const e=i[a];(r||0!==a||"element"!==e.type||"p"!==e.tagName)&&s.push(Ja("text","\n")),"element"!==e.type||"p"!==e.tagName||r?s.push(e):s.push(...e.children)}const l=i[i.length-1];return!l||!r&&"tagName"in l&&"p"===l.tagName||s.push(Ja("text","\n")),e(t,"li",o,s)},list:gl,paragraph:function(e,t){return e(t,"p",hl(e,t))},root:function(e,t){return e.augment(t,Ja("root",pl(hl(e,t))))},strong:function(e,t){return e(t,"strong",hl(e,t))},table:function(e,t){const n=t.children;let i=-1;const r=t.align||[],o=[];for(;++i<n.length;){const s=n[i].children,a=0===i?"th":"td";let l=t.align?r.length:s.length;const c=[];for(;l--;){const t=s[l];c[l]=e(t,a,{align:r[l]},t?hl(e,t):[])}o[i]=e(n[i],"tr",pl(c,!0))}return e(t,"table",pl([e(o[0].position,"thead",pl([o[0]],!0))].concat(o[1]?e({start:il(o[1]),end:rl(o[o.length-1])},"tbody",pl(o.slice(1),!0)):[]),!0))},text:function(e,t){return e.augment(t,Ja("text",String(t.value).replace(/[ \t]*(\r?\n|\r)[ \t]*/g,"$1")))},thematicBreak:fl,toml:_l,yaml:_l,definition:_l,footnoteDefinition:_l};function _l(){return null}const Al={}.hasOwnProperty;function xl(e,t){const n=function(e,t){const n=t||{},i=n.allowDangerousHtml||!1,r={};return s.dangerous=i,s.definition=function(e){const t=Object.create(null);if(!e||!e.type)throw new Error("mdast-util-definitions expected node");return nl(e,"definition",(e=>{const n=al(e.identifier);n&&!sl.call(t,n)&&(t[n]=e)})),function(e){const n=al(e);return n&&sl.call(t,n)?t[n]:null}}(e),s.footnoteById=r,s.footnoteOrder=[],s.augment=o,s.handlers={...wl,...n.handlers},s.unknownHandler=n.unknownHandler,s.passThrough=n.passThrough,nl(e,"footnoteDefinition",(e=>{const t=String(e.identifier).toUpperCase();Al.call(r,t)||(r[t]=e)})),s;function o(e,t){if(e&&"data"in e&&e.data){const n=e.data;n.hName&&("element"!==t.type&&(t={type:"element",tagName:"",properties:{},children:[]}),t.tagName=n.hName),"element"===t.type&&n.hProperties&&(t.properties={...t.properties,...n.hProperties}),"children"in t&&t.children&&n.hChildren&&(t.children=n.hChildren)}if(e){const i="type"in e?e:{position:e};(n=i)&&n.position&&n.position.start&&n.position.start.line&&n.position.start.column&&n.position.end&&n.position.end.line&&n.position.end.column&&(t.position={start:il(i),end:rl(i)})}var n;return t}function s(e,t,n,i){return Array.isArray(n)&&(i=n,n={}),o(e,{type:"element",tagName:t,properties:n||{},children:i||[]})}}(e,t),i=ul(n,e,null),r=function(e){const t=e.footnoteById,n=e.footnoteOrder;let i=-1;const r=[];for(;++i<n.length;){const e=t[n[i].toUpperCase()];if(!e)continue;const o=String(i+1),s=[...e.children],a={type:"link",url:"#fnref"+o,data:{hProperties:{className:["footnote-back"],role:"doc-backlink"}},children:[{type:"text",value:"↩"}]},l=s[s.length-1];l&&"paragraph"===l.type?l.children.push(a):s.push(a),r.push({type:"listItem",data:{hProperties:{id:"fn"+o,role:"doc-endnote"}},children:s,position:e.position})}return 0===r.length?null:e(null,"section",{className:["footnotes"],role:"doc-endnotes"},pl([fl(e),gl(e,{type:"list",ordered:!0,children:r})],!0))}(n);return r&&i.children.push(Ja("text","\n"),r),Array.isArray(i)?{type:"root",children:i}:i}const Cl=function(e,t){return e&&"run"in e?function(e,t){return(n,i,r)=>{e.run(xl(n,t),i,(e=>{r(e)}))}}(e,t):function(e){return t=>xl(t,e)}(e)};var Sl=n(45697);class El{constructor(e,t,n){this.property=e,this.normal=t,n&&(this.space=n)}}function kl(e,t){const n={},i={};let r=-1;for(;++r<e.length;)Object.assign(n,e[r].property),Object.assign(i,e[r].normal);return new El(n,i,t)}function $l(e){return e.toLowerCase()}El.prototype.property={},El.prototype.normal={},El.prototype.space=null;class Ml{constructor(e,t){this.property=e,this.attribute=t}}Ml.prototype.space=null,Ml.prototype.boolean=!1,Ml.prototype.booleanish=!1,Ml.prototype.overloadedBoolean=!1,Ml.prototype.number=!1,Ml.prototype.commaSeparated=!1,Ml.prototype.spaceSeparated=!1,Ml.prototype.commaOrSpaceSeparated=!1,Ml.prototype.mustUseProperty=!1,Ml.prototype.defined=!1;let Tl=0;const Rl=Pl(),Ll=Pl(),Ol=Pl(),Fl=Pl(),Dl=Pl(),Il=Pl(),jl=Pl();function Pl(){return 2**++Tl}const Bl=Object.keys(r);class Ul extends Ml{constructor(e,t,n,i){let o=-1;if(super(e,t),Nl(this,"space",i),"number"==typeof n)for(;++o<Bl.length;){const e=Bl[o];Nl(this,Bl[o],(n&r[e])===r[e])}}}function Nl(e,t,n){n&&(e[t]=n)}Ul.prototype.defined=!0;const Hl={}.hasOwnProperty;function Wl(e){const t={},n={};let i;for(i in e.properties)if(Hl.call(e.properties,i)){const r=e.properties[i],o=new Ul(i,e.transform(e.attributes||{},i),r,e.space);e.mustUseProperty&&e.mustUseProperty.includes(i)&&(o.mustUseProperty=!0),t[i]=o,n[$l(i)]=i,n[$l(o.attribute)]=i}return new El(t,n,e.space)}const zl=Wl({space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase(),properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),Vl=Wl({space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase(),properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function Gl(e,t){return t in e?e[t]:t}function ql(e,t){return Gl(e,t.toLowerCase())}const Kl=Wl({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:ql,properties:{xmlns:null,xmlnsXLink:null}}),Zl=Wl({transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase(),properties:{ariaActiveDescendant:null,ariaAtomic:Ll,ariaAutoComplete:null,ariaBusy:Ll,ariaChecked:Ll,ariaColCount:Fl,ariaColIndex:Fl,ariaColSpan:Fl,ariaControls:Dl,ariaCurrent:null,ariaDescribedBy:Dl,ariaDetails:null,ariaDisabled:Ll,ariaDropEffect:Dl,ariaErrorMessage:null,ariaExpanded:Ll,ariaFlowTo:Dl,ariaGrabbed:Ll,ariaHasPopup:null,ariaHidden:Ll,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Dl,ariaLevel:Fl,ariaLive:null,ariaModal:Ll,ariaMultiLine:Ll,ariaMultiSelectable:Ll,ariaOrientation:null,ariaOwns:Dl,ariaPlaceholder:null,ariaPosInSet:Fl,ariaPressed:Ll,ariaReadOnly:Ll,ariaRelevant:null,ariaRequired:Ll,ariaRoleDescription:Dl,ariaRowCount:Fl,ariaRowIndex:Fl,ariaRowSpan:Fl,ariaSelected:Ll,ariaSetSize:Fl,ariaSort:null,ariaValueMax:Fl,ariaValueMin:Fl,ariaValueNow:Fl,ariaValueText:null,role:null}}),Yl=Wl({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:ql,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Il,acceptCharset:Dl,accessKey:Dl,action:null,allow:null,allowFullScreen:Rl,allowPaymentRequest:Rl,allowUserMedia:Rl,alt:null,as:null,async:Rl,autoCapitalize:null,autoComplete:Dl,autoFocus:Rl,autoPlay:Rl,capture:Rl,charSet:null,checked:Rl,cite:null,className:Dl,cols:Fl,colSpan:null,content:null,contentEditable:Ll,controls:Rl,controlsList:Dl,coords:Fl|Il,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Rl,defer:Rl,dir:null,dirName:null,disabled:Rl,download:Ol,draggable:Ll,encType:null,enterKeyHint:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Rl,formTarget:null,headers:Dl,height:Fl,hidden:Rl,high:Fl,href:null,hrefLang:null,htmlFor:Dl,httpEquiv:Dl,id:null,imageSizes:null,imageSrcSet:null,inputMode:null,integrity:null,is:null,isMap:Rl,itemId:null,itemProp:Dl,itemRef:Dl,itemScope:Rl,itemType:Dl,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Rl,low:Fl,manifest:null,max:null,maxLength:Fl,media:null,method:null,min:null,minLength:Fl,multiple:Rl,muted:Rl,name:null,nonce:null,noModule:Rl,noValidate:Rl,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforePrint:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Rl,optimum:Fl,pattern:null,ping:Dl,placeholder:null,playsInline:Rl,poster:null,preload:null,readOnly:Rl,referrerPolicy:null,rel:Dl,required:Rl,reversed:Rl,rows:Fl,rowSpan:Fl,sandbox:Dl,scope:null,scoped:Rl,seamless:Rl,selected:Rl,shape:null,size:Fl,sizes:null,slot:null,span:Fl,spellCheck:Ll,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Fl,step:null,style:null,tabIndex:Fl,target:null,title:null,translate:null,type:null,typeMustMatch:Rl,useMap:null,value:Ll,width:Fl,wrap:null,align:null,aLink:null,archive:Dl,axis:null,background:null,bgColor:null,border:Fl,borderColor:null,bottomMargin:Fl,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Rl,declare:Rl,event:null,face:null,frame:null,frameBorder:null,hSpace:Fl,leftMargin:Fl,link:null,longDesc:null,lowSrc:null,marginHeight:Fl,marginWidth:Fl,noResize:Rl,noHref:Rl,noShade:Rl,noWrap:Rl,object:null,profile:null,prompt:null,rev:null,rightMargin:Fl,rules:null,scheme:null,scrolling:Ll,standby:null,summary:null,text:null,topMargin:Fl,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Fl,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Rl,disableRemotePlayback:Rl,prefix:null,property:null,results:Fl,security:null,unselectable:null}}),Xl=Wl({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:Gl,properties:{about:jl,accentHeight:Fl,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Fl,amplitude:Fl,arabicForm:null,ascent:Fl,attributeName:null,attributeType:null,azimuth:Fl,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Fl,by:null,calcMode:null,capHeight:Fl,className:Dl,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Fl,diffuseConstant:Fl,direction:null,display:null,dur:null,divisor:Fl,dominantBaseline:null,download:Rl,dx:null,dy:null,edgeMode:null,editable:null,elevation:Fl,enableBackground:null,end:null,event:null,exponent:Fl,externalResourcesRequired:null,fill:null,fillOpacity:Fl,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Il,g2:Il,glyphName:Il,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Fl,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Fl,horizOriginX:Fl,horizOriginY:Fl,id:null,ideographic:Fl,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Fl,k:Fl,k1:Fl,k2:Fl,k3:Fl,k4:Fl,kernelMatrix:jl,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Fl,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Fl,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Fl,overlineThickness:Fl,paintOrder:null,panose1:null,path:null,pathLength:Fl,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Dl,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Fl,pointsAtY:Fl,pointsAtZ:Fl,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:jl,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:jl,rev:jl,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:jl,requiredFeatures:jl,requiredFonts:jl,requiredFormats:jl,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Fl,specularExponent:Fl,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Fl,strikethroughThickness:Fl,string:null,stroke:null,strokeDashArray:jl,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Fl,strokeOpacity:Fl,strokeWidth:null,style:null,surfaceScale:Fl,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:jl,tabIndex:Fl,tableValues:null,target:null,targetX:Fl,targetY:Fl,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:jl,to:null,transform:null,u1:null,u2:null,underlinePosition:Fl,underlineThickness:Fl,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Fl,values:null,vAlphabetic:Fl,vMathematical:Fl,vectorEffect:null,vHanging:Fl,vIdeographic:Fl,version:null,vertAdvY:Fl,vertOriginX:Fl,vertOriginY:Fl,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Fl,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),Jl=kl([Vl,zl,Kl,Zl,Yl],"html"),Ql=kl([Vl,zl,Kl,Zl,Xl],"svg");function ec(e){if(e.allowedElements&&e.disallowedElements)throw new TypeError("Only one of `allowedElements` and `disallowedElements` should be defined");if(e.allowedElements||e.disallowedElements||e.allowElement)return t=>{nl(t,"element",((t,n,i)=>{const r=i;let o;if(e.allowedElements?o=!e.allowedElements.includes(t.tagName):e.disallowedElements&&(o=e.disallowedElements.includes(t.tagName)),!o&&e.allowElement&&"number"==typeof n&&(o=!e.allowElement(t,n,r)),o&&"number"==typeof n)return e.unwrapDisallowed&&t.children?r.children.splice(n,1,...t.children):r.children.splice(n,1),n}))}}const tc=["http","https","mailto","tel"];var nc=n(82143);const ic=/^data[-\w.:]+$/i,rc=/-[a-z]/g,oc=/[A-Z]/g;function sc(e){return"-"+e.toLowerCase()}function ac(e){return e.charAt(1).toUpperCase()}const lc={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"};var cc=n(57848);const uc={}.hasOwnProperty,dc=new Set(["table","thead","tbody","tfoot","tr"]);function hc(e,t){const n=[];let i,r=-1;for(;++r<t.children.length;)i=t.children[r],"element"===i.type?n.push(fc(e,i,r,t)):"text"===i.type?"element"===t.type&&dc.has(t.tagName)&&(s=void 0,"string"==typeof(s=(o=i)&&"object"==typeof o&&"text"===o.type?o.value||"":o)&&""===s.replace(/[ \t\n\f\r]/g,""))||n.push(i.value):"raw"!==i.type||e.options.skipHtml||n.push(i.value);var o,s;return n}function fc(e,t,n,i){const r=e.options,o=e.schema,s=t.tagName,a={};let c,u=o;if("html"===o.space&&"svg"===s&&(u=Ql,e.schema=u),t.properties)for(c in t.properties)uc.call(t.properties,c)&&gc(a,c,t.properties[c],e);"ol"!==s&&"ul"!==s||e.listDepth++;const d=hc(e,t);"ol"!==s&&"ul"!==s||e.listDepth--,e.schema=o;const h=t.position||{start:{line:null,column:null,offset:null},end:{line:null,column:null,offset:null}},f=r.components&&uc.call(r.components,s)?r.components[s]:s,p="string"==typeof f||f===l.Fragment;if(!nc.isValidElementType(f))throw new TypeError(`Component for name \`${s}\` not defined or is not renderable`);if(a.key=[s,h.start.line,h.start.column,n].join("-"),"a"===s&&r.linkTarget&&(a.target="function"==typeof r.linkTarget?r.linkTarget(String(a.href||""),t.children,"string"==typeof a.title?a.title:null):r.linkTarget),"a"===s&&r.transformLinkUri&&(a.href=r.transformLinkUri(String(a.href||""),t.children,"string"==typeof a.title?a.title:null)),p||"code"!==s||"element"!==i.type||"pre"===i.tagName||(a.inline=!0),p||"h1"!==s&&"h2"!==s&&"h3"!==s&&"h4"!==s&&"h5"!==s&&"h6"!==s||(a.level=Number.parseInt(s.charAt(1),10)),"img"===s&&r.transformImageUri&&(a.src=r.transformImageUri(String(a.src||""),String(a.alt||""),"string"==typeof a.title?a.title:null)),!p&&"li"===s&&"element"===i.type){const e=function(e){let t=-1;for(;++t<e.children.length;){const n=e.children[t];if("element"===n.type&&"input"===n.tagName)return n}return null}(t);a.checked=e&&e.properties?Boolean(e.properties.checked):null,a.index=pc(i,t),a.ordered="ol"===i.tagName}var g;return p||"ol"!==s&&"ul"!==s||(a.ordered="ol"===s,a.depth=e.listDepth),"td"!==s&&"th"!==s||(a.align&&(a.style||(a.style={}),a.style.textAlign=a.align,delete a.align),p||(a.isHeader="th"===s)),p||"tr"!==s||"element"!==i.type||(a.isHeader=Boolean("thead"===i.tagName)),r.sourcePos&&(a["data-sourcepos"]=[(g=h).start.line,":",g.start.column,"-",g.end.line,":",g.end.column].map((e=>String(e))).join("")),!p&&r.rawSourcePos&&(a.sourcePosition=t.position),!p&&r.includeElementIndex&&(a.index=pc(i,t),a.siblingCount=pc(i)),p||(a.node=t),d.length>0?l.createElement(f,a,d):l.createElement(f,a)}function pc(e,t){let n=-1,i=0;for(;++n<e.children.length&&e.children[n]!==t;)"element"===e.children[n].type&&i++;return i}function gc(e,t,n,i){const r=function(e,t){const n=$l(t);let i=t,r=Ml;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&ic.test(t)){if("-"===t.charAt(4)){const e=t.slice(5).replace(rc,ac);i="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=t.slice(4);if(!rc.test(e)){let n=e.replace(oc,sc);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}r=Ul}return new r(i,t)}(i.schema,t);let o=n;null!=o&&o==o&&(Array.isArray(o)&&(o=r.commaSeparated?function(e,t){const n={};return(""===e[e.length-1]?[...e,""]:e).join((n.padRight?" ":"")+","+(!1===n.padLeft?"":" ")).trim()}(o):o.join(" ").trim()),"style"===r.property&&"string"==typeof o&&(o=function(e){const t={};try{cc(e,(function(e,n){const i="-ms-"===e.slice(0,4)?`ms-${e.slice(4)}`:e;t[i.replace(/-([a-z])/g,mc)]=n}))}catch{}return t}(o)),r.space&&r.property?e[uc.call(lc,r.property)?lc[r.property]:r.property]=o:r.attribute&&(e[r.attribute]=o))}function mc(e,t){return t.toUpperCase()}const vc={}.hasOwnProperty,bc={renderers:{to:"components",id:"change-renderers-to-components"},astPlugins:{id:"remove-buggy-html-in-markdown-parser"},allowDangerousHtml:{id:"remove-buggy-html-in-markdown-parser"},escapeHtml:{id:"remove-buggy-html-in-markdown-parser"},source:{to:"children",id:"change-source-to-children"},allowNode:{to:"allowElement",id:"replace-allownode-allowedtypes-and-disallowedtypes"},allowedTypes:{to:"allowedElements",id:"replace-allownode-allowedtypes-and-disallowedtypes"},disallowedTypes:{to:"disallowedElements",id:"replace-allownode-allowedtypes-and-disallowedtypes"},includeNodeIndex:{to:"includeElementIndex",id:"change-includenodeindex-to-includeelementindex"}};function yc(e){for(const t in bc)if(vc.call(bc,t)&&vc.call(e,t)){const e=bc[t];console.warn(`[react-markdown] Warning: please ${e.to?`use \`${e.to}\` instead of`:"remove"} \`${t}\` (see <https://github.com/remarkjs/react-markdown/blob/main/changelog.md#${e.id}> for more info)`),delete bc[t]}const t=ts().use(Xa).use(e.remarkPlugins||e.plugins||[]).use(Cl,{allowDangerousHtml:!0}).use(e.rehypePlugins||[]).use(ec,e),n=new Ko;"string"==typeof e.children?n.value=e.children:void 0!==e.children&&null!==e.children&&console.warn(`[react-markdown] Warning: please pass a string as \`children\` (not: \`${e.children}\`)`);const i=t.runSync(t.parse(n),n);if("root"!==i.type)throw new TypeError("Expected a `root` node");let r=l.createElement(l.Fragment,{},hc({options:e,schema:Jl,listDepth:0},i));return e.className&&(r=l.createElement("div",{className:e.className},r)),r}yc.defaultProps={transformLinkUri:function(e){const t=(e||"").trim(),n=t.charAt(0);if("#"===n||"/"===n)return t;const i=t.indexOf(":");if(-1===i)return t;let r=-1;for(;++r<tc.length;){const e=tc[r];if(i===e.length&&t.slice(0,e.length).toLowerCase()===e)return t}return r=t.indexOf("?"),-1!==r&&i>r?t:(r=t.indexOf("#"),-1!==r&&i>r?t:"javascript:void(0)")}},yc.propTypes={children:Sl.string,className:Sl.string,allowElement:Sl.func,allowedElements:Sl.arrayOf(Sl.string),disallowedElements:Sl.arrayOf(Sl.string),unwrapDisallowed:Sl.bool,remarkPlugins:Sl.arrayOf(Sl.oneOfType([Sl.object,Sl.func,Sl.arrayOf(Sl.oneOfType([Sl.object,Sl.func]))])),rehypePlugins:Sl.arrayOf(Sl.oneOfType([Sl.object,Sl.func,Sl.arrayOf(Sl.oneOfType([Sl.object,Sl.func]))])),sourcePos:Sl.bool,rawSourcePos:Sl.bool,skipHtml:Sl.bool,includeElementIndex:Sl.bool,transformLinkUri:Sl.oneOfType([Sl.func,Sl.bool]),linkTarget:Sl.oneOfType([Sl.func,Sl.string]),transformImageUri:Sl.func,components:Sl.object};const wc=function(e){var t=e.question;return!t.isHidden&&c().createElement(yc,{children:t.value.join("\n")})};var _c={validate:function(e,t,n){var i=new Date,r=t?[]:In.Ls.validate(e,t);return r.length?r:t&&!(0,jn.o)(null==n?void 0:n.allowFutureDates)&&t.getTime()>i.getTime()?[{resultType:"error",errCode:"value.invalid",message:"Future dates not allowed"}]:[]}};function Ac(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var xc={validate:function(e,t,n){return n.expressionContext.myValue=t,Object.keys(n).filter((function(e){return"failsWhenExpression"==e||"warnsWhenExpression"==e})).flatMap((function(i){var r,o,s="failsWhenExpression"==i;return(0,vo.j3)(n[i],{value:e,type:"field"},n.fields,(r=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),i.forEach((function(t){Ac(e,t,n[t])}))}return e}({},n.values),o=null!=(o=Ac({},e.id,t))?o:{},Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n.push.apply(n,i)}return n}(Object(o)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))})),r),n.expressionContext)?[{resultType:s?"error":"warning",errCode:s?"value.invalid":null,message:n.message?n.message:s?"Invalid value":"Field has warnings"}]:[]}))}},Cc=n(31581);const Sc=function(e){var t=e.question,n=(0,l.useContext)(u),i=n.encounterContext,r=n.isSubmitting,o=(0,l.useMemo)((function(){return new Cc.BehaviorSubject({isSubmitting:!1})}),[]),s=(0,l.useMemo)((function(){return{patientUuid:i.patient.id,submissionNotifier:o}}),[i.patient.id,o]);return(0,l.useEffect)((function(){t.questionOptions.extensionSlotName&&t.questionOptions.extensionId&&(0,gr.attach)(t.questionOptions.extensionSlotName,t.questionOptions.extensionId)}),[]),(0,l.useEffect)((function(){o.next({isSubmitting:r})}),[r,o]),c().createElement(c().Fragment,null,t.questionOptions.extensionSlotName&&c().createElement(gr.ExtensionSlot,{extensionSlotName:t.questionOptions.extensionSlotName,state:s}))};var Ec=[{id:"OHRIText",loadControl:function(){return Promise.resolve({default:ao})},type:"text",alias:""},{id:"OHRIRadio",loadControl:function(){return Promise.resolve({default:Ur})},type:"radio",alias:""},{id:"OHRIDate",loadControl:function(){return Promise.resolve({default:pr})},type:"date",alias:""},{id:"OHRINumber",loadControl:function(){return Promise.resolve({default:Fr})},type:"number",alias:"numeric"},{id:"OHRIMultiSelect",loadControl:function(){return Promise.resolve({default:kr})},type:"checkbox",alias:"multiCheckbox"},{id:"OHRIContentSwitcher",loadControl:function(){return Promise.resolve({default:er})},type:"content-switcher",alias:""},{id:"OHRIEncounterLocationPicker",loadControl:function(){return Promise.resolve({default:_r})},type:"encounter-location",alias:""},{id:"OHRIDropdown",loadControl:function(){return Promise.resolve({default:Gr})},type:"select",alias:""},{id:"OHRITextArea",loadControl:function(){return Promise.resolve({default:Qr})},type:"textarea",alias:""},{id:"OHRIToggle",loadControl:function(){return Promise.resolve({default:po})},type:"toggle",alias:""},{id:"OHRIObsGroup",loadControl:function(){return Promise.resolve({default:wi})},type:"group",alias:""},{id:"OHRIRepeat",loadControl:function(){return Promise.resolve({default:Eo})},type:"repeating",alias:""},{id:"OHRIFixedValue",loadControl:function(){return Promise.resolve({default:Lo})},type:"fixed-value",alias:""},{id:"OHRIMarkdown",loadControl:function(){return Promise.resolve({default:wc})},type:"markdown",alias:""},{id:"OHRIExtensionParcel",loadControl:function(){return Promise.resolve({default:Sc})},type:"extension-widget",alias:""},{id:"OHRIDateTime",loadControl:function(){return Promise.resolve({default:pr})},type:"datetime",alias:""}],kc=[{id:"ObsSubmissionHandler",component:$o,type:"obs"},{id:"ObsGroupHandler",component:$o,type:"obsGroup"},{id:"EncounterLocationSubmissionHandler",component:{handleFieldSubmission:function(e,t,n){return null},getInitialValue:function(e,t){return{display:e.location.name,uuid:e.location.uuid}},getDisplayValue:function(e,t){return t.display}},type:"encounterLocation"},{id:"EncounterDatetimeHandler",component:{handleFieldSubmission:function(e,t,n){return n.setEncounterDate(t),t},getInitialValue:function(e,t,n){return new Date},getDisplayValue:function(e,t){return e.value?e.value:null},getPreviousValue:function(e,t){return null}},type:"encounterDatetime"}],$c=[{id:"OHRIBaseValidator",component:In.Ls},{id:"date",component:_c},{id:"js_expression",component:xc}],Mc=function(e){var t,n,i=null===(t=Ec.find((function(t){return t.type==e||(null==t?void 0:t.alias)==e})))||void 0===t?void 0:t.loadControl;return i||(i=null===(n=Rc().customControls.find((function(t){return t.type==e||(null==t?void 0:t.alias)==e})))||void 0===n?void 0:n.loadControl),null==i?void 0:i()};function Tc(e){var t;return null===(t=kc.find((function(t){return t.type==e})))||void 0===t?void 0:t.component}function Rc(){return(0,gr.getGlobalStore)(Ci.mk,{customControls:[],postSubmissionActions:[]}).getState()}function Lc(e){var t;return(null===(t=$c.find((function(t){return t.id==e})))||void 0===t?void 0:t.component)||$c[0].component}function Oc(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function Fc(e,t,n,i,r,o,s){try{var a=e[o](s),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(i,r)}function Dc(e){return function(){var t=this,n=arguments;return new Promise((function(i,r){var o=e.apply(t,n);function s(e){Fc(o,i,r,s,a,"next",e)}function a(e){Fc(o,i,r,s,a,"throw",e)}s(void 0)}))}}function Ic(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),i.forEach((function(t){Ic(e,t,n[t])}))}return e}function Pc(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n.push.apply(n,i)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e}function Bc(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,r,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(i=n.next()).done)&&(o.push(i.value),!t||o.length!==t);s=!0);}catch(e){a=!0,r=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw r}}return o}}(e,t)||Uc(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Uc(e,t){if(e){if("string"==typeof e)return Oc(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Oc(e,t):void 0}}function Nc(e,t){var n,i,r,o,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,i&&(r=2&o[0]?i.return:o[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,i=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((r=(r=s.trys).length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){s.label=o[1];break}if(6===o[0]&&s.label<r[1]){s.label=r[1],r=o;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(o);break}r[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],i=0}finally{n=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}}function Hc(e,t,n){return Wc.apply(this,arguments)}function Wc(){return(Wc=Dc((function(e,t,n){var i,r,o,s,a;return Nc(this,(function(l){switch(l.label){case 0:return[4,(0,xi.fetchOpenMRSForm)(e)];case 1:return i=l.sent(),[4,(0,xi.fetchClobData)(i)];case 2:return r=l.sent(),o=r?Pc(jc({},r),{uuid:i.uuid}):t,s=function(e){return e.pages.filter((function(e){var t;return e.isSubform&&!e.subform.form&&(null===(t=e.subform)||void 0===t?void 0:t.name)})).map((function(e){var t;return null===(t=e.subform)||void 0===t?void 0:t.name}))}(o),[4,zc(s,n)];case 3:return a=l.sent(),function(e,t){t.forEach((function(t){var n=e.pages.find((function(e){var n;return(null===(n=e.subform)||void 0===n?void 0:n.name)===t.name}));n&&(n.subform.form=t)}))}(o,a),[2,Gc(o,n)]}}))}))).apply(this,arguments)}function zc(e,t){return Vc.apply(this,arguments)}function Vc(){return(Vc=Dc((function(e,t){return Nc(this,(function(n){return[2,Promise.all(e.map((function(e){return Hc(e,null,t)})))]}))}))).apply(this,arguments)}function Gc(e,t){var n=function(e){return"string"==typeof e?JSON.parse(e):JSON.parse(JSON.stringify(e))}(e);return function(e,t){for(var n=e.pages.length-1;n>=0;n--){var i,r,o,s=e.pages[n];if((0,jn.o)(s.isSubform)&&!(0,jn.o)(s.isHidden)&&(null===(i=s.subform)||void 0===i||null===(r=i.form)||void 0===r?void 0:r.encounterType)===e.encounterType)s.subform.form.pages.filter((function(e){return!(0,jn.o)(e.isSubform)})),(o=e.pages).splice.apply(o,[n,1].concat(function(e){if(Array.isArray(e))return Oc(e)}(a=Gc(s.subform.form,t).pages)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(a)||Uc(a)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()))}var a}(n,t),function(e){e.encounter&&"string"==typeof e.encounter&&!e.encounterType&&(e.encounterType=e.encounter,delete e.encounter)}(n),t?o(t,n):n}var qc=n(87462),Kc=n(43144),Zc=Object.prototype.hasOwnProperty;const Yc=function(e,t){return null!=e&&Zc.call(e,t)};var Xc=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Jc=/^\w*$/;const Qc=function(e,t){if((0,pe.Z)(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!(0,Wt.Z)(e))||Jc.test(e)||!Xc.test(e)||null!=t&&e in Object(t)},eu=function(e,t){return(0,pe.Z)(e)?e:Qc(e,t)?[e]:Yt(tn(e))},tu=function(e,t,n){for(var i=-1,r=(t=eu(t,e)).length,o=!1;++i<r;){var s=Xt(t[i]);if(!(o=null!=e&&n(e,s)))break;e=e[s]}return o||++i!=r?o:!!(r=null==e?0:e.length)&&_e(r)&&we(s,r)&&((0,pe.Z)(e)||(0,fe.Z)(e))},nu=function(e,t){return null!=e&&tu(e,t,Yc)},iu=function(e,t){return Ut(e,5,t="function"==typeof t?t:void 0)},ru=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,i){n[++t]=[i,e]})),n},ou=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n};var su=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");const au=function(e){return su.test(e)};var lu="\\ud800-\\udfff",cu="["+lu+"]",uu="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",du="\\ud83c[\\udffb-\\udfff]",hu="[^"+lu+"]",fu="(?:\\ud83c[\\udde6-\\uddff]){2}",pu="[\\ud800-\\udbff][\\udc00-\\udfff]",gu="(?:"+uu+"|"+du+")?",mu="[\\ufe0e\\ufe0f]?",vu=mu+gu+"(?:\\u200d(?:"+[hu,fu,pu].join("|")+")"+mu+gu+")*",bu="(?:"+[hu+uu+"?",uu,fu,pu,cu].join("|")+")",yu=RegExp(du+"(?="+du+")|"+bu+vu,"g");const wu=function(e){return au(e)?function(e){return e.match(yu)||[]}(e):function(e){return e.split("")}(e)},_u=function(e){return null==e?[]:function(e,t){return Ht(t,(function(t){return e[t]}))}(e,Be(e))};var Au=St.Z?St.Z.iterator:void 0;const xu=function(e){if(!e)return[];if(Pe(e))return function(e){return"string"==typeof e||!(0,pe.Z)(e)&&(0,x.Z)(e)&&"[object String]"==(0,w.Z)(e)}(e)?wu(e):qe(e);if(Au&&e[Au])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Au]());var t=wt(e);return("[object Map]"==t?ru:"[object Set]"==t?ou:_u)(e)};var Cu=Object.prototype.toString,Su=Error.prototype.toString,Eu=RegExp.prototype.toString,ku="undefined"!=typeof Symbol?Symbol.prototype.toString:function(){return""},$u=/^Symbol\((.*)\)(.*)$/;function Mu(e,t){if(void 0===t&&(t=!1),null==e||!0===e||!1===e)return""+e;var n=typeof e;if("number"===n)return function(e){return e!=+e?"NaN":0===e&&1/e<0?"-0":""+e}(e);if("string"===n)return t?'"'+e+'"':e;if("function"===n)return"[Function "+(e.name||"anonymous")+"]";if("symbol"===n)return ku.call(e).replace($u,"Symbol($1)");var i=Cu.call(e).slice(8,-1);return"Date"===i?isNaN(e.getTime())?""+e:e.toISOString(e):"Error"===i||e instanceof Error?"["+Su.call(e)+"]":"RegExp"===i?Eu.call(e):null}function Tu(e,t){var n=Mu(e,t);return null!==n?n:JSON.stringify(e,(function(e,n){var i=Mu(this[e],t);return null!==i?i:n}),2)}var Ru={default:"${path} is invalid",required:"${path} is a required field",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:function(e){var t=e.path,n=e.type,i=e.value,r=e.originalValue,o=null!=r&&r!==i,s=t+" must be a `"+n+"` type, but the final value was: `"+Tu(i,!0)+"`"+(o?" (cast from the value `"+Tu(r,!0)+"`).":".");return null===i&&(s+='\n If "null" is intended as an empty value be sure to mark the schema as `.nullable()`'),s},defined:"${path} must be defined"},Lu="${path} must be exactly ${length} characters",Ou="${path} must be at least ${min} characters",Fu="${path} must be at most ${max} characters",Du='${path} must match the following: "${regex}"',Iu="${path} must be a valid email",ju="${path} must be a valid URL",Pu="${path} must be a valid UUID",Bu="${path} must be a trimmed string",Uu="${path} must be a lowercase string",Nu="${path} must be a upper case string",Hu="${path} must be greater than or equal to ${min}",Wu="${path} must be less than or equal to ${max}",zu="${path} must be less than ${less}",Vu="${path} must be greater than ${more}",Gu="${path} must be a positive number",qu="${path} must be a negative number",Ku="${path} must be an integer",Zu="${path} field must be later than ${min}",Yu="${path} field must be at earlier than ${max}",Xu="${path} field has unspecified keys: ${unknown}",Ju="${path} field must have at least ${min} items",Qu="${path} field must have less than or equal to ${max} items";const ed=function(e){return e&&e.__isYupSchema__};var td=function(){function e(e,t){if(this.refs=e,"function"!=typeof t){if(!nu(t,"is"))throw new TypeError("`is:` is required for `when()` conditions");if(!t.then&&!t.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");var n=t.is,i=t.then,r=t.otherwise,o="function"==typeof n?n:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return t.every((function(e){return e===n}))};this.fn=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var s=t.pop(),a=t.pop(),l=o.apply(void 0,t)?i:r;if(l)return"function"==typeof l?l(a):a.concat(l.resolve(s))}}else this.fn=t}return e.prototype.resolve=function(e,t){var n=this.refs.map((function(e){return e.getValue(t)})),i=this.fn.apply(e,n.concat(e,t));if(void 0===i||i===e)return e;if(!ed(i))throw new TypeError("conditions must return a schema object");return i.resolve(t)},e}();const nd=td;var id=n(63366),rd=n(76891),od=/\$\{\s*(\w+)\s*\}/g;function sd(e,t,n,i){var r=this;this.name="ValidationError",this.value=t,this.path=n,this.type=i,this.errors=[],this.inner=[],e&&[].concat(e).forEach((function(e){r.errors=r.errors.concat(e.errors||e),e.inner&&(r.inner=r.inner.concat(e.inner.length?e.inner:e))})),this.message=this.errors.length>1?this.errors.length+" errors occurred":this.errors[0],Error.captureStackTrace&&Error.captureStackTrace(this,sd)}sd.prototype=Object.create(Error.prototype),sd.prototype.constructor=sd,sd.isError=function(e){return e&&"ValidationError"===e.name},sd.formatError=function(e,t){var n;"string"==typeof e&&(n=e,e=function(e){return n.replace(od,(function(t,n){return Tu(e[n])}))});var i=function(t){return t.path=t.label||t.path||"this","function"==typeof e?e(t):e};return 1===arguments.length?i:i(t)};var ad=function(e){return e?rd.SynchronousPromise:Promise},ld=function(e){return void 0===e&&(e=[]),e.inner&&e.inner.length?e.inner:[].concat(e)};function cd(e,t){return e?null:function(e){return t.push(e),e.value}}function ud(e){var t,n,i,r=e.endEarly,o=(0,id.Z)(e,["endEarly"]);return r?(t=o.validations,n=o.value,i=o.sync,ad(i).all(t).catch((function(e){throw"ValidationError"===e.name&&(e.value=n),e})).then((function(){return n}))):function(e){var t=e.validations,n=e.value,i=e.path,r=e.sync,o=e.errors,s=e.sort;return o=ld(o),function(e,t){var n=ad(t);return n.all(e.map((function(e){return n.resolve(e).then((function(e){return{fulfilled:!0,value:e}}),(function(e){return{fulfilled:!1,value:e}}))})))}(t,r).then((function(e){var t=e.filter((function(e){return!e.fulfilled})).reduce((function(e,t){var n=t.value;if(!sd.isError(n))throw n;return e.concat(n)}),[]);if(s&&t.sort(s),(o=t.concat(o)).length)throw new sd(o,n,i);return n}))}(o)}var dd=function(e){return"[object Object]"===Object.prototype.toString.call(e)};function hd(e,t){for(var n in t)if(nu(t,n)){var i=t[n],r=e[n];if(void 0===r)e[n]=i;else{if(r===i)continue;ed(r)?ed(i)&&(e[n]=i.concat(r)):dd(r)?dd(i)&&(e[n]=hd(r,i)):Array.isArray(r)&&Array.isArray(i)&&(e[n]=i.concat(r))}}return e}const fd=function(e,t,n){for(var i=-1,r=Object(e),o=n(e),s=o.length;s--;){var a=o[pd?s:++i];if(!1===t(r[a],a,r))break}return e};var pd;const gd=function(e,t){return e&&fd(e,t,Be)};function md(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new oe;++t<n;)this.add(e[t])}md.prototype.add=md.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},md.prototype.has=function(e){return this.__data__.has(e)};const vd=md,bd=function(e,t){for(var n=-1,i=null==e?0:e.length;++n<i;)if(t(e[n],n,e))return!0;return!1},yd=function(e,t){return e.has(t)},wd=function(e,t,n,i,r,o){var s=1&n,a=e.length,l=t.length;if(a!=l&&!(s&&l>a))return!1;var c=o.get(e),u=o.get(t);if(c&&u)return c==t&&u==e;var d=-1,h=!0,f=2&n?new vd:void 0;for(o.set(e,t),o.set(t,e);++d<a;){var p=e[d],g=t[d];if(i)var m=s?i(g,p,d,t,e,o):i(p,g,d,e,t,o);if(void 0!==m){if(m)continue;h=!1;break}if(f){if(!bd(t,(function(e,t){if(!yd(f,t)&&(p===e||r(p,e,n,i,o)))return f.push(t)}))){h=!1;break}}else if(p!==g&&!r(p,g,n,i,o)){h=!1;break}}return o.delete(e),o.delete(t),h};var _d=St.Z?St.Z.prototype:void 0,Ad=_d?_d.valueOf:void 0;var xd=Object.prototype.hasOwnProperty;var Cd="[object Arguments]",Sd="[object Array]",Ed="[object Object]",kd=Object.prototype.hasOwnProperty;const $d=function(e,t,n,i,r,o){var s=(0,pe.Z)(e),a=(0,pe.Z)(t),l=s?Sd:wt(e),c=a?Sd:wt(t),u=(l=l==Cd?Ed:l)==Ed,d=(c=c==Cd?Ed:c)==Ed,h=l==c;if(h&&be(e)){if(!be(t))return!1;s=!0,u=!1}if(h&&!u)return o||(o=new ae),s||Te(e)?wd(e,t,n,i,r,o):function(e,t,n,i,r,o,s){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!o(new At(e),new At(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return T(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var a=ru;case"[object Set]":var l=1&i;if(a||(a=ou),e.size!=t.size&&!l)return!1;var c=s.get(e);if(c)return c==t;i|=2,s.set(e,t);var u=wd(a(e),a(t),i,r,o,s);return s.delete(e),u;case"[object Symbol]":if(Ad)return Ad.call(e)==Ad.call(t)}return!1}(e,t,l,n,i,r,o);if(!(1&n)){var f=u&&kd.call(e,"__wrapped__"),p=d&&kd.call(t,"__wrapped__");if(f||p){var g=f?e.value():e,m=p?t.value():t;return o||(o=new ae),r(g,m,n,i,o)}}return!!h&&(o||(o=new ae),function(e,t,n,i,r,o){var s=1&n,a=it(e),l=a.length;if(l!=it(t).length&&!s)return!1;for(var c=l;c--;){var u=a[c];if(!(s?u in t:xd.call(t,u)))return!1}var d=o.get(e),h=o.get(t);if(d&&h)return d==t&&h==e;var f=!0;o.set(e,t),o.set(t,e);for(var p=s;++c<l;){var g=e[u=a[c]],m=t[u];if(i)var v=s?i(m,g,u,t,e,o):i(g,m,u,e,t,o);if(!(void 0===v?g===m||r(g,m,n,i,o):v)){f=!1;break}p||(p="constructor"==u)}if(f&&!p){var b=e.constructor,y=t.constructor;b==y||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof y&&y instanceof y||(f=!1)}return o.delete(e),o.delete(t),f}(e,t,n,i,r,o))},Md=function e(t,n,i,r,o){return t===n||(null==t||null==n||!(0,x.Z)(t)&&!(0,x.Z)(n)?t!=t&&n!=n:$d(t,n,i,r,e,o))},Td=function(e){return e==e&&!(0,D.Z)(e)},Rd=function(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}},Ld=function(e){var t=function(e){for(var t=Be(e),n=t.length;n--;){var i=t[n],r=e[i];t[n]=[i,r,Td(r)]}return t}(e);return 1==t.length&&t[0][2]?Rd(t[0][0],t[0][1]):function(n){return n===e||function(e,t,n,i){var r=n.length,o=r,s=!i;if(null==e)return!o;for(e=Object(e);r--;){var a=n[r];if(s&&a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++r<o;){var l=(a=n[r])[0],c=e[l],u=a[1];if(s&&a[2]){if(void 0===c&&!(l in e))return!1}else{var d=new ae;if(i)var h=i(c,u,l,e,t,d);if(!(void 0===h?Md(u,c,3,i,d):h))return!1}}return!0}(n,e,t)}},Od=function(e,t){for(var n=0,i=(t=eu(t,e)).length;null!=e&&n<i;)e=e[Xt(t[n++])];return n&&n==i?e:void 0},Fd=function(e,t){return null!=e&&t in Object(e)},Dd=function(e,t){return Qc(e)&&Td(t)?Rd(Xt(e),t):function(n){var i=function(e,t,n){var i=null==e?void 0:Od(e,t);return void 0===i?n:i}(n,e);return void 0===i&&i===t?function(e,t){return null!=e&&tu(e,t,Fd)}(n,e):Md(t,i,3)}},Id=function(e){return e},jd=function(e){return Qc(e)?(t=Xt(e),function(e){return null==e?void 0:e[t]}):function(e){return function(t){return Od(t,e)}}(e);var t},Pd=function(e){return"function"==typeof e?e:null==e?Id:"object"==typeof e?(0,pe.Z)(e)?Dd(e[0],e[1]):Ld(e):jd(e)},Bd=function(e,t){var n={};return t=Pd(t),gd(e,(function(e,i,r){ce(n,i,t(e,i,r))})),n};var Ud=n(55760),Nd=function(){function e(e,t){if(void 0===t&&(t={}),"string"!=typeof e)throw new TypeError("ref must be a string, got: "+e);if(this.key=e.trim(),""===e)throw new TypeError("ref must be a non-empty string");this.isContext="$"===this.key[0],this.isValue="."===this.key[0],this.isSibling=!this.isContext&&!this.isValue;var n=this.isContext?"$":this.isValue?".":"";this.path=this.key.slice(n.length),this.getter=this.path&&(0,Ud.getter)(this.path,!0),this.map=t.map}var t=e.prototype;return t.getValue=function(e){var t=this.isContext?e.context:this.isValue?e.value:e.parent;return this.getter&&(t=this.getter(t||{})),this.map&&(t=this.map(t)),t},t.cast=function(e,t){return this.getValue((0,qc.Z)({},t,{value:e}))},t.resolve=function(){return this},t.describe=function(){return{type:"ref",key:this.key}},t.toString=function(){return"Ref("+this.key+")"},e.isRef=function(e){return e&&e.__isYupRef},e}();Nd.prototype.__isYupRef=!0;var Hd=sd.formatError;function Wd(e){var t=e.name,n=e.message,i=e.test,r=e.params;function o(e){var o=e.value,s=e.path,a=e.label,l=e.options,c=e.originalValue,u=e.sync,d=(0,id.Z)(e,["value","path","label","options","originalValue","sync"]),h=l.parent,f=function(e){return Nd.isRef(e)?e.getValue({value:o,parent:h,context:l.context}):e},p=function(e){var t=e.value,n=e.label,i=e.resolve,r=e.originalValue,o=(0,id.Z)(e,["value","label","resolve","originalValue"]);return function(e){var s=void 0===e?{}:e,a=s.path,l=void 0===a?o.path:a,c=s.message,u=void 0===c?o.message:c,d=s.type,h=void 0===d?o.name:d,f=s.params;return f=(0,qc.Z)({path:l,value:t,originalValue:r,label:n},function(e,t,n){return Bd((0,qc.Z)({},e,t),n)}(o.params,f,i)),(0,qc.Z)(new sd(Hd(u,f),t,l,h),{params:f})}}({message:n,path:s,value:o,originalValue:c,params:r,label:a,resolve:f,name:t}),g=(0,qc.Z)({path:s,parent:h,type:t,createError:p,resolve:f,options:l},d);return function(e,t,n,i){var r,o=e.call(t,n);if(!i)return Promise.resolve(o);if((r=o)&&"function"==typeof r.then&&"function"==typeof r.catch)throw new Error('Validation test of type: "'+t.type+'" returned a Promise during a synchronous validate. This test will finish after the validate call has returned');return rd.SynchronousPromise.resolve(o)}(i,g,o,u).then((function(e){if(sd.isError(e))throw e;if(!e)throw p()}))}return o.OPTIONS=e,o}function zd(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Vd(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Vd(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0;return function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function Vd(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var Gd=function(){function e(){this.list=new Set,this.refs=new Map}var t=e.prototype;return t.describe=function(){for(var e,t=[],n=zd(this.list);!(e=n()).done;){var i=e.value;t.push(i)}for(var r,o=zd(this.refs);!(r=o()).done;){var s=r.value[1];t.push(s.describe())}return t},t.toArray=function(){return xu(this.list).concat(xu(this.refs.values()))},t.add=function(e){Nd.isRef(e)?this.refs.set(e.key,e):this.list.add(e)},t.delete=function(e){Nd.isRef(e)?this.refs.delete(e.key):this.list.delete(e)},t.has=function(e,t){if(this.list.has(e))return!0;for(var n,i=this.refs.values();!(n=i.next()).done;)if(t(n.value)===e)return!0;return!1},t.clone=function(){var t=new e;return t.list=new Set(this.list),t.refs=new Map(this.refs),t},t.merge=function(e,t){var n=this.clone();return e.list.forEach((function(e){return n.add(e)})),e.refs.forEach((function(e){return n.add(e)})),t.list.forEach((function(e){return n.delete(e)})),t.refs.forEach((function(e){return n.delete(e)})),n},(0,Kc.Z)(e,[{key:"size",get:function(){return this.list.size+this.refs.size}}]),e}();function qd(e){var t=this;if(void 0===e&&(e={}),!(this instanceof qd))return new qd;this._deps=[],this._conditions=[],this._options={abortEarly:!0,recursive:!0},this._exclusive=Object.create(null),this._whitelist=new Gd,this._blacklist=new Gd,this.tests=[],this.transforms=[],this.withMutation((function(){t.typeError(Ru.notType)})),nu(e,"default")&&(this._defaultDefault=e.default),this.type=e.type||"mixed",this._type=e.type||"mixed"}for(var Kd=qd.prototype={__isYupSchema__:!0,constructor:qd,clone:function(){var e=this;return this._mutate?this:iu(this,(function(t){if(ed(t)&&t!==e)return t}))},label:function(e){var t=this.clone();return t._label=e,t},meta:function(e){if(0===arguments.length)return this._meta;var t=this.clone();return t._meta=(0,qc.Z)(t._meta||{},e),t},withMutation:function(e){var t=this._mutate;this._mutate=!0;var n=e(this);return this._mutate=t,n},concat:function(e){if(!e||e===this)return this;if(e._type!==this._type&&"mixed"!==this._type)throw new TypeError("You cannot `concat()` schema's of different types: "+this._type+" and "+e._type);var t=hd(e.clone(),this);return nu(e,"_default")&&(t._default=e._default),t.tests=this.tests,t._exclusive=this._exclusive,t._whitelist=this._whitelist.merge(e._whitelist,e._blacklist),t._blacklist=this._blacklist.merge(e._blacklist,e._whitelist),t.withMutation((function(t){e.tests.forEach((function(e){t.test(e.OPTIONS)}))})),t},isType:function(e){return!(!this._nullable||null!==e)||!this._typeCheck||this._typeCheck(e)},resolve:function(e){var t=this;if(t._conditions.length){var n=t._conditions;(t=t.clone())._conditions=[],t=(t=n.reduce((function(t,n){return n.resolve(t,e)}),t)).resolve(e)}return t},cast:function(e,t){void 0===t&&(t={});var n=this.resolve((0,qc.Z)({},t,{value:e})),i=n._cast(e,t);if(void 0!==e&&!1!==t.assert&&!0!==n.isType(i)){var r=Tu(e),o=Tu(i);throw new TypeError("The value of "+(t.path||"field")+' could not be cast to a value that satisfies the schema type: "'+n._type+'". \n\nattempted value: '+r+" \n"+(o!==r?"result of cast: "+o:""))}return i},_cast:function(e){var t=this,n=void 0===e?e:this.transforms.reduce((function(n,i){return i.call(t,n,e)}),e);return void 0===n&&nu(this,"_default")&&(n=this.default()),n},_validate:function(e,t){var n=this;void 0===t&&(t={});var i=e,r=null!=t.originalValue?t.originalValue:e,o=this._option("strict",t),s=this._option("abortEarly",t),a=t.sync,l=t.path,c=this._label;o||(i=this._cast(i,(0,qc.Z)({assert:!1},t)));var u={value:i,path:l,schema:this,options:t,label:c,originalValue:r,sync:a};t.from&&(u.from=t.from);var d=[];return this._typeError&&d.push(this._typeError(u)),this._whitelistError&&d.push(this._whitelistError(u)),this._blacklistError&&d.push(this._blacklistError(u)),ud({validations:d,endEarly:s,value:i,path:l,sync:a}).then((function(e){return ud({path:l,sync:a,value:e,endEarly:s,validations:n.tests.map((function(e){return e(u)}))})}))},validate:function(e,t){return void 0===t&&(t={}),this.resolve((0,qc.Z)({},t,{value:e}))._validate(e,t)},validateSync:function(e,t){var n,i;if(void 0===t&&(t={}),this.resolve((0,qc.Z)({},t,{value:e}))._validate(e,(0,qc.Z)({},t,{sync:!0})).then((function(e){return n=e})).catch((function(e){return i=e})),i)throw i;return n},isValid:function(e,t){return this.validate(e,t).then((function(){return!0})).catch((function(e){if("ValidationError"===e.name)return!1;throw e}))},isValidSync:function(e,t){try{return this.validateSync(e,t),!0}catch(e){if("ValidationError"===e.name)return!1;throw e}},getDefault:function(e){return void 0===e&&(e={}),this.resolve(e).default()},default:function(e){if(0===arguments.length){var t=nu(this,"_default")?this._default:this._defaultDefault;return"function"==typeof t?t.call(this):iu(t)}var n=this.clone();return n._default=e,n},strict:function(e){void 0===e&&(e=!0);var t=this.clone();return t._options.strict=e,t},_isPresent:function(e){return null!=e},required:function(e){return void 0===e&&(e=Ru.required),this.test({message:e,name:"required",exclusive:!0,test:function(e){return this.schema._isPresent(e)}})},notRequired:function(){var e=this.clone();return e.tests=e.tests.filter((function(e){return"required"!==e.OPTIONS.name})),e},nullable:function(e){void 0===e&&(e=!0);var t=this.clone();return t._nullable=e,t},transform:function(e){var t=this.clone();return t.transforms.push(e),t},test:function(){var e;if(void 0===(e=1===arguments.length?"function"==typeof(arguments.length<=0?void 0:arguments[0])?{test:arguments.length<=0?void 0:arguments[0]}:arguments.length<=0?void 0:arguments[0]:2===arguments.length?{name:arguments.length<=0?void 0:arguments[0],test:arguments.length<=1?void 0:arguments[1]}:{name:arguments.length<=0?void 0:arguments[0],message:arguments.length<=1?void 0:arguments[1],test:arguments.length<=2?void 0:arguments[2]}).message&&(e.message=Ru.default),"function"!=typeof e.test)throw new TypeError("`test` is a required parameters");var t=this.clone(),n=Wd(e),i=e.exclusive||e.name&&!0===t._exclusive[e.name];if(e.exclusive&&!e.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return t._exclusive[e.name]=!!e.exclusive,t.tests=t.tests.filter((function(t){if(t.OPTIONS.name===e.name){if(i)return!1;if(t.OPTIONS.test===n.OPTIONS.test)return!1}return!0})),t.tests.push(n),t},when:function(e,t){1===arguments.length&&(t=e,e=".");var n=this.clone(),i=[].concat(e).map((function(e){return new Nd(e)}));return i.forEach((function(e){e.isSibling&&n._deps.push(e.key)})),n._conditions.push(new nd(i,t)),n},typeError:function(e){var t=this.clone();return t._typeError=Wd({message:e,name:"typeError",test:function(e){return!(void 0!==e&&!this.schema.isType(e))||this.createError({params:{type:this.schema._type}})}}),t},oneOf:function(e,t){void 0===t&&(t=Ru.oneOf);var n=this.clone();return e.forEach((function(e){n._whitelist.add(e),n._blacklist.delete(e)})),n._whitelistError=Wd({message:t,name:"oneOf",test:function(e){if(void 0===e)return!0;var t=this.schema._whitelist;return!!t.has(e,this.resolve)||this.createError({params:{values:t.toArray().join(", ")}})}}),n},notOneOf:function(e,t){void 0===t&&(t=Ru.notOneOf);var n=this.clone();return e.forEach((function(e){n._blacklist.add(e),n._whitelist.delete(e)})),n._blacklistError=Wd({message:t,name:"notOneOf",test:function(e){var t=this.schema._blacklist;return!t.has(e,this.resolve)||this.createError({params:{values:t.toArray().join(", ")}})}}),n},strip:function(e){void 0===e&&(e=!0);var t=this.clone();return t._strip=e,t},_option:function(e,t){return nu(t,e)?t[e]:this._options[e]},describe:function(){var e=this.clone(),t={type:e._type,meta:e._meta,label:e._label,tests:e.tests.map((function(e){return{name:e.OPTIONS.name,params:e.OPTIONS.params}})).filter((function(e,t,n){return n.findIndex((function(t){return t.name===e.name}))===t}))};return e._whitelist.size&&(t.oneOf=e._whitelist.describe()),e._blacklist.size&&(t.notOneOf=e._blacklist.describe()),t},defined:function(e){return void 0===e&&(e=Ru.defined),this.nullable().test({message:e,name:"defined",exclusive:!0,test:function(e){return void 0!==e}})}},Zd=function(){var e=Xd[Yd];Kd[e+"At"]=function(t,n,i){void 0===i&&(i={});var r=function(e,t,n,i){var r,o,s;return void 0===i&&(i=n),t?((0,Ud.forEach)(t,(function(a,l,c){var u=l?function(e){return e.substr(0,e.length-1).substr(1)}(a):a;if((e=e.resolve({context:i,parent:r,value:n})).innerType){var d=c?parseInt(u,10):0;if(n&&d>=n.length)throw new Error("Yup.reach cannot resolve an array item at index: "+a+", in the path: "+t+". because there is no value at that index. ");r=n,n=n&&n[d],e=e.innerType}if(!c){if(!e.fields||!e.fields[u])throw new Error("The schema does not contain the path: "+t+". (failed at: "+s+' which is a type: "'+e._type+'")');r=n,n=n&&n[u],e=e.fields[u]}o=u,s=l?"["+a+"]":"."+a})),{schema:e,parent:r,parentPath:o}):{parent:r,parentPath:t,schema:e}}(this,t,n,i.context),o=r.parent,s=r.parentPath;return r.schema[e](o&&o[s],(0,qc.Z)({},i,{parent:o,path:t}))}},Yd=0,Xd=["validate","validateSync"];Yd<Xd.length;Yd++)Zd();for(var Jd=0,Qd=["equals","is"];Jd<Qd.length;Jd++)Kd[Qd[Jd]]=Kd.oneOf;for(var eh=0,th=["not","nope"];eh<th.length;eh++)Kd[th[eh]]=Kd.notOneOf;function nh(e,t,n){e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),(0,qc.Z)(e.prototype,n)}Kd.optional=Kd.notRequired,nh((function e(){var t=this;if(!(this instanceof e))return new e;qd.call(this,{type:"boolean"}),this.withMutation((function(){t.transform((function(e){if(!this.isType(e)){if(/^(true|1)$/i.test(e))return!0;if(/^(false|0)$/i.test(e))return!1}return e}))}))}),qd,{_typeCheck:function(e){return e instanceof Boolean&&(e=e.valueOf()),"boolean"==typeof e}});const ih=function(e){return null==e};var rh=/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i,oh=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,sh=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}$/i,ah=function(e){return ih(e)||e===e.trim()};nh((function e(){var t=this;if(!(this instanceof e))return new e;qd.call(this,{type:"string"}),this.withMutation((function(){t.transform((function(e){return this.isType(e)?e:null!=e&&e.toString?e.toString():e}))}))}),qd,{_typeCheck:function(e){return e instanceof String&&(e=e.valueOf()),"string"==typeof e},_isPresent:function(e){return qd.prototype._isPresent.call(this,e)&&e.length>0},length:function(e,t){return void 0===t&&(t=Lu),this.test({message:t,name:"length",exclusive:!0,params:{length:e},test:function(t){return ih(t)||t.length===this.resolve(e)}})},min:function(e,t){return void 0===t&&(t=Ou),this.test({message:t,name:"min",exclusive:!0,params:{min:e},test:function(t){return ih(t)||t.length>=this.resolve(e)}})},max:function(e,t){return void 0===t&&(t=Fu),this.test({name:"max",exclusive:!0,message:t,params:{max:e},test:function(t){return ih(t)||t.length<=this.resolve(e)}})},matches:function(e,t){var n,i,r=!1;return t&&("object"==typeof t?(r=t.excludeEmptyString,n=t.message,i=t.name):n=t),this.test({name:i||"matches",message:n||Du,params:{regex:e},test:function(t){return ih(t)||""===t&&r||-1!==t.search(e)}})},email:function(e){return void 0===e&&(e=Iu),this.matches(rh,{name:"email",message:e,excludeEmptyString:!0})},url:function(e){return void 0===e&&(e=ju),this.matches(oh,{name:"url",message:e,excludeEmptyString:!0})},uuid:function(e){return void 0===e&&(e=Pu),this.matches(sh,{name:"uuid",message:e,excludeEmptyString:!1})},ensure:function(){return this.default("").transform((function(e){return null===e?"":e}))},trim:function(e){return void 0===e&&(e=Bu),this.transform((function(e){return null!=e?e.trim():e})).test({message:e,name:"trim",test:ah})},lowercase:function(e){return void 0===e&&(e=Uu),this.transform((function(e){return ih(e)?e:e.toLowerCase()})).test({message:e,name:"string_case",exclusive:!0,test:function(e){return ih(e)||e===e.toLowerCase()}})},uppercase:function(e){return void 0===e&&(e=Nu),this.transform((function(e){return ih(e)?e:e.toUpperCase()})).test({message:e,name:"string_case",exclusive:!0,test:function(e){return ih(e)||e===e.toUpperCase()}})}}),nh((function e(){var t=this;if(!(this instanceof e))return new e;qd.call(this,{type:"number"}),this.withMutation((function(){t.transform((function(e){var t=e;if("string"==typeof t){if(""===(t=t.replace(/\s/g,"")))return NaN;t=+t}return this.isType(t)?t:parseFloat(t)}))}))}),qd,{_typeCheck:function(e){return e instanceof Number&&(e=e.valueOf()),"number"==typeof e&&!function(e){return e!=+e}(e)},min:function(e,t){return void 0===t&&(t=Hu),this.test({message:t,name:"min",exclusive:!0,params:{min:e},test:function(t){return ih(t)||t>=this.resolve(e)}})},max:function(e,t){return void 0===t&&(t=Wu),this.test({message:t,name:"max",exclusive:!0,params:{max:e},test:function(t){return ih(t)||t<=this.resolve(e)}})},lessThan:function(e,t){return void 0===t&&(t=zu),this.test({message:t,name:"max",exclusive:!0,params:{less:e},test:function(t){return ih(t)||t<this.resolve(e)}})},moreThan:function(e,t){return void 0===t&&(t=Vu),this.test({message:t,name:"min",exclusive:!0,params:{more:e},test:function(t){return ih(t)||t>this.resolve(e)}})},positive:function(e){return void 0===e&&(e=Gu),this.moreThan(0,e)},negative:function(e){return void 0===e&&(e=qu),this.lessThan(0,e)},integer:function(e){return void 0===e&&(e=Ku),this.test({name:"integer",message:e,test:function(e){return ih(e)||Number.isInteger(e)}})},truncate:function(){return this.transform((function(e){return ih(e)?e:0|e}))},round:function(e){var t=["ceil","floor","round","trunc"];if("trunc"===(e=e&&e.toLowerCase()||"round"))return this.truncate();if(-1===t.indexOf(e.toLowerCase()))throw new TypeError("Only valid options for round() are: "+t.join(", "));return this.transform((function(t){return ih(t)?t:Math[e](t)}))}});var lh=/^(\d{4}|[+\-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,\.](\d{1,}))?)?(?:(Z)|([+\-])(\d{2})(?::?(\d{2}))?)?)?$/,ch=new Date("");function uh(e,t){return t||(t=e.slice(0)),e.raw=t,e}nh((function e(){var t=this;if(!(this instanceof e))return new e;qd.call(this,{type:"date"}),this.withMutation((function(){t.transform((function(e){return this.isType(e)?e:(e=function(e){var t,n,i=[1,4,5,6,7,10,11],r=0;if(n=lh.exec(e)){for(var o,s=0;o=i[s];++s)n[o]=+n[o]||0;n[2]=(+n[2]||1)-1,n[3]=+n[3]||1,n[7]=n[7]?String(n[7]).substr(0,3):0,void 0!==n[8]&&""!==n[8]||void 0!==n[9]&&""!==n[9]?("Z"!==n[8]&&void 0!==n[9]&&(r=60*n[10]+n[11],"+"===n[9]&&(r=0-r)),t=Date.UTC(n[1],n[2],n[3],n[4],n[5]+r,n[6],n[7])):t=+new Date(n[1],n[2],n[3],n[4],n[5],n[6],n[7])}else t=Date.parse?Date.parse(e):NaN;return t}(e),isNaN(e)?ch:new Date(e))}))}))}),qd,{_typeCheck:function(e){return t=e,"[object Date]"===Object.prototype.toString.call(t)&&!isNaN(e.getTime());var t},min:function(e,t){void 0===t&&(t=Zu);var n=e;if(!Nd.isRef(n)&&(n=this.cast(e),!this._typeCheck(n)))throw new TypeError("`min` must be a Date or a value that can be `cast()` to a Date");return this.test({message:t,name:"min",exclusive:!0,params:{min:e},test:function(e){return ih(e)||e>=this.resolve(n)}})},max:function(e,t){void 0===t&&(t=Yu);var n=e;if(!Nd.isRef(n)&&(n=this.cast(e),!this._typeCheck(n)))throw new TypeError("`max` must be a Date or a value that can be `cast()` to a Date");return this.test({message:t,name:"max",exclusive:!0,params:{max:e},test:function(e){return ih(e)||e<=this.resolve(n)}})}});const dh=function(e){return function(t){return null==e?void 0:e[t]}}({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"});var hh=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,fh=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var ph=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var gh=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var mh="\\ud800-\\udfff",vh="\\u2700-\\u27bf",bh="a-z\\xdf-\\xf6\\xf8-\\xff",yh="A-Z\\xc0-\\xd6\\xd8-\\xde",wh="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",_h="["+wh+"]",Ah="\\d+",xh="["+vh+"]",Ch="["+bh+"]",Sh="[^"+mh+wh+Ah+vh+bh+yh+"]",Eh="(?:\\ud83c[\\udde6-\\uddff]){2}",kh="[\\ud800-\\udbff][\\udc00-\\udfff]",$h="["+yh+"]",Mh="(?:"+Ch+"|"+Sh+")",Th="(?:"+$h+"|"+Sh+")",Rh="(?:['’](?:d|ll|m|re|s|t|ve))?",Lh="(?:['’](?:D|LL|M|RE|S|T|VE))?",Oh="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",Fh="[\\ufe0e\\ufe0f]?",Dh=Fh+Oh+"(?:\\u200d(?:"+["[^"+mh+"]",Eh,kh].join("|")+")"+Fh+Oh+")*",Ih="(?:"+[xh,Eh,kh].join("|")+")"+Dh,jh=RegExp([$h+"?"+Ch+"+"+Rh+"(?="+[_h,$h,"$"].join("|")+")",Th+"+"+Lh+"(?="+[_h,$h+Mh,"$"].join("|")+")",$h+"?"+Mh+"+"+Rh,$h+"+"+Lh,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ah,Ih].join("|"),"g");const Ph=function(e,t,n){return e=tn(e),void 0===(t=n?void 0:t)?function(e){return gh.test(e)}(e)?function(e){return e.match(jh)||[]}(e):function(e){return e.match(ph)||[]}(e):e.match(t)||[]};var Bh=RegExp("['’]","g");const Uh=function(e){return function(t){return function(e,t,n,i){var r=-1,o=null==e?0:e.length;for(i&&o&&(n=e[++r]);++r<o;)n=t(n,e[r],r,e);return n}(Ph(function(e){return(e=tn(e))&&e.replace(hh,dh).replace(fh,"")}(t).replace(Bh,"")),e,"")}};var Nh=Uh((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));const Hh=Nh,Wh=function(e,t,n){var i=e.length;return n=void 0===n?i:n,!t&&n>=i?e:function(e,t,n){var i=-1,r=e.length;t<0&&(t=-t>r?0:r+t),(n=n>r?r:n)<0&&(n+=r),r=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(r);++i<r;)o[i]=e[i+t];return o}(e,t,n)},zh=(Vh="toUpperCase",function(e){e=tn(e);var t=au(e)?wu(e):void 0,n=t?t[0]:e.charAt(0),i=t?Wh(t,1).join(""):e.slice(1);return n[Vh]()+i});var Vh;var Gh=Uh((function(e,t,n){return t=t.toLowerCase(),e+(n?function(e){return zh(tn(e).toLowerCase())}(t):t)}));const qh=Gh;var Kh=n(94633),Zh=n.n(Kh);function Yh(e,t){void 0===t&&(t=[]);var n=[],i=[];function r(e,r){var o=(0,Ud.split)(e)[0];~i.indexOf(o)||i.push(o),~t.indexOf(r+"-"+o)||n.push([r,o])}for(var o in e)if(nu(e,o)){var s=e[o];~i.indexOf(o)||i.push(o),Nd.isRef(s)&&s.isSibling?r(s.path,o):ed(s)&&s._deps&&s._deps.forEach((function(e){return r(e,o)}))}return Zh().array(i,n).reverse()}function Xh(e,t){var n=1/0;return e.some((function(e,i){if(-1!==t.path.indexOf(e))return n=i,!0})),n}function Jh(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return e.reduce((function(e,t){var i=n.shift();return e+(null==i?"":i)+t})).replace(/^\./,"")}function Qh(){var e=uh(["",'["','"]']);return Qh=function(){return e},e}function ef(){var e=uh(["",".",""]);return ef=function(){return e},e}function tf(){var e=uh(["",".",""]);return tf=function(){return e},e}var nf=function(e){return"[object Object]"===Object.prototype.toString.call(e)};function rf(e){var t=this;if(!(this instanceof rf))return new rf(e);qd.call(this,{type:"object",default:function(){var e=this;if(this._nodes.length){var t={};return this._nodes.forEach((function(n){t[n]=e.fields[n].default?e.fields[n].default():void 0})),t}}}),this.fields=Object.create(null),this._nodes=[],this._excludedEdges=[],this.withMutation((function(){t.transform((function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(t){e=null}return this.isType(e)?e:null})),e&&t.shape(e)}))}function of(){var e=uh(["","[","]"]);return of=function(){return e},e}function sf(){var e=uh(["","[","]"]);return sf=function(){return e},e}nh(rf,qd,{_typeCheck:function(e){return nf(e)||"function"==typeof e},_cast:function(e,t){var n=this;void 0===t&&(t={});var i=qd.prototype._cast.call(this,e,t);if(void 0===i)return this.default();if(!this._typeCheck(i))return i;var r=this.fields,o=!0===this._option("stripUnknown",t),s=this._nodes.concat(Object.keys(i).filter((function(e){return-1===n._nodes.indexOf(e)}))),a={},l=(0,qc.Z)({},t,{parent:a,__validating:t.__validating||!1}),c=!1;return s.forEach((function(e){var n=r[e],s=nu(i,e);if(n){var u,d=n._options&&n._options.strict;if(l.path=Jh(tf(),t.path,e),l.value=i[e],!0===(n=n.resolve(l))._strip)return void(c=c||e in i);void 0!==(u=t.__validating&&d?i[e]:n.cast(i[e],l))&&(a[e]=u)}else s&&!o&&(a[e]=i[e]);a[e]!==i[e]&&(c=!0)})),c?a:i},_validate:function(e,t){var n,i,r=this;void 0===t&&(t={});var o=t.sync,s=[],a=null!=t.originalValue?t.originalValue:e,l=[{schema:this,value:a}].concat(t.from||[]);return n=this._option("abortEarly",t),i=this._option("recursive",t),t=(0,qc.Z)({},t,{__validating:!0,originalValue:a,from:l}),qd.prototype._validate.call(this,e,t).catch(cd(n,s)).then((function(e){if(!i||!nf(e)){if(s.length)throw s[0];return e}l=a?[].concat(l):[{schema:r,value:a||e}].concat(t.from||[]),a=a||e;var c,u,d=r._nodes.map((function(n){var i=-1===n.indexOf(".")?Jh(ef(),t.path,n):Jh(Qh(),t.path,n),s=r.fields[n],c=(0,qc.Z)({},t,{path:i,from:l,parent:e,originalValue:a[n]});return s&&s.validate?(c.strict=!0,s.validate(e[n],c)):function(e){return e?rd.SynchronousPromise:Promise}(o).resolve(!0)}));return ud({sync:o,validations:d,value:e,errors:s,endEarly:n,path:t.path,sort:(c=r.fields,u=Object.keys(c),function(e,t){return Xh(u,e)-Xh(u,t)})})}))},concat:function(e){var t=qd.prototype.concat.call(this,e);return t._nodes=Yh(t.fields,t._excludedEdges),t},shape:function(e,t){void 0===t&&(t=[]);var n=this.clone(),i=(0,qc.Z)(n.fields,e);if(n.fields=i,t.length){Array.isArray(t[0])||(t=[t]);var r=t.map((function(e){return e[0]+"-"+e[1]}));n._excludedEdges=n._excludedEdges.concat(r)}return n._nodes=Yh(i,n._excludedEdges),n},from:function(e,t,n){var i=(0,Ud.getter)(e,!0);return this.transform((function(r){if(null==r)return r;var o=r;return nu(r,e)&&(o=(0,qc.Z)({},r),n||delete o[e],o[t]=i(r)),o}))},noUnknown:function(e,t){void 0===e&&(e=!0),void 0===t&&(t=Xu),"string"==typeof e&&(t=e,e=!0);var n=this.test({name:"noUnknown",exclusive:!0,message:t,test:function(t){if(null==t)return!0;var n=function(e,t){var n=Object.keys(e.fields);return Object.keys(t).filter((function(e){return-1===n.indexOf(e)}))}(this.schema,t);return!e||0===n.length||this.createError({params:{unknown:n.join(", ")}})}});return n._options.stripUnknown=e,n},unknown:function(e,t){return void 0===e&&(e=!0),void 0===t&&(t=Xu),this.noUnknown(!e,t)},transformKeys:function(e){return this.transform((function(t){return t&&function(e,t){var n={};return t=Pd(t),gd(e,(function(e,i,r){ce(n,t(e,i,r),e)})),n}(t,(function(t,n){return e(n)}))}))},camelCase:function(){return this.transformKeys(qh)},snakeCase:function(){return this.transformKeys(Hh)},constantCase:function(){return this.transformKeys((function(e){return Hh(e).toUpperCase()}))},describe:function(){var e=qd.prototype.describe.call(this);return e.fields=Bd(this.fields,(function(e){return e.describe()})),e}}),nh((function e(t){var n=this;if(!(this instanceof e))return new e(t);qd.call(this,{type:"array"}),this._subType=void 0,this.innerType=void 0,this.withMutation((function(){n.transform((function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(t){e=null}return this.isType(e)?e:null})),t&&n.of(t)}))}),qd,{_typeCheck:function(e){return Array.isArray(e)},_cast:function(e,t){var n=this,i=qd.prototype._cast.call(this,e,t);if(!this._typeCheck(i)||!this.innerType)return i;var r=!1,o=i.map((function(e,i){var o=n.innerType.cast(e,(0,qc.Z)({},t,{path:Jh(sf(),t.path,i)}));return o!==e&&(r=!0),o}));return r?o:i},_validate:function(e,t){var n=this;void 0===t&&(t={});var i=[],r=t.sync,o=t.path,s=this.innerType,a=this._option("abortEarly",t),l=this._option("recursive",t),c=null!=t.originalValue?t.originalValue:e;return qd.prototype._validate.call(this,e,t).catch(cd(a,i)).then((function(e){if(!l||!s||!n._typeCheck(e)){if(i.length)throw i[0];return e}c=c||e;for(var u=new Array(e.length),d=0;d<e.length;d++){var h=e[d],f=Jh(of(),t.path,d),p=(0,qc.Z)({},t,{path:f,strict:!0,parent:e,index:d,originalValue:c[d]});u[d]=!s.validate||s.validate(h,p)}return ud({sync:r,path:o,value:e,errors:i,endEarly:a,validations:u})}))},_isPresent:function(e){return qd.prototype._isPresent.call(this,e)&&e.length>0},of:function(e){var t=this.clone();if(!1!==e&&!ed(e))throw new TypeError("`array.of()` sub-schema must be a valid yup schema, or `false` to negate a current sub-schema. not: "+Tu(e));return t._subType=e,t.innerType=e,t},min:function(e,t){return t=t||Ju,this.test({message:t,name:"min",exclusive:!0,params:{min:e},test:function(t){return ih(t)||t.length>=this.resolve(e)}})},max:function(e,t){return t=t||Qu,this.test({message:t,name:"max",exclusive:!0,params:{max:e},test:function(t){return ih(t)||t.length<=this.resolve(e)}})},ensure:function(){var e=this;return this.default((function(){return[]})).transform((function(t,n){return e._typeCheck(t)?t:null==n?[]:[].concat(n)}))},compact:function(e){var t=e?function(t,n,i){return!e(t,n,i)}:function(e){return!!e};return this.transform((function(e){return null!=e?e.filter(t):e}))},describe:function(){var e=qd.prototype.describe.call(this);return this.innerType&&(e.innerType=this.innerType.describe()),e}});var af=function(){function e(e){this._resolve=function(t,n){var i=e(t,n);if(!ed(i))throw new TypeError("lazy() functions must return a valid schema");return i.resolve(n)}}var t=e.prototype;return t.resolve=function(e){return this._resolve(e.value,e)},t.cast=function(e,t){return this._resolve(e,t).cast(e,t)},t.validate=function(e,t){return this._resolve(e,t).validate(e,t)},t.validateSync=function(e,t){return this._resolve(e,t).validateSync(e,t)},t.validateAt=function(e,t,n){return this._resolve(t,n).validateAt(e,t,n)},t.validateSyncAt=function(e,t,n){return this._resolve(t,n).validateSyncAt(e,t,n)},e}();af.prototype.__isYupSchema__=!0;var lf=n(75068),cf=!("undefined"==typeof window||!window.document||!window.document.createElement),uf=void 0;function df(e){e.handlers===e.nextHandlers&&(e.nextHandlers=e.handlers.slice())}function hf(e){this.target=e,this.events={}}hf.prototype.getEventHandlers=function(e,t){var n,i=String(e)+" "+String((n=t)?!0===n?100:(n.capture<<0)+(n.passive<<1)+(n.once<<2):0);return this.events[i]||(this.events[i]={handlers:[],handleEvent:void 0},this.events[i].nextHandlers=this.events[i].handlers),this.events[i]},hf.prototype.handleEvent=function(e,t,n){var i=this.getEventHandlers(e,t);i.handlers=i.nextHandlers,i.handlers.forEach((function(e){e&&e(n)}))},hf.prototype.add=function(e,t,n){var i=this,r=this.getEventHandlers(e,n);df(r),0===r.nextHandlers.length&&(r.handleEvent=this.handleEvent.bind(this,e,n),this.target.addEventListener(e,r.handleEvent,n)),r.nextHandlers.push(t);var o=!0;return function(){if(o){o=!1,df(r);var s=r.nextHandlers.indexOf(t);r.nextHandlers.splice(s,1),0===r.nextHandlers.length&&(i.target&&i.target.removeEventListener(e,r.handleEvent,n),r.handleEvent=void 0)}}};var ff="__consolidated_events_handlers__";function pf(e,t,n,i){e[ff]||(e[ff]=new hf(e));var r=function(e){if(e)return void 0===uf&&(uf=function(){if(!cf)return!1;if(!window.addEventListener||!window.removeEventListener||!Object.defineProperty)return!1;var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}}),n=function(){};window.addEventListener("testPassiveEventSupport",n,t),window.removeEventListener("testPassiveEventSupport",n,t)}catch(e){}return e}()),uf?e:!!e.capture}(i);return e[ff].add(t,n,r)}var gf=n(35834);function mf(e,t){var n,i=(n=e,!isNaN(parseFloat(n))&&isFinite(n)?parseFloat(n):"px"===n.slice(-2)?parseFloat(n.slice(0,-2)):void 0);if("number"==typeof i)return i;var r=function(e){if("%"===e.slice(-1))return parseFloat(e.slice(0,-1))/100}(e);return"number"==typeof r?r*t:void 0}var vf,bf="above",yf="inside",wf="below",_f="invisible";function Af(e){return"string"==typeof e.type}var xf=[];function Cf(e){xf.push(e),vf||(vf=setTimeout((function(){var e;for(vf=null;e=xf.shift();)e()}),0));var t=!0;return function(){if(t){t=!1;var n=xf.indexOf(e);-1!==n&&(xf.splice(n,1),!xf.length&&vf&&(clearTimeout(vf),vf=null))}}}var Sf="undefined"!=typeof window,Ef=function(e){function t(t){var n;return(n=e.call(this,t)||this).refElement=function(e){n._ref=e},n}(0,lf.Z)(t,e);var i=t.prototype;return i.componentDidMount=function(){var e=this;Sf&&(this.cancelOnNextTick=Cf((function(){e.cancelOnNextTick=null;var t=e.props,n=t.children;t.debug,function(e,t){if(e&&!Af(e)&&!t)throw new Error("<Waypoint> needs a DOM element to compute boundaries. The child you passed is neither a DOM element (e.g. <div>) nor does it use the innerRef prop.\n\nSee https://goo.gl/LrBNgw for more info.")}(n,e._ref),e._handleScroll=e._handleScroll.bind(e),e.scrollableAncestor=e._findScrollableAncestor(),e.scrollEventListenerUnsubscribe=pf(e.scrollableAncestor,"scroll",e._handleScroll,{passive:!0}),e.resizeEventListenerUnsubscribe=pf(window,"resize",e._handleScroll,{passive:!0}),e._handleScroll(null)})))},i.componentDidUpdate=function(){var e=this;Sf&&this.scrollableAncestor&&(this.cancelOnNextTick||(this.cancelOnNextTick=Cf((function(){e.cancelOnNextTick=null,e._handleScroll(null)}))))},i.componentWillUnmount=function(){Sf&&(this.scrollEventListenerUnsubscribe&&this.scrollEventListenerUnsubscribe(),this.resizeEventListenerUnsubscribe&&this.resizeEventListenerUnsubscribe(),this.cancelOnNextTick&&this.cancelOnNextTick())},i._findScrollableAncestor=function(){var e=this.props,t=e.horizontal,i=e.scrollableAncestor;if(i)return function(e){return"window"===e?n.g.window:e}(i);for(var r=this._ref;r.parentNode;){if((r=r.parentNode)===document.body)return window;var o=window.getComputedStyle(r),s=(t?o.getPropertyValue("overflow-x"):o.getPropertyValue("overflow-y"))||o.getPropertyValue("overflow");if("auto"===s||"scroll"===s||"overlay"===s)return r}return window},i._handleScroll=function(e){if(this._ref){var t=this._getBounds(),n=function(e){return e.viewportBottom-e.viewportTop==0?_f:e.viewportTop<=e.waypointTop&&e.waypointTop<=e.viewportBottom||e.viewportTop<=e.waypointBottom&&e.waypointBottom<=e.viewportBottom||e.waypointTop<=e.viewportTop&&e.viewportBottom<=e.waypointBottom?yf:e.viewportBottom<e.waypointTop?wf:e.waypointTop<e.viewportTop?bf:_f}(t),i=this._previousPosition,r=this.props,o=(r.debug,r.onPositionChange),s=r.onEnter,a=r.onLeave,l=r.fireOnRapidScroll;if(this._previousPosition=n,i!==n){var c={currentPosition:n,previousPosition:i,event:e,waypointTop:t.waypointTop,waypointBottom:t.waypointBottom,viewportTop:t.viewportTop,viewportBottom:t.viewportBottom};o.call(this,c),n===yf?s.call(this,c):i===yf&&a.call(this,c),l&&(i===wf&&n===bf||i===bf&&n===wf)&&(s.call(this,{currentPosition:yf,previousPosition:i,event:e,waypointTop:t.waypointTop,waypointBottom:t.waypointBottom,viewportTop:t.viewportTop,viewportBottom:t.viewportBottom}),a.call(this,{currentPosition:n,previousPosition:yf,event:e,waypointTop:t.waypointTop,waypointBottom:t.waypointBottom,viewportTop:t.viewportTop,viewportBottom:t.viewportBottom}))}}},i._getBounds=function(){var e,t,n=this.props,i=n.horizontal,r=(n.debug,this._ref.getBoundingClientRect()),o=r.left,s=r.top,a=r.right,l=r.bottom,c=i?o:s,u=i?a:l;this.scrollableAncestor===window?(e=i?window.innerWidth:window.innerHeight,t=0):(e=i?this.scrollableAncestor.offsetWidth:this.scrollableAncestor.offsetHeight,t=i?this.scrollableAncestor.getBoundingClientRect().left:this.scrollableAncestor.getBoundingClientRect().top);var d=this.props,h=d.bottomOffset;return{waypointTop:c,waypointBottom:u,viewportTop:t+mf(d.topOffset,e),viewportBottom:t+e-mf(h,e)}},i.render=function(){var e=this,t=this.props.children;return t?Af(t)||(0,gf.isForwardRef)(t)?c().cloneElement(t,{ref:function(n){e.refElement(n),t.ref&&("function"==typeof t.ref?t.ref(n):t.ref.current=n)}}):c().cloneElement(t,{innerRef:this.refElement}):c().createElement("span",{ref:this.refElement,style:{fontSize:0}})},t}(c().PureComponent);Ef.above=bf,Ef.below=wf,Ef.inside=yf,Ef.invisible=_f,Ef.defaultProps={debug:!1,scrollableAncestor:void 0,children:void 0,topOffset:"0px",bottomOffset:"0px",horizontal:!1,onEnter:function(){},onLeave:function(){},onPositionChange:function(){},fireOnRapidScroll:!0},Ef.displayName="Waypoint";var kf=n(3210),$f={};$f.styleTagTransform=Zn(),$f.setAttributes=Vn(),$f.insert=Wn().bind(null,"head"),$f.domAPI=Nn(),$f.insertStyleElement=qn(),Bn()(kf.Z,$f);const Mf=kf.Z&&kf.Z.locals?kf.Z.locals:void 0,Tf=function(e){var t=e.page,n=e.onFieldChange,i=e.setSelectedPage,r=e.isFormExpanded,o=(0,l.useMemo)((function(){return t.label.replace(/\s/g,"")}),[t.label]),s=t.sections.filter((function(e){var t=e.questions.some((function(e){return!(0,jn.o)(e.isHidden)}));return!(0,jn.o)(e.isHidden)&&t}));return c().createElement(Ef,{onEnter:function(){return i(o)},topOffset:"50%",bottomOffset:"60%"},c().createElement("div",{id:o,className:Mf.pageContent},c().createElement("div",{className:Mf.pageHeader},c().createElement("p",{className:Mf.pageTitle},t.label)),c().createElement(d.UQy,null,s.map((function(e){return c().createElement(d.Qdk,{title:e.label,open:void 0!==r?r:(0,jn.o)(e.isExpanded),className:Mf.sectionContent,key:"section-".concat(e.id)},c().createElement("div",{className:Mf.formSection},c().createElement(gi,{fields:e.questions.filter((function(e){return!(0,jn.o)(e.isHidden)})),onFieldChange:n})))})))))};function Rf(e){var t=e.effect;return(0,l.useEffect)((function(){return null==t?void 0:t()}),[t]),null}function Lf(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=document.getElementById(e);null==n||n.scrollIntoView({behavior:"smooth",block:"start",inline:"start"}),t&&(null==n||n.focus())}var Of=n(95591);function Ff(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function Df(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function If(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),i.forEach((function(t){Df(e,t,n[t])}))}return e}function jf(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,r,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(i=n.next()).done)&&(o.push(i.value),!t||o.length!==t);s=!0);}catch(e){a=!0,r=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw r}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Ff(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ff(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Pf=n(49770);function Bf(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function Uf(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Nf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),i.forEach((function(t){Uf(e,t,n[t])}))}return e}function Hf(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n.push.apply(n,i)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e}function Wf(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,r,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(i=n.next()).done)&&(o.push(i.value),!t||o.length!==t);s=!0);}catch(e){a=!0,r=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw r}}return o}}(e,t)||Vf(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function zf(e){return function(e){if(Array.isArray(e))return Bf(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Vf(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Vf(e,t){if(e){if("string"==typeof e)return Bf(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Bf(e,t):void 0}}var Gf=function(e){var t,n,i,r,o,s=e.formJson,a=e.patient,d=e.formSessionDate,h=e.provider,f=e.location,p=e.visit,g=e.values,m=e.isFormExpanded,v=e.sessionMode,b=e.scrollablePages,y=e.workspaceLayout,w=e.setScrollablePages,_=e.setPagesWithErrors,A=e.setIsLoadingFormDependencies,x=e.setFieldValue,C=e.setSelectedPage,S=e.handlers,E=e.allInitialValues,k=e.setAllInitialValues,$=e.isSubmitting,M=Wf((0,l.useState)([]),2),T=M[0],R=M[1],L=Wf((0,l.useState)(null),2),O=L[0],F=L[1],D=Wf((0,l.useState)(d),2),I=D[0],j=D[1],P=function(e){var t,n=e.encounter,i=(t=e.encounter)&&"object"==typeof t?t:null,r=n&&!i?"/ws/rest/v1/encounter/".concat(n,"?v=").concat(Ci.Ib):null,o=(0,Of.ZP)(r,gr.openmrsFetch),s=o.data,a=o.error;return{encounter:i||(null==s?void 0:s.data),error:a,isLoading:!!r&&!s}}(s),B=P.encounter,U=P.isLoading,N=Wf((0,l.useState)(null),2),H=N[0],W=N[1],z=Wf((0,l.useState)(!0),2),V=z[0],G=z[1],q=Wf((0,l.useState)(s),2),K=q[0],Z=q[1],Y=Wf((0,l.useState)([]),2),X=Y[0],J=Y[1],Q=Wf((0,l.useState)(!1),2),ee=Q[0],te=Q[1],ne=Wf((0,l.useState)([]),2),ie=ne[0],re=ne[1],oe=(0,gr.useLayoutType)(),se=(0,l.useMemo)((function(){return{patient:a,encounter:B,previousEncounter:H,location:f,sessionMode:v||((null==K?void 0:K.encounter)?"edit":"enter"),encounterDate:d,form:K,visit:p,setEncounterDate:j}}),[B,null==K?void 0:K.encounter,f,a,H,v]),ae=(t=(0,Pf.Z)("/ws/rest/v1/encounterrole?v=custom:(uuid,display,name)",gr.openmrsFetch),n=t.data,i=t.error,r=t.isLoading,o=null==n?void 0:n.data.results.find((function(e){return"Clinician"===e.name})),o?{encounterRole:o,error:i,isLoading:r}:{encounterRole:null==n?void 0:n.data.results[0],error:i,isLoading:r}).encounterRole,le=Wf((0,l.useMemo)((function(){var e,t=[],n=new Set;return null===(e=K.pages)||void 0===e||e.forEach((function(e){var n;return null===(n=e.sections)||void 0===n?void 0:n.forEach((function(n){var i;null===(i=n.questions)||void 0===i||i.forEach((function(i){var r,o,s,a,l,c;n.inlineRendering=(0,In.xb)(n.inlineRendering)?null:n.inlineRendering,e.inlineRendering=(0,In.xb)(e.inlineRendering)?null:e.inlineRendering,K.inlineRendering=(0,In.xb)(K.inlineRendering)?null:K.inlineRendering,i.inlineRendering=null!==(o=null!==(r=n.inlineRendering)&&void 0!==r?r:e.inlineRendering)&&void 0!==o?o:K.inlineRendering,s=i,a=n.readonly,l=e.readonly,c=K.readonly,(0,In.xb)(s.readonly)&&(s.readonly=!(0,In.xb)(a)||!(0,In.xb)(l)||c),"fixed-value"!=i.questionOptions.rendering||i.fixedValue||(i.fixedValue=i.value),t.push(i),"obsGroup"==i.type&&i.questions.forEach((function(e){e.groupId=i.id,t.push(e)}))}))}))})),t.forEach((function(e){var t,i;(null===(t=e.questionOptions)||void 0===t?void 0:t.concept)&&n.add(e.questionOptions.concept),(null===(i=e.questionOptions)||void 0===i?void 0:i.answers)&&e.questionOptions.answers.forEach((function(e){e.concept&&n.add(e.concept)}))})),[t,n]}),[]),2),ce=le[0],ue=le[1],de=function(e,t,n){var i=jf((0,l.useState)({}),2),r=i[0],o=i[1],s=jf((0,l.useState)(!1),2),a=s[0],c=s[1],u=jf((0,l.useState)({}),2),d=u[0],h=u[1];return(0,l.useEffect)((function(){var t=Object.keys(r);Promise.all(t.map((function(e){return r[e]}))).then((function(i){t.forEach((function(t,r){var o=(0,In.xb)(i[r])?"":i[r];d[t]=o;var s=e.find((function(e){return e.id===t}));try{Tc(s.type).handleFieldSubmission(s,o,n)}catch(e){console.error(e)}})),h(If({},d))}))}),[r]),(0,l.useEffect)((function(){if(t)e.forEach((function(i){var r=Tc(i.type),o=null==r?void 0:r.getInitialValue(t,i,e);(0,In.xb)(o)&&!(0,In.xb)(i.questionOptions.defaultValue)&&(o=Mi(i,n,r)),d[i.id]=null==o?"":o,i.unspecified&&(d["".concat(i.id,"-unspecified")]=!o)})),c(!0);else{var i={checkbox:[],toggle:!1,default:""};e.forEach((function(t){var o=null;t.questionOptions.calculate&&!r[t.id]&&(r[t.id]=(0,vo.oC)(t.questionOptions.calculate.calculateExpression,{value:t,type:"field"},e,d,{mode:n.sessionMode,patient:n.patient})),(0,In.xb)(t.questionOptions.defaultValue)||(o=Mi(t,n,Tc(t.type))),(0,In.xb)(o)?d[t.id]=null!=i[t.questionOptions.rendering]?i[t.questionOptions.rendering]:i.default:d[t.id]=o,t.unspecified&&(d["".concat(t.id,"-unspecified")]=!1)})),o(If({},r))}h(If({},d))}),[t]),{initialValues:d,isFieldEncounterBindingComplete:a}}(ce,B,se),he=de.initialValues,fe=de.isFieldEncounterBindingComplete,pe=function(e){var t=(0,Pf.Z)("/ws/rest/v1/concept?references=".concat(Array.from(e).join(","),"&v=").concat("custom:(uuid,display,conceptMappings:(conceptReferenceTerm:(conceptSource:(name),code)))"),gr.openmrsFetch),n=t.data,i=t.error,r=t.isLoading;return{concepts:null==n?void 0:n.data.results,error:i,isLoading:r}}(ue).concepts,ge=(0,l.useCallback)((function(){return s.pages.forEach((function(e){e.isSubform||b.add(e)})),function(){s.pages.forEach((function(e){e.isSubform||b.delete(e)}))}}),[b,s]);(0,l.useEffect)((function(){!O&&f&&F(f),B&&!O&&F(B.location)}),[f,B]),(0,l.useEffect)((function(){var e;he&&Object.keys(he).length&&(R(ce.map((function(e){var t,n,i,r;e.hide?me({value:e,type:"field"},ce,he):e.isHidden=!1,null===(t=e.questionOptions.answers)||void 0===t||t.filter((function(e){var t;return!(0,In.xb)(null===(t=e.hide)||void 0===t?void 0:t.hideWhenExpression)})).forEach((function(t){t.isHidden=(0,vo.j3)(t.hide.hideWhenExpression,{value:e,type:"field"},ce,he,{mode:v,patient:a})})),"string"==typeof e.readonly&&(null===(n=null===(i=e.readonly)||void 0===i?void 0:i.split(" "))||void 0===n?void 0:n.length)>1&&(e.readonlyExpression=e.readonly,e.readonly=(0,vo.j3)(e.readonly,{value:e,type:"field"},ce,he,{mode:v,patient:a}));var o=null===(r=e.questionOptions.repeatOptions)||void 0===r?void 0:r.limitExpression;"repeating"!==e.questionOptions.rendering||(0,In.xb)(o)||(e.questionOptions.repeatOptions.limit=(0,vo.j3)(o,{value:e,type:"field"},ce,he,{mode:v,patient:a}));var s=Fi(e.questionOptions.concept,pe);return e.questionOptions.concept=s?s.uuid:e.questionOptions.concept,e.label=e.label?e.label:null==s?void 0:s.display,e.questionOptions.answers&&(e.questionOptions.answers=e.questionOptions.answers.map((function(e){var t=Fi(e.concept,pe);return Hf(Nf({},e),{concept:t?t.uuid:e.concept,label:e.label?e.label:null==t?void 0:t.display})}))),e}))),null==K||null===(e=K.pages)||void 0===e||e.forEach((function(e){var t;e.hide?me({value:e,type:"page"},ce,he):e.isHidden=!1,null==e||null===(t=e.sections)||void 0===t||t.forEach((function(e){e.hide?me({value:e,type:"section"},ce,he):e.isHidden=!1}))})),Z(K),k(Nf({},E,he)),("enter"==v||fe)&&te(!0))}),[he,pe]),(0,l.useEffect)((function(){var e;"enter"!=v||(0,jn.o)(null===(e=s.formOptions)||void 0===e?void 0:e.usePreviousValueDisabled)?G(!1):(0,xi.getPreviousEncounter)(null==a?void 0:a.id,null==s?void 0:s.encounterType).then((function(e){W(e),G(!1)}))}),[v]),(0,l.useEffect)((function(){U||V||A(!1)}),[U,V]);var me=function(e,t,n){var i,r,o,s,l=e.value,c=e.type,u=(0,vo.j3)(null===(i=l.hide)||void 0===i?void 0:i.hideWhenExpression,e,t,n,{mode:v,patient:a});e.value.isHidden=u,"field"==c&&(null===(r=e.value)||void 0===r||null===(o=r.questions)||void 0===o?void 0:o.length)&&(null===(s=e.value)||void 0===s||s.questions.forEach((function(e){e.isHidden=u}))),"page"==c&&l.sections.forEach((function(e){e.isParentHidden=u,$i(u,e,t,X,x)})),"section"==c&&$i(u,l,t,X,x)},ve=(0,l.useCallback)((function(e,t){Array.isArray(t)?t.forEach((function(t){(0,In.xb)(t.groupMembers)?delete t.groupMembers:t.groupMembers.forEach((function(e){(0,In.xb)(e.groupMembers)&&delete e.groupMembers})),e.push(t)})):((0,In.xb)(t.groupMembers)?delete t.groupMembers:t.groupMembers.forEach((function(e){(0,In.xb)(e.groupMembers)&&delete e.groupMembers})),e.push(t))}),[]);(0,l.useEffect)((function(){if(null==ie?void 0:ie.length)switch(_((t=ie,n=[],e=b,i=function(e){if(Array.isArray(e))return Ei(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||ki(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),(null==t?void 0:t.length)&&t.forEach((function(e){i.forEach((function(t){t.sections.find((function(t){return t.questions.find((function(t){return t===e}))}))&&!n.includes(t.label)&&n.push(t.label)}))})),n)),ie[0].questionOptions.rendering){case"date":Lf(ie[0].id,!1);break;case"radio":Lf("".concat(ie[0].id,"-").concat(ie[0].questionOptions.answers[0].label),!0);break;case"checkbox":Lf("".concat(ie[0].label,"-input"),!0);break;default:Lf(ie[0].id,!0)}else _([]);var e,t,n,i}),[ie]);var be=(0,l.useCallback)((function(e){var t=[],n=!1;return T.filter((function(e){return!(e.isParentHidden||e.disabled||e.isHidden||(0,jn.o)(e.readonly))})).filter((function(e){var t;return 1!=(null===(t=e.submission)||void 0===t?void 0:t.unspecified)})).forEach((function(i){var r,o=null!==(r=In.Ls.validate(i,e[i.id]).filter((function(e){return"error"==e.resultType})))&&void 0!==r?r:[];if(o.length)return t.push(i),i.submission=Hf(Nf({},i.submission),{errors:o}),void(n=!0)})),re(zf(t)),!n}),[T]),ye=function(e,t,n,i){var r,o=T.find((function(t){return t.id==e})),s=Array.isArray(o.validators)?[{type:"OHRIBaseValidator"}].concat(zf(o.validators)):[{type:"OHRIBaseValidator"}],l={expressionContext:{mode:v},values:Hf(Nf({},g),Uf({},e,t)),fields:T},c=[],u=[],d=!0,h=!1,f=void 0;try{for(var p,m=s[Symbol.iterator]();!(d=(p=m.next()).done);d=!0){var b,y,w,_=p.value,A=(null===(w=Lc(_.type))||void 0===w?void 0:w.validate(o,t,Nf({},l,_)))||[];(b=c).push.apply(b,zf(A.filter((function(e){return"error"==e.resultType})))),(y=u).push.apply(y,zf(A.filter((function(e){return"warning"==e.resultType}))))}}catch(e){h=!0,f=e}finally{try{d||null==m.return||m.return()}finally{if(h)throw f}}null==n||n(c),null==i||i(u),re(c.length?function(e){return zf(e).concat([o])}:function(e){return e.filter((function(e){return e!==o}))}),"toggle"==o.questionOptions.rendering&&(t=t?Ci.ks:Ci.Mf),o.fieldDependants&&o.fieldDependants.forEach((function(n){var i,r,o,s,l,c=T.find((function(e){return e.id==n}));!c.isHidden&&(null===(i=c.questionOptions.calculate)||void 0===i?void 0:i.calculateExpression)&&(0,vo.oC)(c.questionOptions.calculate.calculateExpression,{value:c,type:"field"},T,Hf(Nf({},g),Uf({},e,t)),{mode:v,patient:a}).then((function(e){e=(0,In.xb)(e)?"":e,g[c.id]=e,x(c.id,e),Tc(c.type).handleFieldSubmission(c,e,se)})),c.hide&&(me({value:c,type:"field"},T,Hf(Nf({},g),Uf({},e,t))),Li(c,X,x)),null===(r=null==c?void 0:c.questionOptions.answers)||void 0===r||r.filter((function(e){var t;return!(0,In.xb)(null===(t=e.hide)||void 0===t?void 0:t.hideWhenExpression)})).forEach((function(n){var i;n.isHidden=(0,vo.j3)(null===(i=n.hide)||void 0===i?void 0:i.hideWhenExpression,{value:c,type:"field"},T,Hf(Nf({},g),Uf({},e,t)),{mode:v,patient:a})})),!c.isHidden&&c.readonlyExpression&&(c.readonly=(0,vo.j3)(c.readonlyExpression,{value:c,type:"field"},T,Hf(Nf({},g),Uf({},e,t)),{mode:v,patient:a})),"repeating"!==c.questionOptions.rendering||(0,In.xb)(null===(o=c.questionOptions.repeatOptions)||void 0===o?void 0:o.limitExpression)||(c.questionOptions.repeatOptions.limit=(0,vo.j3)(null===(s=c.questionOptions.repeatOptions)||void 0===s?void 0:s.limitExpression,{value:c,type:"field"},T,Hf(Nf({},g),Uf({},e,t)),{mode:v,patient:a}),(0,vo.j3)(null===(l=c.questionOptions.repeatOptions)||void 0===l?void 0:l.limitExpression,{value:c,type:"field"},T,Hf(Nf({},g),Uf({},e,t)),{mode:v,patient:a}));var u=zf(T),d=u.findIndex((function(e){return e.id==n}));u[d]=c,R(u)})),o.sectionDependants&&o.sectionDependants.forEach((function(n){for(var i=0;i<K.pages.length;i++){var r=K.pages[i].sections.find((function(e,t){return e.label==n}));if(r){me({value:r,type:"section"},T,Hf(Nf({},g),Uf({},e,t))),(0,jn.o)(r.isHidden)&&r.questions.forEach((function(e){e.isParentHidden=!0,Li(e,X,x)}));break}}})),o.pageDependants&&(null===(r=o.pageDependants)||void 0===r||r.forEach((function(n){var i=K.pages.find((function(e){return e.label==n}));me({value:i,type:"page"},T,Hf(Nf({},g),Uf({},e,t))),(0,jn.o)(i.isHidden)&&i.sections.forEach((function(e){e.questions.forEach((function(e){e.isParentHidden=!0,Li(e,X,x)}))}));var r=K,o=r.pages.findIndex((function(e){return e.label==n}));r[o]=i,Z(r)})))};return"view"!==v&&S.set(K.name,{validate:be,submit:function(e){var t,n,i=[];T.filter((function(e){return e.value||"obsGroup"==e.type})).filter((function(e){return!(e.isParentHidden||e.isHidden||"obs"!=e.type&&"obsGroup"!=e.type)})).filter((function(e){return!e.groupId})).forEach((function(e){if("obsGroup"==e.type){var t,n={person:null==a?void 0:a.id,obsDatetime:I,concept:e.questionOptions.concept,location:O,order:null,groupMembers:[],uuid:null==e||null===(t=e.value)||void 0===t?void 0:t.uuid,voided:!1},r=!1;e.questions.forEach((function(e){var t;e.value&&(r=!0,Array.isArray(e.value)?(t=n.groupMembers).push.apply(t,zf(e.value)):n.groupMembers.push(e.value))})),r&&ve(i,n)}else ve(i,e.value)})),X.forEach((function(e){return ve(i,e)}));var r,o,l={};B?(Object.assign(l,B),l.location=O.uuid,-1===l.encounterProviders.findIndex((function(e){return e.provider.uuid==h}))&&(l.encounterProviders=zf(l.encounterProviders).concat([{provider:h,encounterRole:null==ae?void 0:ae.uuid}]),l.form={uuid:null==se||null===(r=se.form)||void 0===r?void 0:r.uuid},l.visit={uuid:null==p?void 0:p.uuid}),l.obs=i):l={patient:a.id,encounterDatetime:I,location:O.uuid,encounterType:s.encounterType,encounterProviders:[{provider:h,encounterRole:null==ae?void 0:ae.uuid}],obs:i,form:{uuid:null==se||null===(o=se.form)||void 0===o?void 0:o.uuid},visit:null==p?void 0:p.uuid};if((null===(t=l.obs)||void 0===t?void 0:t.length)||(null===(n=l.orders)||void 0===n?void 0:n.length)){var c=new AbortController;return(0,xi.saveEncounter)(c,l,null==B?void 0:B.uuid)}}}),c().createElement(u.Provider,{value:{values:g,setFieldValue:x,setEncounterLocation:F,setObsGroupsToVoid:J,obsGroupsToVoid:X,fields:T,encounterContext:se,layoutType:oe,workspaceLayout:y,isFieldInitializationComplete:ee,isSubmitting:$}},c().createElement(Rf,{effect:ge}),K.pages.map((function(e,t){var n,i,r,o=e.sections.every((function(e){return e.isHidden}))||e.sections.every((function(e){return e.questions.every((function(e){return e.isHidden}))}))||(0,jn.o)(e.isHidden);return!e.isSubform&&o?null:(0,jn.o)(e.isSubform)&&(null===(n=e.subform)||void 0===n?void 0:n.form)?"enter"==v||(null===(i=e.subform)||void 0===i?void 0:i.form.encounter)?c().createElement(Gf,{key:t,formJson:null===(r=e.subform)||void 0===r?void 0:r.form,patient:a,formSessionDate:I,provider:h,location:f,visit:p,values:g,isFormExpanded:m,sessionMode:v,scrollablePages:b,setAllInitialValues:k,allInitialValues:E,setScrollablePages:w,setPagesWithErrors:_,setFieldValue:x,setSelectedPage:C,handlers:S,workspaceLayout:y,setIsLoadingFormDependencies:A,isSubmitting:!0}):null:c().createElement(Tf,{page:e,onFieldChange:ye,setSelectedPage:C,isFormExpanded:m,key:t})})))},qf=n(59428),Kf={};Kf.styleTagTransform=Zn(),Kf.setAttributes=Vn(),Kf.insert=Wn().bind(null,"head"),Kf.domAPI=Nn(),Kf.insertStyleElement=qn(),Bn()(qf.Z,Kf);const Zf=qf.Z&&qf.Z.locals?qf.Z.locals:void 0;var Yf=function(e){var t=e.patient,n=e.hideActionsOverflow;return c().createElement("div",{className:Zf.patientBannerContainer},c().createElement(gr.ExtensionSlot,{extensionSlotName:"patient-header-slot",state:{patient:t,patientUuid:t.id,hideActionsOverflow:n}}))};function Xf(e,t){e&&(console.error(e),(0,gr.showToast)({description:e.message,title:t("errorDescriptionTitle","Error"),kind:"error",critical:!0,millis:7e3}))}function Jf(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function Qf(e){var t,n,i=(t=(0,l.useState)([]),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,r,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(i=n.next()).done)&&(o.push(i.value),!t||o.length!==t);s=!0);}catch(e){a=!0,r=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw r}}return o}}(t,n)||function(e,t){if(e){if("string"==typeof e)return Jf(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Jf(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),r=i[0],o=i[1];return(0,l.useEffect)((function(){var t=[];e&&e.map((function(e){var n;null===(n=function(e){var t,n=null===(t=Rc().postSubmissionActions.find((function(t){return t.id==e})))||void 0===t?void 0:t.load;return n?n():(console.error("No loader found for PostSubmissionAction registration of id: ".concat(e)),null)}(e))||void 0===n||n.then((function(e){return t.push(e.default)}))})),o(t)}),[e]),r}function ep(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var tp={female:"F",male:"M",other:"O",unknown:"U"},np=n(53540),ip={};ip.styleTagTransform=Zn(),ip.setAttributes=Vn(),ip.insert=Wn().bind(null,"head"),ip.domAPI=Nn(),ip.insertStyleElement=qn(),Bn()(np.Z,ip);const rp=np.Z&&np.Z.locals?np.Z.locals:void 0,op=function(){return c().createElement("div",{className:rp.linearActivity},c().createElement("div",{className:rp.indeterminate}))};var sp=n(19714),ap={};ap.styleTagTransform=Zn(),ap.setAttributes=Vn(),ap.insert=Wn().bind(null,"head"),ap.domAPI=Nn(),ap.insertStyleElement=qn(),Bn()(sp.Z,ap);const lp=sp.Z&&sp.Z.locals?sp.Z.locals:void 0,cp=function(){return c().createElement("div",{className:lp.centerLoadingSVG},c().createElement(d.gbz,{description:"Active loading indicator",withOverlay:!1,small:!0}))};var up=n(39855),dp={};dp.styleTagTransform=Zn(),dp.setAttributes=Vn(),dp.insert=Wn().bind(null,"head"),dp.domAPI=Nn(),dp.insertStyleElement=qn(),Bn()(up.Z,dp);const hp=up.Z&&up.Z.locals?up.Z.locals:void 0;function fp(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function pp(e){return function(e){if(Array.isArray(e))return fp(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||gp(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function gp(e,t){if(e){if("string"==typeof e)return fp(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?fp(e,t):void 0}}const mp=function(e){var t,n,i=e.isFormSubmitting,r=e.pagesWithErrors,o=e.scrollablePages,s=e.selectedPage,a=e.mode,u=e.onCancel,h=e.handleClose,f=e.values,p=e.setValues,g=e.allowUnspecifiedAll,m=e.defaultPage,v=(t=(0,l.useState)(s),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,r,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(i=n.next()).done)&&(o.push(i.value),!t||o.length!==t);s=!0);}catch(e){a=!0,r=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw r}}return o}}(t,n)||gp(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),b=(v[0],v[1]);(0,l.useEffect)((function(){m&&pp(o).find((function(e){var t=e.label,n=e.isHidden;return t===m&&!n}))&&Lf(y(m))}),[m,o]);var y=function(e){return e.replace(/\s/g,"")},w=(0,l.useMemo)((function(){return Object.keys(f).filter((function(e){return e.endsWith("-unspecified")})).map((function(e){return e.split("-unspecified")[0]})).filter((function(e){return(0,In.xb)(f[e])})).map((function(e){return"".concat(e,"-unspecified")}))}),[f]),_=(0,l.useCallback)((function(e){e?w.forEach((function(e){f[e]=!0})):w.forEach((function(e){f[e]=!1})),p(f)}),[w]);return c().createElement("div",{className:hp.sidebar},pp(o).map((function(e,t){return!e.isHidden&&c().createElement("div",{"aria-hidden":"true",className:y(e.label)===s&&r.includes(e.label)?hp.sidebarSectionErrorActive:y(e.label)===s?hp.sidebarSectionActive:r.includes(e.label)?hp.sidebarSectionError:hp.sidebarSection,key:t,onClick:function(){return n=(t=e.label).replace(/\s/g,""),b(t),void Lf(n);var t,n}},c().createElement("div",{className:hp.sidebarSectionLink},e.label))})),"view"!==a&&c().createElement("hr",{className:hp.sideBarHorizontalLine}),c().createElement("div",{className:hp.sidenavActions},g&&"view"!==a&&c().createElement("div",{style:{marginBottom:".6rem"}},c().createElement(d.ZDl,{labelText:"",id:"auto-unspecifier",labelA:"Unspecify All",labelB:"Revert",onToggle:_})),"view"!=a&&c().createElement(d.zxk,{style:{marginBottom:"0.625rem",width:"11rem"},type:"submit",disabled:i},"Save"),c().createElement(d.zxk,{style:{width:"11rem",marginTop:"view"==a?"1.5rem":"0"},kind:"tertiary",onClick:function(){u&&u(),h&&h()}},"view"==a?"Close":"Cancel")))},vp=function(e){var t=e.onClose,n=e.onShowWarningModal,i=e.t;return c().createElement(d.lpG,{preventCloseOnClickOutside:!0,open:!0,onClose:function(){return n(!1)}},c().createElement(d.xBx,{title:i("discardChanges","Discard changes?")}),c().createElement(d.fef,null,c().createElement("p",null,i("discardWarningText","The changes you made to this form have not been saved. Are you sure you want to discard them?"))),c().createElement(d.mzw,null,c().createElement(d.zxk,{kind:"secondary",onClick:function(){return n(!1)}},i("cancel","Cancel")),c().createElement(d.zxk,{kind:"danger",onClick:t},i("confirm","Confirm"))))};var bp=n(83937),yp={};yp.styleTagTransform=Zn(),yp.setAttributes=Vn(),yp.insert=Wn().bind(null,"head"),yp.domAPI=Nn(),yp.insertStyleElement=qn(),Bn()(bp.Z,yp);const wp=bp.Z&&bp.Z.locals?bp.Z.locals:void 0;function _p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function Ap(e,t,n,i,r,o,s){try{var a=e[o](s),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(i,r)}function xp(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,r,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(i=n.next()).done)&&(o.push(i.value),!t||o.length!==t);s=!0);}catch(e){a=!0,r=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw r}}return o}}(e,t)||Cp(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Cp(e,t){if(e){if("string"==typeof e)return _p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_p(e,t):void 0}}const Sp=function(e){var t,i=e.formJson,r=e.formUUID,o=e.patientUUID,s=e.encounterUUID,a=e.visit,u=e.mode,h=e.onSubmit,f=e.onCancel,p=e.handleClose,g=e.formSessionIntent,m=e.meta,v=e.encounterUuid,b=(0,gr.useSession)(),y=(null==b||null===(t=b.currentProvider)||void 0===t?void 0:t.uuid)?b.currentProvider.uuid:null,w=!b||s||v?null:null==b?void 0:b.sessionLocation,_=function(e){var t,n,i,r,o=(0,gr.usePatient)(e),s=o.patient,a=o.isLoading,l=o.error;return s&&!a&&(s.age=(n=new Date(null==s?void 0:s.birthDate),r=(i=new Date).getFullYear()-n.getFullYear(),i.getMonth()<n.getMonth()||i.getMonth()===n.getMonth()&&i.getDate()<n.getDate()?r-1:r),s.sex=null!==(t=tp[s.gender])&&void 0!==t?t:"U"),{patient:s,isLoadingPatient:a,patientError:l}}(o),A=_.patient,x=_.isLoadingPatient,C=_.patientError,S=function(e,t,n,i){var r=Bc((0,l.useState)(null),2),o=r[0],s=r[1],a=Bc((0,l.useState)(function(e,t){return e||t?e&&t?new Error("InvalidArgumentsErr: Both formUuid and formJson cannot be provided at the same time."):void 0:new Error("InvalidArgumentsErr: Neither formUuid nor formJson was provided")}(e,t)),2),c=a[0],u=a[1];return(0,l.useEffect)((function(){Hc(e,t,i).then((function(e){s(Pc(jc({},e),{encounter:n}))})).catch((function(e){console.error(e),u(new Error("Error loading form JSON: "+e.message))}))}),[i,e,t,n]),{formJson:o,isLoading:!o,formError:c}}(r,i,s||v,g),E=S.formJson,k=S.isLoading,$=S.formError,M=(0,tr.useTranslation)().t,T=(0,l.useMemo)((function(){return new Date}),[]),R=new Map,L=(0,l.useRef)(null),O=function(e){var t,n,i=(t=(0,l.useState)("minimized"),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,r,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(i=n.next()).done)&&(o.push(i.value),!t||o.length!==t);s=!0);}catch(e){a=!0,r=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw r}}return o}}(t,n)||function(e,t){if(e){if("string"==typeof e)return ep(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ep(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),r=i[0],o=i[1];return(0,l.useLayoutEffect)((function(){var t,n=function(){var t,n,i=null===(t=e.current)||void 0===t||null===(n=t.parentElement)||void 0===n?void 0:n.offsetWidth;i&&o(i>1023?"maximized":"minimized")};n();var i=new ResizeObserver((function(e){n()}));return i.observe(null===(t=e.current)||void 0===t?void 0:t.parentElement),function(){i.disconnect()}}),[e]),r}(L),F=xp((0,l.useState)({}),2),D=F[0],I=F[1],j=xp((0,l.useState)(new Set),2),P=j[0],B=j[1],U=xp((0,l.useState)(""),2),N=U[0],H=U[1],W=xp((0,l.useState)(void 0),2),z=W[0],V=W[1],G=xp((0,l.useState)(!0),2),q=G[0],K=G[1],Z=xp((0,l.useState)(!1),2),Y=Z[0],X=Z[1],J=xp((0,l.useState)([]),2),Q=J[0],ee=J[1],te=xp((0,l.useState)(!1),2),ne=te[0],ie=te[1],re=xp((0,l.useState)(!1),2),oe=re[0],se=re[1],ae=Qf(null==E?void 0:E.postSubmissionActions),le=u||(s||v?"edit":"enter"),ce=(0,l.useMemo)((function(){return"minimized"!==O&&P.size>0}),[O,P.size]);(0,l.useEffect)((function(){var e={name:"ohri-form-header-toggle-ext",moduleName:(null==m?void 0:m.moduleName)||"@openmrs/esm-ohri-app",slot:Ci.rX,load:(0,gr.getAsyncLifecycle)((function(){return n.e(256).then(n.bind(n,92256))}),{featureName:"ohri-form-header-toggle",moduleName:(null==m?void 0:m.moduleName)||"@openmrs/esm-ohri-app"}),meta:{handleCollapse:function(e){V(e)}}};return(0,gr.registerExtension)(e),(0,gr.attach)(Ci.rX,e.name),function(){(0,gr.detach)(Ci.rX,e.name)}}),[null==m?void 0:m.moduleName]),(0,l.useEffect)((function(){return function(){ko=[]}}),[]),(0,l.useEffect)((function(){Xf($,M)}),[$,M]),(0,l.useEffect)((function(){Xf(C,M)}),[C,M]);var ue=function(e){var t,n,i,r=!0;if(R.forEach((function(t){var n;(null==t||null===(n=t.validate)||void 0===n?void 0:n.call(t,e))||(r=!1)})),r){X(!0);var o=(i=R,function(e){if(Array.isArray(e))return _p(e)}(i)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(i)||Cp(i)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).map((function(t){var n,i=xp(t,2),r=(i[0],i[1]);return null==r||null===(n=r.submit)||void 0===n?void 0:n.call(r,e)}));Promise.all(o).then((t=function(e){return function(e,t){var n,i,r,o,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,i&&(r=2&o[0]?i.return:o[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,i=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((r=(r=s.trys).length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){s.label=o[1];break}if(6===o[0]&&s.label<r[1]){s.label=r[1],r=o;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(o);break}r[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],i=0}finally{n=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}}(this,(function(t){switch(t.label){case 0:return"edit"===u?(0,gr.showToast)({description:M("updatedRecordDescription","The patient encounter was updated"),title:M("updatedRecord","Record updated"),kind:"success",critical:!0}):(0,gr.showToast)({description:M("createdRecordDescription","A new encounter was created"),title:M("createdRecord","Record created"),kind:"success",critical:!0}),ae?[4,Promise.all(ae.map((function(t){t.applyAction({patient:A,sessionMode:le,encounters:e.map((function(e){return e.data}))})})))]:[3,2];case 1:t.sent(),t.label=2;case 2:return null==h||h(),[2]}}))},n=function(){var e=this,n=arguments;return new Promise((function(i,r){var o=t.apply(e,n);function s(e){Ap(o,i,r,s,a,"next",e)}function a(e){Ap(o,i,r,s,a,"throw",e)}s(void 0)}))},function(e){return n.apply(this,arguments)})).catch((function(e){var t,n,i,r,o,s,a,l=(a=null==(t=e)||null===(n=t.responseBody)||void 0===n||null===(i=n.error)||void 0===i?void 0:i.fieldErrors)?Object.values(a).flatMap((function(e){return e.map((function(e){return e.message}))})):[null!==(s=null==t||null===(r=t.responseBody)||void 0===r||null===(o=r.error)||void 0===o?void 0:o.message)&&void 0!==s?s:null==t?void 0:t.message];(0,gr.showToast)({description:M("errorDescription",l.join(", ")),title:M("errorDescriptionTitle","Error on saving form"),kind:"error",critical:!0})})).finally((function(){X(!1)}))}};return c().createElement(En,{enableReinitialize:!0,initialValues:D,validationSchema:rf({}),onSubmit:function(e,t){var n=t.setSubmitting;ue(e),n(!1)}},(function(e){return ie(e.dirty),c().createElement(Ln,{className:"cds--form no-padding ".concat(wp.ohriForm),ref:L},x||k?c().createElement(cp,null):c().createElement("div",{className:wp.ohriFormContainer},oe?c().createElement(vp,{onClose:p,onShowWarningModal:se,t:M}):null,q&&c().createElement("div",{className:wp.loader},c().createElement(op,null)),c().createElement("div",{className:wp.ohriFormBody},ce&&c().createElement(mp,{isFormSubmitting:Y,pagesWithErrors:Q,scrollablePages:P,selectedPage:N,mode:u,onCancel:f,handleClose:p,values:e.values,setValues:e.setValues,allowUnspecifiedAll:i.allowUnspecifiedAll,defaultPage:i.defaultPage}),c().createElement("div",{className:wp.formContent},"minimized"!=O&&(null==A?void 0:A.id)&&c().createElement(Yf,{patient:A,hideActionsOverflow:!0}),E.markdown&&c().createElement("div",{className:wp.markdownContainer},c().createElement(yc,{children:E.markdown.join("\n")})),c().createElement("div",{className:"".concat(wp.formContentBody,"\n ").concat("minimized"===O?"".concat(wp.minifiedFormContentBody):"","\n ")},c().createElement(Gf,{formJson:E,patient:A,formSessionDate:T,provider:y,location:w,visit:a,values:e.values,isFormExpanded:z,sessionMode:le,scrollablePages:P,setAllInitialValues:I,allInitialValues:D,setScrollablePages:B,setPagesWithErrors:ee,setIsLoadingFormDependencies:K,setFieldValue:e.setFieldValue,setSelectedPage:H,handlers:R,workspaceLayout:O,isSubmitting:Y})),"minimized"===O&&c().createElement(d.uVA,{className:wp.minifiedButtons},c().createElement(d.zxk,{kind:"secondary",onClick:function(){ne?se(!0):(f&&f(),p&&p())}},"view"===u?"Close":"Cancel"),c().createElement(d.zxk,{type:"submit",disabled:"view"===u||Y},Y?c().createElement(d.lSo,{description:M("submitting","Submitting")+"..."}):c().createElement("span",null,M("save","Save"))))))))}))}},4354:(e,t,n)=>{"use strict";function i(e){return"boolean"==typeof e?e:"string"==typeof e?"true"==e:!!e}function r(e){return/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(e)}n.d(t,{K:()=>r,o:()=>i})},57820:(e,t,n)=>{"use strict";n.d(t,{L:()=>d,Y:()=>h});var i=n(27484),r=n.n(i),o=n(1646),s=n.n(o),a=n(25186),l=n(11261);function c(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}r().extend(s());var d=function(){function e(t,n,i,o,s){var c=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),u(this,"node",null),u(this,"patient",null),u(this,"allFields",[]),u(this,"allFieldValues",{}),u(this,"allFieldsKeys",[]),u(this,"api",l),u(this,"isEmpty",a.xb),u(this,"includes",(function(e,t){return null==e?void 0:e.includes(t)})),u(this,"isDateBefore",(function(e,t,n){var i=t;return"string"==typeof t&&(i=n?r()(t,n,!0).toDate():r()(t,"YYYY-MM-DD",!0).toDate()),(null==e?void 0:e.getTime())<i.getTime()})),u(this,"isDateAfter",(function(e,t,n,i){var o=new Date(0);switch(e=r()(e,"YYYY-MM-DD",!0).toDate(),t=r()(t,"YYYY-MM-DD",!0).toDate(),i){case"months":o=new Date(t.setMonth(t.getMonth()+n));break;case"weeks":o=c.addWeeksToDate(t,n);break;case"days":o=c.addDaysToDate(t,n);break;case"years":o=new Date(t.setFullYear(t.getFullYear()+n))}return e.getTime()>o.getTime()})),u(this,"addWeeksToDate",(function(e,t){return e.setDate(e.getDate()+7*t),e})),u(this,"addDaysToDate",(function(e,t){return e.setDate(e.getDate()+t),e})),u(this,"useFieldValue",(function(e){return c.allFieldsKeys.includes(e)?c.allFieldValues[e]:null})),u(this,"calcBMI",(function(e,t){var n;return e&&t&&(n=(t/(e/100*e/100)).toFixed(1)),e&&t?parseFloat(n):null})),u(this,"calcEDD",(function(e){var t={};return e&&(t=new Date(e.getTime()+24192e6)),e?t:null})),u(this,"calcMonthsOnART",(function(e){var t,n,i=new Date,r=Math.round((i.getTime()-(null===(t=e.getTime)||void 0===t?void 0:t.call(e)))/864e5);return e&&r>=30&&(n=Math.floor(r/30)),e?n:null})),u(this,"calcViralLoadStatus",(function(e){var t;return e&&(t=e>50?"a6768be6-c08e-464d-8f53-5f4229508e54":"5d5e42cc-acc4-4069-b3a8-7163e0db5d96"),e?t:null})),u(this,"calcNextVisitDate",(function(e,t){var n={};return e&&t&&(n=new Date(e.getTime()+24*t*60*60*1e3)),e&&t?n:null})),u(this,"calcTreatmentEndDate",(function(e,t,n){var i={},r=30+t;return e&&t&&"160429AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"==n&&(i=new Date(e.getTime()+24*r*60*60*1e3)),e&&t&&"160429AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"==n?i:null})),u(this,"calcAgeBasedOnDate",(function(e){return(e?new Date(e).getFullYear():(new Date).getFullYear())-new Date(c.patient.birthDate).getFullYear()})),u(this,"calcBSA",(function(e,t){var n;return e&&t&&(n=Math.sqrt(e*t/3600).toFixed(2)),e&&t?parseFloat(n):null})),u(this,"arrayContains",(function(e,t){if(Array.isArray(t)){if(0===t.length)return!0;for(var n=!0,i=0;i<t.length;i++){var r=t[i];-1===e.indexOf(r)&&(n=!1)}return n}return-1!==e.indexOf(t)})),u(this,"arrayContainsAny",(function(e,t){if(Array.isArray(t)){if(0===t.length)return!0;for(var n=!1,i=0;i<t.length;i++){var r=t[i];-1!==e.indexOf(r)&&(n=!0)}return n}return-1!==e.indexOf(t)})),u(this,"formatDate",(function(e,t,n){if(t=t||"yyyy-MM-dd",n=n||"+0300",i=e,!(null!=(r=Date)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](i):i instanceof r)&&null==(e=new Date(e)))throw new Error("DateFormatException: value passed is not a valid date");var i,r;return e})),u(this,"extractRepeatingGroupValues",(function(e,t){return t.map((function(t){return t[e]}))})),u(this,"calcTimeDifference",(function(e,t){var n,i=r()();return e&&("d"==t&&(n=Math.abs(Math.round(i.diff(e,"day",!0)))),"w"==t&&(n=Math.abs(Math.round(i.diff(e,"week",!0)))),"m"==t&&(n=Math.abs(Math.round(i.diff(e,"month",!0)))),"y"==t&&(n=Math.abs(Math.round(i.diff(e,"year",!0))))),""==n?"0":n})),this.allFields=i,this.allFieldValues=o,this.allFieldsKeys=s,this.node=t,this.patient=n}var t,n;return t=e,(n=[{key:"today",value:function(){return new Date}},{key:"calcGravida",value:function(e,t){var n=0;return e===parseInt(e)&&(n=e+1),t===parseInt(t)&&(n=t+1),t===parseInt(t)&&parseInt(e),n}}])&&c(t.prototype,n),e}();function h(e,t){if(e&&t)switch(e.type){case"page":t.pageDependants||(t.pageDependants=new Set),t.pageDependants.add(e.value.label);break;case"section":t.sectionDependants||(t.sectionDependants=new Set),t.sectionDependants.add(e.value.label);break;default:t.fieldDependants||(t.fieldDependants=new Set),t.fieldDependants.add(e.value.id)}}},75260:(e,t,n)=>{"use strict";n.d(t,{BJ:()=>o,QP:()=>u,un:()=>s});var i=n(53343),r=n(57820);function o(e){for(var t=[],n="",i=!1,r=0,o=0;o<e.length;o++){var s=e.charAt(o);"'"!==s&&'"'!==s||(i?i=!1:0===r&&(i=!0)),i?n+=s:("("===s?r++:")"===s&&r--,0!==r||" "!==s&&"\t"!==s&&"\n"!==s?n+=s:n.length>0&&(t.push(n),n=""))}return n.length>0&&t.push(n),t}function s(e,t,n){var i=[];return n.forEach((function(n){if(l(n)){var r=n;a(n).forEach((function(n){var i=d(n,e);i&&(r=c(i,t[i.id],r))})),i.push(r)}else{var o=d(n,e);o?i.push(c(o,t[o.id],n)):i.push(n)}})),i.join(" ")}function a(e){for(var t,n=[],i=/(?:\w+|'(?:\\'|[^'\n])*')(?=[,\)]|\s*(?=\)))/g;t=i.exec(e);)n.push(t[0].replace(/\\'/g,"'").replace(/(^'|'$)/g,""));return n}function l(e){return/[()]/.test(e)}function c(e,t,n){return n.includes("useFieldValue('".concat(e.id,"')"))?n:(n=n.replace(new RegExp("['\"]".concat(e.id,"['\"]"),"g"),e.id),"toggle"==e.questionOptions.rendering&&"boolean"==typeof t?n.replace(e.id,"".concat("'".concat(t?i.ks:i.Mf,"'"))):n.replace(e.id,"fieldValues.".concat(e.id)))}function u(e,t,n){t.forEach((function(t){l(t)?a(t).forEach((function(t){(0,r.Y)(e,d(t,n))})):(0,r.Y)(e,d(t,n))}))}function d(e,t){return/^'+|'+$/.test(e)&&(e=e.replace(/^'|'$/g,"")),t.find((function(t){return t.id===e}))}},92962:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{j3:()=>evaluateExpression,oC:()=>evaluateAsyncExpression});var _common_expression_helpers__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(57820),_expression_parser__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(75260);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function _array_with_holes(e){if(Array.isArray(e))return e}function asyncGeneratorStep(e,t,n,i,r,o,s){try{var a=e[o](s),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(i,r)}function _async_to_generator(e){return function(){var t=this,n=arguments;return new Promise((function(i,r){var o=e.apply(t,n);function s(e){asyncGeneratorStep(o,i,r,s,a,"next",e)}function a(e){asyncGeneratorStep(o,i,r,s,a,"throw",e)}s(void 0)}))}}function _iterable_to_array_limit(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,r,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(i=n.next()).done)&&(o.push(i.value),!t||o.length!==t);s=!0);}catch(e){a=!0,r=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw r}}return o}}function _non_iterable_rest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_array_like_to_array(e,t):void 0}}function _ts_generator(e,t){var n,i,r,o,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,i&&(r=2&o[0]?i.return:o[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,i=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((r=(r=s.trys).length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){s.label=o[1];break}if(6===o[0]&&s.label<r[1]){s.label=r[1],r=o;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(o);break}r[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],i=0}finally{n=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}}function evaluateExpression(expression,node,fields,fieldValues,context){if(!(null==expression?void 0:expression.trim()))return null;var allFieldsKeys=fields.map((function(e){return e.id})),parts=(0,_expression_parser__WEBPACK_IMPORTED_MODULE_1__.BJ)(expression.trim());(0,_expression_parser__WEBPACK_IMPORTED_MODULE_1__.QP)(node,parts,fields);var mode=context.mode,myValue=context.myValue,patient=context.patient,_ref=patient&&"sex"in patient&&"age"in patient?patient:{sex:void 0,age:void 0},sex=_ref.sex,age=_ref.age;"field"===node.type&&void 0===myValue&&(myValue=fieldValues[node.value.id]);var _ref1=new _common_expression_helpers__WEBPACK_IMPORTED_MODULE_0__.L(node,patient,fields,fieldValues,allFieldsKeys),isEmpty=_ref1.isEmpty,today=_ref1.today,includes=_ref1.includes,isDateBefore=_ref1.isDateBefore,isDateAfter=_ref1.isDateAfter,addWeeksToDate=_ref1.addWeeksToDate,addDaysToDate=_ref1.addDaysToDate,useFieldValue=_ref1.useFieldValue,calcBMI=_ref1.calcBMI,calcEDD=_ref1.calcEDD,calcMonthsOnART=_ref1.calcMonthsOnART,calcViralLoadStatus=_ref1.calcViralLoadStatus,calcNextVisitDate=_ref1.calcNextVisitDate,calcTreatmentEndDate=_ref1.calcTreatmentEndDate,calcAgeBasedOnDate=_ref1.calcAgeBasedOnDate,calcBSA=_ref1.calcBSA,arrayContains=_ref1.arrayContains,arrayContainsAny=_ref1.arrayContainsAny,formatDate=_ref1.formatDate,extractRepeatingGroupValues=_ref1.extractRepeatingGroupValues,calcGravida=_ref1.calcGravida,calcTimeDifference=_ref1.calcTimeDifference;expression=(0,_expression_parser__WEBPACK_IMPORTED_MODULE_1__.un)(fields,fieldValues,parts);try{return eval(expression)}catch(e){console.error("Error: ".concat(e," \n\n failing expression: ").concat(expression))}return null}function evaluateAsyncExpression(e,t,n,i,r){return _evaluateAsyncExpression.apply(this,arguments)}function _evaluateAsyncExpression(){return _evaluateAsyncExpression=_async_to_generator((function(expression1,node1,fields1,fieldValues1,context1){var allFieldsKeys,parts,mode,myValue,patient,_ref,sex,age,_ref1,api,isEmpty,today,includes,isDateBefore,isDateAfter,addWeeksToDate,addDaysToDate,useFieldValue,calcBMI,calcEDD,calcMonthsOnART,calcViralLoadStatus,calcNextVisitDate,calcTreatmentEndDate,calcAgeBasedOnDate,calcBSA,arrayContains,arrayContainsAny,formatDate,extractRepeatingGroupValues,calcGravida,calcTimeDifference,lazyFragments,temporaryObjectsMap,fragments;return _ts_generator(this,(function(_state){switch(_state.label){case 0:return(null==expression1?void 0:expression1.trim())?(allFieldsKeys=fields1.map((function(e){return e.id})),parts=(0,_expression_parser__WEBPACK_IMPORTED_MODULE_1__.BJ)(expression1.trim()),(0,_expression_parser__WEBPACK_IMPORTED_MODULE_1__.QP)(node1,parts,fields1),mode=context1.mode,myValue=context1.myValue,patient=context1.patient,_ref=patient&&"sex"in patient&&"age"in patient?patient:{sex:void 0,age:void 0},sex=_ref.sex,age=_ref.age,"field"===node1.type&&void 0===myValue&&(myValue=fieldValues1[node1.value.id]),_ref1=new _common_expression_helpers__WEBPACK_IMPORTED_MODULE_0__.L(node1,patient,fields1,fieldValues1,allFieldsKeys),api=_ref1.api,isEmpty=_ref1.isEmpty,today=_ref1.today,includes=_ref1.includes,isDateBefore=_ref1.isDateBefore,isDateAfter=_ref1.isDateAfter,addWeeksToDate=_ref1.addWeeksToDate,addDaysToDate=_ref1.addDaysToDate,useFieldValue=_ref1.useFieldValue,calcBMI=_ref1.calcBMI,calcEDD=_ref1.calcEDD,calcMonthsOnART=_ref1.calcMonthsOnART,calcViralLoadStatus=_ref1.calcViralLoadStatus,calcNextVisitDate=_ref1.calcNextVisitDate,calcTreatmentEndDate=_ref1.calcTreatmentEndDate,calcAgeBasedOnDate=_ref1.calcAgeBasedOnDate,calcBSA=_ref1.calcBSA,arrayContains=_ref1.arrayContains,arrayContainsAny=_ref1.arrayContainsAny,formatDate=_ref1.formatDate,extractRepeatingGroupValues=_ref1.extractRepeatingGroupValues,calcGravida=_ref1.calcGravida,calcTimeDifference=_ref1.calcTimeDifference,expression1=(0,_expression_parser__WEBPACK_IMPORTED_MODULE_1__.un)(fields1,fieldValues1,parts),parts=(0,_expression_parser__WEBPACK_IMPORTED_MODULE_1__.BJ)(expression1),lazyFragments=[],parts.forEach((function(e,t){if(t%2==0&&e.startsWith("resolve(")){var n=_sliced_to_array(checkReferenceToResolvedFragment(e),1)[0];lazyFragments.push({expression:n,index:t})}})),temporaryObjectsMap={},[4,Promise.all(lazyFragments.map((function(param){var _$expression=param.expression;return eval(_$expression)})))]):[2,null];case 1:fragments=_state.sent(),lazyFragments.forEach((function(e,t){if("object"==typeof fragments[t]){var n="obj_".concat(t);temporaryObjectsMap[n]=fragments[t],expression1=expression1.replace(e.expression,"temporaryObjectsMap.".concat(n))}else expression1=expression1.replace(e.expression,"string"==typeof fragments[t]?"'".concat(fragments[t],"'"):fragments[t])}));try{return[2,eval(expression1)]}catch(e){console.error("Error: ".concat(e," \n\n failing expression: ").concat(expression1))}return[2,null]}}))})),_evaluateAsyncExpression.apply(this,arguments)}function resolve(e){return Promise.resolve(e)}function checkReferenceToResolvedFragment(e){var t=e.match(/resolve\((.*)\)/)||[],n=t.length?e.substring(e.indexOf(t[0])+t[0].length):"";return[t[0]||"",n]}},25186:(e,t,n)=>{"use strict";n.d(t,{Ls:()=>s,Tv:()=>r,xb:()=>a});var i=n(4354),r="field.required",o="field.outOfBound",s={validate:function(e,t){var n,s;if(null===(n=e.submission)||void 0===n?void 0:n.unspecified)return[];if(((0,i.o)(e.required)||(0,i.o)(e.unspecified))&&a(t))return l(r,"Field is mandatory");if("text"===e.questionOptions.rendering)return null!==(s=function(e,t,n){var i=Number(e),r=Number(t);if("number"==typeof n&&!Number.isNaN(n)){if(i&&r&&n>=i&&n<=r)return[];if(i&&n<i)return l(o,"Length should be at least ".concat(i," characters"));if(r&&n>r)return l(o,"Length should not exceed ".concat(r," characters"));if(r&&i&&n<i&&n>r)return l(o,"Length should be between ".concat(i," and ").concat(r," characters"))}}(e.questionOptions.minLength,e.questionOptions.maxLength,t.length))&&void 0!==s?s:[];if("number"===e.questionOptions.rendering){var c=Number(e.questionOptions.min),u=Number(e.questionOptions.max);return a(t)||Number.isNaN(c)&&Number.isNaN(u)?[]:function(e,t,n){return!Number.isNaN(e)&&n<e?[{resultType:"error",errCode:o,message:"Value must be greater than ".concat(e)}]:!Number.isNaN(t)&&n>t?[{resultType:"error",errCode:o,message:"Value must be lower than ".concat(t)}]:[]}(c,u,t)}return[]}};function a(e){return null==e||""===e||"string"==typeof e&&!(null==e?void 0:e.trim())||!(!Array.isArray(e)||e.length)}function l(e,t){return[{resultType:"error",errCode:e,message:t}]}},76891:e=>{"use strict";function t(e){return Array.prototype.slice.apply(e)}var n="pending",i="resolved",r="rejected";function o(e){this.status=n,this._continuations=[],this._parent=null,this._paused=!1,e&&e.call(this,this._continueWith.bind(this),this._failWith.bind(this))}function s(e){return e&&"function"==typeof e.then}function a(e){return e}function l(e){return"undefined"!=typeof window&&"AggregateError"in window?new window.AggregateError(e):{errors:e}}if(o.prototype={then:function(e,t){var n=o.unresolved()._setParent(this);if(this._isRejected()){if(this._paused)return this._continuations.push({promise:n,nextFn:e,catchFn:t}),n;if(t)try{var i=t(this._error);return s(i)?(this._chainPromiseData(i,n),n):o.resolve(i)._setParent(this)}catch(e){return o.reject(e)._setParent(this)}return o.reject(this._error)._setParent(this)}return this._continuations.push({promise:n,nextFn:e,catchFn:t}),this._runResolutions(),n},catch:function(e){if(this._isResolved())return o.resolve(this._data)._setParent(this);var t=o.unresolved()._setParent(this);return this._continuations.push({promise:t,catchFn:e}),this._runRejections(),t},finally:function(e){var t=!1;function n(n,i){if(!t){t=!0,e||(e=a);var r=e(n);return s(r)?r.then((function(){if(i)throw i;return n})):n}}return this.then((function(e){return n(e)})).catch((function(e){return n(null,e)}))},pause:function(){return this._paused=!0,this},resume:function(){var e=this._findFirstPaused();return e&&(e._paused=!1,e._runResolutions(),e._runRejections()),this},_findAncestry:function(){return this._continuations.reduce((function(e,t){if(t.promise){var n={promise:t.promise,children:t.promise._findAncestry()};e.push(n)}return e}),[])},_setParent:function(e){if(this._parent)throw new Error("parent already set");return this._parent=e,this},_continueWith:function(e){var t=this._findFirstPending();t&&(t._data=e,t._setResolved())},_findFirstPending:function(){return this._findFirstAncestor((function(e){return e._isPending&&e._isPending()}))},_findFirstPaused:function(){return this._findFirstAncestor((function(e){return e._paused}))},_findFirstAncestor:function(e){for(var t,n=this;n;)e(n)&&(t=n),n=n._parent;return t},_failWith:function(e){var t=this._findFirstPending();t&&(t._error=e,t._setRejected())},_takeContinuations:function(){return this._continuations.splice(0,this._continuations.length)},_runRejections:function(){if(!this._paused&&this._isRejected()){var e=this._error,t=this._takeContinuations(),n=this;t.forEach((function(t){if(t.catchFn)try{var i=t.catchFn(e);n._handleUserFunctionResult(i,t.promise)}catch(e){t.promise.reject(e)}else t.promise.reject(e)}))}},_runResolutions:function(){if(!this._paused&&this._isResolved()&&!this._isPending()){var e=this._takeContinuations();if(s(this._data))return this._handleWhenResolvedDataIsPromise(this._data);var t=this._data,n=this;e.forEach((function(e){if(e.nextFn)try{var i=e.nextFn(t);n._handleUserFunctionResult(i,e.promise)}catch(t){n._handleResolutionError(t,e)}else e.promise&&e.promise.resolve(t)}))}},_handleResolutionError:function(e,t){if(this._setRejected(),t.catchFn)try{return void t.catchFn(e)}catch(t){e=t}t.promise&&t.promise.reject(e)},_handleWhenResolvedDataIsPromise:function(e){var t=this;return e.then((function(e){t._data=e,t._runResolutions()})).catch((function(e){t._error=e,t._setRejected(),t._runRejections()}))},_handleUserFunctionResult:function(e,t){s(e)?this._chainPromiseData(e,t):t.resolve(e)},_chainPromiseData:function(e,t){e.then((function(e){t.resolve(e)})).catch((function(e){t.reject(e)}))},_setResolved:function(){this.status=i,this._paused||this._runResolutions()},_setRejected:function(){this.status=r,this._paused||this._runRejections()},_isPending:function(){return this.status===n},_isResolved:function(){return this.status===i},_isRejected:function(){return this.status===r}},o.resolve=function(e){return new o((function(t,n){s(e)?e.then((function(e){t(e)})).catch((function(e){n(e)})):t(e)}))},o.reject=function(e){return new o((function(t,n){n(e)}))},o.unresolved=function(){return new o((function(e,t){this.resolve=e,this.reject=t}))},o.all=function(){var e=t(arguments);return Array.isArray(e[0])&&(e=e[0]),e.length?new o((function(t,n){var i=[],r=0,s=!1;e.forEach((function(a,l){o.resolve(a).then((function(n){i[l]=n,(r+=1)===e.length&&t(i)})).catch((function(e){!function(e){s||(s=!0,n(e))}(e)}))}))})):o.resolve([])},o.any=function(){var e=t(arguments);return Array.isArray(e[0])&&(e=e[0]),e.length?new o((function(t,n){var i=[],r=0,s=!1;e.forEach((function(a,c){o.resolve(a).then((function(e){s||(s=!0,t(e))})).catch((function(t){i[c]=t,(r+=1)===e.length&&n(l(i))}))}))})):o.reject(l([]))},o.allSettled=function(){var e=t(arguments);return Array.isArray(e[0])&&(e=e[0]),e.length?new o((function(t){var n=[],i=0,r=function(){(i+=1)===e.length&&t(n)};e.forEach((function(e,t){o.resolve(e).then((function(e){n[t]={status:"fulfilled",value:e},r()})).catch((function(e){n[t]={status:"rejected",reason:e},r()}))}))})):o.resolve([])},Promise===o)throw new Error("Please use SynchronousPromise.installGlobally() to install globally");var c=Promise;o.installGlobally=function(e){if(Promise===o)return e;var n=function(e){if(void 0===e||e.__patched)return e;var n=e;return e=function(){n.apply(this,t(arguments))},e.__patched=!0,e}(e);return Promise=o,n},o.uninstallGlobally=function(){Promise===o&&(Promise=c)},e.exports={SynchronousPromise:o}},94633:e=>{function t(e,t){var n=e.length,i=new Array(n),r={},o=n,s=function(e){for(var t=new Map,n=0,i=e.length;n<i;n++){var r=e[n];t.has(r[0])||t.set(r[0],new Set),t.has(r[1])||t.set(r[1],new Set),t.get(r[0]).add(r[1])}return t}(t),a=function(e){for(var t=new Map,n=0,i=e.length;n<i;n++)t.set(e[n],n);return t}(e);for(t.forEach((function(e){if(!a.has(e[0])||!a.has(e[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")}));o--;)r[o]||l(e[o],o,new Set);return i;function l(e,t,o){if(o.has(e)){var c;try{c=", node was:"+JSON.stringify(e)}catch(e){c=""}throw new Error("Cyclic dependency"+c)}if(!a.has(e))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(e));if(!r[t]){r[t]=!0;var u=s.get(e)||new Set;if(t=(u=Array.from(u)).length){o.add(e);do{var d=u[--t];l(d,a.get(d),o)}while(t);o.delete(e)}i[--n]=e}}}e.exports=function(e){return t(function(e){for(var t=new Set,n=0,i=e.length;n<i;n++){var r=e[n];t.add(r[0]),t.add(r[1])}return Array.from(t)}(e),e)},e.exports.array=t},53250:(e,t,n)=>{"use strict";var i=n(81672),r="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=i.useState,s=i.useEffect,a=i.useLayoutEffect,l=i.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch(e){return!0}}var u="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),i=o({inst:{value:n,getSnapshot:t}}),r=i[0].inst,u=i[1];return a((function(){r.value=n,r.getSnapshot=t,c(r)&&u({inst:r})}),[e,n,t]),s((function(){return c(r)&&u({inst:r}),e((function(){c(r)&&u({inst:r})}))}),[e]),l(n),n};t.useSyncExternalStore=void 0!==i.useSyncExternalStore?i.useSyncExternalStore:u},61688:(e,t,n)=>{"use strict";e.exports=n(53250)},49602:e=>{"use strict";e.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}},34411:(e,t,n)=>{"use strict";function i(e){var t=this;if(t instanceof i||(t=new i),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var n=0,r=arguments.length;n<r;n++)t.push(arguments[n]);return t}function r(e,t,n){var i=t===e.head?new a(n,null,t,e):new a(n,t,t.next,e);return null===i.next&&(e.tail=i),null===i.prev&&(e.head=i),e.length++,i}function o(e,t){e.tail=new a(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function s(e,t){e.head=new a(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function a(e,t,n,i){if(!(this instanceof a))return new a(e,t,n,i);this.list=i,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,n?(n.prev=this,this.next=n):this.next=null}e.exports=i,i.Node=a,i.create=i,i.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,n=e.prev;return t&&(t.prev=n),n&&(n.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=n),e.list.length--,e.next=null,e.prev=null,e.list=null,t},i.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},i.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},i.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)o(this,arguments[e]);return this.length},i.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)s(this,arguments[e]);return this.length},i.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}},i.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}},i.prototype.forEach=function(e,t){t=t||this;for(var n=this.head,i=0;null!==n;i++)e.call(t,n.value,i,this),n=n.next},i.prototype.forEachReverse=function(e,t){t=t||this;for(var n=this.tail,i=this.length-1;null!==n;i--)e.call(t,n.value,i,this),n=n.prev},i.prototype.get=function(e){for(var t=0,n=this.head;null!==n&&t<e;t++)n=n.next;if(t===e&&null!==n)return n.value},i.prototype.getReverse=function(e){for(var t=0,n=this.tail;null!==n&&t<e;t++)n=n.prev;if(t===e&&null!==n)return n.value},i.prototype.map=function(e,t){t=t||this;for(var n=new i,r=this.head;null!==r;)n.push(e.call(t,r.value,this)),r=r.next;return n},i.prototype.mapReverse=function(e,t){t=t||this;for(var n=new i,r=this.tail;null!==r;)n.push(e.call(t,r.value,this)),r=r.prev;return n},i.prototype.reduce=function(e,t){var n,i=this.head;if(arguments.length>1)n=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");i=this.head.next,n=this.head.value}for(var r=0;null!==i;r++)n=e(n,i.value,r),i=i.next;return n},i.prototype.reduceReverse=function(e,t){var n,i=this.tail;if(arguments.length>1)n=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");i=this.tail.prev,n=this.tail.value}for(var r=this.length-1;null!==i;r--)n=e(n,i.value,r),i=i.prev;return n},i.prototype.toArray=function(){for(var e=new Array(this.length),t=0,n=this.head;null!==n;t++)e[t]=n.value,n=n.next;return e},i.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,n=this.tail;null!==n;t++)e[t]=n.value,n=n.prev;return e},i.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var n=new i;if(t<e||t<0)return n;e<0&&(e=0),t>this.length&&(t=this.length);for(var r=0,o=this.head;null!==o&&r<e;r++)o=o.next;for(;null!==o&&r<t;r++,o=o.next)n.push(o.value);return n},i.prototype.sliceReverse=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var n=new i;if(t<e||t<0)return n;e<0&&(e=0),t>this.length&&(t=this.length);for(var r=this.length,o=this.tail;null!==o&&r>t;r--)o=o.prev;for(;null!==o&&r>e;r--,o=o.prev)n.push(o.value);return n},i.prototype.splice=function(e,t,...n){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var i=0,o=this.head;null!==o&&i<e;i++)o=o.next;var s=[];for(i=0;o&&i<t;i++)s.push(o.value),o=this.removeNode(o);for(null===o&&(o=this.tail),o!==this.head&&o!==this.tail&&(o=o.prev),i=0;i<n.length;i++)o=r(this,o,n[i]);return s},i.prototype.reverse=function(){for(var e=this.head,t=this.tail,n=e;null!==n;n=n.prev){var i=n.prev;n.prev=n.next,n.next=i}return this.head=t,this.tail=e,this};try{n(49602)(i)}catch(e){}},43144:(e,t,n)=>{"use strict";function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function r(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}n.d(t,{Z:()=>r})},17685:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});const i=n(66092).Z.Symbol},58694:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});const i=function(e,t){for(var n=-1,i=t.length,r=e.length;++n<i;)e[r+n]=t[n];return e}},93589:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var i=n(17685),r=Object.prototype,o=r.hasOwnProperty,s=r.toString,a=i.Z?i.Z.toStringTag:void 0;var l=Object.prototype.toString;var c=i.Z?i.Z.toStringTag:void 0;const u=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":c&&c in Object(e)?function(e){var t=o.call(e,a),n=e[a];try{e[a]=void 0;var i=!0}catch(e){}var r=s.call(e);return i&&(t?e[a]=n:delete e[a]),r}(e):function(e){return l.call(e)}(e)}},13413:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});const i="object"==typeof global&&global&&global.Object===Object&&global},66092:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var i=n(13413),r="object"==typeof self&&self&&self.Object===Object&&self;const o=i.Z||r||Function("return this")()},8891:(e,t,n)=>{"use strict";n.d(t,{Z:()=>v});var i=n(77226),r=n(66092);const o=function(){return r.Z.Date.now()};var s=/\s/;var a=/^\s+/;const l=function(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&s.test(e.charAt(t)););return t}(e)+1).replace(a,""):e};var c=n(72714),u=/^[-+]0x[0-9a-f]+$/i,d=/^0b[01]+$/i,h=/^0o[0-7]+$/i,f=parseInt;const p=function(e){if("number"==typeof e)return e;if((0,c.Z)(e))return NaN;if((0,i.Z)(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=(0,i.Z)(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=l(e);var n=d.test(e);return n||h.test(e)?f(e.slice(2),n?2:8):u.test(e)?NaN:+e};var g=Math.max,m=Math.min;const v=function(e,t,n){var r,s,a,l,c,u,d=0,h=!1,f=!1,v=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function b(t){var n=r,i=s;return r=s=void 0,d=t,l=e.apply(i,n)}function y(e){var n=e-u;return void 0===u||n>=t||n<0||f&&e-d>=a}function w(){var e=o();if(y(e))return _(e);c=setTimeout(w,function(e){var n=t-(e-u);return f?m(n,a-(e-d)):n}(e))}function _(e){return c=void 0,v&&r?b(e):(r=s=void 0,l)}function A(){var e=o(),n=y(e);if(r=arguments,s=this,u=e,n){if(void 0===c)return function(e){return d=e,c=setTimeout(w,t),h?b(e):l}(u);if(f)return clearTimeout(c),c=setTimeout(w,t),b(u)}return void 0===c&&(c=setTimeout(w,t)),l}return t=p(t)||0,(0,i.Z)(n)&&(h=!!n.leading,a=(f="maxWait"in n)?g(p(n.maxWait)||0,t):a,v="trailing"in n?!!n.trailing:v),A.cancel=function(){void 0!==c&&clearTimeout(c),d=0,r=u=s=c=void 0},A.flush=function(){return void 0===c?l:_(o())},A}},43925:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var i=n(58694),r=n(17685),o=n(29169),s=n(27771),a=r.Z?r.Z.isConcatSpreadable:void 0;const l=function(e){return(0,s.Z)(e)||(0,o.Z)(e)||!!(a&&e&&e[a])},c=function e(t,n,r,o,s){var a=-1,c=t.length;for(r||(r=l),s||(s=[]);++a<c;){var u=t[a];n>0&&r(u)?n>1?e(u,n-1,r,o,s):(0,i.Z)(s,u):o||(s[s.length]=u)}return s},u=function(e){return null!=e&&e.length?c(e,1/0):[]}},29169:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var i=n(93589),r=n(18533);const o=function(e){return(0,r.Z)(e)&&"[object Arguments]"==(0,i.Z)(e)};var s=Object.prototype,a=s.hasOwnProperty,l=s.propertyIsEnumerable;const c=o(function(){return arguments}())?o:function(e){return(0,r.Z)(e)&&a.call(e,"callee")&&!l.call(e,"callee")}},27771:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});const i=Array.isArray},77226:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});const i=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},18533:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});const i=function(e){return null!=e&&"object"==typeof e}},72714:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var i=n(93589),r=n(18533);const o=function(e){return"symbol"==typeof e||(0,r.Z)(e)&&"[object Symbol]"==(0,i.Z)(e)}},11753:(e,t,n)=>{"use strict";n.d(t,{$l:()=>c,BN:()=>I,DY:()=>r,J$:()=>z,JN:()=>m,LI:()=>$,PM:()=>h,W6:()=>E,i_:()=>l,ko:()=>Y,kw:()=>k,mf:()=>d,o8:()=>u,qC:()=>R,s6:()=>Z,sj:()=>D,u3:()=>O,u_:()=>N,w6:()=>S,xD:()=>X});var i=n(81672);const r=new WeakMap,o={},s={},a=()=>{},l=a(),c=Object,u=e=>e===l,d=e=>"function"==typeof e,h=(e,t)=>({...e,...t}),f="undefined",p=typeof window!=f,g=typeof document!=f,m=(e,t)=>{const n=r.get(e);return[()=>e.get(t)||o,i=>{if(!u(t)){const r=e.get(t);t in s||(s[t]=r),n[5](t,h(r,i),r||o)}},n[6],()=>!u(t)&&t in s?s[t]:e.get(t)||o]},v=new WeakMap;let b=0;const y=e=>{const t=typeof e,n=e&&e.constructor,i=n==Date;let r,o;if(c(e)!==e||i||n==RegExp)r=i?e.toJSON():"symbol"==t?e.toString():"string"==t?JSON.stringify(e):""+e;else{if(r=v.get(e),r)return r;if(r=++b+"~",v.set(e,r),n==Array){for(r="@",o=0;o<e.length;o++)r+=y(e[o])+",";v.set(e,r)}if(n==c){r="#";const t=c.keys(e).sort();for(;!u(o=t.pop());)u(e[o])||(r+=o+":"+y(e[o])+",");v.set(e,r)}}return r};let w=!0;const[_,A]=p&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[a,a],x={isOnline:()=>w,isVisible:()=>{const e=g&&document.visibilityState;return u(e)||"hidden"!==e}},C={initFocus:e=>(g&&document.addEventListener("visibilitychange",e),_("focus",e),()=>{g&&document.removeEventListener("visibilitychange",e),A("focus",e)}),initReconnect:e=>{const t=()=>{w=!0,e()},n=()=>{w=!1};return _("online",t),_("offline",n),()=>{A("online",t),A("offline",n)}}},S=!i.useId,E=!p||"Deno"in window,k=e=>p&&typeof window.requestAnimationFrame!=f?window.requestAnimationFrame(e):setTimeout(e,1),$=E?i.useEffect:i.useLayoutEffect,M="undefined"!=typeof navigator&&navigator.connection,T=!E&&M&&(["slow-2g","2g"].includes(M.effectiveType)||M.saveData),R=e=>{if(d(e))try{e=e()}catch(t){e=""}const t=e;return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?y(e):"",t]};let L=0;const O=()=>++L,F=2;var D={__proto__:null,FOCUS_EVENT:0,RECONNECT_EVENT:1,MUTATE_EVENT:F,ERROR_REVALIDATE_EVENT:3};async function I(...e){const[t,n,i,o]=e,s=h({populateCache:!0,throwOnError:!0},"boolean"==typeof o?{revalidate:o}:o||{});let a=s.populateCache;const c=s.rollbackOnError;let f=s.optimisticData;const p=!1!==s.revalidate,g=s.throwOnError;if(d(n)){const e=n,i=[],r=t.keys();for(let n=r.next();!n.done;n=r.next()){const r=n.value;!/^\$(inf|sub)\$/.test(r)&&e(t.get(r)._k)&&i.push(r)}return Promise.all(i.map(v))}return v(n);async function v(n){const[o]=R(n);if(!o)return;const[s,h]=m(t,o),[v,b,y]=r.get(t),w=v[o],_=()=>p&&(delete y[o],w&&w[0])?w[0](F).then((()=>s().data)):s().data;if(e.length<3)return _();let A,x=i;const C=O();b[o]=[C,0];const S=!u(f),E=s(),k=E.data,$=E._c,M=u($)?k:$;if(S&&(f=d(f)?f(M):f,h({data:f,_c:M})),d(x))try{x=x(M)}catch(e){A=e}if(x&&d(x.then)){if(x=await x.catch((e=>{A=e})),C!==b[o][0]){if(A)throw A;return x}A&&S&&(e=>"function"==typeof c?c(e):!1!==c)(A)&&(a=!0,x=M,h({data:x,_c:l}))}a&&(A||(d(a)&&(x=a(x,M)),h({data:x,_c:l}))),b[o][1]=O();const T=await _();if(h({_c:l}),!A)return a?T:x;if(g)throw A}}const j=(e,t)=>{for(const n in e)e[n][0]&&e[n][0](t)},P=(e,t)=>{if(!r.has(e)){const n=h(C,t),i={},o=I.bind(l,e);let s=a;const c={},u=(e,t)=>{const n=c[e]||[];return c[e]=n,n.push(t),()=>n.splice(n.indexOf(t),1)},d=(t,n,i)=>{e.set(t,n);const r=c[t];if(r)for(const e of r)e(n,i)},f=()=>{if(!r.has(e)&&(r.set(e,[i,{},{},{},o,d,u]),!E)){const t=n.initFocus(setTimeout.bind(l,j.bind(l,i,0))),o=n.initReconnect(setTimeout.bind(l,j.bind(l,i,1)));s=()=>{t&&t(),o&&o(),r.delete(e)}}};return f(),[e,o,f,s]}return[e,r.get(e)[4]]},[B,U]=P(new Map),N=h({onLoadingSlow:a,onSuccess:a,onError:a,onErrorRetry:(e,t,n,i,r)=>{const o=n.errorRetryCount,s=r.retryCount,a=~~((Math.random()+.5)*(1<<(s<8?s:8)))*n.errorRetryInterval;!u(o)&&s>o||setTimeout(i,a,r)},onDiscarded:a,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:T?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:T?5e3:3e3,compare:(e,t)=>y(e)==y(t),isPaused:()=>!1,cache:B,mutate:U,fallback:{}},x),H=(e,t)=>{const n=h(e,t);if(t){const{use:i,fallback:r}=e,{use:o,fallback:s}=t;i&&o&&(n.use=i.concat(o)),r&&s&&(n.fallback=h(r,s))}return n},W=(0,i.createContext)({}),z=e=>{const{value:t}=e,n=(0,i.useContext)(W),r=d(t),o=(0,i.useMemo)((()=>r?t(n):t),[r,n,t]),s=(0,i.useMemo)((()=>r?o:H(n,o)),[r,n,o]),a=o&&o.provider,c=(0,i.useRef)(l);a&&!c.current&&(c.current=P(a(s.cache||B),o));const u=c.current;return u&&(s.cache=u[0],s.mutate=u[1]),$((()=>{if(u)return u[2]&&u[2](),u[3]}),[]),(0,i.createElement)(W.Provider,h(e,{value:s}))},V=p&&window.__SWR_DEVTOOLS_USE__,G=V?window.__SWR_DEVTOOLS_USE__:[],q=e=>d(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}],K=G.concat((e=>(t,n,i)=>e(t,n&&((...e)=>{const i=R(t)[0],[,,,o]=r.get(B),s=o[i];return s?(delete o[i],s):n(...e)}),i))),Z=e=>function(...t){const n=h(N,(0,i.useContext)(W)),[r,o,s]=q(t),a=H(n,s);let l=e;const{use:c}=a,u=(c||[]).concat(K);for(let e=u.length;e--;)l=u[e](l);return l(r,o||a.fetcher||null,a)},Y=(e,t,n)=>{const i=t[e]||(t[e]=[]);return i.push(n),()=>{const e=i.indexOf(n);e>=0&&(i[e]=i[i.length-1],i.pop())}},X=(e,t)=>(...n)=>{const[i,r,o]=q(n),s=(o.use||[]).concat(t);return e(i,r,{...o,use:s})};V&&(window.__SWR_DEVTOOLS_REACT__=i)},95591:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>a});var i=n(81672),r=n(61688),o=n(11753);const s={dedupe:!0};o.$l.defineProperty(o.J$,"defaultValue",{value:o.u_});var a=(0,o.s6)(((e,t,n)=>{const{cache:a,compare:l,suspense:c,fallbackData:u,revalidateOnMount:d,revalidateIfStale:h,refreshInterval:f,refreshWhenHidden:p,refreshWhenOffline:g,keepPreviousData:m}=n,[v,b,y]=o.DY.get(a),[w,_]=(0,o.qC)(e),A=(0,i.useRef)(!1),x=(0,i.useRef)(!1),C=(0,i.useRef)(w),S=(0,i.useRef)(t),E=(0,i.useRef)(n),k=()=>E.current,$=()=>k().isVisible()&&k().isOnline(),[M,T,R,L]=(0,o.JN)(a,w),O=(0,i.useRef)({}).current,F=(0,o.o8)(u)?n.fallback[w]:u,D=(e,t)=>{let n=!0;for(const i in O){const r=i;"data"===r?l(t[r],e[r])||(0,o.o8)(e[r])&&l(t[r],z)||(n=!1):t[r]!==e[r]&&(n=!1)}return n},I=(0,i.useMemo)((()=>{const e=!!w&&!!t&&((0,o.o8)(d)?!k().isPaused()&&!c&&(!!(0,o.o8)(h)||h):d),n=t=>{const n=(0,o.PM)(t);return delete n._k,e?{isValidating:!0,isLoading:!0,...n}:n},i=M(),r=L(),s=n(i),a=i===r?s:n(r);let l=s;return[()=>{const e=n(M());return D(e,l)?l:l=e},()=>a]}),[a,w]),j=(0,r.useSyncExternalStore)((0,i.useCallback)((e=>R(w,((t,n)=>{D(n,t)||e()}))),[a,w]),I[0],I[1]),P=!A.current,B=v[w]&&v[w].length>0,U=j.data,N=(0,o.o8)(U)?F:U,H=j.error,W=(0,i.useRef)(N),z=m?(0,o.o8)(U)?W.current:U:N,V=!(B&&!(0,o.o8)(H))&&(P&&!(0,o.o8)(d)?d:!k().isPaused()&&(c?!(0,o.o8)(N)&&h:(0,o.o8)(N)||h)),G=!!(w&&t&&P&&V),q=(0,o.o8)(j.isValidating)?G:j.isValidating,K=(0,o.o8)(j.isLoading)?G:j.isLoading,Z=(0,i.useCallback)((async e=>{const t=S.current;if(!w||!t||x.current||k().isPaused())return!1;let i,r,s=!0;const a=e||{},c=!y[w]||!a.dedupe,u=()=>o.w6?!x.current&&w===C.current&&A.current:w===C.current,d={isValidating:!1,isLoading:!1},h=()=>{T(d)},f=()=>{const e=y[w];e&&e[1]===r&&delete y[w]},p={isValidating:!0};(0,o.o8)(M().data)&&(p.isLoading=!0);try{if(c&&(T(p),n.loadingTimeout&&(0,o.o8)(M().data)&&setTimeout((()=>{s&&u()&&k().onLoadingSlow(w,n)}),n.loadingTimeout),y[w]=[t(_),(0,o.u3)()]),[i,r]=y[w],i=await i,c&&setTimeout(f,n.dedupingInterval),!y[w]||y[w][1]!==r)return c&&u()&&k().onDiscarded(w),!1;d.error=o.i_;const e=b[w];if(!(0,o.o8)(e)&&(r<=e[0]||r<=e[1]||0===e[1]))return h(),c&&u()&&k().onDiscarded(w),!1;const a=M().data;d.data=l(a,i)?a:i,c&&u()&&k().onSuccess(i,w,n)}catch(e){f();const t=k(),{shouldRetryOnError:n}=t;t.isPaused()||(d.error=e,c&&u()&&(t.onError(e,w,t),(!0===n||(0,o.mf)(n)&&n(e))&&$()&&t.onErrorRetry(e,w,t,(e=>{const t=v[w];t&&t[0]&&t[0](o.sj.ERROR_REVALIDATE_EVENT,e)}),{retryCount:(a.retryCount||0)+1,dedupe:!0})))}return s=!1,h(),!0}),[w,a]),Y=(0,i.useCallback)(((...e)=>(0,o.BN)(a,C.current,...e)),[]);if((0,o.LI)((()=>{S.current=t,E.current=n,(0,o.o8)(U)||(W.current=U)})),(0,o.LI)((()=>{if(!w)return;const e=Z.bind(o.i_,s);let t=0;const n=(0,o.ko)(w,v,((n,i={})=>{if(n==o.sj.FOCUS_EVENT){const n=Date.now();k().revalidateOnFocus&&n>t&&$()&&(t=n+k().focusThrottleInterval,e())}else if(n==o.sj.RECONNECT_EVENT)k().revalidateOnReconnect&&$()&&e();else{if(n==o.sj.MUTATE_EVENT)return Z();if(n==o.sj.ERROR_REVALIDATE_EVENT)return Z(i)}}));return x.current=!1,C.current=w,A.current=!0,T({_k:_}),V&&((0,o.o8)(N)||o.W6?e():(0,o.kw)(e)),()=>{x.current=!0,n()}}),[w]),(0,o.LI)((()=>{let e;function t(){const t=(0,o.mf)(f)?f(N):f;t&&-1!==e&&(e=setTimeout(n,t))}function n(){M().error||!p&&!k().isVisible()||!g&&!k().isOnline()?t():Z(s).then(t)}return t(),()=>{e&&(clearTimeout(e),e=-1)}}),[f,p,g,w]),(0,i.useDebugValue)(z),c&&(0,o.o8)(N)&&w){if(!o.w6&&o.W6)throw new Error("Fallback data is required when using suspense in SSR.");throw S.current=t,E.current=n,x.current=!1,(0,o.o8)(H)?Z(s):H}return{mutate:Y,get data(){return O.data=!0,z},get error(){return O.error=!0,H},get isValidating(){return O.isValidating=!0,q},get isLoading(){return O.isLoading=!0,K}}}))},49770:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var i=n(95591),r=(0,n(11753).xD)(i.ZP,(e=>(t,n,i)=>(i.revalidateOnFocus=!1,i.revalidateIfStale=!1,i.revalidateOnReconnect=!1,e(t,n,i))))}}]);
|