2022-02-06 23:49:23 +08:00
( ( ) => { var Sx = Object . create ; var Xo = Object . defineProperty ; var Ex = Object . getOwnPropertyDescriptor ; var Cx = Object . getOwnPropertyNames ; var Tx = Object . getPrototypeOf , Ax = Object . prototype . hasOwnProperty ; var zc = i => Xo ( i , "__esModule" , { value : ! 0 } ) ; var Lx = ( i , t ) => ( ) => ( i && ( t = i ( i = 0 ) ) , t ) ; var Me = ( i , t ) => ( ) => ( t || i ( ( t = { exports : { } } ) . exports , t ) , t . exports ) , Dx = ( i , t ) => { for ( var n in t ) Xo ( i , n , { get : t [ n ] , enumerable : ! 0 } ) } , Nc = ( i , t , n , l ) => { if ( t && typeof t == "object" || typeof t == "function" ) for ( let c of Cx ( t ) ) ! Ax . call ( i , c ) && ( n || c !== "default" ) && Xo ( i , c , { get : ( ) => t [ c ] , enumerable : ! ( l = Ex ( t , c ) ) || l . enumerable } ) ; return i } , _t = ( i , t ) => Nc ( zc ( Xo ( i != null ? Sx ( Tx ( i ) ) : { } , "default" , ! t && i && i . _ _esModule ? { get : ( ) => i . default , enumerable : ! 0 } : { value : i , enumerable : ! 0 } ) ) , i ) , Ix = ( i => ( t , n ) => i && i . get ( t ) || ( n = Nc ( zc ( { } ) , t , 1 ) , i && i . set ( t , n ) , n ) ) ( typeof WeakMap != "undefined" ? new WeakMap : 0 ) ; var Tt = Me ( ( Xs , Zs ) => { ( function ( i , t ) { typeof Xs == "object" && typeof Zs != "undefined" ? Zs . exports = t ( ) : typeof define == "function" && define . amd ? define ( t ) : ( i = i || self , i . CodeMirror = t ( ) ) } ) ( Xs , function ( ) { "use strict" ; var i = navigator . userAgent , t = navigator . platform , n = /gecko\/\d/i . test ( i ) , l = /MSIE \d/ . test ( i ) , c = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/ . exec ( i ) , d = /Edge\/(\d+)/ . exec ( i ) , o = l || c || d , h = o && ( l ? document . documentMode || 6 : + ( d || c ) [ 1 ] ) , f = ! d && /WebKit\// . test ( i ) , p = f && /Qt\/\d+\.\d+/ . test ( i ) , y = ! d && /Chrome\// . test ( i ) , g = /Opera\// . test ( i ) , v = /Apple Computer/ . test ( navigator . vendor ) , b = /Mac OS X 1\d\D([8-9]|\d\d)\D/ . test ( i ) , k = /PhantomJS/ . test ( i ) , E = v && ( /Mobile\/\w+/ . test ( i ) || navigator . maxTouchPoints > 2 ) , w = /Android/ . test ( i ) , I = E || w || /webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i . test ( i ) , S = E || /Mac/ . test ( t ) , N = /\bCrOS\b/ . test ( i ) , O = /win/i . test ( t ) , j = g && i . match ( /Version\/(\d*\.\d*)/ ) ; j && ( j = Number ( j [ 1 ] ) ) , j && j >= 15 && ( g = ! 1 , f = ! 0 ) ; var U = S && ( p || g && ( j == null || j < 12.11 ) ) , ee = n || o && h >= 9 ; function V ( e ) { return new RegExp ( "(^|\\s)" + e + "(?:$|\\s)\\s*" ) } var W = function ( e , r ) { var s = e . className , a = V ( r ) . exec ( s ) ; if ( a ) { var u = s . slice ( a . index + a [ 0 ] . length ) ; e . className = s . slice ( 0 , a . index ) + ( u ? a [ 1 ] + u : "" ) } } ; function K ( e ) { for ( var r = e . childNodes . length ; r > 0 ; -- r ) e . removeChild ( e . firstChild ) ; return e } function q ( e , r ) { return K ( e ) . appendChild ( r ) } function R ( e , r , s , a ) { var u = document . createElement ( e ) ; if ( s && ( u . className = s ) , a && ( u . style . cssText = a ) , typeof r == "string" ) u . appendChild ( document . createTextNode ( r ) ) ; else if ( r ) for ( var m = 0 ; m < r . length ; ++ m ) u . appendChild ( r [ m ] ) ; return u } function T ( e , r , s , a ) { var u = R ( e , r , s , a ) ; return u . setAttribute ( "role" , "presentation" ) , u } var H ; document . createRange ? H = function ( e , r , s , a ) { var u = document . createRange ( ) ; return u . setEnd ( a || e , s ) , u . setStart ( e , r ) , u } : H = function ( e , r , s ) { var a = document . body . createTextRange ( ) ; try { a . moveToElementText ( e . parentNode ) } catch { return a } return a . collapse ( ! 0 ) , a . moveEnd ( "character" , s ) , a . moveStart ( "character" , r ) , a } ; function Z ( e , r ) { if ( r . nodeType == 3 && ( r = r . parentNode ) , e . contains ) return e . contains ( r ) ; do if ( r . nodeType == 11 && ( r = r . host ) , r == e ) return ! 0 ; while ( r = r . parentNode ) } function P ( ) { var e ; try { e = document . activeElement } catch { e = document . body || null } for ( ; e && e . shadowRoot && e . shadowRoot . activeElement ; ) e = e . shadowRoot . activeElement ; return e } function z ( e , r ) { var s = e . className ; V ( r ) . test ( s ) || ( e . className += ( s ? " " : "" ) + r ) } function ne ( e , r ) { for ( var s = e . split ( " " ) , a = 0 ; a < s . length ; a ++ ) s [ a ] && ! V ( s [ a ] ) . test ( r ) && ( r += " " + s [ a ] ) ; return r } var ae = function ( e ) { e . select ( ) } ; E ? ae = function ( e ) { e . selectionStart = 0 , e . selectionEnd = e . value . length } : o && ( ae = function ( e ) { try { e . select ( ) } catch { } } ) ; function F ( e ) { var r = Array . prototype . slice . call ( arguments , 1 ) ; return function ( ) { return e . apply ( null , r ) } } function A ( e , r , s ) { r || ( r = { } ) ; for ( var a in e ) e . hasOwnProperty ( a ) && ( s !== ! 1 || ! r . hasOwnProperty ( a ) ) && ( r [ a ] = e [ a ] ) ; return r } function be ( e , r , s , a , u ) { r == null && ( r = e . search ( /[^\s\u00a0]/ ) , r == - 1 && ( r = e . length ) ) ; for ( var m = a || 0 , x = u || 0 ; ; ) { var _ = e . indexOf ( " " , m ) ; if ( _ < 0 || _ >= r ) return x + ( r - m ) ; x += _ - m , x += s - x % s , m = _ + 1 } } var Fe = function ( ) { this . id = null , this . f = null , this . time = 0 , this . handler = F ( this . onTimeout , this ) } ; Fe . prototype . onTimeout = function ( e ) { e . id = 0 , e . time <= + new Date ? e . f ( ) : setTimeout ( e . handler , e . time - + new Date ) } , Fe . prototype . set = function ( e , r ) { this . f = r ; var s = + new Date + e ; ( ! this . id || s < this . time ) && ( clearTimeout ( this . id ) , this . id = setTimeout ( this . handler , e ) , th
2020-09-20 17:33:18 +08:00
2022-02-06 23:49:23 +08:00
b ` .split(/ \n /).length!=3?function(e){for(var r=0,s=[],a=e.length;r<=a;){var u=e.indexOf( `
` ,r);u==-1&&(u=e.length);var m=e.slice(r,e.charAt(u-1)==" \r "?u-1:u),x=m.indexOf(" \r ");x!=-1?(s.push(m.slice(0,x)),r+=x+1):(s.push(m),r=u+1)}return s}:function(e){return e.split(/ \r \n ?| \n /)},oe=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch{return!1}}:function(e){var r;try{r=e.ownerDocument.selection.createRange()}catch{}return!r||r.parentElement()!=e?!1:r.compareEndPoints("StartToEnd",r)!=0},Q=function(){var e=R("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),re=null;function M(e){if(re!=null)return re;var r=q(e,R("span","x")),s=r.getBoundingClientRect(),a=H(r,0,1).getBoundingClientRect();return re=Math.abs(s.left-a.left)>1}var B={},te={};function ce(e,r){arguments.length>2&&(r.dependencies=Array.prototype.slice.call(arguments,2)),B[e]=r}function me(e,r){te[e]=r}function ve(e){if(typeof e=="string"&&te.hasOwnProperty(e))e=te[e];else if(e&&typeof e.name=="string"&&te.hasOwnProperty(e.name)){var r=te[e.name];typeof r=="string"&&(r={name:r}),e=He(r,e),e.name=r.name}else{if(typeof e=="string"&&/^[ \w \- ]+ \/ [ \w \- ]+ \+ xml $ /.test(e))return ve("application/xml");if(typeof e=="string"&&/^[ \w \- ]+ \/ [ \w \- ]+ \+ json $ /.test(e))return ve("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function Le(e,r){r=ve(r);var s=B[r.name];if(!s)return Le(e,"text/plain");var a=s(e,r);if(Oe.hasOwnProperty(r.name)){var u=Oe[r.name];for(var m in u)!u.hasOwnProperty(m)||(a.hasOwnProperty(m)&&(a["_"+m]=a[m]),a[m]=u[m])}if(a.name=r.name,r.helperType&&(a.helperType=r.helperType),r.modeProps)for(var x in r.modeProps)a[x]=r.modeProps[x];return a}var Oe={};function Ce(e,r){var s=Oe.hasOwnProperty(e)?Oe[e]:Oe[e]={};A(r,s)}function Ve(e,r){if(r===!0)return r;if(e.copyState)return e.copyState(r);var s={};for(var a in r){var u=r[a];u instanceof Array&&(u=u.concat([])),s[a]=u}return s}function St(e,r){for(var s;e.innerMode&&(s=e.innerMode(r),!(!s||s.mode==e));)r=s.state,e=s.mode;return s||{mode:e,state:r}}function mt(e,r,s){return e.startState?e.startState(r,s):!0}var G=function(e,r,s){this.pos=this.start=0,this.string=e,this.tabSize=r||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=s};G.prototype.eol=function(){return this.pos>=this.string.length},G.prototype.sol=function(){return this.pos==this.lineStart},G.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},G.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},G.prototype.eat=function(e){var r=this.string.charAt(this.pos),s;if(typeof e=="string"?s=r==e:s=r&&(e.test?e.test(r):e(r)),s)return++this.pos,r},G.prototype.eatWhile=function(e){for(var r=this.pos;this.eat(e););return this.pos>r},G.prototype.eatSpace=function(){for(var e=this.pos;/[ \s \u 00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},G.prototype.skipToEnd=function(){this.pos=this.string.length},G.prototype.skipTo=function(e){var r=this.string.indexOf(e,this.pos);if(r>-1)return this.pos=r,!0},G.prototype.backUp=function(e){this.pos-=e},G.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=be(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?be(this.string,this.lineStart,this.tabSize):0)},G.prototype.indentation=function(){return be(this.string,null,this.tabSize)-(this.lineStart?be(this.string,this.lineStart,this.tabSize):0)},G.prototype.match=function(e,r,s){if(typeof e=="string"){var a=function(x){return s?x.toLowerCase():x},u=this.string.substr(this.pos,e.length);if(a(u)==a(e))return r!==!1&&(this.pos+=e.length),!0}else{var m=this.string.slice(this.pos).match(e);return m&&m.index>0?null:(m&&r!==!1&&(this.pos+=m[0].length),m)}},G.prototype.current=function(){return this.string.slice(this.start,this.pos)},G.prototype.hideFirstChars=function(e,r){this.lineStart+=e;try{return r()}finally{this.lineStart-=e}},G.prototype.lookAhead=function(e){var r=this.lineOracle;return r&&r.lookAhead(e)},G.prototype.baseToken=func
` ?(Ee=Y.appendChild(R("span",fe[0]==" \r "?" \u 240D":" \u 2424","cm-invalidchar")),Ee.setAttribute("cm-text",fe[0]),e.col+=1):(Ee=e.cm.options.specialCharPlaceholder(fe[0]),Ee.setAttribute("cm-text",fe[0]),o&&h<9?Y.appendChild(R("span",[Ee])):Y.appendChild(Ee),e.col+=1);e.map.push(e.pos,e.pos+1,Ee),e.pos++}}if(e.trailingSpace=_.charCodeAt(r.length-1)==32,s||a||u||L||m||x){var Qe=s||"";a&&(Qe+=a),u&&(Qe+=u);var Ue=R("span",[Y],Qe,m);if(x)for(var nt in x)x.hasOwnProperty(nt)&&nt!="style"&&nt!="class"&&Ue.setAttribute(nt,x[nt]);return e.content.appendChild(Ue)}e.content.appendChild(Y)}}function Hy(e,r){if(e.length>1&&!/ /.test(e))return e;for(var s=r,a="",u=0;u<e.length;u++){var m=e.charAt(u);m==" "&&s&&(u==e.length-1||e.charCodeAt(u+1)==32)&&(m=" \x A0"),a+=m,s=m==" "}return a}function Wy(e,r){return function(s,a,u,m,x,_,C){u=u?u+" cm-force-border":"cm-force-border";for(var L=s.pos,Y=L+a.length;;){for(var J=void 0,fe=0;fe<r.length&&(J=r[fe],!(J.to>L&&J.from<=L));fe++);if(J.to>=Y)return e(s,a,u,m,x,_,C);e(s,a.slice(0,J.to-L),u,m,null,_,C),m=null,a=a.slice(J.to-L),L=J.to}}}function ru(e,r,s,a){var u=!a&&s.widgetNode;u&&e.map.push(e.pos,e.pos+r,u),!a&&e.cm.display.input.needsContentAttribute&&(u||(u=e.content.appendChild(document.createElement("span"))),u.setAttribute("cm-marker",s.id)),u&&(e.cm.display.input.setUneditable(u),e.content.appendChild(u)),e.pos+=r,e.trailingSpace=!1}function Gy(e,r,s){var a=e.markedSpans,u=e.text,m=0;if(!a){for(var x=1;x<s.length;x+=2)r.addToken(r,u.slice(m,m=s[x]),eu(s[x+1],r.cm.options));return}for(var _=u.length,C=0,L=1,Y="",J,fe,le=0,ye,Ee,Pe, $ e,Qe;;){if(le==C){ye=Ee=Pe=fe="",Qe=null, $ e=null,le=1/0;for(var Ue=[],nt=void 0,ct=0;ct<a.length;++ct){var ut=a[ct],vt=ut.marker;if(vt.type=="bookmark"&&ut.from==C&&vt.widgetNode)Ue.push(vt);else if(ut.from<=C&&(ut.to==null||ut.to>C||vt.collapsed&&ut.to==C&&ut.from==C)){if(ut.to!=null&&ut.to!=C&&le>ut.to&&(le=ut.to,Ee=""),vt.className&&(ye+=" "+vt.className),vt.css&&(fe=(fe?fe+";":"")+vt.css),vt.startStyle&&ut.from==C&&(Pe+=" "+vt.startStyle),vt.endStyle&&ut.to==le&&(nt||(nt=[])).push(vt.endStyle,ut.to),vt.title&&((Qe||(Qe={})).title=vt.title),vt.attributes)for(var Pt in vt.attributes)(Qe||(Qe={}))[Pt]=vt.attributes[Pt];vt.collapsed&&(! $ e||Ha( $ e.marker,vt)<0)&&( $ e=ut)}else ut.from>C&&le>ut.from&&(le=ut.from)}if(nt)for(var ir=0;ir<nt.length;ir+=2)nt[ir+1]==le&&(Ee+=" "+nt[ir]);if(! $ e|| $ e.from==C)for(var Bt=0;Bt<Ue.length;++Bt)ru(r,0,Ue[Bt]);if( $ e&&( $ e.from||0)==C){if(ru(r,( $ e.to==null?_+1: $ e.to)-C, $ e.marker, $ e.from==null), $ e.to==null)return; $ e.to==C&&( $ e=!1)}}if(C>=_)break;for(var Lr=Math.min(_,le);;){if(Y){var Sr=C+Y.length;if(! $ e){var Xt=Sr>Lr?Y.slice(0,Lr-C):Y;r.addToken(r,Xt,J?J+ye:ye,Pe,C+Xt.length==le?Ee:"",fe,Qe)}if(Sr>=Lr){Y=Y.slice(Lr-C),C=Lr;break}C=Sr,Pe=""}Y=u.slice(m,m=s[L++]),J=eu(s[L++],r.cm.options)}}}function nu(e,r,s){this.line=r,this.rest=zy(r),this.size=this.rest?Ye(Re(this.rest))-s+1:1,this.node=this.text=null,this.hidden=gn(e,r)}function Co(e,r,s){for(var a=[],u,m=r;m<s;m=u){var x=new nu(e.doc,se(e.doc,m),m);u=m+x.size,a.push(x)}return a}var Kn=null;function Ky(e){Kn?Kn.ops.push(e):e.ownsGroup=Kn={ops:[e],delayedCallbacks:[]}}function Vy(e){var r=e.delayedCallbacks,s=0;do{for(;s<r.length;s++)r[s].call(null);for(var a=0;a<e.ops.length;a++){var u=e.ops[a];if(u.cursorActivityHandlers)for(;u.cursorActivityCalled<u.cursorActivityHandlers.length;)u.cursorActivityHandlers[u.cursorActivityCalled++].call(null,u.cm)}}while(s<r.length)}function Yy(e,r){var s=e.ownsGroup;if(!!s)try{Vy(s)}finally{Kn=null,r(s)}}var Ai=null;function tr(e,r){var s=Mt(e,r);if(!!s.length){var a=Array.prototype.slice.call(arguments,2),u;Kn?u=Kn.delayedCallbacks:Ai?u=Ai:(u=Ai=[],setTimeout(Xy,0));for(var m=function(_){u.push(function(){return s[_].apply(null,a)})},x=0;x<s.length;++x)m(x)}}function Xy(){var e=Ai;Ai=null;for(var r=0;r<e.length;++r)e[r]()}function iu(e,r,s,a){for(var u=0;u<r.changes.length;u++){var m=r.changes[u];m=="text"?Qy(e,r):m=="gutter"?au(e,r,s,a):m=="class"?Va(e,r):m=="widget"&&Jy(e,r,a)}r.changes=null}function Li(e){return e.node==e.text&&(e.node=R("d
top : ` +nt+"px; width: "+(ct==null?C-Ue:ct)+ ` px ;
height : ` +(ut-nt)+"px"))}function J(Ue,nt,ct){var ut=se(u,Ue),vt=ut.text.length,Pt,ir;function Bt(Xt,Er){return Lo(e,we(Ue,Xt),"div",ut,Er)}function Lr(Xt,Er,cr){var Jt=wu(e,ut,null,Xt),Zt=Er=="ltr"==(cr=="after")?"left":"right",Ut=cr=="after"?Jt.begin:Jt.end-(/ \s /.test(ut.text.charAt(Jt.end-1))?2:1);return Bt(Ut,Zt)[Zt]}var Sr=Lt(ut,u.direction);return Xe(Sr,nt||0,ct==null?vt:ct,function(Xt,Er,cr,Jt){var Zt=cr=="ltr",Ut=Bt(Xt,Zt?"left":"right"),Cr=Bt(Er-1,Zt?"right":"left"),ui=nt==null&&Xt==0,Sn=ct==null&&Er==vt,gr=Jt==0,Zr=!Sr||Jt==Sr.length-1;if(Cr.top-Ut.top<=3){var or=(L?ui:Sn)&&gr,Is=(L?Sn:ui)&&Zr,fn=or?_:(Zt?Ut:Cr).left,Rn=Is?C:(Zt?Cr:Ut).right;Y(fn,Ut.top,Rn-fn,Ut.bottom)}else{var zn,xr,ci,Fs;Zt?(zn=L&&ui&&gr?_:Ut.left,xr=L?C:Lr(Xt,cr,"before"),ci=L?_:Lr(Er,cr,"after"),Fs=L&&Sn&&Zr?C:Cr.right):(zn=L?Lr(Xt,cr,"before"):_,xr=!L&&ui&&gr?C:Ut.right,ci=!L&&Sn&&Zr?_:Cr.left,Fs=L?Lr(Er,cr,"after"):C),Y(zn,Ut.top,xr-zn,Ut.bottom),Ut.bottom<Cr.top&&Y(_,Ut.bottom,null,Cr.top),Y(ci,Cr.top,Fs-ci,Cr.bottom)}(!Pt||Io(Ut,Pt)<0)&&(Pt=Ut),Io(Cr,Pt)<0&&(Pt=Cr),(!ir||Io(Ut,ir)<0)&&(ir=Ut),Io(Cr,ir)<0&&(ir=Cr)}),{start:Pt,end:ir}}var fe=r.from(),le=r.to();if(fe.line==le.line)J(fe.line,fe.ch,le.ch);else{var ye=se(u,fe.line),Ee=se(u,le.line),Pe=Ur(ye)==Ur(Ee), $ e=J(fe.line,fe.ch,Pe?ye.text.length+1:null).end,Qe=J(le.line,Pe?0:null,le.ch).start;Pe&&( $ e.top<Qe.top-2?(Y( $ e.right, $ e.top,null, $ e.bottom),Y(_,Qe.top,Qe.left,Qe.bottom)):Y( $ e.right, $ e.top,Qe.left- $ e.right, $ e.bottom)), $ e.bottom<Qe.top&&Y(_, $ e.bottom,null,Qe.top)}s.appendChild(m)}function as(e){if(!!e.state.focused){var r=e.display;clearInterval(r.blinker);var s=!0;r.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?r.blinker=setInterval(function(){e.hasFocus()||Zn(e),r.cursorDiv.style.visibility=(s=!s)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(r.cursorDiv.style.visibility="hidden")}}function Eu(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||ls(e))}function ss(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&Zn(e))},100)}function ls(e,r){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),e.options.readOnly!="nocursor"&&(e.state.focused||(rt(e,"focus",e,r),e.state.focused=!0,z(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),f&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),as(e))}function Zn(e,r){e.state.delayingBlurEvent||(e.state.focused&&(rt(e,"blur",e,r),e.state.focused=!1,W(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function Fo(e){for(var r=e.display,s=r.lineDiv.offsetTop,a=Math.max(0,r.scroller.getBoundingClientRect().top),u=r.lineDiv.getBoundingClientRect().top,m=0,x=0;x<r.view.length;x++){var _=r.view[x],C=e.options.lineWrapping,L=void 0,Y=0;if(!_.hidden){if(u+=_.line.height,o&&h<8){var J=_.node.offsetTop+_.node.offsetHeight;L=J-s,s=J}else{var fe=_.node.getBoundingClientRect();L=fe.bottom-fe.top,!C&&_.text.firstChild&&(Y=_.text.firstChild.getBoundingClientRect().right-fe.left-1)}var le=_.line.height-L;if((le>.005||le<-.005)&&(u<a&&(m-=le),Ae(_.line,L),Cu(_.line),_.rest))for(var ye=0;ye<_.rest.length;ye++)Cu(_.rest[ye]);if(Y>e.display.sizerWidth){var Ee=Math.ceil(Y/Xn(e.display));Ee>e.display.maxLineLength&&(e.display.maxLineLength=Ee,e.display.maxLine=_.line,e.display.maxLineChanged=!0)}}}Math.abs(m)>2&&(r.scroller.scrollTop+=m)}function Cu(e){if(e.widgets)for(var r=0;r<e.widgets.length;++r){var s=e.widgets[r],a=s.node.parentNode;a&&(s.height=a.offsetHeight)}}function Mo(e,r,s){var a=s&&s.top!=null?Math.max(0,s.top):e.scroller.scrollTop;a=Math.floor(a-To(e));var u=s&&s.bottom!=null?s.bottom:a+e.wrapper.clientHeight,m=tt(r,a),x=tt(r,u);if(s&&s.ensure){var _=s.ensure.from.line,C=s.ensure.to.line;_<m?(m=_,x=tt(r,sn(se(r,_))+e.wrapper.clientHeight)):Math.min(C,r.lastLine())>=x&&(m=tt(r
2022-01-25 06:49:42 +08:00
top : ` +(r.top-s.viewOffset-To(e.display))+ ` px ;
2021-11-16 21:22:24 +08:00
height : ` +(r.bottom-r.top+Yr(e)+s.barHeight)+ ` px ;
2022-02-06 23:49:23 +08:00
left : ` +r.left+"px; width: "+Math.max(2,r.right-r.left)+"px;");e.display.lineSpace.appendChild(m),m.scrollIntoView(u),e.display.lineSpace.removeChild(m)}}}function hb(e,r,s,a){a==null&&(a=0);var u;!e.options.lineWrapping&&r==s&&(s=r.sticky=="before"?we(r.line,r.ch+1,"before"):r,r=r.ch?we(r.line,r.sticky=="before"?r.ch-1:r.ch,"after"):r);for(var m=0;m<5;m++){var x=!1,_=jr(e,r),C=!s||s==r?_:jr(e,s);u={left:Math.min(_.left,C.left),top:Math.min(_.top,C.top)-a,right:Math.max(_.left,C.left),bottom:Math.max(_.bottom,C.bottom)+a};var L=us(e,u),Y=e.doc.scrollTop,J=e.doc.scrollLeft;if(L.scrollTop!=null&&(Oi(e,L.scrollTop),Math.abs(e.doc.scrollTop-Y)>1&&(x=!0)),L.scrollLeft!=null&&(Fn(e,L.scrollLeft),Math.abs(e.doc.scrollLeft-J)>1&&(x=!0)),!x)break}return u}function pb(e,r){var s=us(e,r);s.scrollTop!=null&&Oi(e,s.scrollTop),s.scrollLeft!=null&&Fn(e,s.scrollLeft)}function us(e,r){var s=e.display,a=Yn(e.display);r.top<0&&(r.top=0);var u=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:s.scroller.scrollTop,m=Xa(e),x={};r.bottom-r.top>m&&(r.bottom=r.top+m);var _=e.doc.height+Ya(s),C=r.top<a,L=r.bottom>_-a;if(r.top<u)x.scrollTop=C?0:r.top;else if(r.bottom>u+m){var Y=Math.min(r.top,(L?_:r.bottom)-m);Y!=u&&(x.scrollTop=Y)}var J=e.options.fixedGutter?0:s.gutters.offsetWidth,fe=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:s.scroller.scrollLeft-J,le=An(e)-s.gutters.offsetWidth,ye=r.right-r.left>le;return ye&&(r.right=r.left+le),r.left<10?x.scrollLeft=0:r.left<fe?x.scrollLeft=Math.max(0,r.left+J-(ye?0:10)):r.right>le+fe-3&&(x.scrollLeft=r.right+(ye?0:10)-le),x}function cs(e,r){r!=null&&(Oo(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+r)}function Qn(e){Oo(e);var r=e.getCursor();e.curOp.scrollToPos={from:r,to:r,margin:e.options.cursorScrollMargin}}function Mi(e,r,s){(r!=null||s!=null)&&Oo(e),r!=null&&(e.curOp.scrollLeft=r),s!=null&&(e.curOp.scrollTop=s)}function mb(e,r){Oo(e),e.curOp.scrollToPos=r}function Oo(e){var r=e.curOp.scrollToPos;if(r){e.curOp.scrollToPos=null;var s=bu(e,r.from),a=bu(e,r.to);Tu(e,s,a,r.margin)}}function Tu(e,r,s,a){var u=us(e,{left:Math.min(r.left,s.left),top:Math.min(r.top,s.top)-a,right:Math.max(r.right,s.right),bottom:Math.max(r.bottom,s.bottom)+a});Mi(e,u.scrollLeft,u.scrollTop)}function Oi(e,r){Math.abs(e.doc.scrollTop-r)<2||(n||ds(e,{top:r}),Au(e,r,!0),n&&ds(e),zi(e,100))}function Au(e,r,s){r=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,r)),!(e.display.scroller.scrollTop==r&&!s)&&(e.doc.scrollTop=r,e.display.scrollbars.setScrollTop(r),e.display.scroller.scrollTop!=r&&(e.display.scroller.scrollTop=r))}function Fn(e,r,s,a){r=Math.max(0,Math.min(r,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),!((s?r==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-r)<2)&&!a)&&(e.doc.scrollLeft=r,Mu(e),e.display.scroller.scrollLeft!=r&&(e.display.scroller.scrollLeft=r),e.display.scrollbars.setScrollLeft(r))}function Pi(e){var r=e.display,s=r.gutters.offsetWidth,a=Math.round(e.doc.height+Ya(e.display));return{clientHeight:r.scroller.clientHeight,viewHeight:r.wrapper.clientHeight,scrollWidth:r.scroller.scrollWidth,clientWidth:r.scroller.clientWidth,viewWidth:r.wrapper.clientWidth,barLeft:e.options.fixedGutter?s:0,docHeight:a,scrollHeight:a+Yr(e)+r.barHeight,nativeBarWidth:r.nativeBarWidth,gutterWidth:s}}var Mn=function(e,r,s){this.cm=s;var a=this.vert=R("div",[R("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),u=this.horiz=R("div",[R("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");a.tabIndex=u.tabIndex=-1,e(a),e(u),lt(a,"scroll",function(){a.clientHeight&&r(a.scrollTop,"vertical")}),lt(u,"scroll",function(){u.clientWidth&&r(u.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,o&&h<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Mn.prototype.update=function(e){var r=e.scrollWidth>e.clientWidth+1,s=e.scrollHeight>e.clientHeight+1,a=e.nativeBarWidth;if(s){this.vert.style.display="block",this.vert.style.bottom=r?a+"px":"0";var u=e.viewHeight-(r?a:0);this.vert.firs
` },setDirection:nr(function(e){e!="rtl"&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter(function(r){return r.order=null}),this.cm&&Ib(this.cm))})}),_r.prototype.eachLine=_r.prototype.iter;var cc=0;function Hb(e){var r=this;if(fc(r),!(wt(r,e)||ln(r.display,e))){kt(e),o&&(cc=+new Date);var s=Dn(r,e,!0),a=e.dataTransfer.files;if(!(!s||r.isReadOnly()))if(a&&a.length&&window.FileReader&&window.File)for(var u=a.length,m=Array(u),x=0,_=function(){++x==u&&rr(r,function(){s=Ze(r.doc,s);var le={from:s,to:s,text:r.doc.splitLines(m.filter(function(ye){return ye!=null}).join(r.doc.lineSeparator())),origin:"paste"};ri(r.doc,le),Yu(r.doc,bn(Ze(r.doc,s),Ze(r.doc,xn(le))))})()},C=function(le,ye){if(r.options.allowDropFileTypes&&xe(r.options.allowDropFileTypes,le.type)==-1){_();return}var Ee=new FileReader;Ee.onerror=function(){return _()},Ee.onload=function(){var Pe=Ee.result;if(/[ \x 00- \x 08 \x 0e- \x 1f]{2}/.test(Pe)){_();return}m[ye]=Pe,_()},Ee.readAsText(le)},L=0;L<a.length;L++)C(a[L],L);else{if(r.state.draggingText&&r.doc.sel.contains(s)>-1){r.state.draggingText(e),setTimeout(function(){return r.display.input.focus()},20);return}try{var Y=e.dataTransfer.getData("Text");if(Y){var J;if(r.state.draggingText&&!r.state.draggingText.copy&&(J=r.listSelections()),qo(r.doc,bn(s,s)),J)for(var fe=0;fe<J.length;++fe)ni(r.doc,"",J[fe].anchor,J[fe].head,"drag");r.replaceSelection(Y,"around","paste"),r.display.input.focus()}}catch{}}}}function Wb(e,r){if(o&&(!e.state.draggingText||+new Date-cc<100)){Ir(r);return}if(!(wt(e,r)||ln(e.display,r))&&(r.dataTransfer.setData("Text",e.getSelection()),r.dataTransfer.effectAllowed="copyMove",r.dataTransfer.setDragImage&&!v)){var s=R("img",null,null,"position: fixed; left: 0; top: 0;");s.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",g&&(s.width=s.height=1,e.display.wrapper.appendChild(s),s._top=s.offsetTop),r.dataTransfer.setDragImage(s,0,0),g&&s.parentNode.removeChild(s)}}function Gb(e,r){var s=Dn(e,r);if(!!s){var a=document.createDocumentFragment();os(e,s,a),e.display.dragCursor||(e.display.dragCursor=R("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),q(e.display.dragCursor,a)}}function fc(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function dc(e){if(!!document.getElementsByClassName){for(var r=document.getElementsByClassName("CodeMirror"),s=[],a=0;a<r.length;a++){var u=r[a].CodeMirror;u&&s.push(u)}s.length&&s[0].operation(function(){for(var m=0;m<s.length;m++)e(s[m])})}}var hc=!1;function Kb(){hc||(Vb(),hc=!0)}function Vb(){var e;lt(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,dc(Yb)},100))}),lt(window,"blur",function(){return dc(Zn)})}function Yb(e){var r=e.display;r.cachedCharWidth=r.cachedTextHeight=r.cachedPaddingH=null,r.scrollbarsClipped=!1,e.setSize()}for(var _n={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:" ` ",219:" [ ",220:" \ \ ",221:" ] ",222:" ' ",224:" Mod ",63232:" Up ",63233:" Down ",63234:" Left ",63235:" Right ",63272:" Delete ",63273:" Home ",63275:" End ",63276:" PageUp ",63277:" PageDown ",63302:" Insert "},Gi=0;Gi<10;Gi++)_n[Gi+48]=_n[Gi+96]=String(Gi);for(var jo=65;jo<=90;jo++)_n[jo]=String.fromCharCode(jo);for(var Ki=1;Ki<=12;Ki++)_n[Ki+111]=_n[Ki+63235]=" F "+Ki;var cn={};cn.basic={Left:" goCharLeft ",Right:" goCharRight ",Up:" goLineUp ",Down:" goLineDown ",End:" goLineEnd ",Home:" goLineStartSmart ",PageUp:" goPageUp ",PageDown:" goPageDown ",Delete:" delCharAfter ",Backspace:" delCharBefore "," Shift - Backspace ":" delCharBefore ",Tab:" defaultTab "," Shift - Tab ":" indentAuto ",Enter:" newlineAndIndent ",Insert:" toggleOverwrite ",Esc:" singleSelection "},cn.pcDefault={" Ctrl - A ":" selectAll "," Ctrl -
` ,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function vc(e,r){var s=se(e.doc,r),a=Ur(s);return a!=s&&(r=Ye(a)),Ss(!0,e,a,r,1)}function Jb(e,r){var s=se(e.doc,r),a=Ry(s);return a!=s&&(r=Ye(a)),Ss(!0,e,s,r,-1)}function yc(e,r){var s=vc(e,r.line),a=se(e.doc,s.line),u=Lt(a,e.doc.direction);if(!u||u[0].level==0){var m=Math.max(s.ch,a.text.search(/ \S /)),x=r.line==s.line&&r.ch<=m&&r.ch;return we(s.line,x?0:m,s.sticky)}return s}function Wo(e,r,s){if(typeof r=="string"&&(r=Vi[r],!r))return!1;e.display.input.ensurePolled();var a=e.display.shift,u=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),s&&(e.display.shift=!1),u=r(e)!=ze}finally{e.display.shift=a,e.state.suppressEdits=!1}return u}function ex(e,r,s){for(var a=0;a<e.state.keyMaps.length;a++){var u=oi(r,e.state.keyMaps[a],s,e);if(u)return u}return e.options.extraKeys&&oi(r,e.options.extraKeys,s,e)||oi(r,e.options.keyMap,s,e)}var tx=new Fe;function Yi(e,r,s,a){var u=e.state.keySeq;if(u){if(pc(r))return"handled";if(/ \' $ /.test(r)?e.state.keySeq=null:tx.set(50,function(){e.state.keySeq==u&&(e.state.keySeq=null,e.display.input.reset())}),bc(e,u+" "+r,s,a))return!0}return bc(e,r,s,a)}function bc(e,r,s,a){var u=ex(e,r,a);return u=="multi"&&(e.state.keySeq=r),u=="handled"&&tr(e,"keyHandled",e,r,s),(u=="handled"||u=="multi")&&(kt(s),as(e)),!!u}function xc(e,r){var s=gc(r,!0);return s?r.shiftKey&&!e.state.keySeq?Yi(e,"Shift-"+s,r,function(a){return Wo(e,a,!0)})||Yi(e,s,r,function(a){if(typeof a=="string"?/^go[A-Z]/.test(a):a.motion)return Wo(e,a)}):Yi(e,s,r,function(a){return Wo(e,a)}):!1}function rx(e,r,s){return Yi(e,"'"+s+"'",r,function(a){return Wo(e,a,!0)})}var Es=null;function wc(e){var r=this;if(!(e.target&&e.target!=r.display.input.getField())&&(r.curOp.focus=P(),!wt(r,e))){o&&h<11&&e.keyCode==27&&(e.returnValue=!1);var s=e.keyCode;r.display.shift=s==16||e.shiftKey;var a=xc(r,e);g&&(Es=a?s:null,!a&&s==88&&!Q&&(S?e.metaKey:e.ctrlKey)&&r.replaceSelection("",null,"cut")),n&&!S&&!a&&s==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),s==18&&!/ \b CodeMirror-crosshair \b /.test(r.display.lineDiv.className)&&nx(r)}}function nx(e){var r=e.display.lineDiv;z(r,"CodeMirror-crosshair");function s(a){(a.keyCode==18||!a.altKey)&&(W(r,"CodeMirror-crosshair"),pt(document,"keyup",s),pt(document,"mouseover",s))}lt(document,"keyup",s),lt(document,"mouseover",s)}function kc(e){e.keyCode==16&&(this.doc.sel.shift=!1),wt(this,e)}function _c(e){var r=this;if(!(e.target&&e.target!=r.display.input.getField())&&!(ln(r.display,e)||wt(r,e)||e.ctrlKey&&!e.altKey||S&&e.metaKey)){var s=e.keyCode,a=e.charCode;if(g&&s==Es){Es=null,kt(e);return}if(!(g&&(!e.which||e.which<10)&&xc(r,e))){var u=String.fromCharCode(a==null?s:a);u!=" \b "&&(rx(r,e,u)||r.display.input.onKeyPress(e))}}}var ix=400,Cs=function(e,r,s){this.time=e,this.pos=r,this.button=s};Cs.prototype.compare=function(e,r,s){return this.time+ix>e&&D(r,this.pos)==0&&s==this.button};var Xi,Zi;function ox(e,r){var s=+new Date;return Zi&&Zi.compare(s,e,r)?(Xi=Zi=null,"triple"):Xi&&Xi.compare(s,e,r)?(Zi=new Cs(s,e,r),Xi=null,"double"):(Xi=new Cs(s,e,r),Zi=null,"single")}function Sc(e){var r=this,s=r.display;if(!(wt(r,e)||s.activeTouch&&s.input.supportsTouch())){if(s.input.ensurePolled(),s.shift=e.shiftKey,ln(s,e)){f||(s.scroller.draggable=!1,setTimeout(function(){return s.scroller.draggable=!0},100));return}if(!Ts(r,e)){var a=Dn(r,e),u=pr(e),m=a?ox(a,u):"single";window.focus(),u==1&&r.state.selectingText&&r.state.selectingText(e),!(a&&ax(r,u,a,m,e))&&(u==1?a?lx(r,a,m,e):hr(e)==s.scroller&&kt(e):u==2?(a&&Bo(r.doc,a),setTimeout(function(){return s.input.focus()},20)):u==3&&(ee?r.display.input.onContextMenu(e):ss(r)))}}}function ax(e,r,s,a,u){var m="Click";return a=="double"?m="Double"+m:a=="triple"&&(m="Triple"+m),m=(r==1?"Left":r==2?"Middle":"Right")+m,Yi(e,mc(m,u),u,function(x){if(typeof x=="string"&&(x=Vi[x]),!x)return!1;var _=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),_=x(e,s)!=ze}finally{e.state.suppressEdits=!1}return _})}function sx(e,r,s){var a=e.getOption("configureMouse"),u=a?a(e,r,s):{};if(u.uni
` )==r){if(a.ranges.length%Wr.text.length==0){L=[];for(var Y=0;Y<Wr.text.length;Y++)L.push(m.splitLines(Wr.text[Y]))}}else C.length==a.ranges.length&&e.options.pasteLinesPerSelection&&(L=Ie(C,function( $ e){return[ $ e]}));for(var J=e.curOp.updateInput,fe=a.ranges.length-1;fe>=0;fe--){var le=a.ranges[fe],ye=le.from(),Ee=le.to();le.empty()&&(s&&s>0?ye=we(ye.line,ye.ch-s):e.state.overwrite&&!_?Ee=we(Ee.line,Math.min(se(m,Ee.line).text.length,Ee.ch+Re(C).length)):_&&Wr&&Wr.lineWise&&Wr.text.join( `
` )==C.join( `
` )&&(ye=Ee=we(ye.line,0)));var Pe={from:ye,to:Ee,text:L?L[fe%L.length]:C,origin:u||(_?"paste":e.state.cutIncoming>x?"cut":"+input")};ri(e.doc,Pe),tr(e,"inputRead",e,Pe)}r&&!_&&Ic(e,r),Qn(e),e.curOp.updateInput<2&&(e.curOp.updateInput=J),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Dc(e,r){var s=e.clipboardData&&e.clipboardData.getData("Text");if(s)return e.preventDefault(),!r.isReadOnly()&&!r.options.disableInput&&Ar(r,function(){return Ls(r,s,0,null,"paste")}),!0}function Ic(e,r){if(!(!e.options.electricChars||!e.options.smartIndent))for(var s=e.doc.sel,a=s.ranges.length-1;a>=0;a--){var u=s.ranges[a];if(!(u.head.ch>100||a&&s.ranges[a-1].head.line==u.head.line)){var m=e.getModeAt(u.head),x=!1;if(m.electricChars){for(var _=0;_<m.electricChars.length;_++)if(r.indexOf(m.electricChars.charAt(_))>-1){x=Qi(e,u.head.line,"smart");break}}else m.electricInput&&m.electricInput.test(se(e.doc,u.head.line).text.slice(0,u.head.ch))&&(x=Qi(e,u.head.line,"smart"));x&&tr(e,"electricInput",e,u.head.line)}}}function Fc(e){for(var r=[],s=[],a=0;a<e.doc.sel.ranges.length;a++){var u=e.doc.sel.ranges[a].head.line,m={anchor:we(u,0),head:we(u+1,0)};s.push(m),r.push(e.getRange(m.anchor,m.head))}return{text:r,ranges:s}}function Mc(e,r,s,a){e.setAttribute("autocorrect",s?"":"off"),e.setAttribute("autocapitalize",a?"":"off"),e.setAttribute("spellcheck",!!r)}function Oc(){var e=R("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"),r=R("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return f?e.style.width="1000px":e.setAttribute("wrap","off"),E&&(e.style.border="1px solid black"),Mc(e),r}function vx(e){var r=e.optionHandlers,s=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(a,u){var m=this.options,x=m[a];m[a]==u&&a!="mode"||(m[a]=u,r.hasOwnProperty(a)&&rr(this,r[a])(this,u,x),rt(this,"optionChange",this,a))},getOption:function(a){return this.options[a]},getDoc:function(){return this.doc},addKeyMap:function(a,u){this.state.keyMaps[u?"push":"unshift"](Ho(a))},removeKeyMap:function(a){for(var u=this.state.keyMaps,m=0;m<u.length;++m)if(u[m]==a||u[m].name==a)return u.splice(m,1),!0},addOverlay:br(function(a,u){var m=a.token?a:e.getMode(this.options,a);if(m.startState)throw new Error("Overlays may not be stateful.");Be(this.state.overlays,{mode:m,modeSpec:a,opaque:u&&u.opaque,priority:u&&u.priority||0},function(x){return x.priority}),this.state.modeGen++,kr(this)}),removeOverlay:br(function(a){for(var u=this.state.overlays,m=0;m<u.length;++m){var x=u[m].modeSpec;if(x==a||typeof a=="string"&&x.name==a){u.splice(m,1),this.state.modeGen++,kr(this);return}}}),indentLine:br(function(a,u,m){typeof u!="string"&&typeof u!="number"&&(u==null?u=this.options.smartIndent?"smart":"prev":u=u?"add":"subtract"),bt(this.doc,a)&&Qi(this,a,u,m)}),indentSelection:br(function(a){for(var u=this.doc.sel.ranges,m=-1,x=0;x<u.length;x++){var _=u[x];if(_.empty())_.head.line>m&&(Qi(this,_.head.line,a,!0),m=_.head.line,x==this.doc.sel.primIndex&&Qn(this));else{var C=_.from(),L=_.to(),Y=Math.max(m,C.line);m=Math.min(this.lastLine(),L.line-(L.ch?0:1))+1;for(var J=Y;J<m;++J)Qi(this,J,a);var fe=this.doc.sel.ranges;C.ch==0&&u.length==fe.length&&fe[x].from().ch>0&&ws(this.doc,x,new At(C,fe[x].to()),qe)}}}),getTokenAt:function(a,u){return jl(this,a,u)},getLineTokens:function(a,u){return jl(this,we(a),u,!0)},getTokenTypeAt:function(a){a=Ze(this.doc,a);var u=ql(this,se(this.doc,a.line)),m=0,x=(u.length-1)/2,_=a.ch,C;if(_==0)C=u[2];else for(;;){var L=m+x>>1;if((L?u[L*2-1]:0)>=_)x=L;else if(u[L*2+1]<_)m=L+1;else{C=u[L*2+2];break}}var Y=C?C.indexOf("overlay "):-1;return Y<0?C:Y==0?null:C.slice(0,Y-1)},getModeAt:function(a){var u=this.doc.mode;return u.innerMode?e.innerMode(u,this.getTokenAt(a).state).mode:u},getHelper:function(a,u){return this.getHelpers(a,u)[0]},getHelpers:function(a,u){var m=[];if(!s.hasOwnProperty(u))return m;var x=s[u],_=this.getModeAt(a);if(typeof _[u]=="string")x[_[u]]&&m.
2021-11-16 21:22:24 +08:00
` ,Pe=X(Ee,le)?"w":fe&&Ee== `
2022-02-06 23:49:23 +08:00
` ?"n":!fe||/ \s /.test(Ee)?null:"p";if(fe&&!ye&&!Pe&&(Pe="s"),J&&J!=Pe){s<0&&(s=1,Y(),r.sticky="after");break}if(Pe&&(J=Pe),s>0&&!Y(!ye))break}var $ e= $ o(e,r,m,x,!0);return $ (m, $ e)&&( $ e.hitSide=!0), $ e}function Pc(e,r,s,a){var u=e.doc,m=r.left,x;if(a=="page"){var _=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),C=Math.max(_-.5*Yn(e.display),3);x=(s>0?r.bottom:r.top)+s*C}else a=="line"&&(x=s>0?r.bottom+3:r.top-3);for(var L;L=es(e,m,x),!!L.outside;){if(s<0?x<=0:x>=u.height){L.hitSide=!0;break}x+=s*5}return L}var Ot=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Fe,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Ot.prototype.init=function(e){var r=this,s=this,a=s.cm,u=s.div=e.lineDiv;u.contentEditable=!0,Mc(u,a.options.spellcheck,a.options.autocorrect,a.options.autocapitalize);function m(_){for(var C=_.target;C;C=C.parentNode){if(C==u)return!0;if(/ \b CodeMirror-(?:line)?widget \b /.test(C.className))break}return!1}lt(u,"paste",function(_){!m(_)||wt(a,_)||Dc(_,a)||h<=11&&setTimeout(rr(a,function(){return r.updateFromDOM()}),20)}),lt(u,"compositionstart",function(_){r.composing={data:_.data,done:!1}}),lt(u,"compositionupdate",function(_){r.composing||(r.composing={data:_.data,done:!1})}),lt(u,"compositionend",function(_){r.composing&&(_.data!=r.composing.data&&r.readFromDOMSoon(),r.composing.done=!0)}),lt(u,"touchstart",function(){return s.forceCompositionEnd()}),lt(u,"input",function(){r.composing||r.readFromDOMSoon()});function x(_){if(!(!m(_)||wt(a,_))){if(a.somethingSelected())Ko({lineWise:!1,text:a.getSelections()}),_.type=="cut"&&a.replaceSelection("",null,"cut");else if(a.options.lineWiseCopyCut){var C=Fc(a);Ko({lineWise:!0,text:C.text}),_.type=="cut"&&a.operation(function(){a.setSelections(C.ranges,0,qe),a.replaceSelection("",null,"cut")})}else return;if(_.clipboardData){_.clipboardData.clearData();var L=Wr.text.join( `
` );if(_.clipboardData.setData("Text",L),_.clipboardData.getData("Text")==L){_.preventDefault();return}}var Y=Oc(),J=Y.firstChild;a.display.lineSpace.insertBefore(Y,a.display.lineSpace.firstChild),J.value=Wr.text.join( `
` );var fe=P();ae(J),setTimeout(function(){a.display.lineSpace.removeChild(Y),fe.focus(),fe==u&&s.showPrimarySelection()},50)}}lt(u,"copy",x),lt(u,"cut",x)},Ot.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Ot.prototype.prepareSelection=function(){var e=Su(this.cm,!1);return e.focus=P()==this.div,e},Ot.prototype.showSelection=function(e,r){!e||!this.cm.display.view.length||((e.focus||r)&&this.showPrimarySelection(),this.showMultipleSelections(e))},Ot.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Ot.prototype.showPrimarySelection=function(){var e=this.getSelection(),r=this.cm,s=r.doc.sel.primary(),a=s.from(),u=s.to();if(r.display.viewTo==r.display.viewFrom||a.line>=r.display.viewTo||u.line<r.display.viewFrom){e.removeAllRanges();return}var m=Vo(r,e.anchorNode,e.anchorOffset),x=Vo(r,e.focusNode,e.focusOffset);if(!(m&&!m.bad&&x&&!x.bad&&D(ft(m,x),a)==0&&D(De(m,x),u)==0)){var _=r.display.view,C=a.line>=r.display.viewFrom&&Rc(r,a)||{node:_[0].measure.map[2],offset:0},L=u.line<r.display.viewTo&&Rc(r,u);if(!L){var Y=_[_.length-1].measure,J=Y.maps?Y.maps[Y.maps.length-1]:Y.map;L={node:J[J.length-1],offset:J[J.length-2]-J[J.length-3]}}if(!C||!L){e.removeAllRanges();return}var fe=e.rangeCount&&e.getRangeAt(0),le;try{le=H(C.node,C.offset,L.offset,L.node)}catch{}le&&(!n&&r.state.focused?(e.collapse(C.node,C.offset),le.collapsed||(e.removeAllRanges(),e.addRange(le))):(e.removeAllRanges(),e.addRange(le)),fe&&e.anchorNode==null?e.addRange(fe):n&&this.startGracePeriod()),this.rememberSelection()}},Ot.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){return e.cm.curOp.selectionChanged=!0})},20)},Ot.prototype.showMultipleSelections=function(e){q(this.cm.display.cursorDiv,e.cursors),q(this.cm.display.selectionDiv,e.selection)},Ot.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},Ot.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var r=e.getRangeAt(0).commonAncestorContainer;return Z(this.div,r)},Ot.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||P()!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Ot.prototype.blur=function(){this.div.blur()},Ot.prototype.getField=function(){return this.div},Ot.prototype.supportsTouch=function(){return!0},Ot.prototype.receivedFocus=function(){var e=this,r=this;this.selectionInEditor()?setTimeout(function(){return e.pollSelection()},20):Ar(this.cm,function(){return r.cm.curOp.selectionChanged=!0});function s(){r.cm.state.focused&&(r.pollSelection(),r.polling.set(r.cm.options.pollInterval,s))}this.polling.set(this.cm.options.pollInterval,s)},Ot.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},Ot.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var e=this.getSelection(),r=this.cm;if(w&&y&&this.cm.display.gutterSpecs.length&&yx(e.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var s=Vo(r,e.anchorNode,e.anchorOffset),a=Vo(r,e.focusNode,e.focusOffset);s&&a&&Ar(r,function(){mr(r.doc,bn(s,a),qe),(s.bad||a.bad)&&(r.curOp.selectionChanged=!0)})}}},Ot.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,r=e.display,s=e.doc.sel.primary(),a=s.from(),u=s.to();if(a.ch==0&&a.line>e.firstLine()&&(a=we(a.line-1,se(e.doc,a.line-1).length)),u.ch==se(e.doc,u.line).text.length&&u.lin
` ),ae(u))}else return;x.type=="cut"&&(a.state.cutIncoming=+new Date)}}lt(u,"cut",m),lt(u,"copy",m),lt(e.scroller,"paste",function(x){if(!(ln(e,x)||wt(a,x))){if(!u.dispatchEvent){a.state.pasteIncoming=+new Date,s.focus();return}var _=new Event("paste");_.clipboardData=x.clipboardData,u.dispatchEvent(_)}}),lt(e.lineSpace,"selectstart",function(x){ln(e,x)||kt(x)}),lt(u,"compositionstart",function(){var x=a.getCursor("from");s.composing&&s.composing.range.clear(),s.composing={start:x,range:a.markText(x,a.getCursor("to"),{className:"CodeMirror-composing"})}}),lt(u,"compositionend",function(){s.composing&&(s.poll(),s.composing.range.clear(),s.composing=null)})},Wt.prototype.createField=function(e){this.wrapper=Oc(),this.textarea=this.wrapper.firstChild},Wt.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Wt.prototype.prepareSelection=function(){var e=this.cm,r=e.display,s=e.doc,a=Su(e);if(e.options.moveInputWithCursor){var u=jr(e,s.sel.primary().head,"div"),m=r.wrapper.getBoundingClientRect(),x=r.lineDiv.getBoundingClientRect();a.teTop=Math.max(0,Math.min(r.wrapper.clientHeight-10,u.top+x.top-m.top)),a.teLeft=Math.max(0,Math.min(r.wrapper.clientWidth-10,u.left+x.left-m.left))}return a},Wt.prototype.showSelection=function(e){var r=this.cm,s=r.display;q(s.cursorDiv,e.cursors),q(s.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Wt.prototype.reset=function(e){if(!(this.contextMenuPending||this.composing)){var r=this.cm;if(r.somethingSelected()){this.prevInput="";var s=r.getSelection();this.textarea.value=s,r.state.focused&&ae(this.textarea),o&&h>=9&&(this.hasSelection=s)}else e||(this.prevInput=this.textarea.value="",o&&h>=9&&(this.hasSelection=null))}},Wt.prototype.getField=function(){return this.textarea},Wt.prototype.supportsTouch=function(){return!1},Wt.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!I||P()!=this.textarea))try{this.textarea.focus()}catch{}},Wt.prototype.blur=function(){this.textarea.blur()},Wt.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Wt.prototype.receivedFocus=function(){this.slowPoll()},Wt.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},Wt.prototype.fastPoll=function(){var e=!1,r=this;r.pollingFast=!0;function s(){var a=r.poll();!a&&!e?(e=!0,r.polling.set(60,s)):(r.pollingFast=!1,r.slowPoll())}r.polling.set(20,s)},Wt.prototype.poll=function(){var e=this,r=this.cm,s=this.textarea,a=this.prevInput;if(this.contextMenuPending||!r.state.focused||oe(s)&&!a&&!this.composing||r.isReadOnly()||r.options.disableInput||r.state.keySeq)return!1;var u=s.value;if(u==a&&!r.somethingSelected())return!1;if(o&&h>=9&&this.hasSelection===u||S&&/[ \u f700- \u f7ff]/.test(u))return r.display.input.reset(),!1;if(r.doc.sel==r.display.selForContextMenu){var m=u.charCodeAt(0);if(m==8203&&!a&&(a=" \u 200B"),m==8666)return this.reset(),this.cm.execCommand("undo")}for(var x=0,_=Math.min(a.length,u.length);x<_&&a.charCodeAt(x)==u.charCodeAt(x);)++x;return Ar(r,function(){Ls(r,u.slice(x),a.length-x,null,e.composing?"*compose":null),u.length>1e3||u.indexOf( `
` )>-1?s.value=e.prevInput="":e.prevInput=u,e.composing&&(e.composing.range.clear(),e.composing.range=r.markText(e.composing.start,r.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Wt.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Wt.prototype.onKeyPress=function(){o&&h>=9&&(this.hasSelection=null),this.fastPoll()},Wt.prototype.onContextMenu=function(e){var r=this,s=r.cm,a=s.display,u=r.textarea;r.contextMenuPending&&r.contextMenuPending();var m=Dn(s,e),x=a.scroller.scrollTop;if(!m||g)return;var _=s.options.resetSelectionOnContextMenu;_&&s.doc.sel.contains(m)==-1&&rr(s,mr)(s.doc,bn(m),qe);var C=u.style.cssText,L=r.wrapper.style.cssText,Y=r.wrapper.offsetParent.getBoundingClientRect();r.wrapper.style.cssText="position: static",u.style.cssText= ` position : absolute ; width : 30 px ; height : 30 px ;
top : ` +(e.clientY-Y.top-5)+"px; left: "+(e.clientX-Y.left-5)+ ` px ;
z - index : 1000 ; background : ` +(o?"rgba(255, 255, 255, .05)":"transparent")+ ` ;
outline : none ; border - width : 0 ; outline : none ; overflow : hidden ; opacity : . 05 ; filter : alpha ( opacity = 5 ) ; ` ;var J;f&&(J=window.scrollY),a.input.focus(),f&&window.scrollTo(null,J),a.input.reset(),s.somethingSelected()||(u.value=r.prevInput=" "),r.contextMenuPending=le,a.selForContextMenu=s.doc.sel,clearTimeout(a.detectingSelectAll);function fe(){if(u.selectionStart!=null){var Ee=s.somethingSelected(),Pe=" \u 200B"+(Ee?u.value:"");u.value=" \u 21DA",u.value=Pe,r.prevInput=Ee?"":" \u 200B",u.selectionStart=1,u.selectionEnd=Pe.length,a.selForContextMenu=s.doc.sel}}function le(){if(r.contextMenuPending==le&&(r.contextMenuPending=!1,r.wrapper.style.cssText=L,u.style.cssText=C,o&&h<9&&a.scrollbars.setScrollTop(a.scroller.scrollTop=x),u.selectionStart!=null)){(!o||o&&h<9)&&fe();var Ee=0,Pe=function(){a.selForContextMenu==s.doc.sel&&u.selectionStart==0&&u.selectionEnd>0&&r.prevInput==" \u 200B"?rr(s,ec)(s):Ee++<10?a.detectingSelectAll=setTimeout(Pe,500):(a.selForContextMenu=null,a.input.reset())};a.detectingSelectAll=setTimeout(Pe,200)}}if(o&&h>=9&&fe(),ee){Ir(e);var ye=function(){pt(window,"mouseup",ye),setTimeout(le,20)};lt(window,"mouseup",ye)}else setTimeout(le,50)},Wt.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},Wt.prototype.setUneditable=function(){},Wt.prototype.needsContentAttribute=!1;function wx(e,r){if(r=r?A(r):{},r.value=e.value,!r.tabindex&&e.tabIndex&&(r.tabindex=e.tabIndex),!r.placeholder&&e.placeholder&&(r.placeholder=e.placeholder),r.autofocus==null){var s=P();r.autofocus=s==e||e.getAttribute("autofocus")!=null&&s==document.body}function a(){e.value=_.getValue()}var u;if(e.form&&(lt(e.form,"submit",a),!r.leaveSubmitMethodAlone)){var m=e.form;u=m.submit;try{var x=m.submit=function(){a(),m.submit=u,m.submit(),m.submit=x}}catch{}}r.finishInit=function(C){C.save=a,C.getTextArea=function(){return e},C.toTextArea=function(){C.toTextArea=isNaN,a(),e.parentNode.removeChild(C.getWrapperElement()),e.style.display="",e.form&&(pt(e.form,"submit",a),!r.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=u))}},e.style.display="none";var _=Nt(function(C){return e.parentNode.insertBefore(C,e.nextSibling)},r);return _}function kx(e){e.off=pt,e.on=lt,e.wheelEventPixels=Lb,e.Doc=_r,e.splitLines=ie,e.countColumn=be,e.findColumn=je,e.isWordChar=Se,e.Pass=ze,e.signal=rt,e.Line=Gn,e.changeEnd=xn,e.scrollbarModel=Du,e.Pos=we,e.cmpPos=D,e.modes=B,e.mimeModes=te,e.resolveMode=ve,e.getMode=Le,e.modeExtensions=Oe,e.extendMode=Ce,e.copyState=Ve,e.startState=mt,e.innerMode=St,e.commands=Vi,e.keyMap=cn,e.keyName=gc,e.isModifierKey=pc,e.lookupKey=oi,e.normalizeKeyMap=Zb,e.StringStream=G,e.SharedTextMarker=Wi,e.TextMarker=kn,e.LineWidget=Hi,e.e_preventDefault=kt,e.e_stopPropagation=st,e.e_stop=Ir,e.addClass=z,e.contains=Z,e.rmClass=W,e.keyNames=_n}hx(Nt),vx(Nt);var _x="iter insert remove copy getEditor constructor".split(" ");for(var Yo in _r.prototype)_r.prototype.hasOwnProperty(Yo)&&xe(_x,Yo)<0&&(Nt.prototype[Yo]=function(e){return function(){return e.apply(this.doc,arguments)}}(_r.prototype[Yo]));return Vt(_r),Nt.inputStyles={textarea:Wt,contenteditable:Ot},Nt.defineMode=function(e){!Nt.defaults.mode&&e!="null"&&(Nt.defaults.mode=e),ce.apply(this,arguments)},Nt.defineMIME=me,Nt.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Nt.defineMIME("text/plain","null"),Nt.defineExtension=function(e,r){Nt.prototype[e]=r},Nt.defineDocExtension=function(e,r){_r.prototype[e]=r},Nt.fromTextArea=wx,kx(Nt),Nt.version="5.65.1",Nt})});var Js=Me((po,Qs)=>{(function(i,t){typeof po=="object"&&typeof Qs=="object"?Qs.exports=t():typeof define=="function"&&define.amd?define([],t):typeof po=="object"?po.ClipboardJS=t():i.ClipboardJS=t()})(po,function(){return t={134:function(l,f,d){"use strict";d.d(f,{default:function(){return N}});var f=d(279),o=d.n(f),f=d(370),h=d.n(f),f=d(817),p=d.n(f);function y(O){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(j){return typeof j}:function(j){return j&&typeof Symbol=="function"&&
` )&&(W="(?: "+W+")",q=" "+q,K++),O=new RegExp("^(?:"+W+")",V)),k&&(O=new RegExp("^"+W+" $ (?! \\ s)",V)),v&&(N=S.lastIndex),j=p.call(ee?O:S,q),ee?j?(j.input=j.input.slice(K),j[0]=j[0].slice(K),j.index=S.lastIndex,S.lastIndex+=j[0].length):S.lastIndex=0:v&&j&&(S.lastIndex=S.global?j.index+j[0].length:N),k&&j&&j.length>1&&y.call(j[0],O,function(){for(U=1;U<arguments.length-2;U++)arguments[U]===void 0&&(j[U]=void 0)}),j}),c.exports=g},7066:function(c,d,o){"use strict";var h=o(9670);c.exports=function(){var f=h(this),p="";return f.global&&(p+="g"),f.ignoreCase&&(p+="i"),f.multiline&&(p+="m"),f.dotAll&&(p+="s"),f.unicode&&(p+="u"),f.sticky&&(p+="y"),p}},2999:function(c,d,o){"use strict";var h=o(7293);function f(p,y){return RegExp(p,y)}d.UNSUPPORTED_Y=h(function(){var p=f("a","y");return p.lastIndex=2,p.exec("abcd")!=null}),d.BROKEN_CARET=h(function(){var p=f("^r","gy");return p.lastIndex=2,p.exec("str")!=null})},4488:function(c){c.exports=function(d){if(d==null)throw TypeError("Can't call method on "+d);return d}},3505:function(c,d,o){var h=o(7854),f=o(8880);c.exports=function(p,y){try{f(h,p,y)}catch{h[p]=y}return y}},6340:function(c,d,o){"use strict";var h=o(5005),f=o(3070),p=o(5112),y=o(9781),g=p("species");c.exports=function(v){var b=h(v),k=f.f;y&&b&&!b[g]&&k(b,g,{configurable:!0,get:function(){return this}})}},8003:function(c,d,o){var h=o(3070).f,f=o(6656),p=o(5112),y=p("toStringTag");c.exports=function(g,v,b){g&&!f(g=b?g:g.prototype,y)&&h(g,y,{configurable:!0,value:v})}},6200:function(c,d,o){var h=o(2309),f=o(9711),p=h("keys");c.exports=function(y){return p[y]||(p[y]=f(y))}},5465:function(c,d,o){var h=o(7854),f=o(3505),p="__core-js_shared__",y=h[p]||f(p,{});c.exports=y},2309:function(c,d,o){var h=o(1913),f=o(5465);(c.exports=function(p,y){return f[p]||(f[p]=y!==void 0?y:{})})("versions",[]).push({version:"3.9.0",mode:h?"pure":"global",copyright:" \x A9 2021 Denis Pushkarev (zloirock.ru)"})},6707:function(c,d,o){var h=o(9670),f=o(3099),p=o(5112),y=p("species");c.exports=function(g,v){var b=h(g).constructor,k;return b===void 0||(k=h(b)[y])==null?v:f(k)}},8710:function(c,d,o){var h=o(9958),f=o(4488),p=function(y){return function(g,v){var b=String(f(g)),k=h(v),E=b.length,w,I;return k<0||k>=E?y?"":void 0:(w=b.charCodeAt(k),w<55296||w>56319||k+1===E||(I=b.charCodeAt(k+1))<56320||I>57343?y?b.charAt(k):w:y?b.slice(k,k+2):(w-55296<<10)+(I-56320)+65536)}};c.exports={codeAt:p(!1),charAt:p(!0)}},3197:function(c){"use strict";var d=2147483647,o=36,h=1,f=26,p=38,y=700,g=72,v=128,b="-",k=/[^ \0 - \u 007E]/,E=/[. \u 3002 \u FF0E \u FF61]/g,w="Overflow: input needs wider integers to process",I=o-h,S=Math.floor,N=String.fromCharCode,O=function(V){for(var W=[],K=0,q=V.length;K<q;){var R=V.charCodeAt(K++);if(R>=55296&&R<=56319&&K<q){var T=V.charCodeAt(K++);(T&64512)==56320?W.push(((R&1023)<<10)+(T&1023)+65536):(W.push(R),K--)}else W.push(R)}return W},j=function(V){return V+22+75*(V<26)},U=function(V,W,K){var q=0;for(V=K?S(V/y):V>>1,V+=S(V/W);V>I*f>>1;q+=o)V=S(V/I);return S(q+(I+1)*V/(V+p))},ee=function(V){var W=[];V=O(V);var K=V.length,q=v,R=0,T=g,H,Z;for(H=0;H<V.length;H++)Z=V[H],Z<128&&W.push(N(Z));var P=W.length,z=P;for(P&&W.push(b);z<K;){var ne=d;for(H=0;H<V.length;H++)Z=V[H],Z>=q&&Z<ne&&(ne=Z);var ae=z+1;if(ne-q>S((d-R)/ae))throw RangeError(w);for(R+=(ne-q)*ae,q=ne,H=0;H<V.length;H++){if(Z=V[H],Z<q&&++R>d)throw RangeError(w);if(Z==q){for(var F=R,A=o;;A+=o){var be=A<=T?h:A>=T+f?f:A-T;if(F<be)break;var Fe=F-be,xe=o-be;W.push(N(j(be+Fe%xe))),F=S(Fe/xe)}W.push(N(j(F))),T=U(R,ae,z==P),R=0,++z}}++R,++q}return W.join("")};c.exports=function(V){var W=[],K=V.toLowerCase().replace(E,".").split("."),q,R;for(q=0;q<K.length;q++)R=K[q],W.push(k.test(R)?"xn--"+ee(R):R);return W.join(".")}},6091:function(c,d,o){var h=o(7293),f=o(1361),p=" \u 200B \x 85 \u 180E";c.exports=function(y){return h(function(){return!!f[y]()||p[y]()!=p||f[y].name!==y})}},3111:function(c,d,o){var h=o(4488),f=o(1361),p="["+f+"]",y=RegExp("^"+p+p+"*"),g=RegExp(p+p+"* $ "),v=function(b){return function(k){var E=String(h(k));return b&1&&(E=E.replace(y,"")),b&2&&(E=E.replace(g,"")),E}};c.exports={start:v
\ v \ f \ r \ xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF ` },8264:function(c,d,o){"use strict";var h=o(2109),f=o(7854),p=o(3331),y=o(6340),g="ArrayBuffer",v=p[g],b=f[g];h({global:!0,forced:b!==v},{ArrayBuffer:v}),y(g)},2222:function(c,d,o){"use strict";var h=o(2109),f=o(7293),p=o(3157),y=o(111),g=o(7908),v=o(7466),b=o(6135),k=o(5417),E=o(1194),w=o(5112),I=o(7392),S=w("isConcatSpreadable"),N=9007199254740991,O="Maximum allowed index exceeded",j=I>=51||!f(function(){var W=[];return W[S]=!1,W.concat()[0]!==W}),U=E("concat"),ee=function(W){if(!y(W))return!1;var K=W[S];return K!==void 0?!!K:p(W)},V=!j||!U;h({target:"Array",proto:!0,forced:V},{concat:function(K){var q=g(this),R=k(q,0),T=0,H,Z,P,z,ne;for(H=-1,P=arguments.length;H<P;H++)if(ne=H===-1?q:arguments[H],ee(ne)){if(z=v(ne.length),T+z>N)throw TypeError(O);for(Z=0;Z<z;Z++,T++)Z in ne&&b(R,T,ne[Z])}else{if(T>=N)throw TypeError(O);b(R,T++,ne)}return R.length=T,R}})},7327:function(c,d,o){"use strict";var h=o(2109),f=o(2092).filter,p=o(1194),y=p("filter");h({target:"Array",proto:!0,forced:!y},{filter:function(v){return f(this,v,arguments.length>1?arguments[1]:void 0)}})},2772:function(c,d,o){"use strict";var h=o(2109),f=o(1318).indexOf,p=o(9341),y=[].indexOf,g=!!y&&1/[1].indexOf(1,-0)<0,v=p("indexOf");h({target:"Array",proto:!0,forced:g||!v},{indexOf:function(k){return g?y.apply(this,arguments)||0:f(this,k,arguments.length>1?arguments[1]:void 0)}})},6992:function(c,d,o){"use strict";var h=o(5656),f=o(1223),p=o(7497),y=o(9909),g=o(654),v="Array Iterator",b=y.set,k=y.getterFor(v);c.exports=g(Array,"Array",function(E,w){b(this,{type:v,target:h(E),index:0,kind:w})},function(){var E=k(this),w=E.target,I=E.kind,S=E.index++;return!w||S>=w.length?(E.target=void 0,{value:void 0,done:!0}):I=="keys"?{value:S,done:!1}:I=="values"?{value:w[S],done:!1}:{value:[S,w[S]],done:!1}},"values"),p.Arguments=p.Array,f("keys"),f("values"),f("entries")},1249:function(c,d,o){"use strict";var h=o(2109),f=o(2092).map,p=o(1194),y=p("map");h({target:"Array",proto:!0,forced:!y},{map:function(v){return f(this,v,arguments.length>1?arguments[1]:void 0)}})},7042:function(c,d,o){"use strict";var h=o(2109),f=o(111),p=o(3157),y=o(1400),g=o(7466),v=o(5656),b=o(6135),k=o(5112),E=o(1194),w=E("slice"),I=k("species"),S=[].slice,N=Math.max;h({target:"Array",proto:!0,forced:!w},{slice:function(j,U){var ee=v(this),V=g(ee.length),W=y(j,V),K=y(U===void 0?V:U,V),q,R,T;if(p(ee)&&(q=ee.constructor,typeof q=="function"&&(q===Array||p(q.prototype))?q=void 0:f(q)&&(q=q[I],q===null&&(q=void 0)),q===Array||q===void 0))return S.call(ee,W,K);for(R=new(q===void 0?Array:q)(N(K-W,0)),T=0;W<K;W++,T++)W in ee&&b(R,T,ee[W]);return R.length=T,R}})},561:function(c,d,o){"use strict";var h=o(2109),f=o(1400),p=o(9958),y=o(7466),g=o(7908),v=o(5417),b=o(6135),k=o(1194),E=k("splice"),w=Math.max,I=Math.min,S=9007199254740991,N="Maximum allowed length exceeded";h({target:"Array",proto:!0,forced:!E},{splice:function(j,U){var ee=g(this),V=y(ee.length),W=f(j,V),K=arguments.length,q,R,T,H,Z,P;if(K===0?q=R=0:K===1?(q=0,R=V-W):(q=K-2,R=I(w(p(U),0),V-W)),V+q-R>S)throw TypeError(N);for(T=v(ee,R),H=0;H<R;H++)Z=W+H,Z in ee&&b(T,H,ee[Z]);if(T.length=R,q<R){for(H=W;H<V-R;H++)Z=H+R,P=H+q,Z in ee?ee[P]=ee[Z]:delete ee[P];for(H=V;H>V-R+q;H--)delete ee[H-1]}else if(q>R)for(H=V-R;H>W;H--)Z=H+R-1,P=H+q-1,Z in ee?ee[P]=ee[Z]:delete ee[P];for(H=0;H<q;H++)ee[H+W]=arguments[H+2];return ee.length=V-R+q,T}})},8309:function(c,d,o){var h=o(9781),f=o(3070).f,p=Function.prototype,y=p.toString,g=/^ \s *function ([^ (]*)/,v="name";h&&!(v in p)&&f(p,v,{configurable:!0,get:function(){try{return y.call(this).match(g)[1]}catch{return""}}})},489:function(c,d,o){var h=o(2109),f=o(7293),p=o(7908),y=o(9518),g=o(8544),v=f(function(){y(1)});h({target:"Object",stat:!0,forced:v,sham:!g},{getPrototypeOf:function(k){return y(p(k))}})},1539:function(c,d,o){var h=o(1694),f=o(1320),p=o(288);h||f(Object.prototype,"toString",p,{unsafe:!0})},4916:function(c,d,o){"use strict";var h=o(2109),f=o(2261);h({target:"RegExp",proto:!0,forced:/./.
In order to be iterable , non - array objects must have a [ Symbol . iterator ] ( ) method . ` )}var B=!0,te=!1,ce;return{s:function(){Q=ie[Symbol.iterator]()},n:function(){var ve=Q.next();return B=ve.done,ve},e:function(ve){te=!0,ce=ve},f:function(){try{!B&&Q.return!=null&&Q.return()}finally{if(te)throw ce}}}}function Ie(ie,oe){if(!!ie){if(typeof ie=="string")return Be(ie,oe);var Q=Object.prototype.toString.call(ie).slice(8,-1);if(Q==="Object"&&ie.constructor&&(Q=ie.constructor.name),Q==="Map"||Q==="Set")return Array.from(ie);if(Q==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array $ /.test(Q))return Be(ie,oe)}}function Be(ie,oe){(oe==null||oe>ie.length)&&(oe=ie.length);for(var Q=0,re=new Array(oe);Q<oe;Q++)re[Q]=ie[Q];return re}function Ke(ie,oe){if(!(ie instanceof oe))throw new TypeError("Cannot call a class as a function")}function He(ie,oe){for(var Q=0;Q<oe.length;Q++){var re=oe[Q];re.enumerable=re.enumerable||!1,re.configurable=!0,"value"in re&&(re.writable=!0),Object.defineProperty(ie,re.key,re)}}function Je(ie,oe,Q){return oe&&He(ie.prototype,oe),Q&&He(ie,Q),ie}var Se=function(){function ie(){Ke(this,ie)}return Je(ie,[{key:"on",value:function(Q,re){return this._callbacks=this._callbacks||{},this._callbacks[Q]||(this._callbacks[Q]=[]),this._callbacks[Q].push(re),this}},{key:"emit",value:function(Q){this._callbacks=this._callbacks||{};for(var re=this._callbacks[Q],M=arguments.length,B=new Array(M>1?M-1:0),te=1;te<M;te++)B[te-1]=arguments[te];if(re){var ce=Re(re,!0),me;try{for(ce.s();!(me=ce.n()).done;){var ve=me.value;ve.apply(this,B)}}catch(Le){ce.e(Le)}finally{ce.f()}}return this.element&&this.element.dispatchEvent(this.makeEvent("dropzone:"+Q,{args:B})),this}},{key:"makeEvent",value:function(Q,re){var M={bubbles:!0,cancelable:!0,detail:re};if(typeof window.CustomEvent=="function")return new CustomEvent(Q,M);var B=document.createEvent("CustomEvent");return B.initCustomEvent(Q,M.bubbles,M.cancelable,M.detail),B}},{key:"off",value:function(Q,re){if(!this._callbacks||arguments.length===0)return this._callbacks={},this;var M=this._callbacks[Q];if(!M)return this;if(arguments.length===1)return delete this._callbacks[Q],this;for(var B=0;B<M.length;B++){var te=M[B];if(te===re){M.splice(B,1);break}}return this}}]),ie}(),X='<div class="dz-preview dz-file-preview"> <div class="dz-image"><img data-dz-thumbnail/></div> <div class="dz-details"> <div class="dz-size"><span data-dz-size></span></div> <div class="dz-filename"><span data-dz-name></span></div> </div> <div class="dz-progress"> <span class="dz-upload" data-dz-uploadprogress></span> </div> <div class="dz-error-message"><span data-dz-errormessage></span></div> <div class="dz-success-mark"> <svg width="54px" height="54px" viewBox="0 0 54 54" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <title>Check</title> <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> <path d="M23.5,31.8431458 L17.5852419,25.9283877 C16.0248253,24.3679711 13.4910294,24.366835 11.9289322,25.9289322 C10.3700136,27.4878508 10.3665912,30.0234455 11.9283877,31.5852419 L20.4147581,40.0716123 C20.5133999,40.1702541 20.6159315,40.2626649 20.7218615,40.3488435 C22.2835669,41.8725651 24.794234,41.8626202 26.3461564,40.3106978 L43.3106978,23.3461564 C44.8771021,21.7797521 44.8758057,19.2483887 43.3137085,17.6862915 C41.7547899,16.1273729 39.2176035,16.1255422 37.6538436,17.6893022 L23.5,31.8431458 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z" stroke-opacity="0.198794158" stroke="#747474" fill-opacity="0.816519475" fill="#FFFFFF"></path> </g> </svg> </div> <div class="dz-error-mark"> <svg width="54px" height="54px" viewBox="0 0 54 54" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <title>Error</title> <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> <g stroke="#747474" stroke-opacity="0.198794158" fill="#FFFFFF" fill-opacity="0.816519475"> <path d="M32.6568542,29 L38.3106978,23.3461564 C39.877102
In order to be iterable , non - array objects must have a [ Symbol . iterator ] ( ) method . ` )}var B=!0,te=!1,ce;return{s:function(){Q=ie[Symbol.iterator]()},n:function(){var ve=Q.next();return B=ve.done,ve},e:function(ve){te=!0,ce=ve},f:function(){try{!B&&Q.return!=null&&Q.return()}finally{if(te)throw ce}}}}function it(ie,oe){if(!!ie){if(typeof ie=="string")return Ne(ie,oe);var Q=Object.prototype.toString.call(ie).slice(8,-1);if(Q==="Object"&&ie.constructor&&(Q=ie.constructor.name),Q==="Map"||Q==="Set")return Array.from(ie);if(Q==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array $ /.test(Q))return Ne(ie,oe)}}function Ne(ie,oe){(oe==null||oe>ie.length)&&(oe=ie.length);for(var Q=0,re=new Array(oe);Q<oe;Q++)re[Q]=ie[Q];return re}var ot={url:null,method:"post",withCredentials:!1,timeout:null,parallelUploads:2,uploadMultiple:!1,chunking:!1,forceChunking:!1,chunkSize:2e6,parallelChunkUploads:!1,retryChunks:!1,retryChunksLimit:3,maxFilesize:256,paramName:"file",createImageThumbnails:!0,maxThumbnailFilesize:10,thumbnailWidth:120,thumbnailHeight:120,thumbnailMethod:"crop",resizeWidth:null,resizeHeight:null,resizeMimeType:null,resizeQuality:.8,resizeMethod:"contain",filesizeBase:1e3,maxFiles:null,headers:null,clickable:!0,ignoreHiddenFiles:!0,acceptedFiles:null,acceptedMimeTypes:null,autoProcessQueue:!0,autoQueue:!0,addRemoveLinks:!1,previewsContainer:null,disablePreviews:!1,hiddenInputContainer:"body",capture:null,renameFilename:null,renameFile:null,forceFallback:!1,dictDefaultMessage:"Drop files here to upload",dictFallbackMessage:"Your browser does not support drag'n'drop file uploads.",dictFallbackText:"Please use the fallback form below to upload your files like in the olden days.",dictFileTooBig:"File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.",dictInvalidFileType:"You can't upload files of this type.",dictResponseError:"Server responded with {{statusCode}} code.",dictCancelUpload:"Cancel upload",dictUploadCanceled:"Upload canceled.",dictCancelUploadConfirmation:"Are you sure you want to cancel this upload?",dictRemoveFile:"Remove file",dictRemoveFileConfirmation:null,dictMaxFilesExceeded:"You can not upload any more files.",dictFileSizeUnits:{tb:"TB",gb:"GB",mb:"MB",kb:"KB",b:"b"},init:function(){},params:function(oe,Q,re){if(re)return{dzuuid:re.file.upload.uuid,dzchunkindex:re.index,dztotalfilesize:re.file.size,dzchunksize:this.options.chunkSize,dztotalchunkcount:re.file.upload.totalChunkCount,dzchunkbyteoffset:re.index*this.options.chunkSize}},accept:function(oe,Q){return Q()},chunksUploaded:function(oe,Q){Q()},fallback:function(){var oe;this.element.className="".concat(this.element.className," dz-browser-not-supported");var Q=ue(this.element.getElementsByTagName("div"),!0),re;try{for(Q.s();!(re=Q.n()).done;){var M=re.value;if(/(^| )dz-message( $ | )/.test(M.className)){oe=M,M.className="dz-message";break}}}catch(te){Q.e(te)}finally{Q.f()}oe||(oe=st.createElement('<div class="dz-message"><span></span></div>'),this.element.appendChild(oe));var B=oe.getElementsByTagName("span")[0];return B&&(B.textContent!=null?B.textContent=this.options.dictFallbackMessage:B.innerText!=null&&(B.innerText=this.options.dictFallbackMessage)),this.element.appendChild(this.getFallbackForm())},resize:function(oe,Q,re,M){var B={srcX:0,srcY:0,srcWidth:oe.width,srcHeight:oe.height},te=oe.width/oe.height;Q==null&&re==null?(Q=B.srcWidth,re=B.srcHeight):Q==null?Q=re*te:re==null&&(re=Q/te),Q=Math.min(Q,B.srcWidth),re=Math.min(re,B.srcHeight);var ce=Q/re;if(B.srcWidth>Q||B.srcHeight>re)if(M==="crop")te>ce?(B.srcHeight=oe.height,B.srcWidth=B.srcHeight*ce):(B.srcWidth=oe.width,B.srcHeight=B.srcWidth/ce);else if(M==="contain")te>ce?re=Q/te:Q=re*te;else throw new Error("Unknown resizeMethod '".concat(M,"'"));return B.srcX=(oe.width-B.srcWidth)/2,B.srcY=(oe.height-B.srcHeight)/2,B.trgWidth=Q,B.trgHeight=re,B},transformFile:function(oe,Q){return(this.options.resizeWidth||this.options.resizeHeight)&&oe.type.match(/image.*/)?this.resizeImage(oe,this.options.resizeWidth,this.options.resizeHeight,this.options.resizeMethod,Q):Q(oe)},previewTemplate:d
In order to be iterable , non - array objects must have a [ Symbol . iterator ] ( ) method . ` )}var B=!0,te=!1,ce;return{s:function(){Q=ie[Symbol.iterator]()},n:function(){var ve=Q.next();return B=ve.done,ve},e:function(ve){te=!0,ce=ve},f:function(){try{!B&&Q.return!=null&&Q.return()}finally{if(te)throw ce}}}}function $ t(ie,oe){if(!!ie){if(typeof ie=="string")return Lt(ie,oe);var Q=Object.prototype.toString.call(ie).slice(8,-1);if(Q==="Object"&&ie.constructor&&(Q=ie.constructor.name),Q==="Map"||Q==="Set")return Array.from(ie);if(Q==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array $ /.test(Q))return Lt(ie,oe)}}function Lt(ie,oe){(oe==null||oe>ie.length)&&(oe=ie.length);for(var Q=0,re=new Array(oe);Q<oe;Q++)re[Q]=ie[Q];return re}function fr(ie,oe){if(!(ie instanceof oe))throw new TypeError("Cannot call a class as a function")}function lt(ie,oe){for(var Q=0;Q<oe.length;Q++){var re=oe[Q];re.enumerable=re.enumerable||!1,re.configurable=!0,"value"in re&&(re.writable=!0),Object.defineProperty(ie,re.key,re)}}function Mt(ie,oe,Q){return oe&<(ie.prototype,oe),Q&<(ie,Q),ie}function pt(ie,oe){if(typeof oe!="function"&&oe!==null)throw new TypeError("Super expression must either be null or a function");ie.prototype=Object.create(oe&&oe.prototype,{constructor:{value:ie,writable:!0,configurable:!0}}),oe&&rt(ie,oe)}function rt(ie,oe){return rt=Object.setPrototypeOf||function(re,M){return re.__proto__=M,re},rt(ie,oe)}function wt(ie){var oe=Vt();return function(){var re=kt(ie),M;if(oe){var B=kt(this).constructor;M=Reflect.construct(re,arguments,B)}else M=re.apply(this,arguments);return dr(this,M)}}function dr(ie,oe){return oe&&(et(oe)==="object"||typeof oe=="function")?oe:Et(ie)}function Et(ie){if(ie===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ie}function Vt(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function kt(ie){return kt=Object.setPrototypeOf?Object.getPrototypeOf:function(Q){return Q.__proto__||Object.getPrototypeOf(Q)},kt(ie)}var st=function(ie){pt(Q,ie);var oe=wt(Q);function Q(re,M){var B;fr(this,Q),B=oe.call(this);var te,ce;if(B.element=re,B.version=Q.version,B.clickableElements=[],B.listeners=[],B.files=[],typeof B.element=="string"&&(B.element=document.querySelector(B.element)),!B.element||B.element.nodeType==null)throw new Error("Invalid dropzone element.");if(B.element.dropzone)throw new Error("Dropzone already attached.");Q.instances.push(Et(B)),B.element.dropzone=Et(B);var me=(ce=Q.optionsForElement(B.element))!=null?ce:{};if(B.options=Q.extend({},Xe,me,M!=null?M:{}),B.options.previewTemplate=B.options.previewTemplate.replace(/ \n */g,""),B.options.forceFallback||!Q.isBrowserSupported())return dr(B,B.options.fallback.call(Et(B)));if(B.options.url==null&&(B.options.url=B.element.getAttribute("action")),!B.options.url)throw new Error("No URL provided.");if(B.options.acceptedFiles&&B.options.acceptedMimeTypes)throw new Error("You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated.");if(B.options.uploadMultiple&&B.options.chunking)throw new Error("You cannot set both: uploadMultiple and chunking.");return B.options.acceptedMimeTypes&&(B.options.acceptedFiles=B.options.acceptedMimeTypes,delete B.options.acceptedMimeTypes),B.options.renameFilename!=null&&(B.options.renameFile=function(ve){return B.options.renameFilename.call(Et(B),ve.name,ve)}),typeof B.options.method=="string"&&(B.options.method=B.options.method.toUpperCase()),(te=B.getExistingFallback())&&te.parentNode&&te.parentNode.removeChild(te),B.options.previewsContainer!==!1&&(B.options.previewsContainer?B.previewsContainer=Q.getElement(B.options.previewsContainer,"previewsContainer"):B.previewsContainer=B.element),B.options.clickable&&(B.options.clickable===!0?B.clickableElements=[B.element]:B.clickableElements=Q.getElements(B.options.clickable,"clickable")),B.init(),B}return Mt(Q,[{key:"getAccepted
2020-09-20 17:33:18 +08:00
Valid base64 characters are A - Z , a - z , 0 - 9 , '+' , '/' , and '='
2022-02-06 23:49:23 +08:00
Expect errors in decoding . ` ),Q=Q.replace(/[^A-Za-z0-9 \+ \/ \= ]/g,"");ce=this.KEY_STR.indexOf(Q.charAt(Oe++)),me=this.KEY_STR.indexOf(Q.charAt(Oe++)),ve=this.KEY_STR.indexOf(Q.charAt(Oe++)),Le=this.KEY_STR.indexOf(Q.charAt(Oe++)),M=ce<<2|me>>4,B=(me&15)<<4|ve>>2,te=(ve&3)<<6|Le,Ce.push(M),ve!==64&&Ce.push(B),Le!==64&&Ce.push(te),M=B=te="",ce=me=ve=Le="",Oe<Q.length;);return Ce}}]),ie}(); $ r.initClass();var zt=function(oe,Q){var re=!1,M=!0,B=oe.document,te=B.documentElement,ce=B.addEventListener?"addEventListener":"attachEvent",me=B.addEventListener?"removeEventListener":"detachEvent",ve=B.addEventListener?"":"on",Le=function Ce(Ve){if(!(Ve.type==="readystatechange"&&B.readyState!=="complete")&&((Ve.type==="load"?oe:B)[me](ve+Ve.type,Ce,!1),!re&&(re=!0)))return Q.call(oe,Ve.type||Ve)},Oe=function Ce(){try{te.doScroll("left")}catch{setTimeout(Ce,50);return}return Le("poll")};if(B.readyState!=="complete"){if(B.createEventObject&&te.doScroll){try{M=!oe.frameElement}catch{}M&&Oe()}return B[ce](ve+"DOMContentLoaded",Le,!1),B[ce](ve+"readystatechange",Le,!1),oe[ce](ve+"load",Le,!1)}};st._autoDiscoverFunction=function(){if(st.autoDiscover)return st.discover()},zt(window,st._autoDiscoverFunction);function yr(ie,oe){return typeof ie!="undefined"&&ie!==null?oe(ie):void 0}function ur(ie,oe,Q){if(typeof ie!="undefined"&&ie!==null&&typeof ie[oe]=="function")return Q(ie,oe)}window.Dropzone=st;var Qt=st}(),l}()})});var up=Me((jS,S0)=>{S0.exports={Aacute:" \x C1",aacute:" \x E1",Abreve:" \u 0102",abreve:" \u 0103",ac:" \u 223E",acd:" \u 223F",acE:" \u 223E \u 0333",Acirc:" \x C2",acirc:" \x E2",acute:" \x B4",Acy:" \u 0410",acy:" \u 0430",AElig:" \x C6",aelig:" \x E6",af:" \u 2061",Afr:" \u {1D504}",afr:" \u {1D51E}",Agrave:" \x C0",agrave:" \x E0",alefsym:" \u 2135",aleph:" \u 2135",Alpha:" \u 0391",alpha:" \u 03B1",Amacr:" \u 0100",amacr:" \u 0101",amalg:" \u 2A3F",amp:"&",AMP:"&",andand:" \u 2A55",And:" \u 2A53",and:" \u 2227",andd:" \u 2A5C",andslope:" \u 2A58",andv:" \u 2A5A",ang:" \u 2220",ange:" \u 29A4",angle:" \u 2220",angmsdaa:" \u 29A8",angmsdab:" \u 29A9",angmsdac:" \u 29AA",angmsdad:" \u 29AB",angmsdae:" \u 29AC",angmsdaf:" \u 29AD",angmsdag:" \u 29AE",angmsdah:" \u 29AF",angmsd:" \u 2221",angrt:" \u 221F",angrtvb:" \u 22BE",angrtvbd:" \u 299D",angsph:" \u 2222",angst:" \x C5",angzarr:" \u 237C",Aogon:" \u 0104",aogon:" \u 0105",Aopf:" \u {1D538}",aopf:" \u {1D552}",apacir:" \u 2A6F",ap:" \u 2248",apE:" \u 2A70",ape:" \u 224A",apid:" \u 224B",apos:"'",ApplyFunction:" \u 2061",approx:" \u 2248",approxeq:" \u 224A",Aring:" \x C5",aring:" \x E5",Ascr:" \u {1D49C}",ascr:" \u {1D4B6}",Assign:" \u 2254",ast:"*",asymp:" \u 2248",asympeq:" \u 224D",Atilde:" \x C3",atilde:" \x E3",Auml:" \x C4",auml:" \x E4",awconint:" \u 2233",awint:" \u 2A11",backcong:" \u 224C",backepsilon:" \u 03F6",backprime:" \u 2035",backsim:" \u 223D",backsimeq:" \u 22CD",Backslash:" \u 2216",Barv:" \u 2AE7",barvee:" \u 22BD",barwed:" \u 2305",Barwed:" \u 2306",barwedge:" \u 2305",bbrk:" \u 23B5",bbrktbrk:" \u 23B6",bcong:" \u 224C",Bcy:" \u 0411",bcy:" \u 0431",bdquo:" \u 201E",becaus:" \u 2235",because:" \u 2235",Because:" \u 2235",bemptyv:" \u 29B0",bepsi:" \u 03F6",bernou:" \u 212C",Bernoullis:" \u 212C",Beta:" \u 0392",beta:" \u 03B2",beth:" \u 2136",between:" \u 226C",Bfr:" \u {1D505}",bfr:" \u {1D51F}",bigcap:" \u 22C2",bigcirc:" \u 25EF",bigcup:" \u 22C3",bigodot:" \u 2A00",bigoplus:" \u 2A01",bigotimes:" \u 2A02",bigsqcup:" \u 2A06",bigstar:" \u 2605",bigtriangledown:" \u 25BD",bigtriangleup:" \u 25B3",biguplus:" \u 2A04",bigvee:" \u 22C1",bigwedge:" \u 22C0",bkarow:" \u 290D",blacklozenge:" \u 29EB",blacksquare:" \u 25AA",blacktriangle:" \u 25B4",blacktriangledown:" \u 25BE",blacktriangleleft:" \u 25C2",blacktriangleright:" \u 25B8",blank:" \u 2423",blk12:" \u 2592",blk14:" \u 2591",blk34:" \u 2593",block:" \u 2588",bne:"= \u 20E5",bnequiv:" \u 2261 \u 20E5",bNot:" \u 2AED",bnot:" \u 2310",Bopf:" \u {1D539}",bopf:" \u {1D553}",bot:" \u 22A5",bottom:" \u 22A5",bowtie:" \u 22C8",boxbox:" \u 29C9",boxdl:" \u 2510",boxdL:" \u 2555",boxDl:" \u 2556",boxDL:" \u 2557",boxdr:" \u 250C",boxdR:" \u 2552",boxDr:" \u 2553",boxDR:" \u 2554",boxh:" \u 2500",boxH:" \u 2550",boxhd:" \u 252C",boxHd:" \u 2564",boxhD:" \u 2565",boxHD:" \u 2566",boxhu:" \u 2534",boxHu:" \u 2567",boxhU:" \u 2568",boxHU:" \u 2569",boxminus:" \u 229F",boxplus:" \u 229E",boxtimes:" \u 22A0",boxul:" \u 2518",boxuL:
` ,nexist:" \u 2204",nexists:" \u 2204",Nfr:" \u {1D511}",nfr:" \u {1D52B}",ngE:" \u 2267 \u 0338",nge:" \u 2271",ngeq:" \u 2271",ngeqq:" \u 2267 \u 0338",ngeqslant:" \u 2A7E \u 0338",nges:" \u 2A7E \u 0338",nGg:" \u 22D9 \u 0338",ngsim:" \u 2275",nGt:" \u 226B \u 20D2",ngt:" \u 226F",ngtr:" \u 226F",nGtv:" \u 226B \u 0338",nharr:" \u 21AE",nhArr:" \u 21CE",nhpar:" \u 2AF2",ni:" \u 220B",nis:" \u 22FC",nisd:" \u 22FA",niv:" \u 220B",NJcy:" \u 040A",njcy:" \u 045A",nlarr:" \u 219A",nlArr:" \u 21CD",nldr:" \u 2025",nlE:" \u 2266 \u 0338",nle:" \u 2270",nleftarrow:" \u 219A",nLeftarrow:" \u 21CD",nleftrightarrow:" \u 21AE",nLeftrightarrow:" \u 21CE",nleq:" \u 2270",nleqq:" \u 2266 \u 0338",nleqslant:" \u 2A7D \u 0338",nles:" \u 2A7D \u 0338",nless:" \u 226E",nLl:" \u 22D8 \u 0338",nlsim:" \u 2274",nLt:" \u 226A \u 20D2",nlt:" \u 226E",nltri:" \u 22EA",nltrie:" \u 22EC",nLtv:" \u 226A \u 0338",nmid:" \u 2224",NoBreak:" \u 2060",NonBreakingSpace:" \x A0",nopf:" \u {1D55F}",Nopf:" \u 2115",Not:" \u 2AEC",not:" \x AC",NotCongruent:" \u 2262",NotCupCap:" \u 226D",NotDoubleVerticalBar:" \u 2226",NotElement:" \u 2209",NotEqual:" \u 2260",NotEqualTilde:" \u 2242 \u 0338",NotExists:" \u 2204",NotGreater:" \u 226F",NotGreaterEqual:" \u 2271",NotGreaterFullEqual:" \u 2267 \u 0338",NotGreaterGreater:" \u 226B \u 0338",NotGreaterLess:" \u 2279",NotGreaterSlantEqual:" \u 2A7E \u 0338",NotGreaterTilde:" \u 2275",NotHumpDownHump:" \u 224E \u 0338",NotHumpEqual:" \u 224F \u 0338",notin:" \u 2209",notindot:" \u 22F5 \u 0338",notinE:" \u 22F9 \u 0338",notinva:" \u 2209",notinvb:" \u 22F7",notinvc:" \u 22F6",NotLeftTriangleBar:" \u 29CF \u 0338",NotLeftTriangle:" \u 22EA",NotLeftTriangleEqual:" \u 22EC",NotLess:" \u 226E",NotLessEqual:" \u 2270",NotLessGreater:" \u 2278",NotLessLess:" \u 226A \u 0338",NotLessSlantEqual:" \u 2A7D \u 0338",NotLessTilde:" \u 2274",NotNestedGreaterGreater:" \u 2AA2 \u 0338",NotNestedLessLess:" \u 2AA1 \u 0338",notni:" \u 220C",notniva:" \u 220C",notnivb:" \u 22FE",notnivc:" \u 22FD",NotPrecedes:" \u 2280",NotPrecedesEqual:" \u 2AAF \u 0338",NotPrecedesSlantEqual:" \u 22E0",NotReverseElement:" \u 220C",NotRightTriangleBar:" \u 29D0 \u 0338",NotRightTriangle:" \u 22EB",NotRightTriangleEqual:" \u 22ED",NotSquareSubset:" \u 228F \u 0338",NotSquareSubsetEqual:" \u 22E2",NotSquareSuperset:" \u 2290 \u 0338",NotSquareSupersetEqual:" \u 22E3",NotSubset:" \u 2282 \u 20D2",NotSubsetEqual:" \u 2288",NotSucceeds:" \u 2281",NotSucceedsEqual:" \u 2AB0 \u 0338",NotSucceedsSlantEqual:" \u 22E1",NotSucceedsTilde:" \u 227F \u 0338",NotSuperset:" \u 2283 \u 20D2",NotSupersetEqual:" \u 2289",NotTilde:" \u 2241",NotTildeEqual:" \u 2244",NotTildeFullEqual:" \u 2247",NotTildeTilde:" \u 2249",NotVerticalBar:" \u 2224",nparallel:" \u 2226",npar:" \u 2226",nparsl:" \u 2AFD \u 20E5",npart:" \u 2202 \u 0338",npolint:" \u 2A14",npr:" \u 2280",nprcue:" \u 22E0",nprec:" \u 2280",npreceq:" \u 2AAF \u 0338",npre:" \u 2AAF \u 0338",nrarrc:" \u 2933 \u 0338",nrarr:" \u 219B",nrArr:" \u 21CF",nrarrw:" \u 219D \u 0338",nrightarrow:" \u 219B",nRightarrow:" \u 21CF",nrtri:" \u 22EB",nrtrie:" \u 22ED",nsc:" \u 2281",nsccue:" \u 22E1",nsce:" \u 2AB0 \u 0338",Nscr:" \u {1D4A9}",nscr:" \u {1D4C3}",nshortmid:" \u 2224",nshortparallel:" \u 2226",nsim:" \u 2241",nsime:" \u 2244",nsimeq:" \u 2244",nsmid:" \u 2224",nspar:" \u 2226",nsqsube:" \u 22E2",nsqsupe:" \u 22E3",nsub:" \u 2284",nsubE:" \u 2AC5 \u 0338",nsube:" \u 2288",nsubset:" \u 2282 \u 20D2",nsubseteq:" \u 2288",nsubseteqq:" \u 2AC5 \u 0338",nsucc:" \u 2281",nsucceq:" \u 2AB0 \u 0338",nsup:" \u 2285",nsupE:" \u 2AC6 \u 0338",nsupe:" \u 2289",nsupset:" \u 2283 \u 20D2",nsupseteq:" \u 2289",nsupseteqq:" \u 2AC6 \u 0338",ntgl:" \u 2279",Ntilde:" \x D1",ntilde:" \x F1",ntlg:" \u 2278",ntriangleleft:" \u 22EA",ntrianglelefteq:" \u 22EC",ntriangleright:" \u 22EB",ntrianglerighteq:" \u 22ED",Nu:" \u 039D",nu:" \u 03BD",num:"#",numero:" \u 2116",numsp:" \u 2007",nvap:" \u 224D \u 20D2",nvdash:" \u 22AC",nvDash:" \u 22AD",nVdash:" \u 22AE",nVDash:" \u 22AF",nvge:" \u 2265 \u 20D2",nvgt:"> \u 20D2",nvHarr:" \u 2904",nvinfin:" \u 29DE",nvlArr:" \u 2902",nvle:" \u 2264 \u 20D2",nvlt:"< \u 20D2",nvltrie:" \u 22B4 \u 20D2",nvrArr:" \u 2903",nvrtrie:" \u 22B5 \u 20D2",nvsim:" \u 223C \u 20D2",nwarhk:" \u 2923",nwarr:" \u 2196",nwArr:" \u 21D6",nwarrow:" \u 2196",nwnear:" \u 2927",Oacute:" \x D3",oacute:" \x F3",oast:" \u 229B",Ocirc:" \x D4",ocirc:" \x F4",ocir:" \u 229A",Ocy:" \u 041E",ocy:" \u 043E",odash:" \u 229D",Odblac:" \u 0150",odblac:" \u 0151",odiv:" \u 2A38",odot:" \u 2299",odsold:" \u 29BC",OElig:" \u 0152",oelig:" \u 01
` ," "],I0=["{","}","|"," \\ ","^"," ` "].concat(D0),F0=[" '"].concat(I0),xp=["%","/","?",";","#"].concat(F0),wp=["/","?","#"],M0=255,kp=/^[+a-z0-9A-Z_-]{0,63}$/,O0=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,_p={javascript:!0,"javascript:":!0},Sp={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function P0(i,t){if(i&&i instanceof Aa)return i;var n=new Aa;return n.parse(i,t),n}Aa.prototype.parse=function(i,t){var n,l,c,d,o,h=i;if(h=h.trim(),!t&&i.split("#").length===1){var f=L0.exec(h);if(f)return this.pathname=f[1],f[2]&&(this.search=f[2]),this}var p=T0.exec(h);if(p&&(p=p[0],c=p.toLowerCase(),this.protocol=p,h=h.substr(p.length)),(t||p||h.match(/^\/\/[^@\/]+@[^@\/]+/))&&(o=h.substr(0,2)==="//",o&&!(p&&_p[p])&&(h=h.substr(2),this.slashes=!0)),!_p[p]&&(o||p&&!Sp[p])){var y=-1;for(n=0;n<wp.length;n++)d=h.indexOf(wp[n]),d!==-1&&(y===-1||d<y)&&(y=d);var g,v;for(y===-1?v=h.lastIndexOf("@"):v=h.lastIndexOf("@",y),v!==-1&&(g=h.slice(0,v),h=h.slice(v+1),this.auth=g),y=-1,n=0;n<xp.length;n++)d=h.indexOf(xp[n]),d!==-1&&(y===-1||d<y)&&(y=d);y===-1&&(y=h.length),h[y-1]===":"&&y--;var b=h.slice(0,y);h=h.slice(y),this.parseHost(b),this.hostname=this.hostname||"";var k=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!k){var E=this.hostname.split(/\./);for(n=0,l=E.length;n<l;n++){var w=E[n];if(!!w&&!w.match(kp)){for(var I="",S=0,N=w.length;S<N;S++)w.charCodeAt(S)>127?I+="x":I+=w[S];if(!I.match(kp)){var O=E.slice(0,n),j=E.slice(n+1),U=w.match(O0);U&&(O.push(U[1]),j.unshift(U[2])),j.length&&(h=j.join(".")+h),this.hostname=O.join(".");break}}}}this.hostname.length>M0&&(this.hostname=""),k&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var ee=h.indexOf("#");ee!==-1&&(this.hash=h.substr(ee),h=h.slice(0,ee));var V=h.indexOf("?");return V!==-1&&(this.search=h.substr(V),h=h.slice(0,V)),h&&(this.pathname=h),Sp[c]&&this.hostname&&!this.pathname&&(this.pathname=""),this};Aa.prototype.parseHost=function(i){var t=A0.exec(i);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),i=i.substr(0,i.length-t.length)),i&&(this.hostname=i)};Ep.exports=P0});var sl=Me((XS,mo)=>{"use strict";mo.exports.encode=pp();mo.exports.decode=vp();mo.exports.format=bp();mo.exports.parse=Cp()});var ll=Me((ZS,Tp)=>{Tp.exports=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/});var ul=Me((QS,Ap)=>{Ap.exports=/[\0-\x1F\x7F-\x9F]/});var Dp=Me((JS,Lp)=>{Lp.exports=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/});var cl=Me((e1,Ip)=>{Ip.exports=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/});var Fp=Me(xi=>{"use strict";xi.Any=ll();xi.Cc=ul();xi.Cf=Dp();xi.P=Ea();xi.Z=cl()});var Ft=Me(lr=>{"use strict";function R0(i){return Object.prototype.toString.call(i)}function z0(i){return R0(i)==="[object String]"}var N0=Object.prototype.hasOwnProperty;function Mp(i,t){return N0.call(i,t)}function B0(i){var t=Array.prototype.slice.call(arguments,1);return t.forEach(function(n){if(!!n){if(typeof n!="object")throw new TypeError(n+"must be object");Object.keys(n).forEach(function(l){i[l]=n[l]})}}),i}function q0(i,t,n){return[].concat(i.slice(0,t),n,i.slice(t+1))}function Op(i){return!(i>=55296&&i<=57343||i>=64976&&i<=65007||(i&65535)===65535||(i&65535)===65534||i>=0&&i<=8||i===11||i>=14&&i<=31||i>=127&&i<=159||i>1114111)}function Pp(i){if(i>65535){i-=65536;var t=55296+(i>>10),n=56320+(i&1023);return String.fromCharCode(t,n)}return String.fromCharCode(i)}var Rp=/\\([!"#$%&' ( ) * + , \ - . \ / : ; <= > ? @ [ \ \ \ ] ^ _ ` {|}~])/g, $ 0=/&([a-z#][a-z0-9]{1,31});/gi,U0=new RegExp(Rp.source+"|"+ $ 0.source,"gi"),j0=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,zp=al();function H0(i,t){var n=0;return Mp(zp,t)?zp[t]:t.charCodeAt(0)===35&&j0.test(t)&&(n=t[1].toLowerCase()==="x"?parseInt(t.slice(2),16):parseInt(t.slice(1),10),Op(n))?Pp(n):i}function W0(i){return i.indexOf(" \\ ")<0?i:i.replace(Rp," $ 1")}function G0(i){ret
` };tn.fence=function(i,t,n,l,c){var d=i[t],o=d.info?lw(d.info).trim():"",h="",f="",p,y,g,v,b;return o&&(g=o.split(/( \s +)/g),h=g[0],f=g.slice(2).join("")),n.highlight?p=n.highlight(d.content,h,f)||Un(d.content):p=Un(d.content),p.indexOf("<pre")===0?p+ `
` :o?(y=d.attrIndex("class"),v=d.attrs?d.attrs.slice():[],y<0?v.push(["class",n.langPrefix+h]):(v[y]=v[y].slice(),v[y][1]+=" "+n.langPrefix+h),b={attrs:v},"<pre><code"+c.renderAttrs(b)+">"+p+ ` < / c o d e > < / p r e >
2022-01-25 06:49:42 +08:00
` ):"<pre><code"+c.renderAttrs(d)+">"+p+ ` < / c o d e > < / p r e >
` };tn.image=function(i,t,n,l,c){var d=i[t];return d.attrs[d.attrIndex("alt")][1]=c.renderInlineAsText(d.children,n,l),c.renderToken(i,t,n)};tn.hardbreak=function(i,t,n){return n.xhtmlOut? ` < br / >
2020-09-20 17:33:18 +08:00
` : ` < br >
2021-11-16 21:22:24 +08:00
` };tn.softbreak=function(i,t,n){return n.breaks?n.xhtmlOut? ` < br / >
2020-09-20 17:33:18 +08:00
` : ` < br >
` : `
2022-02-06 23:49:23 +08:00
` };tn.text=function(i,t){return Un(i[t].content)};tn.html_block=function(i,t){return i[t].content};tn.html_inline=function(i,t){return i[t].content};function wi(){this.rules=sw({},tn)}wi.prototype.renderAttrs=function(t){var n,l,c;if(!t.attrs)return"";for(c="",n=0,l=t.attrs.length;n<l;n++)c+=" "+Un(t.attrs[n][0])+'="'+Un(t.attrs[n][1])+'"';return c};wi.prototype.renderToken=function(t,n,l){var c,d="",o=!1,h=t[n];return h.hidden?"":(h.block&&h.nesting!==-1&&n&&t[n-1].hidden&&(d+= `
` ),d+=(h.nesting===-1?"</":"<")+h.tag,d+=this.renderAttrs(h),h.nesting===0&&l.xhtmlOut&&(d+=" /"),h.block&&(o=!0,h.nesting===1&&n+1<t.length&&(c=t[n+1],(c.type==="inline"||c.hidden||c.nesting===-1&&c.tag===h.tag)&&(o=!1))),d+=o? ` >
` :">",d)};wi.prototype.renderInline=function(i,t,n){for(var l,c="",d=this.rules,o=0,h=i.length;o<h;o++)l=i[o].type,typeof d[l]!="undefined"?c+=d[l](i,o,t,n,this):c+=this.renderToken(i,o,t);return c};wi.prototype.renderInlineAsText=function(i,t,n){for(var l="",c=0,d=i.length;c<d;c++)i[c].type==="text"?l+=i[c].content:i[c].type==="image"?l+=this.renderInlineAsText(i[c].children,t,n):i[c].type==="softbreak"&&(l+= `
` );return l};wi.prototype.render=function(i,t,n){var l,c,d,o="",h=this.rules;for(l=0,c=i.length;l<c;l++)d=i[l].type,d==="inline"?o+=this.renderInline(i[l].children,t,n):typeof h[d]!="undefined"?o+=h[i[l].type](i,l,t,n,this):o+=this.renderToken(i,l,t,n);return o};Gp.exports=wi});var Da=Me((l1,Vp)=>{"use strict";function Kr(){this.__rules__=[],this.__cache__=null}Kr.prototype.__find__=function(i){for(var t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===i)return t;return-1};Kr.prototype.__compile__=function(){var i=this,t=[""];i.__rules__.forEach(function(n){!n.enabled||n.alt.forEach(function(l){t.indexOf(l)<0&&t.push(l)})}),i.__cache__={},t.forEach(function(n){i.__cache__[n]=[],i.__rules__.forEach(function(l){!l.enabled||n&&l.alt.indexOf(n)<0||i.__cache__[n].push(l.fn)})})};Kr.prototype.at=function(i,t,n){var l=this.__find__(i),c=n||{};if(l===-1)throw new Error("Parser rule not found: "+i);this.__rules__[l].fn=t,this.__rules__[l].alt=c.alt||[],this.__cache__=null};Kr.prototype.before=function(i,t,n,l){var c=this.__find__(i),d=l||{};if(c===-1)throw new Error("Parser rule not found: "+i);this.__rules__.splice(c,0,{name:t,enabled:!0,fn:n,alt:d.alt||[]}),this.__cache__=null};Kr.prototype.after=function(i,t,n,l){var c=this.__find__(i),d=l||{};if(c===-1)throw new Error("Parser rule not found: "+i);this.__rules__.splice(c+1,0,{name:t,enabled:!0,fn:n,alt:d.alt||[]}),this.__cache__=null};Kr.prototype.push=function(i,t,n){var l=n||{};this.__rules__.push({name:i,enabled:!0,fn:t,alt:l.alt||[]}),this.__cache__=null};Kr.prototype.enable=function(i,t){Array.isArray(i)||(i=[i]);var n=[];return i.forEach(function(l){var c=this.__find__(l);if(c<0){if(t)return;throw new Error("Rules manager: invalid rule name "+l)}this.__rules__[c].enabled=!0,n.push(l)},this),this.__cache__=null,n};Kr.prototype.enableOnly=function(i,t){Array.isArray(i)||(i=[i]),this.__rules__.forEach(function(n){n.enabled=!1}),this.enable(i,t)};Kr.prototype.disable=function(i,t){Array.isArray(i)||(i=[i]);var n=[];return i.forEach(function(l){var c=this.__find__(l);if(c<0){if(t)return;throw new Error("Rules manager: invalid rule name "+l)}this.__rules__[c].enabled=!1,n.push(l)},this),this.__cache__=null,n};Kr.prototype.getRules=function(i){return this.__cache__===null&&this.__compile__(),this.__cache__[i]||[]};Vp.exports=Kr});var Xp=Me((u1,Yp)=>{"use strict";var uw=/ \r \n ?| \n /g,cw=/ \0 /g;Yp.exports=function(t){var n;n=t.src.replace(uw, `
` ),n=n.replace(cw," \u FFFD"),t.src=n}});var Qp=Me((c1,Zp)=>{"use strict";Zp.exports=function(t){var n;t.inlineMode?(n=new t.Token("inline","",0),n.content=t.src,n.map=[0,1],n.children=[],t.tokens.push(n)):t.md.block.parse(t.src,t.md,t.env,t.tokens)}});var em=Me((f1,Jp)=>{"use strict";Jp.exports=function(t){var n=t.tokens,l,c,d;for(c=0,d=n.length;c<d;c++)l=n[c],l.type==="inline"&&t.md.inline.parse(l.content,t.md,t.env,l.children)}});var rm=Me((d1,tm)=>{"use strict";var fw=Ft().arrayReplaceAt;function dw(i){return/^<a[> \s ]/i.test(i)}function hw(i){return/^< \/ a \s *>/i.test(i)}tm.exports=function(t){var n,l,c,d,o,h,f,p,y,g,v,b,k,E,w,I,S=t.tokens,N;if(!!t.md.options.linkify){for(l=0,c=S.length;l<c;l++)if(!(S[l].type!=="inline"||!t.md.linkify.pretest(S[l].content)))for(d=S[l].children,k=0,n=d.length-1;n>=0;n--){if(h=d[n],h.type==="link_close"){for(n--;d[n].level!==h.level&&d[n].type!=="link_open";)n--;continue}if(h.type==="html_inline"&&(dw(h.content)&&k>0&&k--,hw(h.content)&&k++),!(k>0)&&h.type==="text"&&t.md.linkify.test(h.content)){for(y=h.content,N=t.md.linkify.match(y),f=[],b=h.level,v=0,p=0;p<N.length;p++)E=N[p].url,w=t.md.normalizeLink(E),!!t.md.validateLink(w)&&(I=N[p].text,N[p].schema?N[p].schema==="mailto:"&&!/^mailto:/i.test(I)?I=t.md.normalizeLinkText("mailto:"+I).replace(/^mailto:/,""):I=t.md.normalizeLinkText(I):I=t.md.normalizeLinkText("http://"+I).replace(/^http: \/ \/ /,""),g=N[p].index,g>v&&(o=new t.Token("text","",0),o.content=y.slice(v,g),o.level=b,f.push(o)),o=new t.Token("link_open","a",1),o.attrs=[["href",w]],o.level=b++,o.markup="linkify",o.info="auto",f.push(o),o=new t.Token("text","",0),o.content=I,o.level=b,f.push(o),o=new t.Token("link_close","a",-1),o.level=--b,o.markup="linkify",o.info="auto",f.push(o),v=N[p].lastIndex);v<y.length&&(o=new t.Token("text","",0),o.content=y.slice(v),o.level=b,f.push(o)),S[l].children=d=fw(d,n,f)}}}}});var om=Me((h1,im)=>{"use strict";var nm=/ \+ -| \. \. | \? \? \? \? |!!!!|,,|--/,pw=/ \( (c|tm|r|p) \) /i,mw=/ \( (c|tm|r|p) \) /ig,gw={c:" \x A9",r:" \x AE",p:" \x A7",tm:" \u 2122"};function vw(i,t){return gw[t.toLowerCase()]}function yw(i){var t,n,l=0;for(t=i.length-1;t>=0;t--)n=i[t],n.type==="text"&&!l&&(n.content=n.content.replace(mw,vw)),n.type==="link_open"&&n.info==="auto"&&l--,n.type==="link_close"&&n.info==="auto"&&l++}function bw(i){var t,n,l=0;for(t=i.length-1;t>=0;t--)n=i[t],n.type==="text"&&!l&&nm.test(n.content)&&(n.content=n.content.replace(/ \+ -/g," \x B1").replace(/ \. {2,}/g," \u 2026").replace(/([?!])…/g," $ 1..").replace(/([?!]){4,}/g," $ 1 $ 1 $ 1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]| $ )/mg," $ 1 \u 2014").replace(/(^| \s )--(?= \s | $ )/mg," $ 1 \u 2013").replace(/(^|[^- \s ])--(?=[^- \s ]| $ )/mg," $ 1 \u 2013")),n.type==="link_open"&&n.info==="auto"&&l--,n.type==="link_close"&&n.info==="auto"&&l++}im.exports=function(t){var n;if(!!t.md.options.typographer)for(n=t.tokens.length-1;n>=0;n--)t.tokens[n].type==="inline"&&(pw.test(t.tokens[n].content)&&yw(t.tokens[n].children),nm.test(t.tokens[n].content)&&bw(t.tokens[n].children))}});var dm=Me((p1,fm)=>{"use strict";var am=Ft().isWhiteSpace,sm=Ft().isPunctChar,lm=Ft().isMdAsciiPunct,xw=/['"]/,um=/['"]/g,cm=" \u 2019";function Ia(i,t,n){return i.substr(0,t)+n+i.substr(t+1)}function ww(i,t){var n,l,c,d,o,h,f,p,y,g,v,b,k,E,w,I,S,N,O,j,U;for(O=[],n=0;n<i.length;n++){for(l=i[n],f=i[n].level,S=O.length-1;S>=0&&!(O[S].level<=f);S--);if(O.length=S+1,l.type!=="text")continue;c=l.content,o=0,h=c.length;e:for(;o<h&&(um.lastIndex=o,d=um.exec(c),!!d);){if(w=I=!0,o=d.index+1,N=d[0]==="'",y=32,d.index-1>=0)y=c.charCodeAt(d.index-1);else for(S=n-1;S>=0&&!(i[S].type==="softbreak"||i[S].type==="hardbreak");S--)if(!!i[S].content){y=i[S].content.charCodeAt(i[S].content.length-1);break}if(g=32,o<h)g=c.charCodeAt(o);else for(S=n+1;S<i.length&&!(i[S].type==="softbreak"||i[S].type==="hardbreak");S++)if(!!i[S].content){g=i[S].content.charCodeAt(0);break}if(v=lm(y)||sm(String.fromCharCode(y)),b=lm(g)||sm(String.fromCharCode(g)),k=am(y),E=am(g),E?w=!1:b&&(k||v||(w=!1)),k?I=!1:v&&(E||b||(I=!1)),g===34&&d[0]==='"'&&y>=48&&y<=57&&(I=w=!1),w&&I&&(w=v,I=b),!w&&!I){N&&(l.content=Ia(l.co
` ,o.map=[n,t.line],!0}});var Em=Me((x1,Sm)=>{"use strict";Sm.exports=function(t,n,l,c){var d,o,h,f,p,y,g,v=!1,b=t.bMarks[n]+t.tShift[n],k=t.eMarks[n];if(t.sCount[n]-t.blkIndent>=4||b+3>k||(d=t.src.charCodeAt(b),d!==126&&d!==96)||(p=b,b=t.skipChars(b,d),o=b-p,o<3)||(g=t.src.slice(p,b),h=t.src.slice(b,k),d===96&&h.indexOf(String.fromCharCode(d))>=0))return!1;if(c)return!0;for(f=n;f++,!(f>=l||(b=p=t.bMarks[f]+t.tShift[f],k=t.eMarks[f],b<k&&t.sCount[f]<t.blkIndent));)if(t.src.charCodeAt(b)===d&&!(t.sCount[f]-t.blkIndent>=4)&&(b=t.skipChars(b,d),!(b-p<o)&&(b=t.skipSpaces(b),!(b<k)))){v=!0;break}return o=t.sCount[n],t.line=f+(v?1:0),y=t.push("fence","code",0),y.info=h,y.content=t.getLines(n+1,f,o,!0),y.markup=g,y.map=[n,t.line],!0}});var Am=Me((w1,Tm)=>{"use strict";var Cm=Ft().isSpace;Tm.exports=function(t,n,l,c){var d,o,h,f,p,y,g,v,b,k,E,w,I,S,N,O,j,U,ee,V,W=t.lineMax,K=t.bMarks[n]+t.tShift[n],q=t.eMarks[n];if(t.sCount[n]-t.blkIndent>=4||t.src.charCodeAt(K++)!==62)return!1;if(c)return!0;for(f=b=t.sCount[n]+1,t.src.charCodeAt(K)===32?(K++,f++,b++,d=!1,O=!0):t.src.charCodeAt(K)===9?(O=!0,(t.bsCount[n]+b)%4===3?(K++,f++,b++,d=!1):d=!0):O=!1,k=[t.bMarks[n]],t.bMarks[n]=K;K<q&&(o=t.src.charCodeAt(K),Cm(o));){o===9?b+=4-(b+t.bsCount[n]+(d?1:0))%4:b++;K++}for(E=[t.bsCount[n]],t.bsCount[n]=t.sCount[n]+1+(O?1:0),y=K>=q,S=[t.sCount[n]],t.sCount[n]=b-f,N=[t.tShift[n]],t.tShift[n]=K-t.bMarks[n],U=t.md.block.ruler.getRules("blockquote"),I=t.parentType,t.parentType="blockquote",v=n+1;v<l&&(V=t.sCount[v]<t.blkIndent,K=t.bMarks[v]+t.tShift[v],q=t.eMarks[v],!(K>=q));v++){if(t.src.charCodeAt(K++)===62&&!V){for(f=b=t.sCount[v]+1,t.src.charCodeAt(K)===32?(K++,f++,b++,d=!1,O=!0):t.src.charCodeAt(K)===9?(O=!0,(t.bsCount[v]+b)%4===3?(K++,f++,b++,d=!1):d=!0):O=!1,k.push(t.bMarks[v]),t.bMarks[v]=K;K<q&&(o=t.src.charCodeAt(K),Cm(o));){o===9?b+=4-(b+t.bsCount[v]+(d?1:0))%4:b++;K++}y=K>=q,E.push(t.bsCount[v]),t.bsCount[v]=t.sCount[v]+1+(O?1:0),S.push(t.sCount[v]),t.sCount[v]=b-f,N.push(t.tShift[v]),t.tShift[v]=K-t.bMarks[v];continue}if(y)break;for(j=!1,h=0,p=U.length;h<p;h++)if(U[h](t,v,l,!0)){j=!0;break}if(j){t.lineMax=v,t.blkIndent!==0&&(k.push(t.bMarks[v]),E.push(t.bsCount[v]),N.push(t.tShift[v]),S.push(t.sCount[v]),t.sCount[v]-=t.blkIndent);break}k.push(t.bMarks[v]),E.push(t.bsCount[v]),N.push(t.tShift[v]),S.push(t.sCount[v]),t.sCount[v]=-1}for(w=t.blkIndent,t.blkIndent=0,ee=t.push("blockquote_open","blockquote",1),ee.markup=">",ee.map=g=[n,0],t.md.block.tokenize(t,n,v),ee=t.push("blockquote_close","blockquote",-1),ee.markup=">",t.lineMax=W,t.parentType=I,g[1]=t.line,h=0;h<N.length;h++)t.bMarks[h+n]=k[h],t.tShift[h+n]=N[h],t.sCount[h+n]=S[h],t.bsCount[h+n]=E[h];return t.blkIndent=w,!0}});var Dm=Me((k1,Lm)=>{"use strict";var Sw=Ft().isSpace;Lm.exports=function(t,n,l,c){var d,o,h,f,p=t.bMarks[n]+t.tShift[n],y=t.eMarks[n];if(t.sCount[n]-t.blkIndent>=4||(d=t.src.charCodeAt(p++),d!==42&&d!==45&&d!==95))return!1;for(o=1;p<y;){if(h=t.src.charCodeAt(p++),h!==d&&!Sw(h))return!1;h===d&&o++}return o<3?!1:(c||(t.line=n+1,f=t.push("hr","hr",0),f.map=[n,t.line],f.markup=Array(o+1).join(String.fromCharCode(d))),!0)}});var Pm=Me((_1,Om)=>{"use strict";var Im=Ft().isSpace;function Fm(i,t){var n,l,c,d;return l=i.bMarks[t]+i.tShift[t],c=i.eMarks[t],n=i.src.charCodeAt(l++),n!==42&&n!==45&&n!==43||l<c&&(d=i.src.charCodeAt(l),!Im(d))?-1:l}function Mm(i,t){var n,l=i.bMarks[t]+i.tShift[t],c=l,d=i.eMarks[t];if(c+1>=d||(n=i.src.charCodeAt(c++),n<48||n>57))return-1;for(;;){if(c>=d)return-1;if(n=i.src.charCodeAt(c++),n>=48&&n<=57){if(c-l>=10)return-1;continue}if(n===41||n===46)break;return-1}return c<d&&(n=i.src.charCodeAt(c),!Im(n))?-1:c}function Ew(i,t){var n,l,c=i.level+2;for(n=t+2,l=i.tokens.length-2;n<l;n++)i.tokens[n].level===c&&i.tokens[n].type==="paragraph_open"&&(i.tokens[n+2].hidden=!0,i.tokens[n].hidden=!0,n+=2)}Om.exports=function(t,n,l,c){var d,o,h,f,p,y,g,v,b,k,E,w,I,S,N,O,j,U,ee,V,W,K,q,R,T,H,Z,P,z=!1,ne=!0;if(t.sCount[n]-t.blkIndent>=4||t.listIndent>=0&&t.sCount[n]-t.listIndent>=4&&t.sCount[n]<t.blkIndent)return!1;if(c&&t.parentType==="paragraph"&&t.sCount[n]
` );Zo("error",t)}}var Bc={emit:Zo,emitPublic:Ox,listen:Mx,success:i=>Zo("success",i),error:i=>Zo("error",i),showValidationErrors:Px};async function Rx(i,t={}){return qc(i,{method:"GET",params:t})}async function zx(i,t=null){return Qo("POST",i,t)}async function Nx(i,t=null){return Qo("PUT",i,t)}async function Bx(i,t=null){return Qo("PATCH",i,t)}async function qx(i,t=null){return Qo("DELETE",i,t)}async function Qo(i,t,n=null){let l={method:i,body:n};return typeof n=="object"&&!(n instanceof FormData)&&(l.headers={"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"},l.body=JSON.stringify(n)),n instanceof FormData&&i!=="post"&&(n.append("_method",i),l.method="post"),qc(t,l)}async function qc(i,t={}){if(i.startsWith("http")||(i=window.baseUrl(i)),t.params){let o=new URL(i);for(let h of Object.keys(t.params)){let f=t.params[h];typeof f!="undefined"&&f!==null&&o.searchParams.set(h,f)}i=o.toString()}let n=document.querySelector("meta[name=token]").getAttribute("content");t=Object.assign({},t,{credentials:"same-origin"}),t.headers=Object.assign({},t.headers||{},{baseURL:window.baseUrl(""),"X-CSRF-TOKEN":n});let l=await fetch(i,t),d={data:await $ x(l),headers:l.headers,redirected:l.redirected,status:l.status,statusText:l.statusText,url:l.url,original:l};if(!l.ok)throw d;return d}async function $ x(i){if(i.status===204)return null;let n=(i.headers.get("Content-Type")||"").split(";")[0].split("/").pop();return n==="javascript"||n==="json"?await i.json():await i.text()}var $ c={get:Rx,post:zx,put:Nx,patch:Bx,delete:qx};var Uc=class{constructor(t){this.store=new Map,this.parseTranslations()}parseTranslations(){let t=document.querySelectorAll('meta[name="translation"]');for(let n of t){let l=n.getAttribute("key"),c=n.getAttribute("value");this.store.set(l,c)}}get(t,n){let l=this.getTransText(t);return this.performReplacements(l,n)}getPlural(t,n,l){let c=this.getTransText(t);return this.parsePlural(c,n,l)}parsePlural(t,n,l){let c=t.split("|"),d=/^{([0-9]+)}/,o=/^ \[ ([0-9]+),([0-9*]+)]/,h=null;for(let f of c){let p=f.match(d);if(p!==null&&Number(p[1])===n){h=f.replace(d,"").trim();break}let y=f.match(o);if(y!==null&&Number(y[1])<=n&&(y[2]==="*"||Number(y[2])>=n)){h=f.replace(o,"").trim();break}}return h===null&&c.length>1&&(h=n===1?c[0]:c[1]),h===null&&(h=c[0]),this.performReplacements(h,l)}getTransText(t){let n=this.store.get(t);return n===void 0&&console.warn( ` Translation with key "${t}" does not exist ` ),n}performReplacements(t,n){if(!n)return t;let l=t.match(/:([ \S ]+)/g);return l===null||l.forEach(c=>{let d=c.substring(1);typeof n[d]!="undefined"&&(t=t.replace(c,n[d]))}),t}},jc=Uc;function Jo(i,t){let n=document.querySelectorAll(i);for(let l of n)t(l)}function ea(i,t,n){for(let l of t)i.addEventListener(l,n)}function Rt(i,t){Array.isArray(i)||(i=[i]);for(let n of i)n.addEventListener("click",t),n.addEventListener("keydown",l=>{(l.key==="Enter"||l.key===" ")&&(l.preventDefault(),t(l))})}function ta(i,t){Array.isArray(i)||(i=[i]);let n=l=>{l.key==="Enter"&&t(l)};i.forEach(l=>l.addEventListener("keypress",n))}function jt(i,t,n,l){i.addEventListener(n,function(c){let d=c.target.closest(t);d&&l.call(d,c,d)})}function Hc(i,t){let n=document.querySelectorAll(i);t=t.toLowerCase();for(let l of n)if(l.textContent.toLowerCase().includes(t))return l;return null}function eo(i){i.innerHTML='<div class="loading-container"><div></div><div></div><div></div></div>'}function Wc(i){let t=i.querySelectorAll(".loading-container");for(let n of t)n.remove()}function to(i,t,n){let l;return function(){let c=this,d=arguments,o=function(){l=null,n||i.apply(c,d)},h=n&&!l;clearTimeout(l),l=setTimeout(o,t),h&&i.apply(c,d)}}function ro(i){if(!i)return;i.scrollIntoView({behavior:"smooth"});let t=document.getElementById("custom-styles").getAttribute("data-color-light"),n=window.getComputedStyle(i).getPropertyValue("background-color");i.style.backgroundColor=t,setTimeout(()=>{i.classList.add("selectFade"),i.style.backgroundColor=n},10),setTimeout(()=>{i.classList.remove("selectFade"),i.style.backgroundColor=""},3e3)}function Kc(i){return i.replace(/&/g,"
` );let n=i.textContent.trimEnd(),l="";if(t!==null){let d=t.className.replace("language-","");l=ka(d,n)}let c=(0, $ n.default)(function(d){i.parentNode.replaceChild(d,i)},{value:n,mode:l,lineNumbers:!0,lineWrapping:!1,theme:_a(),readOnly:!0});v0(c)}function v0(i){let t='<svg viewBox="0 0 24 24" width="16" height="16" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h24v24H0z" fill="none"/><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"/></svg>',n=document.createElement("div");n.classList.add("CodeMirror-copy"),n.innerHTML=t,i.display.wrapper.appendChild(n),new vh.default(n,{text:function(c){return i.getValue()}}).on("success",c=>{n.classList.add("success"),setTimeout(()=>{n.classList.remove("success")},240)})}function ka(i,t){i=i.trim().replace(/^ \. /g,"").toLowerCase();let n=typeof il[i];return n==="undefined"?"":n==="function"?il[i](t):il[i]}function _a(){let i=document.documentElement.classList.contains("dark-mode");return window.codeTheme||(i?"darcula":"default")}function y0(i){let t=i.ownerDocument,n=i.querySelector("code"),l=bh(i.className||"");!l&&n&&(l=bh(n.className||"")),i.innerHTML=i.innerHTML.replace(/<br \s *[ \/ ]?>/gi, `
` );let c=i.textContent,d=t.createElement("div"),o=t.createElement("textarea");d.className="CodeMirrorContainer",d.setAttribute("data-lang",l),d.setAttribute("dir","ltr"),o.style.display="none",i.parentNode.replaceChild(d,i),d.appendChild(o),d.contentEditable="false",o.textContent=c;let h=(0, $ n.default)(function(f){d.appendChild(f)},{value:c,mode:ka(l,c),lineNumbers:!0,lineWrapping:!1,theme:_a(),readOnly:!0});return{wrap:d,editor:h}}function bh(i){return(i.split(" ").filter(n=>n.startsWith("language-"))[0]||"").replace("language-","")}function b0(i,t){let n=i.textContent;return(0, $ n.default)(function(l){i.parentNode.insertBefore(l,i),i.style.display="none"},{value:n,mode:ka(t,n),lineNumbers:!0,lineWrapping:!1,theme:_a()})}function x0(i,t,n){i.setOption("mode",ka(t,n))}function w0(i,t){i.setValue(t),setTimeout(()=>{xh(i)},10)}function xh(i){i.refresh()}function k0(i){let n={value:i.textContent,mode:"markdown",lineNumbers:!0,lineWrapping:!0,theme:_a(),scrollPastEnd:!0};return window. $ events.emitPublic(i,"editor-markdown-cm::pre-init",{config:n}),(0, $ n.default)(function(l){i.parentNode.insertBefore(l,i),i.style.display="none"},n)}function _0(){return $ n.default.keyMap.default== $ n.default.keyMap.macDefault?"Cmd":"Ctrl"}var sr={highlight:m0,highlightWithin:g0,wysiwygView:y0,popupEditor:b0,setMode:x0,setContent:w0,updateLayout:xh,markdownEditor:k0,getMetaKey:_0};var wh=class{setup(){this.container=this. $ refs.container,this.popup=this. $ el,this.editorInput=this. $ refs.editor,this.languageLinks=this. $ manyRefs.languageLink,this.saveButton=this. $ refs.saveButton,this.languageInput=this. $ refs.languageInput,this.historyDropDown=this. $ refs.historyDropDown,this.historyList=this. $ refs.historyList,this.callback=null,this.editor=null,this.history={},this.historyKey="code_history",this.setupListeners()}setupListeners(){this.container.addEventListener("keydown",t=>{t.ctrlKey&&t.key==="Enter"&&this.save()}),Rt(this.languageLinks,t=>{let n=t.target.dataset.lang;this.languageInput.value=n,this.updateEditorMode(n)}),ta(this.languageInput,t=>this.save()),Rt(this.saveButton,t=>this.save()),jt(this.historyList,"button","click",(t,n)=>{t.preventDefault();let l=n.dataset.time;this.editor&&this.editor.setValue(this.history[l])})}save(){this.callback&&this.callback(this.editor.getValue(),this.languageInput.value),this.hide()}open(t,n,l){this.languageInput.value=n,this.callback=l,this.show(),this.updateEditorMode(n),sr.setContent(this.editor,t)}show(){this.editor||(this.editor=sr.popupEditor(this.editorInput,this.languageInput.value)),this.loadHistory(),this.popup.components.popup.show(()=>{sr.updateLayout(this.editor),this.editor.focus()},()=>{this.addHistory()})}hide(){this.popup.components.popup.hide(),this.addHistory()}updateEditorMode(t){sr.setMode(this.editor,t,this.editor.getValue())}loadHistory(){this.history=JSON.parse(window.sessionStorage.getItem(this.historyKey)||"{}");let t=Object.keys(this.history).reverse();this.historyDropDown.classList.toggle("hidden",t.length===0),this.historyList.innerHTML=t.map(n=>{let l=new Date(parseInt(n)).toLocaleTimeString();return ` < li > < button type = "button" data - time = "${n}" > $ { l } < / b u t t o n > < / l i > ` } ) . j o i n ( " " ) } a d d H i s t o r y ( ) { i f ( ! t h i s . e d i t o r ) r e t u r n ; l e t t = t h i s . e d i t o r . g e t V a l u e ( ) ; i f ( ! t ) r e t u r n ; l e t n = O b j e c t . k e y s ( t h i s . h i s t o r y ) . p o p ( ) ; i f ( t h i s . h i s t o r y [ n ] = = = t ) r e t u r n ; t h i s . h i s t o r y [ S t r i n g ( D a t e . n o w ( ) ) ] = t ; l e t l = J S O N . s t r i n g i f y ( t h i s . h i s t o r y ) ; w i n d o w . s e s s i o n S t o r a g e . s e t I t e m ( t h i s . h i s t o r y K e y , l ) } } , k h = w h ; v a r _ h = c l a s s { c o n s t r u c t o r ( t ) { s r . h i g h l i g h t W i t h i n ( t ) } } , S h = _ h ; v a r E h = c l a s s { c o n s t r u c t o r ( t ) { t h i s . e l e m = t , t h i s . t r i g g e r = t . q u e r y S e l e c t o r ( " [ c o l l a p s i b l e - t r i g g e r ] " ) , t h i s . c o n t e n t = t . q u e r y S e l e c t o r ( " [ c o l l a p s i b l e - c o n t e n t ] " ) , ! ! t h i s . t r i g g e r & & ( t h i s . t r i g g e r . a d d E v e n t L i s t e n e r ( " c l i c k " , t h i s . t o g g l e . b i n d ( t h i s ) ) , t h i s . o p e n I f C o n t a i n s E r r o r ( ) ) } o p e n ( ) { t h i s . e l e m . c l a s s L i s t . a d d ( " o p e n " ) , t h i s . t r i g g e r . s e t A t t r i b u t e ( " a r i a - e x p a n d e d " , " t r u e " ) , b i ( t h i s . c o n t e n t , 3 0 0 ) } c l o s e ( ) { t h i s . e l e m . c l a s s L i s t . r e m o v e ( " o p e n " ) , t h i s . t r i g g e r . s e t A t t r i b u t e ( " a r i a - e x p a n d e d " , " f a l s e " ) , y i ( t h i s . c o n t e n t , 3 0 0 ) } t o g g l e ( ) { t h i s . e l e m . c l a s s L i s t . c o n t a i n s ( " o p e n " ) ? t h i s . c l o s e ( ) : t h i s . o p e n ( ) } o p e n I f C o n t a i n s E r r o r ( ) { t h i s . c o n t e n t . q u e r y S e l e
2022-01-25 06:49:42 +08:00
` ).map(y=>y.indexOf( ` drawio - diagram = "${c}" ` )!==-1?f:y).join( `
` );this.cm.setValue(p),this.cm.setCursor(l),this.cm.focus(),zr.close()}).catch(h=>{this.handleDrawingUploadError(h)})})}handleDrawingUploadError(t){t.status===413?window. $ events.emit("error",this.serverUploadLimitText):window. $ events.emit("error",this.imageUploadErrorText),console.log(t)}actionFullScreen(){let t=this.elem.classList.contains("fullscreen");this.elem.classList.toggle("fullscreen",!t),document.body.classList.toggle("markdown-fullscreen",!t)}scrollToText(t){if(!t)return;let l=this.cm.getValue().split(/ \r ? \n /),c=l.findIndex(d=>d&&d.indexOf(t)!==-1);c!==-1&&(this.cm.scrollIntoView({line:c},200),this.cm.focus(),this.cm.setCursor({line:c,char:l[c].length}))}listenForBookStackEditorEvents(){function t({html:n,markdown:l}){return l||n}window. $ events.listen("editor::replace",n=>{let l=t(n);this.cm.setValue(l)}),window. $ events.listen("editor::append",n=>{let l=this.cm.getCursor("from"),c=t(n),d=this.cm.getValue()+ `
` +c;this.cm.setValue(d),this.cm.setCursor(l.line,l.ch)}),window. $ events.listen("editor::prepend",n=>{let l=this.cm.getCursor("from"),c=t(n),d=c+ `
2022-02-06 23:49:23 +08:00
` +this.cm.getValue();this.cm.setValue(d);let o=c.split( `
` ).length;this.cm.setCursor(l.line+o,l.ch)}),window. $ events.listen("editor::insert",n=>{let l=t(n);this.cm.replaceSelection(l)}),window. $ events.listen("editor::focus",()=>{this.cm.focus()})}},Cv=Ev;var Tv=class{constructor(t){this.elem=t,this.inviteOption=t.querySelector("input[name=send_invite]"),this.inviteOption&&(this.inviteOption.addEventListener("change",this.inviteOptionChange.bind(this)),this.inviteOptionChange())}inviteOptionChange(){let t=this.inviteOption.value==="true",n=this.elem.querySelectorAll("input[type=password]");for(let c of n)c.disabled=t;let l=this.elem.querySelector("#password-input-container");l&&(l.style.display=t?"none":"block")}},Av=Tv;var Lv=class{constructor(t){this.elem=t,this.type=t.getAttribute("notification"),this.textElem=t.querySelector("span"),this.autohide=this.elem.hasAttribute("data-autohide"),this.elem.style.display="grid",window. $ events.listen(this.type,n=>{this.show(n)}),t.addEventListener("click",this.hide.bind(this)),t.hasAttribute("data-show")&&setTimeout(()=>this.show(this.textElem.textContent),100),this.hideCleanup=this.hideCleanup.bind(this)}show(t=""){if(this.elem.removeEventListener("transitionend",this.hideCleanup),this.textElem.textContent=t,this.elem.style.display="grid",setTimeout(()=>{this.elem.classList.add("showing")},1),this.autohide){let n=t.split(" ").length,l=Math.max(2e3,1e3+250*n);setTimeout(this.hide.bind(this),l)}}hide(){this.elem.classList.remove("showing"),this.elem.addEventListener("transitionend",this.hideCleanup)}hideCleanup(){this.elem.style.display="none",this.elem.removeEventListener("transitionend",this.hideCleanup)}},Dv=Lv;var Iv=class{setup(){this.removeButton=this. $ refs.remove,this.showButton=this. $ refs.show,this.input=this. $ refs.input,this.setupListeners()}setupListeners(){Rt(this.removeButton,()=>{this.input.value="",this.input.classList.add("hidden"),this.removeButton.classList.add("hidden"),this.showButton.classList.remove("hidden")}),Rt(this.showButton,()=>{this.input.classList.remove("hidden"),this.removeButton.classList.remove("hidden"),this.showButton.classList.add("hidden")})}},Fv=Iv;var Mv=class{setup(){this.elem=this. $ el,this.pageId=Number(this. $ opts.pageId),this.container=this. $ refs.commentContainer,this.formContainer=this. $ refs.formContainer,this.commentCountBar=this. $ refs.commentCountBar,this.addButtonContainer=this. $ refs.addButtonContainer,this.replyToRow=this. $ refs.replyToRow,this.updatedText=this. $ opts.updatedText,this.deletedText=this. $ opts.deletedText,this.createdText=this. $ opts.createdText,this.countText=this. $ opts.countText,this.editingComment=null,this.parentId=null,this.formContainer&&(this.form=this.formContainer.querySelector("form"),this.formInput=this.form.querySelector("textarea"),this.form.addEventListener("submit",this.saveComment.bind(this))),this.elem.addEventListener("click",this.handleAction.bind(this)),this.elem.addEventListener("submit",this.updateComment.bind(this))}handleAction(t){let n=t.target.closest("[action]");if(t.target.matches('a[href^="#"]')){let d=t.target.href.split("#")[1];ro(document.querySelector("#"+d))}if(n===null)return;t.preventDefault();let l=n.getAttribute("action"),c=n.closest("[comment]");l==="edit"&&this.editComment(c),l==="closeUpdateForm"&&this.closeUpdateForm(),l==="delete"&&this.deleteComment(c),l==="addComment"&&this.showForm(),l==="hideForm"&&this.hideForm(),l==="reply"&&this.setReply(c),l==="remove-reply-to"&&this.removeReplyTo()}closeUpdateForm(){!this.editingComment||(this.editingComment.querySelector("[comment-content]").style.display="block",this.editingComment.querySelector("[comment-edit-container]").style.display="none")}editComment(t){this.hideForm(),this.editingComment&&this.closeUpdateForm(),t.querySelector("[comment-content]").style.display="none",t.querySelector("[comment-edit-container]").style.display="block";let n=t.querySelector("[comment-edit-container] textarea"),l=n.value.split( `
` ).length;n.style.height=l*20+40+"px",this.editingComment=t}updateComment(t){let n=t.target;t.preventDefault();let c={text:n.querySelector("textarea").value,parent_id:this.parentId||null};this.showLoading(n);let d=this.editingComment.getAttribute("comment");window. $ http.put( ` / comment / $ { d } ` ,c).then(o=>{let h=document.createElement("div");h.innerHTML=o.data,this.editingComment.innerHTML=h.children[0].innerHTML,window. $ events.success(this.updatedText),window.components.init(this.editingComment),this.closeUpdateForm(),this.editingComment=null}).catch(window. $ events.showValidationErrors).then(()=>{this.hideLoading(n)})}deleteComment(t){let n=t.getAttribute("comment");this.showLoading(t.querySelector("[comment-content]")),window. $ http.delete( ` / comment / $ { n } ` ).then(l=>{t.parentNode.removeChild(t),window. $ events.success(this.deletedText),this.updateCount(),this.hideForm()})}saveComment(t){t.preventDefault(),t.stopPropagation();let l={text:this.formInput.value,parent_id:this.parentId||null};this.showLoading(this.form),window. $ http.post( ` / comment / $ { this . pageId } ` ,l).then(c=>{let d=document.createElement("div");d.innerHTML=c.data;let o=d.children[0];this.container.appendChild(o),window.components.init(o),window. $ events.success(this.createdText),this.resetForm(),this.updateCount()}).catch(c=>{window. $ events.showValidationErrors(c),this.hideLoading(this.form)})}updateCount(){let t=this.container.children.length;this.elem.querySelector("[comments-title]").textContent=window.trans_plural(this.countText,t,{count:t})}resetForm(){this.formInput.value="",this.formContainer.appendChild(this.form),this.hideForm(),this.removeReplyTo(),this.hideLoading(this.form)}showForm(){this.formContainer.style.display="block",this.formContainer.parentNode.style.display="block",this.addButtonContainer.style.display="none",this.formInput.focus(),this.formInput.scrollIntoView({behavior:"smooth"})}hideForm(){this.formContainer.style.display="none",this.formContainer.parentNode.style.display="none",this.getCommentCount()>0?this.elem.appendChild(this.addButtonContainer):this.commentCountBar.appendChild(this.addButtonContainer),this.addButtonContainer.style.display="block"}getCommentCount(){return this.elem.querySelectorAll(".comment-box[comment]").length}setReply(t){this.showForm(),this.parentId=Number(t.getAttribute("local-id")),this.replyToRow.style.display="block";let n=this.replyToRow.querySelector("a");n.textContent= ` # $ { this . parentId } ` ,n.href= ` # comment$ { this . parentId } ` }removeReplyTo(){this.parentId=null,this.replyToRow.style.display="none"}showLoading(t){let n=t.querySelectorAll(".form-group");for(let l of n)l.style.display="none";t.querySelector(".form-group.loading").style.display="block"}hideLoading(t){let n=t.querySelectorAll(".form-group");for(let l of n)l.style.display="block";t.querySelector(".form-group.loading").style.display="none"}},Ov=Mv;var Pv=_t(Js());var Rv=class{constructor(t){if(this.elem=t,this.pageId=t.getAttribute("page-display"),sr.highlight(),this.setupPointer(),this.setupNavHighlighting(),this.setupDetailsCodeBlockRefresh(),window.location.hash){let l=window.location.hash.replace(/ \% 20/g," ").substr(1);this.goToText(l)}let n=document.querySelector(".sidebar-page-nav");n&&jt(n,"a","click",(l,c)=>{l.preventDefault(),window.components["tri-layout"][0].showContent();let d=c.getAttribute("href").substr(1);this.goToText(d),window.history.pushState(null,null,"#"+d)})}goToText(t){let n=document.getElementById(t);if(Jo(".page-content [data-highlighted]",l=>{l.removeAttribute("data-highlighted"),l.style.backgroundColor=null}),n!==null)ro(n);else{let l=Hc(".page-content > div > *",t);l&&ro(l)}}setupPointer(){let t=document.getElementById("pointer");if(!t)return;t=t.parentNode.removeChild(t);let n=t.querySelector("div.pointer"),l=!1,c=!1,d=!0,o="";jt(t,"input","click",(f,p)=>{p.select(),f.stopPropagation()}),ea(t,["click","focus"],f=>{f.stopPropagation()}),jt(t,"span.icon","click",(f,p)=>{f.stopPropagation(),d=!d,p.querySelector('[data-icon="include"]').style.display=d?"none":"inline",p.querySelector('[data-icon="link"]').style.display=d?"inline"
2020-09-20 17:33:18 +08:00
< path d = "M23 7V1h-6v2H7V1H1v6h2v10H1v6h6v-2h10v2h6v-6h-2V7h2zM3 3h2v2H3V3zm2 18H3v-2h2v2zm12-2H7v-2H5V7h2V5h10v2h2v10h-2v2zm4 2h-2v-2h2v2zM19 5V3h2v2h-2zm-5.27 9h-3.49l-.73 2H7.89l3.4-9h1.4l3.41 9h-1.63l-.74-2zm-3.04-1.26h2.61L12 8.91l-1.31 3.83z" / >
< path d = "M0 0h24v24H0z" fill = "none" / >
2022-02-06 23:49:23 +08:00
< /svg>`)}`,cmd:"drawio",menu:[{text:"Drawing Manager",onclick(){let b=g.selection.getNode();h(g,o(b)?b:null)}}]}),g.on("dblclick",b=>{let k=g.selection.getNode();!o(k)||f(g,k)}),g.on("SetContent",function(){let b=g.$("body > div[drawio-diagram]");!b.length||g.undoManager.transact(function(){b.each((k,E)=>{E.setAttribute("contenteditable","false")})})})})}function i_(){window.tinymce.PluginManager.add("customhr",function(i){i.addCommand("InsertHorizontalRule",function(){let t=document.createElement("hr"),n=i.selection.getNode();n.parentNode.insertBefore(t,n)}),i.addButton("hr",{icon:"hr",tooltip:"Horizontal line",cmd:"InsertHorizontalRule"}),i.addMenuItem("hr",{icon:"hr",text:"Horizontal line",cmd:"InsertHorizontalRule",context:"insert"})})}function o_(i){window.$events.listen("editor::replace",({html:t})=>{i.setContent(t)}),window.$events.listen("editor::append",({html:t})=>{let n=i.getContent()+t;i.setContent(n)}),window.$events.listen("editor::prepend",({html:t})=>{let n=t+i.getContent();i.setContent(n)}),window.$events.listen("editor::insert",({html:t})=>{i.insertContent(t)}),window.$events.listen("editor::focus",()=>{i.focus()})}var xy=class{setup(){this.elem=this.$el,this.pageId=this.$opts.pageId,this.textDirection=this.$opts.textDirection,this.imageUploadErrorText=this.$opts.imageUploadErrorText,this.serverUploadLimitText=this.$opts.serverUploadLimitText,this.isDarkMode=document.documentElement.classList.contains("dark-mode"),this.plugins="image imagetools table textcolor paste link autolink fullscreen code customhr autosave lists codeeditor media",this.loadPlugins(),this.tinyMceConfig=this.getTinyMceConfig(),window.$events.emitPublic(this.elem,"editor-tinymce::pre-init",{config:this.tinyMceConfig}),window.tinymce.init(this.tinyMceConfig)}loadPlugins(){r_(),i_();let t=document.querySelector("[drawio-url]");if(t){let n=t.getAttribute("drawio-url");n_(n,this.isDarkMode,this.pageId,this),this.plugins+=" drawio"}this.textDirection==="rtl"&&(this.plugins+=" directionality")}getToolBar(){return`undo redo | styleselect | bold italic underline strikethrough superscript subscript | forecolor backcolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | table image-insert link hr drawio media | removeformat code ${this.textDirection==="rtl"?"ltr rtl":""} fullscreen`}getTinyMceConfig(){let t=this;return{selector:"#html-editor",content_css:[window.baseUrl("/dist/styles.css")],branding:!1,skin:this.isDarkMode?"dark":"lightgray",body_class:"page-content",browser_spellcheck:!0,relative_urls:!1,directionality:this.textDirection,remove_script_host:!1,document_base_url:window.baseUrl("/ "),end_container_on_empty_block:!0,statusbar:!1,menubar:!1,paste_data_images:!1,extended_valid_elements:" pre [ * ] , svg [ * ] , div [ drawio - diagram ] ",automatic_uploads:!1,valid_children:" - div [ p | h1 | h2 | h3 | h4 | h5 | h6 | blockquote ] , + div [ pre ] , + div [ img ] ",plugins:this.plugins,imagetools_toolbar:" imageoptions ",toolbar:this.getToolBar(),content_style:`html, body, html.dark-mode {background: ${this.isDarkMode?" # 222 ":" # fff "};} body {padding-left: 15px !important; padding-right: 15px !important; margin:0!important; margin-left:auto!important;margin-right:auto!important;}`,style_formats:[{title:" Header Large ",format:" h2 "},{title:" Header Medium ",format:" h3 "},{title:" Header Small ",format:" h4 "},{title:" Header Tiny ",format:" h5 "},{title:" Paragraph ",format:" p ",exact:!0,classes:" "},{title:" Blockquote ",format:" blockquote "},{title:" Code Block ",icon:" code ",cmd:" codeeditor ",format:" codeeditor "},{title:" Inline Code ",icon:" code ",inline:" code "},{title:" Callouts ",items:[{title:" Info ",format:" calloutinfo "},{title:" Success ",format:" calloutsuccess "},{title:" Warning ",format:" calloutwarning "},{title:" Danger ",format:" calloutdanger "}]}],style_formats_merge:!1,media_alt_source:!1,media_poster:!1,formats:{codeeditor:{selector:" p , h1 , h2 , h3 , h4 , h5 , h6 , td , th , div "},alignleft:{selector:" p , h1 , h2 , h3 , h4 , h5 , h6 , td , th , div , ul , ol , li , table , img ",classes:" align - left "},aligncenter:{selector:" p , h1 , h2 , h3 , h4 , h5 , h6 , td , th , div , ul , ol , li , table , img ",classes:" align - center "},alignright:{selector:" p , h
2019-08-31 21:16:14 +08:00
/ * !
2021-04-10 04:18:32 +08:00
* clipboard . js v2 . 0.8
2020-03-15 06:31:42 +08:00
* https : //clipboardjs.com/
2021-04-10 04:18:32 +08:00
*
2019-08-31 21:16:14 +08:00
* Licensed MIT © Zeno Rocha
* /
2021-04-10 04:18:32 +08:00
/ * * !
2021-09-01 05:07:53 +08:00
* Sortable 1.14 . 0
2021-04-10 04:18:32 +08:00
* @ author RubaXa < trash @ rubaxa . org >
* @ author owenm < owen23355 @ gmail . com >
* @ license MIT
* /
2020-09-20 17:33:18 +08:00
//# sourceMappingURL=app.js.map