(window.webpackJsonp=window.webpackJsonp||[]).push([[196,5,7],{"+ua5":function(et,he,K){},"/cxE":function(et,he,K){"use strict";K.d(he,"e",function(){return w}),K.d(he,"f",function(){return _}),K.d(he,"g",function(){return D}),K.d(he,"d",function(){return N}),K.d(he,"a",function(){return k}),K.d(he,"b",function(){return S}),K.d(he,"c",function(){return C});var ue=function(){function d(){this.listeners=[],this.unexpectedErrorHandler=function(v){setTimeout(function(){throw v.stack?new Error(v.message+`
`+v.stack):v},0)}}return d.prototype.emit=function(v){this.listeners.forEach(function(b){b(v)})},d.prototype.onUnexpectedError=function(v){this.unexpectedErrorHandler(v),this.emit(v)},d.prototype.onUnexpectedExternalError=function(v){this.unexpectedErrorHandler(v)},d}(),B=new ue;function w(d){N(d)||B.onUnexpectedError(d);return}function _(d){N(d)||B.onUnexpectedExternalError(d);return}function D(d){if(d instanceof Error){var v=d.name,b=d.message,p=d.stacktrace||d.stack;return{$isError:!0,name:v,message:b,stack:p}}return d}var A="Canceled";function N(d){return d instanceof Error&&d.name===A&&d.message===A}function k(){var d=new Error(A);return d.name=d.message,d}function S(d){return d?new Error("Illegal argument: "+d):new Error("Illegal argument")}function C(d){return d?new Error("Illegal state: "+d):new Error("Illegal state")}},"24hK":function(et,he,K){"use strict";K.d(he,"a",function(){return w});var ue=K("JYp7"),B=function(){function _(D){this.element=D,this.next=_.Undefined,this.prev=_.Undefined}return _.Undefined=new _(void 0),_}(),w=function(){function _(){this._first=B.Undefined,this._last=B.Undefined,this._size=0}return Object.defineProperty(_.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),_.prototype.isEmpty=function(){return this._first===B.Undefined},_.prototype.clear=function(){this._first=B.Undefined,this._last=B.Undefined,this._size=0},_.prototype.unshift=function(D){return this._insert(D,!1)},_.prototype.push=function(D){return this._insert(D,!0)},_.prototype._insert=function(D,A){var N=this,k=new B(D);if(this._first===B.Undefined)this._first=k,this._last=k;else if(A){var S=this._last;this._last=k,k.prev=S,S.next=k}else{var C=this._first;this._first=k,k.next=C,C.prev=k}this._size+=1;var d=!1;return function(){d||(d=!0,N._remove(k))}},_.prototype.shift=function(){if(this._first===B.Undefined)return;var D=this._first.element;return this._remove(this._first),D},_.prototype.pop=function(){if(this._last===B.Undefined)return;var D=this._last.element;return this._remove(this._last),D},_.prototype._remove=function(D){if(D.prev!==B.Undefined&&D.next!==B.Undefined){var A=D.prev;A.next=D.next,D.next.prev=A}else D.prev===B.Undefined&&D.next===B.Undefined?(this._first=B.Undefined,this._last=B.Undefined):D.next===B.Undefined?(this._last=this._last.prev,this._last.next=B.Undefined):D.prev===B.Undefined&&(this._first=this._first.next,this._first.prev=B.Undefined);this._size-=1},_.prototype.iterator=function(){var D,A=this._first;return{next:function(){return A===B.Undefined?ue.c:(D?D.value=A.element:D={done:!1,value:A.element},A=A.next,D)}}},_.prototype.toArray=function(){for(var D=[],A=this._first;A!==B.Undefined;A=A.next)D.push(A.element);return D},_}()},"55Ip":function(et,he,K){"use strict";K.d(he,"a",function(){return t}),K.d(he,"b",function(){return g});var ue=K("Ty5D"),B=K("dI71"),w=K("q1tI"),_=K.n(w),D=K("YS25"),A=K("17x9"),N=K.n(A),k=K("wx14"),S=K("zLVn"),C=K("9R94"),d=function(a){Object(B.a)(i,a);function i(){for(var T,x=arguments.length,L=new Array(x),R=0;R0&&arguments[0]!==void 0?arguments[0]:[],y=new Map;function n(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(e||[]).forEach(function(r){var f=r.key,c=r.children;Object(D.a)(f!=null,"Tree node must have a certain key: [".concat(t).concat(f,"]"));var u=String(f);Object(D.a)(!y.has(u)||f===null||f===void 0,"Same 'key' exist in the Tree: ".concat(u)),y.set(u,!0),n(c,"".concat(t).concat(u," > "))})}n(m)}function S(m){function y(n){var e=Object(_.a)(n);return e.map(function(t){if(!Object(A.i)(t))return Object(D.a)(!t,"Tree/TreeNode can only accept TreeNode as children."),null;var r=t.key,f=t.props,c=f.children,u=Object(w.a)(f,["children"]),E=Object(B.a)({key:r},u),g=y(c);return g.length&&(E.children=g),E}).filter(function(t){return t})}return y(m)}function C(){var m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=new Set(y===!0?[]:y),e=[];function t(r){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return r.map(function(c,u){var E=Object(A.h)(f?f.pos:"0",u),g=N(c.key,E),s=Object(B.a)(Object(B.a)({},c),{},{parent:f,pos:E,children:null,data:c,isStart:[].concat(Object(ue.a)(f?f.isStart:[]),[u===0]),isEnd:[].concat(Object(ue.a)(f?f.isEnd:[]),[u===r.length-1])});return e.push(s),y===!0||n.has(g)?s.children=t(c.children||[],s):s.children=[],s})}return t(m),e}function d(m,y,n){var e;n?typeof n=="string"?e=function(f){return f[n]}:typeof n=="function"&&(e=function(f){return n(f)}):e=function(f,c){return N(f.key,c)};function t(r,f,c){var u=r?r.children:m,E=r?Object(A.h)(c.pos,f):"0";if(r){var g=e(r,E),s={node:r,index:f,pos:E,key:g,parentPos:c.node?c.pos:null,level:c.level+1};y(s)}u&&u.forEach(function(a,i){t(a,i,{node:r,pos:E,level:c?c.level+1:-1})})}t(null)}function v(m){var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=y.initWrapper,e=y.processEntity,t=y.onProcessFinished,r=arguments.length>2?arguments[2]:void 0,f={},c={},u={posEntities:f,keyEntities:c};return n&&(u=n(u)||u),d(m,function(E){var g=E.node,s=E.index,a=E.pos,i=E.key,l=E.parentPos,T=E.level,x={node:g,index:s,key:i,pos:a,level:T},L=N(i,a);f[a]=x,c[L]=x,x.parent=f[l],x.parent&&(x.parent.children=x.parent.children||[],x.parent.children.push(x)),e&&e(x,u)},r),t&&t(u),u}function b(m,y){var n=y.expandedKeys,e=y.selectedKeys,t=y.loadedKeys,r=y.loadingKeys,f=y.checkedKeys,c=y.halfCheckedKeys,u=y.dragOverNodeKey,E=y.dropPosition,g=y.keyEntities,s=g[m],a={eventKey:m,expanded:n.indexOf(m)!==-1,selected:e.indexOf(m)!==-1,loaded:t.indexOf(m)!==-1,loading:r.indexOf(m)!==-1,checked:f.indexOf(m)!==-1,halfChecked:c.indexOf(m)!==-1,pos:String(s?s.pos:""),dragOver:u===m&&E===0,dragOverGapTop:u===m&&E===-1,dragOverGapBottom:u===m&&E===1};return a}function p(m){var y=m.data,n=m.expanded,e=m.selected,t=m.checked,r=m.loaded,f=m.loading,c=m.halfChecked,u=m.dragOver,E=m.dragOverGapTop,g=m.dragOverGapBottom,s=m.pos,a=m.active,i=Object(B.a)(Object(B.a)({},y),{},{expanded:n,selected:e,checked:t,loaded:r,loading:f,halfChecked:c,dragOver:u,dragOverGapTop:E,dragOverGapBottom:g,pos:s,active:a});return"props"in i||Object.defineProperty(i,"props",{get:function(){return Object(D.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),m}}),i}},"8HAY":function(et,he,K){"use strict";K.d(he,"a",function(){return A}),K.d(he,"b",function(){return N});var ue=K("pmY6"),B=K("MI8n"),w=function(){var k=function(S,C){return k=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,v){d.__proto__=v}||function(d,v){for(var b in v)v.hasOwnProperty(b)&&(d[b]=v[b])},k(S,C)};return function(S,C){k(S,C);function d(){this.constructor=S}S.prototype=C===null?Object.create(C):(d.prototype=C.prototype,new d)}}(),_=function(k,S,C,d){function v(b){return b instanceof C?b:new C(function(p){p(b)})}return new(C||(C=Promise))(function(b,p){function m(e){try{n(d.next(e))}catch(t){p(t)}}function y(e){try{n(d.throw(e))}catch(t){p(t)}}function n(e){e.done?b(e.value):v(e.value).then(m,y)}n((d=d.apply(k,S||[])).next())})},D=function(k,S){var C={label:0,sent:function(){if(b[0]&1)throw b[1];return b[1]},trys:[],ops:[]},d,v,b,p;return p={next:m(0),throw:m(1),return:m(2)},typeof Symbol=="function"&&(p[Symbol.iterator]=function(){return this}),p;function m(n){return function(e){return y([n,e])}}function y(n){if(d)throw new TypeError("Generator is already executing.");for(;C;)try{if(d=1,v&&(b=n[0]&2?v.return:n[0]?v.throw||((b=v.return)&&b.call(v),0):v.next)&&!(b=b.call(v,n[1])).done)return b;(v=0,b)&&(n=[n[0]&2,b.value]);switch(n[0]){case 0:case 1:b=n;break;case 4:return C.label++,{value:n[1],done:!1};case 5:C.label++,v=n[1],n=[0];continue;case 7:n=C.ops.pop(),C.trys.pop();continue;default:if(!(b=C.trys,b=b.length>0&&b[b.length-1])&&(n[0]===6||n[0]===2)){C=0;continue}if(n[0]===3&&(!b||n[1]>b[0]&&n[1]1&&arguments[1]!==void 0?arguments[1]:"select",xe=arguments.length>2?arguments[2]:void 0,Oe=le.get(Ae);return!xe&&f(Oe,Le)?null:Oe},[le]),Se=S.useCallback(function(Ae){var Le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"select",xe=arguments.length>2?arguments[2]:void 0,Oe=ge.get(Ae);return!xe&&f(Oe,Le)?null:Oe},[ge]);return[Ee,Se]}function u(le){return S.useMemo(function(){var ge=new Map,Ee=new Map;return le.forEach(function(Se){ge.set(Se.key,Se),Ee.set(Se.data.value,Se)}),[ge,Ee]},[le])}var E={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},g=function(ge,Ee){var Se=ge.prefixCls,Ae=ge.height,Le=ge.itemHeight,xe=ge.virtual,Oe=ge.options,Ue=ge.flattenOptions,Te=ge.multiple,Ne=ge.searchValue,oe=ge.onSelect,re=ge.onToggleOpen,ae=ge.open,W=ge.notFoundContent,H=ge.onMouseEnter,Y=S.useContext(r),ee=Y.checkable,me=Y.checkedKeys,Ce=Y.halfCheckedKeys,Be=Y.treeExpandedKeys,Ge=Y.treeDefaultExpandAll,Qe=Y.treeDefaultExpandedKeys,Ve=Y.onTreeExpand,qe=Y.treeIcon,at=Y.showTreeIcon,Je=Y.switcherIcon,Ct=Y.treeLine,ht=Y.treeNodeFilterProp,Lt=Y.loadData,xt=Y.treeLoadedKeys,rt=Y.treeMotion,Dt=Y.onTreeLoad,At=S.useRef(),$e=Object(e.a)(function(){return Oe},[ae,Oe],function(We,Pe){return Pe[0]&&We[1]!==Pe[1]}),Xe=u(Ue),je=Object(N.a)(Xe,2),He=je[0],lt=je[1],ut=c(He,lt),ft=Object(N.a)(ut,2),nt=ft[0],tt=ft[1],Ze=S.useMemo(function(){return me.map(function(We){var Pe=tt(We);return Pe?Pe.key:null})},[me]),mt=S.useMemo(function(){return ee?{checked:Ze,halfChecked:Ce}:null},[Ze,Ce,ee]);S.useEffect(function(){if(ae&&!Te&&Ze.length){var We;(We=At.current)===null||We===void 0||We.scrollTo({key:Ze[0]})}},[ae]);var vt=String(Ne).toLowerCase(),dt=function(Pe){return vt?String(Pe[ht]).toLowerCase().includes(vt):!1},pt=S.useState(Qe),Tt=Object(N.a)(pt,2),It=Tt[0],gt=Tt[1],st=S.useState(null),it=Object(N.a)(st,2),ct=it[0],bt=it[1],Et=S.useMemo(function(){return Be?Object(D.a)(Be):Ne?ct:It},[It,ct,vt,Be]);S.useEffect(function(){Ne&&bt(Ue.map(function(We){return We.key}))},[Ne]);var P=function(Pe){gt(Pe),bt(Pe),Ve&&Ve(Pe)},o=function(Pe){Pe.preventDefault()},h=function(Pe,Ye){var ze=Ye.node.key,ot=nt(ze,ee?"checkbox":"select");ot!==null&&oe(ot.data.value,{selected:!me.includes(ot.data.value)}),Te||re(!1)},O=S.useState(null),U=Object(N.a)(O,2),M=U[0],ne=U[1],ke=nt(M);if(S.useImperativeHandle(Ee,function(){return{onKeyDown:function(Pe){var Ye,ze=Pe.which;switch(ze){case n.a.UP:case n.a.DOWN:case n.a.LEFT:case n.a.RIGHT:(Ye=At.current)===null||Ye===void 0||Ye.onKeyDown(Pe);break;case n.a.ENTER:{ke!==null&&h(null,{node:{key:M},selected:!me.includes(ke.data.value)});break}case n.a.ESC:re(!1)}},onKeyUp:function(){}}}),$e.length===0)return S.createElement("div",{role:"listbox",className:"".concat(Se,"-empty"),onMouseDown:o},W);var Ke={};return xt&&(Ke.loadedKeys=xt),Et&&(Ke.expandedKeys=Et),S.createElement("div",{onMouseDown:o,onMouseEnter:H},ke&&ae&&S.createElement("span",{style:E,"aria-live":"assertive"},ke.data.value),S.createElement(t.b,Object.assign({ref:At,focusable:!1,prefixCls:"".concat(Se,"-tree"),treeData:$e,height:Ae,itemHeight:Le,virtual:xe,multiple:Te,icon:qe,showIcon:at,switcherIcon:Je,showLine:Ct,loadData:Ne?null:Lt,motion:rt,checkable:ee,checkStrictly:!0,checkedKeys:mt,selectedKeys:ee?[]:Ze,defaultExpandAll:Ge},Ke,{onActiveChange:ne,onSelect:h,onCheck:h,onExpand:P,onLoad:Dt,filterTreeNode:dt})))},s=S.forwardRef(g);s.displayName="OptionList";var a=s,i=function(){return null},l=i,T=K("Ff2n"),x=K("Zm9Q");function L(le){return Object(x.a)(le).map(function(ge){if(!S.isValidElement(ge)||!ge.type)return null;var Ee=ge.key,Se=ge.props,Ae=Se.children,Le=Se.value,xe=Object(T.a)(Se,["children","value"]),Oe=Object(k.a)({key:Ee,value:Le},xe),Ue=L(Ae);return Ue.length&&(Oe.children=Ue),Oe}).filter(function(ge){return ge})}function R(le){if(!le)return le;var ge=Object(k.a)({},le);return"props"in ge||Object.defineProperty(ge,"props",{get:function(){return Object(y.a)(!1,"New `rc-tree-select` not support return node instance as argument anymore. Please consider to remove `props` access."),ge}}),ge}function I(le,ge,Ee,Se,Ae){var Le=null,xe=null;function Oe(){function Ue(Te){var Ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"0",oe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return Te.map(function(re,ae){var W="".concat(Ne,"-").concat(ae),H=Ee.includes(re.value),Y=Ue(re.children||[],W,H),ee=S.createElement(l,Object.assign({},re),Y.map(function(Ce){return Ce.node}));if(ge===re.value&&(Le=ee),H){var me={pos:W,node:ee,children:Y};return oe||xe.push(me),me}return null}).filter(function(re){return re})}xe||(xe=[],Ue(Se),xe.sort(function(Te,Ne){var oe=Te.node.props.value,re=Ne.node.props.value,ae=Ee.indexOf(oe),W=Ee.indexOf(re);return ae-W}))}Object.defineProperty(le,"triggerNode",{get:function(){return Object(y.a)(!1,"`triggerNode` is deprecated. Please consider decoupling data with node."),Oe(),Le}}),Object.defineProperty(le,"allCheckedNodes",{get:function(){return Object(y.a)(!1,"`allCheckedNodes` is deprecated. Please consider decoupling data with node."),Oe(),Ae?xe:xe.map(function(Te){var Ne=Te.node;return Ne})}})}function F(le){return Array.isArray(le)?le:le!==void 0?[le]:[]}function j(le,ge){var Ee=new Map;return ge.forEach(function(Se){var Ae=Se.data;Ee.set(Ae.value,Ae)}),le.map(function(Se){return R(Ee.get(Se))})}function z(le,ge){var Ee=j([le],ge)[0];return Ee?Ee.disabled:!1}function Q(le){return le.disabled||le.disableCheckbox||le.checkable===!1}function J(le){for(var ge=le.parent,Ee=0,Se=ge;Se;)Se=Se.parent,Ee+=1;return Ee}function ie(le){function ge(Se){return(Se||[]).map(function(Ae){var Le=Ae.value,xe=Ae.key,Oe=Ae.children,Ue=Object(k.a)(Object(k.a)({},Ae),{},{key:"key"in Ae?xe:Le});return Oe&&(Ue.children=ge(Oe)),Ue})}var Ee=Object(v.d)(ge(le),!0);return Ee.map(function(Se){return{key:Se.data.key,data:Se.data,level:J(Se)}})}function pe(le){return function(ge,Ee){var Se=Ee[le];return String(Se).toLowerCase().includes(String(ge).toLowerCase())}}function ce(le,ge,Ee){var Se=Ee.optionFilterProp,Ae=Ee.filterOption;if(Ae===!1)return ge;var Le;typeof Ae=="function"?Le=Ae:Le=pe(Se);function xe(Oe){var Ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Oe.map(function(Te){var Ne=Te.children,oe=Ue||Le(le,R(Te)),re=xe(Ne||[],oe);return oe||re.length?Object(k.a)(Object(k.a)({},Te),{},{children:re}):null}).filter(function(Te){return Te})}return xe(ge)}function ye(le,ge,Ee,Se){var Ae=new Map;return F(ge).forEach(function(Le){Le&&Object(A.a)(Le)==="object"&&"value"in Le&&Ae.set(Le.value,Le)}),le.map(function(Le){var xe={value:Le},Oe=Ee(Le,"select",!0),Ue=Oe?Se(Oe.data):Le;if(Ae.has(Le)){var Te=Ae.get(Le);xe.label="label"in Te?Te.label:Ue,"halfChecked"in Te&&(xe.halfChecked=Te.halfChecked)}else xe.label=Ue;return xe})}function ve(le,ge){var Ee=new Set(le);return Ee.add(ge),Array.from(Ee)}function Z(le,ge){var Ee=new Set(le);return Ee.delete(ge),Array.from(Ee)}function q(le){var ge=le.searchPlaceholder,Ee=le.treeCheckStrictly,Se=le.treeCheckable,Ae=le.labelInValue,Le=le.value,xe=le.multiple;Object(y.a)(!ge,"`searchPlaceholder` has been removed."),Ee&&Ae===!1&&Object(y.a)(!1,"`treeCheckStrictly` will force set `labelInValue` to `true`."),(Ae||Ee)&&Object(y.a)(F(Le).every(function(Oe){return Oe&&Object(A.a)(Oe)==="object"&&"value"in Oe}),"Invalid prop `value` supplied to `TreeSelect`. You should use { label: string, value: string | number } or [{ label: string, value: string | number }] instead."),Ee||xe||Se?Object(y.a)(!Le||Array.isArray(Le),"`value` should be an array when `TreeSelect` is checkable or multiple."):Object(y.a)(!Array.isArray(Le),"`value` should not be array when `TreeSelect` is single mode.")}var se=q,V=10;function G(le,ge){var Ee=ge.id,Se=ge.pId,Ae=ge.rootPId,Le={},xe=[],Oe=le.map(function(Ue){var Te=Object(k.a)({},Ue),Ne=Te[Ee];return Le[Ne]=Te,Te.key=Te.key||Ne,Te});return Oe.forEach(function(Ue){var Te=Ue[Se],Ne=Le[Te];Ne&&(Ne.children=Ne.children||[],Ne.children.push(Ue)),(Te===Ae||!Ne&&Ae===null)&&xe.push(Ue)}),xe}function be(le,ge){var Ee=0,Se=new Set;function Ae(Le){return(Le||[]).map(function(xe){var Oe=xe.key,Ue=xe.value,Te=xe.children,Ne=Object(T.a)(xe,["key","value","children"]),oe="value"in xe?Ue:Oe,re=Object(k.a)(Object(k.a)({},Ne),{},{key:Oe!=null?Oe:oe,value:oe,title:ge(xe)});return"children"in xe&&(re.children=Ae(Te)),re})}return Ae(le)}function Re(le,ge,Ee){var Se=Ee.getLabelProp,Ae=Ee.simpleMode,Le=S.useRef({});return le?(Le.current.formatTreeData=Le.current.treeData===le?Le.current.formatTreeData:be(Ae?G(le,Object(k.a)({id:"id",pId:"pId",rootPId:null},Ae!==!0?Ae:{})):le,Se),Le.current.treeData=le):Le.current.formatTreeData=Le.current.children===ge?Le.current.formatTreeData:be(L(ge),Se),Le.current.formatTreeData}var De="SHOW_ALL",Me="SHOW_PARENT",X="SHOW_CHILD";function $(le,ge,Ee){var Se=new Set(le);return ge===X?le.filter(function(Ae){var Le=Ee[Ae];return!(Le&&Le.children&&Le.children.every(function(xe){var Oe=xe.node;return Q(Oe)||Se.has(Oe.key)}))}):ge===Me?le.filter(function(Ae){var Le=Ee[Ae],xe=Le?Le.parent:null;return!(xe&&!Q(xe.node)&&Se.has(xe.node.key))}):le}function te(le,ge){var Ee=ge.value,Se=ge.getEntityByValue,Ae=ge.getEntityByKey,Le=ge.treeConduction,xe=ge.showCheckedStrategy,Oe=ge.conductKeyEntities,Ue=ge.getLabelProp;return S.useMemo(function(){var Te=le;if(Le){var Ne=$(le.map(function(oe){var re=Se(oe);return re?re.key:oe}),xe,Oe);Te=Ne.map(function(oe){var re=Ae(oe);return re?re.data.value:oe})}return ye(Te,Ee,Se,Ue)},[le,Ee,Le,xe,Se])}var de=["expandedKeys","treeData","treeCheckable","showCheckedStrategy","searchPlaceholder","treeLine","treeIcon","showTreeIcon","switcherIcon","treeNodeFilterProp","filterTreeNode","dropdownPopupAlign","treeDefaultExpandAll","treeCheckStrictly","treeExpandedKeys","treeLoadedKeys","treeMotion","onTreeExpand","onTreeLoad","loadData","treeDataSimpleMode","treeNodeLabelProp","treeDefaultExpandedKeys"],fe=Object(C.a)({prefixCls:"rc-tree-select",components:{optionList:a},convertChildrenToData:function(){return null},flattenOptions:ie,getLabeledValue:d.e,filterOptions:ce,isValueDisabled:z,findValueOption:j,omitDOMProps:function(ge){var Ee=Object(k.a)({},ge);return de.forEach(function(Se){delete Ee[Se]}),Ee}});fe.displayName="Select";var we=S.forwardRef(function(le,ge){var Ee=le.multiple,Se=le.treeCheckable,Ae=le.treeCheckStrictly,Le=le.showCheckedStrategy,xe=Le===void 0?"SHOW_CHILD":Le,Oe=le.labelInValue,Ue=le.loadData,Te=le.treeLoadedKeys,Ne=le.treeNodeFilterProp,oe=Ne===void 0?"value":Ne,re=le.treeNodeLabelProp,ae=le.treeDataSimpleMode,W=le.treeData,H=le.treeExpandedKeys,Y=le.treeDefaultExpandedKeys,ee=le.treeDefaultExpandAll,me=le.children,Ce=le.treeIcon,Be=le.showTreeIcon,Ge=le.switcherIcon,Qe=le.treeLine,Ve=le.treeMotion,qe=le.filterTreeNode,at=le.dropdownPopupAlign,Je=le.onChange,Ct=le.onTreeExpand,ht=le.onTreeLoad,Lt=le.onDropdownVisibleChange,xt=le.onSelect,rt=le.onDeselect,Dt=Se||Ae,At=Ee||Dt,$e=Se&&!Ae,Xe=Ae||Oe,je=S.useRef(null);S.useImperativeHandle(ge,function(){return{focus:je.current.focus,blur:je.current.blur}});var He=function(ze){return W&&ze.label||ze.title},lt=function(ze){return re?ze[re]:He(ze)},ut=Re(W,me,{getLabelProp:He,simpleMode:ae}),ft=Object(S.useMemo)(function(){return ie(ut)},[ut]),nt=u(ft),tt=Object(N.a)(nt,2),Ze=tt[0],mt=tt[1],vt=c(Ze,mt),dt=Object(N.a)(vt,2),pt=dt[0],Tt=dt[1],It=Object(S.useMemo)(function(){return $e?Object(v.a)(ut):{keyEntities:null}},[ut,Se,Ae]),gt=It.keyEntities,st=Object(m.a)(le.defaultValue,{value:le.value}),it=Object(N.a)(st,2),ct=it[0],bt=it[1],Et=function(ze){var ot=[],Pt=[];return ze.forEach(function(Rt){Tt(Rt)?Pt.push(Rt):ot.push(Rt)}),{missingRawValues:ot,existRawValues:Pt}},P=Object(S.useMemo)(function(){var Ye=[],ze=[];if(F(ct).forEach(function(wt){if(wt&&Object(A.a)(wt)==="object"&&"value"in wt)if(wt.halfChecked&&Ae){var _t=Tt(wt.value);Ye.push(_t?_t.key:wt.value)}else ze.push(wt.value);else ze.push(wt)}),$e){var ot=Et(ze),Pt=ot.missingRawValues,Rt=ot.existRawValues,Ot=Rt.map(function(wt){return Tt(wt).key}),kt=Object(b.a)(Ot,!0,gt),Gt=kt.checkedKeys,Kt=kt.halfCheckedKeys;return[[].concat(Object(D.a)(Pt),Object(D.a)(Gt.map(function(wt){return pt(wt).data.value}))),Kt]}return[ze,Ye]},[ct,At,Xe,Se,Ae]),o=Object(N.a)(P,2),h=o[0],O=o[1],U=te(h,{treeConduction:$e,value:ct,showCheckedStrategy:xe,conductKeyEntities:gt,getEntityByValue:Tt,getEntityByKey:pt,getLabelProp:lt}),M=function(ze,ot,Pt){if(bt(At?ze:ze[0]),Je){var Rt=ze;if($e&&xe!=="SHOW_ALL"){var Ot=ze.map(function(Nt){var jt=Tt(Nt);return jt?jt.key:Nt}),kt=$(Ot,xe,gt);Rt=kt.map(function(Nt){var jt=pt(Nt);return jt?jt.data.value:Nt})}var Gt=ot||{triggerValue:void 0,selected:void 0},Kt=Gt.triggerValue,wt=Gt.selected,_t=Xe?ye(Rt,ct,Tt,lt):Rt;if(Ae){var zt=O.map(function(Nt){var jt=pt(Nt);return jt?jt.data.value:Nt}).filter(function(Nt){return!Rt.includes(Nt)});_t=[].concat(Object(D.a)(_t),Object(D.a)(ye(zt,ct,Tt,lt)))}var Bt={preValue:U,triggerValue:Kt},Xt=!0;(Ae||Pt==="selection"&&!wt)&&(Xt=!1),I(Bt,Kt,ze,ut,Xt),Dt?Bt.checked=wt:Bt.selected=wt,Je(At?_t:_t[0],Xe?null:Rt.map(function(Nt){var jt=Tt(Nt);return jt?lt(jt.data):null}),Bt)}},ne=function(ze,ot,Pt){var Rt=ze;if(!At)M([ze],{selected:!0,triggerValue:ze},Pt);else{var Ot=ve(h,ze);if($e){var kt=Et(Ot),Gt=kt.missingRawValues,Kt=kt.existRawValues,wt=Kt.map(function(Bt){return Tt(Bt).key}),_t=Object(b.a)(wt,!0,gt),zt=_t.checkedKeys;Ot=[].concat(Object(D.a)(Gt),Object(D.a)(zt.map(function(Bt){return pt(Bt).data.value})))}M(Ot,{selected:!0,triggerValue:ze},Pt)}xt&&xt(Rt,ot)},ke=function(ze,ot,Pt){var Rt=ze,Ot=Z(h,ze);if($e){var kt=Et(Ot),Gt=kt.missingRawValues,Kt=kt.existRawValues,wt=Kt.map(function(Bt){return Tt(Bt).key}),_t=Object(b.a)(wt,{checked:!1,halfCheckedKeys:O},gt),zt=_t.checkedKeys;Ot=[].concat(Object(D.a)(Gt),Object(D.a)(zt.map(function(Bt){return pt(Bt).data.value})))}M(Ot,{selected:!1,triggerValue:ze},Pt),rt&&rt(Rt,ot)},Ke=function(){M([],null,"clear")},We=S.useCallback(function(Ye){if(Lt){var ze={};Object.defineProperty(ze,"documentClickClose",{get:function(){return Object(y.a)(!1,"Second param of `onDropdownVisibleChange` has been removed."),!1}}),Lt(Ye,ze)}},[Lt]),Pe={optionLabelProp:null,optionFilterProp:oe,dropdownAlign:at,internalProps:{mark:p.a,onClear:Ke,skipTriggerChange:!0,skipTriggerSelect:!0,onRawSelect:ne,onRawDeselect:ke}};return"filterTreeNode"in le&&(Pe.filterOption=qe),S.createElement(r.Provider,{value:{checkable:Dt,loadData:Ue,treeLoadedKeys:Te,onTreeLoad:ht,checkedKeys:h,halfCheckedKeys:O,treeDefaultExpandAll:ee,treeExpandedKeys:H,treeDefaultExpandedKeys:Y,onTreeExpand:Ct,treeIcon:Ce,treeMotion:Ve,showTreeIcon:Be,switcherIcon:Ge,treeLine:Qe,treeNodeFilterProp:oe}},S.createElement(fe,Object.assign({ref:je,mode:At?"multiple":null},le,Pe,{value:U,labelInValue:!0,options:ut,onChange:null,onSelect:null,onDeselect:null,onDropdownVisibleChange:We})))}),Ie=function(le){Object(w.a)(Ee,le);var ge=Object(_.a)(Ee);function Ee(){var Se;return Object(ue.a)(this,Ee),Se=ge.apply(this,arguments),Se.selectRef=S.createRef(),Se.focus=function(){Se.selectRef.current.focus()},Se.blur=function(){Se.selectRef.current.blur()},Se}return Object(B.a)(Ee,[{key:"render",value:function(){return S.createElement(we,Object.assign({ref:this.selectRef},this.props))}}]),Ee}(S.Component);Ie.TreeNode=l,Ie.SHOW_ALL=De,Ie.SHOW_PARENT=Me,Ie.SHOW_CHILD=X;var _e=Ie,Fe=he.e=_e},"8hTe":function(et,he,K){et.exports={button:"button___1wy9m"}},"9Bee":function(et,he,K){"use strict";var ue=K("DYRE"),B=K("zeV3"),w=K("+L6B"),_=K("2/Rp"),D=K("k1fw"),A=K("9og8"),N=K("tJVT"),k=K("WmNS"),S=K.n(k),C=K("q1tI"),d=K.n(C),v=K("vg9a"),b=K("DlQD"),p=K.n(b),m=K("rUJ1");function y(P,o){var h=P.match(/^(\s+)(?:```)/);if(h===null)return o;var O=h[1];return o.split(`
`).map(function(U){var M=U.match(/^\s+/);if(M===null)return U;var ne=Object(N.a)(M,1),ke=ne[0];return ke.length>=O.length?U.slice(O.length):U}).join(`
`)}var n=[],e=[""],t=new p.a.Renderer,r=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function f(){n.length=0,e=[""]}var c={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function u(P,o,h,O){if(o>=P.length||P[o].level<=h)return o;var U=P[o];O.push("- "+U.text+""),o++;var M=[];return o=u(P,o,U.level,M),M.length>0&&(O.push("
"),M.forEach(function(ne){O.push(ne)}),O.push("
")),O.push(" "),o=u(P,o,h,O),o}function E(){return u(n,0,0,e),e.push("
"),e.join("")}var g={heading:function(o){var h=r.exec(o);if(h)return{type:"heading",raw:h[0],depth:h[1].length,text:h[2]}},fences:function(o){var h=this.rules.block.fences.exec(o);if(h){var O=h[0],U=y(O,h[3]||""),M=h[2]?h[2].trim():h[2];if(["latex","katex","math"].indexOf(M)>=0){var ne=i(),ke=U;U=ne,l[ne]={type:"block",expression:ke}}return{type:"code",raw:O,lang:M,text:U}}}},s=/(?:\${2})([^\n`]+?)(?:\${2})/gi,a=0,i=function(){return"__special_katext_id_".concat(a++,"__")},l={};function T(){return l}function x(){a=0,l={}}function L(P){return P=P.replace(s,function(o,h){var O=i();return l[O]={type:"inline",expression:h},O}),P}var R=t.listitem;t.listitem=function(P){return R(L(P))};var I=t.paragraph;t.paragraph=function(P){return I(L(P))};var F=t.tablecell;t.tablecell=function(P,o){return F(L(P),o)},t.code=function(P,o,h){var O=(o||"").match(/\S*/)[0];return O?["latex","katex","math"].indexOf(O)>=0?"".concat(P,"
"):'
').concat(h?P:Object(m.escape)(P,!0),`
`):''+(h?P:Object(m.escape)(P,!0))+"
"},t.heading=function(P,o,h){var O=this.options.headerPrefix+h.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return n.push({anchor:O,level:o,text:P}),"'+P+""},p.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),p.a.use({tokenizer:g,renderer:t});var j=p.a,z=K("SJMd"),Q=K("ulZh"),J=K.n(Q),ie=K("m3rI"),pe=K("Oy/b"),ce=K("p5ED"),ye=K("ErOA");/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var ve=function(P,o){return(ve=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,O){h.__proto__=O}||function(h,O){for(var U in O)Object.prototype.hasOwnProperty.call(O,U)&&(h[U]=O[U])})(P,o)};function Z(P,o){function h(){this.constructor=P}ve(P,o),P.prototype=o===null?Object.create(o):(h.prototype=o.prototype,new h)}function q(P,o,h,O){return new(h||(h=Promise))(function(U,M){function ne(We){try{Ke(O.next(We))}catch(Pe){M(Pe)}}function ke(We){try{Ke(O.throw(We))}catch(Pe){M(Pe)}}function Ke(We){var Pe;We.done?U(We.value):(Pe=We.value,Pe instanceof h?Pe:new h(function(Ye){Ye(Pe)})).then(ne,ke)}Ke((O=O.apply(P,o||[])).next())})}function se(P,o){var h,O,U,M,ne={label:0,sent:function(){if(1&U[0])throw U[1];return U[1]},trys:[],ops:[]};return M={next:ke(0),throw:ke(1),return:ke(2)},typeof Symbol=="function"&&(M[Symbol.iterator]=function(){return this}),M;function ke(Ke){return function(We){return function(Pe){if(h)throw new TypeError("Generator is already executing.");for(;ne;)try{if(h=1,O&&(U=2&Pe[0]?O.return:Pe[0]?O.throw||((U=O.return)&&U.call(O),0):O.next)&&!(U=U.call(O,Pe[1])).done)return U;switch(O=0,U&&(Pe=[2&Pe[0],U.value]),Pe[0]){case 0:case 1:U=Pe;break;case 4:return ne.label++,{value:Pe[1],done:!1};case 5:ne.label++,O=Pe[1],Pe=[0];continue;case 7:Pe=ne.ops.pop(),ne.trys.pop();continue;default:if(!(U=ne.trys,(U=U.length>0&&U[U.length-1])||Pe[0]!==6&&Pe[0]!==2)){ne=0;continue}if(Pe[0]===3&&(!U||Pe[1]>U[0]&&Pe[1]',"select"),this.addActionButton(O,'',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(O,'',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(O,'',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(O,'',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(O,'',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(O,'',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(O,'',"notes"),this.markerButtonBlock=document.createElement("div"),this.markerButtonBlock.className=this.toolbarBlockStyleClass.name,this.markerButtonBlock.style.flexGrow="2",this.markerButtonBlock.style.textAlign="center",this.uiContainer.appendChild(this.markerButtonBlock),this.markerButtonOverflowBlock=document.createElement("div"),this.markerButtonOverflowBlock.className=this.toolbarOverflowBlockStyleClass.name+" "+(this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName?this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName:this.toolbarOverflowBlockStyleColorsClass.name),this.markerButtonOverflowBlock.style.display="none",this.uiContainer.appendChild(this.markerButtonOverflowBlock),this.markerItems&&(this.markerItems.forEach(function(M){var ne=document.createElement("div");ne.className=""+h.toolbarButtonStyleClass.name,ne.setAttribute("data-type-name",M.typeName),ne.innerHTML=M.icon,ne.addEventListener("click",function(){h.markerToolbarButtonClicked(ne,M)}),h.buttons.push(ne),h.markerButtons.push(ne)}),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var U=document.createElement("div");U.className=this.toolbarBlockStyleClass.name,U.style.whiteSpace="nowrap",U.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(U),this.addActionButton(U,'',"render"),this.addActionButton(U,'',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},P.prototype.addButtonClickListener=function(o){this.buttonClickListeners.push(o)},P.prototype.removeButtonClickListener=function(o){this.buttonClickListeners.indexOf(o)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(o),1)},P.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},P.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var o=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var h=0;h0&&this.buttonClickListeners.forEach(function(O){return O("marker",h)}),this.markerButtonOverflowBlock.style.display="none"},P.prototype.actionToolbarButtonClicked=function(o,h){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(O){return O("action",h)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},P.prototype.setActiveButton=function(o){this.resetButtonStyles(),o.className=o.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),o.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},P.prototype.setActiveMarkerButton=function(o){var h=this.markerButtons.find(function(O){return O.getAttribute("data-type-name")===o});h&&this.setActiveButton(h)},P.prototype.setCurrentMarker=function(o){var h=this;this.currentMarker=o,this.buttons.filter(function(O){return/delete|notes/.test(O.getAttribute("data-action"))}).forEach(function(O){h.currentMarker===void 0?(O.style.fillOpacity="0.4",O.style.pointerEvents="none"):(O.style.fillOpacity="1",O.style.pointerEvents="all")})},P}(),de=function(){function P(o,h,O,U){this.panels=[],this.panelButtons=[],this.markerjsContainer=o,this.displayMode=h,this.uiStyleSettings=O,this.styles=U,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return P.prototype.addStyles=function(){var o;this.toolboxStyleClass=this.styles.addClass(new $("toolbox",`
width: 100%;
flex-shrink: 0;
display: flex;
flex-direction: column;
font-family: sans-serif;
`+(this.displayMode==="popup"?"height:"+2.5*this.uiStyleSettings.toolbarHeight+"px;":"")+`
box-sizing: content-box;
`+(this.displayMode==="popup"?"background-color: "+this.uiStyleSettings.canvasBackgroundColor+";":"")+`
`+(this.displayMode==="inline"?"border-bottom-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
`+(this.displayMode==="inline"?"border-bottom-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
overflow: hidden;
`)),this.toolboxStyleColorsClass=this.styles.addClass(new $("toolbox_colors",`
color: `+this.uiStyleSettings.toolboxColor+`;
`));var h=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new $("toolbox-button-row",`
display: flex;
cursor: default;
box-sizing: content-box;
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new $("toolbox-button-row_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new $("toolbox-panel-row",`
display: flex;
`+(this.displayMode==="inline"?"position: absolute;":"")+`
`+(this.displayMode==="inline"?"bottom: "+this.uiStyleSettings.toolbarHeight+"px;":"")+`
cursor: default;
height: `+1.5*this.uiStyleSettings.toolbarHeight+`px;
`+(this.displayMode==="inline"?"width: 100%;":"")+`
box-sizing: content-box;
`)),this.toolboxPanelRowStyleColorsClass=this.styles.addClass(new $("toolbox-panel-row_colors",`
background-color: `+((o=this.uiStyleSettings.toolboxBackgroundColor)!==null&&o!==void 0?o:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
`)),this.toolboxButtonStyleClass=this.styles.addClass(new $("toolbox_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*h)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*h)+`px;
padding: `+h+`px;
box-sizing: content-box;
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new $("toolbox-button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new $("toolbox-active-button_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.styles.addRule(new X("."+this.toolboxButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new X("."+this.toolboxButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`))},P.prototype.show=function(o){var h;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=o,this.uiContainer.className=this.toolboxStyleClass.name+" "+((h=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&h!==void 0?h:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},P.prototype.setPanelButtons=function(o){var h,O,U=this;this.panels=o,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((h=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&h!==void 0?h:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((O=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&O!==void 0?O:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(M){var ne;M.uiStyleSettings=U.uiStyleSettings;var ke=document.createElement("div");ke.className=U.toolboxButtonStyleClass.name+" "+((ne=U.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&ne!==void 0?ne:U.toolboxButtonStyleColorsClass.name),ke.innerHTML=M.icon,ke.title=M.title,ke.addEventListener("click",function(){U.panelButtonClick(M)}),U.panelButtons.push(ke),U.buttonRow.appendChild(ke)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},P.prototype.panelButtonClick=function(o){var h=this,O=-1;if(o!==this.activePanel){O=this.panels.indexOf(o),this.panelRow.innerHTML="";var U=o.getUi();U.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(U),this.panelRow.style.display="flex",this.panelRow.style.visibility="visible",this.panelRow.className=this.panelRow.className.replace(this.styles.fadeOutAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeInAnimationClassName,this.activePanel=o}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){h.displayMode==="inline"?h.panelRow.style.display="none":h.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(M,ne){var ke,Ke;M.className=h.toolboxButtonStyleClass.name+" "+(ne===O?""+((ke=h.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&ke!==void 0?ke:h.toolboxActiveButtonStyleColorsClass.name):""+((Ke=h.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Ke!==void 0?Ke:h.toolboxButtonStyleColorsClass.name))})},P}(),fe=function(P,o){this.title=P,this.icon=o},we=function(P){function o(h,O,U,M){var ne=P.call(this,h,M||'')||this;return ne.colors=[],ne.addTransparent=!1,ne.colorBoxes=[],ne.colors=O,ne.currentColor=U,ne.setCurrentColor=ne.setCurrentColor.bind(ne),ne.getColorBox=ne.getColorBox.bind(ne),ne}return Z(o,P),o.prototype.getUi=function(){var h=this,O=document.createElement("div");return O.style.overflow="hidden",O.style.whiteSpace="nowrap",this.colors.forEach(function(U){var M=h.getColorBox(U);O.appendChild(M),h.colorBoxes.push(M)}),O},o.prototype.getColorBox=function(h){var O=this,U=this.uiStyleSettings.toolbarHeight/4,M=this.uiStyleSettings.toolbarHeight-U,ne=document.createElement("div");ne.style.display="inline-block",ne.style.boxSizing="content-box",ne.style.width=M-2+"px",ne.style.height=M-2+"px",ne.style.padding="1px",ne.style.marginRight="2px",ne.style.marginBottom="2px",ne.style.borderWidth="2px",ne.style.borderStyle="solid",ne.style.borderRadius=(M+2)/2+"px",ne.style.borderColor=h===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){O.setCurrentColor(h,ne)});var ke=document.createElement("div");return ke.style.display="inline-block",ke.style.width=M-2+"px",ke.style.height=M-2+"px",ke.style.backgroundColor=h,ke.style.borderRadius=M/2+"px",h==="transparent"&&(ke.style.fill=this.uiStyleSettings.toolboxAccentColor,ke.innerHTML=``),ne.appendChild(ke),ne},o.prototype.setCurrentColor=function(h,O){var U=this;this.currentColor=h,this.colorBoxes.forEach(function(M){M.style.borderColor=M===O?U.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(h)},o}(fe),Ie=function(){function P(o,h,O){this._state="new",this._isSelected=!1,this._container=o,this._overlayContainer=h,this.globalSettings=O,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(P.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),P.prototype.ownsTarget=function(o){return!1},Object.defineProperty(P.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),P.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},P.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},P.prototype.pointerDown=function(o,h){},P.prototype.dblClick=function(o,h){},P.prototype.manipulate=function(o){},P.prototype.pointerUp=function(o){this.stateChanged()},P.prototype.dispose=function(){},P.prototype.addMarkerVisualToContainer=function(o){this.container.childNodes.length>0?this.container.insertBefore(o,this.container.childNodes[0]):this.container.appendChild(o)},P.prototype.getState=function(){return{typeName:P.typeName,state:this.state,notes:this.notes}},P.prototype.restoreState=function(o){this._state=o.state,this.notes=o.notes},P.prototype.scale=function(o,h){},P.prototype.colorChanged=function(o){this.onColorChanged&&this.onColorChanged(o),this.stateChanged()},P.prototype.fillColorChanged=function(o){this.onFillColorChanged&&this.onFillColorChanged(o),this.stateChanged()},P.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var o=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),o.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(o)&&this.onStateChanged(this)}},P.typeName="MarkerBase",P}(),_e=function(){function P(){this.findGripByVisual=this.findGripByVisual.bind(this)}return P.prototype.findGripByVisual=function(o){return this.topLeft.ownsTarget(o)?this.topLeft:this.topCenter.ownsTarget(o)?this.topCenter:this.topRight.ownsTarget(o)?this.topRight:this.centerLeft.ownsTarget(o)?this.centerLeft:this.centerRight.ownsTarget(o)?this.centerRight:this.bottomLeft.ownsTarget(o)?this.bottomLeft:this.bottomCenter.ownsTarget(o)?this.bottomCenter:this.bottomRight.ownsTarget(o)?this.bottomRight:void 0},P}(),Fe=function(){function P(){this.GRIP_SIZE=10,this.visual=G.createGroup(),this.visual.appendChild(G.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(G.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return P.prototype.ownsTarget=function(o){return o===this.visual||o===this.visual.childNodes[0]||o===this.visual.childNodes[1]},P}(),le=function(){function P(){}return P.toITransformMatrix=function(o){return{a:o.a,b:o.b,c:o.c,d:o.d,e:o.e,f:o.f}},P.toSVGMatrix=function(o,h){return o.a=h.a,o.b=h.b,o.c=h.c,o.d=h.d,o.e=h.e,o.f=h.f,o},P}(),ge=function(P){function o(h,O,U){var M=P.call(this,h,O,U)||this;return M.left=0,M.top=0,M.width=0,M.height=0,M.defaultSize={x:50,y:20},M.offsetX=0,M.offsetY=0,M.rotationAngle=0,M.CB_DISTANCE=10,M._suppressMarkerCreateEvent=!1,M.container.transform.baseVal.appendItem(G.createTransform()),M.setupControlBox(),M}return Z(o,P),Object.defineProperty(o.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"visual",{get:function(){return this._visual},set:function(h){this._visual=h;var O=G.createTransform();this._visual.transform.baseVal.appendItem(O)},enumerable:!1,configurable:!0}),o.prototype.ownsTarget=function(h){return!!P.prototype.ownsTarget.call(this,h)||!!(this.controlGrips.findGripByVisual(h)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(h))},o.prototype.pointerDown=function(h,O){P.prototype.pointerDown.call(this,h,O),this.state==="new"&&(this.left=h.x,this.top=h.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var U=this.unrotatePoint(h);if(this.manipulationStartX=U.x,this.manipulationStartY=U.y,this.offsetX=U.x-this.left,this.offsetY=U.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(O),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(O)){this.activeGrip=this.rotatorGrip;var M=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=M.x-this.width/2,this.top=M.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var ne=this.container.transform.baseVal.getItem(0);ne.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(ne,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},o.prototype.pointerUp=function(h){var O=this.state;P.prototype.pointerUp.call(this,h),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(h),this._state="select",O==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},o.prototype.moveVisual=function(h){this.visual.style.transform="translate("+h.x+"px, "+h.y+"px)"},o.prototype.manipulate=function(h){var O=this.unrotatePoint(h);this.state==="creating"?this.resize(h):this.state==="move"?(this.left=this.manipulationStartLeft+(O.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(O.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(O):this.state==="rotate"&&this.rotate(h)},o.prototype.resize=function(h){var O=this.manipulationStartLeft,U=this.manipulationStartWidth,M=this.manipulationStartTop,ne=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:O=this.manipulationStartLeft+h.x-this.manipulationStartX,U=this.manipulationStartWidth+this.manipulationStartLeft-O;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:U=this.manipulationStartWidth+h.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:M=this.manipulationStartTop+h.y-this.manipulationStartY,ne=this.manipulationStartHeight+this.manipulationStartTop-M;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:ne=this.manipulationStartHeight+h.y-this.manipulationStartY}U>=0?(this.left=O,this.width=U):(this.left=O+U,this.width=-U),ne>=0?(this.top=M,this.height=ne):(this.top=M+ne,this.height=-ne),this.setSize()},o.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},o.prototype.rotate=function(h){if(Math.abs(h.x-this.centerX)>.1){var O=Math.sign(h.x-this.centerX);this.rotationAngle=180*Math.atan((h.y-this.centerY)/(h.x-this.centerX))/Math.PI+90*O,this.applyRotation()}},o.prototype.applyRotation=function(){var h=this.container.transform.baseVal.getItem(0);h.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(h,0)},o.prototype.rotatePoint=function(h){if(this.rotationAngle===0)return h;var O=this.container.getCTM(),U=G.createPoint(h.x,h.y);return{x:(U=U.matrixTransform(O)).x,y:U.y}},o.prototype.unrotatePoint=function(h){if(this.rotationAngle===0)return h;var O=this.container.getCTM();O=O.inverse();var U=G.createPoint(h.x,h.y);return{x:(U=U.matrixTransform(O)).x,y:U.y}},o.prototype.select=function(){P.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},o.prototype.deselect=function(){P.prototype.deselect.call(this),this.controlBox.style.display="none"},o.prototype.setupControlBox=function(){this.controlBox=G.createGroup();var h=G.createTransform();h.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(h),this.container.appendChild(this.controlBox),this.controlRect=G.createRect(this.width+this.CB_DISTANCE,this.height+this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"],["fill","transparent"],["pointer-events","none"]]),this.controlBox.appendChild(this.controlRect),this.globalSettings.disableRotation!==!0&&(this.rotatorGripLine=G.createLine((this.width+2*this.CB_DISTANCE)/2,this.top-this.CB_DISTANCE,(this.width+2*this.CB_DISTANCE)/2,this.top-3*this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.appendChild(this.rotatorGripLine)),this.controlGrips=new _e,this.addControlGrips(),this.controlBox.style.display="none"},o.prototype.adjustControlBox=function(){var h=this.controlBox.transform.baseVal.getItem(0);h.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(h,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),this.rotatorGripLine!==void 0&&(this.rotatorGripLine.setAttribute("x1",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y1",(-this.CB_DISTANCE/2).toString()),this.rotatorGripLine.setAttribute("x2",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y2",(3*-this.CB_DISTANCE).toString())),this.positionGrips()},o.prototype.addControlGrips=function(){this.controlGrips.topLeft=this.createGrip(),this.controlGrips.topCenter=this.createGrip(),this.controlGrips.topRight=this.createGrip(),this.controlGrips.centerLeft=this.createGrip(),this.controlGrips.centerRight=this.createGrip(),this.controlGrips.bottomLeft=this.createGrip(),this.controlGrips.bottomCenter=this.createGrip(),this.controlGrips.bottomRight=this.createGrip(),this.globalSettings.disableRotation!==!0&&(this.rotatorGrip=this.createGrip()),this.positionGrips()},o.prototype.createGrip=function(){var h=new Fe;return h.visual.transform.baseVal.appendItem(G.createTransform()),this.controlBox.appendChild(h.visual),h},o.prototype.positionGrips=function(){var h=this.controlGrips.topLeft.GRIP_SIZE,O=-h/2,U=O,M=(this.width+this.CB_DISTANCE)/2-h/2,ne=(this.height+this.CB_DISTANCE)/2-h/2,ke=this.height+this.CB_DISTANCE-h/2,Ke=this.width+this.CB_DISTANCE-h/2;this.positionGrip(this.controlGrips.topLeft.visual,O,U),this.positionGrip(this.controlGrips.topCenter.visual,M,U),this.positionGrip(this.controlGrips.topRight.visual,Ke,U),this.positionGrip(this.controlGrips.centerLeft.visual,O,ne),this.positionGrip(this.controlGrips.centerRight.visual,Ke,ne),this.positionGrip(this.controlGrips.bottomLeft.visual,O,ke),this.positionGrip(this.controlGrips.bottomCenter.visual,M,ke),this.positionGrip(this.controlGrips.bottomRight.visual,Ke,ke),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,M,U-3*this.CB_DISTANCE)},o.prototype.positionGrip=function(h,O,U){var M=h.transform.baseVal.getItem(0);M.setTranslate(O,U),h.transform.baseVal.replaceItem(M,0)},o.prototype.hideControlBox=function(){this.controlBox.style.display="none"},o.prototype.showControlBox=function(){this.controlBox.style.display=""},o.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:le.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:le.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},P.prototype.getState.call(this))},o.prototype.restoreState=function(h){P.prototype.restoreState.call(this,h);var O=h;this.left=O.left,this.top=O.top,this.width=O.width,this.height=O.height,this.rotationAngle=O.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(le.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,O.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(le.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,O.containerTransformMatrix))},o.prototype.scale=function(h,O){P.prototype.scale.call(this,h,O);var U=this.rotatePoint({x:this.left,y:this.top}),M=this.unrotatePoint({x:U.x*h,y:U.y*O});this.left=M.x,this.top=M.y,this.width=this.width*h,this.height=this.height*O,this.adjustControlBox()},o}(Ie),Ee=function(P){function o(h,O,U){var M=P.call(this,h,O,U)||this;return M.fillColor="transparent",M.strokeColor="transparent",M.strokeWidth=0,M.strokeDasharray="",M.opacity=1,M.setStrokeColor=M.setStrokeColor.bind(M),M.setFillColor=M.setFillColor.bind(M),M.setStrokeWidth=M.setStrokeWidth.bind(M),M.setStrokeDasharray=M.setStrokeDasharray.bind(M),M.createVisual=M.createVisual.bind(M),M}return Z(o,P),o.prototype.ownsTarget=function(h){return!(!P.prototype.ownsTarget.call(this,h)&&h!==this.visual)},o.prototype.createVisual=function(){this.visual=G.createRect(1,1,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},o.prototype.pointerDown=function(h,O){P.prototype.pointerDown.call(this,h,O),this.state==="new"&&(this.createVisual(),this.moveVisual(h),this._state="creating")},o.prototype.manipulate=function(h){P.prototype.manipulate.call(this,h)},o.prototype.resize=function(h){P.prototype.resize.call(this,h),this.setSize()},o.prototype.setSize=function(){P.prototype.setSize.call(this),G.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},o.prototype.pointerUp=function(h){P.prototype.pointerUp.call(this,h),this.setSize()},o.prototype.setStrokeColor=function(h){this.strokeColor=h,this.visual&&G.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(h),this.stateChanged()},o.prototype.setFillColor=function(h){this.fillColor=h,this.visual&&G.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},o.prototype.setStrokeWidth=function(h){this.strokeWidth=h,this.visual&&G.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},o.prototype.setStrokeDasharray=function(h){this.strokeDasharray=h,this.visual&&G.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},o.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},P.prototype.getState.call(this))},o.prototype.restoreState=function(h){var O=h;this.fillColor=O.fillColor,this.strokeColor=O.strokeColor,this.strokeWidth=O.strokeWidth,this.strokeDasharray=O.strokeDasharray,this.opacity=O.opacity,this.createVisual(),P.prototype.restoreState.call(this,h),this.setSize()},o.prototype.scale=function(h,O){P.prototype.scale.call(this,h,O),this.setSize()},o.title="Rectangle marker",o}(ge),Se=function(P){function o(h,O,U,M){var ne=P.call(this,h,M||'')||this;return ne.widths=[],ne.widthBoxes=[],ne.widths=O,ne.currentWidth=U,ne.setCurrentWidth=ne.setCurrentWidth.bind(ne),ne}return Z(o,P),o.prototype.getUi=function(){var h=this,O=document.createElement("div");return O.style.display="flex",O.style.overflow="hidden",O.style.flexGrow="2",this.widths.forEach(function(U){var M=document.createElement("div");M.style.display="flex",M.style.flexGrow="2",M.style.alignItems="center",M.style.justifyContent="space-between",M.style.padding="5px",M.style.borderWidth="2px",M.style.borderStyle="solid",M.style.borderColor=U===h.currentWidth?h.uiStyleSettings.toolboxAccentColor:"transparent",M.addEventListener("click",function(){h.setCurrentWidth(U,M)}),O.appendChild(M);var ne=document.createElement("div");ne.innerText=U.toString(),ne.style.marginRight="5px",M.appendChild(ne);var ke=document.createElement("div");ke.style.minHeight="20px",ke.style.flexGrow="2",ke.style.display="flex",ke.style.alignItems="center";var Ke=document.createElement("hr");Ke.style.minWidth="20px",Ke.style.border="0px",Ke.style.borderTop=U+"px solid "+h.uiStyleSettings.toolboxColor,Ke.style.flexGrow="2",ke.appendChild(Ke),M.appendChild(ke),h.widthBoxes.push(M)}),O},o.prototype.setCurrentWidth=function(h,O){var U=this;this.currentWidth=h,this.widthBoxes.forEach(function(M){M.style.borderColor=M===O?U.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},o}(fe),Ae=function(P){function o(h,O,U,M){var ne=P.call(this,h,M||'')||this;return ne.styles=[],ne.styleBoxes=[],ne.styles=O,ne.currentStyle=U,ne.setCurrentStyle=ne.setCurrentStyle.bind(ne),ne}return Z(o,P),o.prototype.getUi=function(){var h=this,O=document.createElement("div");return O.style.display="flex",O.style.overflow="hidden",O.style.flexGrow="2",this.styles.forEach(function(U){var M=document.createElement("div");M.style.display="flex",M.style.alignItems="center",M.style.justifyContent="space-between",M.style.padding="5px",M.style.borderWidth="2px",M.style.borderStyle="solid",M.style.overflow="hidden",M.style.maxWidth=100/h.styles.length-5+"%",M.style.borderColor=U===h.currentStyle?h.uiStyleSettings.toolboxAccentColor:"transparent",M.addEventListener("click",function(){h.setCurrentStyle(U,M)}),O.appendChild(M);var ne=document.createElement("div");ne.style.minHeight="20px",ne.style.flexGrow="2",ne.style.overflow="hidden";var ke=``;ne.innerHTML=ke,M.appendChild(ne),h.styleBoxes.push(M)}),O},o.prototype.setCurrentStyle=function(h,O){var U=this;this.currentStyle=h,this.styleBoxes.forEach(function(M){M.style.borderColor=M===O?U.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},o}(fe),Le=function(P){function o(h,O,U){var M=P.call(this,h,O,U)||this;return M.strokeColor=U.defaultColor,M.strokeWidth=U.defaultStrokeWidth,M.strokeDasharray=U.defaultStrokeDasharray,M.strokePanel=new we("Line color",U.defaultColorSet,U.defaultColor),M.strokePanel.onColorChanged=M.setStrokeColor,M.strokeWidthPanel=new Se("Line width",U.defaultStrokeWidths,U.defaultStrokeWidth),M.strokeWidthPanel.onWidthChanged=M.setStrokeWidth,M.strokeStylePanel=new Ae("Line style",U.defaultStrokeDasharrays,U.defaultStrokeDasharray),M.strokeStylePanel.onStyleChanged=M.setStrokeDasharray,M}return Z(o,P),Object.defineProperty(o.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),o.prototype.getState=function(){var h=P.prototype.getState.call(this);return h.typeName=o.typeName,h},o.typeName="FrameMarker",o.title="Frame marker",o.icon='',o}(Ee),xe=function(){this.defaultColorSet=["#EF4444","#10B981","#2563EB","#FFFF00","#7C3AED","#F472B6","#000000","#FFFFFF"],this.defaultColor=this.defaultColorSet[0],this.defaultFillColor=this.defaultColorSet[0],this.defaultStrokeColor=this.defaultColorSet[7],this.defaultHighlightColor=this.defaultColorSet[3],this.defaultStrokeWidth=3,this.defaultStrokeDasharray="",this.defaultHighlightOpacity=.5,this.defaultFontFamily="Helvetica, Arial, sans-serif",this.defaultStrokeWidths=[1,2,3,5,10],this.defaultStrokeDasharrays=["","3","12 3","9 6 3 6"],this.defaultOpacitySteps=[.1,.25,.5,.75,1],this.displayMode="inline",this.defaultFontFamilies=['Times, "Times New Roman", serif',"Helvetica, Arial, sans-serif",'Courier, "Courier New", monospace',"cursive","fantasy"],this.popupMargin=30,this.newFreehandMarkerOnPointerUp=!1,this.defaultColorsFollowCurrentColors=!1,this.freehandPixelRatio=1,this.disableRotation=!1},Oe=function(P){function o(h,O,U){var M=P.call(this,h,O,U)||this;return M.x1=0,M.y1=0,M.x2=0,M.y2=0,M.defaultLength=50,M.manipulationStartX=0,M.manipulationStartY=0,M.manipulationStartX1=0,M.manipulationStartY1=0,M.manipulationStartX2=0,M.manipulationStartY2=0,M.setupControlBox(),M}return Z(o,P),o.prototype.ownsTarget=function(h){return!!P.prototype.ownsTarget.call(this,h)||!(!this.grip1.ownsTarget(h)&&!this.grip2.ownsTarget(h))},o.prototype.pointerDown=function(h,O){P.prototype.pointerDown.call(this,h,O),this.manipulationStartX=h.x,this.manipulationStartY=h.y,this.state==="new"&&(this.x1=h.x,this.y1=h.y,this.x2=h.x,this.y2=h.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,this.state!=="new"&&(this.select(),this.grip1.ownsTarget(O)?this.activeGrip=this.grip1:this.grip2.ownsTarget(O)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},o.prototype.pointerUp=function(h){var O=this.state;P.prototype.pointerUp.call(this,h),this.state==="creating"&&Math.abs(this.x1-this.x2)<10&&Math.abs(this.y1-this.y2)<10?(this.x2=this.x1+this.defaultLength,this.adjustVisual(),this.adjustControlBox()):this.manipulate(h),this._state="select",O==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},o.prototype.adjustVisual=function(){},o.prototype.manipulate=function(h){this.state==="creating"?this.resize(h):this.state==="move"?(this.x1=this.manipulationStartX1+h.x-this.manipulationStartX,this.y1=this.manipulationStartY1+h.y-this.manipulationStartY,this.x2=this.manipulationStartX2+h.x-this.manipulationStartX,this.y2=this.manipulationStartY2+h.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(h)},o.prototype.resize=function(h){switch(this.activeGrip){case this.grip1:this.x1=h.x,this.y1=h.y;break;case this.grip2:case void 0:this.x2=h.x,this.y2=h.y}this.adjustVisual(),this.adjustControlBox()},o.prototype.select=function(){P.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},o.prototype.deselect=function(){P.prototype.deselect.call(this),this.controlBox.style.display="none"},o.prototype.setupControlBox=function(){this.controlBox=G.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},o.prototype.adjustControlBox=function(){this.positionGrips()},o.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},o.prototype.createGrip=function(){var h=new Fe;return h.visual.transform.baseVal.appendItem(G.createTransform()),this.controlBox.appendChild(h.visual),h},o.prototype.positionGrips=function(){var h=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-h/2,this.y1-h/2),this.positionGrip(this.grip2.visual,this.x2-h/2,this.y2-h/2)},o.prototype.positionGrip=function(h,O,U){var M=h.transform.baseVal.getItem(0);M.setTranslate(O,U),h.transform.baseVal.replaceItem(M,0)},o.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},P.prototype.getState.call(this))},o.prototype.restoreState=function(h){P.prototype.restoreState.call(this,h);var O=h;this.x1=O.x1,this.y1=O.y1,this.x2=O.x2,this.y2=O.y2},o.prototype.scale=function(h,O){P.prototype.scale.call(this,h,O),this.x1=this.x1*h,this.y1=this.y1*O,this.x2=this.x2*h,this.y2=this.y2*O,this.adjustVisual(),this.adjustControlBox()},o}(Ie),Ue=function(P){function o(h,O,U){var M=P.call(this,h,O,U)||this;return M.strokeColor="transparent",M.strokeWidth=0,M.strokeDasharray="",M.setStrokeColor=M.setStrokeColor.bind(M),M.setStrokeWidth=M.setStrokeWidth.bind(M),M.setStrokeDasharray=M.setStrokeDasharray.bind(M),M.strokeColor=U.defaultColor,M.strokeWidth=U.defaultStrokeWidth,M.strokeDasharray=U.defaultStrokeDasharray,M.strokePanel=new we("Line color",U.defaultColorSet,U.defaultColor),M.strokePanel.onColorChanged=M.setStrokeColor,M.strokeWidthPanel=new Se("Line width",U.defaultStrokeWidths,U.defaultStrokeWidth),M.strokeWidthPanel.onWidthChanged=M.setStrokeWidth,M.strokeStylePanel=new Ae("Line style",U.defaultStrokeDasharrays,U.defaultStrokeDasharray),M.strokeStylePanel.onStyleChanged=M.setStrokeDasharray,M}return Z(o,P),o.prototype.ownsTarget=function(h){return!(!P.prototype.ownsTarget.call(this,h)&&h!==this.visual&&h!==this.selectorLine&&h!==this.visibleLine)},o.prototype.createVisual=function(){this.visual=G.createGroup(),this.selectorLine=G.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=G.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.visual.appendChild(this.selectorLine),this.visual.appendChild(this.visibleLine),this.addMarkerVisualToContainer(this.visual)},o.prototype.pointerDown=function(h,O){P.prototype.pointerDown.call(this,h,O),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},o.prototype.adjustVisual=function(){this.selectorLine&&this.visibleLine&&(this.selectorLine.setAttribute("x1",this.x1.toString()),this.selectorLine.setAttribute("y1",this.y1.toString()),this.selectorLine.setAttribute("x2",this.x2.toString()),this.selectorLine.setAttribute("y2",this.y2.toString()),this.visibleLine.setAttribute("x1",this.x1.toString()),this.visibleLine.setAttribute("y1",this.y1.toString()),this.visibleLine.setAttribute("x2",this.x2.toString()),this.visibleLine.setAttribute("y2",this.y2.toString()),G.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),G.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),G.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},o.prototype.setStrokeColor=function(h){this.strokeColor=h,this.adjustVisual(),this.colorChanged(h)},o.prototype.setStrokeWidth=function(h){this.strokeWidth=h,this.adjustVisual()},o.prototype.setStrokeDasharray=function(h){this.strokeDasharray=h,this.adjustVisual(),this.stateChanged()},Object.defineProperty(o.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),o.prototype.getState=function(){var h=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},P.prototype.getState.call(this));return h.typeName=o.typeName,h},o.prototype.restoreState=function(h){P.prototype.restoreState.call(this,h);var O=h;this.strokeColor=O.strokeColor,this.strokeWidth=O.strokeWidth,this.strokeDasharray=O.strokeDasharray,this.createVisual(),this.adjustVisual()},o.typeName="LineMarker",o.title="Line marker",o.icon='',o}(Oe),Te=function(P){function o(h,O,U,M){var ne=P.call(this,h,M||'')||this;return ne.fonts=[],ne.fontBoxes=[],ne.fonts=O,ne.currentFont=U,ne.setCurrentFont=ne.setCurrentFont.bind(ne),ne}return Z(o,P),o.prototype.getUi=function(){var h=this,O=document.createElement("div");return O.style.overflow="hidden",O.style.flexGrow="2",this.fonts.forEach(function(U){var M=document.createElement("div");M.style.display="inline-block",M.style.alignItems="center",M.style.justifyContent="space-between",M.style.padding="5px",M.style.borderWidth="2px",M.style.borderStyle="solid",M.style.overflow="hidden",M.style.maxWidth=100/h.fonts.length-5+"%",M.style.borderColor=U===h.currentFont?h.uiStyleSettings.toolboxAccentColor:"transparent",M.addEventListener("click",function(){h.setCurrentFont(U,M)}),O.appendChild(M);var ne=document.createElement("div");ne.style.display="flex",ne.style.minHeight="20px",ne.style.flexGrow="2",ne.style.fontFamily=U,ne.style.overflow="hidden";var ke=document.createElement("div");ke.style.whiteSpace="nowrap",ke.style.overflow="hidden",ke.style.textOverflow="ellipsis",ke.innerHTML="The quick brown fox jumps over the lazy dog",ne.appendChild(ke),M.appendChild(ne),h.fontBoxes.push(M)}),O},o.prototype.setCurrentFont=function(h,O){var U=this;this.currentFont=h,this.fontBoxes.forEach(function(M){M.style.borderColor=M===O?U.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},o}(fe),Ne=function(P){function o(h,O,U){var M=P.call(this,h,O,U)||this;return M.color="transparent",M.padding=5,M.DEFAULT_TEXT="your text here",M.text=M.DEFAULT_TEXT,M.isMoved=!1,M.color=U.defaultColor,M.fontFamily=U.defaultFontFamily,M.defaultSize={x:100,y:30},M.setColor=M.setColor.bind(M),M.setFont=M.setFont.bind(M),M.renderText=M.renderText.bind(M),M.sizeText=M.sizeText.bind(M),M.textEditDivClicked=M.textEditDivClicked.bind(M),M.showTextEditor=M.showTextEditor.bind(M),M.setSize=M.setSize.bind(M),M.positionTextEditor=M.positionTextEditor.bind(M),M.colorPanel=new we("Color",U.defaultColorSet,U.defaultColor),M.colorPanel.onColorChanged=M.setColor,M.fontFamilyPanel=new Te("Font",U.defaultFontFamilies,U.defaultFontFamily),M.fontFamilyPanel.onFontChanged=M.setFont,M}return Z(o,P),o.prototype.ownsTarget=function(h){if(P.prototype.ownsTarget.call(this,h)||h===this.visual||h===this.textElement||h===this.bgRectangle)return!0;var O=!1;return this.textElement.childNodes.forEach(function(U){U===h&&(O=!0)}),O},o.prototype.createVisual=function(){this.visual=G.createGroup(),this.bgRectangle=G.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=G.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(G.createTransform()),this.textElement.transform.baseVal.appendItem(G.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},o.prototype.pointerDown=function(h,O){P.prototype.pointerDown.call(this,h,O),this.isMoved=!1,this.pointerDownPoint=h,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(h),this._state="creating")},o.prototype.renderText=function(){var h=this;if(this.textElement){for(;this.textElement.lastChild;)this.textElement.removeChild(this.textElement.lastChild);this.text.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/).forEach(function(O){h.textElement.appendChild(G.createTSpan(O.trim()===""?" ":O.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},o.prototype.getTextScale=function(){var h=this.textElement.getBBox(),O=1;if(h.width>0&&h.height>0){var U=(1*this.width-this.width*this.padding*2/100)/h.width,M=(1*this.height-this.height*this.padding*2/100)/h.height;O=Math.min(U,M)}return O},o.prototype.getTextPosition=function(h){var O=this.textElement.getBBox(),U=0,M=0;return O.width>0&&O.height>0&&(U=(this.width-O.width*h)/2,M=this.height/2-O.height*h/2),{x:U,y:M}},o.prototype.sizeText=function(){var h=this.textElement.getBBox(),O=this.getTextScale(),U=this.getTextPosition(O);U.y-=h.y*O,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+U.x+"px, "+U.y+"px) scale("+O+", "+O+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(U.x,U.y),this.textElement.transform.baseVal.getItem(1).setScale(O,O))},o.prototype.manipulate=function(h){P.prototype.manipulate.call(this,h),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(h.x-this.pointerDownPoint.x)>5||Math.abs(h.y-this.pointerDownPoint.y)>5)},o.prototype.resize=function(h){P.prototype.resize.call(this,h),this.isMoved=!0,this.setSize(),this.sizeText()},o.prototype.setSize=function(){P.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(G.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),G.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},o.prototype.pointerUp=function(h){var O=this.state;O==="creating"&&(this._suppressMarkerCreateEvent=!0),P.prototype.pointerUp.call(this,h),this.setSize(),(O==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},o.prototype.showTextEditor=function(){var h=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditor=document.createElement("div"),this.textEditor.style.position="absolute",this.textEditor.style.fontFamily=this.fontFamily,this.textEditor.style.lineHeight="1em",this.textEditor.innerText=this.text,this.textEditor.contentEditable="true",this.textEditor.style.color=this.color,this.textEditor.style.whiteSpace="pre",this.positionTextEditor(),this.textEditor.addEventListener("pointerup",function(O){O.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var O=Number.parseFloat(h.textEditor.style.fontSize);h.textEditor.clientWidth>=Number.parseInt(h.textEditor.style.maxWidth)&&O>.9;)O-=.1,h.textEditor.style.fontSize=Math.max(O,.9)+"em"}),this.textEditor.addEventListener("keyup",function(O){O.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(O){if(O.clipboardData){var U=O.clipboardData.getData("text"),M=window.getSelection();if(!M.rangeCount)return!1;M.deleteFromDocument(),M.getRangeAt(0).insertNode(document.createTextNode(U)),O.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){h.textEditDivClicked(h.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},o.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var h=this.getTextScale(),O=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),U=this.textElement.getBBox(),M={x:U.width*h,y:U.height*h};O.x-=M.x/2,O.y-=M.y/2,this.textEditor.style.top=O.y+"px",this.textEditor.style.left=O.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-O.x+"px",this.textEditor.style.fontSize=Math.max(16*h,12)+"px",this.textElement.style.display="none"}},o.prototype.textEditDivClicked=function(h){this.text=h.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},o.prototype.select=function(){P.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},o.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),P.prototype.deselect.call(this)},o.prototype.dblClick=function(h,O){P.prototype.dblClick.call(this,h,O),this.showTextEditor()},o.prototype.setColor=function(h){this.textElement&&G.setAttributes(this.textElement,[["fill",h]]),this.color=h,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(h)},o.prototype.setFont=function(h){this.textElement&&G.setAttributes(this.textElement,[["font-family",h]]),this.fontFamily=h,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},o.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},o.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(o.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),o.prototype.getState=function(){var h=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},P.prototype.getState.call(this));return h.typeName=o.typeName,h},o.prototype.restoreState=function(h){var O=h;this.color=O.color,this.fontFamily=O.fontFamily,this.padding=O.padding,this.text=O.text,this.createVisual(),P.prototype.restoreState.call(this,h),this.setSize()},o.prototype.scale=function(h,O){P.prototype.scale.call(this,h,O),this.setSize(),this.sizeText(),this.positionTextEditor()},o.typeName="TextMarker",o.title="Text marker",o.icon='',o}(ge),oe=function(P){function o(h,O,U){var M=P.call(this,h,O,U)||this;return M.color="transparent",M.lineWidth=3,M.drawing=!1,M.pixelRatio=1,M.color=U.defaultColor,M.lineWidth=U.defaultStrokeWidth,M.pixelRatio=U.freehandPixelRatio,M.setColor=M.setColor.bind(M),M.addCanvas=M.addCanvas.bind(M),M.finishCreation=M.finishCreation.bind(M),M.setLineWidth=M.setLineWidth.bind(M),M.colorPanel=new we("Color",U.defaultColorSet,U.defaultColor),M.colorPanel.onColorChanged=M.setColor,M.lineWidthPanel=new Se("Line width",U.defaultStrokeWidths,U.defaultStrokeWidth),M.lineWidthPanel.onWidthChanged=M.setLineWidth,M}return Z(o,P),o.prototype.ownsTarget=function(h){return!(!P.prototype.ownsTarget.call(this,h)&&h!==this.visual&&h!==this.drawingImage)},o.prototype.createVisual=function(){this.visual=G.createGroup(),this.drawingImage=G.createImage(),this.visual.appendChild(this.drawingImage);var h=G.createTransform();this.visual.transform.baseVal.appendItem(h),this.addMarkerVisualToContainer(this.visual)},o.prototype.pointerDown=function(h,O){this.state==="new"&&(this.addCanvas(),this.createVisual(),this._state="creating"),this.state==="creating"?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(h.x,h.y),this.drawing=!0):P.prototype.pointerDown.call(this,h,O)},o.prototype.manipulate=function(h){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(h.x,h.y),this.canvasContext.stroke()):P.prototype.manipulate.call(this,h)},o.prototype.resize=function(h){P.prototype.resize.call(this,h),G.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),G.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},o.prototype.pointerUp=function(h){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):P.prototype.pointerUp.call(this,h)},o.prototype.addCanvas=function(){this.overlayContainer.innerHTML="",this.canvasElement=document.createElement("canvas"),this.canvasElement.width=this.overlayContainer.clientWidth*this.pixelRatio,this.canvasElement.height=this.overlayContainer.clientHeight*this.pixelRatio,this.canvasContext=this.canvasElement.getContext("2d"),this.canvasContext.scale(this.pixelRatio,this.pixelRatio),this.overlayContainer.appendChild(this.canvasElement)},o.prototype.select=function(){this.state==="creating"&&this.finishCreation(),P.prototype.select.call(this)},o.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),P.prototype.deselect.call(this)},o.prototype.finishCreation=function(){for(var h=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),O=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],U=O[0],M=O[1],ne=O[2],ke=O[3],Ke=!1,We=0;We0&&(Ke=!0,Weke&&(ke=We),Pe>ne&&(ne=Pe));if(Ke){this.left=U/this.pixelRatio,this.top=M/this.pixelRatio,this.width=(ne-U)/this.pixelRatio,this.height=(ke-M)/this.pixelRatio;var Ye=document.createElement("canvas");Ye.width=ne-U,Ye.height=ke-M,Ye.getContext("2d").putImageData(this.canvasContext.getImageData(U,M,ne-U,ke-M),0,0),this.drawingImgUrl=Ye.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},o.prototype.setDrawingImage=function(){G.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),G.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},o.prototype.setColor=function(h){this.color=h,this.colorChanged(h)},o.prototype.setLineWidth=function(h){this.lineWidth=h},Object.defineProperty(o.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),o.prototype.getState=function(){var h=Object.assign({drawingImgUrl:this.drawingImgUrl},P.prototype.getState.call(this));return h.typeName=o.typeName,h},o.prototype.restoreState=function(h){this.createVisual(),P.prototype.restoreState.call(this,h),this.drawingImgUrl=h.drawingImgUrl,this.setDrawingImage()},o.prototype.scale=function(h,O){P.prototype.scale.call(this,h,O),this.setDrawingImage()},o.typeName="FreehandMarker",o.title="Freehand marker",o.icon='',o}(ge),re=function(P){function o(h,O,U){var M=P.call(this,h,U||'')||this;return M.typeBoxes=[],M.currentType=O,M.setCurrentType=M.setCurrentType.bind(M),M}return Z(o,P),o.prototype.getUi=function(){var h=this,O=document.createElement("div");O.style.display="flex",O.style.overflow="hidden",O.style.flexGrow="2";for(var U=function(ke){var Ke="both";switch(ke){case 0:Ke="both";break;case 1:Ke="start";break;case 2:Ke="end";break;case 3:Ke="none"}var We=document.createElement("div");if(We.style.display="flex",We.style.flexGrow="2",We.style.alignItems="center",We.style.justifyContent="space-between",We.style.padding="5px",We.style.borderWidth="2px",We.style.borderStyle="solid",We.style.borderColor=Ke===M.currentType?M.uiStyleSettings.toolboxAccentColor:"transparent",We.addEventListener("click",function(){h.setCurrentType(Ke,We)}),O.appendChild(We),Ke==="both"||Ke==="start"){var Pe=document.createElement("div");Pe.style.display="flex",Pe.style.alignItems="center",Pe.style.minHeight="20px",Pe.innerHTML=``,Pe.style.marginLeft="5px",We.appendChild(Pe)}var Ye=document.createElement("div");Ye.style.display="flex",Ye.style.alignItems="center",Ye.style.minHeight="20px",Ye.style.flexGrow="2";var ze=document.createElement("hr");if(ze.style.minWidth="20px",ze.style.border="0px",ze.style.borderTop="3px solid "+(M.uiStyleSettings!==void 0?M.uiStyleSettings.toolboxColor:"#eeeeee"),ze.style.flexGrow="2",Ye.appendChild(ze),We.appendChild(Ye),Ke==="both"||Ke==="end"){var ot=document.createElement("div");ot.style.display="flex",ot.style.alignItems="center",ot.style.minHeight="20px",ot.innerHTML=``,ot.style.marginRight="5px",We.appendChild(ot)}M.typeBoxes.push(We)},M=this,ne=0;ne<4;ne++)U(ne);return O},o.prototype.setCurrentType=function(h,O){var U=this;this.currentType=h,this.typeBoxes.forEach(function(M){M.style.borderColor=M===O?U.uiStyleSettings!==void 0?U.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},o}(fe),ae=function(P){function o(h,O,U){var M=P.call(this,h,O,U)||this;return M.arrowType="end",M.arrowBaseHeight=10,M.arrowBaseWidth=10,M.getArrowPoints=M.getArrowPoints.bind(M),M.setArrowType=M.setArrowType.bind(M),M.arrowTypePanel=new re("Arrow type","end"),M.arrowTypePanel.onArrowTypeChanged=M.setArrowType,M}return Z(o,P),o.prototype.ownsTarget=function(h){return!(!P.prototype.ownsTarget.call(this,h)&&h!==this.arrow1&&h!==this.arrow2)},o.prototype.getArrowPoints=function(h,O){var U=this.arrowBaseWidth+2*this.strokeWidth,M=this.arrowBaseHeight+2*this.strokeWidth;return h-U/2+","+(O+M/2)+" "+h+","+(O-M/2)+" "+(h+U/2)+","+(O+M/2)},o.prototype.createTips=function(){this.arrow1=G.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(G.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=G.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(G.createTransform()),this.visual.appendChild(this.arrow2)},o.prototype.pointerDown=function(h,O){P.prototype.pointerDown.call(this,h,O),this.state==="creating"&&this.createTips()},o.prototype.adjustVisual=function(){if(P.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2&&(this.arrow1.style.display=this.arrowType==="both"||this.arrowType==="start"?"":"none",this.arrow2.style.display=this.arrowType==="both"||this.arrowType==="end"?"":"none",G.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),G.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var h=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),O=this.arrow1.transform.baseVal.getItem(0);O.setRotate(h,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(O,0);var U=this.arrow2.transform.baseVal.getItem(0);U.setRotate(h+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(U,0)}},o.prototype.setArrowType=function(h){this.arrowType=h,this.adjustVisual(),this.stateChanged()},Object.defineProperty(o.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),o.prototype.getState=function(){var h=Object.assign({arrowType:this.arrowType},P.prototype.getState.call(this));return h.typeName=o.typeName,h},o.prototype.restoreState=function(h){P.prototype.restoreState.call(this,h);var O=h;this.arrowType=O.arrowType,this.createTips(),this.adjustVisual()},o.typeName="ArrowMarker",o.title="Arrow marker",o.icon='',o}(Ue),W=function(P){function o(h,O,U){var M=P.call(this,h,O,U)||this;return M.fillColor=U.defaultFillColor,M.strokeWidth=0,M.fillPanel=new we("Color",U.defaultColorSet,U.defaultFillColor),M.fillPanel.onColorChanged=M.setFillColor,M}return Z(o,P),Object.defineProperty(o.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),o.prototype.getState=function(){var h=P.prototype.getState.call(this);return h.typeName=o.typeName,h},o.typeName="CoverMarker",o.title="Cover marker",o.icon='',o}(Ee),H=function(P){function o(h,O,U,M){var ne=P.call(this,h,M||'')||this;return ne.opacities=[],ne.opacityBoxes=[],ne.opacities=O,ne.currentOpacity=U,ne.setCurrentOpacity=ne.setCurrentOpacity.bind(ne),ne}return Z(o,P),o.prototype.getUi=function(){var h=this,O=document.createElement("div");return O.style.display="flex",O.style.overflow="hidden",O.style.flexGrow="2",O.style.justifyContent="space-between",this.opacities.forEach(function(U){var M=document.createElement("div");M.style.display="flex",M.style.alignItems="center",M.style.justifyContent="center",M.style.padding="5px",M.style.borderWidth="2px",M.style.borderStyle="solid",M.style.borderColor=U===h.currentOpacity?h.uiStyleSettings.toolboxAccentColor:"transparent",M.addEventListener("click",function(){h.setCurrentOpacity(U,M)}),O.appendChild(M);var ne=document.createElement("div");ne.innerText=100*U+"%",M.appendChild(ne),h.opacityBoxes.push(M)}),O},o.prototype.setCurrentOpacity=function(h,O){var U=this;this.currentOpacity=h,this.opacityBoxes.forEach(function(M){M.style.borderColor=M===O?U.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},o}(fe),Y=function(P){function o(h,O,U){var M=P.call(this,h,O,U)||this;return M.setOpacity=M.setOpacity.bind(M),M.fillColor=U.defaultHighlightColor,M.strokeWidth=0,M.opacity=U.defaultHighlightOpacity,M.fillPanel=new we("Color",U.defaultColorSet,M.fillColor),M.fillPanel.onColorChanged=M.setFillColor,M.opacityPanel=new H("Opacity",U.defaultOpacitySteps,M.opacity),M.opacityPanel.onOpacityChanged=M.setOpacity,M}return Z(o,P),o.prototype.setOpacity=function(h){this.opacity=h,this.visual&&G.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(o.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),o.prototype.getState=function(){var h=P.prototype.getState.call(this);return h.typeName=o.typeName,h},o.typeName="HighlightMarker",o.title="Highlight marker",o.icon='',o}(W),ee='',me=function(P){function o(h,O,U){var M=P.call(this,h,O,U)||this;return M.bgColor="transparent",M.tipPosition={x:0,y:0},M.tipBase1Position={x:0,y:0},M.tipBase2Position={x:0,y:0},M.tipMoving=!1,M.color=U.defaultStrokeColor,M.bgColor=U.defaultFillColor,M.fontFamily=U.defaultFontFamily,M.defaultSize={x:100,y:30},M.setBgColor=M.setBgColor.bind(M),M.getTipPoints=M.getTipPoints.bind(M),M.positionTip=M.positionTip.bind(M),M.setTipPoints=M.setTipPoints.bind(M),M.colorPanel=new we("Text color",U.defaultColorSet,M.color,''),M.colorPanel.onColorChanged=M.setColor,M.bgColorPanel=new we("Fill color",U.defaultColorSet,M.bgColor,ee),M.bgColorPanel.onColorChanged=M.setBgColor,M.fontFamilyPanel=new Te("Font",U.defaultFontFamilies,U.defaultFontFamily),M.fontFamilyPanel.onFontChanged=M.setFont,M.tipGrip=new Fe,M.tipGrip.visual.transform.baseVal.appendItem(G.createTransform()),M.controlBox.appendChild(M.tipGrip.visual),M}return Z(o,P),o.prototype.ownsTarget=function(h){return P.prototype.ownsTarget.call(this,h)||this.tipGrip.ownsTarget(h)||this.tip===h},o.prototype.createTip=function(){G.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=G.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},o.prototype.pointerDown=function(h,O){this.state==="new"&&P.prototype.pointerDown.call(this,h,O),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(O)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):P.prototype.pointerDown.call(this,h,O)},o.prototype.pointerUp=function(h){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,P.prototype.pointerUp.call(this,h);else{var O=this.state==="creating";P.prototype.pointerUp.call(this,h),this.setTipPoints(O),this.positionTip()}},o.prototype.manipulate=function(h){if(this.tipMoving){var O=this.unrotatePoint(h);this.tipPosition={x:O.x-this.manipulationStartLeft,y:O.y-this.manipulationStartTop},this.positionTip()}else P.prototype.manipulate.call(this,h)},o.prototype.setBgColor=function(h){this.bgRectangle&&this.tip&&(G.setAttributes(this.bgRectangle,[["fill",h]]),G.setAttributes(this.tip,[["fill",h]])),this.bgColor=h,this.fillColorChanged(h)},o.prototype.getTipPoints=function(){return this.setTipPoints(this.state==="creating"),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},o.prototype.setTipPoints=function(h){h===void 0&&(h=!1);var O=Math.min(this.height/2,15),U=this.height/5;h&&(this.tipPosition={x:O+U/2,y:this.height+20});var M=Math.atan(this.height/2/(this.width/2));this.tipPosition.x=this.width/2&&this.tipPosition.y=this.width/2&&this.tipPosition.y>=this.height/2?M',o}(Ne),Ce=function(P){function o(h,O,U){var M=P.call(this,h,O,U)||this;return M.fillColor="transparent",M.strokeColor="transparent",M.strokeWidth=0,M.strokeDasharray="",M.opacity=1,M.strokeColor=U.defaultColor,M.strokeWidth=U.defaultStrokeWidth,M.strokeDasharray=U.defaultStrokeDasharray,M.fillColor=U.defaultFillColor,M.setStrokeColor=M.setStrokeColor.bind(M),M.setFillColor=M.setFillColor.bind(M),M.setStrokeWidth=M.setStrokeWidth.bind(M),M.setStrokeDasharray=M.setStrokeDasharray.bind(M),M.setOpacity=M.setOpacity.bind(M),M.createVisual=M.createVisual.bind(M),M.strokePanel=new we("Line color",V(U.defaultColorSet,["transparent"]),U.defaultColor),M.strokePanel.onColorChanged=M.setStrokeColor,M.fillPanel=new we("Fill color",V(U.defaultColorSet,["transparent"]),M.fillColor,ee),M.fillPanel.onColorChanged=M.setFillColor,M.strokeWidthPanel=new Se("Line width",U.defaultStrokeWidths,U.defaultStrokeWidth),M.strokeWidthPanel.onWidthChanged=M.setStrokeWidth,M.strokeStylePanel=new Ae("Line style",U.defaultStrokeDasharrays,U.defaultStrokeDasharray),M.strokeStylePanel.onStyleChanged=M.setStrokeDasharray,M.opacityPanel=new H("Opacity",U.defaultOpacitySteps,M.opacity),M.opacityPanel.onOpacityChanged=M.setOpacity,M}return Z(o,P),o.prototype.ownsTarget=function(h){return!(!P.prototype.ownsTarget.call(this,h)&&h!==this.visual)},o.prototype.createVisual=function(){this.visual=G.createEllipse(this.width/2,this.height/2,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},o.prototype.pointerDown=function(h,O){P.prototype.pointerDown.call(this,h,O),this.state==="new"&&(this.createVisual(),this.moveVisual(h),this._state="creating")},o.prototype.manipulate=function(h){P.prototype.manipulate.call(this,h)},o.prototype.resize=function(h){P.prototype.resize.call(this,h),this.setSize()},o.prototype.setSize=function(){P.prototype.setSize.call(this),G.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},o.prototype.pointerUp=function(h){P.prototype.pointerUp.call(this,h),this.setSize()},o.prototype.setStrokeColor=function(h){this.strokeColor=h,this.visual&&G.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(h),this.stateChanged()},o.prototype.setFillColor=function(h){this.fillColor=h,this.visual&&G.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(h),this.stateChanged()},o.prototype.setStrokeWidth=function(h){this.strokeWidth=h,this.visual&&G.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},o.prototype.setStrokeDasharray=function(h){this.strokeDasharray=h,this.visual&&G.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},o.prototype.setOpacity=function(h){this.opacity=h,this.visual&&G.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(o.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),o.prototype.getState=function(){var h=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},P.prototype.getState.call(this));return h.typeName=o.typeName,h},o.prototype.restoreState=function(h){var O=h;this.fillColor=O.fillColor,this.strokeColor=O.strokeColor,this.strokeWidth=O.strokeWidth,this.strokeDasharray=O.strokeDasharray,this.opacity=O.opacity,this.createVisual(),P.prototype.restoreState.call(this,h),this.setSize()},o.prototype.scale=function(h,O){P.prototype.scale.call(this,h,O),this.setSize()},o.typeName="EllipseMarker",o.title="Ellipse marker",o.icon='',o}(ge),Be=function(P){function o(h,O,U){return P.call(this,h,O,U)||this}return Z(o,P),Object.defineProperty(o.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),o.prototype.ownsTarget=function(h){return!(!P.prototype.ownsTarget.call(this,h)&&h!==this.tip1&&h!==this.tip2)},o.prototype.createTips=function(){this.tip1=G.createLine(this.x1-this.tipLength/2,this.y1,this.x1+this.tipLength/2,this.y1,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip1.transform.baseVal.appendItem(G.createTransform()),this.visual.appendChild(this.tip1),this.tip2=G.createLine(this.x2-this.tipLength/2,this.y2,this.x2+this.tipLength/2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip2.transform.baseVal.appendItem(G.createTransform()),this.visual.appendChild(this.tip2)},o.prototype.pointerDown=function(h,O){P.prototype.pointerDown.call(this,h,O),this.state==="creating"&&this.createTips()},o.prototype.adjustVisual=function(){if(P.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(G.setAttributes(this.tip1,[["x1",(this.x1-this.tipLength/2).toString()],["y1",this.y1.toString()],["x2",(this.x1+this.tipLength/2).toString()],["y2",this.y1.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),G.setAttributes(this.tip2,[["x1",(this.x2-this.tipLength/2).toString()],["y1",this.y2.toString()],["x2",(this.x2+this.tipLength/2).toString()],["y2",this.y2.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),Math.abs(this.x1-this.x2)>.1)){var h=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),O=this.tip1.transform.baseVal.getItem(0);O.setRotate(h,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(O,0);var U=this.tip2.transform.baseVal.getItem(0);U.setRotate(h+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(U,0)}},Object.defineProperty(o.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),o.prototype.getState=function(){var h=P.prototype.getState.call(this);return h.typeName=o.typeName,h},o.prototype.restoreState=function(h){P.prototype.restoreState.call(this,h),this.createTips(),this.adjustVisual()},o.typeName="MeasurementMarker",o.title="Measurement marker",o.icon='',o}(Ue),Ge=function(P){function o(h,O,U){var M=P.call(this,h,O,U)||this;return M.strokePanel.colors=U.defaultColorSet,M.fillColor="transparent",M}return Z(o,P),Object.defineProperty(o.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),o.prototype.getState=function(){var h=P.prototype.getState.call(this);return h.typeName=o.typeName,h},o.typeName="EllipseFrameMarker",o.title="Ellipse frame marker",o.icon='',o}(Ce),Qe=function(){function P(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(P.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),P.prototype.addUndoStep=function(o){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(o)||(this.undoStack.push(o),JSON.stringify(this.lastRedoStep)!==JSON.stringify(o)&&this.redoStack.splice(0,this.redoStack.length))},P.prototype.replaceLastUndoStep=function(o){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=o)},P.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},P.prototype.undo=function(){if(this.undoStack.length>1){var o=this.undoStack.pop();return o!==void 0&&this.redoStack.push(o),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},P.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},P}(),Ve=function(P){function o(h,O,U){var M=P.call(this,h,O,U)||this;return M.strokeColor="transparent",M.strokeWidth=0,M.strokeDasharray="",M.curveX=0,M.curveY=0,M.manipulationStartCurveX=0,M.manipulationStartCurveY=0,M.setStrokeColor=M.setStrokeColor.bind(M),M.setStrokeWidth=M.setStrokeWidth.bind(M),M.setStrokeDasharray=M.setStrokeDasharray.bind(M),M.positionGrips=M.positionGrips.bind(M),M.addControlGrips=M.addControlGrips.bind(M),M.adjustVisual=M.adjustVisual.bind(M),M.setupControlBox=M.setupControlBox.bind(M),M.resize=M.resize.bind(M),M.strokeColor=U.defaultColor,M.strokeWidth=U.defaultStrokeWidth,M.strokeDasharray=U.defaultStrokeDasharray,M.strokePanel=new we("Line color",U.defaultColorSet,U.defaultColor),M.strokePanel.onColorChanged=M.setStrokeColor,M.strokeWidthPanel=new Se("Line width",U.defaultStrokeWidths,U.defaultStrokeWidth),M.strokeWidthPanel.onWidthChanged=M.setStrokeWidth,M.strokeStylePanel=new Ae("Line style",U.defaultStrokeDasharrays,U.defaultStrokeDasharray),M.strokeStylePanel.onStyleChanged=M.setStrokeDasharray,M}return Z(o,P),o.prototype.ownsTarget=function(h){return!(!P.prototype.ownsTarget.call(this,h)&&h!==this.visual&&h!==this.selectorCurve&&h!==this.visibleCurve&&!this.curveGrip.ownsTarget(h))},o.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},o.prototype.createVisual=function(){this.visual=G.createGroup(),this.selectorCurve=G.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=G.createPath(this.getPathD(),[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["fill","transparent"]]),this.visual.appendChild(this.selectorCurve),this.visual.appendChild(this.visibleCurve),this.addMarkerVisualToContainer(this.visual)},o.prototype.pointerDown=function(h,O){P.prototype.pointerDown.call(this,h,O),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=h.x,this.curveY=h.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(O)&&(this.activeGrip=this.curveGrip,this._state="resize")},o.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),G.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),G.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),G.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},o.prototype.setupControlBox=function(){P.prototype.setupControlBox.call(this),this.curveControlLine1=G.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=G.createLine(this.x2,this.y2,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.insertBefore(this.curveControlLine1,this.controlBox.firstChild),this.controlBox.insertBefore(this.curveControlLine2,this.controlBox.firstChild)},o.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,P.prototype.addControlGrips.call(this)},o.prototype.positionGrips=function(){P.prototype.positionGrips.call(this);var h=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-h/2,this.curveY-h/2),this.curveControlLine1&&this.curveControlLine2&&(this.curveControlLine1.setAttribute("x1",this.x1.toString()),this.curveControlLine1.setAttribute("y1",this.y1.toString()),this.curveControlLine1.setAttribute("x2",this.curveX.toString()),this.curveControlLine1.setAttribute("y2",this.curveY.toString()),this.curveControlLine2.setAttribute("x1",this.x2.toString()),this.curveControlLine2.setAttribute("y1",this.y2.toString()),this.curveControlLine2.setAttribute("x2",this.curveX.toString()),this.curveControlLine2.setAttribute("y2",this.curveY.toString()))},o.prototype.manipulate=function(h){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+h.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+h.y-this.manipulationStartY),P.prototype.manipulate.call(this,h)},o.prototype.resize=function(h){this.activeGrip===this.curveGrip&&(this.curveX=h.x,this.curveY=h.y),P.prototype.resize.call(this,h),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},o.prototype.setStrokeColor=function(h){this.strokeColor=h,this.adjustVisual(),this.colorChanged(h)},o.prototype.setStrokeWidth=function(h){this.strokeWidth=h,this.adjustVisual()},o.prototype.setStrokeDasharray=function(h){this.strokeDasharray=h,this.adjustVisual()},o.prototype.scale=function(h,O){this.curveX=this.curveX*h,this.curveY=this.curveY*O,P.prototype.scale.call(this,h,O)},Object.defineProperty(o.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),o.prototype.getState=function(){var h=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},P.prototype.getState.call(this));return h.typeName=o.typeName,h},o.prototype.restoreState=function(h){P.prototype.restoreState.call(this,h);var O=h;this.strokeColor=O.strokeColor,this.strokeWidth=O.strokeWidth,this.strokeDasharray=O.strokeDasharray,this.curveX=O.curveX,this.curveY=O.curveY,this.createVisual(),this.adjustVisual()},o.typeName="CurveMarker",o.title="Curve marker",o.icon='',o}(Oe),qe=function(){function P(o,h){h===void 0&&(h=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=o,this.cancelable=h}return Object.defineProperty(P.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),P.prototype.preventDefault=function(){this._defaultPrevented=!0},P}(),at=function(P){function o(h,O,U){var M=P.call(this,h,!1)||this;return M.dataUrl=O,M.state=U,M}return Z(o,P),o}(qe),Je=function(P){function o(h,O,U){U===void 0&&(U=!1);var M=P.call(this,h,U)||this;return M.marker=O,M}return Z(o,P),o}(qe),Ct=function(){function P(){this.render=[],this.beforeclose=[],this.close=[],this.show=[],this.restorestate=[],this.statechange=[],this.markerselect=[],this.markerdeselect=[],this.markercreating=[],this.markercreate=[],this.markerbeforedelete=[],this.markerdelete=[],this.markerchange=[],this.focus=[],this.blur=[]}return P.prototype.addEventListener=function(o,h){this[o].push(h)},P.prototype.removeEventListener=function(o,h){var O=this[o].indexOf(h);O>-1&&this[o].splice(O,1)},P}(),ht=function(){function P(o){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new xe,this._isOpen=!1,this.undoRedoManager=new Qe,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.renderMarkersOnly=!1,this.zoomSteps=[1,1.5,2,4],this._zoomLevel=1,this._isResizing=!1,this.prevPanPoint={x:0,y:0},this.eventListeners=new Ct,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=P.instanceCounter++,this.styles=new Me(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=o,this.targetRoot=document.body,this.width=o.clientWidth,this.height=o.clientHeight,this.styles.removeStyleSheet(),this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.toolbarButtonClicked=this.toolbarButtonClicked.bind(this),this.createNewMarker=this.createNewMarker.bind(this),this.addNewMarker=this.addNewMarker.bind(this),this.markerCreated=this.markerCreated.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onDblClick=this.onDblClick.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.deleteSelectedMarker=this.deleteSelectedMarker.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.removeMarker=this.removeMarker.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this),this.onPopupTargetResize=this.onPopupTargetResize.bind(this),this.showNotesEditor=this.showNotesEditor.bind(this),this.hideNotesEditor=this.hideNotesEditor.bind(this),this.stepZoom=this.stepZoom.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.markerStateChanged=this.markerStateChanged.bind(this),this.switchToSelectMode=this.switchToSelectMode.bind(this),this.addDefs=this.addDefs.bind(this),this.addDefsToImage=this.addDefsToImage.bind(this)}return Object.defineProperty(P.prototype,"ALL_MARKER_TYPES",{get:function(){return[Le,oe,ae,Ne,Ge,Ce,Y,me,Be,W,Ue,Ve]},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Le,oe,ae,Ne,Ce,Y,me]},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Le,oe,ae,Ne,Y]},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(o){var h=this;this._availableMarkerTypes.splice(0),o.forEach(function(O){if(typeof O=="string"){var U=h.ALL_MARKER_TYPES.find(function(M){return M.typeName===O});U!==void 0&&h._availableMarkerTypes.push(U)}else h._availableMarkerTypes.push(O)})},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(o){this._zoomLevel=o,this.editorCanvas&&this.contentDiv&&(this.editorCanvas.style.transform="scale("+this._zoomLevel+")",this.contentDiv.scrollTo({left:(this.editorCanvas.clientWidth*this._zoomLevel-this.contentDiv.clientWidth)/2,top:(this.editorCanvas.clientHeight*this._zoomLevel-this.contentDiv.clientHeight)/2}))},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),P.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),be.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},P.prototype.show=function(){var o=this;this.styles.styleSheetRoot===void 0&&De.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=De.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(h){return h(new qe(o))})},P.prototype.render=function(){return q(this,void 0,void 0,function(){var o;return se(this,function(h){switch(h.label){case 0:return this.setCurrentMarker(),(o=new Re).naturalSize=this.renderAtNaturalSize,o.imageType=this.renderImageType,o.imageQuality=this.renderImageQuality,o.markersOnly=this.renderMarkersOnly,o.width=this.renderWidth,o.height=this.renderHeight,[4,o.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return h.sent(),[4,o.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,h.sent()]}})})},P.prototype.close=function(o){var h=this;if(o===void 0&&(o=!1),this.isOpen){var O=!1;o||this.eventListeners.beforeclose.forEach(function(U){var M=new qe(h,!0);U(M),M.defaultPrevented&&(O=!0)}),O||(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.settings.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach(function(U){return U(new qe(h))}),this.detachEvents(),this._isOpen=!1)}},P.prototype.addMarkersToToolbar=function(){for(var o,h=[],O=0;Othis.editorCanvas.clientHeight?this.editorCanvas.clientHeight*o:this.editorCanvas.clientWidth,O=h',o.title="Powered by marker.js",o.style.display="grid",o.style.alignItems="center",o.style.justifyItems="center",o.style.padding="3px",o.style.width="20px",o.style.height="20px",this.logoUI.appendChild(o),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},P.prototype.positionLogo=function(){this.logoUI&&(this.uiStyleSettings.logoPosition!=="right"?this.logoUI.style.left=this.markerImageHolder.offsetLeft+10+"px":this.logoUI.style.left=this.markerImageHolder.offsetLeft+this.markerImageHolder.offsetWidth-this.logoUI.clientWidth-10+"px",this.logoUI.style.top=this.markerImageHolder.offsetTop+this.markerImageHolder.offsetHeight-this.logoUI.clientHeight-10+"px")},P.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},P.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},P.prototype.showUI=function(){switch(this.settings.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.style.visibility=this._silentRenderMode?"hidden":"visible",this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.coverDiv.style.userSelect="none",this.settings.displayMode){case"inline":this.coverDiv.style.position="absolute";var o=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=o+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.settings.displayMode==="popup"?this.settings.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new te(this.uiDiv,this.settings.displayMode,this._availableMarkerTypes,this.uiStyleSettings,this.styles),this.toolbar.addButtonClickListener(this.toolbarButtonClicked),this.toolbar.show(this._silentRenderMode||this.uiStyleSettings.hideToolbar?"hidden":"visible"),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.settings.displayMode==="popup"&&(this.contentDiv.style.backgroundColor=this.uiStyleSettings.canvasBackgroundColor,this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.uiStyleSettings.toolbarHeight+"px",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px)"),this.contentDiv.style.overflow="auto",this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.settings.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.editorCanvas.style.transformOrigin="left top",this.editorCanvas.style.transform="scale("+this.zoomLevel+")",this.contentDiv.appendChild(this.editorCanvas),this.editingTarget=this.target instanceof HTMLImageElement?document.createElement("img"):document.createElement("canvas"),this.target.getClientRects().item(0).y-1&&this.markers.splice(this.markers.indexOf(o),1),o.dispose()},P.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),this._currentMarker!==void 0&&(this._currentMarker.state!=="new"?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep())},P.prototype.toolbarButtonClicked=function(o,h){if(o==="marker"&&h!==void 0)this.createNewMarker(h);else if(o==="action")switch(h){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":this.notesArea===void 0?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},P.prototype.deleteSelectedMarker=function(){var o=this;if(this._currentMarker!==void 0){var h=!1;if(this.eventListeners.markerbeforedelete.forEach(function(U){var M=new Je(o,o._currentMarker,!0);U(M),M.defaultPrevented&&(h=!0)}),!h){var O=this._currentMarker;this._currentMarker.dispose(),this.markerImage.removeChild(this._currentMarker.container),this.markers.splice(this.markers.indexOf(this._currentMarker),1),this.setCurrentMarker(),this.addUndoStep(),this.eventListeners.markerdelete.forEach(function(U){return U(new Je(o,O))})}}},P.prototype.clear=function(){var o=this,h=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(ne){var ke=new Je(o,void 0,!0);ne(ke),ke.defaultPrevented&&(h=!0)}),!h)){this.setCurrentMarker();for(var O=function(ne){var ke=U.markers[ne];U.setCurrentMarker(U.markers[ne]),U._currentMarker.dispose(),U.markerImage.removeChild(U._currentMarker.container),U.markers.splice(U.markers.indexOf(U._currentMarker),1),U.eventListeners.markerdelete.forEach(function(Ke){return Ke(new Je(o,ke))})},U=this,M=this.markers.length-1;M>=0;M--)O(M);this.addUndoStep()}},Object.defineProperty(P.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),P.prototype.showNotesEditor=function(){var o;this._currentMarker!==void 0&&(this.overlayContainer.innerHTML="",this.notesArea=document.createElement("textarea"),this.notesArea.className=this.uiStyleSettings.notesAreaStyleClassName,this.notesArea.style.pointerEvents="auto",this.notesArea.style.alignSelf="stretch",this.notesArea.style.width="100%",this.notesArea.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.notesArea.value=(o=this._currentMarker.notes)!==null&&o!==void 0?o:"",this.overlayContainer.appendChild(this.notesArea))},P.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(this._currentMarker!==void 0&&(this._currentMarker.notes=this.notesArea.value.trim()!==""?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},P.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},P.prototype.addUndoStep=function(){var o=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var h=this.getState(),O=this.undoRedoManager.getLastUndoStep();if(!O||O.width===h.width&&O.height===h.height){var U=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(h),U1&&this.panTo({x:o.clientX,y:o.clientY}))},P.prototype.onPointerUp=function(o){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(o.clientX,o.clientY)),this.isDragging=!1,this.addUndoStep()},P.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},P.prototype.onKeyUp=function(o){this._currentMarker===void 0||this.notesArea!==void 0||o.key!=="Delete"&&o.key!=="Backspace"||this.deleteSelectedMarker()},P.prototype.clientToLocalCoordinates=function(o,h){var O=this.markerImage.getBoundingClientRect();return{x:(o-O.left)/this.zoomLevel,y:(h-O.top)/this.zoomLevel}},P.prototype.onWindowResize=function(){this.positionUI()},P.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var o=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=o+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.styles.settings.toolbarHeight+"px"}this.positionMarkerImage(),this.positionLogo()},P.prototype.addLicenseKey=function(o){be.addKey(o)},P.prototype.addEventListener=function(o,h){this.eventListeners.addEventListener(o,h)},P.prototype.removeEventListener=function(o,h){this.eventListeners.removeEventListener(o,h)},P.prototype.renderState=function(o){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(o),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(P.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),P.prototype.focus=function(){var o=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(h){return h(new qe(o))}))},P.prototype.blur=function(){var o=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(h){return h(new qe(o))}))},P.instanceCounter=0,P}();/* **********************************
cropro version 1.2.0
@license SEE LICENSE IN LICENSE
copyright Alan Mendelevich
see README and LICENSE for details
********************************** *//*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var Lt=function(P,o){return(Lt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,O){h.__proto__=O}||function(h,O){for(var U in O)Object.prototype.hasOwnProperty.call(O,U)&&(h[U]=O[U])})(P,o)};function xt(P,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function h(){this.constructor=P}Lt(P,o),P.prototype=o===null?Object.create(o):(h.prototype=o.prototype,new h)}function rt(P,o,h,O){return new(h||(h=Promise))(function(U,M){function ne(We){try{Ke(O.next(We))}catch(Pe){M(Pe)}}function ke(We){try{Ke(O.throw(We))}catch(Pe){M(Pe)}}function Ke(We){var Pe;We.done?U(We.value):(Pe=We.value,Pe instanceof h?Pe:new h(function(Ye){Ye(Pe)})).then(ne,ke)}Ke((O=O.apply(P,o||[])).next())})}function Dt(P,o){var h,O,U,M,ne={label:0,sent:function(){if(1&U[0])throw U[1];return U[1]},trys:[],ops:[]};return M={next:ke(0),throw:ke(1),return:ke(2)},typeof Symbol=="function"&&(M[Symbol.iterator]=function(){return this}),M;function ke(Ke){return function(We){return function(Pe){if(h)throw new TypeError("Generator is already executing.");for(;ne;)try{if(h=1,O&&(U=2&Pe[0]?O.return:Pe[0]?O.throw||((U=O.return)&&U.call(O),0):O.next)&&!(U=U.call(O,Pe[1])).done)return U;switch(O=0,U&&(Pe=[2&Pe[0],U.value]),Pe[0]){case 0:case 1:U=Pe;break;case 4:return ne.label++,{value:Pe[1],done:!1};case 5:ne.label++,O=Pe[1],Pe=[0];continue;case 7:Pe=ne.ops.pop(),ne.trys.pop();continue;default:if(!(U=ne.trys,(U=U.length>0&&U[U.length-1])||Pe[0]!==6&&Pe[0]!==2)){ne=0;continue}if(Pe[0]===3&&(!U||Pe[1]>U[0]&&Pe[1]0&&h>0){var O=new Ze(o,h),U=O.ratio>=1?20:O.getHorizontalLength(20),M=O.ratio<1?20:O.getVerticalLength(20),ne=document.createElementNS("http://www.w3.org/2000/svg","svg");ne.setAttribute("xmlns","http://www.w3.org/2000/svg"),ne.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(ne);var ke=$e.createDefs();ne.appendChild(ke);var Ke=$e.createElement("clipPath",[["id","text-bg-clip"]]);ke.appendChild(Ke);var We=$e.createPath($e.getHollowRectanglePath((24-U)/2,(24-M)/2,U,M,(24-U)/2+2,(24-M)/2+2,U-4,M-4));ne.appendChild(We);var Pe=$e.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);Pe.appendChild($e.createTSpan(o+":"+h)),ne.appendChild(Pe);var Ye=Pe.getBBox();$e.setAttributes(Pe,[["x",((24-Ye.width)/2).toString()],["y",((24-Ye.height)/2-Ye.y).toString()]]);var ze=$e.createPath($e.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(Ye.width))/2,(24-Math.ceil(Ye.height))/2,Math.ceil(Ye.width),Math.ceil(Ye.height)));return Ke.appendChild(ze),$e.setAttributes(We,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(ne),ne.outerHTML}return''},P}(),vt=function(P){function o(h,O,U){var M=P.call(this,h,O)||this;return M.isDropdownOpen=!1,M.onClick=M.dropdownButtonClicked,M.dropdownButtons=U,M}return xt(o,P),o.prototype.setupDropdown=function(){var h=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach(function(O){O.className=h.className,O.colorsClassName=h.colorsClassName,h.dropdownBlock.appendChild(O.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},o.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},o.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},o.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},o.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},o.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},o}(nt),dt=function(){function P(o,h){this.GRIP_SIZE=10,this.color=o,this.fillColor=h,this.visual=$e.createGroup(),this.visual.appendChild($e.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild($e.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return P.prototype.ownsTarget=function(o){return o===this.visual||o===this.visual.childNodes[0]||o===this.visual.childNodes[1]},P.prototype.setCenter=function(o,h){this.visual.childNodes.forEach(function(O){return $e.setAttributes(O,[["cx",o.toString()],["cy",h.toString()]])})},P}(),pt=function(){function P(o,h,O,U){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=o,this.canvasHeight=h,this.margin=O,this.container=U,this.attachEvents=this.attachEvents.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.resize=this.resize.bind(this),this.adjustCropRect=this.adjustCropRect.bind(this),this.scaleCanvas=this.scaleCanvas.bind(this),this.getRescaledRect=this.getRescaledRect.bind(this)}return Object.defineProperty(P.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(o){this._aspectRatio=o,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(o){this._isGridVisible=o,this.gridContainer&&$e.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(o){this._zoomFactor=o,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),P.prototype.open=function(){var o=this;this.cropShadeElement=$e.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=$e.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var h=0;hthis.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-h.height/2),$e.setAttributes(this.cropRectElement,[["x",h.x.toString()],["y",h.y.toString()],["width",h.width.toString()],["height",h.height.toString()]]);var O=h.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(M,ne){var ke=h.y+O*(ne+1);$e.setAttributes(M,[["x1",""+h.x],["y1",""+ke],["x2",""+(h.x+h.width)],["y2",""+ke]])});var U=h.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(M,ne){var ke=h.x+U*(ne+1);$e.setAttributes(M,[["x1",""+ke],["y1",""+h.y],["x2",""+ke],["y2",""+(h.y+h.height)]])}),$e.setAttributes(this.cropShadeElement,[["d",$e.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,h.x,h.y,h.width,h.height)]]),this.topLeftGrip.setCenter(h.x,h.y),this.topRightGrip.setCenter(h.x+h.width,h.y),this.bottomLeftGrip.setCenter(h.x,h.y+h.height),this.bottomRightGrip.setCenter(h.x+h.width,h.y+h.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},P.prototype.attachEvents=function(){this.container.style.touchAction="none",this.container.addEventListener("pointerdown",this.onPointerDown),this.container.addEventListener("pointermove",this.onPointerMove),this.container.addEventListener("pointerup",this.onPointerUp)},P.prototype.clientToLocalCoordinates=function(o,h){var O=this.container.getBoundingClientRect();return{x:o-O.left+this.margin,y:h-O.top+this.margin}},P.prototype.onPointerDown=function(o){this.container.setPointerCapture(o.pointerId),this.previousPoint=this.clientToLocalCoordinates(o.clientX,o.clientY),this.cropRectElement===o.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(o.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(o.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(o.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(o.target)&&(this.activeGrip=this.bottomRightGrip)},P.prototype.onPointerMove=function(o){if(this.isMoving)this.move(this.clientToLocalCoordinates(o.clientX,o.clientY));else if(this.activeGrip){var h=this.clientToLocalCoordinates(o.clientX,o.clientY);this.resize(h)}o.preventDefault()},P.prototype.onPointerUp=function(o){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(o.pointerId)},P.prototype.move=function(o){var h=o.x-this.previousPoint.x,O=o.y-this.previousPoint.y;this.zoomFactor!==1&&(h=-h/this.zoomFactor,O=-O/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+h),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+O),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=o},P.prototype.resize=function(o){var h=Object.assign({},this.cropRect),O=o.x-this.previousPoint.x,U=o.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:h.x+Othis.canvasWidth*this.zoomFactor&&(O=this.canvasWidth*this.zoomFactor-h.width),h.width+=O}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(h.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(O),h.height=this.aspectRatio.getVerticalLength(h.width)):(h.y+=U,h.height=this.cropRect.y+this.cropRect.height-h.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?h.height=this.aspectRatio.getVerticalLength(h.width):h.height+=U}h.width<10&&(h.x=this.cropRect.x,h.width=10),h.height<10&&(h.y=this.cropRect.y,h.height=10),this.previousPoint=o,h.x>=this.margin&&h.y>=this.margin&&h.x-this.margin+h.width<=this.canvasWidth&&h.y-this.margin+h.height<=this.canvasHeight&&(this.cropRect=h,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},P.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var o=this.cropRect.x+this.cropRect.width/2,h=this.cropRect.y+this.cropRect.height/2,O=this.aspectRatio.getHorizontalLength(this.cropRect.height),U=this.aspectRatio.getVerticalLength(this.cropRect.width);O/this.canvasWidththis.canvasWidth&&(this.cropRect.height/=this.cropRect.width/this.canvasWidth,this.cropRect.width=this.canvasWidth),this.cropRect.height>this.canvasHeight&&(this.cropRect.width/=this.cropRect.height/this.canvasHeight,this.cropRect.height=this.canvasHeight),this.cropRect.x=o-this.cropRect.width/2,this.cropRect.y=h-this.cropRect.height/2,this.cropRect.x+this.cropRect.width>this.margin+this.canvasWidth&&(this.cropRect.x=this.margin+this.canvasWidth-this.cropRect.width),this.cropRect.y+this.cropRect.height>this.margin+this.canvasHeight&&(this.cropRect.y=this.margin+this.canvasHeight-this.cropRect.height),this.cropRect.x=Math.max(this.cropRect.x,this.margin),this.cropRect.y=Math.max(this.cropRect.y,this.margin)}},P.prototype.getRescaledRect=function(o,h,O,U,M,ne){var ke=O/o,Ke=U/h;return{x:(M.x-ne)*ke+ne,y:(M.y-ne)*Ke+ne,width:M.width*ke,height:M.height*Ke}},P.prototype.scaleCanvas=function(o,h){var O=this.getRescaledRect(this.canvasWidth,this.canvasHeight,o,h,this.cropRect,this.margin);this.canvasWidth=o,this.canvasHeight=h,this.onCropChange&&this.onCropChange(O),this.setCropRectangle(O)},P}(),Tt=function(){function P(o){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=o,this.uiContainer=document.createElement("div"),this.getUI=this.getUI.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.setAngleLabel=this.setAngleLabel.bind(this),this.positionScaleShape=this.positionScaleShape.bind(this)}return Object.defineProperty(P.prototype,"angle",{get:function(){return this._angle},set:function(o){this._angle=o,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),P.prototype.getUI=function(){return this.controlContainer=document.createElement("div"),this.controlContainer.title=this.title,this.controlContainer.className=this.className+" "+this.colorsClassName,this.controlContainer.appendChild(this.getVisual()),this.controlContainer.addEventListener("pointerdown",this.onPointerDown),this.controlContainer.addEventListener("pointermove",this.onPointerMove),this.controlContainer.addEventListener("pointerup",this.onPointerUp),this.uiContainer.appendChild(this.controlContainer),this.uiContainer.style.display="inline-block",this.uiContainer.style.touchAction="none",this.setAngleLabel(),this.positionScaleShape(),this.uiContainer},P.prototype.onPointerDown=function(o){this.controlContainer.setPointerCapture(o.pointerId),this.isDragging=!0,this.previousPoint={x:o.clientX,y:o.clientY}},P.prototype.onPointerMove=function(o){this.isDragging&&(this.onAngleChange&&this.onAngleChange((o.clientX-this.previousPoint.x)/5),this.previousPoint.x=o.clientX)},P.prototype.onPointerUp=function(o){this.isDragging&&this.onAngleChange&&this.onAngleChange((o.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(o.pointerId)},P.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var o=this.angleLabelText.getBBox();$e.setAttributes(this.angleLabelElement,[["x",((this.width-o.width)/2).toString()],["y",(this.height/2).toString()]])}},P.prototype.positionScaleShape=function(){if(this.scaleShape){var o=this.scaleShape.transform.baseVal.getItem(0);o.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(o,0)}},P.prototype.getVisual=function(){var o=document.createElementNS("http://www.w3.org/2000/svg","svg");o.setAttribute("xmlns","http://www.w3.org/2000/svg"),o.setAttribute("width",this.width+"px"),o.setAttribute("height",this.height+"px"),o.setAttribute("viewBox","0 0 "+this.width+" "+this.height),o.style.flexShrink="0",document.body.appendChild(o);for(var h="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,O=1;O<=this.width/5+10;O++){var U=O%5==0?this.height/3:this.height/6;h+="h4v"+-U+"h1v"+U}h+="v1H0Z",this.scaleShape=$e.createPath(h);var M=$e.createTransform();this.scaleShape.transform.baseVal.appendItem(M),o.appendChild(this.scaleShape),this.angleLabelElement=$e.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=$e.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var ne=$e.createTSpan("");return ne.innerHTML="°",this.angleLabelElement.appendChild(ne),o.appendChild(this.angleLabelElement),document.body.removeChild(o),o},P}(),It=function(){function P(){this.naturalSize=!1,this.imageType="image/png"}return P.prototype.rasterize=function(o,h,O,U,M,ne,ke){var Ke=this;return new Promise(function(We){var Pe=document.createElement("canvas");Pe.width=o.width.baseVal.value-2*U,Pe.height=o.height.baseVal.value-2*U;var Ye=1,ze=1;Ke.naturalSize===!0?(Ye=h.naturalWidth/(o.width.baseVal.value-2*U)/ne,ze=h.naturalHeight/(o.height.baseVal.value-2*U)/ke,Pe.width=h.naturalWidth/ne,Pe.height=h.naturalHeight/ke):Ke.width!==void 0&&Ke.height!==void 0&&(Ye=Ke.width/O.width,ze=Ke.height/O.height,Pe.width*=Ye,Pe.height*=ze);var ot=Pe.getContext("2d");ot.translate(Pe.width/2,Pe.height/2),ot.rotate(M*Math.PI/180),ot.scale(ne,ke),ot.translate(-Pe.width/2,-Pe.height/2),ot.drawImage(h,0,0,Pe.width,Pe.height);var Pt=document.createElement("canvas");Pt.width=O.width*Ye,Pt.height=O.height*ze,Pt.getContext("2d").putImageData(ot.getImageData((O.x-U)*Ye,(O.y-U)*ze,O.width*Ye,O.height*ze),0,0),We(Pt.toDataURL(Ke.imageType,Ke.imageQuality))})},P}(),gt=function(){function P(o){this._zoomToCropEnabled=!0,this.zoomFactor=1,this.flippedHorizontally=!1,this.flippedVertically=!1,this._isGridVisible=!0,this._gridLines=2,this._rotationAngle=0,this.scaleFactor=1,this.renderEventListeners=[],this.closeEventListeners=[],this._isOpen=!1,this.CANVAS_MARGIN=20,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.displayMode="inline",this.popupMargin=30,this.toolbarHeight=40,this.aspectRatios=[{horizontal:0,vertical:0},{horizontal:4,vertical:3},{horizontal:3,vertical:2},{horizontal:16,vertical:9},{horizontal:1,vertical:1},{horizontal:3,vertical:4},{horizontal:2,vertical:3},{horizontal:9,vertical:16}],this._instanceNo=P.instanceCounter++,this.styles=new Xe(this.instanceNo),this.target=o,this.targetRoot=document.body,this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.rotateBy=this.rotateBy.bind(this),this.applyRotation=this.applyRotation.bind(this),this.cropRectChanged=this.cropRectChanged.bind(this),this.zoomToCrop=this.zoomToCrop.bind(this),this.unzoomFromCrop=this.unzoomFromCrop.bind(this),this.rotateLeftButtonClicked=this.rotateLeftButtonClicked.bind(this),this.rotateRightButtonClicked=this.rotateRightButtonClicked.bind(this),this.flipHorizontallyButtonClicked=this.flipHorizontallyButtonClicked.bind(this),this.flipVerticallyButtonClicked=this.flipVerticallyButtonClicked.bind(this),this.applyFlip=this.applyFlip.bind(this),this.startRenderAndClose=this.startRenderAndClose.bind(this),this.render=this.render.bind(this),this.onPopupResize=this.onPopupResize.bind(this),this.applyAspectRatio=this.applyAspectRatio.bind(this)}return Object.defineProperty(P.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(o){this._zoomToCropEnabled=o,o?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(o){this._isGridVisible=o,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"gridLines",{get:function(){return this._gridLines},set:function(o){this._gridLines=o,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(o){this._rotationAngle=o,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"aspectRatio",{get:function(){var o;return(o=this._aspectRatio)!==null&&o!==void 0?o:this.aspectRatios[0]},set:function(o){this._aspectRatio=o},enumerable:!1,configurable:!0}),P.prototype.open=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.setupResizeObserver(),this.initCropCanvas(),this.setEditingTarget(),this.setTopLeft(),this.initCropLayer(),this.attachEvents(),this.applyAspectRatio(),this.displayMode==="popup"&&this.onPopupResize(),this._isOpen=!0},P.prototype.show=function(){this.showUI(),this.open()},P.prototype.close=function(o){o===void 0&&(o=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),o||this.closeEventListeners.forEach(function(h){return h()}),this._isOpen=!1)},P.prototype.addRenderEventListener=function(o){this.renderEventListeners.push(o)},P.prototype.removeRenderEventListener=function(o){this.renderEventListeners.indexOf(o)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(o),1)},P.prototype.addCloseEventListener=function(o){this.closeEventListeners.push(o)},P.prototype.removeCloseEventListener=function(o){this.closeEventListeners.indexOf(o)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(o),1)},P.prototype.setupResizeObserver=function(){var o=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){o.resize(o.target.clientWidth,o.target.clientHeight)}),this.targetObserver.observe(this.target)):this.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(this.onPopupResize),this.targetObserver.observe(this.contentDiv)),window.addEventListener("resize",this.setWindowHeight))},P.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var o=1*this.target.clientWidth/this.target.clientHeight,h=this.contentDiv.clientWidth/o>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*o:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,O=h+2*this.CANVAS_MARGINo+this.CANVAS_MARGIN?this.target.offsetTop-(o+this.CANVAS_MARGIN):0;this.coverDiv.style.top=h+"px",this.coverDiv.style.left=(this.target.offsetLeft>this.CANVAS_MARGIN?this.target.offsetLeft-this.CANVAS_MARGIN:0)+"px",this.coverDiv.style.width=this.target.offsetWidth+this.CANVAS_MARGIN+"px",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.displayMode==="popup"?this.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.addToolbars(),this.uiDiv.appendChild(this.topToolbar.getUI()),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.alignItems="center",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.contentDiv.style.overflow="hidden",this.contentDiv.style.backgroundColor=this.styles.settings.canvasBackgroundColor,this.displayMode==="popup"&&(this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.popupMargin+"px)"),this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.contentDiv.appendChild(this.editorCanvas),this.uiDiv.appendChild(this.bottomToolbar.getUI()),this.straightener.angle=this.rotationAngle},P.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},P.prototype.addTopToolbar=function(){var o=this;this.topToolbar=new lt,this.topToolbar.display=this.styles.settings.hideTopToolbar?"none":"",this.topToolbar.className=this.toolbarStyleClass.name,this.topToolbar.colorsClassName=this.styles.settings.toolbarStyleColorsClassName?this.styles.settings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name,this.topToolbar.fadeInClassName=this.styles.fadeInAnimationClassName,this.topToolbar.blockClassName=this.toolbarBlockStyleClass.name,this.topToolbar.buttonClassName=this.toolbarButtonStyleClass.name,this.topToolbar.buttonColorsClassName=this.styles.settings.toolbarButtonStyleColorsClassName?this.styles.settings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,this.topToolbar.buttonActiveColorsClassName=this.styles.settings.toolbarActiveButtonStyleColorsClassName?this.styles.settings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name;var h=new ft;h.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(h);var O=[];this.aspectRatios.forEach(function(ze){var ot=new nt(mt.getIcon(ze.horizontal,ze.vertical),ze.horizontal===0&&ze.vertical===0?"FREE":ze.horizontal+":"+ze.vertical);ot.onClick=function(){return o.ratioButtonClicked(ze)},O.push(ot)}),this.aspectRatioButton=new vt(mt.getIcon(0,0),"Aspect ratio",O),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,h.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var U=new nt('',"Toggle grid");U.isActive=this.isGridVisible,U.onClick=function(){o.isGridVisible=!o.isGridVisible,U.isActive=o.isGridVisible},h.addButton(U);var M=new nt('',"Zoom to selection");if(M.isActive=this.zoomToCropEnabled,M.onClick=function(){o.zoomToCropEnabled=!o.zoomToCropEnabled,M.isActive=o.zoomToCropEnabled},h.addButton(M),!At.isLicensed){var ne=new tt;this.topToolbar.addElementBlock(ne);var ke=document.createElement("div");ke.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var Ke=document.createElement("a");Ke.style.color="currentColor",Ke.href="https://markerjs.com/products/cropro",Ke.target="_blank",Ke.innerHTML='',ke.appendChild(Ke),ne.addElement(ke)}var We=new ft;We.minWidth=3*this.toolbarHeight+"px",We.contentAlign="end",this.topToolbar.addButtonBlock(We);var Pe=new nt('',"OK");Pe.onClick=this.startRenderAndClose,We.addButton(Pe),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(Pe.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var Ye=new nt('',"Close");Ye.onClick=this.close,We.addButton(Ye),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(Ye.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},P.prototype.addBottomToolbar=function(){var o=this;this.bottomToolbar=new lt,this.bottomToolbar.display=this.styles.settings.hideBottomToolbar?"none":"",this.bottomToolbar.className=this.toolbarStyleClass.name,this.bottomToolbar.colorsClassName=this.styles.settings.toolbarStyleColorsClassName?this.styles.settings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name,this.bottomToolbar.fadeInClassName=this.styles.fadeInAnimationClassName,this.bottomToolbar.blockClassName=this.toolbarBlockStyleClass.name,this.bottomToolbar.buttonClassName=this.toolbarButtonStyleClass.name,this.bottomToolbar.buttonColorsClassName=this.styles.settings.toolbarButtonStyleColorsClassName?this.styles.settings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,this.bottomToolbar.buttonActiveColorsClassName=this.styles.settings.toolbarActiveButtonStyleColorsClassName?this.styles.settings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name;var h=new ft;h.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(h);var O=new nt('',"Rotate left");O.onClick=this.rotateLeftButtonClicked,h.addButton(O);var U=new nt('',"Rotate right");U.onClick=this.rotateRightButtonClicked,h.addButton(U);var M=new tt;M.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(M),this.straightener=new Tt("Straighten"),this.straightener.className=this.toolbarStraightenerStyleClass.name,this.straightener.colorsClassName=this.styles.settings.toolbarStraightenerColorsClassName?this.styles.settings.toolbarStraightenerColorsClassName:this.toolbarStraightenerStyleColorsClass.name,this.straightener.onAngleChange=function(We){o.rotateBy(We),o.straightener.angle=o.rotationAngle},M.addElement(this.straightener.getUI());var ne=new ft;ne.minWidth=2*this.toolbarHeight+"px",ne.contentAlign="end",this.bottomToolbar.addButtonBlock(ne);var ke=new nt('',"Flip horizontal");ke.onClick=this.flipHorizontallyButtonClicked,ne.addButton(ke);var Ke=new nt('',"Flip vertical");Ke.onClick=this.flipVerticallyButtonClicked,ne.addButton(Ke)},P.prototype.ratioButtonClicked=function(o){this.aspectRatio=o,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},P.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=mt.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},P.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new Ze(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},P.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},P.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},P.prototype.restoreState=function(o){if(o){var h=this.cropLayer.getRescaledRect(o.width,o.height,this.imageWidth,this.imageHeight,o.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(h),this.cropRectChanged(h),this.flippedHorizontally=o.flippedHorizontally,this.flippedVertically=o.flippedVertically,this.applyFlip(),this.rotationAngle=o.rotationAngle,this.applyRotation()}},P.prototype.clientToLocalCoordinates=function(o,h){var O=this.cropImage.getBoundingClientRect();return{x:o-O.left,y:h-O.top}},P.prototype.onWindowResize=function(){this.positionUI()},P.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var o=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=o+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)"}this.positionCropImage()},P.prototype.rotateLeftButtonClicked=function(){var o=this.rotationAngle-90;this.rotationAngle%90!=0&&(o+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(o)},P.prototype.rotateRightButtonClicked=function(){var o=this.rotationAngle+90;this.rotationAngle%90!=0&&(o-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(o)},P.prototype.rotateTo=function(o){o=(o=o>180?o-360:o)<=-180?o+360:o,this.rotationAngle=o,this.applyRotation()},P.prototype.rotateBy=function(o){this.rotateTo((this.rotationAngle+o)%360)},P.prototype.applyRotation=function(){var o=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var h=this.editingTargetRotationContainer.transform.baseVal.getItem(0);h.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(h,0);var O=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/O.width,this.imageHeight/O.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=o},P.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},P.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},P.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},P.prototype.startRenderAndClose=function(){return rt(this,void 0,void 0,function(){var o,h;return Dt(this,function(O){switch(O.label){case 0:return[4,this.render()];case 1:return o=O.sent(),h=this.getState(),this.renderEventListeners.forEach(function(U){return U(o,h)}),this.close(!0),[2]}})})},P.prototype.render=function(){return rt(this,void 0,void 0,function(){var o;return Dt(this,function(h){switch(h.label){case 0:return(o=new It).naturalSize=this.renderAtNaturalSize,o.imageType=this.renderImageType,o.imageQuality=this.renderImageQuality,o.width=this.renderWidth,o.height=this.renderHeight,this.unzoomFromCrop(),$e.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,o.rasterize(this.cropImage,this.target,{x:this.cropRect.x,y:this.cropRect.y,width:this.cropRect.width,height:this.cropRect.height},this.CANVAS_MARGIN,this.rotationAngle,this.scaleFactor*(this.flippedHorizontally?-1:1),this.scaleFactor*(this.flippedVertically?-1:1))];case 1:return h.sent(),[4,o.rasterize(this.cropImage,this.target,{x:this.cropRect.x,y:this.cropRect.y,width:this.cropRect.width,height:this.cropRect.height},this.CANVAS_MARGIN,this.rotationAngle,this.scaleFactor*(this.flippedHorizontally?-1:1),this.scaleFactor*(this.flippedVertically?-1:1))];case 2:return[2,h.sent()]}})})},P.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new He("toolbar",`
width: `+(this.displayMode==="inline"?"100%":"calc(100vw - "+2*this.popupMargin+"px)")+`;
flex-shrink: 0;
display: flex;
flex-direction: row;
justify-content: space-between;
height: `+this.toolbarHeight+`px;
box-sizing: content-box;
overflow: hidden;
line-height: 0px;
`)),this.toolbarStyleColorsClass=this.styles.addClass(new He("toolbar_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarBlockStyleClass=this.styles.addClass(new He("toolbar-block",`
display: flex;
align-items: center;
box-sizing: content-box;
`));var o=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new He("toolbar_button",`
display: inline-block;
width: `+(this.toolbarHeight-2*o)+`px;
height: `+(this.toolbarHeight-2*o)+`px;
padding: `+o+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new He("toolbar_button_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new He("toolbar_active_button",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
background-color: `+this.styles.settings.toolbarBackgroundActiveColor+`
`)),this.styles.addRule(new je("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.toolbarHeight/2+`px;
`)),this.styles.addRule(new je("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.styles.settings.toolbarBackgroundHoverColor+`
`)),this.toolbarDropdownStyleClass=this.styles.addClass(new He("toolbar_dropdown",`
position: absolute;
max-width: `+4*this.toolbarHeight+`px;
z-index: 20;
white-space: normal;
box-sizing: content-box;
box-shadow: 3px 3px rgba(33, 33, 33, 0.1);
margin: `+(this.displayMode==="inline"?"0":this.popupMargin)+`px;
line-height: 0px;
`)),this.toolbarDropdownStyleColorsClass=this.styles.addClass(new He("toolbar_dropdown_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new He("toolbar_straightener_block",`
display: flex;
overflow: hidden;
justify-content: center;
-webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 30%, rgba(0,0,0,1) 70%, rgba(0,0,0,0) 100%);
`)),this.toolbarStraightenerStyleClass=this.styles.addClass(new He("toolbar_straightener",`
display: flex;
overflow: hidden;
justify-content: center;
height: `+(this.toolbarHeight-2*o)+`px;
padding: `+o+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new He("toolbar_straightener_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`))},P.instanceCounter=0,P}(),st=K("8hTe"),it=K.n(st),ct=/]*>/g;function bt(P){var o=document.createElement("div");return o.innerHTML=P,o.childNodes.length===0?"":o.childNodes[0].nodeValue}var Et=he.a=function(P){var o=P.value,h=o===void 0?"":o,O=P.edit,U=O===void 0?!1:O,M=P.className,ne=P.showTextOnly,ke=P.showLines,Ke=P.replaces,We=P.zoomImg,Pe=P.hasMask,Ye=P.style,ze=Ye===void 0?{}:Ye,ot=P.stylesPrev,Pt=ot===void 0?{}:ot,Rt=String(h),Ot=Object(C.useRef)(),kt=Object(C.useRef)(),Gt=Object(C.useState)(""),Kt=Object(N.a)(Gt,2),wt=Kt[0],_t=Kt[1],zt=Object(C.useState)("office"),Bt=Object(N.a)(zt,2),Xt=Bt[0],Nt=Bt[1],jt=function(){var St=new gt(kt.current);St.displayMode="popup",St.addRenderEventListener(function(){var Wt=Object(A.a)(S.a.mark(function yt(Ht){var Mt;return S.a.wrap(function(Ft){for(;;)switch(Ft.prev=Ft.next){case 0:return Ot.current.style.display="none",Ft.next=3,Object(ye.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:Ht}});case 3:Mt=Ft.sent,Mt!=null&&Mt.id&&Ke(kt.current.getAttribute("src").replace(ie.a.API_SERVER,""),"/api/attachments/".concat(Mt==null?void 0:Mt.id,"?type=").concat(Mt.content_type));case 5:case"end":return Ft.stop()}},yt)}));return function(yt){return Wt.apply(this,arguments)}}()),St.show()},Zt=function(){var St=new ht(kt.current);St.settings.displayMode="popup",St.addEventListener("render",function(){var Wt=Object(A.a)(S.a.mark(function yt(Ht){var Mt;return S.a.wrap(function(Ft){for(;;)switch(Ft.prev=Ft.next){case 0:if(Ot.current.style.display="none",!kt.current){Ft.next=6;break}return Ft.next=4,Object(ye.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:Ht.dataUrl}});case 4:Mt=Ft.sent,Mt!=null&&Mt.id&&Ke(kt.current.getAttribute("src").replace(ie.a.API_SERVER,""),"/api/attachments/".concat(Mt==null?void 0:Mt.id,"?type=").concat(Mt.content_type));case 6:case"end":return Ft.stop()}},yt)}));return function(yt){return Wt.apply(this,arguments)}}()),St.show(),window.markerArea=St},$t=Object(C.useMemo)(function(){try{var Ut=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,St=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Wt=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;Rt=Rt.replace(Ut,"("+ie.a.API_SERVER+"/api/attachments/").replace(St,'"'+ie.a.API_SERVER+"/api/attachments/").replace(Wt,'"'+ie.a.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,`
`),Rt=Rt.replace(new RegExp("(?[TOC]
",E()),f()),yt=yt.replace(/(__special_katext_id_\d+__)/g,function(Jt,Ft){var Qt=Ht[Ft],tr=Qt.type,rr=Qt.expression;return Object(pe.renderToString)(bt(rr)||"",{displayMode:tr==="block",throwOnError:!1,output:"html"})}),yt=yt.replace(/▁/g,"\u2581\u2581\u2581"),x(),ne){var Mt=document.createElement("div");return Mt.innerHTML=yt,Mt.innerText}return setTimeout(function(){return qt()},500),yt},[Rt]),Vt=Object(C.useRef)();c.WebkitLineClamp=ke,ke&&(ze=Object(D.a)(Object(D.a)({},ze),c));function Yt(Ut){var St=Ut.target;if(St.tagName.toUpperCase()==="IMG"){if(We){var Wt=St.getAttribute("src");_t(Wt),Nt("image")}}else if(St.tagName.toUpperCase()==="A"){var yt=St.getAttribute("href");if(yt.indexOf("office")>-1)Ut.preventDefault(),_t(yt),Nt("office");else if(yt.indexOf("application/pdf")>-1)Ut.preventDefault(),_t(yt),Nt("pdf");else if(yt.indexOf("type=text")>-1)Ut.preventDefault(),_t(yt),Nt("html");else if(yt.startsWith("#")){Ut.preventDefault();var Ht=document.getElementById(yt.replace("#",""));Ht&&Ht.scrollIntoView(!0)}}}var qt=function(){var St,Wt=(St=Vt.current)===null||St===void 0?void 0:St.querySelectorAll("video");Wt==null||Wt.forEach(function(yt){if(yt.oncontextmenu=function(){return!1},yt.src.indexOf(".m3u8")>-1&&!yt.canPlayType("application/vnd.apple.mpegurl")){if(J.a.isSupported()){var Ht=new J.a;Ht.loadSource(yt.src),Ht.attachMedia(yt)}}})};Object(C.useEffect)(function(){if(Vt.current&&$t&&($t.match(ct)&&window.PR.prettyPrint()),Vt.current)return Vt.current.addEventListener("click",Yt),function(){Vt.current.removeEventListener("click",Yt),x(),f()}},[$t,Vt.current,Yt]);var er=function(St){if(!U)return;St.target.nodeName==="IMG"?(Ot.current.style.display="flex",Ot.current.style.width=St.target.clientWidth+"px",Ot.current.style.height=St.target.clientHeight+"px",Ot.current.style.top=St.target.offsetTop+"px",Ot.current.style.left=St.target.offsetLeft+"px",kt.current.src=St.target.getAttribute("src")):Ot.current.style.display="none"};return d.a.createElement("div",{style:{position:"relative"}},d.a.createElement("div",{ref:Vt,style:Object(D.a)({},ze),className:"".concat(M||""," markdown-body ").concat(it.a.mdBody),onMouseOver:er,dangerouslySetInnerHTML:{__html:$t}}),d.a.createElement("div",{ref:Ot,className:it.a.button},d.a.createElement(B.a,null,d.a.createElement(_.a,{onClick:function(){return jt()}},"\u88C1\u526A"),d.a.createElement(_.a,{onClick:function(){return Zt()}},"\u7F16\u8F91"))),d.a.createElement("img",{ref:kt,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1,top:"-10000px"}}),d.a.createElement(ce.a,{close:!0,data:wt,hasMask:Pe,type:wt!=null&&wt.length?Xt:"",style:Object(D.a)({},Pt),onClose:function(){return _t("")}}))}},BU3w:function(et,he,K){"use strict";K.d(he,"a",function(){return A});var ue=K("MNnm"),B="rc-util-key";function w(N){if(N.attachTo)return N.attachTo;var k=document.querySelector("head");return k||document.body}function _(N){var k,S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(ue.a)())return null;var C=document.createElement("style");if((k=S.csp)===null||k===void 0?void 0:k.nonce){var d;C.nonce=(d=S.csp)===null||d===void 0?void 0:d.nonce}C.innerHTML=N;var v=w(S),b=v.firstChild;return S.prepend&&v.prepend?v.prepend(C):S.prepend&&b?v.insertBefore(C,b):v.appendChild(C),C}var D=new Map;function A(N,k){var S=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},C=w(S);if(!D.has(C)){var d=_("",S),v=d.parentNode;D.set(C,v),v.removeChild(d)}var b=Array.from(D.get(C).children).find(function(e){return e.tagName==="STYLE"&&e[B]===k});if(b){var p,m;if(((p=S.csp)===null||p===void 0?void 0:p.nonce)&&b.nonce!==((m=S.csp)===null||m===void 0?void 0:m.nonce)){var y;b.nonce=(y=S.csp)===null||y===void 0?void 0:y.nonce}return b.innerHTML!==N&&(b.innerHTML=N),b}var n=_(N,S);return n[B]=k,n}},"C/vA":function(et,he,K){"use strict";K.d(he,"a",function(){return ue});function ue(B){var w=this,_=!1,D;return function(){return _||(_=!0,D=B.apply(w,arguments)),D}}},"Cg/j":function(et,he,K){"use strict";K.d(he,"b",function(){return ue}),K.d(he,"a",function(){return B}),K.d(he,"c",function(){return _}),K.d(he,"d",function(){return D});var ue;(function(A){A.serviceIds=new Map,A.DI_TARGET="$di$target",A.DI_DEPENDENCIES="$di$dependencies";function N(k){return k[A.DI_DEPENDENCIES]||[]}A.getServiceDependencies=N})(ue||(ue={}));var B=_("instantiationService");function w(A,N,k,S){N[ue.DI_TARGET]===N?N[ue.DI_DEPENDENCIES].push({id:A,index:k,optional:S}):(N[ue.DI_DEPENDENCIES]=[{id:A,index:k,optional:S}],N[ue.DI_TARGET]=N)}function _(A){if(ue.serviceIds.has(A))return ue.serviceIds.get(A);var N=function(k,S,C){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");w(N,k,C,!1)};return N.toString=function(){return A},ue.serviceIds.set(A,N),N}function D(A){return function(N,k,S){if(arguments.length!==3)throw new Error("@optional-decorator can only be used to decorate a parameter");w(A,N,S,!0)}}},DlQD:function(et,he,K){(function(ue,B){et.exports=B()})(this,function(){"use strict";function ue(oe,re){for(var ae=0;aeoe.length)&&(re=oe.length);for(var ae=0,W=new Array(re);ae=oe.length?{done:!0}:{done:!1,value:oe[W++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return ae=oe[Symbol.iterator](),ae.next.bind(ae)}function A(oe,re){return re={exports:{}},oe(re,re.exports),re.exports}var N=A(function(oe){function re(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}function ae(W){oe.exports.defaults=W}oe.exports={defaults:re(),getDefaults:re,changeDefaults:ae}}),k=N.defaults,S=N.getDefaults,C=N.changeDefaults,d=/[&<>"']/,v=/[&<>"']/g,b=/[<>"']|&(?!#?\w+;)/,p=/[<>"']|&(?!#?\w+;)/g,m={"&":"&","<":"<",">":">",'"':""","'":"'"},y=function(re){return m[re]};function n(oe,re){if(re){if(d.test(oe))return oe.replace(v,y)}else if(b.test(oe))return oe.replace(p,y);return oe}var e=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function t(oe){return oe.replace(e,function(re,ae){return ae=ae.toLowerCase(),ae==="colon"?":":ae.charAt(0)==="#"?ae.charAt(1)==="x"?String.fromCharCode(parseInt(ae.substring(2),16)):String.fromCharCode(+ae.substring(1)):""})}var r=/(^|[^\[])\^/g;function f(oe,re){oe=oe.source||oe,re=re||"";var ae={replace:function(H,Y){return Y=Y.source||Y,Y=Y.replace(r,"$1"),oe=oe.replace(H,Y),ae},getRegex:function(){return new RegExp(oe,re)}};return ae}var c=/[^\w:]/g,u=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function E(oe,re,ae){if(oe){var W;try{W=decodeURIComponent(t(ae)).replace(c,"").toLowerCase()}catch(H){return null}if(W.indexOf("javascript:")===0||W.indexOf("vbscript:")===0||W.indexOf("data:")===0)return null}re&&!u.test(ae)&&(ae=l(re,ae));try{ae=encodeURI(ae).replace(/%25/g,"%")}catch(H){return null}return ae}var g={},s=/^[^:]+:\/*[^/]*$/,a=/^([^:]+:)[\s\S]*$/,i=/^([^:]+:\/*[^/]*)[\s\S]*$/;function l(oe,re){g[" "+oe]||(s.test(oe)?g[" "+oe]=oe+"/":g[" "+oe]=R(oe,"/",!0)),oe=g[" "+oe];var ae=oe.indexOf(":")===-1;return re.substring(0,2)==="//"?ae?re:oe.replace(a,"$1")+re:re.charAt(0)==="/"?ae?re:oe.replace(i,"$1")+re:oe+re}var T={exec:function(){}};function x(oe){for(var re=1,ae,W;re=0&&me[Be]==="\\";)Ce=!Ce;return Ce?"|":" |"}),W=ae.split(/ \|/),H=0;if(W.length>re)W.splice(re);else for(;W.length=W.length?H.slice(W.length):H}).join(`
`)}var ve=function(){function oe(ae){this.options=ae||z}var re=oe.prototype;return re.space=function(W){var H=this.rules.block.newline.exec(W);if(H)return H[0].length>1?{type:"space",raw:H[0]}:{raw:`
`}},re.code=function(W,H){var Y=this.rules.block.code.exec(W);if(Y){var ee=H[H.length-1];if(ee&&ee.type==="paragraph")return{raw:Y[0],text:Y[0].trimRight()};var me=Y[0].replace(/^ {4}/gm,"");return{type:"code",raw:Y[0],codeBlockStyle:"indented",text:this.options.pedantic?me:Q(me,`
`)}}},re.fences=function(W){var H=this.rules.block.fences.exec(W);if(H){var Y=H[0],ee=ye(Y,H[3]||"");return{type:"code",raw:Y,lang:H[2]?H[2].trim():H[2],text:ee}}},re.heading=function(W){var H=this.rules.block.heading.exec(W);if(H)return{type:"heading",raw:H[0],depth:H[1].length,text:H[2]}},re.nptable=function(W){var H=this.rules.block.nptable.exec(W);if(H){var Y={type:"table",header:J(H[1].replace(/^ *| *\| *$/g,"")),align:H[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:H[3]?H[3].replace(/\n$/,"").split(`
`):[],raw:H[0]};if(Y.header.length===Y.align.length){var ee=Y.align.length,me;for(me=0;me ?/gm,"");return{type:"blockquote",raw:H[0],text:Y}}},re.list=function(W){var H=this.rules.block.list.exec(W);if(H){for(var Y=H[0],ee=H[2],me=ee.length>1,Ce=ee[ee.length-1]===")",Be={type:"list",raw:Y,ordered:me,start:me?+ee.slice(0,-1):"",loose:!1,items:[]},Ge=H[0].match(this.rules.block.item),Qe=!1,Ve,qe,at,Je,Ct,ht,Lt,xt=Ge.length,rt=0;rt1||this.options.smartLists&&at!==ee)&&(Je=Ge.slice(rt+1).join(`
`),Be.raw=Be.raw.substring(0,Be.raw.length-Je.length),rt=xt-1)),Ct=Qe||/\n\n(?!\s*$)/.test(Ve),rt!==xt-1&&(Qe=Ve.charAt(Ve.length-1)===`
`,Ct||(Ct=Qe)),Ct&&(Be.loose=!0),ht=/^\[[ xX]\] /.test(Ve),Lt=void 0,ht&&(Lt=Ve[1]!==" ",Ve=Ve.replace(/^\[[ xX]\] +/,"")),Be.items.push({type:"list_item",raw:Y,task:ht,checked:Lt,loose:Ct,text:Ve});return Be}},re.html=function(W){var H=this.rules.block.html.exec(W);if(H)return{type:this.options.sanitize?"paragraph":"html",raw:H[0],pre:!this.options.sanitizer&&(H[1]==="pre"||H[1]==="script"||H[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(H[0]):ie(H[0]):H[0]}},re.def=function(W){var H=this.rules.block.def.exec(W);if(H){H[3]&&(H[3]=H[3].substring(1,H[3].length-1));var Y=H[1].toLowerCase().replace(/\s+/g," ");return{tag:Y,raw:H[0],href:H[2],title:H[3]}}},re.table=function(W){var H=this.rules.block.table.exec(W);if(H){var Y={type:"table",header:J(H[1].replace(/^ *| *\| *$/g,"")),align:H[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:H[3]?H[3].replace(/\n$/,"").split(`
`):[]};if(Y.header.length===Y.align.length){Y.raw=H[0];var ee=Y.align.length,me;for(me=0;me/i.test(ee[0])&&(H=!1),!Y&&/^<(pre|code|kbd|script)(\s|>)/i.test(ee[0])?Y=!0:Y&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(ee[0])&&(Y=!1),{type:this.options.sanitize?"text":"html",raw:ee[0],inLink:H,inRawBlock:Y,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ee[0]):ie(ee[0]):ee[0]}},re.link=function(W){var H=this.rules.inline.link.exec(W);if(H){var Y=pe(H[2],"()");if(Y>-1){var ee=H[0].indexOf("!")===0?5:4,me=ee+H[1].length+Y;H[2]=H[2].substring(0,Y),H[0]=H[0].substring(0,me).trim(),H[3]=""}var Ce=H[2],Be="";if(this.options.pedantic){var Ge=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Ce);Ge?(Ce=Ge[1],Be=Ge[3]):Be=""}else Be=H[3]?H[3].slice(1,-1):"";Ce=Ce.trim().replace(/^<([\s\S]*)>$/,"$1");var Qe=ce(H,{href:Ce&&Ce.replace(this.rules.inline._escapes,"$1"),title:Be&&Be.replace(this.rules.inline._escapes,"$1")},H[0]);return Qe}},re.reflink=function(W,H){var Y;if((Y=this.rules.inline.reflink.exec(W))||(Y=this.rules.inline.nolink.exec(W))){var ee=(Y[2]||Y[1]).replace(/\s+/g," ");if(ee=H[ee.toLowerCase()],!ee||!ee.href){var me=Y[0].charAt(0);return{type:"text",raw:me,text:me}}var Ce=ce(Y,ee,Y[0]);return Ce}},re.strong=function(W,H,Y){Y===void 0&&(Y="");var ee=this.rules.inline.strong.start.exec(W);if(ee&&(!ee[1]||ee[1]&&(Y===""||this.rules.inline.punctuation.exec(Y)))){H=H.slice(-1*W.length);var me=ee[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;me.lastIndex=0;for(var Ce;(ee=me.exec(H))!=null;)if(Ce=this.rules.inline.strong.middle.exec(H.slice(0,ee.index+3)),Ce)return{type:"strong",raw:W.slice(0,Ce[0].length),text:W.slice(2,Ce[0].length-2)}}},re.em=function(W,H,Y){Y===void 0&&(Y="");var ee=this.rules.inline.em.start.exec(W);if(ee&&(!ee[1]||ee[1]&&(Y===""||this.rules.inline.punctuation.exec(Y)))){H=H.slice(-1*W.length);var me=ee[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;me.lastIndex=0;for(var Ce;(ee=me.exec(H))!=null;)if(Ce=this.rules.inline.em.middle.exec(H.slice(0,ee.index+2)),Ce)return{type:"em",raw:W.slice(0,Ce[0].length),text:W.slice(1,Ce[0].length-1)}}},re.codespan=function(W){var H=this.rules.inline.code.exec(W);if(H){var Y=H[2].replace(/\n/g," "),ee=/[^ ]/.test(Y),me=Y.startsWith(" ")&&Y.endsWith(" ");return ee&&me&&(Y=Y.substring(1,Y.length-1)),Y=ie(Y,!0),{type:"codespan",raw:H[0],text:Y}}},re.br=function(W){var H=this.rules.inline.br.exec(W);if(H)return{type:"br",raw:H[0]}},re.del=function(W){var H=this.rules.inline.del.exec(W);if(H)return{type:"del",raw:H[0],text:H[1]}},re.autolink=function(W,H){var Y=this.rules.inline.autolink.exec(W);if(Y){var ee,me;return Y[2]==="@"?(ee=ie(this.options.mangle?H(Y[1]):Y[1]),me="mailto:"+ee):(ee=ie(Y[1]),me=ee),{type:"link",raw:Y[0],text:ee,href:me,tokens:[{type:"text",raw:ee,text:ee}]}}},re.url=function(W,H){var Y;if(Y=this.rules.inline.url.exec(W)){var ee,me;if(Y[2]==="@")ee=ie(this.options.mangle?H(Y[0]):Y[0]),me="mailto:"+ee;else{var Ce;do Ce=Y[0],Y[0]=this.rules.inline._backpedal.exec(Y[0])[0];while(Ce!==Y[0]);ee=ie(Y[0]),Y[1]==="www."?me="http://"+ee:me=ee}return{type:"link",raw:Y[0],text:ee,href:me,tokens:[{type:"text",raw:ee,text:ee}]}}},re.inlineText=function(W,H,Y){var ee=this.rules.inline.text.exec(W);if(ee){var me;return H?me=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ee[0]):ie(ee[0]):ee[0]:me=ie(this.options.smartypants?Y(ee[0]):ee[0]),{type:"text",raw:ee[0],text:me}}},oe}(),Z=j.noopTest,q=j.edit,se=j.merge,V={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6}) +([^\n]*?)(?: +#+)? *(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|\\n*|\\n*|?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:Z,table:Z,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};V._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,V._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,V.def=q(V.def).replace("label",V._label).replace("title",V._title).getRegex(),V.bullet=/(?:[*+-]|\d{1,9}[.)])/,V.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,V.item=q(V.item,"gm").replace(/bull/g,V.bullet).getRegex(),V.list=q(V.list).replace(/bull/g,V.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+V.def.source+")").getRegex(),V._tag="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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",V._comment=//,V.html=q(V.html,"i").replace("comment",V._comment).replace("tag",V._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),V.paragraph=q(V._paragraph).replace("hr",V.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",V._tag).getRegex(),V.blockquote=q(V.blockquote).replace("paragraph",V.paragraph).getRegex(),V.normal=se({},V),V.gfm=se({},V.normal,{nptable:"^ *([^|\\n ].*\\|.*)\\n *([-:]+ *\\|[-| :]*)(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)",table:"^ *\\|(.+)\\n *\\|?( *[-:]+[-| :]*)(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),V.gfm.nptable=q(V.gfm.nptable).replace("hr",V.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",V._tag).getRegex(),V.gfm.table=q(V.gfm.table).replace("hr",V.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",V._tag).getRegex(),V.pedantic=se({},V.normal,{html:q(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?\\1> *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",V._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:Z,paragraph:q(V.normal._paragraph).replace("hr",V.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",V.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var G={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Z,tag:"^comment|^[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",strong:{start:/^(?:(\*\*(?=[*punctuation]))|\*\*)(?![\s])|__/,middle:/^\*\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*\*$|^__(?![\s])((?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?)__$/,endAst:/[^punctuation\s]\*\*(?!\*)|[punctuation]\*\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]__(?!_)(?:(?=[punctuation\s])|$)/},em:{start:/^(?:(\*(?=[punctuation]))|\*)(?![*\s])|_/,middle:/^\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*$|^_(?![_\s])(?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?_$/,endAst:/[^punctuation\s]\*(?!\*)|[punctuation]\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]_(?!_)(?:(?=[punctuation\s])|$)/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:Z,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~",G.punctuation=q(G.punctuation).replace(/punctuation/g,G._punctuation).getRegex(),G._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",G._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",G.em.start=q(G.em.start).replace(/punctuation/g,G._punctuation).getRegex(),G.em.middle=q(G.em.middle).replace(/punctuation/g,G._punctuation).replace(/overlapSkip/g,G._overlapSkip).getRegex(),G.em.endAst=q(G.em.endAst,"g").replace(/punctuation/g,G._punctuation).getRegex(),G.em.endUnd=q(G.em.endUnd,"g").replace(/punctuation/g,G._punctuation).getRegex(),G.strong.start=q(G.strong.start).replace(/punctuation/g,G._punctuation).getRegex(),G.strong.middle=q(G.strong.middle).replace(/punctuation/g,G._punctuation).replace(/blockSkip/g,G._blockSkip).getRegex(),G.strong.endAst=q(G.strong.endAst,"g").replace(/punctuation/g,G._punctuation).getRegex(),G.strong.endUnd=q(G.strong.endUnd,"g").replace(/punctuation/g,G._punctuation).getRegex(),G.blockSkip=q(G._blockSkip,"g").getRegex(),G.overlapSkip=q(G._overlapSkip,"g").getRegex(),G._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,G._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,G._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,G.autolink=q(G.autolink).replace("scheme",G._scheme).replace("email",G._email).getRegex(),G._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,G.tag=q(G.tag).replace("comment",V._comment).replace("attribute",G._attribute).getRegex(),G._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,G._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,G._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,G.link=q(G.link).replace("label",G._label).replace("href",G._href).replace("title",G._title).getRegex(),G.reflink=q(G.reflink).replace("label",G._label).getRegex(),G.reflinkSearch=q(G.reflinkSearch,"g").replace("reflink",G.reflink).replace("nolink",G.nolink).getRegex(),G.normal=se({},G),G.pedantic=se({},G.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:q(/^!?\[(label)\]\((.*?)\)/).replace("label",G._label).getRegex(),reflink:q(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",G._label).getRegex()}),G.gfm=se({},G.normal,{escape:q(G.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\.5&&(W="x"+W.toString(16)),re+=""+W+";";return re}var te=function(){function oe(ae){this.tokens=[],this.tokens.links=Object.create(null),this.options=ae||Re,this.options.tokenizer=this.options.tokenizer||new ve,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var W={block:De.normal,inline:Me.normal};this.options.pedantic?(W.block=De.pedantic,W.inline=Me.pedantic):this.options.gfm&&(W.block=De.gfm,this.options.breaks?W.inline=Me.breaks:W.inline=Me.gfm),this.tokenizer.rules=W}oe.lex=function(W,H){var Y=new oe(H);return Y.lex(W)};var re=oe.prototype;return re.lex=function(W){return W=W.replace(/\r\n|\r/g,`
`).replace(/\t/g," "),this.blockTokens(W,this.tokens,!0),this.inline(this.tokens),this.tokens},re.blockTokens=function(W,H,Y){H===void 0&&(H=[]),Y===void 0&&(Y=!0),W=W.replace(/^ +$/gm,"");for(var ee,me,Ce,Be;W;){if(ee=this.tokenizer.space(W)){W=W.substring(ee.raw.length),ee.type&&H.push(ee);continue}if(ee=this.tokenizer.code(W,H)){W=W.substring(ee.raw.length),ee.type?H.push(ee):(Be=H[H.length-1],Be.raw+=`
`+ee.raw,Be.text+=`
`+ee.text);continue}if(ee=this.tokenizer.fences(W)){W=W.substring(ee.raw.length),H.push(ee);continue}if(ee=this.tokenizer.heading(W)){W=W.substring(ee.raw.length),H.push(ee);continue}if(ee=this.tokenizer.nptable(W)){W=W.substring(ee.raw.length),H.push(ee);continue}if(ee=this.tokenizer.hr(W)){W=W.substring(ee.raw.length),H.push(ee);continue}if(ee=this.tokenizer.blockquote(W)){W=W.substring(ee.raw.length),ee.tokens=this.blockTokens(ee.text,[],Y),H.push(ee);continue}if(ee=this.tokenizer.list(W)){for(W=W.substring(ee.raw.length),Ce=ee.items.length,me=0;me0)for(;(Ge=this.tokenizer.rules.inline.reflinkSearch.exec(Be))!=null;)Qe.includes(Ge[0].slice(Ge[0].lastIndexOf("[")+1,-1))&&(Be=Be.slice(0,Ge.index)+"["+"a".repeat(Ge[0].length-2)+"]"+Be.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(Ge=this.tokenizer.rules.inline.blockSkip.exec(Be))!=null;)Be=Be.slice(0,Ge.index)+"["+"a".repeat(Ge[0].length-2)+"]"+Be.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;W;){if(Ce=this.tokenizer.escape(W)){W=W.substring(Ce.raw.length),H.push(Ce);continue}if(Ce=this.tokenizer.tag(W,Y,ee)){W=W.substring(Ce.raw.length),Y=Ce.inLink,ee=Ce.inRawBlock,H.push(Ce);continue}if(Ce=this.tokenizer.link(W)){W=W.substring(Ce.raw.length),Ce.type==="link"&&(Ce.tokens=this.inlineTokens(Ce.text,[],!0,ee)),H.push(Ce);continue}if(Ce=this.tokenizer.reflink(W,this.tokens.links)){W=W.substring(Ce.raw.length),Ce.type==="link"&&(Ce.tokens=this.inlineTokens(Ce.text,[],!0,ee)),H.push(Ce);continue}if(Ce=this.tokenizer.strong(W,Be,me)){W=W.substring(Ce.raw.length),Ce.tokens=this.inlineTokens(Ce.text,[],Y,ee),H.push(Ce);continue}if(Ce=this.tokenizer.em(W,Be,me)){W=W.substring(Ce.raw.length),Ce.tokens=this.inlineTokens(Ce.text,[],Y,ee),H.push(Ce);continue}if(Ce=this.tokenizer.codespan(W)){W=W.substring(Ce.raw.length),H.push(Ce);continue}if(Ce=this.tokenizer.br(W)){W=W.substring(Ce.raw.length),H.push(Ce);continue}if(Ce=this.tokenizer.del(W)){W=W.substring(Ce.raw.length),Ce.tokens=this.inlineTokens(Ce.text,[],Y,ee),H.push(Ce);continue}if(Ce=this.tokenizer.autolink(W,$)){W=W.substring(Ce.raw.length),H.push(Ce);continue}if(!Y&&(Ce=this.tokenizer.url(W,$))){W=W.substring(Ce.raw.length),H.push(Ce);continue}if(Ce=this.tokenizer.inlineText(W,ee,X)){W=W.substring(Ce.raw.length),me=Ce.raw.slice(-1),H.push(Ce);continue}if(W){var Ve="Infinite loop on byte: "+W.charCodeAt(0);if(this.options.silent){console.error(Ve);break}else throw new Error(Ve)}}return H},B(oe,null,[{key:"rules",get:function(){return{block:De,inline:Me}}}]),oe}(),de=N.defaults,fe=j.cleanUrl,we=j.escape,Ie=function(){function oe(ae){this.options=ae||de}var re=oe.prototype;return re.code=function(W,H,Y){var ee=(H||"").match(/\S*/)[0];if(this.options.highlight){var me=this.options.highlight(W,ee);me!=null&&me!==W&&(Y=!0,W=me)}return ee?''+(Y?W:we(W,!0))+`
`:""+(Y?W:we(W,!0))+`
`},re.blockquote=function(W){return`
`+W+`
`},re.html=function(W){return W},re.heading=function(W,H,Y,ee){return this.options.headerIds?"
`:""+W+"
`},re.hr=function(){return this.options.xhtml?`
`:`
`},re.list=function(W,H,Y){var ee=H?"ol":"ul",me=H&&Y!==1?' start="'+Y+'"':"";return"<"+ee+me+`>
`+W+""+ee+`>
`},re.listitem=function(W){return""+W+`
`},re.checkbox=function(W){return" "},re.paragraph=function(W){return""+W+`
`},re.table=function(W,H){return H&&(H=""+H+""),`
`},re.tablerow=function(W){return`
`+W+`
`},re.tablecell=function(W,H){var Y=H.header?"th":"td",ee=H.align?"<"+Y+' align="'+H.align+'">':"<"+Y+">";return ee+W+""+Y+`>
`},re.strong=function(W){return""+W+""},re.em=function(W){return""+W+""},re.codespan=function(W){return""+W+""},re.br=function(){return this.options.xhtml?"
":"
"},re.del=function(W){return""+W+""},re.link=function(W,H,Y){if(W=fe(this.options.sanitize,this.options.baseUrl,W),W===null)return Y;var ee='"+Y+"",ee},re.image=function(W,H,Y){if(W=fe(this.options.sanitize,this.options.baseUrl,W),W===null)return Y;var ee='
":">",ee},re.text=function(W){return W},oe}(),_e=function(){function oe(){}var re=oe.prototype;return re.strong=function(W){return W},re.em=function(W){return W},re.codespan=function(W){return W},re.del=function(W){return W},re.html=function(W){return W},re.text=function(W){return W},re.link=function(W,H,Y){return""+Y},re.image=function(W,H,Y){return""+Y},re.br=function(){return""},oe}(),Fe=function(){function oe(){this.seen={}}var re=oe.prototype;return re.slug=function(W){var H=W.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(H)){var Y=H;do this.seen[Y]++,H=Y+"-"+this.seen[Y];while(this.seen.hasOwnProperty(H))}return this.seen[H]=0,H},oe}(),le=N.defaults,ge=j.unescape,Ee=function(){function oe(ae){this.options=ae||le,this.options.renderer=this.options.renderer||new Ie,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new _e,this.slugger=new Fe}oe.parse=function(W,H){var Y=new oe(H);return Y.parse(W)};var re=oe.prototype;return re.parse=function(W,H){H===void 0&&(H=!0);var Y="",ee,me,Ce,Be,Ge,Qe,Ve,qe,at,Je,Ct,ht,Lt,xt,rt,Dt,At,$e,Xe=W.length;for(ee=0;ee0&&rt.tokens[0].type==="text"?(rt.tokens[0].text=$e+" "+rt.tokens[0].text,rt.tokens[0].tokens&&rt.tokens[0].tokens.length>0&&rt.tokens[0].tokens[0].type==="text"&&(rt.tokens[0].tokens[0].text=$e+" "+rt.tokens[0].tokens[0].text)):rt.tokens.unshift({type:"text",text:$e}):xt+=$e),xt+=this.parse(rt.tokens,Lt),at+=this.renderer.listitem(xt,At,Dt);Y+=this.renderer.list(at,Ct,ht);continue}case"html":{Y+=this.renderer.html(Je.text);continue}case"paragraph":{Y+=this.renderer.paragraph(this.parseInline(Je.tokens));continue}case"text":{for(at=Je.tokens?this.parseInline(Je.tokens):Je.text;ee+1An error occurred:"+Le(Ce.message+"",!0)+"
";throw Ce}}Te.options=Te.setOptions=function(oe){return Se(Te.defaults,oe),Oe(Te.defaults),Te},Te.getDefaults=xe,Te.defaults=Ue,Te.use=function(oe){var re=Se({},oe);if(oe.renderer&&function(){var W=Te.defaults.renderer||new Ie,H=function(me){var Ce=W[me];W[me]=function(){for(var Be=arguments.length,Ge=new Array(Be),Qe=0;Qe3:Ze.key!=4}))},lt=function nt(tt){return tt.map(function(Ze){var mt=Ze.title.indexOf(W),vt=Ze.title.substr(0,mt),dt=Ze.title.substr(mt+W.length),pt=e.a.createElement("span",null,vt,e.a.createElement("span",{className:"c-blue"},W),dt,Object(c.o)()&&e.a.createElement(s.a,{placement:"right",title:W,content:function(){return He(Ze)},trigger:"hover"},e.a.createElement("span",{className:"iconfont icon-sandian ".concat(G.a.actions)})));if(W!==""){var Tt;if(mt===-1&&!((Tt=Ze.children)!==null&&Tt!==void 0&&Tt.length))return null}return Ze.children&&Ze.file_type===1?Object(S.a)(Object(S.a)({},Ze),{},{title:pt,key:Ze.key,children:nt(Ze.children)}):Object(S.a)(Object(S.a)({},Ze),{},{title:pt,key:Ze.key,isLeaf:!0})}).filter(function(Ze){return!!Ze})},ut=function nt(tt,Ze){for(var mt,vt=0;vt-1}))!==null&&dt!==void 0&&dt.length?vt.id:null}return null});H(Ze),xt(!0),console.log("expandedKeys:",mt),Qe(mt)};return console.log("loop(treeData):",lt(At)),e.a.createElement("div",{className:G.a.tree},e.a.createElement(be,{style:{marginBottom:8},placeholder:"\u8F93\u5165\u5173\u952E\u5B57\u68C0\u7D22",onChange:ft}),e.a.createElement(Re,{multiple:!0,defaultExpandAll:!0,onSelect:Xe,onExpand:je,expandedKeys:Ge,selectedKeys:at,autoExpandParent:Lt,treeData:lt(At)}),e.a.createElement(ye,null),e.a.createElement(q,null))},Me=Object(r.a)(function(te){var de=te.user,fe=te.loading,we=te.globalSetting,Ie=te.restful;return{user:de,globalSetting:we,restful:Ie,loading:fe.models.index}})(De),X=function(de){var fe,we,Ie=de.user,_e=de.globalSetting,Fe=de.loading,le=de.dispatch,ge=de.restful,Ee=Object(p.a)(de,["user","globalSetting","loading","dispatch","restful"]),Se=Object(n.useState)({content:"",message:"",status:0,contacts:[],address:"",data:[]}),Ae=Object(b.a)(Se,2),Le=Ae[0],xe=Ae[1],Oe=Object(n.useState)(!0),Ue=Object(b.a)(Oe,2),Te=Ue[0],Ne=Ue[1],oe=v.a.useForm(),re=Object(b.a)(oe,1),ae=re[0],W=Ee.match.params,H=function(){var me=Object(C.a)(y.a.mark(function Ce(){return y.a.wrap(function(Ge){for(;;)switch(Ge.prev=Ge.next){case 0:le({type:"restful/getRestful"}),W.id&&le({type:"restful/getRestfulDetail",payload:Object(S.a)({},W)});case 2:case"end":return Ge.stop()}},Ce)}));return function(){return me.apply(this,arguments)}}();Object(n.useEffect)(function(){Ne(!0),H()},[W.id]);var Y=function(){le({type:"restful/setActionTabs",payload:{key:"\u65B0\u5EFA\u540C\u7EA7\u76EE\u5F55"}})},ee=function(){var Ce;if((Ce=ge.restful)!==null&&Ce!==void 0&&Ce.data){var Be,Ge,Qe=0;return(Be=ge.restful)===null||Be===void 0||((Ge=Be.data)===null||Ge===void 0)||Ge.map(function(Ve){var qe;Ve==null||((qe=Ve.children)===null||qe===void 0)||qe.map(function(at){at.id==Ee.match.params.id&&(Qe=Ve.id)}),!Ve.children&&!Qe&&(Qe=Ve.id)}),Qe}return 0};return e.a.createElement("section",null,e.a.createElement("aside",{className:"edu-container mt20"},e.a.createElement(k.a,null,e.a.createElement(k.a.Item,null,e.a.createElement(t.a,{to:"/"},"\u9996\u9875")),e.a.createElement(k.a.Item,null,e.a.createElement(t.a,{to:"/ch/rest"},"API\u6587\u6863"))),e.a.createElement("div",{className:"mt20"},e.a.createElement(_.a,{gutter:[20,20]},e.a.createElement(A.a,{flex:"300px"},e.a.createElement(Me,Ee)),e.a.createElement(A.a,{flex:"1"},e.a.createElement("div",{className:E.a.info},e.a.createElement("h1",{style:{fontSize:28,paddingBottom:15,borderBottom:"1px solid #eaeaea",textAlign:"center"}},(fe=ge.restfulDetail)===null||fe===void 0?void 0:fe.name),e.a.createElement(f.a,{value:(we=ge.restfulDetail)===null||we===void 0?void 0:we.description}))))),Object(c.o)()&&e.a.createElement("div",{className:E.a.bar},e.a.createElement(_.a,null,!!ee()&&e.a.createElement(A.a,null,e.a.createElement(B.a,{title:"\u7F16\u8F91\u6587\u4EF6"},e.a.createElement(t.a,{to:"/ch/rest/edit/".concat(ee(),"/").concat(Ee.match.params.id),className:"icon-zhongmingming current"}))),e.a.createElement(A.a,null,e.a.createElement(B.a,{title:"\u6DFB\u52A0\u6587\u4EF6"},e.a.createElement(t.a,{to:"/ch/rest/edit/".concat(ee(),"/0"),className:"icon-tianjiatimu current"}))),e.a.createElement(A.a,null,e.a.createElement(B.a,{title:"\u65B0\u5EFA\u6587\u4EF6\u5939"},e.a.createElement("span",{className:"icon-wenjianjia1 current",onClick:Y})))))))},$=he.default=Object(r.a)(function(te){var de=te.user,fe=te.loading,we=te.globalSetting,Ie=te.restful;return{user:de,globalSetting:we,restful:Ie,loading:fe.models.index}})(X)},JYp7:function(et,he,K){"use strict";K.d(he,"c",function(){return B}),K.d(he,"d",function(){return w}),K.d(he,"f",function(){return D}),K.d(he,"a",function(){return A}),K.d(he,"b",function(){return N}),K.d(he,"e",function(){return k});var ue=function(){var S=function(C,d){return S=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,b){v.__proto__=b}||function(v,b){for(var p in b)b.hasOwnProperty(p)&&(v[p]=b[p])},S(C,d)};return function(C,d){S(C,d);function v(){this.constructor=C}C.prototype=d===null?Object.create(d):(v.prototype=d.prototype,new v)}}(),B={done:!0,value:void 0},w;(function(S){var C={next:function(){return B}};function d(){return C}S.empty=d;function v(c){var u=!1;return{next:function(){return u?B:(u=!0,{done:!1,value:c})}}}S.single=v;function b(c,u,E){return u===void 0&&(u=0),E===void 0&&(E=c.length),{next:function(){return u>=E?B:{done:!1,value:c[u++]}}}}S.fromArray=b;function p(c){return{next:function(){var u=c.next();return u.done?B:{done:!1,value:u.value}}}}S.fromNativeIterator=p;function m(c){return c?Array.isArray(c)?S.fromArray(c):c:S.empty()}S.from=m;function y(c,u){return{next:function(){var E=c.next();return E.done?B:{done:!1,value:u(E.value)}}}}S.map=y;function n(c,u){return{next:function(){for(;;){var E=c.next();if(E.done)return B;if(u(E.value))return{done:!1,value:E.value}}}}}S.filter=n;function e(c,u){for(var E=c.next();!E.done;E=c.next())u(E.value)}S.forEach=e;function t(c,u){u===void 0&&(u=Number.POSITIVE_INFINITY);var E=[];if(u===0)return E;for(var g=0,s=c.next();!s.done&&!(E.push(s.value),++g>=u);s=c.next());return E}S.collect=t;function r(){for(var c=[],u=0;u=c.length)return B;var g=c[E],s=g.next();return s.done?(E++,this.next()):s}}}S.concat=r;function f(c){return new _(c)}S.chain=f})(w||(w={}));var _=function(){function S(C){this.it=C}return S.prototype.next=function(){return this.it.next()},S}();function D(S){return Array.isArray(S)?w.fromArray(S):S||w.empty()}var A=function(){function S(C,d,v,b){d===void 0&&(d=0),v===void 0&&(v=C.length),b===void 0&&(b=d-1),this.items=C,this.start=d,this.end=v,this.index=b}return S.prototype.first=function(){return this.index=this.start,this.current()},S.prototype.next=function(){return this.index=Math.min(this.index+1,this.end),this.current()},S.prototype.current=function(){return this.index===this.start-1||this.index===this.end?null:this.items[this.index]},S}(),N=function(S){ue(C,S);function C(d,v,b,p){return v===void 0&&(v=0),b===void 0&&(b=d.length),p===void 0&&(p=v-1),S.call(this,d,v,b,p)||this}return C.prototype.current=function(){return S.prototype.current.call(this)},C.prototype.previous=function(){return this.index=Math.max(this.index-1,this.start-1),this.current()},C.prototype.first=function(){return this.index=this.start,this.current()},C.prototype.last=function(){return this.index=this.end-1,this.current()},C.prototype.parent=function(){return null},C}(A),k=function(){function S(C,d){this.iterator=C,this.fn=d}return S.prototype.next=function(){return this.fn(this.iterator.next())},S}()},MI8n:function(et,he,K){"use strict";K.d(he,"b",function(){return A}),K.d(he,"a",function(){return S}),K.d(he,"e",function(){return C}),K.d(he,"d",function(){return d}),K.d(he,"c",function(){return v}),K.d(he,"f",function(){return b});var ue=K("/cxE"),B=K("C/vA"),w=K("pmY6"),_=K("24hK"),D=function(){var p=function(m,y){return p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,e){n.__proto__=e}||function(n,e){for(var t in e)e.hasOwnProperty(t)&&(n[t]=e[t])},p(m,y)};return function(m,y){p(m,y);function n(){this.constructor=m}m.prototype=y===null?Object.create(y):(n.prototype=y.prototype,new n)}}(),A;(function(p){p.None=function(){return w.a.None};function m(R){return function(I,F,j){F===void 0&&(F=null);var z=!1,Q;return Q=R(function(J){return z?void 0:(Q?Q.dispose():z=!0,I.call(F,J))},null,j),z&&Q.dispose(),Q}}p.once=m;function y(R,I){return c(function(F,j,z){return j===void 0&&(j=null),R(function(Q){return F.call(j,I(Q))},null,z)})}p.map=y;function n(R,I){return c(function(F,j,z){return j===void 0&&(j=null),R(function(Q){I(Q),F.call(j,Q)},null,z)})}p.forEach=n;function e(R,I){return c(function(F,j,z){return j===void 0&&(j=null),R(function(Q){return I(Q)&&F.call(j,Q)},null,z)})}p.filter=e;function t(R){return R}p.signal=t;function r(){for(var R=[],I=0;I1)&&ce.fire(ve),pe=0},F)})},onLastListenerRemove:function(){Q.dispose()}});return ce.event}p.debounce=u;function E(R){var I=new Date().getTime();return y(m(R),function(F){return new Date().getTime()-I})}p.stopwatch=E;function g(R){var I=!0,F;return e(R,function(j){var z=I||j!==F;return I=!1,F=j,z})}p.latch=g;function s(R,I,F){I===void 0&&(I=!1),F===void 0&&(F=[]);var j=F.slice(),z=R(function(ie){j?j.push(ie):J.fire(ie)}),Q=function(){j&&j.forEach(function(ie){return J.fire(ie)}),j=null},J=new S({onFirstListenerAdd:function(){z||(z=R(function(ie){return J.fire(ie)}))},onFirstListenerDidAdd:function(){j&&(I?setTimeout(Q):Q())},onLastListenerRemove:function(){z&&z.dispose(),z=null}});return J.event}p.buffer=s;var a=function(){function R(I){this.event=I}return R.prototype.map=function(I){return new R(y(this.event,I))},R.prototype.forEach=function(I){return new R(n(this.event,I))},R.prototype.filter=function(I){return new R(e(this.event,I))},R.prototype.reduce=function(I,F){return new R(f(this.event,I,F))},R.prototype.latch=function(){return new R(g(this.event))},R.prototype.debounce=function(I,F,j,z){return F===void 0&&(F=100),j===void 0&&(j=!1),new R(u(this.event,I,F,j,z))},R.prototype.on=function(I,F,j){return this.event(I,F,j)},R.prototype.once=function(I,F,j){return m(this.event)(I,F,j)},R}();function i(R){return new a(R)}p.chain=i;function l(R,I,F){F===void 0&&(F=function(ie){return ie});var j=function(){for(var ie=[],pe=0;pe0?new k(this._options&&this._options.leakWarningThreshold):void 0}return Object.defineProperty(p.prototype,"event",{get:function(){var m=this;return this._event||(this._event=function(y,n,e){m._listeners||(m._listeners=new _.a);var t=m._listeners.isEmpty();t&&m._options&&m._options.onFirstListenerAdd&&m._options.onFirstListenerAdd(m);var r=m._listeners.push(n?[y,n]:y);t&&m._options&&m._options.onFirstListenerDidAdd&&m._options.onFirstListenerDidAdd(m),m._options&&m._options.onListenerDidAdd&&m._options.onListenerDidAdd(m,y,n);var f;m._leakageMon&&(f=m._leakageMon.check(m._listeners.size));var c;return c={dispose:function(){if(f&&f(),c.dispose=p._noop,!m._disposed&&(r(),m._options&&m._options.onLastListenerRemove)){var u=m._listeners&&!m._listeners.isEmpty();u||m._options.onLastListenerRemove(m)}}},e instanceof w.b?e.add(c):Array.isArray(e)&&e.push(c),c}),this._event},enumerable:!0,configurable:!0}),p.prototype.fire=function(m){if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new _.a);for(var y=this._listeners.iterator(),n=y.next();!n.done;n=y.next())this._deliveryQueue.push([n.value,m]);for(;this._deliveryQueue.size>0;){var e=this._deliveryQueue.shift(),t=e[0],r=e[1];try{typeof t=="function"?t.call(void 0,r):t[0].call(t[1],r)}catch(f){Object(ue.e)(f)}}}},p.prototype.dispose=function(){this._listeners&&this._listeners.clear(),this._deliveryQueue&&this._deliveryQueue.clear(),this._leakageMon&&this._leakageMon.dispose(),this._disposed=!0},p._noop=function(){},p}(),C=function(p){D(m,p);function m(y){var n=p.call(this,y)||this;return n._isPaused=0,n._eventQueue=new _.a,n._mergeFn=y&&y.merge,n}return m.prototype.pause=function(){this._isPaused++},m.prototype.resume=function(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){var y=this._eventQueue.toArray();this._eventQueue.clear(),p.prototype.fire.call(this,this._mergeFn(y))}else for(;!this._isPaused&&this._eventQueue.size!==0;)p.prototype.fire.call(this,this._eventQueue.shift())},m.prototype.fire=function(y){this._listeners&&(this._isPaused!==0?this._eventQueue.push(y):p.prototype.fire.call(this,y))},m}(S),d=function(){function p(){var m=this;this.hasListeners=!1,this.events=[],this.emitter=new S({onFirstListenerAdd:function(){return m.onFirstListenerAdd()},onLastListenerRemove:function(){return m.onLastListenerRemove()}})}return Object.defineProperty(p.prototype,"event",{get:function(){return this.emitter.event},enumerable:!0,configurable:!0}),p.prototype.add=function(m){var y=this,n={event:m,listener:null};this.events.push(n),this.hasListeners&&this.hook(n);var e=function(){y.hasListeners&&y.unhook(n);var t=y.events.indexOf(n);y.events.splice(t,1)};return Object(w.h)(Object(B.a)(e))},p.prototype.onFirstListenerAdd=function(){var m=this;this.hasListeners=!0,this.events.forEach(function(y){return m.hook(y)})},p.prototype.onLastListenerRemove=function(){var m=this;this.hasListeners=!1,this.events.forEach(function(y){return m.unhook(y)})},p.prototype.hook=function(m){var y=this;m.listener=m.event(function(n){return y.emitter.fire(n)})},p.prototype.unhook=function(m){m.listener&&m.listener.dispose(),m.listener=null},p.prototype.dispose=function(){this.emitter.dispose()},p}(),v=function(){function p(){this.buffers=[]}return p.prototype.wrapEvent=function(m){var y=this;return function(n,e,t){return m(function(r){var f=y.buffers[y.buffers.length-1];f?f.push(function(){return n.call(e,r)}):n.call(e,r)},void 0,t)}},p.prototype.bufferEvents=function(m){var y=[];this.buffers.push(y);var n=m();return this.buffers.pop(),y.forEach(function(e){return e()}),n},p}(),b=function(){function p(){var m=this;this.listening=!1,this.inputEvent=A.None,this.inputEventListener=w.a.None,this.emitter=new S({onFirstListenerDidAdd:function(){m.listening=!0,m.inputEventListener=m.inputEvent(m.emitter.fire,m.emitter)},onLastListenerRemove:function(){m.listening=!1,m.inputEventListener.dispose()}}),this.event=this.emitter.event}return Object.defineProperty(p.prototype,"input",{set:function(m){this.inputEvent=m,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=m(this.emitter.fire,this.emitter))},enumerable:!0,configurable:!0}),p.prototype.dispose=function(){this.inputEventListener.dispose(),this.emitter.dispose()},p}()},N0LK:function(et,he,K){"use strict";K.d(he,"x",function(){return ue}),K.d(he,"F",function(){return B}),K.d(he,"r",function(){return _}),K.d(he,"o",function(){return D}),K.d(he,"p",function(){return A}),K.d(he,"Q",function(){return N}),K.d(he,"K",function(){return S}),K.d(he,"k",function(){return C}),K.d(he,"N",function(){return d}),K.d(he,"m",function(){return v}),K.d(he,"l",function(){return b}),K.d(he,"I",function(){return p}),K.d(he,"H",function(){return m}),K.d(he,"q",function(){return y}),K.d(he,"t",function(){return n}),K.d(he,"D",function(){return e}),K.d(he,"e",function(){return t}),K.d(he,"f",function(){return r}),K.d(he,"B",function(){return f}),K.d(he,"C",function(){return c}),K.d(he,"n",function(){return E}),K.d(he,"O",function(){return s}),K.d(he,"c",function(){return a}),K.d(he,"d",function(){return i}),K.d(he,"z",function(){return l}),K.d(he,"A",function(){return T}),K.d(he,"u",function(){return x}),K.d(he,"E",function(){return R}),K.d(he,"G",function(){return I}),K.d(he,"i",function(){return j}),K.d(he,"g",function(){return Q}),K.d(he,"v",function(){return ie}),K.d(he,"h",function(){return pe}),K.d(he,"y",function(){return ce}),K.d(he,"w",function(){return ye}),K.d(he,"a",function(){return ve}),K.d(he,"P",function(){return Z}),K.d(he,"L",function(){return q}),K.d(he,"J",function(){return se}),K.d(he,"j",function(){return V}),K.d(he,"M",function(){return G}),K.d(he,"s",function(){return be}),K.d(he,"b",function(){return Re});function ue(X){return!X||typeof X!="string"?!0:X.trim().length===0}function B(X,$,te){te===void 0&&(te="0");for(var de=""+X,fe=[de],we=de.length;we<$;we++)fe.push(te);return fe.reverse().join("")}var w=/{(\d+)}/g;function _(X){for(var $=[],te=1;te=$.length?de:$[we]})}function D(X){return X.replace(/[<>&]/g,function($){switch($){case"<":return"<";case">":return">";case"&":return"&";default:return $}})}function A(X){return X.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function N(X,$){$===void 0&&($=" ");var te=k(X,$);return S(te,$)}function k(X,$){if(!X||!$)return X;var te=$.length;if(te===0||X.length===0)return X;for(var de=0;X.indexOf($,de)===de;)de=de+te;return X.substring(de)}function S(X,$){if(!X||!$)return X;var te=$.length,de=X.length;if(te===0||de===0)return X;for(var fe=de,we=-1;!(we=X.lastIndexOf($,fe-1),we===-1||we+te!==fe);){if(we===0)return"";fe=we}return X.substring(0,fe)}function C(X){return X.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function d(X,$){if(X.length<$.length)return!1;if(X===$)return!0;for(var te=0;te<$.length;te++)if(X[te]!==$[te])return!1;return!0}function v(X,$){var te=X.length-$.length;return te>0?X.indexOf($,te)===te:te===0?X===$:!1}function b(X,$,te){if(te===void 0&&(te={}),!X)throw new Error("Cannot create regex from empty string");$||(X=A(X)),te.wholeWord&&(/\B/.test(X.charAt(0))||(X="\\b"+X),/\B/.test(X.charAt(X.length-1))||(X=X+"\\b"));var de="";return te.global&&(de+="g"),te.matchCase||(de+="i"),te.multiline&&(de+="m"),te.unicode&&(de+="u"),new RegExp(X,de)}function p(X){if(X.source==="^"||X.source==="^$"||X.source==="$"||X.source==="^\\s*$")return!1;var $=X.exec("");return!!($&&X.lastIndex===0)}function m(X){return(X.global?"g":"")+(X.ignoreCase?"i":"")+(X.multiline?"m":"")+(X.unicode?"u":"")}function y(X){for(var $=0,te=X.length;$=0;te--){var de=X.charCodeAt(te);if(de!==32&&de!==9)return te}return-1}function t(X,$){return X<$?-1:X>$?1:0}function r(X,$){for(var te=Math.min(X.length,$.length),de=0;de$.length?1:0}function f(X){return X>=97&&X<=122}function c(X){return X>=65&&X<=90}function u(X){return f(X)||c(X)}function E(X,$){return X.length===$.length&&g(X,$)}function g(X,$,te){te===void 0&&(te=X.length);for(var de=0;deX.length?!1:g(X,$,te)}function a(X,$){var te,de=Math.min(X.length,$.length);for(te=0;te1){var de=X.charCodeAt($-2);if(l(de))return(de-55296<<10)+(te-56320)+65536}return te}function R(X,$){var te=De.getInstance(),de=$,fe=X.length,we=x(X,fe,$);$+=we>=65536?2:1;for(var Ie=te.getGraphemeBreakType(we);$=65536?2:1,Ie=Fe}return $-de}function I(X,$){var te=De.getInstance(),de=$,fe=L(X,$);$-=fe>=65536?2:1;for(var we=te.getGraphemeBreakType(fe);$>0;){var Ie=L(X,$),_e=te.getGraphemeBreakType(Ie);if(Re(_e,we))break;$-=Ie>=65536?2:1,we=_e}return de-$}var F=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u08BD\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE33\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDCFF]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD50-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;function j(X){return F.test(X)}var z=/(?:[\u231A\u231B\u23F0\u23F3\u2600-\u27BF\u2B50\u2B55]|\uD83C[\uDDE6-\uDDFF\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F\uDE80-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD00-\uDDFF\uDE70-\uDE73\uDE78-\uDE82\uDE90-\uDE95])/;function Q(X){return z.test(X)}var J=/^[\t\n\r\x20-\x7E]*$/;function ie(X){return J.test(X)}function pe(X){for(var $=0,te=X.length;$=11904&&X<=55215||X>=63744&&X<=64255||X>=65281&&X<=65374}function ye(X){return X>=127462&&X<=127487||X>=9728&&X<=10175||X>=127744&&X<=128591||X>=128640&&X<=128764||X>=128992&&X<=129003||X>=129280&&X<=129535||X>=129648&&X<=129651||X>=129656&&X<=129666||X>=129680&&X<=129685}var ve=String.fromCharCode(65279);function Z(X){return!!(X&&X.length>0&&X.charCodeAt(0)===65279)}function q(X){return btoa(encodeURIComponent(X))}function se(X,$){for(var te="",de=0;de<$;de++)te+=X;return te}function V(X,$){return $===void 0&&($=!1),X?($&&(X=X.replace(/\\./g,"")),X.toLowerCase()!==X):!1}function G(X){var $=90-65+1;return X=X%(2*$),X<$?String.fromCharCode(97+X):String.fromCharCode(65+X-$)}function be(X){var $=De.getInstance();return $.getGraphemeBreakType(X)}function Re(X,$){return X===0?$!==5&&$!==7:X===2&&$===3?!1:X===4||X===2||X===3||($===4||$===2||$===3)?!0:X===8&&($===8||$===9||$===11||$===12)||((X===11||X===9)&&($===9||$===10)||((X===12||X===10)&&$===10||($===5||$===13||($===7||(X===1||X===13&&$===14)))))?!1:!(X===6&&$===6)}var De=function(){function X(){this._data=Me()}return X.getInstance=function(){return X._INSTANCE||(X._INSTANCE=new X),X._INSTANCE},X.prototype.getGraphemeBreakType=function($){if($<32)return $===10?3:$===13?2:4;if($<127)return 0;for(var te=this._data,de=te.length/3,fe=1;fe<=de;)if($te[3*fe+1])fe=2*fe+1;else return te[3*fe+2];return 0},X._INSTANCE=null,X}();function Me(){return JSON.parse("[0,0,0,51592,51592,11,44424,44424,11,72251,72254,5,7150,7150,7,48008,48008,11,55176,55176,11,128420,128420,14,3276,3277,5,9979,9980,14,46216,46216,11,49800,49800,11,53384,53384,11,70726,70726,5,122915,122916,5,129320,129327,14,2558,2558,5,5906,5908,5,9762,9763,14,43360,43388,8,45320,45320,11,47112,47112,11,48904,48904,11,50696,50696,11,52488,52488,11,54280,54280,11,70082,70083,1,71350,71350,7,73111,73111,5,127892,127893,14,128726,128727,14,129473,129474,14,2027,2035,5,2901,2902,5,3784,3789,5,6754,6754,5,8418,8420,5,9877,9877,14,11088,11088,14,44008,44008,5,44872,44872,11,45768,45768,11,46664,46664,11,47560,47560,11,48456,48456,11,49352,49352,11,50248,50248,11,51144,51144,11,52040,52040,11,52936,52936,11,53832,53832,11,54728,54728,11,69811,69814,5,70459,70460,5,71096,71099,7,71998,71998,5,72874,72880,5,119149,119149,7,127374,127374,14,128335,128335,14,128482,128482,14,128765,128767,14,129399,129400,14,129680,129685,14,1476,1477,5,2377,2380,7,2759,2760,5,3137,3140,7,3458,3459,7,4153,4154,5,6432,6434,5,6978,6978,5,7675,7679,5,9723,9726,14,9823,9823,14,9919,9923,14,10035,10036,14,42736,42737,5,43596,43596,5,44200,44200,11,44648,44648,11,45096,45096,11,45544,45544,11,45992,45992,11,46440,46440,11,46888,46888,11,47336,47336,11,47784,47784,11,48232,48232,11,48680,48680,11,49128,49128,11,49576,49576,11,50024,50024,11,50472,50472,11,50920,50920,11,51368,51368,11,51816,51816,11,52264,52264,11,52712,52712,11,53160,53160,11,53608,53608,11,54056,54056,11,54504,54504,11,54952,54952,11,68108,68111,5,69933,69940,5,70197,70197,7,70498,70499,7,70845,70845,5,71229,71229,5,71727,71735,5,72154,72155,5,72344,72345,5,73023,73029,5,94095,94098,5,121403,121452,5,126981,127182,14,127538,127546,14,127990,127990,14,128391,128391,14,128445,128449,14,128500,128505,14,128752,128752,14,129160,129167,14,129356,129356,14,129432,129442,14,129648,129651,14,129751,131069,14,173,173,4,1757,1757,1,2274,2274,1,2494,2494,5,2641,2641,5,2876,2876,5,3014,3016,7,3262,3262,7,3393,3396,5,3570,3571,7,3968,3972,5,4228,4228,7,6086,6086,5,6679,6680,5,6912,6915,5,7080,7081,5,7380,7392,5,8252,8252,14,9096,9096,14,9748,9749,14,9784,9786,14,9833,9850,14,9890,9894,14,9938,9938,14,9999,9999,14,10085,10087,14,12349,12349,14,43136,43137,7,43454,43456,7,43755,43755,7,44088,44088,11,44312,44312,11,44536,44536,11,44760,44760,11,44984,44984,11,45208,45208,11,45432,45432,11,45656,45656,11,45880,45880,11,46104,46104,11,46328,46328,11,46552,46552,11,46776,46776,11,47000,47000,11,47224,47224,11,47448,47448,11,47672,47672,11,47896,47896,11,48120,48120,11,48344,48344,11,48568,48568,11,48792,48792,11,49016,49016,11,49240,49240,11,49464,49464,11,49688,49688,11,49912,49912,11,50136,50136,11,50360,50360,11,50584,50584,11,50808,50808,11,51032,51032,11,51256,51256,11,51480,51480,11,51704,51704,11,51928,51928,11,52152,52152,11,52376,52376,11,52600,52600,11,52824,52824,11,53048,53048,11,53272,53272,11,53496,53496,11,53720,53720,11,53944,53944,11,54168,54168,11,54392,54392,11,54616,54616,11,54840,54840,11,55064,55064,11,65438,65439,5,69633,69633,5,69837,69837,1,70018,70018,7,70188,70190,7,70368,70370,7,70465,70468,7,70712,70719,5,70835,70840,5,70850,70851,5,71132,71133,5,71340,71340,7,71458,71461,5,71985,71989,7,72002,72002,7,72193,72202,5,72281,72283,5,72766,72766,7,72885,72886,5,73104,73105,5,92912,92916,5,113824,113827,4,119173,119179,5,121505,121519,5,125136,125142,5,127279,127279,14,127489,127490,14,127570,127743,14,127900,127901,14,128254,128254,14,128369,128370,14,128400,128400,14,128425,128432,14,128468,128475,14,128489,128494,14,128715,128720,14,128745,128745,14,128759,128760,14,129004,129023,14,129296,129304,14,129340,129342,14,129388,129392,14,129404,129407,14,129454,129455,14,129485,129487,14,129659,129663,14,129719,129727,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2363,2363,7,2402,2403,5,2507,2508,7,2622,2624,7,2691,2691,7,2786,2787,5,2881,2884,5,3006,3006,5,3072,3072,5,3170,3171,5,3267,3268,7,3330,3331,7,3406,3406,1,3538,3540,5,3655,3662,5,3897,3897,5,4038,4038,5,4184,4185,5,4352,4447,8,6068,6069,5,6155,6157,5,6448,6449,7,6742,6742,5,6783,6783,5,6966,6970,5,7042,7042,7,7143,7143,7,7212,7219,5,7412,7412,5,8206,8207,4,8294,8303,4,8596,8601,14,9410,9410,14,9742,9742,14,9757,9757,14,9770,9770,14,9794,9794,14,9828,9828,14,9855,9855,14,9882,9882,14,9900,9903,14,9929,9933,14,9963,9967,14,9987,9988,14,10006,10006,14,10062,10062,14,10175,10175,14,11744,11775,5,42607,42607,5,43043,43044,7,43263,43263,5,43444,43445,7,43569,43570,5,43698,43700,5,43766,43766,5,44032,44032,11,44144,44144,11,44256,44256,11,44368,44368,11,44480,44480,11,44592,44592,11,44704,44704,11,44816,44816,11,44928,44928,11,45040,45040,11,45152,45152,11,45264,45264,11,45376,45376,11,45488,45488,11,45600,45600,11,45712,45712,11,45824,45824,11,45936,45936,11,46048,46048,11,46160,46160,11,46272,46272,11,46384,46384,11,46496,46496,11,46608,46608,11,46720,46720,11,46832,46832,11,46944,46944,11,47056,47056,11,47168,47168,11,47280,47280,11,47392,47392,11,47504,47504,11,47616,47616,11,47728,47728,11,47840,47840,11,47952,47952,11,48064,48064,11,48176,48176,11,48288,48288,11,48400,48400,11,48512,48512,11,48624,48624,11,48736,48736,11,48848,48848,11,48960,48960,11,49072,49072,11,49184,49184,11,49296,49296,11,49408,49408,11,49520,49520,11,49632,49632,11,49744,49744,11,49856,49856,11,49968,49968,11,50080,50080,11,50192,50192,11,50304,50304,11,50416,50416,11,50528,50528,11,50640,50640,11,50752,50752,11,50864,50864,11,50976,50976,11,51088,51088,11,51200,51200,11,51312,51312,11,51424,51424,11,51536,51536,11,51648,51648,11,51760,51760,11,51872,51872,11,51984,51984,11,52096,52096,11,52208,52208,11,52320,52320,11,52432,52432,11,52544,52544,11,52656,52656,11,52768,52768,11,52880,52880,11,52992,52992,11,53104,53104,11,53216,53216,11,53328,53328,11,53440,53440,11,53552,53552,11,53664,53664,11,53776,53776,11,53888,53888,11,54000,54000,11,54112,54112,11,54224,54224,11,54336,54336,11,54448,54448,11,54560,54560,11,54672,54672,11,54784,54784,11,54896,54896,11,55008,55008,11,55120,55120,11,64286,64286,5,66272,66272,5,68900,68903,5,69762,69762,7,69817,69818,5,69927,69931,5,70003,70003,5,70070,70078,5,70094,70094,7,70194,70195,7,70206,70206,5,70400,70401,5,70463,70463,7,70475,70477,7,70512,70516,5,70722,70724,5,70832,70832,5,70842,70842,5,70847,70848,5,71088,71089,7,71102,71102,7,71219,71226,5,71231,71232,5,71342,71343,7,71453,71455,5,71463,71467,5,71737,71738,5,71995,71996,5,72000,72000,7,72145,72147,7,72160,72160,5,72249,72249,7,72273,72278,5,72330,72342,5,72752,72758,5,72850,72871,5,72882,72883,5,73018,73018,5,73031,73031,5,73109,73109,5,73461,73462,7,94031,94031,5,94192,94193,7,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,126976,126979,14,127184,127231,14,127344,127345,14,127405,127461,14,127514,127514,14,127561,127567,14,127778,127779,14,127896,127896,14,127985,127986,14,127995,127999,5,128326,128328,14,128360,128366,14,128378,128378,14,128394,128397,14,128405,128406,14,128422,128423,14,128435,128443,14,128453,128464,14,128479,128480,14,128484,128487,14,128496,128498,14,128640,128709,14,128723,128724,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129096,129103,14,129292,129292,14,129311,129311,14,129329,129330,14,129344,129349,14,129360,129374,14,129394,129394,14,129402,129402,14,129413,129425,14,129445,129450,14,129466,129471,14,129483,129483,14,129511,129535,14,129653,129655,14,129667,129670,14,129705,129711,14,129731,129743,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2307,2307,7,2366,2368,7,2382,2383,7,2434,2435,7,2497,2500,5,2519,2519,5,2563,2563,7,2631,2632,5,2677,2677,5,2750,2752,7,2763,2764,7,2817,2817,5,2879,2879,5,2891,2892,7,2914,2915,5,3008,3008,5,3021,3021,5,3076,3076,5,3146,3149,5,3202,3203,7,3264,3265,7,3271,3272,7,3298,3299,5,3390,3390,5,3402,3404,7,3426,3427,5,3535,3535,5,3544,3550,7,3635,3635,7,3763,3763,7,3893,3893,5,3953,3966,5,3981,3991,5,4145,4145,7,4157,4158,5,4209,4212,5,4237,4237,5,4520,4607,10,5970,5971,5,6071,6077,5,6089,6099,5,6277,6278,5,6439,6440,5,6451,6456,7,6683,6683,5,6744,6750,5,6765,6770,7,6846,6846,5,6964,6964,5,6972,6972,5,7019,7027,5,7074,7077,5,7083,7085,5,7146,7148,7,7154,7155,7,7222,7223,5,7394,7400,5,7416,7417,5,8204,8204,5,8233,8233,4,8288,8292,4,8413,8416,5,8482,8482,14,8986,8987,14,9193,9203,14,9654,9654,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9775,14,9792,9792,14,9800,9811,14,9825,9826,14,9831,9831,14,9852,9853,14,9872,9873,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9936,9936,14,9941,9960,14,9974,9974,14,9982,9985,14,9992,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10145,10145,14,11013,11015,14,11503,11505,5,12334,12335,5,12951,12951,14,42612,42621,5,43014,43014,5,43047,43047,7,43204,43205,5,43335,43345,5,43395,43395,7,43450,43451,7,43561,43566,5,43573,43574,5,43644,43644,5,43710,43711,5,43758,43759,7,44005,44005,5,44012,44012,7,44060,44060,11,44116,44116,11,44172,44172,11,44228,44228,11,44284,44284,11,44340,44340,11,44396,44396,11,44452,44452,11,44508,44508,11,44564,44564,11,44620,44620,11,44676,44676,11,44732,44732,11,44788,44788,11,44844,44844,11,44900,44900,11,44956,44956,11,45012,45012,11,45068,45068,11,45124,45124,11,45180,45180,11,45236,45236,11,45292,45292,11,45348,45348,11,45404,45404,11,45460,45460,11,45516,45516,11,45572,45572,11,45628,45628,11,45684,45684,11,45740,45740,11,45796,45796,11,45852,45852,11,45908,45908,11,45964,45964,11,46020,46020,11,46076,46076,11,46132,46132,11,46188,46188,11,46244,46244,11,46300,46300,11,46356,46356,11,46412,46412,11,46468,46468,11,46524,46524,11,46580,46580,11,46636,46636,11,46692,46692,11,46748,46748,11,46804,46804,11,46860,46860,11,46916,46916,11,46972,46972,11,47028,47028,11,47084,47084,11,47140,47140,11,47196,47196,11,47252,47252,11,47308,47308,11,47364,47364,11,47420,47420,11,47476,47476,11,47532,47532,11,47588,47588,11,47644,47644,11,47700,47700,11,47756,47756,11,47812,47812,11,47868,47868,11,47924,47924,11,47980,47980,11,48036,48036,11,48092,48092,11,48148,48148,11,48204,48204,11,48260,48260,11,48316,48316,11,48372,48372,11,48428,48428,11,48484,48484,11,48540,48540,11,48596,48596,11,48652,48652,11,48708,48708,11,48764,48764,11,48820,48820,11,48876,48876,11,48932,48932,11,48988,48988,11,49044,49044,11,49100,49100,11,49156,49156,11,49212,49212,11,49268,49268,11,49324,49324,11,49380,49380,11,49436,49436,11,49492,49492,11,49548,49548,11,49604,49604,11,49660,49660,11,49716,49716,11,49772,49772,11,49828,49828,11,49884,49884,11,49940,49940,11,49996,49996,11,50052,50052,11,50108,50108,11,50164,50164,11,50220,50220,11,50276,50276,11,50332,50332,11,50388,50388,11,50444,50444,11,50500,50500,11,50556,50556,11,50612,50612,11,50668,50668,11,50724,50724,11,50780,50780,11,50836,50836,11,50892,50892,11,50948,50948,11,51004,51004,11,51060,51060,11,51116,51116,11,51172,51172,11,51228,51228,11,51284,51284,11,51340,51340,11,51396,51396,11,51452,51452,11,51508,51508,11,51564,51564,11,51620,51620,11,51676,51676,11,51732,51732,11,51788,51788,11,51844,51844,11,51900,51900,11,51956,51956,11,52012,52012,11,52068,52068,11,52124,52124,11,52180,52180,11,52236,52236,11,52292,52292,11,52348,52348,11,52404,52404,11,52460,52460,11,52516,52516,11,52572,52572,11,52628,52628,11,52684,52684,11,52740,52740,11,52796,52796,11,52852,52852,11,52908,52908,11,52964,52964,11,53020,53020,11,53076,53076,11,53132,53132,11,53188,53188,11,53244,53244,11,53300,53300,11,53356,53356,11,53412,53412,11,53468,53468,11,53524,53524,11,53580,53580,11,53636,53636,11,53692,53692,11,53748,53748,11,53804,53804,11,53860,53860,11,53916,53916,11,53972,53972,11,54028,54028,11,54084,54084,11,54140,54140,11,54196,54196,11,54252,54252,11,54308,54308,11,54364,54364,11,54420,54420,11,54476,54476,11,54532,54532,11,54588,54588,11,54644,54644,11,54700,54700,11,54756,54756,11,54812,54812,11,54868,54868,11,54924,54924,11,54980,54980,11,55036,55036,11,55092,55092,11,55148,55148,11,55216,55238,9,65056,65071,5,65529,65531,4,68097,68099,5,68159,68159,5,69446,69456,5,69688,69702,5,69808,69810,7,69815,69816,7,69821,69821,1,69888,69890,5,69932,69932,7,69957,69958,7,70016,70017,5,70067,70069,7,70079,70080,7,70089,70092,5,70095,70095,5,70191,70193,5,70196,70196,5,70198,70199,5,70367,70367,5,70371,70378,5,70402,70403,7,70462,70462,5,70464,70464,5,70471,70472,7,70487,70487,5,70502,70508,5,70709,70711,7,70720,70721,7,70725,70725,7,70750,70750,5,70833,70834,7,70841,70841,7,70843,70844,7,70846,70846,7,70849,70849,7,71087,71087,5,71090,71093,5,71100,71101,5,71103,71104,5,71216,71218,7,71227,71228,7,71230,71230,7,71339,71339,5,71341,71341,5,71344,71349,5,71351,71351,5,71456,71457,7,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123628,123631,5,125252,125258,5,126980,126980,14,127183,127183,14,127245,127247,14,127340,127343,14,127358,127359,14,127377,127386,14,127462,127487,6,127491,127503,14,127535,127535,14,127548,127551,14,127568,127569,14,127744,127777,14,127780,127891,14,127894,127895,14,127897,127899,14,127902,127984,14,127987,127989,14,127991,127994,14,128000,128253,14,128255,128317,14,128329,128334,14,128336,128359,14,128367,128368,14,128371,128377,14,128379,128390,14,128392,128393,14,128398,128399,14,128401,128404,14,128407,128419,14,128421,128421,14,128424,128424,14,128433,128434,14,128444,128444,14,128450,128452,14,128465,128467,14,128476,128478,14,128481,128481,14,128483,128483,14,128488,128488,14,128495,128495,14,128499,128499,14,128506,128591,14,128710,128714,14,128721,128722,14,128725,128725,14,128728,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129664,129666,14,129671,129679,14,129686,129704,14,129712,129718,14,129728,129730,14,129744,129750,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2259,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3134,3136,5,3142,3144,5,3157,3158,5,3201,3201,5,3260,3260,5,3263,3263,5,3266,3266,5,3270,3270,5,3274,3275,7,3285,3286,5,3328,3329,5,3387,3388,5,3391,3392,7,3398,3400,7,3405,3405,5,3415,3415,5,3457,3457,5,3530,3530,5,3536,3537,7,3542,3542,5,3551,3551,5,3633,3633,5,3636,3642,5,3761,3761,5,3764,3772,5,3864,3865,5,3895,3895,5,3902,3903,7,3967,3967,7,3974,3975,5,3993,4028,5,4141,4144,5,4146,4151,5,4155,4156,7,4182,4183,7,4190,4192,5,4226,4226,5,4229,4230,5,4253,4253,5,4448,4519,9,4957,4959,5,5938,5940,5,6002,6003,5,6070,6070,7,6078,6085,7,6087,6088,7,6109,6109,5,6158,6158,4,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6848,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7673,5,8203,8203,4,8205,8205,13,8232,8232,4,8234,8238,4,8265,8265,14,8293,8293,4,8400,8412,5,8417,8417,5,8421,8432,5,8505,8505,14,8617,8618,14,9000,9000,14,9167,9167,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9776,9783,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9935,14,9937,9937,14,9939,9940,14,9961,9962,14,9968,9973,14,9975,9978,14,9981,9981,14,9986,9986,14,9989,9989,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10084,14,10133,10135,14,10160,10160,14,10548,10549,14,11035,11036,14,11093,11093,14,11647,11647,5,12330,12333,5,12336,12336,14,12441,12442,5,12953,12953,14,42608,42610,5,42654,42655,5,43010,43010,5,43019,43019,5,43045,43046,5,43052,43052,5,43188,43203,7,43232,43249,5,43302,43309,5,43346,43347,7,43392,43394,5,43443,43443,5,43446,43449,5,43452,43453,5,43493,43493,5,43567,43568,7,43571,43572,7,43587,43587,5,43597,43597,7,43696,43696,5,43703,43704,5,43713,43713,5,43756,43757,5,43765,43765,7,44003,44004,7,44006,44007,7,44009,44010,7,44013,44013,5,44033,44059,12,44061,44087,12,44089,44115,12,44117,44143,12,44145,44171,12,44173,44199,12,44201,44227,12,44229,44255,12,44257,44283,12,44285,44311,12,44313,44339,12,44341,44367,12,44369,44395,12,44397,44423,12,44425,44451,12,44453,44479,12,44481,44507,12,44509,44535,12,44537,44563,12,44565,44591,12,44593,44619,12,44621,44647,12,44649,44675,12,44677,44703,12,44705,44731,12,44733,44759,12,44761,44787,12,44789,44815,12,44817,44843,12,44845,44871,12,44873,44899,12,44901,44927,12,44929,44955,12,44957,44983,12,44985,45011,12,45013,45039,12,45041,45067,12,45069,45095,12,45097,45123,12,45125,45151,12,45153,45179,12,45181,45207,12,45209,45235,12,45237,45263,12,45265,45291,12,45293,45319,12,45321,45347,12,45349,45375,12,45377,45403,12,45405,45431,12,45433,45459,12,45461,45487,12,45489,45515,12,45517,45543,12,45545,45571,12,45573,45599,12,45601,45627,12,45629,45655,12,45657,45683,12,45685,45711,12,45713,45739,12,45741,45767,12,45769,45795,12,45797,45823,12,45825,45851,12,45853,45879,12,45881,45907,12,45909,45935,12,45937,45963,12,45965,45991,12,45993,46019,12,46021,46047,12,46049,46075,12,46077,46103,12,46105,46131,12,46133,46159,12,46161,46187,12,46189,46215,12,46217,46243,12,46245,46271,12,46273,46299,12,46301,46327,12,46329,46355,12,46357,46383,12,46385,46411,12,46413,46439,12,46441,46467,12,46469,46495,12,46497,46523,12,46525,46551,12,46553,46579,12,46581,46607,12,46609,46635,12,46637,46663,12,46665,46691,12,46693,46719,12,46721,46747,12,46749,46775,12,46777,46803,12,46805,46831,12,46833,46859,12,46861,46887,12,46889,46915,12,46917,46943,12,46945,46971,12,46973,46999,12,47001,47027,12,47029,47055,12,47057,47083,12,47085,47111,12,47113,47139,12,47141,47167,12,47169,47195,12,47197,47223,12,47225,47251,12,47253,47279,12,47281,47307,12,47309,47335,12,47337,47363,12,47365,47391,12,47393,47419,12,47421,47447,12,47449,47475,12,47477,47503,12,47505,47531,12,47533,47559,12,47561,47587,12,47589,47615,12,47617,47643,12,47645,47671,12,47673,47699,12,47701,47727,12,47729,47755,12,47757,47783,12,47785,47811,12,47813,47839,12,47841,47867,12,47869,47895,12,47897,47923,12,47925,47951,12,47953,47979,12,47981,48007,12,48009,48035,12,48037,48063,12,48065,48091,12,48093,48119,12,48121,48147,12,48149,48175,12,48177,48203,12,48205,48231,12,48233,48259,12,48261,48287,12,48289,48315,12,48317,48343,12,48345,48371,12,48373,48399,12,48401,48427,12,48429,48455,12,48457,48483,12,48485,48511,12,48513,48539,12,48541,48567,12,48569,48595,12,48597,48623,12,48625,48651,12,48653,48679,12,48681,48707,12,48709,48735,12,48737,48763,12,48765,48791,12,48793,48819,12,48821,48847,12,48849,48875,12,48877,48903,12,48905,48931,12,48933,48959,12,48961,48987,12,48989,49015,12,49017,49043,12,49045,49071,12,49073,49099,12,49101,49127,12,49129,49155,12,49157,49183,12,49185,49211,12,49213,49239,12,49241,49267,12,49269,49295,12,49297,49323,12,49325,49351,12,49353,49379,12,49381,49407,12,49409,49435,12,49437,49463,12,49465,49491,12,49493,49519,12,49521,49547,12,49549,49575,12,49577,49603,12,49605,49631,12,49633,49659,12,49661,49687,12,49689,49715,12,49717,49743,12,49745,49771,12,49773,49799,12,49801,49827,12,49829,49855,12,49857,49883,12,49885,49911,12,49913,49939,12,49941,49967,12,49969,49995,12,49997,50023,12,50025,50051,12,50053,50079,12,50081,50107,12,50109,50135,12,50137,50163,12,50165,50191,12,50193,50219,12,50221,50247,12,50249,50275,12,50277,50303,12,50305,50331,12,50333,50359,12,50361,50387,12,50389,50415,12,50417,50443,12,50445,50471,12,50473,50499,12,50501,50527,12,50529,50555,12,50557,50583,12,50585,50611,12,50613,50639,12,50641,50667,12,50669,50695,12,50697,50723,12,50725,50751,12,50753,50779,12,50781,50807,12,50809,50835,12,50837,50863,12,50865,50891,12,50893,50919,12,50921,50947,12,50949,50975,12,50977,51003,12,51005,51031,12,51033,51059,12,51061,51087,12,51089,51115,12,51117,51143,12,51145,51171,12,51173,51199,12,51201,51227,12,51229,51255,12,51257,51283,12,51285,51311,12,51313,51339,12,51341,51367,12,51369,51395,12,51397,51423,12,51425,51451,12,51453,51479,12,51481,51507,12,51509,51535,12,51537,51563,12,51565,51591,12,51593,51619,12,51621,51647,12,51649,51675,12,51677,51703,12,51705,51731,12,51733,51759,12,51761,51787,12,51789,51815,12,51817,51843,12,51845,51871,12,51873,51899,12,51901,51927,12,51929,51955,12,51957,51983,12,51985,52011,12,52013,52039,12,52041,52067,12,52069,52095,12,52097,52123,12,52125,52151,12,52153,52179,12,52181,52207,12,52209,52235,12,52237,52263,12,52265,52291,12,52293,52319,12,52321,52347,12,52349,52375,12,52377,52403,12,52405,52431,12,52433,52459,12,52461,52487,12,52489,52515,12,52517,52543,12,52545,52571,12,52573,52599,12,52601,52627,12,52629,52655,12,52657,52683,12,52685,52711,12,52713,52739,12,52741,52767,12,52769,52795,12,52797,52823,12,52825,52851,12,52853,52879,12,52881,52907,12,52909,52935,12,52937,52963,12,52965,52991,12,52993,53019,12,53021,53047,12,53049,53075,12,53077,53103,12,53105,53131,12,53133,53159,12,53161,53187,12,53189,53215,12,53217,53243,12,53245,53271,12,53273,53299,12,53301,53327,12,53329,53355,12,53357,53383,12,53385,53411,12,53413,53439,12,53441,53467,12,53469,53495,12,53497,53523,12,53525,53551,12,53553,53579,12,53581,53607,12,53609,53635,12,53637,53663,12,53665,53691,12,53693,53719,12,53721,53747,12,53749,53775,12,53777,53803,12,53805,53831,12,53833,53859,12,53861,53887,12,53889,53915,12,53917,53943,12,53945,53971,12,53973,53999,12,54001,54027,12,54029,54055,12,54057,54083,12,54085,54111,12,54113,54139,12,54141,54167,12,54169,54195,12,54197,54223,12,54225,54251,12,54253,54279,12,54281,54307,12,54309,54335,12,54337,54363,12,54365,54391,12,54393,54419,12,54421,54447,12,54449,54475,12,54477,54503,12,54505,54531,12,54533,54559,12,54561,54587,12,54589,54615,12,54617,54643,12,54645,54671,12,54673,54699,12,54701,54727,12,54729,54755,12,54757,54783,12,54785,54811,12,54813,54839,12,54841,54867,12,54869,54895,12,54897,54923,12,54925,54951,12,54953,54979,12,54981,55007,12,55009,55035,12,55037,55063,12,55065,55091,12,55093,55119,12,55121,55147,12,55149,55175,12,55177,55203,12,55243,55291,10,65024,65039,5,65279,65279,4,65520,65528,4,66045,66045,5,66422,66426,5,68101,68102,5,68152,68154,5,68325,68326,5,69291,69292,5,69632,69632,7,69634,69634,7,69759,69761,5]")}},NvD2:function(et,he,K){"use strict";K.d(he,"a",function(){return A});var ue=K("Kwbf");function B(N,k){var S=new Set;return N.forEach(function(C){k.has(C)||S.add(C)}),S}function w(N){var k=N||{},S=k.disabled,C=k.disableCheckbox,d=k.checkable;return!!(S||C)||d===!1}function _(N,k,S,C){for(var d=new Set(N),v=new Set,b=0;b<=S;b+=1){var p=k.get(b)||new Set;p.forEach(function(e){var t=e.key,r=e.node,f=e.children,c=f===void 0?[]:f;d.has(t)&&!C(r)&&c.filter(function(u){return!C(u.node)}).forEach(function(u){d.add(u.key)})})}for(var m=new Set,y=S;y>=0;y-=1){var n=k.get(y)||new Set;n.forEach(function(e){var t=e.parent,r=e.node;if(C(r)||!e.parent||m.has(e.parent.key))return;if(C(e.parent.node)){m.add(t.key);return}var f=!0,c=!1;(t.children||[]).filter(function(u){return!C(u.node)}).forEach(function(u){var E=u.key,g=d.has(E);f&&!g&&(f=!1),!c&&(g||v.has(E))&&(c=!0)}),f&&d.add(t.key),c&&v.add(t.key),m.add(t.key)})}return{checkedKeys:Array.from(d),halfCheckedKeys:Array.from(B(v,d))}}function D(N,k,S,C,d){for(var v=new Set(N),b=new Set(k),p=0;p<=C;p+=1){var m=S.get(p)||new Set;m.forEach(function(t){var r=t.key,f=t.node,c=t.children,u=c===void 0?[]:c;!v.has(r)&&!b.has(r)&&!d(f)&&u.filter(function(E){return!d(E.node)}).forEach(function(E){v.delete(E.key)})})}b=new Set;for(var y=new Set,n=C;n>=0;n-=1){var e=S.get(n)||new Set;e.forEach(function(t){var r=t.parent,f=t.node;if(d(f)||!t.parent||y.has(t.parent.key))return;if(d(t.parent.node)){y.add(r.key);return}var c=!0,u=!1;(r.children||[]).filter(function(E){return!d(E.node)}).forEach(function(E){var g=E.key,s=v.has(g);c&&!s&&(c=!1),!u&&(s||b.has(g))&&(u=!0)}),c||v.delete(r.key),u&&b.add(r.key),y.add(r.key)})}return{checkedKeys:Array.from(v),halfCheckedKeys:Array.from(B(b,v))}}function A(N,k,S,C){var d=[],v;C?v=C:v=w;var b=new Set(N.filter(function(n){var e=!!S[n];return e||d.push(n),e})),p=new Map,m=0;Object.keys(S).forEach(function(n){var e=S[n],t=e.level,r=p.get(t);r||(r=new Set,p.set(t,r)),r.add(e),m=Math.max(m,t)}),Object(ue.a)(!d.length,"Tree missing follow keys: ".concat(d.slice(0,100).map(function(n){return"'".concat(n,"'")}).join(", ")));var y;return k===!0?y=_(b,p,m,v):y=D(b,k.halfCheckedKeys,p,m,v),y}},OZM5:function(et,he,K){"use strict";K.d(he,"b",function(){return C}),K.d(he,"a",function(){return d}),K.d(he,"k",function(){return v}),K.d(he,"h",function(){return b}),K.d(he,"i",function(){return p}),K.d(he,"g",function(){return m}),K.d(he,"c",function(){return y}),K.d(he,"d",function(){return n}),K.d(he,"j",function(){return r}),K.d(he,"e",function(){return f}),K.d(he,"f",function(){return c});var ue=K("KQm4"),B=K("U8pU"),w=K("Ff2n"),_=K("q1tI"),D=K.n(_),A=K("Kwbf"),N=K("WaYH"),k=.25,S=2;function C(u,E){var g=u.slice(),s=g.indexOf(E);return s>=0&&g.splice(s,1),g}function d(u,E){var g=u.slice();return g.indexOf(E)===-1&&g.push(E),g}function v(u){return u.split("-")}function b(u,E){return"".concat(u,"-").concat(E)}function p(u){return u&&u.type&&u.type.isTreeNode}function m(u,E){var g=[u],s=E[u];function a(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];i.forEach(function(l){var T=l.key,x=l.children;g.push(T),a(x)})}return a(s.children),g}function y(u,E){var g=u.clientY,s=E.selectHandle.getBoundingClientRect(),a=s.top,i=s.bottom,l=s.height,T=Math.max(l*k,S);return g<=a+T?-1:g>=i-T?1:0}function n(u,E){if(!u)return;var g=E.multiple;return g?u.slice():u.length?[u[0]]:u}var e=function(E){return E};function t(u,E){if(!u)return[];var g=E||{},s=g.processProps,a=s===void 0?e:s,i=Array.isArray(u)?u:[u];return i.map(function(l){var T=l.children,x=Object(w.a)(l,["children"]),L=t(T,E);return D.a.createElement(N.a,Object.assign({},a(x)),L)})}function r(u){if(!u)return null;var E;if(Array.isArray(u))E={checkedKeys:u,halfCheckedKeys:void 0};else if(Object(B.a)(u)==="object")E={checkedKeys:u.checked||void 0,halfCheckedKeys:u.halfChecked||void 0};else return Object(A.a)(!1,"`checkedKeys` is not an array or an object"),null;return E}function f(u,E){var g=new Set;function s(a){if(g.has(a))return;var i=E[a];if(!i)return;g.add(a);var l=i.parent,T=i.node;if(T.disabled)return;l&&s(l.key)}return(u||[]).forEach(function(a){s(a)}),Object(ue.a)(g)}function c(u){var E={};return Object.keys(u).forEach(function(g){(g.startsWith("data-")||g.startsWith("aria-"))&&(E[g]=u[g])}),E}},P48q:function(et,he,K){et.exports={flex_box_center:"flex_box_center___BHtvi",flex_space_between:"flex_space_between___1noDr",flex_box_vertical_center:"flex_box_vertical_center___2UDAc",flex_box_center_end:"flex_box_center_end___2j8--",flex_box_column:"flex_box_column___3X60k",tree:"tree___2kCYs",actions:"actions___10Q_6"}},QDVR:function(et,he,K){"use strict";K.d(he,"e",function(){return B}),K.d(he,"d",function(){return w}),K.d(he,"c",function(){return N}),K.d(he,"b",function(){return k}),K.d(he,"a",function(){return C});var ue=function(){var d=function(v,b){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,m){p.__proto__=m}||function(p,m){for(var y in m)m.hasOwnProperty(y)&&(p[y]=m[y])},d(v,b)};return function(v,b){d(v,b);function p(){this.constructor=v}v.prototype=b===null?Object.create(b):(p.prototype=b.prototype,new p)}}();function B(d){var v=[];return d.forEach(function(b){return v.push(b)}),v}function w(d){var v=[];return d.forEach(function(b,p){return v.push(p)}),v}var _=function(){function d(){this._value="",this._pos=0}return d.prototype.reset=function(v){return this._value=v,this._pos=0,this},d.prototype.next=function(){return this._pos+=1,this},d.prototype.hasNext=function(){return this._pos0)m.left||(m.left=new A,m.left.segment=p.value()),m=m.left;else if(y<0)m.right||(m.right=new A,m.right.segment=p.value()),m=m.right;else if(p.hasNext())p.next(),m.mid||(m.mid=new A,m.mid.segment=p.value()),m=m.mid;else break}var n=m.value;return m.value=b,m.key=v,n},d.prototype.get=function(v){for(var b=this._iter.reset(v),p=this._root;p;){var m=b.cmp(p.segment);if(m>0)p=p.left;else if(m<0)p=p.right;else if(b.hasNext())b.next(),p=p.mid;else break}return p?p.value:void 0},d.prototype.findSubstr=function(v){for(var b=this._iter.reset(v),p=this._root,m=void 0;p;){var y=b.cmp(p.segment);if(y>0)p=p.left;else if(y<0)p=p.right;else if(b.hasNext())b.next(),m=p.value||m,p=p.mid;else break}return p&&p.value||m},d.prototype.forEach=function(v){this._forEach(this._root,v)},d.prototype._forEach=function(v,b){v&&(this._forEach(v.left,b),v.value&&b(v.value,v.key),this._forEach(v.mid,b),this._forEach(v.right,b))},d}(),k=function(){function d(){this.map=new Map,this.ignoreCase=!1}return d.prototype.set=function(v,b){this.map.set(this.toKey(v),b)},d.prototype.get=function(v){return this.map.get(this.toKey(v))},d.prototype.toKey=function(v){var b=v.toString();return this.ignoreCase&&(b=b.toLowerCase()),b},d}(),S=function(){function d(){this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0}return d.prototype.clear=function(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0},Object.defineProperty(d.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),d.prototype.get=function(v,b){b===void 0&&(b=0);var p=this._map.get(v);return p?(b!==0&&this.touch(p,b),p.value):void 0},d.prototype.set=function(v,b,p){p===void 0&&(p=0);var m=this._map.get(v);if(m)m.value=b,p!==0&&this.touch(m,p);else{m={key:v,value:b,next:void 0,previous:void 0};switch(p){case 0:this.addItemLast(m);break;case 1:this.addItemFirst(m);break;case 2:this.addItemLast(m);break;default:this.addItemLast(m);break}this._map.set(v,m),this._size++}},d.prototype.delete=function(v){return!!this.remove(v)},d.prototype.remove=function(v){var b=this._map.get(v);return b?(this._map.delete(v),this.removeItem(b),this._size--,b.value):void 0},d.prototype.forEach=function(v,b){for(var p=this._head;p;)b?v.bind(b)(p.value,p.key,this):v(p.value,p.key,this),p=p.next},d.prototype.trimOld=function(v){if(v>=this.size)return;if(v===0){this.clear();return}for(var b=this._head,p=this.size;b&&p>v;)this._map.delete(b.key),b=b.next,p--;this._head=b,this._size=p,b&&(b.previous=void 0)},d.prototype.addItemFirst=function(v){if(!this._head&&!this._tail)this._tail=v;else if(this._head)v.next=this._head,this._head.previous=v;else throw new Error("Invalid list");this._head=v},d.prototype.addItemLast=function(v){if(!this._head&&!this._tail)this._head=v;else if(this._tail)v.previous=this._tail,this._tail.next=v;else throw new Error("Invalid list");this._tail=v},d.prototype.removeItem=function(v){if(v===this._head&&v===this._tail)this._head=void 0,this._tail=void 0;else if(v===this._head){if(!v.next)throw new Error("Invalid list");v.next.previous=void 0,this._head=v.next}else if(v===this._tail){if(!v.previous)throw new Error("Invalid list");v.previous.next=void 0,this._tail=v.previous}else{var b=v.next,p=v.previous;if(!b||!p)throw new Error("Invalid list");b.previous=p,p.next=b}v.next=void 0,v.previous=void 0},d.prototype.touch=function(v,b){if(!this._head||!this._tail)throw new Error("Invalid list");if(b!==1&&b!==2)return;if(b===1){if(v===this._head)return;var p=v.next,m=v.previous;v===this._tail?(m.next=void 0,this._tail=m):(p.previous=m,m.next=p),v.previous=void 0,v.next=this._head,this._head.previous=v,this._head=v}else if(b===2){if(v===this._tail)return;var p=v.next,m=v.previous;v===this._head?(p.previous=void 0,this._head=p):(p.previous=m,m.next=p),v.next=void 0,v.previous=this._tail,this._tail.next=v,this._tail=v}},d.prototype.toJSON=function(){var v=[];return this.forEach(function(b,p){v.push([p,b])}),v},d}(),C=function(d){ue(v,d);function v(b,p){p===void 0&&(p=1);var m=d.call(this)||this;return m._limit=b,m._ratio=Math.min(Math.max(0,p),1),m}return v.prototype.get=function(b){return d.prototype.get.call(this,b,2)},v.prototype.peek=function(b){return d.prototype.get.call(this,b,0)},v.prototype.set=function(b,p){d.prototype.set.call(this,b,p,2),this.checkTrim()},v.prototype.checkTrim=function(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))},v}(S)},SJMd:function(et,he){/**
* @license
* Copyright (C) 2006 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/var K,ue,B,w=!1,_,D;window.PR_SHOULD_USE_CONTINUATION=!0;var A,N;(function(){var k=window,S=["break,continue,do,else,for,if,return,while"],C=[S,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,restrict,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],d=[C,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],v=[d,"alignas,alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,noexcept,noreturn,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],b=[d,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],p=[d,"abstract,add,alias,as,ascending,async,await,base,bool,by,byte,checked,decimal,delegate,descending,dynamic,event,finally,fixed,foreach,from,get,global,group,implicit,in,interface,internal,into,is,join,let,lock,null,object,out,override,orderby,params,partial,readonly,ref,remove,sbyte,sealed,select,set,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,value,var,virtual,where,yield"],m="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",y=[d,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],n="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",e=[S,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],t=[S,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],r=[S,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],f=[v,p,b,y,n,e,t,r],c=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,u="str",E="kwd",g="com",s="typ",a="lit",i="pun",l="pln",T="tag",x="dec",L="src",R="atn",I="atv",F="nocode",j="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function z($){for(var te=0,de=!1,fe=!1,we=0,Ie=$.length;we122||(W<65||ae>90||Oe.push([Math.max(65,ae)|32,Math.min(W,90)|32]),W<97||ae>122||Oe.push([Math.max(97,ae)&~32,Math.min(W,122)&~32]))}}Oe.sort(function(me,Ce){return me[0]-Ce[0]||Ce[1]-me[1]});for(var H=[],Y=[],Ne=0;Neee[0]&&(ee[1]+1>ee[0]&&Te.push("-"),Te.push(ge(ee[1])))}return Te.push("]"),Te.join("")}function Se(Le){for(var xe=Le.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g")),Oe=xe.length,Ue=[],Te=0,Ne=0;Te=2&&ae==="["?xe[Te]=Ee(oe):ae!=="\\"&&(xe[Te]=oe.replace(/[a-zA-Z]/g,function(Y){var ee=Y.charCodeAt(0);return"["+String.fromCharCode(ee&~32,ee|32)+"]"}))}return xe.join("")}for(var Ae=[],we=0,Ie=$.length;we=0;)de[Ae.charAt(Le)]=Se;var xe=Se[1],Oe=""+xe;le.hasOwnProperty(Oe)||(Fe.push(xe),le[Oe]=null)}Fe.push(/[\0-\uffff]/),fe=z(Fe)})();var we=te.length,Ie=function(_e){for(var Fe=_e.sourceCode,le=_e.basePos,ge=_e.sourceNode,Ee=[le,l],Se=0,Ae=Fe.match(fe)||[],Le={},xe=0,Oe=Ae.length;xe=5&&Te.substring(0,5)==="lang-",oe&&!(Ne&&typeof Ne[1]=="string")&&(oe=!1,Te=L),oe||(Le[Ue]=Te)}var W=Se;if(Se+=Ue.length,!oe)Ee.push(le+W,Te);else{var H=Ne[1],Y=Ue.indexOf(H),ee=Y+H.length;Ne[2]&&(ee=Ue.length-Ne[2].length,Y=ee-H.length);var me=Te.substring(5);J(ge,le+W,Ue.substring(0,Y),Ie,Ee),J(ge,le+W+Y,H,G(me,H),Ee),J(ge,le+W+ee,Ue.substring(ee),Ie,Ee)}}_e.decorations=Ee};return Ie}function ye($){var te=[],de=[];$.tripleQuotedStrings?te.push([u,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):$.multiLineStrings?te.push([u,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):te.push([u,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),$.verbatimStrings&&de.push([u,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var fe=$.hashComments;fe&&($.cStyleComments?(fe>1?te.push([g,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):te.push([g,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),de.push([u,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):te.push([g,/^#[^\r\n]*/,null,"#"])),$.cStyleComments&&(de.push([g,/^\/\/[^\r\n]*/,null]),de.push([g,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var we=$.regexLiterals;if(we){var Ie=we>1?"":`
\r`,_e=Ie?".":"[\\S\\s]",Fe="/(?=[^/*"+Ie+"])(?:[^/\\x5B\\x5C"+Ie+"]|\\x5C"+_e+"|\\x5B(?:[^\\x5C\\x5D"+Ie+"]|\\x5C"+_e+")*(?:\\x5D|$))+/";de.push(["lang-regex",RegExp("^"+j+"("+Fe+")")])}var le=$.types;le&&de.push([s,le]);var ge=(""+$.keywords).replace(/^ | $/g,"");ge.length&&de.push([E,new RegExp("^(?:"+ge.replace(/[\s,]+/g,"|")+")\\b"),null]),te.push([l,/^\s+/,null,` \r
\xA0`]);var Ee="^.[^\\s\\w.$@'\"`/\\\\]*";return $.regexLiterals&&(Ee+="(?!s*/)"),de.push([a,/^@[a-z_$][a-z_$@0-9]*/i,null],[s,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[l,/^[a-z_$][a-z_$@0-9]*/i,null],[a,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[l,/^\\[\s\S]?/,null],[i,new RegExp(Ee),null]),ce(te,de)}var ve=ye({keywords:f,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function Z($,te,de){for(var fe=/(?:^|\s)nocode(?:\s|$)/,we=/\r\n?|\n/,Ie=$.ownerDocument,_e=Ie.createElement("li");$.firstChild;)_e.appendChild($.firstChild);var Fe=[_e];function le(xe){var Oe=xe.nodeType;if(Oe==1&&!fe.test(xe.className))if(xe.nodeName==="br")ge(xe),xe.parentNode&&xe.parentNode.removeChild(xe);else for(var Ue=xe.firstChild;Ue;Ue=Ue.nextSibling)le(Ue);else if((Oe==3||Oe==4)&&de){var Te=xe.nodeValue,Ne=Te.match(we);if(Ne){var oe=Te.substring(0,Ne.index);xe.nodeValue=oe;var re=Te.substring(Ne.index+Ne[0].length);if(re){var ae=xe.parentNode;ae.insertBefore(Ie.createTextNode(re),xe.nextSibling)}ge(xe),oe||xe.parentNode.removeChild(xe)}}}function ge(xe){for(;!xe.nextSibling;)if(xe=xe.parentNode,!xe)return;function Oe(Ne,oe){var re=oe?Ne.cloneNode(!1):Ne,ae=Ne.parentNode;if(ae){var W=Oe(ae,1),H=Ne.nextSibling;W.appendChild(re);for(var Y=H;Y;Y=H)H=Y.nextSibling,W.appendChild(Y)}return re}for(var Ue=Oe(xe.nextSibling,0),Te;(Te=Ue.parentNode)&&Te.nodeType===1;)Ue=Te;Fe.push(Ue)}for(var Ee=0;Ee=ae&&(le+=2),Ie>=W&&(Se+=2)}}finally{Te&&(Te.style.display=Ne)}}var se={};function V($,te){for(var de=te.length;--de>=0;){var fe=te[de];se.hasOwnProperty(fe)?k.console&&console.warn("cannot override language handler %s",fe):se[fe]=$}}function G($,te){return $&&se.hasOwnProperty($)||($=/^\s*]*(?:>|$)/],[g,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[i,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^